2023-12-22 03:10 AM
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.
2023-12-22 05:26 AM
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.
2023-12-22 06:01 AM
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.
2023-12-22 12:26 PM
@Rockey STM32H7 family has a special internal "bootstrap" for starting the firmware, it does not rely on remapping internal flash to 0.
2023-12-24 05:38 PM
@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?
2023-12-25 03:26 PM - edited 2023-12-25 03:27 PM
> 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.