Latest Post
(ARM,Cortex-M3, STM32F207) Mango-M32F2, Flash Write 방법

디바이스 링크 입니다.


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}


현재 설치된 버전으로 구동해 보면 위와 같이 나타나게 됩니다.


일단은 예전에 사용하던 것처럼 툴을 이용하는게 조금은 더 편하네요 ^^





Comments 0
:    :    :
이름 / 2014-11-20 / ★★★☆☆ [수정 / 삭제]

내용

Recent Comments
일방통행  |  ★★★★★
ISE 14.7 virtualbox를 설치했는데, ,iMPACT가 인식을 못하는데, 어케해야하나요?
min  |  ★★★★☆
These are the only Drives available to write images to: # major minor size name 1: 8 0 512805384 sda 2: 8 16 15558144 sdb Enter Device Number or n to exit: 2 Invalid selection! 왜 이런 오류가 나는 걸까요?
dino  |  ★★☆☆☆
NAND Scrub실행 후 에러가 나타납니다/ 조치방법을 알려주세요 에러내용 crz nand_erase_opts erase.addr=0x0, opt->offset=0x0, erase_ieng minfo_erases=0x20000 .....진행후 s3c-nand:ecc uncorrectable error detected---4개발생합니다 빠른 회신부탁드립니다 연락처:010-3752-6251 강희진
bluewind  |  ★★★★★
안녕하세요..구입했는데..회로도 부탁드립니다. percephy@naver.com 입니다.
조형철  |  ★★★★★
상기 Backlight 관련 회로를 구할 수 있을까요?
hwang  |  ★★★★★
구입한지 조금 됬는데 회로도 부탁합니다. rubens7777@paran.com 입니다.