[SOLVED] How to skip flash erase

  • Hi , I have the following script:

    Code
    cat ./myupload.jlink
    device ATSAMD21G18A
    si SWD
    speed 4000
    connect
    exec SetCompareMode = 0
    loadbin .pio/build/mkrwifi1010/firmware.bin, 0x2000
    r
    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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!