Skip to main content
Associate
December 8, 2025
Solved

STM32MP257F-DK SD card yocto image handling

  • December 8, 2025
  • 3 replies
  • 601 views

Dear community,

 

I've used yocto as my workhorse in the past a lot for other processor manufacturers. Now as I'm happily joining the STM world for linux I'm stuck. Maybe it is a too easy to miss question, but which steps I have to take for putting all the needed images to the sd-card? I have followed the rules to go for using the create_sdcard_from_flashlayout.sh script with FlashLayout_sdcard_stm32mp257f-dk-optee.tsv as the parameter. After that I've used dd to flash the .raw to the designated sdcard but the board does not start at all. From the provided sdcard it starts without any issue.

Where is my mistake?

 

Regards

 

KS

Best answer by KS_LAC

So I've managed to boot it from an SD-Card.

With the commands from: STM32MPU Distribution Package - stm32mpu and 

sudo ./scripts/create_sdcard_from_flashlayout.sh flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp257f-dk-optee.tsv

the resulting FlashLayout_sdcard_stm32mp257f-dk-optee.raw flashed via Win32DiskImager and setting my DK to boot from SD (BOOT1-4 -> "OnOffOffOff") was booting so I can go on with the platform.

The initial setup using almost vanilla yocto as starting point was failing.

3 replies

PatrickF
Technical Moderator
December 9, 2025

Hi @KS_LAC 

I assume you are familiar with this page https://wiki.st.com/stm32mpu/wiki/How_to_populate_the_SD_card_with_dd_command

and this one

https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package

 

Are you sure you correctly compile all the file with right environment setup? no errors ?

Maybe try to build the SD-Card raw image from pre-built Starter Package images.

Could you give more details on the fail ? Is the board red led (the one close to User1 button) flash rapidly ?

If yes, you could have more details using https://wiki.st.com/stm32mpu/wiki/STM32_MPU_ROM_trace_analyzer#On_STM32MP2_series , but probably of low interest as you work on a working HW.

If no red led toggling, then TF-A is loaded/started from SD-Card into SYSRAM, so, please look at UART console thru STLINK USB VCP for more details.

 

Did you try populating the SD-Card using CubeProgrammer ?

 

Regards.

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.NEW ! Sidekick STM32 AI agent, see here
KS_LACAuthor
Associate
December 10, 2025

Hi PatrickF,

 

thx for the quick response. I've read through the wiki and the articles you've mentioned.

 

As me and my team try to move on to ST for evaluation and we have to keep the actual way of using almost vanilla yocto as the base for all other platforms I was starting with the following layerset:

BBLAYERS ?= " \
/home/lacon/yocto/poky/meta \
/home/lacon/yocto/poky/meta-poky \
/home/lacon/yocto/poky/meta-yocto-bsp \
/home/lacon/yocto/meta-openembedded/meta-oe \
/home/lacon/yocto/meta-openembedded/meta-python \
/home/lacon/yocto/meta-openembedded/meta-multimedia \
/home/lacon/yocto/meta-openembedded/meta-networking \
/home/lacon/yocto/meta-openembedded/meta-gnome \
/home/lacon/yocto/meta-openembedded/meta-webserver \
/home/lacon/yocto/meta-st-stm32mp \
/home/lacon/yocto/meta-st-openstlinux \
"

I got some warnings as building for st-image-core.

My build config:

Build Configuration:
BB_VERSION = "2.8.1"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-ostl-linux"
MACHINE = "stm32mp25-disco"
DISTRO = "openstlinux-weston"
DISTRO_VERSION = "5.0.8-snapshot-20251210"
TUNE_FEATURES = "aarch64 crc cortexa35"
TARGET_FPU = ""
DISTRO_CODENAME = "scarthgap"
GCCVERSION = "13.%"
PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
MACHINE_FEATURES = "usbhost usbgadget alsa screen ext2 pci splashscreen watc hdog bluetooth wifi m33copro m0copro optee tpm2 initrd autoresize fip fw -update"
meta
meta-poky
meta-yocto-bsp = "scarthgap:e6bfeed8f3e72c577820e3d01f7d697c4d3fc5d4"
meta-oe
meta-python
meta-multimedia
meta-networking
meta-gnome
meta-webserver = "scarthgap:89a01c3d9ad1f8fce6aeb4dd0e694cfa28d42099"
meta-st-stm32mp = "scarthgap:fae1c3bcad05f338da80e69fc150b8697ad874c5"
meta-st-openstlinux = "scarthgap:14bbb30d00473973a67d85cbb1db8a87aa8afe65"

 

The mentioned red led indication is blinking forever and no output is visible via UART as used by the supplied SD-Card. So I was wondering if the signing may be mandatory and it is missing something there.

 

Also the use of SD-Card is crucial for later mass deployment it customer projects. So flashing via CubeIDE is actually a showstopper.

 

Regards,

 

KS

PatrickF
Technical Moderator
December 10, 2025

Hi @KS_LAC 

Maybe you could give a try flashing SD-Card on target via CubeProgrammer. This might help to identify issues.

I'm not SW nor Yocto expert, but probably some build issues. Did you look into

https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package

Regards

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.NEW ! Sidekick STM32 AI agent, see here
KS_LACAuthorBest answer
Associate
January 22, 2026

So I've managed to boot it from an SD-Card.

With the commands from: STM32MPU Distribution Package - stm32mpu and 

sudo ./scripts/create_sdcard_from_flashlayout.sh flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp257f-dk-optee.tsv

the resulting FlashLayout_sdcard_stm32mp257f-dk-optee.raw flashed via Win32DiskImager and setting my DK to boot from SD (BOOT1-4 -> "OnOffOffOff") was booting so I can go on with the platform.

The initial setup using almost vanilla yocto as starting point was failing.

Associate
February 28, 2026

what's up man, I have been dealing with the same issues. I was trying to flash the sd card manually by following the steps from Digikey's video but couldnt get it to work. Can you please let me know how you did it?

KS_LACAuthor
Associate
March 2, 2026

I don't know the video from Digikey but after downloading the right sources described in the wiki and executing the sudo-command. I've got an image which I've flashed to a sd-card using win32diskimager....

If you tell me where you got stuck maybe I'm able to help.

Regards,

KS