diff --git a/Makefile b/Makefile index e7a1c0a..fd4b5b3 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ LIBS = CC = avr-gcc -override CFLAGS = -g -Wall $(OPTIMIZE) -DF_CPU=16000000UL -std=gnu99 -mmcu=$(MCU_TARGET) $(DEFS) +override CFLAGS = -g -Wall $(OPTIMIZE) -DF_CPU=20000000UL -std=gnu99 -mmcu=$(MCU_TARGET) $(DEFS) override LDFLAGS = -Wl,-Map,$(PRG).map OBJCOPY = avr-objcopy @@ -44,3 +44,9 @@ hex: $(PRG).hex %.hex: %.elf $(OBJCOPY) -j .text -j .data -O ihex $< $@ +%.bin: %.elf + $(OBJCOPY) -j .text -j .data -O binary $< $@ + +prg: $(PRG).hex + python2 ../megaHidProg -C -c 1000 -t 4 -b $(PRG).bin +