Uwe Hermann 915d5bff90 Implement the simplest possible (working) blinking LED example application.
This is the first working example code which is tested on hardware.
The LED on the Olimex STM-H103 eval board is happily blinking.

We use a dummy "delay" function (basically a busy-waiting for-loop), which
will only work if you use -O0 in CFLAGS (-O2, -O3, or -Os will not work as
the compiler optimizes the loop away).

We use some arbitrary value for stack size (2 KB) and use main()
directly as the reset vector function. This will change later.

Also, we do the GPIO and clock init as well as the GPIO toggling for the
LED blinking fully "manually" for now, but there may be more higher-level
functions for doing that at some later date.
2009-07-18 06:09:08 +02:00
..

------------------------------------------------------------------------------
README
------------------------------------------------------------------------------

This is a small example program using libopenstm32.

It's intended for the ST STM32-based Olimex STM32-H103 eval board (see
http://olimex.com/dev/stm32-h103.html for details). It should blink
the LED on the board.


Building
--------

 $ make

Running 'make' on the top-level libopenstm32 directory will automatically
also build this example. Or you can build the library "manually" and
then run 'make' in this directory.

You may want to override the toolchain (e.g., arm-elf or arm-none-eabi):

 $ PREFIX=arm-none-eabi make

For a more verbose build you can use

 $ make V=1


Flashing
--------

You can flash the generated code on the STM32-H103 board using OpenOCD:

 $ openocd -f /usr/share/openocd/scripts/interface/jtagkey-tiny.cfg \
           -f /usr/share/openocd/scripts/board/olimex_stm32_h103.cfg
 $ telnet localhost 4444
 > init
 > reset halt
 > flash write_image erase blink.bin 0x08000000
 > resume 0x08000000