-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Probe and control multiple connected programmers #318
Comments
Hi, you can use the STLINK_DEVICE environment variable 2015-06-30 12:15 GMT+02:00 Thomas [email protected]:
|
But all stlink programmers have the same VID:PID, they only differ in Bus/Device Example
|
Well, if anybody ever has the same need and is looking for a solution: Edit: Altough it's quite bad, you must hope your serial can be expressed in visible ASCII chars, otherwise you will not be able to input them. I forked a version which now uses serials as hexstrings, circumventing the limitation: https://github.com/trichner/openocd |
Any updates on this issue? |
I got a workaround. Special thanks to @xor-gate for the One of the caveats of getting the serial number is that you have to make sure the programmer is connected to the board and its in a connectable state. After that just invoke |
@shkhaliq could you post your st-probe output, maybe it prints a spurious 00 as last byte? It seems I also have the same which adds the extra 00 byte:
For openocd I have the following So this means the serials of the programmers have exact 12 bytes. Maybe someone can acknowledge this so we have correct output for st-probe and the Here are some other pages related to this: |
Refactoring some code, merge st-probe and fixup #318 serial print
For your convenience |
I ended up forking OpenOCD and fixing the horrible binary input there: https://github.com/trichner/openocd Edit: Thanks for fixing it in |
We need some reworking and documentation here. |
Hallo greets Gabriel |
@GagoSoft there is already issue #417 about this problem but no fix yet. It should no be fixed in gdb-server.c but in the library itself. I have some code in my own library but not migrated yet to texane/stlink (see https://github.com/xor-gate/stlink2/blob/master/src/usb.c#L60-L107) |
the serial-number problem for the nucleo is quite easy, and allready solved in my local sources. I will post my patch soon. |
here my patches for gdbserver.c and flash_opts.c for the serials of my nucleo-boards |
Please make a pull request from your changes (https://help.github.com/articles/about-pull-requests/). Then you get the credits and the history is tracked. |
sorry, I've never used git before ... :(
|
I know this sounds like a lot of work (and to learn) for just a few lines of code, but that is the way how distributed contributions work with git (in comparision to subversion). This is some nice reading about git workflows: https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows Even if you write little pieces of code for yourself Git is a awesome tool to track history and safe your ass of hacking. |
...this behaviour is only seen, when no target is connected to the ST-Link (the chipid can't be read and the initialization of the st-Link fails). Not really a Problem. |
Hi all @GagoSoft has supplied a feature to control multiple programmers simultaneous which has just been merged. If there are any problems feel free to comment here. |
If |
@WayneKeenan that is a limitation currently how probe is implemented, it needs to have the microcontrollers attached. I have written xor-gate/stlink2 which is able to show the serials even when there are no microcontrollers attached. |
I have multiple STM32F0Discovery Boards wired up to an USB hub and would like to specify which one to flash (I'm using
st-flash main.bin 0x800000
right now).Is there a way to specify the USB port to use? or even an actual selection?
The text was updated successfully, but these errors were encountered: