This the STM32CubeIDE project for generating device tree source files (.dts) and compiling the device tree binary files (.dtb).
Note that this repo only contains the STM32CubeIDE project file (.ioc) and the generated device tree source files.
mp157f_breakout/CA7/ └── DeviceTree └── mp157f_breakout ├── kernel │ └── stm32mp157f-mp157f_breakout-mx.dts ├── tf-a │ ├── stm32mp157f-mp157f_breakout-mx.dts │ └── stm32mp15-mx.dtsi └── u-boot ├── stm32mp157f-mp157f_breakout-mx.dts ├── stm32mp157f-mp157f_breakout-mx.dts.bak ├── stm32mp157f-mp157f_breakout-mx-u-boot.dtsi └── stm32mp15-mx.dtsi
The top level folder should be the target of the mp157_breakout
symbolic link used in the meta-breakoutboard-layer repo.
The stm32mp1-breakoutboard.conf file in the meta-breakoutboard-layer repo should reference the generic .dts filenames used here. e.g. tm32mp157f-mp157f_breakout-mx
as well as the relative path of these dts files (including the mx
directory):
# CubeMX Project Config
# =========================================================================
# Assign CubeMX Board devicetree and project path name
CUBEMX_DTB = "stm32mp157f-mp157f_breakout-mx"
CUBEMX_PROJECT = "mx/mp157_breakout/CA7/DeviceTree/mp157f_breakout"
You can check the build output from Bitbake to check that the dtb file is being used. Especially when you get an error ;)
| arch/arm/dts/stm32mp157f-mp157f_breakout-mx.dtb: ERROR (phandle_references): /cpus/cpu@0: Reference to non-existent node or label "vddcore"
|
| arch/arm/dts/stm32mp157f-mp157f_breakout-mx.dtb: ERROR (phandle_references): /cpus/cpu@1: Reference to non-existent node or label "vddcore"
|
| arch/arm/dts/stm32mp157f-mp157f_breakout-mx.dtb: ERROR (phandle_references): /soc/sdmmc@58005000: Reference to non-existent node or label "v3v3"
To compile the source file dts into a binary dtb you must setup the IDE project:
- Import this .ioc project file into STM32CubeIDE. (File New > Import from an existing ioc project)
- Then right click the CA7 sub project and import an OpenSTLinux project for linux-5.4.31 [ref].
- There should be a dtb build target under the linux-5.4.31 sub project that references the parent project. Right click and build on the DTB target:
dtb (stm32mp157f-mp157f_breakout-mx.dtb)
We haven't made any changes to the linux kernel so you don't need to rebuild all..rebuilding the entire linux kernel will take forever.