Question
STM32F767 DTCM cache - static variables
Hello,
i have enabled D-cache and I-cache and im trying to place static variables into D-cache:
__attribute__((section(".dtcmram"))) __attribute__((aligned(32))) static float32_t FFTOutput_average[MAX_FFT_PRINT_SIZE] = {0};
I updated linker script as follows:
/*RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K*/
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 16K
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM (xrw) : ORIGIN = 0x20020000, LENGTH = 384K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
SDRAM0 (rwx) : ORIGIN = 0x60000000, LENGTH = 2048K
SDRAM1 (rwx) : ORIGIN = 0x60200000, LENGTH = 2048K
SDRAM2 (rwx) : ORIGIN = 0x60400000, LENGTH = 2048K
SDRAM3 (rwx) : ORIGIN = 0x60600000, LENGTH = 2048K
...
.dtcmram (NOLOAD) :
{
. = ALIGN(4);
*(.dtcmram)
*(.dtcmram*)
} >DTCMRAM
.itcmram :
{
. = ALIGN(4);
*(.itcmram .itcmram.*)
} > ITCMRAM
but the linker still places static variable into RAM region. I think the problem is in .bss which is located in RAM section but i dont know how to add it into DTCMRAM.
