2020-08-26 10:38 PM
Hi,
I used the STM32CubeIde version 1.4.
Below is the procedure create "stm32mp157c-dk2.dts ":
1) onpen STM32CubeIde
2) Click "File->New->STM32 Project" to create a project "stm32mp157c-dk2"
3)Click "Board Selector" to select board "STM32MP157C-DK2"
4)Configure project name "stm32mp157c-dk2"
5) press "Yes" to "initialize all peripherals with their default Mode"
6)Click "Project->Generate Code" to generate code.
The generated device tree file is different from device tree file in "en.SOURCES-stm32mp1-openstlinux-5-4-dunfell-mp1-20-06-24.tar.xz".
Please advise how i can get the same device tree file.
Can you share me with the "*.ioc" file which generated device tree file in the "en.SOURCES-stm32mp1-openstlinux-5-4-dunfell-mp1-20-06-24.tar.xz".
Thanks,
QiZhang
I
Solved! Go to Solution.
2020-08-27 02:14 AM
Hello @zqizh.1 ,
Actually the device tree file .dts that you find in STM32CubeMX is the same that the one in the Developer Package. They look different because the one in Developer Package includes some .dtsi files which contain what you have in the STM32CubeMX .dts file, but at the end you will have a same .dtb file generated.
If you want to know more about the Device Tree structure, I invite you to read the following wiki article :
https://wiki.st.com/stm32mpu/wiki/STM32MP15_device_tree
Regards,
Armand
2020-08-27 02:14 AM
Hello @zqizh.1 ,
Actually the device tree file .dts that you find in STM32CubeMX is the same that the one in the Developer Package. They look different because the one in Developer Package includes some .dtsi files which contain what you have in the STM32CubeMX .dts file, but at the end you will have a same .dtb file generated.
If you want to know more about the Device Tree structure, I invite you to read the following wiki article :
https://wiki.st.com/stm32mpu/wiki/STM32MP15_device_tree
Regards,
Armand
2020-08-28 01:48 AM
From my experience you cannot take the STM32CubeMX generated file as is and put them in the kernel,tf-a,u-boot source to compile without add some essential configs like :
aliases
PMIC config at i2c section
usb config
SDMMC config
etc... take alook how st done it and add the critical sections and one you need for your project.
and you should carefully config the CLOCKS at STM32CubeMX - the best way is to open a new project with board selector , select the board you have and select "YES" when you asked if initialize all peripherals with their default Mode . it will configure for you the clocks in the right way
from there you can tweak what you need .