arduino / arduino-cli

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

Docs: Update the Platform specification's "Hardware Folders structure" #2753

Closed thernstig closed 2 days ago

thernstig commented 2 weeks ago

Describe the request

https://arduino.github.io/arduino-cli/1.1/platform-specification/ describes the platform specification. https://arduino.github.io/arduino-cli/1.1/platform-specification/#hardware-folders-structure describes its folder structure.

This folder structure does not correlate with what is seen when installing a specific platform via the board manager on Windows 11 in the Arduino IDE.

I wish for the documentation to be updated to be correct for how it looks in a installation on Windows

Describe the current behavior

I asked Perplexity why I saw this difference between my installation and what the platform specification said, and got a pretty sold answer I believe.

My question

The Arduino platform specification says the directories look like:

hardware/arduino/avr/...     - Arduino - AVR Boards
hardware/arduino/sam/...     - Arduino - SAM (32bit ARM) Boards
hardware/yyyyy/avr/...       - Yyy - AVR
hardware/xxxxx/avr/...       - Xxx - AVR

But when I check in explorer in Windows 11, it looks like:

packages\arduino\hardware\avr\1.8.6\cores\arduino

I don't understand why.

The answer

Image

Arduino CLI version

1.1.0

Operating system

Windows

Operating system version

11

Additional context

The entire nomenclature around Arduino "platform" and "core" is confusing. There are numerous Stack Overflow, forum and what not questions out there about this. For example even this repo has this issue https://github.com/arduino/arduino-cli/issues/549.

Seeing this folder structure difference completely adds to this confusion.

Issue checklist

cmaglie commented 1 week ago

Hi @thernstig, thanks for pointing out the lack of clarity in the documentation.

I think the confusion comes from the documentation referring to the hardware sub-directory of the user-directory (AKA Sketchbook), which is supposed to be used by the user to install platforms manually without using the Board Manager.

Instead, if the platform is installed automatically with the Board Manager it will be installed in another directory as you discovered, that is supposed to be exclusively managed by the Board Manager.

I have updated the documentation in #2760 to clarify this aspect better. Let me know if this looks improved.