cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157 Debug OpenAMP

MJo.3
Associate II

Hello.

I'm trying to make simple openAMP with STM32MX(with STM32cubeIDE, .ioc file).

The code is simiar to OpenAMP_TTY_echo.

I include virt_uart.h and use VIRT_UART_Init code inside main function and others like making RxCpltCallback and registor callback is same as the example code.

But the virtual Uart is not shown in /dev directory.

I checked it with console inside cubeIDE.

So, I debug it and find out the breakpoint in main function not work.


_legacyfs_online_stmicro_images_0693W00000bjeagQAA.pngthe first image is about not working debug break point.
_legacyfs_online_stmicro_images_0693W00000bjebKQAQ.pngsecond image is about no RPMSG tty in dev

after I Suspend manually by clicking the button and make expression(VIRT_UART_Init(&huart1) like in the image below, the virtio is initialized and the ttyRPMSG0 is seen in /dev directory
_legacyfs_online_stmicro_images_0693W00000bjebUQAQ.pngWhat Is the problem of this?

If I do wrong, what is the right way to deal with OpenAMP?
_legacyfs_online_stmicro_images_0693W00000bjeGIQAY.png

1 REPLY 1
Olivier GALLIEN
ST Employee

Hi @MJo.3​ ,

For the issue to catch breakpoint at early stage of the main it's actually a known and normal limitation.

In production mode the firmware is started by Linux and then CubeIDE/OpenOCD proceed to an attach to it which take few ms.

As long as OpenOCD not attached it can not execute the breakpoint.

To workaround this you can implement a while function at top of your main on which you break and use debugger to passthrough and then step forward..

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.