Skip to content

ARC linker script: application overflows the ICCM #55267

@jacoba-at

Description

@jacoba-at

Hi,
I'm in the progress of migrating our code base from Zephyr v2.7.4 to v3.3.0. We are using the GNU toolchain from SDK 0.15.
I noticed that when I build our app, the map file shows that the 'datas' section exceeds the size of the ICCM. This did not happen when I built the same app in 2.7.4.
I see in the map file that this happens because the linker creates a fill area at the end of the rodata section, which causes  __rodata_region_end to point to the end of the ICCM.
The LOADADDR of the datas section is right after this, leaving no space to the datas section in the ICCM. This leads me to lose a lot of valuable ICCM area and it is critical for us as it is our ICCM ROM.
Was there any padding or alignment that was added between these versions that causes this issue?
How can I overcome this?

I think the offending line is include/zephyr/arch/arc/v2/linker.ld:140:
           MPU_ALIGN(ABSOLUTE(.) - __rom_region_start);

Once I remove it the build passes.
What do you guys think?

Metadata

Metadata

Labels

area: ARCARC ArchitecturebugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions