I got apps running on both the M0 and M4 core running and communicating with each other and while figuring out how to use the debugger learned something that might be of use to others.
Note: I am using a Segger J-link connected to an LPC4357 board.
Debugging in the M4 core is pretty straightforward. Just connect and go.
However debugging in the M0 project is a bit more complicated.
First, you have to load the app with the M4 project set active. Run the debugger, then disconnect from the debugger.
Now set the M0 core project as active. DO NOT try to load the executable from the M0 project. It will fail (at least the way I have my project configured).
Now attach to the debugger (do not connect to the debugger). This will fail the first time. Do it again and it should attach and the debugger will be running. Repeat until it attaches.
To run from startup, break execution, click reset then continue. You can now set breakpoints, examine variables etc in the M0 app as needed.
If you modify the M0 code, you have to return to the M4 project to compile and load both, then repeat the above process to continue debugging the M0 code.
It is a little clumsy, but it works.
Please sign in to leave a comment.