9
votes

Is it possible to compile C/C++ code for the ARM Cortex M3 (LPC1768) using vanilla GCC with the --target switch, or will I need to compile GCC, binutils, etc to do this?

3
You can try this if you are using linux. eluaproject.net/doc/v0.8/en_tc_cortex.htmlharvis

3 Answers

10
votes

As already said, those are not your only two options. I suggest trying this toolchain prepared by ARM engineers: GNU Tools for ARM Embedded Processors . It's specifically tailored for Cortex-M and Cortex-R cores, and it doesn't require registration to download it.

3
votes

You can find an excellent series of tutorial style blog posts here, for example this one about bare metal programming for the M3.

3
votes

CodeSourcery G++ supports a wide range of ARM processors including Cortex-M3. Its also free unless you need professional support.