Debugging Multiple NXP Boards with GDB and P&E

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 two NXP FRDM-KL27Z Boards with P&E Debugger the same time

Debugging two NXP FRDM-KL27Z Boards with P&E Debugger the same time

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):

First Project Debug Setup

First Project Debug Setup

For the second debug session I select the other USB port, plus a different Server Port Number (7324 in this case):

Second Board Setup

Second Board Setup

💡 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 🙂 :

debuggging the same binary on two different boards

debugging the same binary on two different boards

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.

Summary

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 🙂

Advertisements

7 thoughts on “Debugging Multiple NXP Boards with GDB and P&E

  1. Hi Erich ,

    I’m trying to debug two different projects at once with KDS V3.20 . One was a CPU MKE04 with P&E CycloneMAX connected via ethernet to the Server Port Number 7224 , and the other with a cpu MKE02 and a P&E Multilink-FX (USB ) with the Port Number 7324 Server .
    Booting the first program and it works. But when I try to start the second I get the error “Failed to launch services in sequence .”

    Where can the problem be ?

    Greetings and thank you .

    Like

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s