AVR programming: a dev environment
The toolset you use to program a microcontroller is a very personal choice. This is what I landed on.
When it comes to the tools you use to write, compile and upload code for microcontrollers, there is, as Hank Hill would say, “really no wrong way to do it”.
Over the years I’ve tried several approaches. They started, naturally, using the Arduino IDE which is well-supported, allows you to work with a wide range of devices (not just Arduinos) and shields you from some of the chaos and heartbreak that is C programming. For beginners, I don’t think there’s a better way to get your feet wet.
However, the Arduino environment does have a tendency to add a certain bloat to the code. In order to sidestep that, I switched to Atmel Studio (now known as Microchip Studio). This is a more sophisticated (and complex) IDE with a steeper learning curve. Since Microchip bought Atmel, however, the platform has languished, doesn’t support the full range of microcontrollers and is deprecated for new products. Instead, Microchip wants to push you towards the even bloatier (if that’s a word) MPLAB X — although, to be fair, it does also support development in VS Code via extensions, although that solution is a work in progress and has the dreaded term ‘AI’ in its name.
In any case, for me Atmel Studio suffered from one huge drawback — it was Windows-only. I’m mainly a Mac and Linux guy and it was a pain to fire up my one Windows machine (a desktop) or a virtual machine just to do some AVR coding.
Pretty much all my coding is now done with VS Code. And so this description is going to revolve around that software. However, even if you use a different code editor, there will be some useful tips for you here.
Keep reading with a 7-day free trial
Subscribe to Machina Speculatrix to keep reading this post and get 7 days of free access to the full post archives.


