cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer fails with: "Error: Message from Embedded Flash Loader : Layout line 1: invalid option '¸' in ¸)"

Moises Araya
Associate III

Hi community,

I'm facing problems to upload the flash layout on a custom board with the STM32CubeProgrammer. I tried with the last version (v2.10.0) but also older ones. The USB communication seems to be working fine as there are not checksum errors or alike. However, for some reason UBoot can still not parse the uploaded layout.

Any idea how this problem can happen even if the USB communication is correct? Could this be a RAM misconfiguration problem even if UBoot can run from RAM and the basic UBoot RAM tests are successful?

For more information, I attach the STM32CubeProgrammer log and the UART4 log.

Thank you in advance for any insight!

Bests,

Moises

12 REPLIES 12
Moises Araya
Associate III

Hi @PatrickF​ ,

I was trying to test the RAM-related timing margings of our board with the procedure you shared:

https://drive.google.com/file/d/1Dh6jFb2rsjWcGXMupsuK4UVD33Y6OnmP/view

However I'm having some problems to get the SPL with DDR_INTERACTIVE mode working in Yocto.

At first the SPL wasn't being generated with the Ecosystem 3.1 because I had UBOOT_CONFIG += "basic" instead of UBOOT_CONFIG += "basic_stm32mp15" in the machine configuration.

But now my problem is that I cannot connect to the SPL with the STM32CubeMX DDR Test Suite if I select to load to SYSRAM over UART, which I think is necessary to check the timing margins with the above-mentioned procedure.

I made shure I set "CONFIG_STM32MP1_DDR_INTERACTIVE=y" and "# CONFIG_STM32MP1_DDR_INTERACTIVE_FORCE is not set" in my UBoot's defconfig.

My question is whether there is a way to set the make flag DDR_INTERACTIVE=1 from Yocto so that the UBoot makefile gets configured correctly?

Thanks in advance,

Moises

Olivier GALLIEN
ST Employee

Hi @Moises Araya​ ,

Could you please specify your UART config : which UART specified to load SPL and which one as console ?

You need to use the same for both.

If it's the case, may you try to load the generated spl using CubeProg with this command :

STM32_Programmer.sh -c port=/dev/ttyS0 br=115200 -w spl/u-boot-spl.stm32 0x01 --start 0x01

Did you get hand on Uboot console in DDR mode ?

Olivier

Olivier GALLIEN
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.
Moises Araya
Associate III

Hi @Community member​ ,

Thanks for your response. In the CubeMX I set both ports to the same COM10 and the SPL gets loaded but then there is no communication.

The command you suggest can load and start the SPL successfully:

STM32_Programmer_CLI.exe -c port=COM10 br=115200 -w ...\basic_stm32mp15\u-boot-spl.stm32-stm32mp151d-fm-mx-basic 0x01 --start 0x01
 
 
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.6.0
      -------------------------------------------------------------------
 
Serial Port COM10 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8,
                     stop-bit = 1.0, flow-control = off
Activating device: OK
Chip ID: 0x500
BootLoader protocol version: 4.0
Device name : STM32MP1
Device type : MPU
Device CPU  : Cortex-A7
 
 
 
Memory Programming ...
Opening and parsing file: u-boot-spl.stm32-stm32mp151d-fm-mx-basic
  File          : u-boot-spl.stm32-stm32mp151d-fm-mx-basic
  Size          : 138130 Bytes
  Partition ID  : 0x01
 
Download in Progress:
██████████████████████████████████████████████████ 100%
 
File download complete
Time elapsed during download operation: 00:00:36.302
 
RUNNING Program ...
  Address:      : 0x1
Start operation achieved successfully

However, afterwards there is no answer from the UART4 port. If I insted load the SPL over usb and listen at the same time over the UART:

STM32_Programmer_CLI.exe -c port=usb1 -w ...basic_stm32mp15\u-boot-spl.stm32-stm32mp151d-fm-mx-basic 0x01 --start 0x01
 
   
   -------------------------------------------------------------------
                       STM32CubeProgrammer v2.6.0
      -------------------------------------------------------------------
 
 
 
USB speed   : High Speed (480MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN          : 002600213131510137313536
FW version  : 0x0110
Device ID   : 0x0500
Device name : STM32MP1
Device type : MPU
Device CPU  : Cortex-A7
 
 
 
Memory Programming ...
Opening and parsing file: u-boot-spl.stm32-stm32mp151d-fm-mx-basic
  File          : u-boot-spl.stm32-stm32mp151d-fm-mx-basic
  Size          : 138130 Bytes
  Partition ID  : 0x01
 
Download in Progress:
██████████████████████████████████████████████████ 100%
 
File download complete
Time elapsed during download operation: 00:00:00.316
 
RUNNING Program ...
  Address:      : 0x1
Error: an error occured while uploading data from the virtual partition 0xF1
Start operation achieved successfully

In this case the UART4 outputs:

U-Boot SPL 2020.10-stm32mp-r2 (Oct 11 2021 - 12:09:12 +0000)
Model: SP-Funktionsmuster based on STM32MP15 MPU
RAM: LPDDR2 16bits 528000kHz
stm32mp1_clk_get_id: clk id 69 not found
WDT:  Not found!
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Which is a hint why I cannot get into the DDR console mode but not sure what is missconfigured about the clock because it is actually the same clock configuration as the TF-A .dts. I attach my uboot.dtsi in case you can give me a hand with that.

Thanks in advance,

Moises