[SOLVED] Arguments from a .bat file to a .jlink file with CommanderScript

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

  • [SOLVED] Arguments from a .bat file to a .jlink file with CommanderScript

    Hi,

    Do you know how to pass some arguments to a xxx.jlink file with the option CommanderScript to a batch file.
    for example, I would like to call a batch file to write a value in a memory with:


    in CMD, I call:
    WEEPROM.bat 0x8080 0x11223344

    batch file(WEEPROM.bat):
    jlink.exe -device STM32L083 -if SWD -speed 4000 -autoconnect 1 -CommanderScript writeEERPROM.jlink %1 %2


    writeEERPROM.jlink file:


    w4 %1, %2
    r
    go
    q

    Do you know if a jlink file is able to receive some arguments?
    How to do?

    Thanks

    The post was edited 1 time, last by gfo ().

  • Hi,

    No, J-Link command files / commander scripts are not able to receive arguments.
    What you could do in your bat file WEEPROM.bat:

    C Source Code

    1. w4 %1, %2 >writeEERPROM.jlink
    2. r >>writeEERPROM.jlink
    3. go >>writeEERPROM.jlink
    4. q >>writeEERPROM.jlink
    5. jlink.exe -device STM32L083 -if SWD -speed 4000 -autoconnect 1 -CommanderScript writeEERPROM.jlink



    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,


    thanks for the feedback.
    You are welcome!
    /Closed


    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.