Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(ARM).Porting TCP-IP programmer's guide.Ver 1.4.pdf
Скачиваний:
31
Добавлен:
23.08.2013
Размер:
2.79 Mб
Скачать

Example Applications

12.1Overview of the examples

This section is divided into three subsections:

Requirements

Building projects

Running the examples on page 12-4.

12.1.1Requirements

In order to use the example projects supplied, you will need the following:

ARM Software Development Toolkit, version 2.50

ARM Development Board (PID Board) fitted with an ARM7TDMI processor

ARM Ethernet Kit for the ARM Development Board (Olicom version)

ARM EmbeddedICE or Multi-ICE for downloading to the board.

If you are using the ARM PPP sources, you will also need a Hayes-compatible modem and a PPP server to dial into.

12.1.2Building projects

Each of the example projects is supplied with a makefile and a pair of ARM Project Manager project files. One of the project files builds the project for Ethernet, and the other builds it for PPP.

Using Makefiles

If you are working in a UNIX environment, you can build the example projects using the standard make utility. The makefile for each project shares a standard set of make definitions from the file makedefs. These definitions allow several variations of the project to be built.

By default, just typing make at a UNIX shell prompt while in one of the project sub-directories will build all of the possible variants of the project. If you have the PPP sources installed, this includes all of the variants for PPP and Ethernet. Otherwise, just the Ethernet variants are built.

The possible variants are:

EtherArmBigDebug

EtherArmBigRelease

EtherArmLitleDebug

EtherArmLittleRelease

12-2

Copyright © 1998 and 1999 ARM Limited. All rights reserved.

ARM DUI 0079B

Example Applications

EtherThumbBigDebug

EtherThumbBigRelease

EtherThumbLittleDebug

EtherThumbLittleRelease

PPPArmBigDebug

PPPArmBigRelease

PPPArmLitleDebug

PPPArmLittleRelease

PPPThumbBigDebug

PPPThumbBigRelease

PPPThumbLittleDebug

PPPThumbLittleRelease.

where:

 

Ether

indicates that the code is linked to use the Ethernet drivers

PPP

indicates that the code is linked to use the PPP stack

Arm

indicates that the code is compiled/assembled as 32-bit ARM code

Thumb

indicates that the code is compiled/assembled as 16-bit Thumb code

Big

indicates that the code is configured for a big-endian system

Little

indicates that the code is configured for a little-endian system

Debug

indicates that the code has full debug enabled

Release

indicates that the code has all debug disabled.

To clean up object files left after a build, you can use make clean. To remove absolutely everything left around by a build, use make clobber.

If you want to limit the variants that are built, edit the Makefile and uncomment the line that starts #BUILD = .... Set BUILD to a list of the variants you wish to build, for example:

BUILD = ArmLittleDebug ThumbBigRelease ArmBigRelease

would build just those three variants.

Note

The initial Ether or PPP is omitted from the BUILD list.

ARM DUI 0079B

Copyright © 1998 and 1999 ARM Limited. All rights reserved.

12-3

Example Applications

Using ARM Project Manager

If you are working in a Windows environment, you can build the example projects using the ARM Project Manager for Windows. Each project comes with two project files, one that is used to build Ethernet variants and one that is used to build PPP variants.

When loaded into the ARM Project Manager, you will find that the same variants are available as for each makefile. Select the variant you want to build and select the build option.

12.1.3Running the examples

After you have built the examples, you can run them by downloading them to a PID card using EmbeddedICE or Multi-ICE. Please see the documentation provided with the Software Development Toolkit, the PID card, and your EmbeddedICE or Multi-ICE equipment for detailed instructions on how to do this.

If you are running the PPP examples, you must connect your modem to Serial port A on the PID card. Debug messages are sent to Serial port B, so connect either a terminal to this port or use a cross-over cable to connect this to a COM: port on your workstation. Then, run a terminal emulator to monitor these messages. Both Serial A and Serial B are configured to operate at 38400 baud, using 8 data bits, 1 stop bit, and no parity. These values can be changed by editing the uart.c file in the \pid7tdm directory. Figure 12-1 illustrates the hardware setup.

When running the Ethernet examples, all debug messages are sent to the ARM debugger by way of the RDI link. You can modify the ipport.h file of each project to have it use the Serial B UART for debugging by not defining NATIVE_PRINTF in the ipport.h file.

COM: port of the PC

Serial port B

PID

Serial port A

Modem

Phone line

 

 

Figure 12-1 Running PPP examples

12-4

Copyright © 1998 and 1999 ARM Limited. All rights reserved.

ARM DUI 0079B