Wednesday, October 17, 2012
Selecting a C/C++ toolchain for the STM32F4DISCOVERY
Selecting a toolchain for the STM32F4DISCOVERY board of my new to build mini sumo. The board contains a STM32F407VGT6 microcontroller featuring 32-bit ARM Cortex-M4F core, 1 MB Flash, 192 KB RAM in an LQFP100 package. With this tool chain I need to be able to compile, write the code to the microcontrollers flash and debug. I prefer C++ over C, because C++ allows object oriented constructs more easily than C. There are commercial vendors (like Keil and IAR) that have an evaluation version that has a code limit of 32 kbyte. Such a ‘crippled’ version is not an option for me. The full version is also not an option because it is a hobby project and I don’t want to spend too much money on it. After some research I found a free toolchain called ‘CooCox’. It is a complete toolchain, you have to add a compiler however. I used YAGARTO for that. CooCox doesn’t support C++ natively but I found two threads in the forum on how to use it with C++ (http://www.coocox.org/forum/topic.php?id=730 and http://www.coocox.org/forum/topic.php?id=873). My object oriented version of the ‘Hello LED’ program works like a charm!