ST-LINK-CLI Help
ST-LINK-CLI Help
0
STM32 ST-LINK Command Line Interface
Available commands:
===================
-c Connect to the device using JTAG or SWD.
Syntax: -c [ID=<id>/SN=<sn>] [JTAG/SWD SWCLK=<f>] [UR/HOTPLUG] [LPM]
[RM=Hrst/Srst/Crst]
[ID=<id>] : id (Identifier) of ST-LINK [0..9] to use when multiple
probes are connected to the host
[SN=<sn>] : sn (Serial Number) of the chosen ST-LINK probe
[AP=<ap>] : ap (Access Port Number) default value is 0
[UR] : Connect to target under reset
[HOTPLUG] : Connect to target without halt or reset
[LPM] : Activate debug in Low Power mode
[Hrst] : Activate Hardware Reset mode
[Srst] : Activate Software system Reset mode
[Crst] : Activate Core Reset mode
[Freq=<frequency>] : Frequency value in KHz
Example: -c ID=1 SWD SWCLK=5 UR LPM
Example: -c ID=1 JTAG JTAGCLK=6 UR
Example: -c SN=55FF6C064882485358622187 SWD UR LPM
Note: When [ID=<id>] and [SN=<sn>] are not specified, the first
ST-LINK with ID=0 will be selected
Selection of ST-LINK by ID or SN should be used with:
* V1J13Sx or greater ST-LINK firmware version
* V2J20Sx or greater ST-LINK/V2 firmware version
* V2J20Mx or greater ST-LINK/V2-1 firmware version
[UR] available only with ST-LINK/V2 and in SWD mode
For JTAG mode, connect under reset is available since
ST-LINK/V2 firmware Version V2J15Sx
The RESET pin of the JTAG connector(pin 15) should be connected
to the device reset pin
[HOTPLUG] available in SWD mode
For JTAG mode, HotPlug Connect is available since
ST-LINK/V2 firmware Version V2J15Sx
[SWCLK=<f>] available only with ST-LINK/V2 and in SWD mode
-List List the corresponding firmware version and the unique Serial Number
of every ST-LINK probe connected to the computer
Note: To have a correct SN the ST-LINK firmware version should be:
* V1J13Sx or greater for ST-LINK
* V2J20Sx or greater for ST-LINK/V2
* V2J20Mx or greater for ST-LINK/V2-1
-r8 Read memory. Syntax: -r8 <Address> <NumBytes>
-r16 Read memory. Syntax: -r16 <Address> <NumHalfWords>
-r32 Read memory. Syntax: -r32 <Address> <NumWords>
-w8 Write 8-bit data. Syntax: -w8 <Address> <data>
-w32 Write 32-bit data. Syntax: -w32 <Address> <data>
-w64 Write 64-bit data. Syntax: -w64 <Address> <data>
- Core commands --------------------------------------------------------
-Rst System reset
-HardRst Hardware reset
Syntax: -HardRst [<LOW/HIGH>]
[LOW] : Held reset pin low
[HIGH] : Held reset pin high
[PULSE=delay]: Pulse reset pin with a delay (in ms)
-Run Run application. Syntax: -Run [<Address>]
-Halt Halt core
-Step Step core
-SetBP Set breakpoint. Syntax: -SetBP <Address>
-ClrBP Clear all hardware breakpoints
-CoreReg Read Core registers
-SCore Get Core status
- Flash commands -------------------------------------------------------
-ME Full chip erase
-SE Erase flash sector(s). Syntax: -SE <Start_Sector> [<End_Sector>]
Syntax: -SE <Sector>
-P Load a into device. Syntax: -P <File_Path> [<Address>] [ske] [skpv]
-V Verify if the programming operation was performed successfully
Syntax: -V <while_programming/after_programming>
Note: The "while_programming" is the default type
-EL Select a Custom external memory-loader. Syntax: -EL <File_Path>
- Miscellaneous commands ----------------------------------------------
-Q Enable quiet mode. No progress bar displayed
-CmpFile Compare file with device. Syntax: -CmpFile <File_Path> [<Address>]
-TVolt Display target voltage
-Log Enable Trace LOG File generation
-NoPrompt Disable user confirmation prompts
(For programming RDP Level 2 within a file for example)
-Dump Read target memory and save it in a file
Syntax : -Dump <Address> <Memory_Size> <File_Path>
-Cksum Generates a checksum value for a file or stream of data
Syntax : -Cksum <Address> <Memory_Size>
Syntax : -Cksum <File_path>
- Option bytes commands ------------------------------------------------
-rOB Display all option bytes
-OB Configure the option bytes
Syntax: -OB [RDP =<Level>] [BOR_LEV =<Level>]
[WWDG_SW =<Value>] [IWDG_SW =<Value>]
[IWDG_STOP =<Value>] [IWDG_STDBY =<Value>]
[nRST_STOP =<Value>] [nRST_STDBY =<Value>]
[IWDG_ULP =<Value>] [FZ_IWDG_STOP =<Value>]
[nBOOT_SEL =<Value>] [FZ_IWDG_STDBY =<Value>]
[nRST_SHDW =<Value>] [PCROP_RDP =<Value>]
[nBFB2 =<Value>] [BFB2 =<Value>]
[nBoot1 =<Value>] [Boot1 =<Value>]
[nBoot0 =<Value>] [nBoot0_SW_Cfg =<Value>]
[VDDA =<Value>] [SDADC12_VDD =<Value>]
[DB1M =<Value>] [DUALBANK =<Value>]
[nDBANK =<Value>] [BOOT0_nSW_Config=<Value>]
[Data0 =<Value>] [Data1 =<Value>]
[nSRAM_Parity=<Value>] [SRAM2_RST =<Value>]
[SRAM2_PE =<Value>] [DDS =<Value>]
[FSD =<Value>] [SFSA =<Value>]
[C2OPT =<Value>] [NBRSD =<Value>]
[SNBRSA =<Value>] [SBRSA =<Value>]
[BRSD =<Value>] [SBRV =<Value>]
[Security =<Value>] [CM7_BOOT_ADD0 =<Value>]
[DMEPB =<Value>] [CM7_BOOT_ADD1 =<Value>]
[DMESB =<Value>] [IWDG1 =<Value>]
[IWDG2 =<Value>] [nRST_STDBY_D2 =<Value>]
[BOOT_CM4 =<Value>] [nRST_STDBY_D1 =<Value>]
[BOOT_CM7 =<Value>] [CM7_BOOT_ADD0 =<Value>]
[DMEPA =<Value>] [CM7_BOOT_ADD1 =<Value>]
[DMESA =<Value>] [SECA_strt =<Value>]
[SECA_end =<Value>] [SECB_strt =<Value>]
[SECB_end =<Value>] [DTCM_RAM =<Value>]
[SPRMOD =<Value>] [WPRMOD =<Value>]
[PCROPA_STRT =<Value>] [PCROPA_END =<Value>]
[PCROPB_STRT =<Value>] [PCROPB_END =<Value>]
[WRP =<Value>] [WRP2 =<Value>]
[WRP3 =<Value>] [WRP4 =<Value>]
[WRP1A_STRT =<Value>] [WRP1A_END =<Value>]
[WRP1B_STRT =<Value>] [WRP1B_END =<Value>]
[WRP2A_STRT =<Value>] [WRP2A_END =<Value>]
[WRP2B_STRT =<Value>] [WRP2B_END =<Value>]
[IPCCDBA =<Value>]
For more details about Option Bytes parameters, Press any key to continue
RDP=<Level>: Set the flash memory read protection level
0: Protection disabled 1: Protection enabled
2: Protection enabled(debug & boot in SRAM features are DISABLED)
------------------------------------------------------------------------
For more details, please refer to the Option Bytes section in the Flash
programming manual corresponding to your device available at www.st.com
------------------------------------------------------------------------
Note: All parameters should be in hexadecimal format