beautypg.com

Debug, Define, Debug define – Zilog Z8F0130 User Manual

Page 375

background image

UM013037-1212

DEBUG

Zilog Developer Studio II – Z8 Encore!

User Manual

351

1. In the assembly code, define the string segment (for example,

strsect

) to be a seg-

ment located in ROM.

2. Use the following linker command:

COPY strsect NULL

The linker associates all of the labels in

strsect

with an address in ROM and does

not generate any loadable data for

strsect

. This is useful when ROM is already pro-

grammed separately, and the address information is needed for linking and debugging.

Example 4

To generate debug information without generating code:

Use the COPY command in the linker to copy the segment to the predefined NULL space.
If you copy the segment to the NULL space, the region is still allocated but no data is writ-
ten for it.

COPYmyseg NULL

DEBUG

The

DEBUG

command causes the linker to generate debug information for the debugger.

This option is applicable only if the executable file is IEEE 695.

Syntax

-DEBUG

DEFINE

The

DEFINE

command creates a user-defined public symbol at link time. This command is

used to resolve external references (

XREF

) used in assemble time.

Syntax

DEFINE

=

<symbol name> is the name assigned to the public symbol.

<expression> is the value assigned to the public symbol.

Example

DEFINE copy_size = copy top of data_seg - copy base of data_seg

Refer to the

Linker Expressions

section on page 359 for the format to write an expression.

Note: