312 CHAPTER 11 J-Flash SPI
J-Link / J-Trace (UM08001) ©
2004-2017 SEGGER Microcontroller GmbH & Co. KG
The command line options are evaluated in the order they are passed to J-Flash, so
please ensure that a project and data file has already been opened when evaluating a
command line option which requires this.
It is recommended to always use -open<FILENAME>[,<SADDR>] to make sure the
right data file is opened.
All command line options return 0 if the processing was successful. A return value
unequal 0 means that an error occured.
Option Description
-? Displays help dialog.
-auto Erases, program and verify target.
-connect Connects to target.
-delrange<SADDR>,<EADDR> Deletes data in the given range.
-disconnect Disconnects from target.
-eliminate Eliminates blank areas in data file.
-erasechip Erases the entire flash chip.
-erasesectors Erases all sectors.
-exit Exits application.
-help Displays help dialog.
-merge<FILENAME>
-merge<FILENAME>.bin,<ADDR>
Merges a given file with the one currently
opened.
Note that when passing a .bin file via this com-
mand, also the start-address where it shall be
merged the file currently openend in J-Flash
SPI must be given, too, since .bin files do not
contain any address information.
-open<FILENAME>[,<SADDR>]
Open a data file. Please note that the
<SADDR> parameter applies only if the data
file is a *.bin file.
-openprj<FILENAME>
Open an existing project file. This will also
automatically open the data file that has been
recently used with this project.
-program Program target.
-programverify Program and verify target.
-readchip Read entire flash chip.
-readrange<SADDR>,<EADDR> Read specified range of target memory.
-save[<SADDR>,<EADDR>]
Save the current data file. Please note that the
parameters <SADDR>,<EADDR> apply only if
the data file is a *.bin file or *.c file.
-saveas<FILE-
NAME>[,<SADDR>,<EADDR>]
Save the current data file into the specified
file. Please note that the parameters
<SADDR>, <EADDR> apply only if the data file
is a *.bin file or *.c file.
-saveprj Save the current project.
-saveprjas<FILENAME> Save the current project in the specified file.
-verify Verify target memory.
-usb<SN> Overrides connection settings to USB.
-ip<xxx.xxx.xxx.xxx>
-ip<HostName>
Overrides connection settings to IP.
Table 11.10: J-Flash SPI command line options