2026-03-05 4:22 PM - edited 2026-03-05 4:38 PM
Following the guide for the Developer Package, it describes creating a helper script for your custom board. Thhat works great and helps get you going.
So, I generated a STM32CubeMX project and built it. Device Tree files are generated accordingly. STM32CubeMX gives them names of the format <device>-<stm32cubemx proj name>-mx. These names cannot be changed as the dts files include each other.
The helper script lets you set names for all these files e.g.
# Name of devicetree to use
# Optee dt name
optee_dt_name=$your_board_name
optee_dt_programmer_name=$your_board_name
# U-boot dt name
uboot_defconfig=${your_soc_name}_defconfig
uboot_dt_name=$your_board_name
uboot_programmer_dt_name=$your_board_name
# TF-A dt name
tfa_dt_name=$your_board_name
tfa_dt_programmer_name=$your_board_name
# Linux kernel dt name
# linux
linux_dtb_name=$your_board_nameBy default, these do not match the names generated by stm32cubemx. Even if I change the entries to match STM32CubeMX generated names, the scripts still just look for a hard coded value of $your_board_name.dts etc. Looking at the scripts, I cannot see optee_dt_name used anywhere. The scripts just call make with the paths, but not file names.
I cant see a way to make STM32CubeMX change the generated device tree file names.
Renaming the dts files allows the scripts to find them, but then get include errors.
Is this a mistake in my understanding, or in the helper scripts?
Edit: A workaround is to set your board name to match the STM32CubeMX generated dts files e.g. "stm32mp215f-mycubemxprojname-mx". A bit nasty though as really want your own nice board name here!
2026-03-15 4:38 PM
OK, so I resolved this by editing the file sdk_action-common-for-stm32mp2-mx.source.
Change in four places:
EXTDT_DIR_OPTEE=${externaldt_optee_path}
to:
EXTDT_DIR_OPTEE=${externaldt_optee_path} EXTDT_DIR_OPTEE_SERIAL=${externaldt_optee_path}
and change in four places:
EXTDT_DIR_UBOOT=${externaldt_uboot_path}
to:
EXTDT_DIR_UBOOT=${externaldt_uboot_path} EXTDT_DIR_UBOOT_SERIAL=${externaldt_uboot_path}
I hope this was the correct way to resolve this issue. Be good to get some feedback from someone who better understands the SDK and build process in general. Maybe this is a fix that needs adding to the helper scripts.