2025-06-09 2:10 AM
I want to use a different SD Card than the one provided with the STM32MP257DK board. I complete writing to the SD Card through STM32CubeProgrammer in boot mode, but STM32CubeProgrammer disappears without the last complete message.
After that, booting does not work even if I do SD boot, and the SD Card is not partitioned.
Are there any separate regulations for the SD Card that should be used with the STM32MP257DK board?
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.10-stm32mp2-r1.0(debug):lts-v2.10.5-dirty(7c229848)
NOTICE: BL2: Built : 16:19:31, Jun 28 2024
INFO: EventBuffer0: BuffArea=e03f000 DmaAddr=0e03f000 CoherentMapAddr=0xe03f000
INFO: dwc3_set_dev_speed = HighSpeed
INFO: DFU USB START...
INFO: Event: Link Status Change : ON(0)
INFO: Event: Link Status Change : Early Suspend(5)
INFO: Event: Link Status Change : L2(3)
INFO: Event: Suspend
INFO: USB Suspend mode
INFO: Event: Device Reset
INFO: Event: Device Connection Done
INFO: dwc3_get_dev_speed = HighSpeed
INFO: Event: Link Status Change : ON(0)
ERROR: usb_core_ctl_error : Send an ERROR
Solved! Go to Solution.
2025-06-11 12:31 AM
Hi @Kevin_Woo
did you use a virtual machine or a native Linux PC ?
Could your try at first a basic optee image using CubeProgrammer in command line ?
https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer#How_to_flash_with_STM32CubeProgrammer
commend should be like this one:
./bin/STM32_Programmer_CLI.exe -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp257f-dk-optee.tsv
Regards,
2025-06-09 3:32 AM
I created a partition of the SD Card in advance according to the explanation in https://wiki.st.com/stm32mpu/wiki/How_to_populate_the_SD_card_with_dd_command.
After that, I ran stm32cubeprogrammer, but STm32cubeprogrammer disappeared and the program was not completed. core@lge-c:~/share/stm32mpu_dev/Starter-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v24.12.05/images/stm32mp2/scripts$ ./create_sdcard_from_flashlayout.sh ../flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp257f-dk-ca35tdcid-ostl-m33-examples-optee.tsv
2025-06-09 3:41 AM
Even on the stm32mp157-dk1 board, if you first set up a partition on a new sd card and then execute write using stm32cubeprogrammer, you can see the error message below on the console. Even if you connect 5V/3A to the power port, you can see the same error message. Please also recommend a solution for this part.
U-Boot 2023.10-stm32mp-r1 (Oct 02 2023 - 14:39:59 +0000)
CPU: STM32MP157DAC Rev.Z
Model: STMicroelectronics STM32MP157D-DK1 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157d-dk1)
Board: MB1272 Var3.0 Rev.C-03
DRAM: no /fwu-mdata node ?
512 MiB
optee optee: OP-TEE: revision 4.0 (2a5b1d12)
I/TC: Reserved shared memory is disabled
I/TC: Dynamic shared memory is enabled
I/TC: Normal World virtualization support is disabled
I/TC: Asynchronous notifications are disabled
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Core: 379 devices, 40 uclasses, devicetree: board
WDT: Started watchdog with servicing every 1000ms (32s timeout)
NAND: 0 MiB
MMC: STM32 SD/MMC: 0
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
Previous ADC measurements was not the one expected, retry in 20ms
****************************************************
* WARNING 500mA power supply detected *
* Current too low, use a 3A power supply! *
****************************************************
Net: eth0: ethernet@5800a000
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Hit any key to stop autoboot: 0
Boot over usb0!
DFU alt info setting: done
crq->brequest:0x0
2025-06-09 4:27 PM
sudo dd if=../flashlayout_st-image-weston/optee/../../FlashLayout_sdcard_stm32mp257f-dk-ca35tdcid-ostl-m33-examples-optee.raw of=/dev/sdc bs=8M conv=fdatasync status=progress I wrote FlashLayout_sdcard_stm32mp257f-dk-ca35tdcid-ostl-m33-examples-optee.raw to the SD-Card and created a bootable device.
However, (1) writing does not work properly via STM32CubeProgrammer via USB.
(2) The booting image via the raw file is different from the booting image using the SD-Card provided by DK. (* Example) RAW file: DR Port: USB 2.0, DK-SD: DR Port: USB 3.0)
2025-06-11 12:31 AM
Hi @Kevin_Woo
did you use a virtual machine or a native Linux PC ?
Could your try at first a basic optee image using CubeProgrammer in command line ?
https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer#How_to_flash_with_STM32CubeProgrammer
commend should be like this one:
./bin/STM32_Programmer_CLI.exe -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp257f-dk-optee.tsv
Regards,
2025-06-11 12:37 AM
Thanks for your reply.
First, I was able to activate the new SD Card using the SD Card access method in Deep Dive.
Afterwards, I verified that the update was possible using STM32CubeProgrammer by selecting the DK-optee.tsv mentioned by PatrickF instead of the tsv file mentioned in the Getting Started page.
I will finish the work in progress and analyze the differences between the various TSV files on the STM32MP257DK board.
Regards