Custom avrdude with auto DTR reset and custom baud rate

I’ve been working on a project where I have been using a ATmega2560 with a custom bootloader (based on the Arduino Mega bootloader using the stk500v2 protocol). As I was using a 8MHz crystal, it was best that I used a baud rate of 38400 for programming.

By default with avrdude, when using the -c stk500v2 programmer switch, it does not pull down the DTR line prior to programming, however for my custom application, I was needing this auto reset feature as for my product it was not possible to keep pressing the reset button for a firmware update.

As a result, I have recompiled the avrdude source under MinGW, for a custom build where the -c stk500v2 option now performs a DTR/RTS pulldown.

You can download the custom binary here (includes USB support via libusb):

This should have the same functionality as the original avrdude, but with just the autoreset feature added to the stk500v2 programming selection. This autoreset is not selectable, so if you might want to switch between DTR reset and the original behaviour, it might be best to keep two copies of the binary with different file names.

If you have a similar application where this might be useful, please feel free to download and use it.

Leave a Reply

Your email address will not be published. Required fields are marked *