Hi Arduino Team,
I'm one of the developers of Cirkit Designer, which is a tool for designing + diagramming Arduino projects.
Our current version of Cirkit is a desktop app, which leverages the Arduino CLI for compiling and uploading Arduino code.
We're in the process of creating a web version of Cirkit and we would like to support Arduino compilation + uploading in the web version.
We've just started investigating, and it looks like the best approach would be to use the Arduino Create Agent for code uploading + serial communication, and then to perform compilation server-side using the Arduino CLI.
The issue I'm currently running into is that the Arduino Create Agent (javascript client) is outputing a VID / PID when I connect an Arduino board.
Since the goal is to compile code for that connected board, my understanding is that we would need to map the VID / PID to a FQBN in order to invoke the CLI.
One idea we have for mapping is to obtain the name of the Arduino board by mapping the VID / PID to the name via boards.txt, and then matching the name of the board to the output from the Arduino CLI listall to get the FQBN.
-
Here is some documentation I've found on mapping PID / VID to board (link)
-
Edit: I think I'm beginning to understand how FQBN is constructed, and that it may be doable to construct the FQBN on the fly. I see that the base of the FQBN is [platform name] : [architecture] : [board name] (link). It looks like board name comes from boards.txt, but I'm wondering where platform name and architecture are obtained from? In the Arduino-AvrCore for example, is it possible to find platform name and architecture?
I'm wondering if you have any suggestions on the approach we're taking. It would be amazing, and very much appreciated if we're able to get pointers from the Arduino team.
Best,
Austin