Multiple debug sessions on same PC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple debug sessions on same PC

2,383 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by robert hulsebos on Fri Sep 04 02:54:10 MST 2015
I am using a MS-Windows 8.1 PC to debug a target board with two LPC1769 processors on it. Both processors are connected to the PC using LPC-Link2 probes. I am using LPCXpresso 7.9.0 - build 455.
Debugging one of the processor at a time works fine. But when I have two instances of LPCXpresso open, one for each processor, then starting a debug session for the second processor causes the first active debug session in the other LPCXpresso instance to crash. It does not matter on which processor I start debugging first...
When I use two different PCs to debug both processors at the same time, all works fine.  So it seams there is a problem in the driver software for LPC-Link2 ? It can not support 2 LPC-link probes at the same time?
I also tested the combination of 1 LPC-link2 and 1 LPC-link1 - same results.

FYI: The MS-Windows windows device manager reports that the LCP-LinkII UCom port driver (= \windows\system32\Drivers\usbser.sys) has version 2.0.0.0 and is dated 21-nov-2014. So seems to be the latest version...

Any suggestions?

Robert
0 Kudos
Reply
9 Replies

2,259 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Nov 30 05:19:49 MST 2015
Currently you can use two LPC-Link2's within a single instance of the IDE.

There are issues in booting (softloading firmware onto) more than one LPC-Link2 probe and then recognizing one from another. So to simplify matters our recommendation is:

Using LPCScrypt, program one LPC-Link2 (or V2/V3 LPCXpresso board) the non-bridged versions of CMSIS-DAP firmware and the other with the bridged firmware version (default).

<lpcscrypt install>scripts\program_CMSIS NB (will program the unbridged firmware version)

<lpcscrypt install>scripts\program_CMSIS


Once this has been done, and the probes rebooted etc. ... when a debug session is started and you are prompted to connect to an emulator, then the debug probes will have unique names in the 'name' field.

From the debug call stack, you can select which target's world you wish to be displayed within the debugger.

Improved support for multiple LPC-Link2 connections is on our product roadmap.

Yours,
LPCXpresso Support


0 Kudos
Reply

2,259 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by robert hulsebos on Fri Nov 27 06:43:20 MST 2015
It wasn't fixed in v7.9.2. I just noticed we have a v8.0.0. Is it fixed in this release?
0 Kudos
Reply

2,259 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Sep 11 08:28:00 MST 2015

Quote: robert hulsebos
Is this going to be fixed in the next LPCXpresso release ? And if so, when will this next release be available?


Providing support for connections to multiple targets via multiple LPC-Link2's is on the list for a future release, but it won't be in the next one.

Regards,
LPCXpresso Support
0 Kudos
Reply

2,259 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by robert hulsebos on Fri Sep 11 00:39:25 MST 2015
Is this going to be fixed in the next LPCXpresso release ? And if so, when will this next release be available?

In the meanwhile I soldered an adapter for the J-Link using some scrap material I had lying around; just to be able to quickly evaluate the J-Link based workaround.
The good news is that it works! I am now able to do multiple instance debugging with 1 LPC-Link2 and 1 J-Link Plus adapter.

It requires some plug-ins to be installed in LPCXpresso and also some reconfiguration, see here for help from Segger on this: https://www.segger.com/nxp-lpcxpresso.html
The help is a bit outdated at some points (addressing Eclipse Kepler rather than Juna), but in general It contains all the clues to get things working.

A neat feature of the J-Link is that it breaks the 6 breakpoint barrier that is imposed by ARM HW. Here is how this is done with J-Link: https://www.segger.com/jlink-unlimited-flash-breakpoints.html#_FootNote1
I tested this and it works. (hint: would be nice if LCP-Link1/2 were also able to do this too!)

Additional notes:
- J-Link adapters are available from Segger ( https://www.segger.com/jlink-adapters.html#CM_9pin ), as well as from Embedded Artists ( http://www.embeddedartists.com/products/acc/acc_jtag_adapter_kit.php ).
- If you can't wait and need to solder one yourself, schematics are here: http://www.embeddedartists.com/sites/default/files/docs/schematics/10-to-20_pos_JTAG_adapter.pdf
- Not all Segger J-link variants do support unlimited flash breakpoints: for details look here https://www.segger.com/jlink-debug-probes.html
0 Kudos
Reply

2,259 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Sep 07 05:44:53 MST 2015

Quote: robert hulsebos

Single instance IDE: Sorry - my mistake - I forgot to mention that I already tried using two LPC-link2 probes in single instance IDE. Both probes are detected by the IDE, and debugging with only the first probe seems to work. But when I try to start a second debug session, the second session is stuck at 95% during launching phase. So it seems that the limitation mentioned in your quote applies to two LPC-link2 probes as well...
This not working in one instance is the very reason I tried two instances...



I've had single IDE instance debugging to multiple targets working in the past (with careful booting / selection of the right probe for each target). But having tried this today with LPCXpresso 7.9.0, I agree that there is now an issue here. We'll investigate this, with the intention getting this working for a future LPCxpresso release  (in both 1 instance a 2 instance forms) .

Regards,
LPCXpresso Support
0 Kudos
Reply

2,259 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by robert hulsebos on Sat Sep 05 13:02:48 MST 2015
FYI: Segger has an adapter for making the J-link JTAG/SWD interface compatible with the target cable of the LCP-Link2: https://www.segger.com/jlink-adapters.html#CM_9pin
But before I order one I would like to be sure the J-link + LPC-link2 configuration would solve my problem. Hence my earlier question...

Single instance IDE: Sorry - my mistake - I forgot to mention that I already tried using two LPC-link2 probes in single instance IDE. Both probes are detected by the IDE, and debugging with only the first probe seems to work. But when I try to start a second debug session, the second session is stuck at 95% during launching phase. So it seems that the limitation mentioned in your quote applies to two LPC-link2 probes as well...
This not working in one instance is the very reason I tried two instances...

To be honest, if I were to choose, I would prefer the solutions in the following order:

1. J-Link + LPC-Link2 (assuming J-link would break the annoying 'max-6-breakpoints' barrier, as it does with other ARM projects...)
2. LPC-link2 + LPC-link2 in two IDE instances -> This is more convenient if you have a dual-screen development system; each IDE on a display of its own.
3. LPC-link2 + LPC-link2 in singe IDE instance. Must switch between projects on same display, which is less convenient.

Regards,

Robert
0 Kudos
Reply

2,259 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Sep 04 11:28:25 MST 2015
I can't comment on J-Link I'm afraid.

But I'm fairly certain (though I don't have the ability to test right now), that you should be able to connect through two LPC-Link2's if you use a single instance of the IDE rather than 2. You will have to be careful about the order that you boot and connect to the probes though.

Note that if you want to debug the same image on both target MCUs, then this will require a copy/paste of the project in order to provide two copies within the workspace.

Note that in your original post, you mentioned having problems using an LPC-Link2 and an LPC-Link1.  This is a know issue documented in the release notes:


Quote:
* On Windows 8 and 8.1, if both an LPC-Link1 and a debug probe that
   uses the 'Redlink' driver are connected (such as LPC-Link2 or a
   CMSIS-DAP probe such as LPC800-MAX), then booting of either probe
   will fail and appear to hang. To workaround this issue, connect
   only one debug probe.



Regards,
LPCXpresso Support
0 Kudos
Reply

2,259 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by robert hulsebos on Fri Sep 04 10:56:34 MST 2015
Thanks for your quick response - so for now 2 LCP-Link probes on one PC will not work... is this something this will be fixed in the next version of LPCXpresso?

While browsing my way through the LPCXpresso documentation I found that LCPXpresso now also supports Segger J-link. Jippie!
I happen to have a black J-link Plus lying around here, which I used for other projects in the past.
So I was just wondering: Does the same IDE limitation also apply for the combination of LPC-link2 + J-link?
( two debugging configurations with J-link are possible, see https://www.segger.com/nxp-lpcxpresso.html )
0 Kudos
Reply

2,259 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Sep 04 08:29:29 MST 2015

Hi Robert,

Sorry, this is a known problem. When you attempt the second connection,the IDE uses the probe index of the connected probe (e.g. index 1), which destroys that connection. We'll post the information in the release notes when the fix is complete.

Thanks and regards,
LPCXpresso Support
0 Kudos
Reply