7 Code generation for dual-core MCUs (STM32H7 dual-core product lines only) ¶
Figure 578. Preprocessor define statements in EWARM IDE ¶
Code generation for dual-core MCUs (STM32H7 dual-core product lines only)
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).
Figure 579. Code generation for STM32H7 dual-core devices ¶
Generated initialization code ¶
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.
Code generation for dual-core MCUs (STM32H7 dual-core product lines only)
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.
Figure 580. Startup and linker files for STM32H7 dual-core devices ¶
Generated boot mode code ¶
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