-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.1284
139 lines (123 loc) · 3.82 KB
/
Makefile.1284
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#
# 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