In “Debug Multiple Boards with GDB at the Same Time” I have used the Segger J-Link to debug multiple boards, from the same IDE, at the same time. The remaining question in that article was: how to do the same the P&E Multilink/OpenSDA?
Debugging multiple boards, maybe even with the same firmware is a very useful thing. Think about two system communicating with each other: it would be very good to have them under debug the same time.
I’m using the Kinetis Design Studio v3.2.0 with the P&E Debugger. What was already possible with the Segger J-Link (see ) is now possible with the P&E Multilink or OpenSDA implementation.
As with the J-Link, the key is to use different ports for each debug session. In the first project I specify the USB port plus the default P&E GDB server port (7224):
For the second debug session I select the other USB port, plus a different Server Port Number (7324 in this case):
💡 P&E is using 6 consecutive port numbers with an offset of 2. With specifing 7224, the ports 7224, 7226, 7228, 7230, 7232 and 7234 are used.
The above works for different projects and .elf files. But it works as well debugging the same project and .elf file on multiple boards too 🙂 :
The only thing is that the break points in above screenshot are ‘shared’ for the same file(s). With clicking on the ‘threads’ in the debug view I can switch the board/application context easily.
It is now possible to debug multiple boards with the P&E debug connection (e.g. using the P&E Multilink or OpenSDA implementation). It requires setting non-default port number to make this happen. This is very useful to debug multiple boards which are communicating with each other.
Happy Debugging 🙂