Library / SDK
SpenceKonde/megaTinyCore avatar
SpenceKonde/megaTinyCore

megaTinyCore brings the tinyAVR 0, 1 and 2 series to the Arduino IDE

Arduino core for the tinyAVR 0/1/2-series - Ones's digit 2,4,5,7 (pincount, 8,14,20,24), tens digit 0, 1, or 2 (featureset), preceded by flash in kb. Library maintainers: porting help available!

689 stars162 forksCNOASSERTION

At a glance

What is it?
megaTinyCore is an Arduino core for the tinyAVR 0, 1 and 2 series parts, with a version number that encodes flash size, feature set and pin count, a maintained avr-gcc toolchain and UPDI programmer support. It suits hobbyists and product builders targeting a one dollar ATtiny with more peripherals than the classic parts, and it has specific IDE version constraints.
Who is it for?
Adopt megaTinyCore when you are building on a tinyAVR 0, 1 or 2 series part and want the newer peripherals, the DAC on the 1-series and the differential ADC on the 2-series exposed through a familiar Arduino core. Skip it if you are on the classic ATtiny line, where ATTinyCore is the documented choice, or if your toolchain is a package manager build of the Arduino IDE on Linux, which the author rules out.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Activity is slowing. The repository last received commits 6 months ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 24, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The version number is a hardware descriptor, not a release counter

The repository description explains the naming scheme, and it is unusual enough to be worth decoding before you install anything. The version digits are not a sequence to compare. The flash size in kilobytes comes first, then the tens digit gives the feature set, where 0, 1 or 2 are the values used, and the ones digit gives the pin count, where 2, 4, 5 or 7 map to 8, 14, 20 and 24 pins respectively. So a version tells you at a glance which part family and package it is built for, and the current release, 2.6.11, describes a 2 kilobyte flash variant in a particular feature set. For a user this is a way of matching a core to a specific chip in a way the Arduino board manager's own naming does not, since the upstream cores tend to name boards after the part rather than compressing those attributes. The practical consequence is that picking the wrong core is not an abstract mistake, it is a mismatch of pin count and peripherals for the board in your hand.

The 0, 1 and 2 series parts have peripherals the classic line never had

The background section explains what makes these parts different from the older tinyAVR chips. The 0, 1 and 2-series parts have an improved architecture compared to the classic tinyAVR parts, which are supported by ATTinyCore, with improved peripherals and improved execution time for certain instructions, similar in both regards to the advanced AVR Dx-Series and to megaAVR 0-Series chips like the ATmega4809 used on the official Nano Every and Uno Wifi Rev 2. The listed hardware is concrete. All of these parts feature at least one hardware UART, an SPI and TWI interface, none of the USI arrangement that the ATtiny85 has, a powerful event system, configurable custom logic, at least one on-chip analog comparator, and a surprisingly accurate internal oscillator. The 1-Series adds an actual DAC output channel and the 2-Series a differential ADC. The comparison with the Dx-Series and the megaAVR parts is the argument for the core existing at all, since the Arduino team did not give these chips first class support.

The parts are cheap and run without an external crystal

The economics are the other half of the reason to care. The tinyAVR 0/1/2-Series parts are cheap, with the highest end parts, the 3226 and 3227, carrying 32k of flash and 3k of SRAM against the 2k SRAM of the ATmega328p used in the Uno, Nano and ProMini, and running just over one US dollar in quantity, which is less than many 8k classic AVR ATtiny parts, in the phrase used, AVR instruction set at a PIC price. All of these parts are rated to run at 16 MHz or 20 MHz at 4.5 to 5.5 volts without an external crystal, which removes both the crystal and the associated capacitors from a board design. For a maker building a small number of devices, that combination of price, on-chip analog peripherals and no external clock is the argument for spending an evening setting up this core. The README also warns about buying the chips themselves, which is discussed further below, because a counterfeit part undoes every one of these advantages.

The toolchain is a maintained fork, not the stock avr-gcc

The toolchain history is the part of the documentation that most affects your build. Up until version 2.2.7 the core used the Arduino7 version of avr-gcc, with gcc 7.3.0 and avrlibc 3.6.1, plus the latest ATpacks as of June 2020. Starting with 2.2.7 the author switched to his own Azduino build of the toolchain, which has updated ATpacks for all the newly supported parts. The sequence is specific: 2.2.7 used Azduino3, 2.3.0 and later used Azduino4, and starting with 2.6.0 the core uses Azduino5. The README notes that Azduino5 offers no benefit for the core other than saving a quarter gigabyte of disk and 40 megabytes of download bandwidth if you install both megaTinyCore and DxCore through board manager. When megaTinyCore is installed through board manager the required toolchain version is installed automatically, and all 0/1/2-series parts are supported with no extra steps. Manual installation is more complicated, particularly if you want 2-Series support, and the Installation.md file in the repository is the reference for it.

The Arduino IDE version matters more than usual here

There are several IDE warnings, and they are specific enough to be worth reading before anything else. The first is for Linux users, and it is emphatic. Only versions of the Arduino IDE downloaded from arduino.cc should be used, never from a Linux package manager, because the package managers often ship the Arduino IDE but have modified it, despite knowing nothing about Arduino or embedded development, and those versions are notorious for subtle but serious issues caused by those modifications. The author states that this core should not be expected to work on such versions and that no modifications will be made to fix package manager builds. Second, IDE versions 2.0.x and some 2.1 do not work correctly, which the README attributes to a bug in the Arduino client. Third, versions 1.8.13 and later, including 1.8.17, 1.8.18 and 1.8.19, may generate a panic: no major version found error because they fail to properly parse platform.txt. The workaround is stated: since 2.6.0 the platform.txt is modified manually before release, which makes the issue less likely. The version 1.8.13 is strongly recommended for another reason, since older versions do not properly handle the programmers in the tools menu, which degrades the experience as the number of installed cores grows. IDE 1.8.2 and earlier have their own unfixed defects and are not suitable.

Manual installs broke IDE 1.8.14 until version 2.6.0

The manual installation path has its own history, and it explains a version constraint that otherwise looks arbitrary. Prior to megaTinyCore 2.6.0, a manual installation of megaTinyCore would cause version 1.8.14 of the IDE to crash because of a bug in the Arduino IDE itself, tracked as issue 11813 in the arduino/Arduino repository, and it happened when you installed the core manually in your Arduino folder. Users of 1.8.14 and later must therefore use version 2.6.0 of megaTinyCore or newer. The fix is that platform.txt is now modified directly before release, which is why the parsing failure is described as less of an issue now. The installation details themselves live in Installation.md and the wiring notes in Wiring.md, both in the repository. The practical consequence for a new user is that the manual installation path is only viable on a reasonably current core version and a reasonably current IDE, and the board manager route avoids the whole class of problem because the toolchain is installed automatically with it.

The counterfeit chip warning is part of the documentation

The README spends a long section on where not to buy AVRs, and it is unusual to find hardware sourcing advice in an Arduino core, so it is worth understanding the reasoning. The author buys a lot of electronics from AliExpress and rates it a great marketplace for generic components, but not a good place for the latest semiconductor lines from major Western manufacturers, especially during a shortage. The modern AVR devices sold through those channels are frequently reported to be fake or defective, for example ATtiny412s that think they are 416s and may not correctly execute power on reset, and the conclusion given is that you probably do not want to buy any AVR microcontrollers there. The advice for assembled boards is that Arduino Nano clones generally work if you avoid the ones with the third party LGT8 chips, and you watch out for the ones with the ATmega168p instead of the 328p. Fake ATtiny85s that were actually remarked ATtiny13s are mentioned as well, so the problem is not limited to modern parts. The README notes there are many interesting theories for where the bogus chips came from and that Microchip has remained silent.

Where megaTinyCore is the wrong choice

Three situations argue against it. The first is a classic ATtiny project, since those parts are supported by ATTinyCore and this core is specifically for the newer 0, 1 and 2-series devices, which use a different register layout and a different peripherals set. The second is a team whose build environment is a package manager IDE on Linux, because the author has ruled that combination out and will not patch for it. The third is a project that needs the higher pin count parts with a long time horizon, because the repository has not been pushed to since 2026-04-05 and the most recent tagged release is 2.6.11 from 2025-09-03, with the releases before that, 2.6.10 and 2.6.9, dating from October 2023. That gap is not proof of abandonment, but it does mean you are adopting a core whose release stream has been quiet for over a year, and if your part is newly released you may be waiting on an ATpack update rather than on a core change. The alternative worth knowing is DxCore, which the README names as the sibling project covering the AVR Dx-Series parts with the same toolchain lineage and the same install path, so if your part sits in the Dx family rather than the tinyAVR 0/1/2 family that is where to look. For the classic tinyAVR line, ATTinyCore remains the answer.

Editorial conclusion

Adopt megaTinyCore when you are building on a tinyAVR 0, 1 or 2 series part and want the newer peripherals, the DAC on the 1-series and the differential ADC on the 2-series exposed through a familiar Arduino core. Skip it if you are on the classic ATtiny line, where ATTinyCore is the documented choice, or if your toolchain is a package manager build of the Arduino IDE on Linux, which the author rules out. Verify first which Arduino IDE version you have, since 2.0.x and some 2.1 builds are called out as broken and 1.8.13 is the recommended version, and check the flash size, feature set and pin count encoded in the version you plan to install.

Frequently asked questions

What does the megaTinyCore version number mean?

The flash size in kilobytes comes first, the tens digit gives the feature set with 0, 1 or 2 as the values used, and the ones digit gives the pin count where 2, 4, 5 or 7 map to 8, 14, 20 and 24 pins. The current release is 2.6.11.

Which tinyAVR parts does megaTinyCore support?

All 0-Series, 1-Series and 2-Series parts, with no extra steps when installed through board manager. The 1-series parts have an actual DAC output channel and the 2-series a differential ADC, and all of them have at least one hardware UART, SPI and TWI, an event system and an on-chip analog comparator.

Which Arduino IDE version should I use with megaTinyCore?

The README strongly recommends 1.8.13, because older versions handle the programmers menu badly. Versions 1.8.14 and later may show a panic no major version found error, though that is less of an issue since 2.6.0 because platform.txt is modified before release, and IDE 2.0.x and some 2.1 builds do not work correctly. On Linux, use only an IDE downloaded from arduino.cc and never a package manager build.

Which toolchain does megaTinyCore use?

Up to 2.2.7 it used Arduino7 avr-gcc with gcc 7.3.0 and avrlibc 3.6.1. Since 2.2.7 it uses the author's Azduino build, with Azduino3 in 2.2.7, Azduino4 from 2.3.0, and Azduino5 from 2.6.0, which brings updated ATpacks for the newly supported parts.

Is megaTinyCore still maintained?

The repository is not archived, but the last push was on 2026-04-05 and the most recent release is 2.6.11 from 2025-09-03, with 2.6.10 and 2.6.9 both from October 2023. The licence file is LICENSE.md at the top of the repository, and the documentation lives in Installation.md, Wiring.md, MakeUPDIProgrammer.md and ChangeLog.md.

Official sources

  1. Issues
  2. README
  3. Releases
  4. SpenceKonde/megaTinyCore on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/spencekonde-megatinycore.svg)](https://hysenlabs.com/projects/spencekonde-megatinycore)

Was this useful?