2020-07-23 09:05 AM
We have a custom board using the STM32MP157C chip and we are having a problem with the USB programming via the CubeMXProgrammer. Our system is working and we have a tf-a.stm32 binary image, a functional u-boot.st32 image and a working rootfs Linux system. We can boot from SDCard and from eMMC.
I have read the flashlayout document which explains the TSV file format and created a layout file for programming the eMMC flash however we are running in to issues actually programming the device via USB.
Here is our TSV file
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 tf-a-stm32mp157c.stm32
- 0x03 ssbl-boot Binary none 0x0 u-boot.stm32
PD 0x02 fsbl1 Binary mmc1 boot1 tf-a-stm32mp157c.stm32
PD 0x04 fsbl2 Binary mmc1 boot2 tf-a-stm32mp157c.stm32
PD 0x05 ssbl Binary mmc1 0x00100000 u-boot.stm32
PD 0x10 rootfs System mmc1 0x00300000 rootfs.ext2
The TSV file is parsed correctly by STM32_Programmer_CLI and it downloads the TF-A (ID 0x01) but then hangs.
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c.stm32
File : tf-a-stm32mp157c.stm32
Size : 245384 Bytes
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:00.444
RUNNING Program ...
PartID: :0x01
We have a serial connection to UART4 to see the boot messages, and when the TF-A starts executing the firmware causes a panic due to the boot interface.
NOTICE: CPU: STM32MP157C?? Rev.Z
NOTICE: Model: Custom Board 1 - STM32MP157C
INFO: Reset reason (0x14):
INFO: Pad Reset from NRST
INFO: PMIC version = 0x21
ERROR: Boot interface not found
PANIC at PC : 0x2ffd9b45
Exception mode=0x00000016 at: 0x2ffd8000
The TF-A source code is the ST branch 2.0 release 3.1: https://github.com/STMicroelectronics/arm-trusted-firmware/releases/tag/v2.0-stm32mp-r3.1
Has anyone seen this error before? Are we missing a configuration option when we build TF-A which would allow for this booting method?
Thank you,
Drew
Solved! Go to Solution.
2020-07-29 08:40 AM
Yes, as stated, we have a functional system, running with TF-A.
The problem was the argument STM32MP_BOOT_ONLY was enabled for the TF-A build, which disables the USB support, this was removed and everything is working.
In plat/st/stm32mp1/platform.mk there are definitions of STM32MP_BOOT_ONLY and STM32MP_FLASHLOADER which appear to be for building smaller more specific versions of TF-A. I expect STM32_FLASHLOADER build argument can be used for building the 'tf-a-serialboot.stm32' as listed (and undocumented) in the flashlayout page https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout#e-E2-80-A2MMC
2020-07-24 02:48 AM
Hi @drew
Can you please confirm that you can state "Our system is working " based on flashing eMMC trought SDCard as per describe in your previous post :
https://community.st.com/s/question/0D53W000006Ox3sSAC/stm32mp157-emmc-not-booting
Means that same TF-A is properly booting from eMMC but looks to fail in context of USB flashing.
Thanks
Olivier
2020-07-24 03:25 AM
I strongly suggest you to move all the software components to the latest ST branch 2.2 .
Marco Cavallini - KOAN - https://www.koansoftware.com
2020-07-29 08:40 AM
Yes, as stated, we have a functional system, running with TF-A.
The problem was the argument STM32MP_BOOT_ONLY was enabled for the TF-A build, which disables the USB support, this was removed and everything is working.
In plat/st/stm32mp1/platform.mk there are definitions of STM32MP_BOOT_ONLY and STM32MP_FLASHLOADER which appear to be for building smaller more specific versions of TF-A. I expect STM32_FLASHLOADER build argument can be used for building the 'tf-a-serialboot.stm32' as listed (and undocumented) in the flashlayout page https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout#e-E2-80-A2MMC