Can't write to Instruction Memory from gdb #392
-
Hi Stephen, (love the project!) I've managed to generate Neorv32 on a Max10 dev kit, compile and run the blink_leds example via the bootloader and connect to the cpu via openocd / gdb. My problem is that I can't write to the Instruction Memory from gdb. This then means that the load command doesn't work in gdb amongst other issues. gdb log
openocd log
(Note: The write to address 0x00000000 produced the first Failed to write to memory error and the the load command produced the second.) I suspect that the issue may be in my openocd .cfg file (though I don't really know) so here it is.
Any ideas as to what I'm doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey Colin! What does your processor setup (and the configuration) look like? I think this might be caused by the boot configuration of your setup. If the internal bootloader is disabled (
You can find more information about this in the data sheet's section Boot Configuration. Just enable the bootloader and you can happily write to the IMEM again. I know this is no perfect solution. You could also replace the default bootloader by a simple endless-loop. So the processor would run this loop until the debugger takes over. |
Beta Was this translation helpful? Give feedback.
Hey Colin!
What does your processor setup (and the configuration) look like?
I think this might be caused by the boot configuration of your setup. If the internal bootloader is disabled (
INT_BOOTLOADER_EN => false
) the system uses the "Direct Boot" approach where the IMEM is initialized with the actual application code during synthesis. This also makes the IMEM a real ROM (so it is read-only) and would explain your error message:You can find more information about this in the data sheet's section Boot Configuration.
Just enable the bootloader and you can happily write to the IMEM again. I know this is no perfect solut…