Файл: ARM cross development with Eclipse, version 2 (J.P. Lynch, 2005).pdf

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 12.06.2025

Просмотров: 685

Скачиваний: 1

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

Now the Cygwin will start downloading. This creates a huge 700 Megabyte directory on your hard drive and takes 30 minutes to download and install using a cable modem.

When the installation completes, Cygwin will ask you if you want any desktop icons and start menu entries set up. Say “No” to both. These icons allow you to bring up the BASH shell emulator (like the command prompt window in Windows XP). This would allow you do some Linux operations, but this capability is not necessary for our purposes here.

Click on “Finish” to complete the installation.

Now the Cygwin installation manager completes and shows the following result.

The directory c:\cygwin\bin must be added to the Windows XP path environment variable. This allows Eclipse to easily find the Make utility, etc.

Using the Start Menu, go to the Control Panel and click on the “System” icon.

Then click on the “Advanced” tab and select the “Environment Variables” icon. Highlight the “Path” line and hit the “Edit” button. Add the addition to the path as shown in the dialog box shown below (don’t forget the semicolon separator). The Cygwin FAQ advises putting this path specification before all the others.

We are now finished with the CYGWIN installation. It runs silently in the background and you should never have to think about it again.

7 Downloading the GNUARM Compiler Suite

At this point, we have all the GNU tools needed to compile and link software for Windows/Intel computers. It is possible to use all this to build a custom GNU compiler suite for the ARM processor family. The very informative book “Embedded System Design on a Shoestring” by Lewin A.R.W. Edwards ©2003 describes how to do this and it is rather involved.

Fortunately, Pablo Bleyer Kocik and the people at gnuarm.com have come to the rescue with pre-built GNU compiler suite for the ARM processors. Just download it with the included installer and you’re ready to go.

Click on the following link to download the GNUARM package.

www.gnuarm.com

The GNUARM web site will display and you should click on the “Files” tab.

The correct package to download is Binaries Cygwin – GCC- 4.0 toolchain

Just like all the other downloads we’ve done, we direct this one to our empty download directory on the hard drive. Here we click “Save” and then specify the download destination.

Once again, our c:/scratch directory will suffice.

As you can see, this download has a very long name!

This download is a 18 megabyte file and takes 30 seconds on a cable modem.

The download directory now has the following setup application with the following unintelligible filename: bu-2.15_gcc-3.4.1-c-c++-java_nl-1.12.0_gi-6.0.exe

Click on that filename to start the installer.

Click on this application to start the GNUARM installer


The GNUARM installer will now start. Click “Next” to continue.

Accept the GNU license agreement – don’t worry, it’s still free. Click “Next” to continue.

We’ll take the default and let it install into the “Program Files” directory. Click “Next” to continue.

We’ll also take the defaults on the “Select Components” window. Click “Next” to continue.

Take the default on this screen. Click “Next” to continue.

It’s very important that you don’t check “Install Cygwin DLLs” below. We already have the Cygwin DLLs installed from our Cygwin environment installation. In fact, the ARM message boards have had recent comments suggesting that the Cygwin DLL installation from within GNUARM has some problems.

Since all operations are called from within Eclipse, we don’t need a “desktop icon” either. Click “Next” to continue.

Click on “Install” to start the GNUARM installation.

Sit back and watch the GNUARM compiler suite install itself.

When it completes, the following screen is presented. Make sure that “Add the executables directory to the PATH variable” is checked. This is crucial.

This completes the installation of the compiler suites. Since Eclipse will call these components via the make file, you won’t have to think about it again.

It’s worth mentioning that the GNUARM web site has a nice Yahoo user group with other users posing and answering questions about GNUARM. Pay them a visit. The GNUARM web site also has links to all the ARM documentation you’ll ever need.

8 Installing the Philips LPC2000 Flash Utility into Eclipse

The Philips LPC2000 Flash Utility allows downloading of hex files from the COM1 port of the desktop computer to the Olimex LPC-P2106 board’s flash (or RAM) memory.

We need to download the latest version of this program from the Philips web site and unzip and install it into the program files directory. Then we will start Eclipse and add the LPC2000 Flash Utility as an external tool to be invoked.

Click on the following link to access the Philips LPC2106 web page.

www.semiconductors.philips.com/pip/LPC2106.html

The following web page for the LPC2106 should open.

If you scroll down this page, you will see a link to the LPC2000 Flash Utility download. Click on the ZIP file LPC2000 Flash Utility (date 2004-03-01)

As before, we’ll save the downloaded zip file in our empty c:/scratch directory. This is a fairly short download, only about 2 megabytes.

We’ll use WinZip to unzip this into the c:/scratch directory.

Now you can see that the download directory has a setup utility and another zip file containing the LPC2000 Hex Utility. Click on the setup.exe application to start the installer.

Click on setup to start the installer

The LPC2000 Flash Utility setup now starts. Click on OK to proceed.

Take the default on this screen below and let it install the LPC2000 Flash Utility into the Program Files directory.


In a very few seconds, the installer will complete and you should see this screen.

Here we see the utility residing in the Program Files directory, just as promised.


Now that the Philips LPC2000 Flash Utility is properly installed on our computer, we’d like to install it into Eclipse so that it can be invoked from the RUN pull-down menu under the “external tools” option. Start Eclipse by clicking on the desktop icon.

The layout of the Eclipse screen is called a “perspective.” The default perspective is the “resource” perspective, as shown below.

We need to change it into the C/C++ perspective. In the Window pull-down menu, select Window – Open Perspective – Other – C/C++ and then click OK.

Eclipse will now switch to the C/C++ perspective shown below and will remember it when you exit.

Now we want to add the Philips LPC2000 Flash Utility to the “External Tools” part of the Run pull-down menu. Select RUN – External Tools – External Tools.

We want to add a new program to the External Tools list, so click on Program and then New.

Note below that there’s a new program under the “program” tree with the name New_configuration and there’s no specifications as to what it is.

In the Name text box, replace New-configuration with LPC2000 Flash Utility.

In the Location text box, use the “Browse File System” tool to find the Philips

LPC2000 Flash Utility in the Program Files directory. Its name is

LPC210x_IPC.exe.

Here’s the External Tools window before editing.

Here’s the External Tools window after our modifications. Click on Apply to accept.

Close everything out and return to the Run pull-down menu. Select Run – External Tools – Organize Favorites.

We’re now going to put the Philips PLC2000 Flash Utility into the “favorites” list. Click on “Add” in the window below.

Click the selection box for LPC2000 Flash Utility. This will add it to the favorites list.

Now when we click on the Run pull-down menu and select “External Tools,” we see the LPC2000 Flash Utility at the top of the list.

Click on LPC2000 Flash Utility to verify that it runs.

Now cancel the LPC2000 Flash Utility and quit Eclipse.

9 Installing the Macraigor OCDremote Utility

OCDRemote is a utility that listens on a TCP/IP port and translates GDB monitor commands into Wiggler JTAG commands. This permits Eclipse/GDB to communicate to the Olimex LPC-P2100 board as a target monitor accessed via Ethernet. Macraigor has always made this utility available on the internet as “freeware.” The OCDRemote utility can be downloaded at:

http://www.macraigor.com/full_gnu.htm

You should see the following screen open up.

If you scroll the above screen down a bit, you should see the download for

OCDRemote. Click on the link “DOWNLOAD Windows OCDRemote v2.12”.

Click on “Run” so it will download and immediately install OCDRemote.


The download phase is quick since the OCDRemote is only a couple of megabytes.

The Macraigor installer should start up; just click “Next” to continue.

The next screen lets you choose where OCDRemote is installed. OCDRemote normally installs in c:/cygwin/usr/local/bin.

We’ll have to make sure that this directory is on a Windows Path.