7 Code generation for dual-core MCUs (STM32H7 dual-core product lines only) ¶
For working with Arm Cortex-M dual-core products, STM32CubeMX generates code for both cores automatically according to the context assignment and initializer choices made in the user interface (see Section 4.8: Pinout & Configuration view for STM32H7 dual-core products for details).
The code is generated in CM4, CM7 and Common folders. The Common folder holds the system_stm32h7xx.c, that contains the clock tree settings.
When a peripheral or middleware is assigned to both contexts, the function
MX_<name>_init will be generated for both contexts but will be called only from the initializer side.
Generated startup and linker files
Each configuration (_M4 or _M7) of the project shall come with a startup file and a linker file, each suffixed with _M4 or _M7 respectively.
STM32CubeMX supports only one mode of boot for now, where both ARM Cortex-M cores boot at once.
The other boot modes will be introduced later as a project option in the project manager view:
• Arm Cortex-M7 core booting, Arm Cortex-M4 gated
• Arm Cortex-M4 core booting, Arm Cortex-M7 gated
• A first core booting executing from flash, loads the second core code to the SRAM then enables the second core to boot.
STM32CubeMX uses template files delivered with STM32CubeH7 MCU packages as reference.