Flashing image to STM3220g-EVAL board using Trace 32

1.6k views Asked by At

I have an STM3220g-EVAL board. It doesn't seem to have a preloaded image in it now, as it was used for other purposes. When I power it on, the display is shown blank.

I dont have a STLINK/V2 hardware. I am using Trace32 and Lauterbach for flashing and debugging the code.

I created a simple C program, created an elf file by using arm-none-eabi-gcc toolchain, and was able to flash it into the STM3220g-EVAL board using a cmm script for stm32 provided in demo folder of Trace32.

What I require is to flash default image for STM3220g-eval using Trace32. Can someone provide me the link to get the boot image and cmm script to flash the same.

I tried the demonstration builder platform and demonstration firmware provided in the following link http://www.st.com/web/en/catalog/tools/FM116/SC959/SS1532/PF250374

As they are providing hex file, I used Trace 32 command data.load.asciihex to load the hex file. When I press go, am getting error( emulation poer fail).

Can somesome provide me the correct cmm script to flash the .hex file to the board.

2

There are 2 answers

0
Holger On BEST ANSWER

If I understand you correctly you are trying to flash the "STM3220G-EVAL demonstration firmware" on your STM3220G-EVAL board. So the hex-file you are talking about is "STM322xG_EVAL_FW_V1.2.0.hex", right?

This hex-file is in Intel HEX file format. (See https://en.wikipedia.org/wiki/Intel_HEX) To load a file in Intel HEX format, you should use Data.LOAD.IntelHex

So this is how to flash the file in your CPU:

  1. Select your CPU with SYStem.CPU STM32F207IG
  2. Connect to your CPU with SYStem.Up
  3. Prepare flash-programming with DO ~~/demo/arm/flash/stm32f2xx.cmm PREPAREONLY
  4. Arm flash programming with FLASH.ReProgram ALL
  5. Load your Intel Hex file with Data.LOAD.IntelHex STM322xG_EVAL_FW_V1.2.0.hex
  6. Finalize flash programming with FLASH.ReProgram OFF (This will start the actual programming.)
0
rost0031 On

The STM3220 comes with the STLink hardware built in via the USB port. See section 2.20 from here

Version 2 of the ST-LINK, called ST-LINK/V2, is embedded on the board. This tool allows onboard program loading and debugging of the STM32F using the JTAG or SWD interface. Third-party debug tools are also supported by the JTAG (CN14) or Trace (CN13) connectors. To communicate with the embedded ST-LINK/V2, a specific driver needs to be installed on your PC. To download and install this driver, refer to the software and development tools page for the STM32F family available on www.st.com (the install shield is called ST-LINK_V2_USBdriver.exe).