2025-08-13 7:04 AM
Hi.
I'm trying to develop some SW on the M4 core of STM32MP157FAD1 on custom board with custom Linux.
After 2 days of fighting I'm finally able to run the tty echo example on it.
But I still struggle with connection to the board.
Thank you
P.S.
For others who also struggle to get it to work, check your device tree, CubeMX doesn't generate proper mbox m4_rproc. Add to end of the dts to the user section this:
&m4_rproc {
mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
mbox-names = "vq0", "vq1", "shutdown", "detach";
};
To have the trace0 interface, you must add define for build preprocessor __LOG_TRACE_IO_
2025-08-19 2:07 AM
Some update:
I was finally able to get the st-link debugger to work on a custom board. What I found, SWO pin is also needed (I had connected only SW data and clock).
I also had to add manual routing to my notebook to be able to work with the wrong IP address (I didn't find any way how to fix this, it's obvious bug in the debugger).
But I have one more question. If I want to debug e.g. initialization part of the code (start of the main loop before while(1)), I'm not able to do that.
When I place breakpoint here, it never stops on it (because program is already after this BP). When I do terminate and relaunch, it loads the whole program again like running the debugger for the first time! So the debugger connects again after some time of the program run (which is long time after the breakpoint).
Is there any way how to overcome this or is it another bug?