The AVR-EA family
After the AVR-DA, AVR-DB and AVR-DD, already in 2022 Microchip continued the launching of new AVR-based microcontrollers with their AVR-EA series. These have some improvements over the AVR-DA. As for the AVRxxDA28, also the AVRxxEA28 comes in a breadboard-compatible PDIP package, and since it seems to be slightly cheaper and slightly more available from distributors I was briefly considering using the AVR64EA28 for my upcoming courses this autumn, but I found some problems…
PlatformIO and VSCode
When I tried to make my first project in PlatformIO using a AVR64EA28 I was a bit surprised and a bit disappointed to find out that this chip was not supported in their list of “boards”, so I put it aside for a short while. Yesterday now I was back at my desk at work and thought again about the upcoming courses.
I found out that the AVR-EA series should be supported by the avr-gcc compiler toolchain, but I had still no success to configure PlatformIO to accept the AVR64EA28 and to get my first blinky snippet to compile nor upload. I reached out to the github repository of PlatformIO where I found another already reported issue with PlatformIO automatically reverting to an older version of the avr-gcc toolchain by default.
Solution
To make the whole story short, with all of its twists and turns, here is the recipe on how to setup PlatformIO for the AVR-EA family on the example of the AVR64EA28 – the only chip from this family which I currently have at hand for testing.
1. Updating some internals of PlatformIO
This will be valid for a Windows-installation of PlatformIO – for Linux and MacOS your mileage may vary… You will have to start a new project using any of the supported megaavr-chips (e.g. the AVR64DA28) in PlatformIO first so that the base libraries are downloaded and installed into PlatformIO.
You need to download an unofficially updated avr-gcc toolchain from the makers of the Arduino DXCore (which I will not use). The package can be found at https://spencekondetoolchains.s3.amazonaws.com/avr-gcc-7.3.0-atmel3.6.1-azduino7b-i686-w64-mingw32.tar.bz2
Unpack the archive and replace the contents of your directory
You also need to update the pre-installed version of the uploader avrdude if you want to use the simple serialupdi uploader I have described here previously. You can find current versions of avrdude on Github. Get the files avrdude.exe and avrdude.conf and replace the currently installed files in
2. Setting up your “Board”
In PlatformIO everything is centered around development boards, so even if you like me want to just program the bare-iron chip itself you will need to set up a board description file. This file needs to go into
{
"build": {
"f_cpu": "4000000L",
"mcu": "avr64ea28",
"variant": "28pin-standard"
},
"hardware": {
"oscillator": "internal"
},
"name": "AVR64EA28",
"upload": {
"maximum_ram_size": 6144,
"maximum_size": 65536,
"protocol": "serialupdi"
},
"url": "https://www.microchip.com/en-us/product/avr64ea28",
"vendor": "Microchip"
}
3. Create and configure your project
Now you should be able to restart VSCode and PlatformIO and create a new project. I did not include a framework definition in my .json file, because I don’t need the Arduino framework (or similar) for my projects I plan to do with the AVRs. Therfore, after you selecte dthe board file you will not have any framework to choose from. Just let PlatformIO create the project now.

The last step now is to make sure that PlatformIO will not fall back to the default avr-gcc version 1.7 toolchain, but use the updated version 3.7 toolchain we just modified. For that add the line
[env:AVR64EA28]
platform_packages = platformio/toolchain-atmelavr
platform = atmelmegaavr
board = AVR64EA28
upload_port = COM4
Conclusion
Will I use the AVR64EA28 for my courses this autumn? No probably not. I have a working solution now on my computer under my installation of both Windows and VSCode – but when my students arrive with half a dozen of different installations of MacOS, Linux and different Windows, then I cannot see how I should help them to get a working setup in all cases.
Microchip is on their homepage still stating that they are committed to open-source and the avr-gcc toolchain, but their solution to provide device packages which seem to flawlessly only work with their own IDE does not give me strong confidence. The latest release of a full tool-chain has been 3 years ago, since then they seem to be pushing more and more towards their MPLAB as development platform – but I really want to continue on the open-source track.