2023-05-08 10:27 PM - edited 2023-11-20 05:57 AM
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.
the first image is about not working debug break point.
second 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
What Is the problem of this?
If I do wrong, what is the right way to deal with OpenAMP?
2023-05-29 01:42 AM
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