I'm using this template playing with my STM32F407VGT6-Discovery board. Theoretically it could be easilly ported for any STM32F4xxx chips.
Requirements:
make
- gcc-arm-none-eabi
- STM32F4-Discovery_FW_V1.1.0 extracted into this project directory.
- stlink-tools for burning the program to the chip.
If you don't know how to start, here's a nice blog post that guides you step by step.