Skip to main content
CShac.1
Visitor II
Aug 25, 2020 7:47 PM UTC
Solved

ST-LINK_CLI -P (program command) 'mechanics' question

Hi folks,

I'll try to keep it short. I'm working with an STM32F103xx MCU and an ST-LINK/V2 probe. I'd like to use it to program the MCU. I've been reading the ST-LINK_CLI user manual, and the STM32F10xxx programming manual. I have this question: How much of the programming sequence is handled by the '-P' command offered by ST-LINK_CLI? Do I have to manually reset the MCU by using the -Rst or -HardRst command, then unlock the flash by writing the keys to the FLASH_KEYR register? Or does '-P' handle such things?

Thank you,

Cole

This topic has been closed for replies.
TDK
TDKBest answer
Aug 25, 2020 11:29 PM UTC

If you just want to program, "-P file.hex" is all you need, as long as the SWD pins are active.

"If you feel a post has answered your question, please click ""Accept as Solution""."

1 reply

TDK
TDKBest answer
Aug 25, 2020 11:29 PM UTC

If you just want to program, "-P file.hex" is all you need, as long as the SWD pins are active.

"If you feel a post has answered your question, please click ""Accept as Solution""."