Reserve ROM area in linker


i'm using RX66T on a e2studio Version: 2022-04 (22.4.0) with CC-RX compiler

is there a way to reserve a certain area of ​​the ROM so that the linker does not insert any variables to the addresses in the range?

Parents Reply Children
  • if I try to create an asm file and insert your code the linker reports me this error:

    W0561323:Section attribute mismatch : "B"
    W0561322:Section alignment mismatch : "B"
    W0561121:Address cannot be assigned to absolute section "B" in start option
    E0562321:Section "B" overlaps section "B_1"

    not sure if B is the correct section and the address (02000H) seems to me a RAM address

    these are my sections:

    I want to reserve the addresses: 0xFFF81000 and 0xFFF81001 so that no constants or functions are allocated to these addresses.

    I want to not even assign a dummy value to these addresses, so as not to have this dummy value in the .mot file

  • If you already start your section at 0xFFF80010, as far as this project is concern, 0xFFF80000~0xFFF8000F doesn't exist.  Isn't this what you want?

    You choose the start of ROM.  If you want to make a middle section disappear, 

    ROM = 0xFFF80000 - 0xFFF8FFFF

    ROM2=0xFFF90010 - 0xFFFFFFFF

    use cpu = stride so the middle section is un-assigned.

    From ccrx manual

    .section C, ROMDATA     B is for RAM. C=constant.

  • true, by setting the starting address of PResetPRG to 0xFFF80010 in the 0xFFF80000-0xFFF8000F section, nothing is inserted.

    as for the exclusion of a central section, thanks to "CS YEP" suggestion I found a quick way to do the operation:

    suppose you want to exclude section 0xfff80100-0xfff801ff:

    I do a build of the project with default settings.
    in the console I copy the command line, in particular the parameter -CPU = ...

    in Project - C/C++ Project settings - Linker - Section - Advanced

    Memory address type assignment method: select "User specify"

    Press ADD

    paste the previously copied string, for example:


    changing the lastest ROM address as needed: 


    notice the change of ROM=fff80000-ffffffff into ROM=fff80000-fff800ff,ROM=fff80200-ffffffff