cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing earyl booted M4 FW with Linux:

stm32mp1--Player
Associate II

Hello,

we want to implement Non-blocking method  like in https://wiki.st.com/stm32mpu/wiki/How_to_start_the_coprocessor_from_the_bootloader

Our efforts searching documentation and reading discussions in the forum hadn´t resolve the situation.

We are using a devicetree genertated by the CubeMX tool for stm32mp157f-eval1. 

When starting the Application in a booted linux system, it works as expected. The trace logs are available, and the /dev/ttyRPMSG0 virtual UART is loaded:

  • cat /sys/class/remoteproc/remoteproc0/state outputs 'running'
  • cat /sys/kernel/debug/remoteproc/remoteproc0/trace0 shows our debug outputs from the M4

We can send dummy data to /dev/ttyRPMSG0 and get the echoed response

In our use case we need the M4 Application to start as early as possible, so we have configured u-boot SSBL to load the ELF file and start the M4 execution. We are then facing the problem that the software is started, but the linux kernel does not load the /dev/ttyRPMSG0 device:

  • cat /sys/class/remoteproc/remoteproc0/state outputs 'attached'
  • /sys/kernel/debug/remoteproc/remoteproc0/trace0 doesnt exist
  • cat /sys/kernel/debug/remoteproc/remoteproc0/resource_table is empty
  • /dev/ttyRPMSG0 is not loaded 

we are modifying the kernel and u-boot devicetrees including:

&m4_rproc {
	st,auto-boot = <1>;
};

 the U-boot we are using is 2021.1 stm32mp1 rev 2

the boot script is boot.scr.uimg

Our main problem is that remoteproc state is attached, not running.

What are we missing?

best regards.

1 ACCEPTED SOLUTION

Accepted Solutions
stm32mp1--Player
Associate II

the problem was on SRAM memory and LMA and VMA overwritting.

.bss partition (which LMA is on SRAM1) wasoverflading SRAM2 because it was too much large.

Debug ideas taken from this post:

https://community.st.com/t5/stm32-mpu-products/openamp-u-boot-startup/td-p/212743 

View solution in original post

1 REPLY 1
stm32mp1--Player
Associate II

the problem was on SRAM memory and LMA and VMA overwritting.

.bss partition (which LMA is on SRAM1) wasoverflading SRAM2 because it was too much large.

Debug ideas taken from this post:

https://community.st.com/t5/stm32-mpu-products/openamp-u-boot-startup/td-p/212743