Issues with the HiFive1

Hi folks!

After I finally received my HiFive1 board, I was excited to try it. I plugged it in on the USB port, the two green power indicator LEDs lit up but nothing else happened, the RGB-LED stayed dark. I also tried using an external power supply to power the board, but it still didn’t show the led_fade demo.

After that, I tried to re-flash the led_fade program and suddenly the RGB-LED showed the expected pattern. However, after a reset or power loss it still remained dark. In the next step I tried to re-flash the bootloader, considering the modified values for the linker and the openocd command. Unfortunately this also did not fix the issue. I discovered that I could manually start the execution of the program with openocd’s resume 0x2000000 command.

Does anybody know how to fix it?

Thanks
Sebastian

Hmm, it sounds like this board snuck through the testing procedures. It sounds like its OTP was never programmed, which should be an essential step to pass the tests, which makes me wonder if it really passed all the tests.

Can you check whether the OTP was programmed, as follows?

  1. Hit reset on your board
  2. Connect with open_ocd (make run_openocd)
  3. Connect with GDB in other window (make run_gdb)
  4. Try the following in GDB to examine your ROM and OTP code:
(gdb) target extended-remote localhost:3333
(gdb) display/i $pc
??? What does it show?
(gdb) x/i 0x1000
Should show: 0x1000: j 0x20000
(gdb) x/i 0x20000
Should show: 0x20000:    j 0x21ff4
(gdb) x/i 0x21ff4
Should show: 0x21ff4 : fence unknown, unknown
(gdb) x/i 21ff8
Should show 0x21ff8:   lui t0, 0x20000
(gdb) x/i 21ffc
Should show 0x21ffc : jr t0

You can also email info@sifive.com as we may need to send you a replacement if we can’t figure it out remotely.

Hi Megan,
thank you for your quick reply.
I followed your instructions, ran gdb and this are the results:

(gdb) target extended-remote localhost:3333
Remote debugging using localhost:3333
0x00000000 in ?? ()
(gdb) display/i $pc
1: x/i $pc
=> 0x0: unimp
(gdb) x/i 0x1000
   0x1000:      j       0x20000
(gdb) x/i 0x20000
   0x20000:     unimp
(gdb) x/i 0x21ff4
   0x21ff4:     unimp
(gdb) x/i 0x21ff8
   0x21ff8:     unimp
(gdb) x/i 0x21ffc
   0x21ffc:     unimp

It certainly looks like your OTP is not programmed. Can you please let me know what you see if you ask it to format as integer instead of instruction:

(gdb) p {int}0x20000

And so on. If it is all zeros, then your OTP is not programmed. I

We can send you a script to program your OTP, but I’m worried that this indicates the board did not have all the tests run on it at all.

Indeed the value is zero:

(gdb) p {int} 0x20000
$1 = 0

Please send me the script to program the OTP memory.