Wednesday, September 5, 2012

Getting Started With The STM32F4DISCOVERY In Linux



Building an ARM toolchain

To compile code for the STM32F4DISCOVERY you’ll need an ARM toolchain that supports the Cortex-M3. I used the build script summon-arm-toolchain to build one. Before running the script you need to install several dependencies:


The Summon ARM toolchain is a shell script which will download the source of bintutils, gcc/gdb and two or three other packages (newlib, openocd andlibopencm3) and compiles them (after applying some patches) to get executables for a "bare-metal" arm toolchain; you only have to clone the "summon arm toolchain" git repo and run a script called "summon-arm-toolchain". The executables (arm-none-eabi-gcc and friends) will be installed in the folder ~/sat/bin.