targets: flash all flash: all avrdude -P $(FLASHPORT) -p $(MCU) -c $(FLASHDEVTYPE) -U flash:w:$(TARGET).hex setup_config: avrdude -P $(FLASHPORT) -p $(MCU) -c $(FLASHDEVTYPE) -U lfuse:w:0xff:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m # MCU name MCU = atmega88p # Target file name (without extension). TARGET = kcb_a8_v1 # Optimization level (can be 0, 1, 2, 3, s) # (Note: 3 is not always the best optimization level. See avr-libc FAQ) OPT = s # List C source files here. (C dependencies are automatically generated.) SRC = main.c timers.c pin_ctl.c i2c_slave.c SRC += ../lib/devicelock.c ../lib/byte_to_hex.c \ ../lib/sleep.c # List Assembler source files here. ASRC = CFLAGS += -O$(OPT) CFLAGS += -DF_CPU=20000000UL CFLAGS += -Wno-pointer-sign -fwhole-program #CFLAGS += -Wl,--gc-sections -ffunction-sections LDFLAGS += -lm include ../config2.mak