PlatformIO Community

Atmel USB DFU Bootloader

Hey,

I would like to program my Atmega32u4 via USB DFU bootloader. Is there a way to do so?

USB DFU Bootloader:

Greetings, val

Isn’t that already the default upload method for all ATMega32u4 based Arduinos, like the Pro Micro and Leonardo?

Anyways yes it’s supported since PIO invokes AVRDude which supports that what the Flip program (see your appnote) would do. Per http://dokuwiki.ehajo.de/artikel:atmega_u-howto:flashen_flip it can be invoked with -c flip1 -P usb like

avrdude -c flip1 -p m32u2 -U flash:w:path_to_firmware.hex -P usb -v" 

So as you can see in https://docs.platformio.org/en/latest/platforms/atmelavr.html#upload-using-programmer I would try adding

upload_protocol = flip1
upload_flags =
    -Pusb

to the platformio.ini.

1 Like