Skip to content

The name of the board changes after installing the corresponding boards package #620

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

Closed
kittaakos opened this issue Mar 13, 2020 · 5 comments
Labels
conclusion: resolved Issue was resolved topic: CLI Related to the command line interface type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Mar 13, 2020

Bug Report

Current behavior

So the problem is the following; without anything installed, when I list (core search) the boards inside the Arduino AVR Boards boards package, I can see Arduino Mega. I install the boards package and run the same search; there is no Arduino Mega anymore. But I can see Arduino Mega or Mega 2560 instead.

This is critical for the Pro IDE because we cannot set the FQBN of a currently selected board after installing the corresponding boards package. (CC: @cmaglie)

Here are the steps (for macOS, please modify the rm -rf command based on the output of arduino-cli config dump):

rm -rf ~/Documents/Arduino && rm -rf ~/Library/Arduino15 \
&& ./arduino-cli version \
&& ./arduino-cli core update-index \
&& ./arduino-cli core search "Arduino AVR Boards" --format json \
&& ./arduino-cli core install arduino:avr \
&& ./arduino-cli core search "Arduino AVR Boards" --format json

Before the boards package installation:

      {
        "name": "Arduino Mega"
      },

After the installation:

     {
        "name": "Arduino Mega or Mega 2560",
        "fqbn": "arduino:avr:mega"
      },

Expected behavior

The name of the boards do not change.

Environment

  • CLI version (output of arduino-cli version): arduino-cli Version: 0.9.0 Commit: e4d02b4
  • OS and platform: macOS 10.15.3 (19D76)

Additional context

@kittaakos
Copy link
Contributor Author

There is an issue with Arduino Zero too:

arduino-cli.exe core search "Arduino SAMD Boards (32" --format json

Before install:

      {
        "name": "Arduino Zero"
      },

After the corresponding core installation:

      {
        "name": "Arduino Zero (Native USB Port)",
        "fqbn": "arduino:samd:arduino_zero_native"
      },

      {
        "name": "Arduino Zero (Programming Port)",
        "fqbn": "arduino:samd:arduino_zero_edbg"
      }

@ubidefeo
Copy link

ubidefeo commented Apr 7, 2020

@kittaakos
the Arduino Zero has 2 USB ports: one is a USB<>UART which allows uploading firmware using the chip's bootloader, the other one connects to Atmel's EDBG chip (a debugger bridge).
I think the old version of the core did not allow programming through EDBG, that's why you see two.

The Java IDE also presents both :)

@kittaakos
Copy link
Contributor Author

Thanks for the update, @ubidefeo. I think the name of the board still should not change, but both should be declared without the FQBNs: Arduino Zero (Native USB Port) and Arduino Zero (Programming Port), and when I install it, the FQBNs will be set. This does not happen now.

The Java IDE also presents both :)

This issue is not about whether it is there twice or not, but the name change.

@per1234
Copy link
Contributor

per1234 commented Apr 14, 2020

The differences in names are often intentional. It's going to be challenging to achieve compliance with this requirement in the 3rd party platform realm. It's also likely that compliance will break over time, since you must keep these two sets of strings in sync as boards are added or names are changed. For this reason, mismatches should be expected and handled gracefully by Arduino Pro IDE.

If this is something that will be required, I suggest documenting that in the package_index.json specification so at least we will have some hope that new platforms will start in compliance.

@per1234
Copy link
Contributor

per1234 commented Feb 22, 2022

Closing as resolved because this inevitable mismatch between the value of the packages[*].platforms[*].boards[*].name field of the package index and the BOARD_IDE.name value of the boards.txt ` is now handled in a graceful and user friendly manner by Arduino IDE 2.x:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: CLI Related to the command line interface type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

5 participants