cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157-DK2 Conversion of DTS to DTB Problem

YErzu.1
Associate

Hi,

I created a project in Cube-IDE . It is a simple PWM timer Project which planned to be run on A7 processor of the STM32MP1 . I established configurations in Cube-MX and generated the code into the Cube IDE. After that, I moved the .dts file which is in the kernel of the CubeIDE project into the linux kernel arch/arm/boot/dts directory. I am following this video which is a simple PWM timer project(ww.youtube.com/watch?v=XhB0rGLjl_Q&list=PLnMKNibPkDnFeV4sBarnsAtFTg7h6V-9_&index=9). However, in this video conversion of dts to dtb is not shown. The board is booted with a pre-ready .dtb file. I am trying to use the "make dtbs" command it won't work. "No rule to make target. I am also creating an another "build directory" which is located on the arch/arm/boot/build .(Another than the kernel source directory.) Should I copy the .dts file of the project into this build directory? and compile dts to dtb in this directory? And what about the Makefile ? Should I also copy this to that directory?

My questions might feel confusing. But I will reply it quickly if you find any unclear part.

Reference links:

wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package#Modifying_the_Linux_kernel_device_tree

ww.youtube.com/watch?v=XhB0rGLjl_Q&list=PLnMKNibPkDnFeV4sBarnsAtFTg7h6V-9_&index=10

2 REPLIES 2
OlivierK
ST Employee

Hi YErzu.1 (Community Member) 

Your problem doesn't seem related to the PWM timer but in your Developper package setup.

Did you follow this first:

https://wiki.st.com/stm32mpu/wiki/Cross-compile_with_OpenSTLinux_SDK ?

Rgds,

Olivier

YErzu.1
Associate

Hi OlivierK,

Thank you for your response. First of all I think the SDK is installed correctly. Because I do not get any errors when I try to:

  • source <SDK installation directory>/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
  •  echo $CROSS_COMPILE
  • $CC --version
  • echo $OECORE_SDK_VERSION

I also installed the OpenST Linux BSP packages.

My question is: Do I have to move the stm32mp157-dk2_timer-a7-mx.dts file into the directory of arch/arm/boot/dts. In Which directory I must do the conversion? Do I have to use "make dtbs" or can I use the dtc command for this purpose?. I get error when I use the dtc as "failed to parse input tree".

My second question is : In Cube IDE I created this project as linux user application. I did not write any code in my "main.c". I aimed to use this as a dummy project for just building it. Since Cube IDE only allows you to build the project when you right click CM4 .However it is not allowed to build when you right click to CA7.

I know that I have a lot of questions. I am very new to Embedded Linux. I'd appreciate any kind of help from ST Employees and Community users. Thank you.

Sincerely