And then comes my Leonardo board. After 3 months since I press the "buy" button on eBay, it finally arrived here from China. And then I could, also finally, figure out what was going wrong with the Leonardo programming and fix it. So, if you have a Leonardo, go to SourceForge get MariaMole version 0.5. There are other minor bug fixes, too.

If you want to understand what was keeping MariaMole to support Leonard, you can read it here:

Supporting Leonardo is kind tricky. The biggest issue is that it runs a "soft reset" at the start of upload. That's almost like the Duemilanove reset when the serial port is opened, but it's not done by hardware. The problem is that, when Leonardo resets and comes back, Windows assigns it, temporarily, a different serial port.

I was struggling with the fact that the original IDE was successfully uploading to Leonardo, but MariaMole was getting stuck. Then I noticed that Arduino IDE wasn't using the serial port Leonardo was connected at! Really strange, and then I found the above behavior described on Arduino Playground.

So, now, MariaMole checks if you have an Leonardo. If yes, before uploading the HEX file, it opens and closes a temporarily serial connection, just to reset the board. Then, it waits to see which new serial port appears on Windows and uses it to upload the firmware via AVRDUDE.

And that's it. The support for your Leonardo board is now available. Go get it and contact me if you have any problems!