| |||
| Home > Introduction > What is new? > Changes in default behavior | |||
The changes that have been made to the default behavior of the SDT are described in:
The ARM and Thumb compilers now adjust the stack pointer only on function entry and exit. In previous toolkits they adjusted the stack pointer on block entry and exit. The new scheme gives improved code size.
The default Procedure Call Standard (PCS) for the ARM and Thumb compilers, and the assembler in SDT 2.50 and C++ 1.10 is now:
-apcs 3/32/nofp/noswst/narrow/softfp
The new default PCS will not perform software stack checking and does not use a frame pointer register. This generates more efficient and smaller code for use in embedded systems.
The default procedure call standard for the ARM (not Thumb)
compiler in SDT 2.11a was -apcs 3/32/fp/swst/wide/softfp.
The default procedure call standard for the ARM (not Thumb)
assembler in SDT 2.11a was -apcs 3/32/fp/swst.
Existing makefiles and APM project files where the PCS was not specified will generate code that does not perform software stack checking and does not use a frame pointer register. This will result in smaller and faster code, because the default for previous compilers was to emit function entry code that checked for stack overflow and set up a frame pointer register.
In SDT 2.50 and C++ 1.10 the default debug table format is DWARF 2. DWARF 2 is required to support debugging C++, and to support the improvements in debugging optimized code.
The default debug table format emitted by the SDT 2.11a compilers and assemblers was ASD.If DWARF debug table format was chosen, the SDT 2.11a compilers and assemblers emitted DWARF 1.0.3.
Existing makefiles and APM project files where debugging information
was requested will now result in DWARF 2 debug data being included
in the executable image file. Previous behavior can be obtained
from the command line by specifying -g+ -asd or -g+ -dwarf1,
or by choosing these from the appropriate Tool Configuration dialog
boxes in APM.
The default image file format emitted by the linker has changed from AIF to ELF.
Existing makefiles in which no linker output format was chosen,
and existing APM project files in which the Absolute
AIF format was chosen, will now generate an ELF image.
If you require an AIF format image, use -aif on
your armlink command line, or choose Absolute AIF on
the Output tab of the APM Linker options
dialog box. This will then generate a warning from the linker. AIF
images can also be created using the new fromELF tool.
When the ARM debuggers load an executable AIF image they switch the processor mode to User32. For ELF, and any format other than executable AIF, the debuggers switch the processor mode to SVC32. This means that, by default, images now start running in SVC32 mode rather than User32 mode. This better reflects how the ARM core behaves at reset.
C code that performs inline SWIs must be compiled with the -fz option
to ensure that the SVC mode link register is preserved when the
SWI is handled.
The default processor for the SDT 2.11a ARM (not Thumb) compilers
was ARM6. In SDT 2.50 and C++ 1.10 this has been changed to ARM7TDMI.
The default processor for the assembler has changed from -cpu
generic –arch 3 to -cpu ARM7TDMI.
Existing makefiles and APM project files where the processor
was not specified (with the -processor option)
will generate code that uses halfword loads and stores (LDRH/STRH)
where appropriate, whereas such instructions would not previously
have been generated. Specifying -arch 3 on the
command line prevents the compilers from generating halfword loads
and stores.
A new variant of the Remote Debug Interface (RDI 1.5) is introduced in SDT 2.50. The version used in SDT 2.11a was 1.0.
The debugger has been modified so that it will function with either RDI 1.0 or RDI 1.5 client DLLs.
In SDT 2.50, the assembler pre-declares all PCS register names,
but also allows them to be declared explicitly through an RN directive.
In SDT 2.11a the procedure call standard (PCS) register names
that the assembler would pre-declare were restricted by the variant
of the PCS chosen by the -apcs option. For example, -apcs
/noswst would disallow use of sl as a register name.