SEARCH
TOOLBOX
LANGUAGES
modified on 5 April 2012 at 14:33 ••• 95,767 views

Cortex M3 Compiler Installation

From Manuals

Jump to: navigation, search

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.

IAR KickStart CD
Figure 2.4: IAR Kickstart Main Menu

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
Sourcery G++
Figure 2.5: Sourcery CodeBench Lite Edition for ARM EABI Main Menu

Installing the devkitARM GNU Compiler

Installing the devkitARM GNU Compiler can be done in 6 steps.

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://www.eclipse.org/cdt/downloads.php
  • 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.
Figure 2.6 – Specifying Workspace in Eclipse
  • 7. Click on the "Help" drop down menu and select "Install new software…".
  • 8. Expand "CDT Main Features" and check "Eclipse C/C++ Development Tools"
Figure 2.7 – Installing the CDT plug-in

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.

CodeBlocks IDE
Figure 2.8: CodeBlocks IDE installation