Hello Community,
I'm trying to understand the map file and I have some doubts about how IAR places code in flash (I'm using IAR 5.10.3 with RL78/G13 - R5F100ML).
To make the long story short, the thing I don't understand is why the compiler is using ROMHUGE for code if a huge code model doesn't even exists in the compiler options.
The default linker configuration file indicates to put textf into ROMHUGE therefore it makes sense from the linker point of view to put it there, what I don't understand is why the compiler puts code on textf and not in textf_unit64kp? What is the logic behind the choice of using textf or textf_unit64kp?
In my map file I see only two objects in textf_unit64kp (2041 bytes), while the rest of code is in .text and .textf.
Why is that? Do I have some configuration messed up?
Thank you,
Davide.
Hello,
I do not see why this is an issue, but regarding the 2 sections:
The .textf allocates a section between addresses 0x0_00C0 and 0xE_FFFF in the code flash area (far area).
The .textf_unit64kp allocates a section with the start address set to an even address so that it does not extend across a boundary of 64 Kbytes - 1.
Thank you for the answer,
but I would like to have more details. If I'm right The ROMHUGE region is used to hold objects with size bigger than 64kB, and in my project I don't have such large objects (not that I know at least). The use of ROMHUGE seems to be less efficient with respect to ROMFAR, therefore I'm curious about why IAR prefer to use .textf instead of .textf_unit64kp.
More generally it looks difficult to me to write a single .text object (i.e. a funciton) that is bigger than 64kB, therefore I'm curious about why it ever exists if it is less efficent than using textf_unit64kp. There must be a reason but I cannot find a clear explaination.
I want to remark that this is not actually an issue, I posted it because I want to better understand the logic behind the linker and this because I had linking problems related to ROMHUGE that had not been fully solved (discussed here https://community.renesas.com/tools/iar/f/iar---forum/33819/section-placement-failed-on-rom-huge---r5f100ml). The project now compiles and works, but I did nothing special to fix it (i just changed the optimization level) therefore I want to learn some more detail about the toolchain in order to locate the source of the problem if it happens again.
For details on the IAR compiler, it would be better to ask the IAR support.
Regards
Thank you, I'll contact IAR.