Closed aliphys closed 1 year ago
This is a newly setup laptop, so there were no cores installed previously. I have not installed the Arduino 2.x IDE either. I installed the core for the Nicla Vision, which triggered the install of USB drivers as well.
PS C:\Users\Ali Jahangiri\Documents\GitHub\nicla-sense-me-fw> arduino-cli core install arduino:mbed_nicla
Downloading packages...
arduino:openocd@0.11.0-arduino2 downloaded
arduino:arm-none-eabi-gcc@7-2017q4 downloaded
arduino:bossac@1.9.1-arduino2 downloaded
arduino:dfu-util@0.10.0-arduino1 downloaded
arduino:rp2040tools@1.0.6 downloaded
arduino:mbed_nicla@4.0.2 downloaded
Installing arduino:openocd@0.11.0-arduino2...
Configuring tool....
arduino:openocd@0.11.0-arduino2 installed
Installing arduino:arm-none-eabi-gcc@7-2017q4...
Configuring tool....
arduino:arm-none-eabi-gcc@7-2017q4 installed
Installing arduino:bossac@1.9.1-arduino2...
Configuring tool....
arduino:bossac@1.9.1-arduino2 installed
Installing arduino:dfu-util@0.10.0-arduino1...
Configuring tool....
arduino:dfu-util@0.10.0-arduino1 installed
Installing arduino:rp2040tools@1.0.6...
Configuring tool....
arduino:rp2040tools@1.0.6 installed
Installing platform arduino:mbed_nicla@4.0.2...
Configuring platform....
Platform arduino:mbed_nicla@4.0.2 installed
When the arduino-cli core list
command after the core is installed is run, the newly installed core is displayed.
PS C:\Users\Ali Jahangiri\Documents\GitHub\nicla-sense-me-fw> arduino-cli core list
ID Installed Latest Name
arduino:mbed_nicla 4.0.2 4.0.2 Arduino Mbed OS Nicla Boards
Possible solution: replace this line https://github.com/arduino/arduino-cli/blob/642996ffb25218e006b0cb6a793fb34d688fd8aa/commands/core/list.go#L88 With this
// Inform user if there are no installed platforms,
if len(res) == 0 {
return nil, fmt.Errorf("No platforms installed.")
}
return &rpc.PlatformListResponse{InstalledPlatforms: res}, nil
@aliphys :wave: Thanks for reporting this. I agree with you. When we have no installed cores it's not clear what's going on.
Currently, when no cores are installed, we print only if we pass the --format json
flag. (The result is an empty array []
).
I wouldn't return any error on the API level, as this kind of thing should be inferred by the length of the data we receive. But your suggestion is still valid it just needs to be implemented in a different place :nerd_face:
We have two options:
Print a self-explanatory message like your suggestion:
$ arduino-cli core list
No platforms installed.
Print only the table headers:
$ arduino-cli core list
ID Installed Latest Name
Describe the problem
I want to see the list of currently installed cores on my system. But cannot.
To reproduce
arduino-cli core list
in the terminal.Expected behavior
I get a list of available cores on the system
Arduino CLI version
Version: 0.33.0 Commit: ca60d4b4 Date: 2023-05-30T12:14:01Z
Operating system
Windows
Operating system version
Windows 11
Additional context
I can see a list of installable/installed cores by appending the
--all
argument.The
arduino-cli board list
correctly identities the connected board name, FQBN and the core (arduino:mbed_nicla
).Issue checklist