GCC

Another STM32 Project Template

Earlier this year, I wrote about the fun I had setting up the GCC ARM compiler to run under MAC OS X. This kept me occupied for a few days and, eventually, I got it all working. Francois Gervais read the post and kindly offered to share his recipe for building ARM Cortex M3 projects using the GCC compiler. Read on for his notes about the project template...

STM32 on the Mac – The ST Peripheral Driver Library

It would be nice to start with a simple LED flashing, blinky type application. Well simple is a bit of an overstatement. The code to blink an LED is easy enough but those nice folk at ST have provided a special peripheral driver library. This library abstracts much of the hardware from the user and should make for more portable code. The library sources are all in standard C and are supposed to compile up just like anything.  Even with the benefit if an IDE, this would be a bit tricky to set up. Without one, it means a lot of messing about with makefiles, linker scripts and startup code. This is how I set up mine on a Mac. Much the same arrangement will work just fine on a PC. Included is a project template to speed things up…

CodeSourcery GNU Toolchain for the ARM on a Mac

CodeSourcery are the maintainers of the GNU Toolchain for ARM processors. They have a range of commercial offerings but, if you are prepared to use command-line tools, they also provide just those as Sourcery G++ Lite. The Lite edition includes the GNU C and C++ compilers, GNU Assembler and Linker, GNU debugger and Instruction Set Simulator. For Windows and Linux hosts, these are available as binary distributions that simply install and are ready to use. For the Mac, you need to build them from sources available on the CodeSourcery site.