From ac0b0a29322ad4af8918c43f9fe6b1729c3933c0 Mon Sep 17 00:00:00 2001 From: Michael Wiebusch Date: Thu, 16 Apr 2015 14:07:22 +0200 Subject: [PATCH] added target program_bootloader to cooler makefile --- atmega32u4/atmel_stock_bootloader/avrdude_command.txt | 3 +++ atmega32u4/cooler/Makefile | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 atmega32u4/atmel_stock_bootloader/avrdude_command.txt diff --git a/atmega32u4/atmel_stock_bootloader/avrdude_command.txt b/atmega32u4/atmel_stock_bootloader/avrdude_command.txt new file mode 100644 index 0000000..c123be5 --- /dev/null +++ b/atmega32u4/atmel_stock_bootloader/avrdude_command.txt @@ -0,0 +1,3 @@ +avrdude -p atmega32u4 -P usb -c dragon_jtag -V -U flash:w:ATMega32U4-usbdevice_dfu-1_0_0.hex + +avrdude -p atmega32u4 -P usb -c dragon_jtag -V -U lfuse:w:0xde:m -U hfuse:w:0xd9:m -U efuse:w:0xf3:m diff --git a/atmega32u4/cooler/Makefile b/atmega32u4/cooler/Makefile index 40cd5d9..5a314d9 100644 --- a/atmega32u4/cooler/Makefile +++ b/atmega32u4/cooler/Makefile @@ -223,5 +223,10 @@ depend: >> $(MAKEFILE); \ $(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE) -.PHONY: all build elf hex eep lss sym program coff extcoff clean depend +.PHONY: all build elf hex eep lss sym program coff extcoff clean depend program_bootloader program_arduino +program_bootloader: all + dfu-programmer $(MCU) erase && dfu-programmer $(MCU) flash $(TARGET).hex && dfu-programmer $(MCU) start + +program_arduino: all + avrdude -patmega32u4 -cavr109 -P$(PORT) -b57600 -D -Uflash:w:$(TARGET).hex:i -- 2.43.0