-
-
Notifications
You must be signed in to change notification settings - Fork 398
Feature request: board list --fqbn? #1068
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
hey @obra Seems like an interesting case for hardware/device makers, let me squeeze it in our backlog and discuss it with the team.
rules that out 😀 |
@ubidefeo - Not....quite? The end goal is to have a Makefile target of "make upload" for a sketch that "just works" for users, assuming we know the FQBN. If a json parser ends up as a hard requirement, I understand, but I'm hoping it won't, as one of the nice things about arduino-cli is how self-contained it is. Like the leonardo and micro, our boards have different USB pids for the bootloader and sketch, so we can easily determine if the board needs to be reset into the bootloader and can prompt the user to hold in a key on the board to stay in the bootloader and accept an upload. The way we did that in the arduino-builder days is:
Parsing the non-json output of board list -sort of- works, but feels very brittle and like something you probably don't want me doing. If two different boards have the same vid/pid, both show up in the non-json board list, but the path to the serial port only shows up for the first one listed. This is a slightly simplified version of what I've currently got. Ideally, I'd also be able to see the PID of the current board, so I can skip prompting the user if they've already got the board in bootloader mode. (Although
_arduino_prop looks like this:
|
Hi @obra, thanks for your interest in your project. |
As I've talked about in a previous issue, I'm in the process of replacing a couple thousand lines of perl, bash, and powershell with a thin set of wrappers around arduino-cli. For the most part, I'm really happy with how much code I get to delete.
I've just hit a place where I'm not sure I see a clean way to do what I want.
Without depending on a json parser, I don't currently see a reasonable way to answer the question "what is the full path to the serial port for the connected board (or boards) with fqbn $FQBN?"
One way to get what I need might be if
arduino-cli board list
honored the --fqbn flag and used the result as a filter for the list of ports found.I have an additional wrinkle that I'll bring up in a new related issue.
The text was updated successfully, but these errors were encountered: