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?
-
1You can try this if you are using linux. eluaproject.net/doc/v0.8/en_tc_cortex.htmlharvis– harvis2012-08-18 10:57:30 +00:00Commented Aug 18, 2012 at 10:57
Add a comment
|
3 Answers
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.
1 Comment
David Grayson
I find the new download page for this toolchain to be much easier to use, and it gives me more peace of mind knowing it comes from arm.com: developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
CodeSourcery G++ supports a wide range of ARM processors including Cortex-M3. Its also free unless you need professional support.
4 Comments
old_timer
well there is a lite version, and you need to read the license agreement.
old_timer
llvm, though, cross compiles out of the box, you can use -march=arm to build for arm. Depends on what you are doing though
old_timer
the cortex-m3 is thumb/thumb2 only so be careful to specify the processor type when compiling (with gcc), otherwise it will default to arm instructions. and my comment about llvm -march=arm will build arm it might be -march=thumb to build for thumb.