강좌 & 팁
stm 사의 coretex M3 제품을 설계하다 보면, 라이팅 툴 STMicroelectronics flash loader 을 배포 하고 있습니다.
그런데 이 프로그램을 커맨드 라인으로 실행이 가능 합니다.
우선 Flash Loader Demonstrator 설치 폴더로 갑니다.
저는 아래와 같습니다.
C:\Program Files (x86)\STMicroelectronics\Software\Flash Loader Demonstrator
이곳에서 STMFlashLoader.exe 를 실행 시키면 아래 옵션들을 볼 수있습니다.
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