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

Cortex M3 Compiler Installation

From Manuals

(Difference between revisions)
Jump to: navigation, search
(Installing the Eclipse IDE)
(Installing the Eclipse IDE)
 
(10 intermediate revisions not shown)
Line 30: Line 30:
====Installing the Sourcery CodeBench Lite Edition for ARM EABI GNU Compiler====
====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  [https://sourcery.mentor.com/sgpp/lite/arm/portal/subscription?@template=lite 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.
Download the Sourcery G++ Lite 2010q1 for ARM EABI version of Sourcery CodeBench Lite Edition for ARM from  [https://sourcery.mentor.com/sgpp/lite/arm/portal/subscription?@template=lite 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
   
   
[[Image:SourceryG_CD.png|center|frame|alt=Sourcery G++|Figure 2.5: Sourcery CodeBench Lite Edition for ARM EABI Main Menu]]
[[Image:SourceryG_CD.png|center|frame|alt=Sourcery G++|Figure 2.5: Sourcery CodeBench Lite Edition for ARM EABI Main Menu]]
====Installing the devkitARM GNU Compiler====
====Installing the devkitARM GNU Compiler====
-
Download the devkitARM compiler from the [http://sourceforge.net/projects/devkitpro/files/devkitARM/ Sourceforge website].
+
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====
====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.
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.
 
-
 
-
[[Image:launcher.png|frame|center|Figure 1 – Specifying Workspace in Eclipse]]
 
-
 
-
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
 
-
** http://download.eclipse.org/tools/cdt/releases/galileo
 
-
* Zylin Embedded CDT – Embedded debugging support
 
-
** http://opensource.zylin.com/zylincdt
 
-
 
-
[[Image:install.png|frame|center|Figure 2 – Installing the CDT plug-in]]
 
-
The following plug-in will need to be downloaded manually and installed via the archive method:
+
Follow these steps to install the Eclipse IDE:
-
* GNU ARM – Managed makefile support for GNU ARM toolchains
+
* 1. Install the desired GNU ARM Toolchain  (EABI CodeSourcery G++ Lite 2010q1 or devkitARM 30).
-
** http://sourceforge.net/projects/gnuarmeclipse
+
* 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.
 +
[[Image:launcher.png|frame|center|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"
 +
[[Image:install.png|frame|center|Figure 2.7 – Installing the CDT plug-in]]
 +
* 9. Click the "Next" button.
 +
* 10. Copy http://opensource.zylin.com/zylincdt and paste it into the "Work with:" box.
 +
* 11. Click the "Add" button.
 +
* 12. Check "Zylin Embedded CDT".
 +
* 13. Click the "Next" button.
 +
* 14. Copy http://sourceforge.net/projects/gnuarmeclipse/files/Eclipse/updates/ and paste it into the "Work with:" box.
 +
* 15. Click the "Add" button.
 +
* 16. Check "CDT GNU Cross Development Tools".
 +
* 17. Click the "Next" button.
====Installing the CodeBlocks IDE====
====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.
-
* [http://www.eclipse.org/cdt/downloads.php Eclipse CDT Updates]
+
[[Image:CodeBlocks_Setup.png|center|frame|alt=CodeBlocks IDE|Figure 2.8: CodeBlocks IDE installation]]
-
* [http://sourceforge.net/apps/mediawiki/gnuarmeclipse/index.php?title=Main_Page GNU ARM Eclipse Plug-in]
+
-
* [http://www.codeblocks.org/downloads CodeBlocks Updates]
+

Current revision as of 14:33, 5 April 2012

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