Executing from FLASH_ITCM in STM32F767ZI
Hello,
I am using system workbench and STM32F767ZI. I want do performance optimizations tests for my application. As suggested I went through the online documentation on Using CCM memory. But, I need some further informations.
I read the document AN4667 and about the cases that are considered to test the performance. Among one of those tests
1. I want to execute code from FLASH-ITCM instead of default FLASH-AXI
2. I want to load my data into SRAM1
I believe I have to customize the linker script file for that. But, I do not know how to do that for this test case.
I tried the following
FLASH_ITCM (rx) : ORIGIN = 0x00200000, LENGTH = 2048K
ITCM_RAM (xrw) : ORIGIN = 0x00000000, LENGTH = 16K
DTCM_RAM (rw) : ORIGIN = 0x20000000, LENGTH = 128K
SRAM1 (xrw) : ORIGIN = 0x20020000, LENGTH = 368K
SRAM2 (xrw) : ORIGIN = 0x20070000, LENGTH = 16K
and then I have placed the .data and .bss section in SRAM1
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >SRAM1 AT> FLASH
I believe in this way all my data is going to be placed in SRAM1.
But, I am unaware to how do I execute the code from FLASH-ITCM or ITCM-RAM.
Could you please share your knowledge on this.
Thanking you in advance.
Regards,
Amit Dey