[ABANDONED] JLink.exe and Exit codes

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

  • [ABANDONED] JLink.exe and Exit codes

    Hello,

    I need to program some microcontrollers using .NET Application.
    In my Application I run process JLink.exe with some parameters (script).
    I noticed that when the programming status was ok and not ok Exit Code is 0.

    How can I for example check if the status of programming was ok or the execute of command "w4" was ok?

    Best Regards
    Michał
  • Hi,

    in script mode, eoe 1 (= ExitonError 1) can be set. This will cause J-Link to stop script processing if an error occurs.
    More error levels are planned in the future, but currently without any fixed release date.


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

    Source Code

    1. device TM4C1231E6PM
    2. eoe 1
    3. erase
    4. loadfile C:\my\Bootloader\0_1_6.hex
    5. r
    6. g
    7. exit


    will do.

    Best regards,
    Niklas
    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.
  • Thank you


    I tryied this command in my script:

    Source Code

    1. device MKE02Z64xxx4
    2. eoe 1
    3. w4 0x000007D0 FFFFFF12


    I disconeccted my device and run my App.
    Result below:

    [IMG=http://s1.fotowrzut.pl/S8X61LNY5V/1_medium.jpg][/IMG]

    After execute command "exit" console will close and return 0.


    So result is "OK" for disconnected device...


    Best Regards
    Michał

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

  • Hi Michal,


    sorry for the delay in response.
    The connect to J-Link does occur before eoe 1 is set.
    Try passing "-ExitOnError" as a command line option to JLink.exe, so it will be set before anything else is done.

    Btw.
    Could not find emulator with USB serial number 229.

    Is there a part missing in the script or is this already be done using command line parameters?

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