J-Link / J-Trace (UM08001) © 2004-2017 SEGGER Microcontroller GmbH & Co. KG
313
11.5.3 Batch processing
J-Flash SPI can be used for batch processing purposes. All important options are
available in command line mode as well. When providing command line options, the
application does not wait for manual user input. All command line operations will be
performed in exactly the order they are passed. So, for example issuing a program
command before a project has been opened will cause the program command to fail.
The example batchfile below will cause J-Flash SPI to perform the following opera-
tions:
1. Open project C:\Projects\Default.jflash
2. Open bin file C:\Data\data.bin and set start address to 0x100000
3. Perform "Auto" operation in J-Flash (by default this performs erase, program,
verify)
4. Close J-Flash SPI
The return value will be checked and in case of an error message will be displayed.
Adapt the example according to the requirements of your project.
@ECHO OFF
ECHO Open a project and data file, start auto processing and exit
JFlashSPI.exe -openprjC:\Projects\Default.jflash -openC:\Data\data.bin,0x100000 -
auto -exit
IF ERRORLEVEL 1 goto ERROR
goto END
:ERROR
ECHO J-Flash SPI: Error!
pause
:END
Starting J-Flash minimized
Adapt this example call to start J-Flash SPI minimized:
start /min /wait "J-Flash" "JFlashSPI.exe" -openprjC:\Projects\Default.jflash
\
-openC:\Data\data.bin,0x100000 -auto -exit
Note that every call of JFlashSPI.exe has to be completed with the -exit option,
otherwise the execution of the batch file stops and the following commands will not
be processed.
11.5.4 Programming multiple targets in parallel
In order to program multiple targets in parallel using J-Flash SPI, the following is
needed:
• Multiple J-Flash SPI projects, each configured to connect to a specific J-Link /
Flasher (emulator to connect to is selected by serial number).
The easiest way is to setup the appropriate project once and then make multiple cop-
ies of this project. Now modify the Connection to J-Link setting in each project, in
order to let J-Flash SPI connect to the different programmers as shown in the screen-
shot below:
Find below a small sample which shows how to program multiple targets in parallel: