ARM VERSION 1.2 Guide de l'utilisateur Page 89

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 133
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 88
a project file for the CodeWarrior IDE
a batch file
the command line.
Using the CodeWarrior IDE
To build the example from the CodeWarrior IDE, load the supplied embed project and select
Target=EmbeddedScatter.
This creates:
an ELF debug image (embed.axf) for loading into a debugger (AXD or armsd)
a binary ROM image (embed.bin) suitable for downloading into the memory of an ARM Integrator board.
Using the command line
To build the example from the command line, execute build_b.bat or follow these steps:
1. Assemble the initialization code:
armasm -g vectors.s
armasm -g stack.s
armasm -g heap.s
armasm -g init.s
2. Compile the main example and the new retargeting files retarget.c and, optionally, serial.c with the
following commands:
armcc -c -g -O1 main.c -DEMBEDDED
armcc -c -g -O1 retarget.c
armcc -c -g -O1 serial.c -I..\include
where:
-D
Instructs the compiler to define the symbol EMBEDDED.
-I
Instructs the compiler where to find the include files.
The use of serial.c is optional. Keep this line if you want the output to be sent over the serial port of the
Integrator board.
3. Link the image using the following command (all on one line):
armlink vectors.o init.o main.o retarget.o serial.o stack.o heap.o
-scatter scat_b.scf -o embed.axf
-entry 0x0 -info totals -info unused
where:
-entry
This option defines the reset vector as the unique entry point.
-o
This option specifies the output file.
-info totals
This option tells the linker to print information on the code and data sizes of each object file
along with the totals for each type of code or data.
4. Run the fromELF utility to produce a plain binary version of the image:
fromelf embed.axf -bin -o embed.bin
where:
-bin
Specifies a binary output image with no header.
5. Use ARMulator to test the image or download and execute the ROM image to the development board.
For armsd use:
getfile embed.bin 0x0
readsyms embed.axf
For AXD select:
FileLoad Memory From File and specify embed.bin with load address 0x0.
FileLoad Debug Symbols and specify embed.axf.
Writing Code for ROM
Copyright ?1999 2001 ARM Limited 6-14
Vue de la page 88
1 2 ... 84 85 86 87 88 89 90 91 92 93 94 ... 132 133

Commentaires sur ces manuels

Pas de commentaire