Cortex M3 Compiler Installation
From Manuals
Contents |
Choose a Compiler and IDE (Integrated Development Environment)
Choosing a Compiler
The Code Examples currently supports the following C and C++ compilers :
- IAR Embedded Workbench for ARM (ewarm) 5.40
- GNU Toolchain (gcc) for ARM 4.4.1 – CodeSourcery G++ 2010q1
- GNU Toolchain (gcc) for ARM 4.4.3 – devkitARM 30
The IAR EWARM C/C++ compiler generally produces the smallest code sizes for ARM targets and has excellent integrated debugging capabilities versus the GNU Toolchain. If a GNU chain is used then an IDE needs to be chosen.
Choosing an IDE
An IDE installs when the IAR C/C++ Compiler is installed where the GNU tool chains do not install one. Code::Blocks IDE and the Eclipse IDE are the IDEs currently supported by the Code Examples. Debugging is currently not supported in the Code::Blocks IDE. If a debug environment is needed the Eclipse IDE should be use.
Install the Chosen Compiler and IDE
Installing EWARM
The IAR EWARM Kickstart Edition is a 32 KB code-sized limited version of the IAR C/C++ compiler and debugger. It can be downloaded from IAR's website.
After downloading the EWARM-KS-CD click on the application to install the IAR Embedded Workbench for ARM. Select the “Install IAR Embedded Workbench” option from the Applications main menu as shown in Figure 2.4. Follow the instructions in the installation application. We suggest that you use the default directories, and the “Full” installation option.
Installing a GNU Compiler and IDE
The Code Examples currently support two GNU tool chains:
- GNU Toolchain (gcc) for ARM 4.4.1 – EABI CodeSourcery G++ Lite 2010q1
- GNU Toolchain (gcc) for ARM 4.4.3 – devkitARM 30
Installing the Sourcery CodeBench Lite Edition for ARM EABI GNU Compiler
Download the Sourcery G++ Lite 2010q1 for ARM EABI version of Sourcery CodeBench Lite Edition for ARM from Mentor Graphics website. When it is finished downloading click on the application to install it and a screen similar to Figure 2.5 should appear. We suggest that you use the default directories during the installation.
Installing the devkitARM GNU Compiler
Installing the devkitARM GNU Compiler can be done in 6 steps.
- 1. Download the devkitARM compiler from the sourceforge website by clickin the following link: http://sourceforge.net/projects/devkitpro/files/devkitARM/
- 2. Create a folder called devkitPro on the C drive.
- 3. Extract the contents into the "C:\devkitPro" folder. It should create a folder called "devkitARM".
- 4. Download the msystools from the sourceforge website by clicking the following link: http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.10/MSYS-1.0.10.exe/download
- 5. Run the msystools installer.
Installing the Eclipse IDE
Eclipse is a Java application and has the potential to be run on a wide variety of hardware and operating systems. Eclipse may install on systems with as little as 64MB of memory, however, we recommend to have 1GB of memory or more. The following software is required prior to install:
- GNU ARM Toolchain – Tools for embedded ARM development
- Java Runtime Environment (JRE) – Environment required for Java applications
The Eclipse SDK includes the Eclipse Platform which provides support for a full featured IDE. The SDK is provided as an archive and should be extracted to its desired directory (commonly ‘C:\Program Files\’). Eclipse can then be run by opening ‘eclipse.exe’ under INSTALL_DIR\eclipse\ and it is recommended that a shortcut be created to the application for easy access. At startup, Eclipse will prompt the user to specify the workspace directory and should point to the directory containing all of the user’s project folders.
The Eclipse IDE does not come with embedded ARM development support right out of the box. Plug-ins are needed to add this functionality and can be installed by selecting ‘Help’, ‘Install new software…’ via the Eclipse File menu. Click ‘Add’ to specify a plug-in source. An internet URL can be entered into the text box or a local directory or archive can be selected. The following two plug-ins can be installed via internet repository:
- Eclipse CDT (C/C++ Development Tools) – C/C++ development support
- Zylin Embedded CDT – Embedded debugging support
The following plug-in will need to be downloaded manually and installed via the archive method:
- GNU ARM – Managed makefile support for GNU ARM toolchains





