Motorola HC12 User Manual

Page of 328
User’s Manual
MCUez HC12 Assembler
220
Operating Procedures
MOTOROLA
Operating Procedures
 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. There should be no overlap between this memory
area and the absolute sections defined in the assembly source file. */
  MY_ROM  = READ_ONLY  0x1000 TO 0x1FFF;
/* READ_WRITE memory area. There should be no overlap between this memory
area and the absolute sections defined in the assembly source file. */
  MY_RAM  = READ_WRITE 0x2000 TO 0x2FFF;
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:
Allow no overlap between the absolute section defined in the assembly source
file and the memory area defined in the PRM file.
NOTE:
Since the memory areas (segments) specified in the PRM file are used only to
allocate relocatable sections, nothing will be allocated there if the application
contains only absolute sections.
The module fiboorg.asm located in the demo directory is a small example of
using absolute sections in an application.