Zilog EZ80F916 User Manual
Page 182

UM014423-0607
Using the ANSI C-Compiler
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
162
The most important of the linker commands and options in the default linker command file
are now discussed individually, in the order in which they are typically found in the linker
command file:
-FORMAT=OMF695, INTEL32
-map -maxhexlen=64 -quiet -warnoverlap -NOxref -unresolved=fatal
-sort NAME=ascending -warn –debug -NOigcase
In this command, the linker output file format is selected to be OMF695, which is based
on the IEEE 695 object file format, and INTEL32, which is the Intel Hex 32 format. This
setting is generated from options selected in Output page (see “Project Settings—Output
Page” on page 92). The
–quiet
,
-debug
, and
–noigcase
options are generated from the
settings on the General page (see “Project Settings—General Page” on page 57). The other
options shown here are all generated from the settings selected in the Warnings and Output
pages (see “Project Settings—Warnings Page” on page 90 and “Project Settings—Output
Page” on page 92).
RANGE ROM $000000 : $03FFFF
RANGE RAM $B80000 : $BFFFFF
RANGE EXTIO $0 : $FFFF
RANGE INTIO $0 : $FF
The ranges for the four address spaces are defined here. These ranges are taken from the
settings in Address Spaces page (see “Project Settings—Address Spaces Page” on
page 89).
CHANGE STRSECT is ROM
The
STRSECT
segment is moved into the ROM space by the preceding command. Because
the contents of
STRSECT
are constant strings, this segment should always be placed in
ROM in a production build, though for debugging purposes
STRSECT
might sometimes be
left in RAM.
ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA
This
ORDER
command specifies the temporal link order of these segments. The
.RESET
segment is placed at lower addresses with the
.IVECTS
segment immediately following it
and so on.
COPY DATA ROM
This COPY command is a linker directive to make the linker place a copy of the initialized
data segment DATA into the ROM address space. At run time, the C startup module then
copies the initialized data back from the ROM address space to the RAM address spaces.
This is the standard method to ensure that variables get their required initialization from a
nonvolatile stored copy in a typical embedded application where there is no offline mem-
ory such as disk storage from which initialized variables can be loaded.
DEFINE __low_romdata = copy base of DATA
DEFINE __low_data = base of DATA
DEFINE __len_data = length of DATA
DEFINE __low_bss = base of BSS