STM32/ARM Cortex-M3 HOWTO: Development under Ubuntu (Debian)

Flash blinky

Flash Olimex blinky example

Now it is time to se if we can put some software on the card, so let's use the Olimex blinky program that we compiled earlier.

cd ~/stm32/stm32-example/projects/stm_h103/
wget http://fun-tech.se/stm32/OpenOCD/openocd.cfg
xterm -e "openocd -f openocd.cfg" &

Or if you have the Flyswatter-jtag, you should use another config file. (something like this).

wget http://fun-tech.se/stm32/OpenOCD/flyswatter.cfg
xterm -e "openocd -f flyswatter.cfg" &

Now let's get a second command window with the telnet session, so we can talk to the OpenOCD server we just started.

xterm -e "telnet localhost 4444" &

Here you should get a nice little prompt, from where you can manually control the jtag and flash the card.

reset halt
flash probe 0 
stm32x mass_erase 0
flash write_bank 0 main.bin 0
reset run 

If the card started to blink with the green led, you are successful...

This page is licensed with Creative Commons ShareAlike 3.0