Hi!
Chances are that if you're here, you have an STM32 board that you are trying to get to work under linux. This git repo contains a template project that I use to build all my projects for the STM32F100 (128KB Flash, 8KB RAM). By default, this will build the demo application that comes with the STM32.
Getting it to work:
- Summon the arm toolchain (look here)
- Clone this repo
- Run
make
- Use your favourite tool to get the ELF onto the board (I use ST Visual Programmer in a windows VM, trying to get stlink working but it's pretty buggy for STLINKv1)
Using it for your own projects:
- Put your .c files in src
- Put your .h files in inc
- Edit the Makefile and change the
OBJS= ...
line at the top of the file - Run
make
OBJS= ...
should contain each of your .c files but with .o extensions. So if you wanted to build the files main.c, party.c, cake.c your line would be:
OBJS= main.o party.o cake.o
Let me know if this is useful for you!
jeremy dot 006 att gmail dot com