Forums › Devices › OSD32MP15x › Programming the FSBL to eMMC Flash
hello,
We have developed a custom board using the Octavo OSD32MP153C-512M-BAA.
For board debugging purposes we would like to program only the TF-A image (FSBL) to the eMMC Flash.
Can that be done without including the u-boot and the linux image ?? (meaning, without using the .tsv file)
If that is possible, please, let’s us know how to do it.
Thank you,
Gil
Hi gil_he
first what You need to do is unlock the partitions
echo 0 > /sys/class/block/mmcblk1boot0/force_ro
echo 0 > /sys/class/block/mmcblk1boot1/force_ro
and then type
dd if=USB/tf-a-stm32mp157f-ev1-emmc.stm32 of=/dev/mmcblk1boot0 conv=fdatasync
dd if=USB/tf-a-stm32mp157f-ev1-emmc.stm32 of=/dev/mmcblk1boot1 conv=fdatasync
If You want to do this from U-Boot it is necessary to use STM32 Cube Programmer to write the first and second-stage USB U-Boot and via debug UART stop U-Boot execution. Next in the stopped U-Boot console ums 0 mmc 0 or ums 0 mmc 1 and the memory will be visible from Your host computer.
So You can from the host do the same as above
dd if=USB/tf-a-stm32mp157f-ev1-emmc.stm32 of=/dev/mmcblk1boot0 conv=fdatasync
Of course, remember to align memory id ‘/dev/mmcblk1boot0‘
I hope to help You a little bit.
BR Michal
hello Michal,
Thank you for a detailed reply.
We still don’t have Linux and UBOOT.
We want to know if there is a way to program the FSBL only to the eMMC given we don’t have the SSBL and Linux.
Our board is in bring-up stage.
thanks
Gil
Not clear why the flash layout TSV file used by STM32_Programmer_CLI  is not suitable. You can easily skip over partitions in the generated TSV by editing the file and putting a dash in field 1. Skip over everything except ID’s 0x04 and 0x05.
See: https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout#Field1-_Options
Thanks Michal for a great reply.
Gil,
If you have an eMMC on board, you will need a way to program it. Michal described 2 ways to do it and both of them require different interfaces to be active:
1. You can program the eMMC by booting from a secondary source like an SD card interface(this would also require you to change boot mode). From the Linux image booted from the SD card, you can program the eMMC by using “dd”
2. You can also program the eMMC via USB device port(like in OSD32MP1-BRK or OSD32MP1-RED). You will need to use Cube Programmer to USB boot
There is a 3rd way to boot which also involves using Cube Programmer, but only requires a UART via Serial boot. You can send FSBL(TF-A) and SSBL(U-Boot) via serial using Cube Programmer while you set the boot mode to serial. Then you can program the eMMC via a communication interface enabled by the SSBL, generally this is Ethernet, because you do not have USB/SD card interfaces as described in #1 or #2.
Please take a look at https://www.st.com/resource/en/application_note/an5275-usb-dfuusart-protocols-used-in-stm32mp1-series-bootloaders-stmicroelectronics.pdf and https://wiki.stmicroelectronics.cn/stm32mpu/wiki/How_to_use_UART_as_serial_boot_device_with_STM32CubeProgrammer for more info.
Best,
Neeraj
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields