STMicroelectronics flash loader 배치파일
마우스로 이리저리 클릭하는것보다는 간편하나, HEX파일명, 포트번호가 고정되어 있어야한다.
STMicroelectronics UART Flash Loader command line v2.5.0 Usage : STMFlashLoader.exe [options] [Agrument][[options] [Agrument]...] -? (Show this help) -c (Establish connection to the COM port) --pn port_nb : e.g: 1, 2 ..., default 1 --br baud_rate : e.g: 115200, 57600 ..., default 57600 --db data_bits : value in {5,6,7,8} ..., default 8 --pr parity : value in {NONE,ODD,EVEN} ..., default EVEN --sb stop_bits : value in {1,1.5,2} ..., default 1 --ec echo : value OFF or ECHO or LISTEN ..., default is OFF --co control : Enable or Disable RTS and DTR outputs control : value OFF or ON ..., default is OFF --to time_out : (ms) e.g 1000, 2000, 3000 ..., default 5000 -Rts (set Rts line to Hi, Lo) --State : State in {Hi, Lo} -Dtr (Set Rts line to Hi, Lo) --State : State in {Hi, Lo} -i device_name (e.g STM32_Low-density_16K, [See the Map directory]) -e (erase flash pages --all all pages : erase all pages --sec number_of_pages_group pages_group_codes : erase specified group pages -u (Upload flash contents to a .bin, .hex or .s19 file ) --fn file_name : full path name of the file -d (Download the content of a file into MCU flash) --a address(hex): start @ in hex ; ignored if it is not a binary file --fn file_name : full path name (.bin, .hex or .s19 file) --v : verify after download --o : optimize; removes FFs data -r (Run the flash code at the specified address --a address(hex) : address in hexadecimal) -p (Enable or Disable protections) --ewp : enable write protection for sector codes (e.g 1,2,etc.) --dwp : disable write protection --drp : disable read protection --erp : enable read protection, all arguments following this one will fail -o (Get or Set STM32F1x option bytes: use -d command for others!) --get --fn file_name : get option bytes from the device and write it in the specified file --set --fn file_name : load option bytes from the specified file and write it to the device --set --vals --OPB hex_val : set the specified option byte; OPB in: User, RDP, Data0, Data1, WRP0, WRP1, WRP2, WRP3
|
파일명, 포트번호는 적당히 변경해야함.
echo COM1 = --pn 1 COM3 = --pn 3 "C:\Program Files\STMicroelectronics\Software\Flash Loader Demonstrator\STMFlashLoader.exe" ^ -c --pn 3 --br 115200 --db 8 --pr EVEN --sb 1 --ec OFF --to 10000 --co ON -Dtr --Hi -Rts --Lo ^ -i STM32F2_1024K -d --fn "D:\xxxxxxxxxxxxxxx\main.hex" --v -Dtr --Lo -Rts --Hi --Lo |