[SOLVED] How to skip flash erase

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

  • [SOLVED] How to skip flash erase

    Hi , I have the following script:

    Source Code

    1. cat ./myupload.jlink
    2. device ATSAMD21G18A
    3. si SWD
    4. speed 4000
    5. connect
    6. exec SetCompareMode = 0
    7. loadbin .pio/build/mkrwifi1010/firmware.bin, 0x2000
    8. r
    9. q



    which I run like so:

    JLinkExe -NoGui 1 -CommandFile ./myupload.jlink

    As you can see, I disabled the compare step, and I would like now to disable also the erase step ( to speed up the operation).
    How can this be done ?

    Kind regards
    Peter
  • Hi Peter,
    it seems like you misinterpreted what "SetCompareMode=0" does.
    This is not really a surprise as it was not properly documented. We will revisit the documentation an adjust this.
    In short:
    When SetCompareMode=0 is selected, the J-Link will skip the Blank check and thus has to assume that the device must always be erased before program.
    => Forcing SetCompareMode=0 will force J-Link to always trigger erase when calling LoadFile.

    From what I understand you intend to skip the verify, correct?
    If so, you would have to use another Command String "SetVerifyDownload=0":

    Please note that there is currently no way to Skip the blank check & also skip the erase.
    This is currently only possible via J-Flash.


    Does this answer your question?


    BR
    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.