cancel
Showing results for 
Search instead for 
Did you mean: 

Can't access CM4 core with STM32CubeMX generated Device Tree

Ludovic Feltz
Associate II

Hello,

I'm trying to develop an application that use an STM32MP1 Series (STM32MP157A-DK1 for the moment)

My application need inter-processor communication between the A7 and M4 Cores

I had generated my project with STM32CubeMX and the project is successfully created for the M4 core with a ready to use main.cpp

I then followed the wiki page How to manage OpenSTLinux project in STM32CubeIDE and compiled the Generated .dts files to a .dtb file and uploaded it on my board. (with a u-boot project)

The new configuration works well on the board (my newly updated I2C port is now well recognized on CA7 so the configuration update worked) but when i'm trying to launch the CM4 project from STM32CubeIDE it fails with an error popup saying: "Failed to insert all hardware breakpoints: you have requested too many hardware breakpoints/Watchpoints" (even if i have only one!) and the followings console message:

Info : New GDB Connection: 2, Target STM32MP157AACx.cm4, state: reset

Warn : negative reply, retrying

Warn : negative reply, retrying

Warn : target STM32MP157AACx.cm4 is not halted (add breakpoint)

Error: can't add breakpoint: target running

Info : dropped 'gdb' connection

shutdown command invoked

Info : dropped 'gdb' connection

And on the board i don't see anything in "/sys/class/remoteproc/"

I tryed to update everything (OpenSTLinux-5.4-dunfell-mp1-20-06-24, STM32CubeIDE v1.5.1, STM32CubeMX 6.1.1)

Recreating CubeMX project many times without any modifications.

I joined the generated .dts and the .dtb file.

Also with journalctl -xe command i found more informations at kernel initialization. I found some references to remoteproc0 but i can't tell if it can be usefull and how to resolve theses issues:

  1. Jan 26 17:10:19 stm32mp1 kernel: arm-smc-mbox mailbox-0: ARM SMC mailbox enabled.
  2. Jan 26 17:10:19 stm32mp1 kernel: arm-smc-mbox mailbox-1: ARM SMC mailbox enabled.
  3. Jan 26 17:10:19 stm32mp1 kernel: remoteproc remoteproc0: releasing m4
  4. Jan 26 17:10:19 stm32mp1 kernel: Unable to get STM32 DDR PMU clock

  1. Jan 26 17:10:19 stm32mp1 kernel: stm32-rproc mlahb:m4@10000000: wdg irq registered
  2. Jan 26 17:10:19 stm32mp1 kernel: stm32-rproc mlahb:m4@10000000: failed to get mcu reset
  3. Jan 26 17:10:19 stm32mp1 kernel: remoteproc remoteproc0: releasing m4
  4. Jan 26 17:10:19 stm32mp1 kernel: stm32-rproc: probe of mlahb:m4@10000000 failed with error -2

  1. Jan 26 17:10:25 stm32mp1 kernel[484]: [ 1.845081] stm32-ipcc 4c001000.mailbox: ipcc rev:1.0 enabled, 6 chans, proc 0
  2. Jan 26 17:10:25 stm32mp1 kernel[484]: [ 1.846872] stm32-rproc mlahb:m4@10000000: wdg irq registered
  3. Jan 26 17:10:25 stm32mp1 kernel[484]: [ 1.846901] stm32-rproc mlahb:m4@10000000: failed to get mcu reset
  4. Jan 26 17:10:25 stm32mp1 kernel[484]: [ 1.847260] remoteproc remoteproc0: releasing m4
  5. Jan 26 17:10:25 stm32mp1 kernel[484]: [ 1.847324] stm32-rproc: probe of mlahb:m4@10000000 failed with error -2

2 REPLIES 2
AlexandrShipovsky
Associate III

Hello @Ludovic Feltz​ ! Did you manage to solve the problem?

Not really but i found a workaround. I don't compile and send .dtb file to the stm card (i use the default setting). So i can't use any I2C communication from the A7 core...

The solution i found is that my M4 core read all the informations from I2C then send them via Virtual UART...

If you found a better solution please share it with me 🙂