A makefile to upload your hex to an arduino
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Blink.cpp.hex Initial commit. Aug 10, 2012
Makefile Added some documentation Oct 10, 2012
README.md README -> README.md Oct 10, 2012
reset.py reset.py: make reset really work on Leonardo Jun 22, 2015


Arduino Loader

This is a sample project to make it easy to start uploading code to your Arduino Leonardo with avrdude.

It mainly consists of a Makefile and a Python script that puts the Arduino Leonardo in a mode to receive code updates.

Why is this needed?

Due to its design, the Arduino Leonardo does not have the bootloader active like earlier Arduino's. This project setup puts the Arduino in bootloader mode before attempting to upload new code.

From the Arduino Leonardo Hardware guide:

Rather than requiring a physical press of the reset button before an upload, the Leonardo is designed in a way that allows it to be reset by software running on a connected computer. The reset is triggered when the Leonardo's virtual (CDC) serial / COM port is opened at 1200 baud and then closed. When this happens, the processor will reset, breaking the USB connection to the computer (meaning that the virtual serial / COM port will disappear). After the processor resets, the bootloader starts, remaining active for about 8 seconds. The bootloader can also be initiated by pressing the reset button on the Leonardo. Note that when the board first powers up, it will jump straight to the user sketch, if present, rather than initiating the bootloader.

See also


Make sure the reset.py Python script is executable:

chmod +x reset.py

In the Makefile, make sure that the port your Arduino uses is correct:

PORT       = /dev/ttyACM1


To run the Makefile: