2025-08-28 2:56 AM
I am trying to build a custom Yocto Scarthgap image for a custom STM32MP153CAA3 board.
I have followed the guide at https://wiki.st.com/stm32mpu/index.php/How_to_create_your_own_machine but have several issues.
I have created a configuration in CubeMX 6.15.0 and exported the DTB into my project.
When I try and build I get an error in u-boot
ERROR (phandle_references): /soc/rcc@50000000: Reference to non-existent node or label "clk_hse"
(along with references to other clock nodes)
I do a `devtool modify u-boot-stm32mp` to get at the source code and follow through the DTB
The includes from the u-boot DTB file from CubeMX are:
#include "stm32mp153.dtsi"
#include "stm32mp15xa.dtsi"
#include "stm32mp15xxaa-pinctrl.dtsi"
#include "stm32mp15-m4-srm.dtsi"
#include "stm32mp15-scmi.dtsi"
stm32mp153.dtsi includes stm32mp151.dtsi which references the clocks, which is great.
However the last include, stm32mp15-scmi.dtsi then goes and deletes them all!
/delete-node/ &clk_hse;
/delete-node/ &clk_hsi;
/delete-node/ &clk_lse;
/delete-node/ &clk_lsi;
/delete-node/ &clk_csi;
Is this deliberate or am I missing something here?
Then, if I add the clock values back in (also needed for the Kernel DTBs for the same reason) I can get it to compile, but when I then try and flash the emmc image, it fails
-------------------------------------------------------------------
STM32CubeProgrammer v2.20.0
-------------------------------------------------------------------
Log output file: prog.log
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 0043002C3432510336343935
DFU protocol: 1.1
Board : --
Device ID : 0x0500
Device name : STM32MP15xx
Device type : MPU
Revision ID : --
Device CPU : Cortex-A7
Start Embedded Flashing service
Opening and parsing file: tf-a-stm32mp153a-sm-base-mx-opteemin-programmer-usb_Signed.stm32
Memory Programming ...
File : tf-a-stm32mp153a-sm-base-mx-opteemin-programmer-usb_Signed.stm32
Size : 200.56 KB
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:01.382
RUNNING Program ...
PartID: :0x01
Error: Start operation failed at partition 0x01
Error: TSV flashing service failed
with the last bit of the log file showing
11:51:55:414 File download complete
11:51:55:414 Time elapsed during download operation: 00:00:01.382
11:51:55:414
RUNNING Program ...
11:51:55:414 PartID: :0x01
11:51:55:415 DFU status = 0 : OK
11:51:55:415 DFU state = 5 : dfuDNLOAD-IDLE
11:51:55:415 bwPollTimeout = 1
11:51:55:416 sending a dfu end of download request
11:51:55:416 DFU status = 0 : OK
11:51:55:416 DFU state = 7 : dfuMANIFEST
11:51:55:416 bwPollTimeout = 1
11:52:25:417 libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
11:52:25:417 an error occured after sending a dfu end of download request
11:52:25:417 Status: errUNKNOWN, State: dfuERROR
11:52:25:417
11:52:25:417 Error: Start operation failed at partition 0x01
11:52:25:417 Error: TSV flashing service failed
Again, what am I missing?
2025-09-30 9:05 PM
Any comment from ST engineers about this ?
We are also struggling with the same issues, trying to build software for custom board and it is actually impossible to do so using CubeMX if board is not based on one of the STM32MP1 evaluation boards.
Can someone comment on this ?