Linking an application containing absolute sections

When the Assembler is generating an object file, applications containing only absolute sections must be linked. The linker parameter file must contain at least:

The minimal linker parameter file will look as shown in the following listing:.

Listing: Minimal linker parameter file

LINK test.abs  /* Name of the executable file generated.      */
NAMES

  test.o       /* Name of the object file in the application. */

END

SECTIONS

/* 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  0x4000 TO 0x4FFF;

/* 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: There should be no overlap between the absolute sections defined in the assembly source file and the memory areas defined in the PRM file.
Note: As the memory areas (segments) specified in the PRM file are only used to allocate relocatable sections, nothing will be allocated there when the application contains only absolute sections. In that case you can even specify invalid address ranges in the PRM file.