ATTinyCore, how do I use it?

I downloaded, unzipped it into the sketch library. There were immediately errors in Arduino IDE about missing header files. In ATTinyCore/avr/libraries I found several ‘sub-libraries’ with header files, some directly under the ‘sub-library’ and some under folder src. How do I use ATTinyCore library, pick out the ‘sub-libraries’ I need or how should it be done?

It’s not a library, it’s an Arduino core, the basis of everything. In PlatformIO terms, it’s a framework. (Other possible frameworks besides Arduino would e.g. be Simba or mbed-os etc.). In order to use on particular Arduino core, there has to be PlatformIO support behind it.

In this case, there is. PlatformIO supports the latest 1.5.2 release version of, and it designates the the package name framework-arduino-avr-attiny to it. Board definitions use it by specifying the core: "tiny" attirbute together with the variant.

The variant in turn maps to one of the possible board variants listed in the core, per in this core.

So, of you use board = attiny84 in the platformio.ini, you already get the ATTinyCore Arduino core in the latest release version.

The files of the Arduino core is locally under C:\Users\<user>\.platformio\packages\framework-arduino-avr-attiny in the standard configuration.

There have also been no code changes since the release, just documentation updates. So updating the core version to the bleeding-edge version from the Github page will have no functional effect. (Compare release date with commits since then.

1 Like