Zilog EZ80F916 User Manual
Page 100

UM014423-0607
Using the Integrated Development Environment
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
80
The
ORDER
command allows the user to define the sequence of segments within a
memory space. In the Standard configuration, ZDS II generates the following
command to put the initialized data segment at a lower address than the uninitialized
data segment:
ORDER DATA,BSS
•
Copy to RAM
This configuration produces a memory image that resides in Flash/ROM and is copied
to RAM for execution. This configuration is typically used to take advantage of
RAM’s faster operation. Using the ZDS II standard startup module with this
configuration is recommended as the surest and easiest way to produce an effective
run-time environment.
This configuration provides support for copying code as well as data segments from
physical ROM to physical RAM. The idea is to compensate for the performance
penalty often associated with running code from ROM. A ROM instruction fetch, for
example, might require more wait states than a RAM instruction fetch. It is therefore
more efficient to run code from RAM than to run it from ROM, provided the target
system has enough RAM for the program code and data. As in the other
configurations, ZDS II automatically generates linker commands in the linker
command file to support this operating mode, when the Copy to RAM link
configuration is selected.
To run code from the RAM space, the Linker must do two things:
–
Reassign all of the CODE segment addresses to RAM instead of ROM.
–
Place a copy of the CODE segment in ROM for an application restart (the startup
module re-copies it from ROM to RAM upon restart).
The linker
CHANGE
command allows you either to rename a segment or reassign a
segment to another space. For example
CHANGE TEXT is DATA
CHANGE CODE is RAM
CHANGE STRSECT is CODE
causes the linker to
1. Combine the
TEXT
segment into the
DATA
segment.
2. Reassign the
CODE
segment to the RAM space.
3. Combine the
STRSECT
segment into the
CODE
segment.
These three
CHANGE
commands reassign all addresses in the
CODE
,
TEXT
, and
STRSECT
segments into RAM, for the fastest possible execution.
The final step requires the RAM space to be copied in ROM space, so that it can be
reloaded from ROM when the application starts. Adding the following code