cancel
Showing results for 
Search instead for 
Did you mean: 

Two Different STLink Debugger on One PC to Debug Two Different System

Posted on March 31, 2017 at 15:55

Hi all.

I want to know, can I use two different SLink-v2 (SWD) debugger to debug separate STM-ARM based system? I have STLink v2 debugger and discovery boards (which can be used as a debugger). I've designed a board which has two MCU and they need to talk with together and do something after that. So I need to debug them in the same time.

1 ACCEPTED SOLUTION

Accepted Solutions
Max
ST Employee
Posted on April 05, 2017 at 10:01

I have tried IAR and Keil, both can discriminate between several STLink connected on the same PC by using their serial number.

You can run 2 project debugger windows at the same time.

BR,

Max

View solution in original post

11 REPLIES 11
Posted on March 31, 2017 at 20:14

Consider also VirtualBox

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Thomas Legrand
Associate II
Posted on April 03, 2017 at 18:25

Hello,

I've never tried it but isn't JTAG supposed to be a daisy chain ? That would means you can put multiple MCUs on the same JTAG port (does the ST-Link support it ?).

I guess your debugging software would need to support it too (I'm using SEGGER probes and Atollic Pro, I'm pretty confident they both support it).

Thomas.

Posted on April 03, 2017 at 17:36

Thanks

Turvey.Clive.002

Posted on April 04, 2017 at 08:46

I've never tried it but isn't JTAG supposed to be a daisy chain ? That would means you can put multiple MCUs on the same JTAG port (does the ST-Link support it ?).

The ST-Link on Nucleo/Discovery board support only SWD, not JTAG.

Posted on April 04, 2017 at 17:15

>>

The ST-Link on Nucleo/Discovery board support only SWD, not JTAG

Correct

They should however have different serial numbers permitting a solution with appropriate drivers and DLLs to support multiple ST-LINK attached to *different* SWD ports.

We use full JTAG, not least because it permits boundary scan and daisy-chaining of all devices on the boards.

The multi-chip situation is not a battle I've fought at this level. Better to understand what your code is doing than rely on single-stepping it to find out. Better to instrument systems so interaction can be determined in real time, many situations where stopping one/both chips can have catastrophic effects.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on April 04, 2017 at 19:49

Thanks for all of you. I didn't draw the pcb forJTAG just SWD for both MCUs. I've got an STLink debugger v2which has JTAG interface. @Thomas Legrand maybe next revision I can do it with JTAG thanks anyway. I'm not thinking to develop the programs in the same time while debugging but sometimes I'll need I think so I want to learn if I can or not with SWD interface but not on the discovery kits/nucleo boards but I think they are similar (or maybesame). Sorry for my ignorance, what do you mean exactly with '... with appropriate drivers and DLLs to support multiple ST-LINK ...'

Turvey.Clive.002

‌. Drivers and DLLs of STLink or Drivers and DLLsof USB and can you detail it?

Again thanks for all.

Max
ST Employee
Posted on April 05, 2017 at 10:01

I have tried IAR and Keil, both can discriminate between several STLink connected on the same PC by using their serial number.

You can run 2 project debugger windows at the same time.

BR,

Max

Posted on April 05, 2017 at 08:34

There is a stand-alone version of the ST-Link, wich does support JTAG.

Not sure if it has any advantages, compared to a JLink.

Sorry for my ignorance, what do you mean exactly with '... with appropriate drivers and DLLs to support multiple ST-LINK ...'

Turvey.Clive.002

. Drivers and DLLs of STLink or Drivers and DLLsof USB and can you detail it?

I think you can test that easily.

Start two instances of your toolchain (possibly with different projects), attach both Nucleo boards, and see if you can run and debug both. This requires the USB driver (supplied by ST) to be able to handle multiple instances of the same device.

I never tried that.

Posted on April 05, 2017 at 13:44

My new STM32F4-Discovery kit has arrived and I tried it too with Keil and it is possible with selecting the ST-Link/V2-1 (not the in-use one) from the Flash/Configure Flash Tools/Debug/Settings and again under the Debug/Debug Adapter's Unit section. Thanks for your kind helps.