Last edited one month ago

How to create your board device tree



1. Prerequisites

  • Schema of the board being used,
  • STM32CubeMX installed on the host PC.

2. How to create a board device tree with STM32CubeMX from scratch

2.1. Configuration covered by STM32CubeMX

It is recommended to use STM32CubeMX to create/generate the device tree for a new board.

STM32CubeMX helps to configure:


2.2. Configuration not covered by STM32CubeMX

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

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

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.