cancel
Showing results for 
Search instead for 
Did you mean: 

Device Tree Files

Gencay
Associate III

Do we need to compile CUBEMX dts files before bitbake or we need to convert them into the dtb files with eclipse like in this ST video and what is the best way to go from discovery board to custom board in the means of creating device tree files for peripherals and all. I need some guidance.

1 ACCEPTED SOLUTION

Accepted Solutions
Kevin HUBER
ST Employee

Hello @Gencay​ ,

In this community post, you have the explanation of how to use the DTS files generated by CubeMX in your distribution package:

https://community.st.com/s/question/0D53W00001gW1WrSAK/after-devtool-modify-i-can-not-found-my-kernel-device-tree-in-workspace

The explanation is also available on the wiki:

https://wiki.st.com/stm32mpu/wiki/How_to_create_your_own_machine#Edit_the_new_machine_file-_stm32mp1--3CProjectName-3E-conf

and in the page: https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Distribution_Package

Hope it helps :)

Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Kevin HUBER
ST Employee

Hello @Gencay​ ,

In this community post, you have the explanation of how to use the DTS files generated by CubeMX in your distribution package:

https://community.st.com/s/question/0D53W00001gW1WrSAK/after-devtool-modify-i-can-not-found-my-kernel-device-tree-in-workspace

The explanation is also available on the wiki:

https://wiki.st.com/stm32mpu/wiki/How_to_create_your_own_machine#Edit_the_new_machine_file-_stm32mp1--3CProjectName-3E-conf

and in the page: https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Distribution_Package

Hope it helps :)

Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

I was following this How to Create Your Board Device Tree I did everything all the way to the section 2.2 then I jumped to this how to create your own machine. At the end when I try to compile with st-image-weston following error occurs.

NOTE: Executing Tasks
ERROR: tf-a-stm32mp-v2.6-stm32mp-r1-r0 do_compile: oe_runmake failed
ERROR: tf-a-stm32mp-v2.6-stm32mp-r1-r0 do_compile: ExecutionError('/home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/temp/run.do_compile.2843409', 1, None, None)
ERROR: Logfile of failure stored in: /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/temp/log.do_compile.2843409
Log data follows:
| DEBUG: Executing python function check_cubemxdtb_exist
| DEBUG: Python function check_cubemxdtb_exist finished
| DEBUG: Executing shell function do_compile
| NOTE: make -j 12 PLAT=stm32mp1 ARCH=aarch32 ARM_ARCH_MAJOR=7 CROSS_COMPILE=arm-ostl-linux-gnueabi- DEBUG=1 LOG_LEVEL=40 -C /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/git BUILD_PLAT=/home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/build/trusted-stm32mp15 DTB_FILE_NAME=stm32mp157f-test-mx.dtb AARCH32_SP=sp_min STM32MP15=1 bl32 dtbs
| make: Entering directory '/home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work-shared/stm32mp1-test/tfa-source'
| Including bl32/sp_min/sp_min.mk
|   CPP     fdts/stm32mp157f-test-mx-fw-config.dts
|   CPP     /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/build/trusted-stm32mp15/fdts/stm32mp157f-test-mx-bl2.dts
|   CPP     /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/build/trusted-stm32mp15/fdts/stm32mp157f-test-mx-bl32.dts
|   DTC     fdts/stm32mp157f-test-mx-fw-config.dts
| Error: /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/build/trusted-stm32mp15/fdts/stm32mp157f-test-mx-fw-config.pre.dts:0.0 syntax error
| FATAL ERROR: Unable to parse input tree
| make: *** [Makefile:1310: /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/build/trusted-stm32mp15/fdts/stm32mp157f-test-mx-fw-config.dtb] Error 1
| make: *** Waiting for unfinished jobs....
|   DTC     /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/build/trusted-stm32mp15/fdts/stm32mp157f-test-mx-bl2.dts
|   DTC     /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/build/trusted-stm32mp15/fdts/stm32mp157f-test-mx-bl32.dts
| /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/build/trusted-stm32mp15/fdts/stm32mp157f-test-mx-bl2.pre.dts:29.3-26: Warning (interrupts_property): /soc/i2c@40013000:#interrupt-cells: size is (28), expected multiple of 12
| /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work/stm32mp1_test-ostl-linux-gnueabi/tf-a-stm32mp/v2.6-stm32mp-r1-r0/build/trusted-stm32mp15/fdts/stm32mp157f-test-mx-bl32.pre.dts:29.3-26: Warning (interrupts_property): /soc/i2c@40013000:#interrupt-cells: size is (28), expected multiple of 12
| make: Leaving directory '/home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/build-openstlinuxweston-stm32mp1-test/tmp-glibc/work-shared/stm32mp1-test/tfa-source'
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/layers/meta-st/meta-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_2.6.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4230 tasks of which 4208 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 3 seconds
 
Summary: 1 task failed:
  /home/gencay/STM32MPU_workspace/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/layers/meta-st/meta-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_2.6.bb:do_compile
Summary: There were 2 ERROR messages, returning a non-zero exit code.

I only altered stm32mp1-test-mx.dts with following lines between root user code begin and end parts:

aliases {
		serial2 = &uart5;
	};
 
	chosen {
		stdout-path = "serial2:115200n8";
	};

What can be the problem here? My machine.conf file is attached.

KPepa.1
Associate

Hi,

I am getting this exact same error. Did you end up finding a solution for it?

Some help would be greatly appreciated!

Thank you!