[SOLVED] JLinkExe return code

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

  • Hi Skot,


    Unfortunately, this is currently not implemented.
    J-Link Commander is intended for development purposes. If the provided functionality for scripting / automated use is useful, we are glad, but we can not invest development time in this direction.
    However, I will ask on the next J-Link team meeting if we can output the error messages via stderr.

    As an alternative, you can adjust J-Link Commander yourself by using the J-Link SDK (Part No 8.08.06 on the price list), which ships with the source code of J-Link Commander.

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

    Is there a better way to do this than J-Link Commander? I just would like to programmatically know if a flashing step has failed.

    $1000 for the SDK just for the opportunity to write it myself seems like a non-starter.

    thank you,
    -Skot
  • Hi Skot,

    $1000 for the SDK just for the opportunity to write it myself seems like a non-starter.

    Just wanted to mention the option.

    I just saw that you are using an EDU Mini.
    Whether your are working for an university or as a hobbyist, you can always discuss with the marketing team if it would be possible to receive the J-Link SDK at a reduced price or free of charge for your project: info@segger.com

    I just would like to programmatically know if a flashing step has failed.

    I am sorry, but that is precisely what the SDK is for:
    To provide a stable and backwards compatible API, which allows or example to be able to call e.g. the write-to-flash-memory function and be able to use to return value.
    To make it work with J-Link Commander, we would have to add a error message for each possible error (Since you can use the return value of J-Link Commander to know that sth. failed, but you want to know what failed) and we would not be able to change them later on, since customers would rely on the output of J-Link Commander, which is exactly the opposite of what we want to provide with J-Link Commander: A powerful interactive command-line tool, which can be scripted for convenience purposes.


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

    Okay, thanks for the tips.

    How do folks do this on a production floor? (not with the EDU Mini, I promise). A factory assembler is going to need a go/no-go on flashing firmware -- Is this a custom SDK job every time?

    thanks,
    -Skot
  • Hi Skot,

    for production purposes we recommend a Flasher ARM / PRO for standalone mode and a J-Link PLUS or higher / a Flasher + J-Flash for production programming with a PC.
    I never heard that they wanted to evaluate programmatically what failed in production. Usually, they want to know if something failed (in order to sort the target unit out) and will later analyze it if it is worth the time.

    Is there sth. I missed about the use case?
    Can you provide me with more information about it?


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

    I'm not sure what sth. means. I've never really done this before -- just learning.

    I think of the actual flashing via j-link as one step in many during assembly and testing. It would just be nice to know if that step passed or failed so the rest of the script could be halted.

    I was reading through the j-link manual again and noticed the `exitonerror` command for jlink commander. I'm pretty sure this does what I was asking about -- it seems to return 1 if any step in the flashing fails. I'm satisfied now.. Sorry I didn't notice this earlier!

    thanks,
    -Skot