sparkfun red-v code to turn on the LED?

The Sifive Hifive board and the sparkfun red-v board use the same CPU.

The Hifive rev b board has three LEDs on it. The red-v board has one LED.

The GPIO memory map for the fe310 cpu has its base at $10012000. The pin enable bits are at $10012008.

Using JLinkExe you can modify the memory at $10012008 to change which pins are enabled.

Using the Hifive board if you change the memory from $30000 to $230000 the blue LED turns on.

Using the red-v baord if you change the memory from $30000 to $30020 the LED does NOT turn on!

Does anyone know why enabling the red-v pin does not turn on the LED?

Thanks for your help

LED is pin 5 in GPIO

0x10012004 is GPIO input enable, set 5th bit to 0 to disable input

0x10012038 is GPIO IOF, set 5th bit to 0 to disable multiplex

0x10012008 is GPIO output enable, set 5th bit to 1 to enable led

0x1001200C is GPIO output value, set 5th bit to 1 to light led

NOTE, you have to set the 4 bytes together, rather than just 1 byte, as only naturally aligned 32-bit memory accesses are supported for GPIO.