Hello,
I'm trying to add a new device to Open Flash Loader, and having problems.
I have followed the instructions here wiki.segger.com/Open_Flashloader#Adding_a_New_Device as far as I can tell. When I do a debug build, my code programs / erases / reads back from the flash as I expect.
When I use J-Flash I can select my device from the dialog, and connect OK, but when I try to read back I get the folowing error:
......
- Start of preparing flash programming
- End of preparing flash programming
- ERROR: Timeout while preparing target, core does not stop. (PC = 0x00000000, X1 = 0x00200790, X2 = 0x00200790)!
- ERROR: Failed to initialize RAMCode
- Start of restoring
- ERROR: Timeout while restoring target, core does not stop. (PC = 0x00000000, X1 = 0x00200790, X2 = 0x00200790)!
- End of restoring
- ERROR: Failed to read back target memory
Disconnecting ...
- Disconnected
Can anyone suggest what the cause of this error might be?
Some details:
It's a RISC-V 32 core on custom hardware.
J-Link works fine for loading and debugging code in RAM
The flash is programmed using SPI, but memory mapped as instruction memory. I'm not sure whether the 'BaseAddr' parameter in JlinkDevices.xml should be 0x0000, as the SPI code will need, or the memory-mapped address, which would be needed for readback. I have tried both, it didn't seem to make a difference!
Thanks!
I'm trying to add a new device to Open Flash Loader, and having problems.
I have followed the instructions here wiki.segger.com/Open_Flashloader#Adding_a_New_Device as far as I can tell. When I do a debug build, my code programs / erases / reads back from the flash as I expect.
When I use J-Flash I can select my device from the dialog, and connect OK, but when I try to read back I get the folowing error:
......
- Start of preparing flash programming
- End of preparing flash programming
- ERROR: Timeout while preparing target, core does not stop. (PC = 0x00000000, X1 = 0x00200790, X2 = 0x00200790)!
- ERROR: Failed to initialize RAMCode
- Start of restoring
- ERROR: Timeout while restoring target, core does not stop. (PC = 0x00000000, X1 = 0x00200790, X2 = 0x00200790)!
- End of restoring
- ERROR: Failed to read back target memory
Disconnecting ...
- Disconnected
Can anyone suggest what the cause of this error might be?
Some details:
It's a RISC-V 32 core on custom hardware.
J-Link works fine for loading and debugging code in RAM
The flash is programmed using SPI, but memory mapped as instruction memory. I'm not sure whether the 'BaseAddr' parameter in JlinkDevices.xml should be 0x0000, as the SPI code will need, or the memory-mapped address, which would be needed for readback. I have tried both, it didn't seem to make a difference!
Thanks!