Command "loadbin" inside Jlink script

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

  • Command "loadbin" inside Jlink script

    Hi,
    i need to use the command "loadbin" inside a Jlink script: how can i call this command inside the script code ? (I need to load a binary file as first step)
  • Hi,

    Sorry but we do not really understand the question.
    Do you mean a real J-Link script or a Command file for J-Link Commander?
    These are two separate and completely different things.

    I assume you want to automatize some steps via J-Link Commander in "batch" mode, passing a command file to it.

    Your call of J-Link Commander would look like as follows:

    C Source Code

    1. JLink.exe -device <Device> -if JTAG -speed 4000 -CommanderScript=C:\test.jlink


    Contents of test.jlink:

    C Source Code

    1. h
    2. loadbin C:\test.bin,0
    3. r
    4. q



    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,

    I still not understand... What second example?
    Both things I posted are 1(!) example, I just marked them as "code".
    Could you please explain exactly(!) what you are trying to do?


    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.
  • I want to create a jlink script (like the samples in the segger directory C:\Program Files (x86)\SEGGER\JLinkARM_V470a\Samples\JLink\Scripts)
    that can invoke the "loadbin" (or similar) command inside a function.

    It is possible ?

    PS. I had misread your last post.
  • Hi,

    The J-Link script samples at "Samples\JLink\Scripts" are J-Link script files.
    They have C-like syntax and they are usually used to overwrite the default device identification process performed by the DLL when connecting to a device.

    "loadbin" is a J-Link Commander specific command.
    The J-Link script files have NOTHING to do with the commands in J-Link Commander.

    If you need something like a memory fill function etc.
    You need to write this on your own.
    The J-Link script files are not designed to perform downloads of files etc. into the target. They are designed for customized CPU initialization only.
    Some devices need special initialization, since otherwise J-Link would not even be able to find the core etc. This is what the C-like J-Link script files are for.

    Again: What are you trying to do?


    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.
  • Ok, thanks for the response.

    It is related to the post of the SQI ( i wrote this post before your response in the other post) and I had a doubt on the possibility of use of "loadbin" or similar command with the script.