Invoking the linker – Zilog EZ80F916 User Manual
Page 266

UM014423-0607
Using the Linker/Locator
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
246
Both of these linker commands define locations that are used by the startup module to ini-
tialize the C runtime for an application. In configurations where code or data is copied, the
linker commands for setting up the stack and heap can be more complicated. When a con-
figuration has been selected, ZDS II automatically generates the appropriate DEFINEs
and linker expressions. In addition to the stack and heap, the startup routines handle all of
the copying for special segments and setting up the initial vector table.
INVOKING THE LINKER
The linker is automatically invoked when your project is open and you click the Build but-
ton or Rebuild All button on the Build toolbar (see “Build Toolbar” on page 18). The
linker then links the corresponding object modules of the various source files in your
project and any additional object/library modules specified in the Objects and Libraries
page in the Project Settings dialog box (see “Project Settings—Objects and Libraries
Page” on page 84).The linker uses the linker command file to control how these object
modules and libraries are linked. The linker command file is automatically generated by
ZDS II if the Always Generate from Settings button is selected (see “Always Generate
from Settings” on page 81). You can add additional linker commands with the Additional
Linker Directives dialog box (page 82). If you want to override the automatically gener-
ated linker command file, select the Use Existing button (see “Use Existing” on page 83).
The linker can also be invoked from the DOS command line or through the ZDS II Com-
mand Processor. For more information on invoking the linker from the DOS command
line, see “Running ZDS II from the Command Line” on page 379. To invoke the linker
through the ZDS II Command Processor, see “Using the Command Processor” on
page 387.
1. Open your project.
2. From the Project menu, select Settings.
3. In the Objects and Libraries page, select the Standard button and click OK.
4. Click Yes to the warning message: "
The project settings have changed
since the last build. Would you like to rebuild the affected
files?
"
The linker command file is generated even if the build is not successful.
If you select the Included in Project button and use the startup source or object
provided with the tools (
init_params_f91.asm
, which includes
sysclk.asm
or corresponding
.obj
files), building the project might result in
linker errors and warnings. If you experience this problem, follow these steps
to add the correct linker directives to initialize variables in your project: