Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
st-link selection via serial
Is it possible to choose the active debug probe which EBlink uses by serial number on the command line?
I usually have 3+ st-links connected at the same time since I work with hardware which has 3 separate stm32s which communicate with each other via uart.
Sometimes I also have to work with more than one MCU and I specify the usb address to choose the right st-link device.

device=<usb_bus>:<usb_addr> : Select probe explicit

Unfortunately, this address is not something permanent and it would be much more convenient to select the st-link device by serial number.
Thanks for that PDonchev Wink. Hopefully if the code is open-sourced we can take a look at adding that as a extra option - or the maintainer could hopefully add it if it's going to stay closed.

Quote:Changes (5-10-2020) Release 3.3
  • Added: Windows, notify and quit when USB is removed
  • Added: Interface selection based on serial
  • Moded: Some streamlining in the flash engine
That is a coincidence, I just needed that option my self.
I wasn't here, on the forum, for a while and see right now the request.
"Added: Interface selection based on serial". How is it possible to use this feature?

Add the option to the interface switch

 -I stlink,serial=xxxxxxxxxxxx


 -I stlink,speed=1000,dr,serial=xxxxxxxxxxxx


Add options just with a comma seperator

BTW  eblink  -h gives a help page
Let me explain this a bit further. Assume you have two boards that must communicate with each other and you want them to debug simultaneously. You could create two shell (batch) files ( Windows and Linux the same approach)  which will launch a GDB server on a dedicated tcp port for a dedicated USB interface with that serial.

Target 1 shell file:  eblink -I stlink,serial=0671FF353567A2425E231318  -G port=1001
Target 2 shell file:  eblink -I stlink,serial=024238672632A2425E231318  -G port=1002

Now you can open 2 IDE projects and hook every project on his own TCP port to debug.

This is not only for debugging but also for flashing or automated testing. E.g. if you are in a production environment and you want to flash products on multiple devices simultaneously from the same machine, just start the particular flash location by it's USB serial number.

The sky is the limit.

Forum Jump:

Users browsing this thread: 1 Guest(s)