diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-07-28 09:37:02 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-07-28 09:37:02 -0700 |
commit | e94223d4b5db34b407a72f9aed56fe3ef4eeec75 (patch) | |
tree | f73eea9df6ec6ffe2252d393850b7625d435f786 /firmware | |
parent | 3288048fe443b47d19d340e47fe555539746f511 (diff) | |
parent | 1d1dd415a958fa6f2a7aac06cf4026a8d387a9f2 (diff) | |
download | uhd-e94223d4b5db34b407a72f9aed56fe3ef4eeec75.tar.gz uhd-e94223d4b5db34b407a72f9aed56fe3ef4eeec75.tar.bz2 uhd-e94223d4b5db34b407a72f9aed56fe3ef4eeec75.zip |
Merge branch 'maint'
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/e300/battery/Makefile | 8 | ||||
-rw-r--r-- | firmware/e300/battery/main.c | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/firmware/e300/battery/Makefile b/firmware/e300/battery/Makefile index c2d530e36..1ce0bf279 100644 --- a/firmware/e300/battery/Makefile +++ b/firmware/e300/battery/Makefile @@ -39,17 +39,18 @@ MMCU = attiny88 PROGRAMMER = jtag3isp PORT = usb AVRDUDE = avrdude -p $(MMCU) -c $(PROGRAMMER) -P $(PORT) -V +FUSES = -U hfuse:w:hfuse.hex:i -U lfuse:w:lfuse.hex:i -U efuse:w:efuse.hex:i -u ################################################## # Global Targets ################################################## -all: $(TARGET).hex size +all: $(TARGET).hex size hfuse.hex lfuse.hex efuse.hex clean: $(RM) *.o *.elf *.hex install: all - $(AVRDUDE) -U flash:w:$(TARGET).hex:i + $(AVRDUDE) -U flash:w:$(TARGET).hex:i $(FUSES) size: $(TARGET).hex @$(SIZE) --format=SysV --mcu=$(MMCU) $(TARGET).elf @@ -67,6 +68,9 @@ lfuse.hex: fuses.hex hfuse.hex: fuses.hex $(SREC) $< -Intel -crop 0x01 0x02 -offset -0x01 -O $@ -Intel +efuse.hex: fuses.hex + $(SREC) $< -Intel -crop 0x02 0x03 -offset -0x02 -O $@ -Intel + $(TARGET).hex: $(TARGET).elf $(OBJCOPY) -R .eeprom -R .fuse -O ihex $< $@ diff --git a/firmware/e300/battery/main.c b/firmware/e300/battery/main.c index eec9e8293..723816924 100644 --- a/firmware/e300/battery/main.c +++ b/firmware/e300/battery/main.c @@ -35,6 +35,7 @@ FUSES = { .low = (FUSE_CKSEL0 & FUSE_SUT0), .high = (FUSE_EESAVE & FUSE_SPIEN), + .extended = EFUSE_DEFAULT, }; |