Tutorial - Setting Up A GCC Development Environment For ARM Cortex (Windows)
Tutorial - Setting Up A GCC Development Environment For ARM Cortex (Windows)
Tutorial - Setting Up A GCC Development Environment For ARM Cortex (Windows)
eu
Login
Register
Home
Tutorials
Components
Projects
Blog
Forums
Store
Search
Projects > LPC1343 Reference Design > Tutorial: GCC Development Environment for ARM Cortex M3 (Windows)
Related Links
User Manual/Datasheet
and properly configuring the toolchain, particularly in a non-Linux environment. This tutorial will guide you through the process of
LPC1343 Datasheet
setting up an entire open source GCC-based development environment, including the main cross-compiler and toolchain (Yagarto
4.5.0), a graphical development environment (CodeLite), as well as Subversion to be able to download the latest version of the
LPC1343 Code Base.
Software
While there are many toolchains and open-source development tools available for ARM, the LPC1343 Code Base has been
Hardware
LPC1343 Reference Design
HW Design Overview
developped with the tools and software packages listed below. These tools have been selected for their ease of use, and
for the minimal amount of effort required to install them in a Windows environment. While these tools are also
available for Linux and Mac, the installation process for these operating systems is not covered here.
Code Base/Documentation
Yagarto Tools (20100703) [Direct Download]
Tutorials
Debugging the CodeBase in LPCXpresso
GCC Development Environment for ARM
Using CodeLite with the LPC1343 (Part 1)
Using CodeLite with the LPC1343 (Part 2)
Using PWM on the LPC1343
Freaklabs RF Antennas with the LPC1343
To avoid any problems with spaces in path names, you should change the destination folder for both Yagarto Tools and
Yagarto Toolchain to the directories below:
Blog Posts
All posts tagged with LPC1300
Waking up from Deep Sleep on LPC1343
Creating valid binaries in LPCXpresso
LPC1343 USB Bootloader
External Links
NXP Support Documents
You can test if the installation was successful by going into the standard Windows command line, and entering the following
command, which should show the version and some basic build information on GCC:
arm-none-eabi-gcc --version
Note: If you are unable to build and see and error message relating to make.exe, you may need to go into
the Settings > Build Settings menu and under the Build Systems tab change Build Tool to make.exe.
CodeLite has built-in support for Subversion, though you will still need to install the Subversion binaries (see below for more
information on this) and download the source code to your computer once from the command prompt. Once the source code
has been downloaded locally, though, CodeLite allows you to easily check in and checkout files during the development process,
and see which files have been modifed by you since the last checkout.
CodeLite also has a number of useful features such as code completion, an excellent text editor, easy error reporting during the
build process, etc., making it a pleasure to work with when developping software. It may not offer the same rich debugging
toolset as a commercial GCC-based solution like Rowley Associate's Crossworks for ARM, but it's probably the best open source
IDEs we've come across so far, and feels far more modern than most Eclipse-based solutions we've tried. Hopefully, some of
the features of CodeLite will be explored in more detail in future tutorials, but you should be able to pick up the basics just by
exploring the IDE a bit and examining all the different context menus available ... it's worth the effort of exploring.
For more information on using CodeLite with the LPC1343 Code Base, have a look at our two part
tutorial: Using CodeLite with the LPC1343. Amongst other things, it explains how to use the USB bootloader
on the LPC1343, and how a Segger J-Link for ARM can be used to automatically deploy your compiled code
to the board without having to leave the development environment.
If you have already installed Yagarto Tools and Toolchain, you can now compile the code from the command-prompt using the
following command (make sure that you are in the 'lpc1343codebase' root folder that was created during the checkout process
above, which can be entered via "cd lpc1343codebase"):
make
You can clean up all the temporary files created by the compiler with the following command:
make clean
Note: If you don't wish to install Subversion, you can also download an archived version of the LPC1343
Code Base directly from this website.
Why am I getting the following error when I try to build using the
makefile: "<PATH>/arm-none-eabi/bin/ld.exe:lpc1xxx/memory.ld:1:
syntax error"
In order to keep the makefile as generic as possible (to allow people to easily reuse it in any LPC11xx or LPC13xx
project), some linker files are dynamically generating during the build process using the echo statement.
Unfortunately, Windows handles the 'echo' command very differently than most other operating systems. Windows
will include the outer double-quotes in the output that Linux would use to indicate the contents of the echo, and
multi-line support is handled quite differently.
While it will require installing an additional package, the best way to work around this (and a number of other
incompatibilities between the Linux and Windows shell) is to install MinGW and MSYS, and add the following
directory to your Windows PATH environment variable (which may vary if you installed MSYS in a different
location):
C:\msys\1.0\bin
This should solve the problems caused by echo, and allow you to build on Windows, Linux or Mac OS X using the
same makefile. For details on downloading and installing MinGW and MSYS, as well as adding the directory to your
PATH environment variable, please see step one and five the following tutorial: Building a GCC Toolchain from
Source
Comments