[SOLVED] Open Flashloader: manually returning error codes don't give back an error in J-Flash?

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

  • [SOLVED] Open Flashloader: manually returning error codes don't give back an error in J-Flash?

    Hello,

    I'm adding support for our custom hardware using the open flashloader and using it in JFlash. (Using a J-link plus to connect if this matters)

    I see from here wiki.segger.com/Open_Flashloader#Init that 1 is an error code, but when I manually return an error in flash algorithm functions like SEGGER_OPEN_Read and SEGGER_OPEN_Erase, nothing happens and it shows up as successful in J-Flash. It only shows a RAMCode error with returning 1 in Uninit. (I don't know if this is a bug or what I'm asking below.)

    Thus, I'm wondering if it is possible for J-Flash choose to use it's own flash programmer instead of using the openflashloader, .elf I've specified in JLinkDevices.xml. Our custom device uses external serial SPI flash, so we must run our flashloader methods.

    edit: It looks like I do not have this problem with SEGGER_OPEN_Program right now, when I select program on jflash it runs and returns whatever error code I give. Just erase I'm running into the above problem.

    Thanks,

    The post was edited 4 times, last by fire ().

  • Hello,

    We are not aware of such an issue.
    We will investigate the described behavior and get back to you with the results.

    FYI: You can test if the function is actually used by J-Flash by adding a while(1); loop to the function.
    In this case, the RAMCode should never return and J-Flash should report an timeout error.

    Best regards
    Erik
    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.
  • Hello,

    We were able to reproduce the issue.
    Right now the return value of SEGGER_OPEN_Erase is not correctly evaluated on our side.

    We are working on a fix for this and I will update this thread accordingly.

    Please excuse any inconveniences caused.

    Best regards,
    Daniel
    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.
  • Hello,

    we were able to resolve the issue:
    The return value of the SEGGER_OPEN_Erase function is now correctly evaluated.

    The fix will be a part of the next release (~ one to two weeks).

    Best regards,
    Daniel
    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.