adafruit / Adafruit_Adalink

Python wrapper for Segger's J-Link Commander & STMicro STLink V2 to flash various ARM MCUs
MIT License
125 stars 33 forks source link

Support multiple connected programmers #22

Open metc opened 8 years ago

metc commented 8 years ago

It would be great if we could connect multiple programmers and choose the programmer we want to use. I tried to use the following command with the latest Segger tools installed:

SEGGER J-Link Commander V5.12e
adalink nrf51822 --programmer jlink --info

When multiple Segger tools are connected, the following windows appears for all commands: image

When using the --info command, I had to choose four times my programmer to get this result. With the current implementation, it is possible to select a programmer to get the hardware ID, another programmer to get the SoftDevice version of another IC, etc.

Hardware ID : xx
SD Version  : xx
Device Addr : xx
Device ID   : xx

Would it be possible to support multiple programmers ? Or would it be possible to add an argument to specify which programmer we want to use ?

metc commented 8 years ago

I am not a Python expert so I am not sure to be able to make a PR for this feature. What is your opinion about it ?