디바이스 링크 입니다.
http://www.st.com/internet/mcu/product/245079.jsp
위 파일을 받아서 설치를 할 수 있습니다.
버전이 2.5.0이 되어 있으나 업데이트 상황에 따라 달라 질 수 있습니다.
바로 설치하는 것은 에러가 발생합니다.
프로그램 추가/제거에서 이전의 것을 지우고 설치합니다.
Flash_Loader_Demonstrator_v2.5.0_Setup.exe을 설치합니다.
현재 Mango-M32F2의 경우는 UART 포트를 2개 컨넥터를 장착해 놓았습니다.
각각 UART1과 UART3입니다.
STM32F2에서 좋아진 것 중의 하나가 다운로드를 하는 UART 포트를 꼭 1번만 써야하는 제약이 없어진 것입니다.
상당히 편리하네요 ^^
보드를 수정하면 UART1은 다운로드 용도로 활용할 수 없게 되었습니다.
다운로드는 꼭 UART3만 사용하셔야 합니다.
제 PC에서 COM 포트는 3이지만 사용자의 포트에 따라 달라질 수 있습니다.
이 과정에서 에러가 발생할 수 있습니다.
이때는 보드를 한번 리셋 해주고 다시 수행하면 됩니다.
자동으로 디바이스를 인식하지 못하는 경우도 있습니다. 이때는 Target에서 골라서 인식 시키면 됩니다.
다운로드 할 hex 파일을 지정하고, "Erase necessary pages"를 선택합니다. "Jump to the user program"을 선택하면 바로 실행되니까 보다 편리할 것입니다.
위와 같이 되면 정상입니다. 아래는 이 툴을 이용하는 것이 아니고 커맨드 라인에서 수행하는 것입니다. flash memory size : 1024 KByte 입니다.
C:\Program Files\STMicroelectronics\Software\Flash Loader Demonstrator 디렉토리 command 창을 여시고
stmflashloader -c --pn 3 --br 115200 --to 2000 -e --all -i STM32F10xxBxx -d --a 8000000 --v --fn E:\RomWrite\project.hex |
위와 비슷한 커맨드를 치면 writing 이 됩니다.
변경해 주어야 할것은 빨간색 부분 입니다.
옵션은 아래와 같습니다.
Path에 아래 내용을 추가합니다.
C:\Program Files\STMicroelectronics\Software\Flash Loader Demonstrator
C:\Program Files\STMicroelectronics\Software\Flash Loader Demonstrator>STMFlashLoader.exe
위 파일이 실행되는 것인데 Path 설정을 했기 때문에
아무 곳에서나 실행해도 될 것입니다.
C:\WINDOWS>STMFlashLoader STMicroelectronics UART Flash Loader
command line v2.1.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 ON or OFF ..., default is
OFF --to
time_out : (ms) e.g 1000, 2000, 3000 ..., default
5000 -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
(Activate or diasactivate
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 option bytes) --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 -Rts
(set
Rts line to Hi, Lo) --State
: State in {Hi,
Lo} -Dtr
(Set
Rts line to Hi, Lo) --State
: State in {Hi,
Lo} |
현재 설치된 버전으로 구동해 보면 위와 같이 나타나게 됩니다.
일단은 예전에 사용하던 것처럼 툴을 이용하는게 조금은 더 편하네요 ^^
내용