1. Prerequisites[edit | edit source]
- Schema of the board being used,
- STM32CubeMX installed on the host PC.
2. How to create a board device tree with STM32CubeMX from scratch[edit | edit source]
2.1. Configuration covered by STM32CubeMX[edit | edit source]
It is recommended to use STM32CubeMX to create/generate the device tree for a new board.
STM32CubeMX helps to configure:
- Clock tree: Search "Clock Configuration view" or "Clock tree" in STM32CubeMX User manual. For more details on clock tree management with the example of ST boards, see How to build a clock tree.
- Boot chain: Search "Boot chain" in STM32CubeMX User manual. For more details on boot chain, see Boot chain overview and more largely Category:Platform boot.
- Peripheral assignments: Search "RIF" for STM32MP2 series and "Run time configuration" for STM32MP1 series in STM32CubeMX User manual. For more details on possible assignments, see Category:Peripherals overview and How to assign an internal peripheral to an execution context.
- IO: Search "Pinout & Configuration view" in STM32CubeMX User manual. For more details on IO management, see all articles of the Category:IOs pin management and more particularly the Overview of GPIO pins page.
2.2. Configuration not covered by STM32CubeMX[edit | edit source]
ST User sections (corresponding to DT bindings not covered previously) should be added manually.
For that, it is possible to:
- Using ST boards projects, generate ST device tree files via STM32CubeMX: refer to STM32CubeMX User manual (Search "Board selector"). Then copy/past and adapt, if needed, the user sections identified between those two banners /* USER CODE BEGIN */ and /* USER CODE END */ (in generated device tree files), in the device tree files.
- Or use OpenSTLinux device tree file located in https://github.com/STMicroelectronics/dt-stm32mp.git, then copy/past and adapt, if needed, the user sections identified between those two banners /* USER CODE BEGIN */ and /* USER CODE END */ in the device tree files.
- Or, for experts, use information provided in articles of the Category:Device tree configuration to customize the device tree for the boards.
3. How to create a board device tree with STM32CubeMX using existing ST boards projects[edit | edit source]
If the board is closed to the existing ST boards, it is possible to generate the device tree corresponding to the STM32MPU boards projects.
For that, refer to STM32CubeMX User manual (Search "Board selector"), and adapt it.
4. How to go further[edit | edit source]
Details explaining the procedure using STM32CubeMX tool are described in STM32 MPUs Community FAQ : How to create a device tree adapted to your design with STM32CubeMx.
More information related to OpenSTlinux BSP software configuration are also available in Category:Platform configuration.