beautypg.com

Zilog EZ80F916 User Manual

Page 286

background image

UM014423-0607

Using the Linker/Locator

ZiLOG Developer Studio II

eZ80Acclaim!

®

User Manual

266

DEFINE __len_data = length of DATA

/* BSS segment initialization */
DEFINE __low_bss = base of BSS
DEFINE __len_bss = length of BSS

/* Copy code to RAM */
DEFINE __low_romcode = copy base of CODE
DEFINE __low_code = base of CODE
DEFINE __len_code = length of CODE

Directives for the All RAM Configuration
Apart from the common directives, the following needs to be added for this configuration:

/* Stack pointer initialization */
DEFINE __stack = highaddr of MEMORY + 1

/* Required for malloc() and free() */
DEFINE __heaptop = highaddr of MEMORY
DEFINE __heapbot = top of MEMORY + 1

/* This is set to 1 only for Copy To RAM configuration */
DEFINE __copy_code_to_ram = 0

Directives for the Standard Configuration
Apart from the common directives, the following needs to be added for this configuration:

/* Renaming STRSECT as ROM to place it in ROM – default is RAM */
CHANGE STRSECT is ROM

/* Stack pointer initialization */
DEFINE __stack = highaddr of RAM + 1

/* Required for malloc() and free() */
DEFINE __heaptop = highaddr of RAM
DEFINE __heapbot = top of RAM + 1

/* This is set to 1 only for Copy To RAM configuration */
DEFINE __copy_code_to_ram = 0

Directives for the Copy to RAM Configuration
Apart from the common directives, the following needs to be added for this configuration:

/* Binding CODE, STRSECT segments in RAM */
CHANGE CODE is RAM
CHANGE STRSECT is CODE

/* CODE copy at ROM */

This manual is related to the following products: