How to upload program direcly from Freedom Studio to HiFive1 Rev B?


(Krists) #1

I have red documentation (https://sifive.cdn.prismic.io/sifive%2F8d7b8385-64e3-4914-8608-8568412c8aae_hifive1b-getting-started-guide.pdf and https://sifive.cdn.prismic.io/sifive%2F748eb7c8-9861-4b6a-ba1e-7238b262fe4f_freedom-studio-manual-4.7.2.2019-03-4.pdf)

Is really only way to upload program to HiFive1 Rev B is to manually drag .hex file into HiFive storage device? I didn’t find everywhere in second documentation how to do that via Freedom Studio. There are 0 tutorials results in Youtube on how to flash program and since Arduino IDE support is dropped, I am totally clueless.

I tried to drag .hex file to HiFive1 Rev B, but something weird happens. I dragged the compiled sifive-welcome .hex and it just turn on green led for second and then nothing happens.

Can anybody give simple, step by step tutorial about easiest way to flash program onto board? Preferably do it direcly from Freedom Studio. In second documentation, explanation abruply ends at 12. page on how to make new project. Documentation doesn’t say how to flash that via Freedom Studio. I am now stuck.

I am using Ubuntru 19.04 and latest Freedom Studio. I have HiFive1 Rev B board.


(Bruce Hoult) #2

I’ve never tried Freedom Studio but the freedom-e-sdk makefile target “upload” sends the new program to the board without needing manual drag-and-drop.

It uses a command like …

scripts/upload --hex software/hello/debug/hello.hex --jlink JLinkExe

… which in turn runs …

echo -e "loadfile software/hello/debug/hello.hex\nrnh\nexit" | JLinkExe -device FE310 -if JTAG -speed 4000 -jtagconf -1,-1 -autoconnect 1

#3

As bruce said, using the freedom-e-sdk works for me as well. LEDs don’t work tho at least how they are used in the sifive-welcome program.

The studio doesn’t work for me, even if I set the debugger target name to RISC-V (which was missing in the quick setup steps). Trying to upload using the studio just hangs for me with the board blinking red LED 1/s, no tty output and “Starting CPU…” msg in the studio. Not sure what’s wrong with it, seems like some configuration is possibly wrong with the studio.


(Jishnu Chakrabarti) #4

is it in windows platform?