Allocating a Segment in Specific Memory

In the PRM file, you can specify where to allocate each segment defined in your source code. To place a segment in a specific memory area, add the segment name in the PLACEMENT block of your PRM file. Remember the linker is case-sensitive; ensure that your segment name is exact, as shown in the following listing.

Listing: Allocating a Segment in Specific Memory


LINK  test.abs
NAMES test.o ... END

SECTIONS

  INTERRUPT_ROM = READ_ONLY   0x4000 TO  0x5FFF;

  MY_RAM        = READ_WRITE  ....

PLACEMENT

  Int_Function               INTO INTERRUPT_ROM;

  DEFAULT_RAM                INTO MY_RAM;

  ....

END