-
-
Notifications
You must be signed in to change notification settings - Fork 403
Option to specify programmer USB Bus and Device numbers #770
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
Comments
This would indeed be useful to have, but probably requires some changes to the programmer/tool specifications. As for adding these as part of the Finally, we should consider how such a USB device should be specified. Apparently the usbasp tools on Linux need a busnumber + device number (which I think might be Windows-specific), but for example One one hand, you could say |
@matthijskooijman |
I actually think the vid-pid to use is hardcoded inside avrdude, you need not specify it, right? You can indeed use Looking at the avrude manpage, for some programmers, it seems to distinguish between multiple of the same type of programmers, you will have to specify the device's serial number:
Other devices apparently indeed use the usb device number:
And from Troubleshooting:
So maybe it would be good to allow selecting an USB device in some way, and then exporting the usb ids in multiple properties, e.g. Also, I realized that a lot of this is not really specific to programmers: There are also boards where a normal (bootloader-style) upload does not happen through a serial port, but through a native USB protocol (e.g. through DFU or some HID upload like I tihnk Teensy uses). I'm not sure if there's any way to distinguish between multiple such board connected during upload (I think not), but I think the same approach could be used here. |
hi @matthijskooijman
correct in a way, they are listed in
So does Teensy, as far as I could figure out by playing with the command line tools installed by TeensyDuino inside the Java IDE. I like this approach a lot, especially because it gets around to finding devices which are configured as HiD peripherals.
definitely worth looking into
As I pointed out above, if a device is configured as an HiD peripheral you won't have a U(S)ART available, and this wouldn't work As always I thank you for your valuable input 🙏 |
Yeah, I meant that if a UART is available, you can specify that and let arduino-cli translate that into the appropriate USB identifiers. If a board has no UART, then of course you will have to specify the USB ids directly. |
Hi @dbhaig, at the moment, it could be created a pluggable discovery that does the discovery of the programmer/board, and it gives it an address to that object. Once this exists, the address could be passed to the upload tool to perform the upload. In theory, this does not require any modification to the cli. |
Feature Request
Current behavior
First of all, kudos to the developers for adding the burn-bootloader command!
I'm using a USBasp programmer and it works great.
It would be very handy if I could use more than one USBasp programmer simultaneously.
auduino-cli does not appear to support specifying programmer USB Bus and Device addressing.
Expected behavior
Options to specify a programmer using the USB Bus and Device numbers, e.g.:
lsusb
...
Bus 001 Device 122: ID 16c0:05dc Van Ooijen Technische Informatica shared ID for use with libusb
Bus 003 Device 036: ID 16c0:05dc Van Ooijen Technische Informatica shared ID for use with libusb
...
arduino-cli burn-bootloader -b arduino:avr:leonardo -P usbasp:001:122 -t -v
arduino-cli burn-bootloader -b arduino:avr:leonardo -P usbasp:003:036 -t -v
Environment
CLI version (output of
arduino-cli version
):arduino-cli Version: 0.11.0 Commit: 0296f4d
OS and platform:
Linux malbec 4.4.0-184-generic Bump github.com/spf13/cobra from 0.0.3 to 0.0.4 #214-Ubuntu SMP Thu Jun 4 10:14:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Additional context
I have no idea how difficult this request would be to implement.
Thank you for your consideration.
The text was updated successfully, but these errors were encountered: