Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


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

} >SRAM1 AT> FLASH


Fields of this means:

SRAM1 means that this section (in this case data). will be located in SRAM1 memory region.
FLASH means that this section will be loaded into FLASH memory region.

Startup will (must) copy this section from flash to SRAM1.

To place CODE into ITCM flash is enought to add new memory region and locate .text into this region. load region depend on if your programing tool can program itcm region.

Hello tadzik85,

as ITCM interface does not have write access so loading via itcm interface is not possible.

But, according to your solution when i do as follows my application does not run.

FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
FLASH_ITCM (rx) : ORIGIN = 0x00200000, LENGTH = 2048K

.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)

KEEP (*(.init))
KEEP (*(.fini))

. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */

} >FLASH_ITCM AT> FLASH


Do i have to locate .isr_vector as well in the FLASH_ITCM?


Hello tadzik85,

as ITCM interface does not have write access so loading via itcm interface is not possible.

But, according to your solution when i do as follows my application does not run.

FLASH (rx)  : ORIGIN = 0x08000000, LENGTH = 2048K
FLASH_ITCM (rx) : ORIGIN = 0x00200000, LENGTH = 2048K

.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)

KEEP (*(.init))
KEEP (*(.fini))

. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */

} >FLASH_ITCM AT> FLASH


Do i have to locate .isr_vector as well in the FLASH_ITCM?


Keil, STLink Utility suuport loading in ITCM region (probably thay converts adresses).


Yes ISR vectors also you need to place in ITCM but then you need to switch boot section in option bytes.

} >FLASH_ITCM AT> FLASH
This way is the most corect.


Check also ro_data sections.

Can you please eleborate what you meant by ‘switch boot section in option bytes’.

Also, do u mean that i need to do the following even for the ro_section.

} >FLASH_ITCM AT> FLASH