stm32f4xx GCC Barebones Project
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
Makefile
README
main.c
startup_stm32f4xx.c
stm32_flash.ld
stm32f4xx-openOCD.cfg
stm32f4xx_conf.h
stm32f4xx_it.c
stm32f4xx_it.h
system_stm32f4xx.c

README

===stm32f4xx GCC Barebones Project===

Very basic project to get started with GCC and the stm32f4xx (Discovery board, in this case)
It includes the 1.3.0 STM32F4xx Standard Peripheral Driver Library, but DOES NOT include USB support (it is a 'barebones' project after all)

If you want a slightly more useful(but also complex) project, check out the other branches.
usb-device - Simple usb device example using CDC. 
usb-console - Same as usb-device, but includes some command parsing code to make adding functionality simpler.

--Build instructions

Make sure you have the arm-none-eabi(gcc, etc...) tools installed: https://launchpad.net/gcc-arm-embedded

Running make on the top directory should build both the driver library, support files, and main.c
Output files are in the build/ directory


--Programming instructions (using openOCD and gdb)

Connect using openOCD and the included configuration file.
$ openocd -f stm32f4xx-openOCD.cfg

On a separate terminal window, run arm-none-eabi-gdb
$ arm-none-eabi-gdb 

Connect to openOCD
(gdb) target extended-remote localhost:3333

Load program the stm32f4xx
(gdb) file build/stm32f4xx-gcc-barebones.elf
(gdb) monitor reset halt
(gdb) load
(gdb) monitor reset init

To run you program:
(gdb) continue