J-Link does sometimes not flash a changed programm

  • J-Link does sometimes not flash a changed programm

    When I change only a tiny bit in a sourcecode, and compile and start the debug process again, sometimes (few times
    per day) the debugger does not upload the changed program and starts the old firmware
    in the chip.

    This can cost a lot of time when I don’t recognize it right away, and believe that the code in the debug-window is the code that is actually executed.
    If I recognize it, I have to erase the chip with some other means, to force J-Link to really upload the new program.

    I use a STM32F100 .. with Segger Version 4.96

    Is there a way to force J-Link to always up-load the whole binary before debugging?

    The post was edited 2 times, last by rensem ().

  • Hi,

    By default, the J-Link DLL compares the image to be downloaded with the image located in the flash and triggers a download only if necessary (data have been changed).
    Therefore, could you please check if the changed program (the new data file) differs from the previous one in case of flash download is skipped? I would guess the files
    do not and therefore, flash download is skipped. If not, could you please provide us the two data files which differ and where the J-Link DLL skips the flashdownload,
    so we can investigate this here and check what might be the issue?

    Which IDE do you use? In IDEs which come with native J-Link supports, support so called J-Link settings files which allow to change the flash download behavior (always erase program, program if necessary, etc...)


    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.
  • Hi

    Where should I send the two files ? I can not post it into the forum, because
    it is property of the company.

    I use plain eclipse with make and start the debug session with the following script:

    Source Code

    1. define run
    2. tbreak main
    3. monitor reset
    4. continue
    5. end
    6. shell start /MIN TOOL_stm32\servers\JLinkGDBServer_4.94h\JLinkGDBServer.exe -s -select USB=0 -device STM32F100VC -if SWD -speed 1000
    7. target
    8. remote localhost:2331
    9. load
    10. monitor
    11. reset
    Display All


    Which change would set it to “always erase program” ?
  • Hi,

    Please send a e-mail + attachment (or an link to a FTP or so), to segger.com/support/technical-support/ with a reference to this thread.


    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.