X-Git-Url: https://git.cryptolib.org/?p=labortage2013badge.git;a=blobdiff_plain;f=firmware%2FMakefile;h=9ac89eb402258bef24099804659473183b6ede09;hp=2172ea9a0df602b32a900129be794d9279c072c1;hb=be0fb736ad08109eabef073bcc32c3fa1bda7a1b;hpb=06016b0f48e8407fdc6000735d310b84fd1fd0bc diff --git a/firmware/Makefile b/firmware/Makefile index 2172ea9..9ac89eb 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -7,17 +7,18 @@ # License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) # This Revision: $Id: Makefile 692 2008-11-07 15:07:40Z cs $ -DEVICE = attiny45 #attiny45 +DEVICE = attiny85 #attiny45 F_CPU = 16500000 FUSE_L = 0xe1# 1110.0001 FUSE_H = 0x9d# 1001.1101 +FUSE_E = 0xfe# 1111.1110 #AVRDUDE = avrdude -c avr910 -P /dev/ttyUSB0 -p $(DEVICE) # edit this line for your programmer AVRDUDE_ISP = avrdude -c jtag2isp -P usb -p $(DEVICE) # edit this line for your programmer AVRDUDE_DW = avrdude -c jtag2dw -P usb -p $(DEVICE) # edit this line for your programmer CFLAGS = -Iusbdrv -I. -DDEBUG_LEVEL=0 OBJECTS = usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o \ - special_functions.o + sha1-asm.o hmac-sha1.o hotp.o special_functions.o COMPILE = avr-gcc -Wall -Os -DF_CPU=$(F_CPU) $(CFLAGS) -mmcu=$(DEVICE) COMPILEPP = avr-g++ -Wall -Os -DF_CPU=$(F_CPU) $(CFLAGS) -mmcu=$(DEVICE) @@ -40,9 +41,9 @@ xprog_d: fuse flash_dw # rule for programming fuse bits: fuse: - @[ "$(FUSE_H)" != "" -a "$(FUSE_L)" != "" ] || \ + @[ "$(FUSE_H)" != "" -a "$(FUSE_L)" != "" -a "$(FUSE_E)" != "" ] || \ { echo "*** Edit Makefile and choose values for FUSE_L and FUSE_H!"; exit 1; } - $(AVRDUDE_ISP) -U hfuse:w:$(FUSE_H):m -U lfuse:w:$(FUSE_L):m + $(AVRDUDE_ISP) -U hfuse:w:$(FUSE_H):m -U lfuse:w:$(FUSE_L):m -U efuse:w:$(FUSE_E):m # rule for uploading firmware: flash_isp: main.hex