MinimusAvrLinuxDevelopment

Developing for the Minimus on Linux is relatively easy. You will need:


 * avr-gcc
 * dfu-programmer

Compiling
Assuming a simple program, just invoke avr-gcc with an extra option of -mmcu= for example

"avr-gcc -mmcu=atmega32u2 -o blinky.o blinky.c"

Once you've got a compiled program, you need to create the hexdump to upload to the microcontroller. This is as easy as

"avr-objcopy -R .eeprom -O ihex blinky.o blinky.hex"

You should now have a compiled hex ready to upload to the minimus.

Uploading to the Minimus
To upload the hex to the minimus, first place it in programming mode by holding down both reset and HWB, release reset, then release HWB. Once the board is in programming mode

"dfu-programmer atmega32u2 erase"

This may require Root privileges. Now upload the hex

"dfu-programmer atmega32u2 flash blinky.hex"

Reset the board, and your program should now be running on the MCU.