~ubuntu-branches/debian/experimental/arduino/experimental

« back to all changes in this revision

Viewing changes to hardware/arduino/bootloaders/optiboot/Makefile

  • Committer: Package Import Robot
  • Author(s): Scott Howard
  • Date: 2012-03-11 18:19:42 UTC
  • mfrom: (1.1.5) (5.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120311181942-be2clnbz1gcehixb
Tags: 1:1.0.1~rc1+dfsg-1
New upstream release, experimental.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
# program name should not be changed...
20
20
PROGRAM    = optiboot
21
21
 
 
22
# The default behavior is to build using tools that are in the users
 
23
# current path variables, but we can also build using an installed
 
24
# Arduino user IDE setup, or the Arduino source tree.
 
25
# Uncomment this next lines to build within the arduino environment,
 
26
# using the arduino-included avrgcc toolset (mac and pc)
 
27
# ENV ?= arduino
 
28
# ENV ?= arduinodev
 
29
# OS ?= macosx
 
30
# OS ?= windows
 
31
 
 
32
 
22
33
# enter the parameters for the avrdude isp tool
23
34
ISPTOOL    = stk500v2
24
35
ISPPORT    = usb
25
36
ISPSPEED   = -b 115200
26
37
 
27
38
MCU_TARGET = atmega168
28
 
LDSECTION  = --section-start=.text=0x3e00
 
39
LDSECTIONS  = -Wl,--section-start=.text=0x3e00 -Wl,--section-start=.version=0x3ffe
 
40
 
 
41
# Build environments
 
42
# Start of some ugly makefile-isms to allow optiboot to be built
 
43
# in several different environments.  See the README.TXT file for
 
44
# details.
 
45
 
 
46
# default
 
47
fixpath = $(1)
 
48
 
 
49
ifeq ($(ENV), arduino)
 
50
# For Arduino, we assume that we're connected to the optiboot directory
 
51
# included with the arduino distribution, which means that the full set
 
52
# of avr-tools are "right up there" in standard places.
 
53
TOOLROOT = ../../../tools
 
54
GCCROOT = $(TOOLROOT)/avr/bin/
 
55
AVRDUDE_CONF = -C$(TOOLROOT)/avr/etc/avrdude.conf
 
56
 
 
57
ifeq ($(OS), windows)
 
58
# On windows, SOME of the tool paths will need to have backslashes instead
 
59
# of forward slashes (because they use windows cmd.exe for execution instead
 
60
# of a unix/mingw shell?)  We also have to ensure that a consistent shell
 
61
# is used even if a unix shell is installed (ie as part of WINAVR)
 
62
fixpath = $(subst /,\,$1)
 
63
SHELL = cmd.exe
 
64
endif
 
65
 
 
66
else ifeq ($(ENV), arduinodev)
 
67
# Arduino IDE source code environment.  Use the unpacked compilers created
 
68
# by the build (you'll need to do "ant build" first.)
 
69
ifeq ($(OS), macosx)
 
70
TOOLROOT = ../../../../build/macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools
 
71
endif
 
72
ifeq ($(OS), windows)
 
73
TOOLROOT = ../../../../build/windows/work/hardware/tools
 
74
endif
 
75
 
 
76
GCCROOT = $(TOOLROOT)/avr/bin/
 
77
AVRDUDE_CONF = -C$(TOOLROOT)/avr/etc/avrdude.conf
 
78
 
 
79
else
 
80
GCCROOT =
 
81
AVRDUDE_CONF =
 
82
endif
 
83
#
 
84
# End of build environment code.
 
85
 
29
86
 
30
87
# the efuse should really be 0xf8; since, however, only the lower
31
88
# three bits of that byte are used on the atmega168, avrdude gets
33
90
# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/
34
91
#
35
92
# similarly, the lock bits should be 0xff instead of 0x3f (to
36
 
# unlock the bootloader section) and 0xcf instead of 0x0f (to
 
93
# unlock the bootloader section) and 0xcf instead of 0x2f (to
37
94
# lock it), but since the high two bits of the lock byte are
38
95
# unused, avrdude would get confused.
39
96
 
40
 
ISPFUSES    = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
41
 
-e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m
42
 
ISPFLASH    = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
43
 
-U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x0f:m
 
97
ISPFUSES    = $(GCCROOT)avrdude $(AVRDUDE_CONF) -c $(ISPTOOL) \
 
98
              -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
 
99
              -e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m \
 
100
              -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m
 
101
ISPFLASH    = $(GCCROOT)avrdude $(AVRDUDE_CONF) -c $(ISPTOOL) \
 
102
              -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
 
103
              -U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x2f:m
44
104
 
45
105
STK500 = "C:\Program Files\Atmel\AVR Tools\STK500\Stk500.exe"
46
106
STK500-1 = $(STK500) -e -d$(MCU_TARGET) -pf -vf -if$(PROGRAM)_$(TARGET).hex \
53
113
DEFS       = 
54
114
LIBS       =
55
115
 
56
 
CC         = avr-gcc
 
116
CC         = $(GCCROOT)avr-gcc
57
117
 
58
118
# Override is only needed by avr-lib build system.
59
119
 
60
120
override CFLAGS        = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
61
 
override LDFLAGS       = -Wl,$(LDSECTION) -Wl,--relax -nostartfiles
62
 
 
63
 
OBJCOPY        = avr-objcopy
64
 
OBJDUMP        = avr-objdump
 
121
override LDFLAGS       = $(LDSECTIONS) -Wl,--relax -Wl,--gc-sections -nostartfiles -nostdlib
 
122
 
 
123
OBJCOPY        = $(GCCROOT)avr-objcopy
 
124
OBJDUMP        = $(call fixpath,$(GCCROOT)avr-objdump)
 
125
 
 
126
SIZE           = $(GCCROOT)avr-size
 
127
 
 
128
# Test platforms
 
129
# Virtual boot block test
 
130
virboot328: TARGET = atmega328
 
131
virboot328: MCU_TARGET = atmega328p
 
132
virboot328: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DVIRTUAL_BOOT'
 
133
virboot328: AVR_FREQ = 16000000L
 
134
virboot328: LDSECTIONS  = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
 
135
virboot328: $(PROGRAM)_atmega328.hex
 
136
virboot328: $(PROGRAM)_atmega328.lst
65
137
 
66
138
# 20MHz clocked platforms
67
139
#
69
141
#
70
142
 
71
143
pro20: TARGET = pro_20mhz
 
144
pro20: MCU_TARGET = atmega168
72
145
pro20: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
73
146
pro20: AVR_FREQ = 20000000L
74
147
pro20: $(PROGRAM)_pro_20mhz.hex
76
149
 
77
150
pro20_isp: pro20
78
151
pro20_isp: TARGET = pro_20mhz
79
 
pro20_isp: HFUSE = DD # 2.7V brownout
80
 
pro20_isp: LFUSE = C6 # Full swing xtal (20MHz) 258CK/14CK+4.1ms
81
 
pro20_isp: EFUSE = 02 # 512 byte boot
 
152
# 2.7V brownout
 
153
pro20_isp: HFUSE = DD
 
154
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
 
155
pro20_isp: LFUSE = C6
 
156
# 512 byte boot
 
157
pro20_isp: EFUSE = 04
82
158
pro20_isp: isp
83
159
 
84
160
# 16MHz clocked platforms
87
163
#
88
164
 
89
165
pro16: TARGET = pro_16MHz
 
166
pro16: MCU_TARGET = atmega168
90
167
pro16: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
91
168
pro16: AVR_FREQ = 16000000L
92
169
pro16: $(PROGRAM)_pro_16MHz.hex
94
171
 
95
172
pro16_isp: pro16
96
173
pro16_isp: TARGET = pro_16MHz
97
 
pro16_isp: HFUSE = DD # 2.7V brownout
98
 
pro16_isp: LFUSE = C6 # Full swing xtal (20MHz) 258CK/14CK+4.1ms
99
 
pro16_isp: EFUSE = 02 # 512 byte boot
 
174
# 2.7V brownout
 
175
pro16_isp: HFUSE = DD
 
176
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
 
177
pro16_isp: LFUSE = C6
 
178
# 512 byte boot
 
179
pro16_isp: EFUSE = 04
100
180
pro16_isp: isp
101
181
 
102
 
# Diecimila and NG use identical bootloaders
 
182
# Diecimila, Duemilanove with m168, and NG use identical bootloaders
 
183
# Call it "atmega168" for generality and clarity, keep "diecimila" for
 
184
# backward compatibility of makefile
103
185
#
 
186
atmega168: TARGET = atmega168
 
187
atmega168: MCU_TARGET = atmega168
 
188
atmega168: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
 
189
atmega168: AVR_FREQ = 16000000L 
 
190
atmega168: $(PROGRAM)_atmega168.hex
 
191
atmega168: $(PROGRAM)_atmega168.lst
 
192
 
 
193
atmega168_isp: atmega168
 
194
atmega168_isp: TARGET = atmega168
 
195
# 2.7V brownout
 
196
atmega168_isp: HFUSE = DD
 
197
# Low power xtal (16MHz) 16KCK/14CK+65ms
 
198
atmega168_isp: LFUSE = FF
 
199
# 512 byte boot
 
200
atmega168_isp: EFUSE = 04
 
201
atmega168_isp: isp
 
202
 
104
203
diecimila: TARGET = diecimila
 
204
diecimila: MCU_TARGET = atmega168
105
205
diecimila: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
106
206
diecimila: AVR_FREQ = 16000000L 
107
207
diecimila: $(PROGRAM)_diecimila.hex
109
209
 
110
210
diecimila_isp: diecimila
111
211
diecimila_isp: TARGET = diecimila
112
 
diecimila_isp: HFUSE = DD # 2.7V brownout
113
 
diecimila_isp: LFUSE = FF # Low power xtal (16MHz) 16KCK/14CK+65ms
114
 
diecimila_isp: EFUSE = 02 # 512 byte boot
 
212
# 2.7V brownout
 
213
diecimila_isp: HFUSE = DD
 
214
# Low power xtal (16MHz) 16KCK/14CK+65ms
 
215
diecimila_isp: LFUSE = FF
 
216
# 512 byte boot
 
217
diecimila_isp: EFUSE = 04
115
218
diecimila_isp: isp
116
219
 
117
220
atmega328: TARGET = atmega328
118
221
atmega328: MCU_TARGET = atmega328p
119
222
atmega328: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
120
223
atmega328: AVR_FREQ = 16000000L
121
 
atmega328: LDSECTION  = --section-start=.text=0x7e00
 
224
atmega328: LDSECTIONS  = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
122
225
atmega328: $(PROGRAM)_atmega328.hex
123
226
atmega328: $(PROGRAM)_atmega328.lst
124
227
 
125
228
atmega328_isp: atmega328
126
229
atmega328_isp: TARGET = atmega328
127
230
atmega328_isp: MCU_TARGET = atmega328p
128
 
atmega328_isp: HFUSE = DE # 512 byte boot
129
 
atmega328_isp: LFUSE = FF # Low power xtal (16MHz) 16KCK/14CK+65ms
130
 
atmega328_isp: EFUSE = 05 # 2.7V brownout
 
231
# 512 byte boot, SPIEN
 
232
atmega328_isp: HFUSE = DE
 
233
# Low power xtal (16MHz) 16KCK/14CK+65ms
 
234
atmega328_isp: LFUSE = FF
 
235
# 2.7V brownout
 
236
atmega328_isp: EFUSE = 05
131
237
atmega328_isp: isp
132
238
 
 
239
# Sanguino has a minimum boot size of 1024 bytes, so enable extra functions
 
240
#
 
241
sanguino: TARGET = atmega644p
 
242
sanguino: MCU_TARGET = atmega644p
 
243
sanguino: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DBIGBOOT'
 
244
sanguino: AVR_FREQ = 16000000L
 
245
sanguino: LDSECTIONS  = -Wl,--section-start=.text=0xfc00
 
246
sanguino: $(PROGRAM)_atmega644p.hex
 
247
sanguino: $(PROGRAM)_atmega644p.lst
 
248
 
 
249
sanguino_isp: sanguino
 
250
sanguino_isp: TARGET = atmega644p
 
251
sanguino_isp: MCU_TARGET = atmega644p
 
252
# 1024 byte boot
 
253
sanguino_isp: HFUSE = DE
 
254
# Low power xtal (16MHz) 16KCK/14CK+65ms
 
255
sanguino_isp: LFUSE = FF
 
256
# 2.7V brownout
 
257
sanguino_isp: EFUSE = 05
 
258
sanguino_isp: isp
 
259
 
 
260
# Mega has a minimum boot size of 1024 bytes, so enable extra functions
 
261
#mega: TARGET = atmega1280
 
262
mega: MCU_TARGET = atmega1280
 
263
mega: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DBIGBOOT'
 
264
mega: AVR_FREQ = 16000000L
 
265
mega: LDSECTIONS  = -Wl,--section-start=.text=0x1fc00
 
266
mega: $(PROGRAM)_atmega1280.hex
 
267
mega: $(PROGRAM)_atmega1280.lst
 
268
 
 
269
mega_isp: mega
 
270
mega_isp: TARGET = atmega1280
 
271
mega_isp: MCU_TARGET = atmega1280
 
272
# 1024 byte boot
 
273
mega_isp: HFUSE = DE
 
274
# Low power xtal (16MHz) 16KCK/14CK+65ms
 
275
mega_isp: LFUSE = FF
 
276
# 2.7V brownout
 
277
mega_isp: EFUSE = 05
 
278
mega_isp: isp
 
279
 
 
280
# ATmega8
 
281
#
 
282
atmega8: TARGET = atmega8
 
283
atmega8: MCU_TARGET = atmega8
 
284
atmega8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
 
285
atmega8: AVR_FREQ = 16000000L 
 
286
atmega8: LDSECTIONS  = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
 
287
atmega8: $(PROGRAM)_atmega8.hex
 
288
atmega8: $(PROGRAM)_atmega8.lst
 
289
 
 
290
atmega8_isp: atmega8
 
291
atmega8_isp: TARGET = atmega8
 
292
atmega8_isp: MCU_TARGET = atmega8
 
293
# SPIEN, CKOPT, Bootsize=512B
 
294
atmega8_isp: HFUSE = CC
 
295
# 2.7V brownout, Low power xtal (16MHz) 16KCK/14CK+65ms
 
296
atmega8_isp: LFUSE = BF
 
297
atmega8_isp: isp
 
298
 
 
299
# ATmega88
 
300
#
 
301
atmega88: TARGET = atmega88
 
302
atmega88: MCU_TARGET = atmega88
 
303
atmega88: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
 
304
atmega88: AVR_FREQ = 16000000L 
 
305
atmega88: LDSECTIONS  = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe
 
306
atmega88: $(PROGRAM)_atmega88.hex
 
307
atmega88: $(PROGRAM)_atmega88.lst
 
308
 
 
309
atmega88_isp: atmega88
 
310
atmega88_isp: TARGET = atmega88
 
311
atmega88_isp: MCU_TARGET = atmega88
 
312
# 2.7V brownout
 
313
atmega88_isp: HFUSE = DD
 
314
# Low power xtal (16MHz) 16KCK/14CK+65ms
 
315
atemga88_isp: LFUSE = FF
 
316
# 512 byte boot
 
317
atmega88_isp: EFUSE = 04
 
318
atmega88_isp: isp
 
319
 
 
320
 
133
321
# 8MHz clocked platforms
134
322
#
135
323
# These are capable of 115200 baud
136
324
#
137
325
 
138
326
lilypad: TARGET = lilypad
139
 
lilypad: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=115200'
 
327
lilypad: MCU_TARGET = atmega168
 
328
lilypad: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
140
329
lilypad: AVR_FREQ = 8000000L
141
330
lilypad: $(PROGRAM)_lilypad.hex
142
331
lilypad: $(PROGRAM)_lilypad.lst
143
332
 
144
333
lilypad_isp: lilypad
145
334
lilypad_isp: TARGET = lilypad
146
 
lilypad_isp: HFUSE = DD # 2.7V brownout
147
 
lilypad_isp: LFUSE = E2 # Internal 8MHz osc (8MHz) Slow rising power
148
 
lilypad_isp: EFUSE = 02 # 512 byte boot
 
335
# 2.7V brownout
 
336
lilypad_isp: HFUSE = DD
 
337
# Internal 8MHz osc (8MHz) Slow rising power
 
338
lilypad_isp: LFUSE = E2
 
339
# 512 byte boot
 
340
lilypad_isp: EFUSE = 04
149
341
lilypad_isp: isp
150
342
 
151
343
lilypad_resonator: TARGET = lilypad_resonator
152
 
lilypad_resonator: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=115200'
 
344
lilypad_resonator: MCU_TARGET = atmega168
 
345
lilypad_resonator: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
153
346
lilypad_resonator: AVR_FREQ = 8000000L
154
347
lilypad_resonator: $(PROGRAM)_lilypad_resonator.hex
155
348
lilypad_resonator: $(PROGRAM)_lilypad_resonator.lst
156
349
 
157
350
lilypad_resonator_isp: lilypad_resonator
158
351
lilypad_resonator_isp: TARGET = lilypad_resonator
159
 
lilypad_resonator_isp: HFUSE = DD # 2.7V brownout
160
 
lilypad_resonator_isp: LFUSE = C6 # Full swing xtal (20MHz) 258CK/14CK+4.1ms
161
 
lilypad_resonator_isp: EFUSE = 02 # 512 byte boot
 
352
# 2.7V brownout
 
353
lilypad_resonator_isp: HFUSE = DD
 
354
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
 
355
lilypad_resonator_isp: LFUSE = C6
 
356
# 512 byte boot
 
357
lilypad_resonator_isp: EFUSE = 04
162
358
lilypad_resonator_isp: isp
163
359
 
164
360
pro8: TARGET = pro_8MHz
165
 
pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=115200'
 
361
pro8: MCU_TARGET = atmega168
 
362
pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
166
363
pro8: AVR_FREQ = 8000000L
167
364
pro8: $(PROGRAM)_pro_8MHz.hex
168
365
pro8: $(PROGRAM)_pro_8MHz.lst
169
366
 
170
367
pro8_isp: pro8
171
368
pro8_isp: TARGET = pro_8MHz
172
 
pro8_isp: HFUSE = DD # 2.7V brownout
173
 
pro8_isp: LFUSE = C6 # Full swing xtal (20MHz) 258CK/14CK+4.1ms
174
 
pro8_isp: EFUSE = 02 # 512 byte boot
 
369
# 2.7V brownout
 
370
pro8_isp: HFUSE = DD
 
371
# Full swing xtal (20MHz) 258CK/14CK+4.1ms
 
372
pro8_isp: LFUSE = C6
 
373
# 512 byte boot
 
374
pro8_isp: EFUSE = 04
175
375
pro8_isp: isp
176
376
 
177
377
atmega328_pro8: TARGET = atmega328_pro_8MHz
178
378
atmega328_pro8: MCU_TARGET = atmega328p
179
379
atmega328_pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
180
380
atmega328_pro8: AVR_FREQ = 8000000L
181
 
atmega328_pro8: LDSECTION  = --section-start=.text=0x7e00
 
381
atmega328_pro8: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
182
382
atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.hex
183
383
atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.lst
184
384
 
185
385
atmega328_pro8_isp: atmega328_pro8
186
386
atmega328_pro8_isp: TARGET = atmega328_pro_8MHz
187
387
atmega328_pro8_isp: MCU_TARGET = atmega328p
188
 
atmega328_pro8_isp: HFUSE = DE # 512 byte boot
189
 
atmega328_pro8_isp: LFUSE = FF # Low power xtal (16MHz) 16KCK/14CK+65ms
190
 
atmega328_pro8_isp: EFUSE = 05 # 2.7V brownout
 
388
# 512 byte boot, SPIEN
 
389
atmega328_pro8_isp: HFUSE = DE
 
390
# Low power xtal (16MHz) 16KCK/14CK+65ms
 
391
atmega328_pro8_isp: LFUSE = FF
 
392
# 2.7V brownout
 
393
atmega328_pro8_isp: EFUSE = 05
191
394
atmega328_pro8_isp: isp
192
395
 
193
396
# 1MHz clocked platforms
200
403
luminet: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=9600'
201
404
luminet: CFLAGS += '-DVIRTUAL_BOOT_PARTITION'
202
405
luminet: AVR_FREQ = 1000000L
203
 
luminet: LDSECTION  = --section-start=.text=0x1d00
 
406
luminet: LDSECTIONS = -Wl,--section-start=.text=0x1d00 -Wl,--section-start=.version=0x1efe
204
407
luminet: $(PROGRAM)_luminet.hex
205
408
luminet: $(PROGRAM)_luminet.lst
206
409
 
207
410
luminet_isp: luminet
208
411
luminet_isp: TARGET = luminet
209
412
luminet_isp: MCU_TARGET = attiny84
210
 
luminet_isp: HFUSE = DF # Brownout disabled
211
 
luminet_isp: LFUSE = 62 # 1MHz internal oscillator, slowly rising power
212
 
luminet_isp: EFUSE = FE # Self-programming enable
 
413
# Brownout disabled
 
414
luminet_isp: HFUSE = DF
 
415
# 1MHz internal oscillator, slowly rising power
 
416
luminet_isp: LFUSE = 62
 
417
# Self-programming enable
 
418
luminet_isp: EFUSE = FE
213
419
luminet_isp: isp
214
420
 
 
421
#
 
422
# Generic build instructions
 
423
#
 
424
#
 
425
 
215
426
isp: $(TARGET)
216
427
        $(ISPFUSES)
217
428
        $(ISPFLASH)
222
433
 
223
434
%.elf: $(OBJ)
224
435
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
436
        $(SIZE) $@
225
437
 
226
438
clean:
227
439
        rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex
230
442
        $(OBJDUMP) -h -S $< > $@
231
443
 
232
444
%.hex: %.elf
233
 
        $(OBJCOPY) -j .text -j .data -O ihex $< $@
 
445
        $(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O ihex $< $@
234
446
 
235
447
%.srec: %.elf
236
 
        $(OBJCOPY) -j .text -j .data -O srec $< $@
 
448
        $(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O srec $< $@
237
449
 
238
450
%.bin: %.elf
239
 
        $(OBJCOPY) -j .text -j .data -O binary $< $@
 
451
        $(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O binary $< $@