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...

Fatal error: Uncaught Error: Call to a member function link_ext() on null in /customers/9/b/5/fun-tech.se/httpd.www/stm32/class.page.php:62 Stack trace: #0 /customers/9/b/5/fun-tech.se/httpd.www/stm32/OpenOCD/flash.php(81): page->getFoot() #1 {main} thrown in /customers/9/b/5/fun-tech.se/httpd.www/stm32/class.page.php on line 62