Motorola HC12 User Manual

Page of 328
Operating Procedures
Working with Relocatable Sections
MCUez HC12 Assembler
User’s Manual
MOTOROLA
Operating Procedures
223
The minimal linker parameter file will look like this:
LINK test.abs /* Name of the executable file generated. */
NAMES
  test.o
/* Name of the object files in the application. */
END
SEGMENTS
/* READ_ONLY memory area.  */
  MY_ROM  = READ_ONLY  0x0B00 TO 0x0BFF;
/* READ_WRITE memory area. */
  MY_RAM  = READ_WRITE 0x0800 TO 0x08FF;
END
PLACEMENT
/* Relocatable variable sections are allocated in MY_RAM. */
  DEFAULT_RAM    INTO MY_RAM;
/* Relocatable code and constant sections are allocated in MY_ROM. */
  DEFAULT_ROM    INTO MY_ROM;
END
INIT entry
/*  Application entry point. */
VECTOR ADDRESS 0xFFFE entry /* Initialization of the reset vector. */
NOTE:
The programmer should ensure that the memory ranges specified in the
SEGMENT block are valid addresses for the MCU being used.
The module fibo.asm located in the demo directory is a small example of using
the relocatable sections in an application.