# # Makefile for 40-pin AVR chips, including ATmega644 and ATmega1284 # # * Copyright 2013-2015 by Bill Westfield. Part of Optiboot. # * This software is licensed under version 2 of the Gnu Public Licence. # * See optiboot.c for details. # Chip level targets # atmega644p: TARGET = atmega644p atmega644p: MCU_TARGET = atmega644p atmega644p: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT atmega644p: AVR_FREQ ?= 16000000L atmega644p: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe atmega644p: CFLAGS += $(UART_CMD) atmega644p: $(PROGRAM)_atmega644p.hex atmega644p: $(PROGRAM)_atmega644p.lst atmega1284: TARGET = atmega1284p atmega1284: MCU_TARGET = atmega1284p atmega1284: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT atmega1284: AVR_FREQ ?= 16000000L atmega1284: LDSECTIONS = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe atmega1284: CFLAGS += $(UART_CMD) atmega1284: $(PROGRAM)_atmega1284p.hex atmega1284: $(PROGRAM)_atmega1284p.lst atmega1284p: atmega1284 atmega1284_isp: atmega1284 atmega1284_isp: TARGET = atmega1284p atmega1284_isp: MCU_TARGET = atmega1284p # 1024 byte boot atmega1284_isp: HFUSE ?= DE # Full Swing xtal (16MHz) 16KCK/14CK+65ms atmega1284_isp: LFUSE ?= F7 # 2.7V brownout atmega1284_isp: EFUSE ?= FD atmega1284_isp: isp # # Board-level targets # # Sanguino has a minimum boot size of 1024 bytes, so enable extra functions # sanguino: TARGET = $@ sanguino: CHIP = atmega644p sanguino: $(MAKE) $(CHIP) AVR_FREQ=16000000L LED=B0 mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst sanguino_isp: sanguino sanguino_isp: TARGET = sanguino sanguino_isp: MCU_TARGET = atmega644p # 1024 byte boot sanguino_isp: HFUSE ?= DE # Full swing xtal (16MHz) 16KCK/14CK+65ms sanguino_isp: LFUSE ?= F7 # 2.7V brownout sanguino_isp: EFUSE ?= FD sanguino_isp: isp mighty1284: TARGET = $@ mighty1284: CHIP = atmega1284p mighty1284: $(MAKE) $(CHIP) AVR_FREQ=16000000L LED=B7 mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst mighty1284_isp: mighty1284 mighty1284_isp: TARGET = mighty1284 mighty1284_isp: MCU_TARGET = atmega1284p # 1024 byte boot mighty1284_isp: HFUSE ?= DE # Full swing xtal (16MHz) 16KCK/14CK+65ms mighty1284_isp: LFUSE ?= F7 # 2.7V brownout mighty1284_isp: EFUSE ?= FD mighty1284_isp: isp bobuino: TARGET = $@ bobuino: CHIP = atmega1284p bobuino: $(MAKE) $(CHIP) AVR_FREQ=16000000L LED=B7 mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst bobuino_isp: bobuino bobuino_isp: TARGET = bobuino bobuino_isp: MCU_TARGET = atmega1284p # 1024 byte boot bobuino_isp: HFUSE ?= DE # Full swing xtal (16MHz) 16KCK/14CK+65ms bobuino_isp: LFUSE ?= F7 # 2.7V brownout bobuino_isp: EFUSE ?= FD bobuino_isp: isp # # Wicked Devices "Wildfire" boards (1284 with wireless!) # wildfirev2: TARGET = $@ wildfirev2: CHIP = atmega1284p wildfirev2: $(MAKE) $(CHIP) AVR_FREQ=16000000L LED=B7 BAUD_RATE=1000000 mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst wildfirev2_isp: wildfirev2 wildfirev2_isp: TARGET = wildfirev2 wildfirev2_isp: MCU_TARGET = atmega1284p # 1024 byte boot wildfirev2_isp: HFUSE ?= DE # Full swing xtal (16MHz) 16KCK/14CK+65ms wildfirev2_isp: LFUSE ?= F7 # 2.7V brownout wildfirev2_isp: EFUSE ?= FD wildfirev2_isp: isp wildfirev3: TARGET = $@ wildfirev3: CHIP = atmega1284p wildfirev3: $(MAKE) $(CHIP) AVR_FREQ=16000000L LED=B5 mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst wildfirev3_isp: wildfirev3 wildfirev3_isp: TARGET = wildfirev3 wildfirev3_isp: MCU_TARGET = atmega1284p # 1024 byte boot wildfirev3_isp: HFUSE ?= DE # Full swing xtal (16MHz) 16KCK/14CK+65ms wildfirev3_isp: LFUSE ?= F7 # 2.7V brownout wildfirev3_isp: EFUSE ?= FD wildfirev3_isp: isp