ARM VERSION 1.2 Guide de l'utilisateur Page 105

  • 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 104
6.11 Measuring code and data size
To measure code size, do not look at the linked image size or object module size, as these include symbolic
information that is not part of the binary data. Instead, use one of the following armlink options:
-info sizes
This option gives a breakdown of the code and data sizes of each object file or library
member making up an image.
-info totals
This option gives a summary of the total code and data sizes of all object files and all
library members making up an image.
6.11.1 Interpreting size information
The information provided by the -info sizes and -info totals options can be broken down into:
code (or read-only) segments
data (or read-write) segments
debug data.
Code (or read-only) segments
code size
Size of code, excluding any data that has been placed in the code segment.
RO data
Size of read-only data included in the code segment by the compiler.
This data contains:
the addresses of variables that are accessed by the code
floating-point immediate values
immediate values that cannot be loaded directly into a register
short inline strings
the addresses of longer inline strings in RO data.
Data (or read-write) segments
RW data
Size of read-write data. This is data that is read-write and also has an initializing value.
Read-write data occupies the displayed amount of RAM at run-time, but also requires the
same amount of ROM to hold the initializing values that are copied into RAM on image startup.
ZI data
Size of read-write data that is zero-initialized at image startup.
Typically this contains arrays that are not initialized in the C source code. Zero-initialized data
requires the displayed amount of RAM at run-time but does not require any space in ROM.
Debug data
debug data
Reports the size of any debugging data.
6.11.2 Calculating ROM and RAM requirements
The linker calculates the ROM and RAM requirements for code and data as follows:
ROM
Code size + RO data + RW data
RAM
RW Data + ZI data.
In addition you must allow some RAM for stacks and heap.
In more complex systems, you may require part (or all) of the code segment to be downloaded from ROM into RAM
at run-time. This increases the system RAM requirements but could be necessary if, for example, RAM access times
are faster than ROM access times and the execution speed of the system is critical.
Writing Code for ROM
Copyright ?1999 2001 ARM Limited 6-30
Vue de la page 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 132 133

Commentaires sur ces manuels

Pas de commentaire