[SOLVED] Problem with adding a new device to Open Flash Loader

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Problem with adding a new device to Open Flash Loader

    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!
  • Hi, I'm bumping this in the hope that someone will remember something. I'm pretty much stuck with this, and not sure what to try next.

    The error messages suggest to me that JFlash is trying to load the .elf file I created with Segger Embedded Studio into RAM, but failing, because it can't stop the core.

    I don't understand why this would happen, because I can download and run / step / decode the debug version successfully.

    Has anyone seen this error message before? Have I interpreted it correctly? Surely someone at Segger must know what it means. (I know this isn't an official support forum, but I can see Segger employees posting here.)

    Alternatively, has anyone here succesfully added a new device to Open Flash Loader? Can you suggest anything I might have missed, or anything I can check which might tell me what is going wrong?

    Many thanks.
  • Hi,
    Unfortunately, we cannot provide support for open flashloaders, as this would be too time consuming.
    All information required to create a flashloader is documented and we use the same documentation to write ours.

    We provide customized flashloaders for NREs.If you are interested in this option, please contact us via the support system (link in my signature below this post).

    We will close this thread now.

    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.