[SOLVED] verification of automated flashing?

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

  • [SOLVED] verification of automated flashing?

    Hi there,

    i am using the J-Link Commander to flash my EFM32
    I wrote a little batchfile for the commander to automate the process. A CommanderScript passes the right commands. It looks like this.

    Source Code

    1. h
    2. log C:\flashtest/result.log
    3. erase
    4. loadbin C:\flashtest/myTestFW.bin, 0x00
    5. verifybin C:\flashtest/myTestFW.bin, 0x00
    6. r
    7. q

    So I log the process in the logfile. My Problem is, how can I detect a successful flashing/verification? Is there any line/option that I can read out to verify that the new firmware is on my board? There is an environment variable %ERRORLEVEL% but as far as i know, it only shows that the JLink.exe finished successfully, but doesn´t show the flashing/verifycation result.

    A different approach I have in mind would be to add a further step to read out the FW with savebin and then make a checksum with FCIV against the myTestFW.bin file.

    Do you have any other suggestion?

    cheers

    max
  • Hello Max,

    Thank you for your inquiry.
    For this case we have implemented the command line function "exitonerror".
    More information can be found in the J-Link user manual (UM08001_JLink).

    Best regards,
    Nino
    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 Nino,

    thanks for your quick response. I got the exitonerror running now. It detects wrong filename, etc. and sets ERRORLEVEL to 1. However it doesnt set ERRORLEVEL to 1 if
    verifybin detects a different bin file.

    For example:

    Source Code

    1. loadbin C:\flashtest/myTestFW.bin, 0x00
    2. verifybin C:\flashtest/myDifferentFW.bin, 0x00


    cmd-line says:

    Source Code

    1. Verify failed @ address 0x00000004
    2. Expected F4 read 01

    Isn´t this supposed to be an error?

    cheers

    max
  • Hi Max,

    It is only an error if the file you want to verify does not exist.
    If it is available on the harddrive it should not throw an error when opening.

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