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.
If make is not installed on the computer then perform the following steps:
- 1. Open a command prompt
- 2. Type "cd\program files\codesourcery\sourcery g++ lite\bin"
- 3. Press enter
- 4. Type "copy cs-make.exe make.exe"
- 5. Press enter
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.
Follow these steps to install the Eclipse IDE:
- 1. Install the desired GNU ARM Toolchain (EABI CodeSourcery G++ Lite 2010q1 or devkitARM 30).
- 2. Be sure the Java Runtime Environment (JRE) is installed.
- 3. The Eclipse SDK includes the Eclipse Platform is provided as an archive and can be downloaded on the following website: http://download.eclipse.org/tools/cdt/releases/galileo/
- 4. Extract the Eclipse SDK to its desired directory (commonly ‘C:\Program Files\’).
- 5. Start Eclipse by double clicking on the "eclipse.exe" file where the Eclipse SDK was extracted to.
- 6. Select the workspace directory. "StellarisWare\boards\eagle" for the Eagle and "Lincoln\CMSIS\projects" for the Lincoln.
- 7. Click on the "Help" drop down menu and select "Install new software…".
- 8. Copy http://download.eclipse.org/tools/cdt/releases/galileo and paste it into the "Work with:" box.
- 9. Click the "Add" button.
- 10. Expand "CDT Main Features" and check "Eclipse C/C++ Development Tools"
- 11. Click the "Next" button.
- 12. Copy http://opensource.zylin.com/zylincdt and paste it into the "Work with:" box.
- 13. Click the "Add" button.
- 14. Check "Zylin Embedded CDT".
- 15. Click the "Next" button.
- 16. Copy http://sourceforge.net/projects/gnuarmeclipse/files/Eclipse/updates/ and paste it into the "Work with:" box.
- 17. Click the "Add" button.
- 18. Check "CDT GNU Cross Development Tools".
- 19. Click the "Next" button.
Installing the CodeBlocks IDE
Codeblocks is a cross-platform IDE built around wxWidgets, designed to be extensible and configurable. It can be downloaded from the Codeblocks website by clicking the following link: http://www.codeblocks.org/downloads
Install Codeblocks by clicking on the downloaded executable.





