Install the dev kit

The aim here is to use open source & GNU solutions to set up a complete M3 toolchain.

I’m using windows 7, but the procedure is valid for Linux and Mac OS X too.

This procedure is heavily based on informations from YAGARTO.

1) install CodeSourcery G++ Lite

This is the open source GNU toolchain for ARM processors maintained by CodeSourcery in partnership with ARM.

Go to the CodeSourcery G++ Lite page, download and install the last EABI package for your OS (Linux or Windows). The “advanced packages” downloads are not required.

When installing, you can choose the “minimal” configuration if you want (no G++ IDE).

If you’re on Max OS X, you’ll have to build from the source. To do this, follow the instructions detailed by James Snyder.

Note that this is not the only GNU toolchain for ARM available. You can download for example the GNUARM version from the YAGARTO page, but the may be differences between toolchains and you’ll have to tweak the toolchain settings accordingly. For Mac OS X users, it could be interesting to use YAGARTO’s Mac OS X binaries if you can’t manage to build the CodeSourcery toolchain from the source.

2) install yagarto tools (windows only)

The YAGARTO tools bring you make, sh, touch and other dev tools on the windows platform without using Cygwin.

On the YAGARTO page, download and install the YAGARTO Tools.

I strongly suggest that you install the tools in a path whose name doesn’t include any space (so don’t use the default /program files path), since I had problem with ‘sh’ and ‘make’ in this configuration (at least under windows 7).

3) install JRE (if needed)

The Java Runtime Environment is needed to run Eclipse.

If you don’t have already a JRE installed, grab & install the latest sun JRE (for Windows or Linux, Mac OS X has its own JRE).

4) install and run Eclipse

Eclipse is the IDE we’ll use.

Go to the Eclipse Downloads page and get the Eclipse IDE for C/C++ developers package for your OS.

You just have to unzip the archive, put the eclipse directory where you want and run Eclipse from there.

Select where you want to put your Workspace (Eclipse will ask you the first time), and then update the IDE in Help / Check for updates.

5) install Zylin embedded CDT

The Zylin embedded CDT is used for debugging within Eclipse with GDB.

In Eclipse, go to help / install new software, add the http://opensource.zylin.com/zylincdt urland install the Zylin embedded CDT plugin.

6) install the GNUARM Eclipse plugin

The GNUARM Eclipse plugin will allow you to configure and use the ARM GNU toolchain from within Eclipse. For example, you won’t have to deal with makefiles, this plugin will let Eclipse manage them.

Go to the GNUARM Eclipse plugin sourceforge page and download the latest version.

You just have to drop the plugin jar into the plugins directory of your Eclipse installation, and restart Eclipse.

From within Eclipse, choose Help / install new software / Add / Archive and browse to the zip downloaded file.

Then uncheck the “group itemps by…” option and you should be able to check and install the plugin correctly.

7) Run & setup Eclipse

Run Eclipse, go to the Workbench and uncheck project / build automatically.

Now you can import a sample project (I’ll give you one on the next part) or create a new one.

Open a source file from your project (main.c for example), then go to Project / Properties / C/C++ Build / Settings / Binary parsers and select the GNU Elf Parser.

I suggest you take some time to explore the Project / Properties options tree.

The next step is now to build a sample C project