Skip to content

STM32CubeIDE project for STM32MP1 and openstlinux-5.4-dunfell-mp1-20-11-12. Generates device tree source files (.dts) and compiles the device tree binary files (.dtb).

Notifications You must be signed in to change notification settings

cracked-machine/mp157f_breakout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STM32CubeIDE mp157f_breakout project

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.

Directory Structure

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"

Project Setup

To compile the source file dts into a binary dtb you must setup the IDE project:

  1. Import this .ioc project file into STM32CubeIDE. (File New > Import from an existing ioc project)

  2. Then right click the CA7 sub project and import an OpenSTLinux project for linux-5.4.31 [ref].

  3. 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.

About

STM32CubeIDE project for STM32MP1 and openstlinux-5.4-dunfell-mp1-20-11-12. Generates device tree source files (.dts) and compiles the device tree binary files (.dtb).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published