[SOLVED] Circular "dependancy" when using Commander script

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

  • [SOLVED] Circular "dependancy" when using Commander script

    Im making a Commander script:

    si 0
    speed 1000
    config -1,-1
    device tms570ls1114
    loadfile Bootloader.srec,0

    This one claims that my device is UNDEFINED, i presume it's the the config command that needs to know that?

    si 0
    speed 1000
    device tms570ls1114
    config -1,-1
    loadfile Bootloader.srec,0

    But this one require me to enter the IR/DR values (-1, -1,), presume it's the device command that is the "culprit" this time?

    In any of these cases the downloading of the bootloader will require extra input from the user.

    I'm using JLink 5.10g and calling it like so:
    jlink -commanderscript load_bootloader.jlink

    Can you help me resolve this in any way?

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

  • Hi,


    could you please give the current version (6.14c) of the J-Link software & documentation pack a try?
    Does the issue persist with the current version?

    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,


    it is recommended to pass all initial setup configuration as a commandline parameter, e.g.
    jlink -device tms570ls1114 - if JTAG -speed 1000 -jtagconf -1,-1 -autoconnect 1 -commanderscript load_bootloader.jlink


    On the other hand, I could not reproduce the issue.
    Could you send me a screenshot of the J-Link Commander session?


    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.
  • Here is a picture of the problem in when entering the commands manually.

    I'm getting a slightly different behviour this time though, probably due to the version change.
    Now i'm getting the same "error" no matter which order i use.
    It seems like it doesn't remember which device i select?
    Images
    • manual_entry.png

      117.43 kB, 1,337×1,198, viewed 372 times
  • Hi,


    thanks for providing the screenshot.
    The intended way for J-Link commander is:
    a) pass the setup as a command line parameter
    b) in interactive mode, Type in "con" or "connect" and follow the instructions

    In interactive mode, the config command does not the same as the -jtagconf command line parameter and cannot be used before a connection has been established.


    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.
  • So to make this a one click function i would need:

    load_bootloader.bat

    Source Code

    1. jlink -device tms570ls1114 -if JTAG -speed 1000 -jtagconf -1,-1 -autoconnect 1 -commanderscript load_bootloader.jlink


    load_bootloader.jlink

    Source Code

    1. loadfile bootloader.srec,0


    And for each variation (other areas or versions of the SREC) i will need a new batch file as well as a new commander script?

    Can the loadfile command be entered as an command line option?

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

  • Hi,

    Can the loadfile command be entered as an command line option?

    No.

    And for each variation (other areas or versions of the SREC) i will need a new batch file as well as a new commander script?

    Well, as far as I can see, you would have to do this anyway?

    Can you please give me a short summary of what you want to do with one click?
    Do you only have multiple boot loader, or also different targets etc?



    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.
  • Yeah if the loadfile can't be moved out from interactive mode i guess so!

    I have two targets, one that is rather stable in regards of updates to the srec's (boot and application) but might need initial loading from time to time, and one that is subject to constant change with need for some concurrent versions of at least the application (pretty stable bootloader).

    This is meant to simplify the loading process for people that aren't well versed in software management but might need to switch from one version to another.
    If it's not one-click they will ask me to do it... aint nobody got time for that!

    Different one-clicks for different files/targets are fine thoug!

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

  • Hi,


    well in order to have it one-click, you need at least one bat per configuration anyway, correct?

    Lets say you have 3 different boot loader for each target, named
    bootloader_stable.srec
    bootloader_dev.srec
    bootloader_test.srec

    You can create bats like as follows:
    Load_Stable_BL.bat:

    C Source Code

    1. con >load_bootloader.jlink
    2. loadfile bootloader_stable.srec,0 >>load_bootloader.jlink
    3. sleep 2500 >>load_bootloader.jlink
    4. q >>load_bootloader.jlink
    5. jlink -device tms570ls1114 -if JTAG -speed 1000 -jtagconf -1,-1 -autoconnect 1 -commanderscript load_bootloader.jlink


    Load_Test_BL.bat:

    C Source Code

    1. con >load_bootloader.jlink
    2. loadfile bootloader_test.srec,0 >>load_bootloader.jlink
    3. sleep 2500 >>load_bootloader.jlink
    4. q >>load_bootloader.jlink
    5. jlink -device tms570ls1114 -if JTAG -speed 1000 -jtagconf -1,-1 -autoconnect 1 -commanderscript load_bootloader.jlink



    etc...

    Does this work for you?


    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,

    thanks for the feedback.
    Good to hear that it works for you :) .

    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.