Configure J-Flasher from API-DLL

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

  • Configure J-Flasher from API-DLL

    Good morning,

    First of all excuse me in case I am asking a pretty obvious question but I am new to J-Link environment and I haven't been able to find a solution to my problem searching around the available documentation.

    I have successfully written an application that is able to flash and secure STM32F217VE, STM32F107VC and EFM32LG295F256 chips via the J-Link API-DLL without using the Segger application. My next goal and the reason for this question is that I want to do the same thing with J-Flasher in order to be able to configure the device and load the data once and flash multiple chips just pushing the button without the need of a computer. And all this just using API-DLL.

    In case this may sound strange I currently use this same technique with the MSP-GANG Programmer ( for MSP chips successfully.

    I am not sure if this is possible with the J-Flasher or I need to pruchase any other SEGGER product or even if this is possible to do at all with any SEGGER product.

    Thank you in advance for your help.

  • Hello Josu,

    We do not have a product called J-Flasher.
    There is a software called J-Flash and the programmer hardware Flasher ARM and Flasher Portable.
    Could you please specify which product you are using?

    In general programming of multiple chips can be done in three ways:
    1. From the PC by using J-Flash and a Flasher ARM or a J-Link (License required for normal J-Link).
    2. From the PC controlling Flasher ARM via RS232 ASCII interface.
    3. With Flasher ARM in standalone mode, by pressing the program button on the Flasher.
    J-Flash is needed to configure Flasher ARM to be able to program the target chip. This is a one time setup.
    You will have to create a J-Flash project which includes:
    • the target device settings
    • the target interface settings (JTAG/SWD)
    • additional init and exit steps to be executed before or after programming, like securing the chip
    • the application image to program
    For solution 2 and 3 the project and the data file can be loaded into Flasher via J-Flash and allow you to use Flasher ARM in standalone mode.

    For additional information the J-Flash User Guide (UM08003) and the Flasher User Guide (UM08022) are included in the J-Link Software Package.

    Is this what you are looking for?

    Best regards
  • Good morning Johannes,

    First of all thank you for your quick response and sorry for naming the product wrongly.

    As you suggested I am talking about the Flasher ARM hardware and J-Flash software. I have successfully donwloaded a configuration file and a data file to the flasher and then use it with just pushing the button on it. Anyway my goal is to do this same thing but instead of using J-Flash I would like to configure the Flasher ARM directly from the API-DLL.

    These would be the steps I would like to run:
    1. Connect the Flasher ARM to a PC
    2. Select a chip in my custom application and load the required configuration and data into the Flasher ARM via API-DLL.
    3. Disconnect the Flasher ARM from the PC.
    4. Flash as much chips as you want just pushing the button.

    Thank you in advance for your help.

  • Hello Josu,

    Thank you for the clarification.

    Generating the configuration and data file for Flasher without J-Flash is currently not possible,
    since the data which is loaded to the Flasher is in a proprietary, non-ascii format.

    But loading the generated files to the Flasher can be done with the JLINKARM_EMU_FILE_* API functions.

    So you could create all configuration and data files with J-Flash and save them on your PC.
    The saved files can than be loaded to the Flasher with the JLINKARM_EMU_FILE_* API functions.

    Creation of the files can be done without user interaction via the J-Flash command line options "savecfg" and "savedat",
    it is also possible do directly download them to flasher from the command line without the need of the J-Link API with "download".

    An example call of J-Flash to create and save the configuration and data file would be:

    Source Code

    1. JFlash -openprj"C:\Projects\MyProject.jflash" -open"C:\Data\data.bin",0x08000000 -savecfg"C:\FlasherFiles\FLASHER.CFG" -savedat"C:\FlasherFiles\FLASHER.DAT" -exit

    An example call of J-Flash to directly download the files to Flasher would be:

    Source Code

    1. JFlash -openprj"C:\Projects\MyProject.jflash" -open"C:\Data\data.bin",0x08000000 -download -exit

    Would this solution work for you?

    We might as well add API functions do directly load J-Flash project files and unmodified data files to Flasher in the future.

    Best regards