cancel
Showing results for 
Search instead for 
Did you mean: 

Can't program hex file from ST-LINK CLI but works on STM32 Link Utility with same parameters ? Keep having 'Can't reset core Unable to Connect to ST-LINK' error

AA.22
Associate

(On Nucleo L073RZ devkit with target on SWD) I can easily connect and program a hex file from the stm32 link utility UI but it seems impossible from the CLI. Connection parameters are the same (Mode: Normal, Reset Mode: Software system reset) and the

.\ST-LINK_CLI.exe -c SWD

command works fine, but not

.\ST-LINK_CLI.exe -P C:\LoRaWAN-S76S-US915-V1-6-5.hex 0x08000000 -V

Both outputs are in the following picture. 0693W00000QMBqpQAH.png

1 ACCEPTED SOLUTION

Accepted Solutions
AA.22
Associate

UPDATE:

Altough I didn't quite see such infoin the CLI documentation, I've found out that the connection command only connects to the target for the duration of the command and close the connection after, making it impossible for the program command to work.

FIX:

Just 'pipe' the 2 commands and it should work perfectly:

.\ST-LINK_CLI.exe -c SWD -P C:\LoRaWAN-S76S-US915-V1-6-5.hex 0x08000000 -V

View solution in original post

1 REPLY 1
AA.22
Associate

UPDATE:

Altough I didn't quite see such infoin the CLI documentation, I've found out that the connection command only connects to the target for the duration of the command and close the connection after, making it impossible for the program command to work.

FIX:

Just 'pipe' the 2 commands and it should work perfectly:

.\ST-LINK_CLI.exe -c SWD -P C:\LoRaWAN-S76S-US915-V1-6-5.hex 0x08000000 -V