1. Prerequisites[edit | edit source]
- Schema of your board is available,
- STM32CubeMX is installed on your PC host.
2. How to create your board device tree with STM32CubeMX from scratch[edit | edit source]
2.1. Configuration covered by STM32CubeMX[edit | edit source]
It is highly recommended to use STM32CubeMX to create/generate the device tree for new board.
STM32CubeMX will help you 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 , you can also visit How to build a clock tree.
- Boot chain : Search "Boot chain" in STM32CubeMX User manual. For more details on boot chain, you can also visit 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, you can also visit 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, you can also visit 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 you can :
- 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 2 banners /* USER CODE BEGIN */ and /* USER CODE END */ (in generated device tree files), in your own 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 2 banners /* USER CODE BEGIN */ and /* USER CODE END */ in your own device tree files.
- or, for experts, use information provided in articles of the Category:Device tree configuration to customize the device tree for your boards.
3. How to create your board device tree with STM32CubeMX using existing ST boards projects[edit | edit source]
If your board is closed to the existing ST boards, you can 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.