Table of Contents Previous topic Next topic
LINKER->Linker Command Line Options->Specify External Ram Limits (/RAM:)
This option specifies the area of external ram available for relocatable data sections.
The format is:
/RAM:[low address]:[high address]
[low address] and [high address] should be specified in hexadecimal.
(Do not use an 'H' after the hexadecimal numbers).
The default low address is zero and the default high address is 0FFFFH and so the range zero to 0FFFFH will be used if no /RAM option is used.
Multiple /RAM directives can be used to specify discontinuous regions of ram. For example:
tells the linker to use address ranges zero to 07FFFH and 0A000H to 0AFFFH.
The /RAM option is also used to specify switchable ram banks. The ram bank number is appended to the end as follows
/RAM:[low address]:[high address]:[bank number]
Bank number may be between 0 and 255 and should correspond with the bank number used with the SECTION assembler directive.
/RAM:B000:FFFF:0 /RAM:B000:FFFF:1 /RAM:B000:FFFF:2
tells the linker that three ram banks numbered zero, one and two exist each with an address range of 0B000F to 0FFFFH.