cancel
Showing results for 
Search instead for 
Did you mean: 

How to get FSBL running on STM32MP151 over serial interface

SJans.1
Associate II

Hi,

we are currently developing our own board using the STM32MP151 MPU.

Currently i am working on the FSBL in the non secure mode using U-boot.

I am able to generate a device tree with CubeMX, compile U-Boot and download it via STM32 Cube Programmer over UART4. After it seems to switch into the FSBL successfully the programmer can not contact the FSBL. I attached a log file and also my cube configuration.

I guess it would be helpfull to be able to debug the U-Boot. I know that the device tree should contain something like:

chosen {
		stdout-path = "serial0:115200n8";
	};
 
	aliases {
		serial0 = &uart7;
	};

But i can not seem to get CubeMX to generate that. Or is this one of the options i have to add manually? Or is there a more detailed guide how to debug the U-Boot?

I already read https://wiki.st.com/stm32mpu/wiki/U-Boot_-_How_to_debug

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @SJans.1​ 

You may know that STM32CubeMX generate a complete and fully fonctional dts for EV1 board project ... but not for 157C.

Please compare both generated dts for tf-a and note that quite all USER SECTION need to be filled

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.

View solution in original post

12 REPLIES 12
Christophe Guibout
ST Employee

Hi @SJans.1​ ,

Could you please tell me on which STM32MP15-ecosystem you are working on ?

If you are with STM32MP15-ecosystem-v2.0.0, Basic mode is no more supported and you need to switch to trusted mode.

Please have a look into Ecosystem Release Note, in mains highlights chapter.

BR,

Christophe

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.
SJans.1
Associate II

Hi,

thanks for you answer. Yes i am using the 2.0.0 ecosystem.

So I will try to get it running in trusted mode. I was thinking for the first steps it would be easier in basic mode and i did not notice that part in the release notes.

BR,

Stephan

SJans.1
Associate II

Hello @Christophe Guibout​ 

Alright, i was able to compile the TF-A with my devicetree. But the STM32Cube Programmer crashes at 100%.

If i turn on verbosity level 3 it already crashes at around 60%.

I managed to make a screenshot before it crashed.

Olivier GALLIEN
ST Employee

Hi @SJans.1​ 

I notice you use your custom "variant-high-mx" as fsbl-boot but ev1 flavor in fsbl1 ?

Please confirm you are on custom board ?

I suspect your tf-a "variant" to be not functional for some reason.

You may know that the fsbl-boot should have a specific "serial" profile to allow programmation with STM32CubeProgrammer.

Can you please share UART console traces during flash operation ?

Thx

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.

Hi,

yes i am using a custom board. And as a first step i only try to get the fsbl-boot running. So i ignore all the other partitions.

The ioc-File from which i compiled the Tf-A is attached above at my first question.

With serial profile you mean baudrate settings etc.? CubeMx does not allow me to change any settings for UART4. It tells me "this ip has no parameters to be configured"

I attached a UART trace.

fyi: i tried to flash this on my custom board but also on the Eval-Board. Same results.

Thx

Stephan

Olivier GALLIEN
ST Employee

Hi @SJans.1​ 

Log you sent looks is not what I was expecting .. Cannot help.

If you compiled TF-A with developer package please pay attention to this post and related bug :

https://community.st.com/s/question/0D53W00000HOJdOSAX/use-v22r0-tfa-to-burn-to-stm32mp157cev1-via-stm32programmercli-usb-is-not-supported

Hope it help

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.

Hi,

thanks. I already replaced the makefile yesterday. No change sadly.

Maybe you meant this output:

PANIC at PC : 0x2ffd7aa5

Exception mode=0x00000016 at: 0x0000af13

That's all i get on the debug uart.

Olivier GALLIEN
ST Employee

Hi @SJans.1​ 

Yes given trace confirm my assumption of a faulty TF-A ...

Did you properly fill all USER SECTION in the Device Tree generated by CubeMX ?

This link should help to cross check :

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

As first hint I would have check HSE clock node settings :

https://wiki.st.com/stm32mpu/wiki/Clock_device_tree_configuration_-_Bootloader_specific

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.

Hi,

i guess the configuration is indeed faulty. I just don't know why.

I went a step back to the eval board and tried the following:

First i compiled a TF-A with the given devicetree for the 157C-EV1 Board and it worked fine. I flashed over USART3 and used UART4 as stdout.

Then I generated a new device tree from a fresh CubeMX project following the links you provided for the 157C. I am in the stage with no DDR configured.

But in this case i still get the same PANIC Error as before. It does not even print "STMicroelectronics custom STM32CubeMX board" like it does on the above case.

This is what i added in the USER CODE section:

aliases {

serial0 = &uart4;

serial1 = &usart3;

};

chosen {

stdout-path = "serial0:115200n8";

};

I also attached my dts file.

Sorry i must be missing something i guess. I read most of the wiki articles i could find but it still seems complicated.

Thanks in advance.

Stephan