cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP15 ECO 5.0.0 makefile.sdk continues to build even with devicetree errors

debugging
Lead

Example for optee:

make -f $PWD/../Makefile.sdk all DEVICETREE=stm32mp157a-board-mx

An  error occurs but it stlll generates message with outpfolder and a message that the output files was completed.

This happens when the device tree is not found it with errors in the device tree. It still generated the bin files in optee/deploy folder letting the user with the impression that everything went fine.

what we would like is to have a makefile just to build for a one board that stops and gives a clear message that something went wrong, with a return value for non zero so that it also can be integrated in a build script.

There was one was to easy check on error by adding > <output>to the make command. it then just shows a the error and stop message.

make -f $PWD/../Makefile.sdk DEVICETREE=stm32mp157a-board-mx all
make[1]: Entering directory '/media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1'
CHK /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../build/stm32mp157a-board-mx/conf.mk
CHK /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../build/stm32mp157a-board-mx/include/generated/conf.h
make[1]: *** No rule to make target 'core/arch/arm/dts/stm32mp157a-board-mx.dts', needed by '/media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../build/stm32mp157a-board-mx/core/arch/arm/dts/stm32mp157a-board-mx.dtb'. Stop.
make[1]: Leaving directory '/media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1'
FIP_DEPLOYDIR_OPTEE=/media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../deploy FIP_DEVICETREE="stm32mp157a-board-mx " FIP_CONFIG="optee" FIP_BL32_CONF="optee" fiptool-stm32mp

fiptool-stm32mp config:
optee:
bl32 config value: optee
devicetree config: stm32mp157a-board-mx

Switch configuration:
FIP_BL31_ENABLE :

Output folders:
FIP_DEPLOYDIR_ROOT : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../../FIP_artifacts
FIP_DEPLOYDIR_FIP : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../../FIP_artifacts/fip
FIP_DEPLOYDIR_TFA : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../../FIP_artifacts/arm-trusted-firmware/bl32
FIP_DEPLOYDIR_BL31 : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../../FIP_artifacts/arm-trusted-firmware/bl31
FIP_DEPLOYDIR_FWCONF: /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../../FIP_artifacts/arm-trusted-firmware/fwconfig
FIP_DEPLOYDIR_OPTEE : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../deploy
FIP_DEPLOYDIR_UBOOT : /media/user/H3D2P1/Tools/STM32MP1/STM_ECO_5.0.0/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../../FIP_artifacts/u-boot

[fiptool] Create fip-stm32mp157a-board-mx-optee.bin fip binary into 'FIP_DEPLOYDIR_FIP' folder...
[fiptool] Done

 

1 ACCEPTED SOLUTION

Accepted Solutions
debugging
Lead

gave up on using make with makefile.sdk .  Use the make commands without it. and the memory error can be fixes by changing the OP-TEE .mk file memory size to 0x2000000. Somehow the ECO 5.0.0. conf.mk file defaults to 1GB (0x40000000) (There is new WIKI and post about this)

 

View solution in original post

4 REPLIES 4
Gregory PLANCHON
ST Employee

Hi,

Your command to compile Optee is wrong, try this one :

make -f $PWD/../Makefile.sdk CFG_EMBED_DTB_SOURCE_FILE=Your_Board all

You can use this wiki page 

Regards,

Grégory

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.

Thank you very much for the pointer. The name for the argument to point tothe device tree for u-boot, optee and TF-A seems all to be different.

The build reports an error: The section iseems correct  (same a u-boot/TF-A) and in CubeMX memory set was to 256x16bit (4Gb)

memory@c0000000 {
device_type = "memory";
reg = <0xc0000000 0x20000000>;

Change to 0x4000000 it passes.

/Developer-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/sources/arm-ostl-linux-gnueabi/optee-os-stm32mp-3.19.0-stm32mp-r1-r0/optee-os-stm32mp-3.19.0-stm32mp-r1/../build/stm32mp157a-board-mx/core/tee.symb_sizes

Wrong CFG_DRAM_SIZE 1024MBytes, in device-tree: 512MBytes

 

 

This command change for the build does not take a way the original issue. Other builds with makefile.sdk' (Tf-A, Optee, U-boot) all don't stop on errors and give the user the impression everything went fine while there were errors. Therefor cannot mark this answer as a solution. The case is very clear in the log above. We stopped using makefile.sdk for trying to build for the custom board and just use the make command for our custom device tree.

debugging
Lead

gave up on using make with makefile.sdk .  Use the make commands without it. and the memory error can be fixes by changing the OP-TEE .mk file memory size to 0x2000000. Somehow the ECO 5.0.0. conf.mk file defaults to 1GB (0x40000000) (There is new WIKI and post about this)