Closed
Description
Here is a reproducible example
$ arduino-cli sketch new test
Sketch created in: /tmp/test
$ cd test/
$ arduino-cli board attach -p /dev/cu.usbmodem14101
Board found: Adafruit Feather ESP32-S2 TFT...
Selected fqbn: esp32:esp32:adafruit_feather_esp32s2_tft
$ cat sketch.json
{
"cpu": {
"fqbn": "esp32:esp32:adafruit_feather_esp32s2_tft",
"name": "Adafruit Feather ESP32-S2 TFT",
"port": "serial:///dev/cu.usbmodem14101"
}
}
$ arduino-cli compile --build-path build -v test.ino
Using board 'adafruit_feather_esp32s2_tft' from platform in folder: /Users/qys/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2
Using core 'esp32' from platform in folder: /Users/qys/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2
... ...
Sketch uses 217374 bytes (16%) of program storage space. Maximum is 1310720 bytes.
Global variables use 17748 bytes (5%) of dynamic memory, leaving 309932 bytes for local variables. Maximum is 327680 bytes.
$ arduino-cli compile --build-path build -u -v test.ino
Error during FQBN detection: Missing FQBN (Fully Qualified Board Name)
In the last line, I deliberately wrote arduino-cli compile --build-path build -u -v test.ino
without -b esp32:esp32:adafruit_feather_esp32s2_tft -p /dev/tty.usbmodem14101
to test if arduino-cli compile
can find the missing information in the sketch.json
file. As you can see, it throws an error.
arduino-cli/cli/compile/compile.go
Lines 165 to 179 in 47c634b
Perhaps "board autodetection" should check for sketch.json
first?