A small USV for ALIX boards with i2c support
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. PRG = alix-usv
  2. OBJ = alix-usv.o eeprom.o usi-i2c-slave.o
  3. MCU_TARGET = attiny84
  4. OPTIMIZE = -Os
  5. DEFS =
  6. LIBS =
  7. # Override is only needed by avr-lib build system.
  8. override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
  9. override LDFLAGS = -Wl,-Map,$(PRG).map
  10. CC = avr-gcc
  11. OBJCOPY = avr-objcopy
  12. OBJDUMP = avr-objdump
  13. SIZE = avr-size
  14. all: $(PRG).elf lst text
  15. $(SIZE) -x -A $(PRG).elf
  16. $(PRG).elf: $(OBJ)
  17. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
  18. clean:
  19. rm -rf *.o *.lst *.map $(PRG).elf *.hex *.bin
  20. lst: $(PRG).lst
  21. %.lst: %.elf
  22. $(OBJDUMP) -h -S $< > $@
  23. text: hex bin
  24. hex: $(PRG).hex
  25. bin: $(PRG).bin
  26. %.hex: %.elf
  27. $(OBJCOPY) -j .text -j .data -O ihex $< $@
  28. %.bin: %.elf
  29. $(OBJCOPY) -j .text -j .data -O binary $< $@
  30. install: text
  31. avrdude -c dragon_isp -P usb -p t84 -U flash:w:$(PRG).hex
  32. # no self programming, 2.7V BOD, 8MHz internal RC Osz.
  33. fuses:
  34. avrdude -c dragon_isp -P usb -p t84 -U lfuse:w:0xc2:m -U hfuse:w:0xdd:m -U efuse:w:0xff:m