Datasheet
Migrating Projects from SDT to ADS
ARM DUI 0064D Copyright © 1999-2001 ARM Limited. All rights reserved. 4-5
In ADS, all code is compiled as
-apcs /narrow
. The
-apcs /wide
option was obsolete in
SDT 2.50 and SDT 2.51, and is no longer supported.
If you see:
Error: C3057E: bad option '-apcs /narrow ': ignored
then remove the
/narrow
qualifier from your compiler command line. See Table 2-1 on
page 2-47 for more information on changed APCS qualifiers.
-zat and alignment of top-level static objects
In SDT,
-zatNumber
specifies the minimum byte alignment for top-level static objects,
such as global variables. Valid values for
Number
are1, 2, 4, and 8. The default is 4 for
the ARM compilers and 1 for the Thumb compilers
The ADS compilers do not support the
-zat
option. The default is the equivalent of
-zat1
for both ARM and Thumb.
-zas and alignment of structs
In SDT, the compiler always places structures on word boundaries (
-zas4
) by default,
unless they are packed with the
__packed
qualifier.
The ADS compilers align only as strictly as the contents of the structure require. This
is the equivalent of
-zas1
. The
-zas
option is deprecated and the compiler generates the
following warning:
Warning: C2067I: option -zas will not be supported in future releases
It is recommended that you avoid writing code that relies on the alignment of objects
such as structures. See the description of structures, unions, enumerations, and bitfields
in the ADS Compilers and Libraries Guide for more information.
To revert to SDT behavior and place structures on word boundaries, compile with
-zas4
.
-zz, -zt, -zzt0
In SDT, the compiler options
-zz0
and
-zt
are commonly combined as
-zzt0
. This
forbids the use of tentative declarations, and forces uninitialized globals to be placed
directly in the ZI area.
Note
-zz-1
is a deprecated option that gives the same result as
-zz0
. Use
-zz0
in preference to
-zz-1
in SDT 2.50 and SDT 2.51.