AVR examples code for MCU ATmega328/P and ATmega32u2 and ATmega32u4.
To program AVRs, you will need the free avr-gcc compiler, avr-libc, AVRDUDE, and other associated tools.
sudo apt-get install -y gcc-avr binutils-avr avr-libc gdb-avr avrdude libusb-dev dfu-programmer
Warning Build on MAC OS X is not fully supported, it's better on Linux.