So, the final question is - why I can not allocate the data in the section?
__attribute__((section("NonCacheable,\"aw\",%nobits @"))) static uint32_t s_frameBuffer[2][1280][720] __attribute__((aligned(64)))
Why I get
MIMXRT1166_EVK_CM4.axf section `NonCacheable' will not fit in region `SRAM_DTC_cm4' MIMXRT1166_EVK_CM4 C/C++ Problem
region `SRAM_DTC_cm4' overflowed by 7299032 bytes MIMXRT1166_EVK_CM4 C/C++ Problem
Well...I looked at the example project. The generated linker file looks like
/* BSS section for NCACHE_REGION */
.bss_RAM2 : ALIGN(4)
{
PROVIDE(__start_bss_RAM2 = .) ;
PROVIDE(__start_bss_NCACHE_REGION = .) ;
*(NonCacheable)
*(.bss.$RAM2)
*(.bss.$NCACHE_REGION)
*(.bss.$RAM2.*)
*(.bss.$NCACHE_REGION.*)
. = ALIGN (. != 0 ? 4 : 1) ; /* avoid empty segment */
PROVIDE(__end_bss_RAM2 = .) ;
PROVIDE(__end_bss_NCACHE_REGION = .) ;
} > NCACHE_REGION AT> NCACHE_REGION
My one
/* BSS section for SRAM_ITC_cm4 */
.bss_RAM2 : ALIGN(4)
{
PROVIDE(__start_bss_RAM2 = .) ;
PROVIDE(__start_bss_SRAM_ITC_cm4 = .) ;
*(.bss.$RAM2)
*(.bss.$SRAM_ITC_cm4)
*(.bss.$RAM2.*)
*(.bss.$SRAM_ITC_cm4.*)
. = ALIGN (. != 0 ? 4 : 1) ; /* avoid empty segment */
PROVIDE(__end_bss_RAM2 = .) ;
PROVIDE(__end_bss_SRAM_ITC_cm4 = .) ;
} > SRAM_ITC_cm4 AT> SRAM_ITC_cm4
Where in the code I tie NonCacheable to NCACHE_REGION ?