Arduino_Tools/win/stlink_upload.bat
Frederic Pillon ea82c0759e Update to ST-Link_cli 3.0.0.0
Fix #12
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
2017-07-04 16:51:26 +02:00

19 lines
No EOL
712 B
Batchfile

@echo off
rem: Note %~dp0 get path of this batch file
rem: Need to change drive if My Documents is on a drive other than C:
set driverLetter=%~dp0
set driverLetter=%driverLetter:~0,2%
%driverLetter%
cd %~dp0
rem: the two line below are needed to fix path issues with incorrect slashes before the bin file name
set str=%4
set str=%str:/=\%
rem: ------------- use STLINK CLI
rem: echo "" is mandatory to exit ST-Link_CLI tools w 3.0.0.0 when "-Run" option is used,
rem: it now wait Enter key press to quit.
echo "" | stlink\ST-LINK_CLI.exe -c SWD -P %str% 0x8000000 -Rst -Run
rem: Using the open source texane-stlink instead of the proprietary STM stlink exe
rem:texane-stlink\st-flash.exe write %str% 0x8000000