Atmel USB DFU Bootloader


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 artikel:atmega_u-howto:flashen_flip [Dokuwiki] 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 Atmel AVR — PlatformIO latest documentation I would try adding

upload_protocol = flip1
upload_flags =

to the platformio.ini.