-base


< Compile Options / Microcontroller Options >

[Format]

-base = { rom=<register>
        | ram=<register>
        | <address value> = <register>}
                            <register>:= {R8 to R13}

[Description]

-

This option specifies the general register used as a fixed base address throughout the program.

-

When base=rom=<register A> is specified, accesses to const variables are performed relative to the specified register A. Note, however, that the difference between the address closest to 0 and the address closest to 0xFFFFFFFF is within the range from 64 Kbytes to 256 Kbytes*1 in the constant area section.
The constant area section includes the sections (before renamed) shown below;
C_1, C_2, C, C$VECT, C$INIT, C$VTBL, W, W_1, W_2, L

-

When base=ram=<register B> is specified, accesses to initialized variables and uninitialized variables are performed relative to the specified register B. Note, however, that the difference between the address closest to 0 and the address closest to 0xFFFFFFFF is within the range from 64 Kbytes to 256 Kbytes*1 in the RAM data area section.
The RAM data area section includes the sections (before renamed) shown below;
D_1, D_2, D, B, B_1, B_2

-

When <address value>=<register C> is specified, accesses to an area within 64Kbytes to 256 bytes from the address value, among the areas whose addresses are already determined at the time of compilation, are performed relative to the specified register C.

Note

*1) This value is in the range from 64 to 256 Kbytes and depends on the total size of variables to be accessed.

 

[Remarks]

-

The same register cannot be specified for different areas.

-

Only a single register can be specified for each area. If a register specified by the fint_register option is specified by this option, an error will occur.

-

When the pid option is selected, base=rom=<register> cannot be selected. If selected, message W0523039 is output as a warning and the selection of base=rom=<register> is disabled.