cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745ZI: About the affect to ITCM after remaping internal flash to address 0x00000000

Rockey
Associate

Hi guys,

When setting option bytes to boot device from internal flash (at 0x0800_0000), the entire Flash memory region is aliased to start at address 0x0000_0000.  But the mapping address of ITCM is starting from 0x0000_0000 to 0x0000_FFFF, so I wanna know whether the ITCM is visible or not to M7 Core in this situation, or how to do for executing code from ITCM.

I have no idea about that, help me, please.

Thank you.

 

5 REPLIES 5
TDK
Guru

The M7 core always sees ITCM at address 0. On the M4, it is remappable, but the M4 can't see ITCM. The entire flash is never remapped to 0.

TDK_0-1703251493212.png

 

If you feel a post has answered your question, please click "Accept as Solution".
FBL
ST Employee

Hello @Rockey 

DTCM and ITCM are connected directly to the CM7 and accessible only by CM7 and MDMA.

To place code in ITCM, you need to locate .text section in your liker script in ITCM region.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Pavel A.
Evangelist III

@Rockey STM32H7 family has a special internal "bootstrap" for starting the firmware, it does not rely on remapping internal flash to 0.

 

@Pavel A.thank you so much.

Does the special internal "bootstrap" you noted  modify the VTOR register, when starting the firmware from internal flash by setting option bytes BCM7 and BOOT_ADD0 (as 0x08000000) ?

Or, as that situation,  where the exception table is located ? 

As direction as below figure, the VTOR value is 0 at reset, so if it doesn't remap internal flash to addr 0,  how does the CM7 access the exception vector table?

Rockey_0-1703467931059.png

 

 

Pavel A.
Evangelist III

Does the special internal "bootstrap" you noted  modify the VTOR register

IIRC no, it does not. Setting VTOR is up to the programmer. The exception table can be located in any memory module. You can place it in ITCM RAM for speedy access or if you want change the handler addresses in runtime.