arduino / arduino-cli

Arduino command line tool
https://arduino.github.io/arduino-cli/latest/
GNU General Public License v3.0
4.35k stars 378 forks source link

Missing FQBNs for non AVR boards #996

Closed PeterWone closed 4 years ago

PeterWone commented 4 years ago

Bug Report

Current behavior

Boards listed for the arduino:avr core specify FQBNs.

  {
    "ID": "arduino:avr",
    "Latest": "1.8.3",
    "Name": "Arduino AVR Boards",
    "Maintainer": "Arduino",
    "Website": "http://www.arduino.cc/",
    "Email": "packages@arduino.cc",
    "Boards": [
      {
        "name": "LilyPad Arduino USB",
        "fqbn": "arduino:avr:LilyPadUSB"
      },
      {
        "name": "Arduino Industrial 101",
        "fqbn": "arduino:avr:chiwawa"
      },

Boards listed for other cores do not provide FQBN.

  {
    "ID": "arduino:sam",
    "Latest": "1.6.12",
    "Name": "Arduino SAM Boards (32-bits ARM Cortex-M3)",
    "Maintainer": "Arduino",
    "Website": "http://www.arduino.cc/",
    "Email": "packages@arduino.cc",
    "Boards": [
      {
        "name": "Arduino Due"
      }
    ]
  },
  {
    "ID": "arduino:samd",
    "Latest": "1.8.8",
    "Name": "Arduino SAMD Boards (32-bits ARM Cortex-M0+)",
    "Maintainer": "Arduino",
    "Website": "http://www.arduino.cc/",
    "Email": "packages@arduino.cc",
    "Boards": [
      {
        "name": "Arduino MKR WiFi 1010"
      },

The FQBN is required by arduino-cli compile and other commands.

arduino-cli core search --format json

Expected behavior

All boards for which an FQBN is defined should report FQBN in the response to core search

Environment

Additional context

67 boards are reported for various cores. 30 are from arduino:avr and only these report FQBN.

ubidefeo commented 4 years ago

@PeterWone that looks odd I have tried the same and it works

{
    "ID": "arduino:sam",
    "Latest": "1.6.12",
    "Name": "Arduino SAM Boards (32-bits ARM Cortex-M3)",
    "Maintainer": "Arduino",
    "Website": "http://www.arduino.cc/",
    "Email": "packages@arduino.cc",
    "Boards": [
      {
        "name": "Arduino Due (Programming Port)",
        "fqbn": "arduino:sam:arduino_due_x_dbg"
      },
      {
        "name": "Arduino Due (Native USB Port)",
        "fqbn": "arduino:sam:arduino_due_x"
      }
    ]
  }

and

{
        "name": "Arduino MKR WiFi 1010",
        "fqbn": "arduino:samd:mkrwifi1010"
      }
PeterWone commented 4 years ago

I have an hypothesis that I am currently testing. This one may also turn out to be a documentation thing.

PeterWone commented 4 years ago

I can now reproduce consistent behaviour.

A board's FQBN is reported by core search only when the core for that board is installed.

Whether this is a bug depends on whether the documentation says it should happen. Personally I can't see the value of listing the boards without FQBNs.

ubidefeo commented 4 years ago

@PeterWone the timing is right I just found out another bug with the core search in that it only searches within the platform's name. Thank you for filing #997 I'll close this one and move the discussion there