ARMmbed / DAPLink

https://daplink.io
Apache License 2.0
2.32k stars 977 forks source link

Disallow both CMSIS-DAP v1 and v2 to be opened simultaneously #652

Open flit opened 5 years ago

flit commented 5 years ago

In interface firmware configurations where both CMSIS-DAP v1 and v2 USB interfaces are available, there is a possibility that the user could open both CMSIS-DAP interfaces concurrently. This will, of course, cause unpredictable behaviour.

A real world example is with multicore debug using Keil µVision. If starting a debug session in one µVision instance with the CMSIS-DAP v1 interface, and the CMSIS-DAP v2 interface is selected in the setup dialog of another µVision instance, then the debug connection in the first is lost. The same happens the other way around (debug session with CMSIS-DAPv2 and setup dialog with CMSIS-DAPv1).

The solution is to disallow simultaneous opening of both CMSIS-DAP interfaces. The actual mechanism used to disable a CMSIS-DAP interface needs to be investigated.

0Grit commented 5 years ago

I have always sort of wished that DAPLink could expose another usb->com port specifically for exposing a CLI to configure the probe. Yet another usb endpoint though.

Not a fan of serial escape sequences or I'd say use that as an alternative.

flit commented 5 years ago

A CLI is an interesting idea. But I think the drag-and-drop configuration files are probably easier for most people. And they become a sort of command line interface when activated with commands like touch /Volumes/FRDM-K64FD/auto_rst.cfg.

Do multiple CDC virtual com ports require additional USB interfaces? I don't know CDC well enough to know the answer to that.

0Grit commented 5 years ago

@aglass0fmilk ^

Do multiple CDC virtual com ports require additional USB interfaces? I don't know CDC well enough to know the answer to that.

RadioOperator commented 5 years ago

Recently, I try to test a v1+v2 CMSIS-DAP, I got same conflicting issues. Suggest to use a slide-switch as v1 or v2 selection(upgrade FW) .