From 7f7ee20c2451b40d4eda5f0d82888726ed995f60 Mon Sep 17 00:00:00 2001 From: Stefan Rupp Date: Sat, 8 Mar 2014 23:49:16 +0100 Subject: [PATCH] add prg target to makefile and change F_CPU to 20MHz --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 +