Linker Parameter File

Define your RAM or ROM areas in your linker parameter file (refer to the following listing). However, to avoid initializing the memory range during normal startup, declare the EEROM memory as NO_INIT.

Listing: Linker Parameter File


LINK test.abs
NAMES test.o startup.o ansi.lib END

SECTIONS

  MY_RAM = READ_WRITE 0x800 TO 0x801;

  MY_ROM = READ_ONLY  0x810 TO 0xAFF;

  MY_STK = READ_WRITE 0xB00 TO 0xBFF;

  EEPROM = 
NO_INIT    0xD00 TO 0xD01;

PLACEMENT

  DEFAULT_ROM  INTO  MY_ROM;

  DEFAULT_RAM  INTO  MY_RAM;

  SSTACK       INTO  MY_STK;

  EEPROM_DATA  INTO  EEPROM;

END

/* set reset vector to the _Startup function defined in startup code */

VECTOR ADDRESS 0xFFFE _Startup