2024-07-03 08:19 PM
I created a project using the default port assignments for the STM32MP157D-DK1 board in STM32CubeIDE v1.16 and was able to build it successfully. Following the example of the STM32MP157 Workshop videos I used Device Tree Compiler to create .dtb files from the .dts/.dtsi files, however I got the same syntax error for the kernel, optee-os,tf-a and u-boot .dts files:
$ dtc -I dts -O dtb -p stm32mp157d-240702_stm32mp157-dk1-mx.dtb stm32mp157d-240702_stm32mp157-dk1-mx.dts Error: stm32mp157d-240702_stm32mp157-dk1-mx.dts:13.1-9 syntax error FATAL ERROR: Unable to parse input tree
However the videos do not go into how to use Device Tree Compiler to create the .dtb files
Looking at one of the .dts files starting at line 13:
#include <dt-bindings/pinctrl/stm32-pinfunc.h> #include "stm32mp157.dtsi" #include "stm32mp15xd.dtsi" #include "stm32mp15xxac-pinctrl.dtsi" #include "stm32mp15-m4-srm.dtsi" /* USER CODE BEGIN includes */ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/mfd/st,stpmic1.h> #include "stm32mp157a-dk1-scmi.dtsi" /* USER CODE END includes */
I speculate that the issue is that Device Tree Compiler can't find the paths to the files specified by the #include statements. How should I be doing the compilation please?
Also I will be using the .dts files in a Buildroot project using BR2_LINUX_KERNEL_CUSTOM_DTS_PATH and BR2_TARGET_UBOOT_CUSTOM_DTS_PATH etc. How should the files referenced by the #include statements be incorporated into the build structure please?
Kind regards,
Al
2024-07-05 02:10 AM
Hi @alw ,
Can you please confirm you are using new DV5.1 release on OpenSTLinux side.
CubeIDE 1.16 generate DTS compatible with this version
Olivier
2024-07-08 07:49 PM