简体   繁体   中英

How to install Arduino .h files independent of IDE

The Arduino IDE brings with it folders of header files. Tools like the Microsoft Arduino extension for VS Code specify the Arduino IDE as a prerequisite and the header files are available as a consequence of that.

Every time a release of VS Code uses a new version of Node, the Arduino extension is broken until it is released for the same version of Node. I'm experimenting with the Arduino-CLI to eliminate this problem.

Part of the experiment is to see whether the IDE is required, by removing it to see what stops. It seems to work but I don't have header files. Is anyone aware of a supported way to download and install these other than installing the Arduino IDE?

Obviously one could install the IDE, harvest the header folders and then remove the IDE but that's very hacky and clashes somewhat with my sparkling visions of an extension that manages all this.

Examining the Arduino IDE github repo I find that header files and other things have been refactored into "cores", a repo per core.

Now, the CLI supports installing "cores" with suspiciously similar names.

arduino-cli core install arduino:sam

After executing this command there is a new folder

C:\Users\<profilename>\AppData\Local\Arduino15\packages\arduino\hardware\sam

and the requisite files are present.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM