2024-08-27 07:29 AM
This might have already been asked in the past, is there a way to not having to press return after programming a file with (old) ST-LINK CLI Utility?
I am using the command line version which works fine but before the program runs ST-LINK stop and waits for the user to press return, then the program runs and ST-LINK terminates.
If you run this from a third party application the required CR is annoying.
Here is what happens, you run the programmer:
H:\STM32\node>ST-Link_CLI -c SWD UR Hrst -p node.hex -run
STM32 ST-LINK CLI v3.6.0.0
STM32 ST-LINK Command Line Interface
ST-LINK SN: 5200371004300132594E514E
ST-LINK Firmware version: V2J45S7
Connected via SWD.
SWD Frequency = 4000K.
Target voltage = 3.3 V
Connection mode: Connect Under Reset
Reset mode: Hardware reset
Device ID: 0x450
Device flash Size: 2048 Kbytes
Device family: STM32H7xx
Loading file...
Flash Programming:
File : H:/STM32/build/Debug/node.hex
Address : 0x08000000
Memory programming...
█████████████████████████████████████████████████▒ 99%
Ram programming...
██████████████████████████████████████████████████ 100%
Memory programmed in 1s and 609ms.
Programming Complete.
run application to exit
The program now wait, when the user presses return the program continues and terminate:
Application started.
H:\STM32\node>
I found no option under the help menu to just run without me having to press return.
Note that I cannot use the STM32_Programmer_CLI programmer as it does not work with a cloned ST-Link/V2 programmer which I bought (unknowingly),
Thanks,
Hans.
Solved! Go to Solution.
2024-08-27 02:40 PM
Use echo to pipe an enter to the command:
H:\STM32\node>echo | ST-Link_CLI -c SWD UR Hrst -p node.hex -run
Depending on how you're running this from the third party application, might need some configuring, but it will work on a straight command line.
2024-08-27 07:54 AM
@hans86 wrote:I cannot use the STM32_Programmer_CLI programmer as it does not work with a cloned ST-Link/V2 programmer which I bought (unknowingly)
A genuine ST-Link/V2 is only about £20.
Or break one off a cheap (under £9) Nucleo board ...
2024-08-27 09:10 AM
Hi Andrew,
Thanks for replying, yes you are of course correct, however, money is not the issue. I just wondered if there is some old... I mean experienced ST user who fixed this issue which is quicker than me ordering another board or programmer,
Regards,
Hans.
2024-08-27 02:40 PM
Use echo to pipe an enter to the command:
H:\STM32\node>echo | ST-Link_CLI -c SWD UR Hrst -p node.hex -run
Depending on how you're running this from the third party application, might need some configuring, but it will work on a straight command line.
2024-08-28 12:51 AM
Hi TDK,
Great solution!
Thanks,
Hans