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?
Install gcc-arm-linux-gnueabi and binutils-arm-linux-gnueabi packages, and then just use arm-linux-gnueabi-gcc instead of gcc for compilation. This brings in the complete cross-compile environment, including binutils. On Ubuntu 13.10 you get gcc-4.7 for 'gnueabi' and gcc-4.8 for 'gnueabihf'.
You should have the arm-none-eabi-gcc.exe for Windows Compile. Also, you have the linux environment like MinGW and use installed terminal(xterm). then, you have to copy the . so files into MinGW /lib or /usr/lib folder under C:/MinGW .
The GNU Arm Embedded Toolchain targets the 32-bit Arm Cortex-A, Arm Cortex-M, and Arm Cortex-R processor families. The GNU Arm Embedded Toolchain includes the GNU Compiler (GCC) and is available free of charge directly from Arm for embedded software development on Windows, Linux, and Mac OS X operating systems.
Arm Keil MDK is a comprehensive software development solution for Arm-based microcontrollers and includes all components that you need to create, build, and debug embedded applications. MDK includes the Arm Compiler 6, which combines highly optimized C/C++ libraries and tools with modern LLVM technology.
You can find an excellent series of tutorial style blog posts here, for example this one about bare metal programming for the M3.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With