Hi NXP Team,
I am working on an S32K311 project using the following environment:
MCU: S32K311
IDE: S32 Design Studio 3.6.7
RTD: S32K3_RTD_5.0.0_D2408_ASR_REL_4_7_REV_0000_20241002
AUTOSAR: 4.7
Initially, the project was building successfully.
As the project progressed, I enabled and configured several RTD drivers, including ADC, eMIOS, LCU, ICU, PIT, PORT, LPUART, LPSPI, TRGMUX, MCL, and other required peripherals for my application.
After integrating these drivers, the project now fails during the linking stage with the following errors:
.non_cacheable_bss will not fit in region 'int_sram_no_cacheable' section .int_results overlaps section .non_cacheable_bss region 'int_sram_no_cacheable' overflowed by 440 bytes collect2.exe: error: ld returned 1 exit status
The default linker script contains the following SRAM regions:
int_sram : ORIGIN = 0x20400000, LENGTH = 0x00003F00 int_sram_fls_rsv : ORIGIN = 0x20403F00, LENGTH = 0x00000100 int_sram_no_cacheable : ORIGIN = 0x20404000, LENGTH = 0x00003B00 int_sram_results : ORIGIN = 0x20407B00, LENGTH = 0x00000100 int_sram_shareable : ORIGIN = 0x20407C00, LENGTH = 0x00000400
The linker reports that the .non_cacheable_bss section exceeds the allocated int_sram_no_cacheable region by approximately 440 bytes.
Is this memory usage expected when multiple RTD drivers are enabled on the S32K311?
Is there a recommended method to reduce the size of .non_cacheable_bss?
Is it recommended to modify the linker script and increase the int_sram_no_cacheable region? If so, what is the recommended memory layout for the S32K311?
Are there any RTD configuration options that can reduce the memory allocated to non-cacheable sections?
Has anyone encountered a similar issue when integrating multiple RTD peripherals?
Any guidance or recommended solution would be greatly appreciated.
Thank you.
Hi @Esakki
You may find the following discussion threads helpful, as they discuss similar issues and provide some useful troubleshooting suggestions.
Additionally, there is an S32K3 application note that explains the linker file and startup code in more detail, including how memory regions can be modified and customized.
AN14893: S32K3xx Linker File and Startup Code
This last thread includes some suggestions related to code optimization techniques.
S32K3xx How to optimization APP code for get more high performance
BR, VaneB