[SOLVED] Command Line for Flashing Target

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

  • [SOLVED] Command Line for Flashing Target

    I'm trying to figure out the command line equivalent of this J-Flash Lite invocation. It's all I really need. Apparently my Google Fu has let me down and I'm trying to understand why.

    I can see references to using JFlash.exe but there doesn't seem to be an option to set the device (that I can find). My attempt to use that (JFlash.exe -open<pathtofile>,0x400000 -auto) failed (although it's not clear I really needed that address in there). When J-Flash starts up it's not on the right device anyway so that's a big failure.

    I found references to JLink.exe which looked hopeful. Most of it seemed usable until I got to specifying the bin file. That doesn't seem to be a command line option nor does actually telling it to do the actual programming like -auto would do for JFlash.exe.

    Anyway, this seems like such a basic question but for some reason I'm just not finding the answer.
    Images
    • 2019-11-01.png

      10.99 kB, 464×447, viewed 3,457 times
  • I'm still working out some other issues but this command seems to work for me.

    JFlash.exe -openprj<pathtojflashfile> -open<filepath>,0x100000 -auto

    For me it launches JFlash and prompts me about the checksum, so I'm trying to figure that out. I need the whole process to be automated.
  • bash script I used awhile ago to automate flashing an RZT1 device. This requires creating a project in J-Flash.

    Shell-Script

    1. #!/bin/bash
    2. # SPI FLASH RZT1 R4 flashing.
    3. JFLASH_PATH="C:/Program Files (x86)/SEGGER/JLink/JFlash.exe"
    4. PROJECT_PATH="r4_basic.jflash"
    5. BINARY_PATH="build\r4_f6_udp.hex"
    6. LOG_FILE="jflash_log.log"
    7. "${JFLASH_PATH}" -openprj"${PROJECT_PATH}" -open"${BINARY_PATH}" -auto -jflashlog${LOG_FILE} -min -exit
  • Hi,
    Thank you for your Inquiry.

    If you do not want to setup a J-Flash project, you can also use the J-Link Commander together with a J-Link Command file.
    You can find information about this in the user manual "UM08001_JLink.pdf" p. 63 (3.2.3 Using J-Link Command Files)
    or in our Wiki: wiki.segger.com/J-Link_Commander

    EDIT:
    I just noticed, that you are using J-Flash lite.
    J-Flash lite is a tool which is not supposed to be used for automated processes, since it is made to be used together with our EDU models.
    These EDU models are not to be used in a commercial context, thus not designed for a production environment.
    These features are reserved for our professional debug probes.
    Please note, that we do not guarantee that the solution with the J-Link Commander will always work 100%.

    Best regards,
    Fabian
    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.