cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone share the commands (CLI) to establish connection once (-c) and do all flash steps, finally disconnect

PS.7
Associate

We are trying to execute the following steps,

"C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI" -c port=SWD --erase all

"C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI" -c port=SWD -w "C:/Users/Public/Documents/p2_hi_primary_bl.hex"

"C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI" -c port=SWD -w "C:/Users/Public/Documents/p2_hi_secondary_bl.hex"

"C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI" -c port=SWD -w "C:/Users/Public/Documents/p2_hi_fct.hex"

"C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI" -c port=SWD -rst

We are getting error when we run each command. can we run connect only once, then proceed flash steps, and after flashing disconnect?

2 REPLIES 2
TDK
Guru

You should be able to chain commands. What error are you getting?

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

At least you should be able to merge the 2 first and the 2 last commands :

C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=SWD mode=normal -e all -d "C:/Users/Public/Documents/p2_hi_primary_bl.hex"

C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=SWD mode=normal -d "C:/Users/Public/Documents/p2_hi_secondary_bl.hex"

C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=SWD mode=normal -d "C:/Users/Public/Documents/p2_hi_fct.hex" -rst

I have never tried to download several hex on the same line.