program ARM cortex-M using jlink-commander

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

  • program ARM cortex-M using jlink-commander

    Hello,

    I want to download hex files to ARMcortex-M0/3 using the command line.
    (I want to program a small batch without using the GUI)
    I'm a little confused by the several tools for jlink, but I think jlink.exe should be able to do it?

    Could you please tell me what I've to do?


    Thanks,

    Sebastian
  • Hi Sebastian,

    First, we would need a proper description, of what exactly you are trying to do...

    Are you trying to download files to the target flash or the target RAM?
    Right now, J-Link Commander (JLink.exe) supports bin files only. (hex files also contain address and maintenance information, so they must be parsed in order to extract the data)
    Moreover, it is not designed for production purposes (as it sounds this is what you are trying to do).

    And the most important thing: What device (not only the core) are you using?


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

    SEGGER - Alex wrote:

    Moreover, it is not designed for production purposes (as it sounds this is what you are trying to do).

    What does it exactly mean "designed"? Do you mean the user interface (e.g. flash button, nice GUI, stand-alone device) or some changes to the loading binary for the developing purpose, changes to the flash behind the application, etc?

    Best
    Martin
  • Alex, thanks for your help!

    SEGGER - Alex wrote:

    Are you trying to download files to the target flash or the target RAM?
    To the flash. I didn't think about that. Do I need a flashloader then ...?

    SEGGER - Alex wrote:

    Right now, J-Link Commander (JLink.exe) supports bin files only. (hex files also contain address and maintenance information, so they must be parsed in order to extract the data)
    I'm using IAR EWARM, it can convert the output to
    - Intel extended
    - Motorola
    - binary
    - simple

    SEGGER - Alex wrote:

    Moreover, it is not designed for production purposes (as it sounds this is what you are trying to do).
    Yes, but very small scale, just first steps (max 1000 pieces). The biggest challenge is, that each device has another hex file (there are individual lookup-tables for each device). Would you recommend another product for this scenario. (It has to fit into an automatic process, we can't have any GUI, except for an initial setup)

    SEGGER - Alex wrote:

    And the most important thing: What device (not only the core) are you using?
    NXP LPC1227 (Cortex-M0)

    and maybe also NXP LPC1343 (Cortex-M3)
  • Hi Sebastian,

    So far, I can recommend two ways for what you are trying to do:

    1) Programming via J-Flash in batch mode (yes, I know it is GUI based but can be automatized via Batch-File): segger.com/jflash.html
    2) Writing your own small command-line utility which makes use of the J-Link DLL flash programming capabilities and configures everything for production grade flash programming. For this, you would need the J-Link SDK: segger.com/jlink-sdk.html

    J-Link Commander is not recommended since:
    - It probably does not provide the level of customization you are requiring.
    - The DLL flash programming logic by default is configured flash programming for debugging which is highly optimized speed flash programming and not for production grade flash programming (double verification etc.). J-Link Commander uses the debugging flash programming method.


    NXP LPC1227 (Cortex-M0)
    and maybe also NXP LPC1343 (Cortex-M3)

    Both are supported.


    Best regards
    Alex
    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.