@ECHO off @REM This is calling come w/binary-file name. @SETLOCAL @PATH "Y:\warez\Hard\STmicro\STM32\STlink\bin\ST-LINK Utility";%PATH% ST-LINK_CLI.exe -c SWD UR -ME -P %1 0x08000000 -V -Rst -Run @REM arm-none-eabi-objcopy -O ihex %1 %1.hex @REM ST-LINK_CLI.exe -c SWD UR -ME -P %1.hex -V -Rst -Run @REM partial flash programing for avoid write bootloader area(0x08000000-0x08004fff). @REM (a sector size is 1KB in med-density device) @REM ST-LINK_CLI.exe -c SWD UR -SE 5 127 -P %1.hex 0x08005000 -V -Rst @REM ST-LINK_CLI.exe -c SWD -Run 0x08005000 @ENDLOCAL