Git Product home page Git Product logo

mp157f_breakout's Introduction

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.

mp157f_breakout's People

Contributors

cracked-machine avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

mfkiwl

mp157f_breakout's Issues

"ERROR: SDMMC1 init failed" on boot

Terminal ready
NOTICE:  CPU: STM32MP157FAB Rev.Z
NOTICE:  Model: STM32MP157F Test #1
INFO:    Reset reason (0x15):
INFO:      Power-on Reset (rst_por)
INFO:    Using SDMMC
INFO:      Instance 1
INFO:    Boot used partition fsbl1
ERROR:   stm32_sdmmc2_read: timeout 1s (status = 81000)
INFO:    SDMMC_POWER    = 0x3
INFO:    SDMMC_CLKCR    = 0x34002
INFO:    SDMMC_ARGR     = 0xfffff1
INFO:    SDMMC_CMDR     = 0x146
INFO:    SDMMC_RESPCMDR = 0x6
INFO:    SDMMC_RESP1R   = 0x900
INFO:    SDMMC_RESP2R   = 0x0
INFO:    SDMMC_RESP3R   = 0x0
INFO:    SDMMC_RESP4R   = 0x0
INFO:    SDMMC_DTIMER   = 0xffffffff
INFO:    SDMMC_DLENR    = 0x40
INFO:    SDMMC_DCTRLR   = 0x62
INFO:    SDMMC_DCNTR    = 0x40
INFO:    SDMMC_MASKR    = 0x0
INFO:    SDMMC_ACKTIMER = 0x0
ERROR:   stm32_sdmmc2_send_cmd_req: CTIMEOUT (cmd = 12,status = 804)
WARNING:  CMD12, Retry: 1, Error: -60
ERROR:   stm32_sdmmc2_send_cmd_req: CTIMEOUT (cmd = 12,status = 804)
WARNING:  CMD12, Retry: 2, Error: -60
ERROR:   stm32_sdmmc2_send_cmd_req: CTIMEOUT (cmd = 12,status = 804)
WARNING:  CMD12, Retry: 3, Error: -60
ERROR:   SDMMC1 init failed
PANIC at PC : 0x2ffd5905

Exception mode=0x00000016 at: 0x2ffd5905

STM32CubeIDE OpenSTLinux project DTB compile error: /cpus/cpu@0: Reference to non-existent node or label "vddcore"

| 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"
| 
| ERROR: Input tree has errors, aborting (use -f to force output)
| make[3]: *** [scripts/Makefile.lib:308: arch/arm/dts/stm32mp157f-mp157f_breakout-mx.dtb] Error 2
| make[2]: *** [/home/chris/workspace/STM32MP15-Ecosystem-v2.1.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-11-12/build-openstlinuxeglfs-stm32mp1-breakoutboard/tmp-glibc/work-shared/stm32mp1-breakoutboard/uboot-source/dts/Makefile:38: arch-dtbs] Error 2
| make[1]: *** [/home/chris/workspace/STM32MP15-Ecosystem-v2.1.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-11-12/build-openstlinuxeglfs-stm32mp1-breakoutboard/tmp-glibc/work-shared/stm32mp1-breakoutboard/uboot-source/Makefile:1087: dts/dt.dtb] Error 2
| make[1]: *** Waiting for unfinished jobs....
| make[1]: Leaving directory '/home/chris/workspace/STM32MP15-Ecosystem-v2.1.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-11-12/build-openstlinuxeglfs-stm32mp1-breakoutboard/tmp-glibc/work/stm32mp1_breakoutboard-ostl-linux-gnueabi/u-boot-stm32mp/2020.01.r2-r0/build/stm32mp15_trusted_defconfig'
| make: *** [Makefile:167: sub-make] Error 2
| make: Leaving directory '/home/chris/workspace/STM32MP15-Ecosystem-v2.1.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-11-12/build-openstlinuxeglfs-stm32mp1-breakoutboard/tmp-glibc/work-shared/stm32mp1-breakoutboard/uboot-source'
| WARNING: exit code 1 from a shell command.
| 
ERROR: Task (/home/chris/workspace/STM32MP15-Ecosystem-v2.1.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-11-12/layers/meta-st/meta-st-stm32mp/recipes-bsp/u-boot/u-boot-stm32mp_2020.01.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3093 tasks of which 1 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 8 seconds

Summary: 1 task failed:
  /home/chris/workspace/STM32MP15-Ecosystem-v2.1.0/Distribution-Package/openstlinux-5.4-dunfell-mp1-20-11-12/layers/meta-st/meta-st-stm32mp/recipes-bsp/u-boot/u-boot-stm32mp_2020.01.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.