Subversion Repositories HomeAutomation

Rev

Rev 664 | Rev 1115 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 664 Rev 932
Line 36... Line 36...
36
# - DEPFLAGS according to Eric Weddingtion's fix (avrfreaks/gcc-forum)
36
# - DEPFLAGS according to Eric Weddingtion's fix (avrfreaks/gcc-forum)
37
# - F_OSC Define in CFLAGS and AFLAGS
37
# - F_OSC Define in CFLAGS and AFLAGS
38
 
38
 
39
 
39
 
40
# MCU name
40
# MCU name
41
#MCU = atmega168
41
MCU = atmega168
42
MCU = atmega88
42
HIGHFUSE=0xdc
-
 
43
LOWFUSE=0xe0
-
 
44
EXTFUSE=0x01
43
 
45
 
44
 
46
 
45
# Main Oscillator Frequency
47
# for using the same system.inc we use BIOSDIR and BIOSTARGET for setting the correct file to flash
46
#now defined in config.h
48
# flash:w:$(BIOSDIR)/$(BIOSTARGET).hex
47
#F_CPU = 8000000
49
BIOSDIR = .
48
#F_CPU = 20000000
50
BIOSTARGET = main
-
 
51
include ../../personal/system.inc
-
 
52
 
49
 
53
 
50
# Output format. (can be srec, ihex, binary)
54
# Output format. (can be srec, ihex, binary)
51
FORMAT = ihex
55
FORMAT = ihex
52
 
56
 
53
 
57
 
Line 135... Line 139...
135
#             for use in COFF files, additional information about filenames
139
#             for use in COFF files, additional information about filenames
136
#             and function names needs to be present in the assembler source
140
#             and function names needs to be present in the assembler source
137
#             files -- see avr-libc docs [FIXME: not yet described there]
141
#             files -- see avr-libc docs [FIXME: not yet described there]
138
##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs 
142
##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs 
139
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
143
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
140
#ASFLAGS += -DF_CPU=$(F_CPU)
144
#ASFLAGS += -DF_OSC=$(F_OSC)
141
 
145
 
142
 
146
 
143
#Additional libraries.
147
#Additional libraries.
144
 
148
 
145
# Minimalistic printf version
149
# Minimalistic printf version
146
PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
150
PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
147
 
151
 
148
# Floating point printf version (requires MATH_LIB = -lm below)
152
# Floating point printf version (requires MATH_LIB = -lm below)
149
PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
153
PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
150
 
154
 
151
PRINTF_LIB = $(PRINTF_LIB_MIN)
155
PRINTF_LIB = 
152
 
156
 
153
# Minimalistic scanf version
157
# Minimalistic scanf version
154
SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
158
SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
155
 
159
 
156
# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
160
# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
Line 180... Line 184...
180
LDFLAGS += $(EXTMEMOPTS)
184
LDFLAGS += $(EXTMEMOPTS)
181
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
185
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
182
 
186
 
183
 
187
 
184
 
188
 
-
 
189
## HomeAutomation-users: settings are moved to system.inc ##
185
 
190
 
186
# Programming support using avrdude. Settings and variables.
191
# Programming support using avrdude. Settings and variables.
187
 
192
 
188
# Programming hardware: alf avr910 avrisp bascom bsd 
193
# Programming hardware: alf avr910 avrisp bascom bsd 
189
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
194
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
190
#
195
#
191
# Type: avrdude -c ?
196
# Type: avrdude -c ?
192
# to get a full listing.
197
# to get a full listing.
193
#
198
#
194
AVRDUDE_PROGRAMMER = dragon_isp
199
#AVRDUDE_PROGRAMMER = avrispmkII
195
 
200
 
196
# com1 = serial port. Use lpt1 to connect to parallel port.
201
# com1 = serial port. Use lpt1 to connect to parallel port.
197
AVRDUDE_PORT = usb    # programmer connected to serial device
202
#AVRDUDE_PORT = usb    # programmer connected to serial device
198
AVRDUDE_BAUD = 115200
203
#AVRDUDE_BAUD = 115200
199
 
204
 
200
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex -b $(AVRDUDE_BAUD)
205
#AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
201
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
206
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
202
 
207
 
203
 
208
 
204
# Uncomment the following if you want avrdude's erase cycle counter.
209
# Uncomment the following if you want avrdude's erase cycle counter.
205
# Note that this counter needs to be initialized first using -Yn,
210
# Note that this counter needs to be initialized first using -Yn,
Line 213... Line 218...
213
# Increase verbosity level.  Please use this when submitting bug
218
# Increase verbosity level.  Please use this when submitting bug
214
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> 
219
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> 
215
# to submit bug reports.
220
# to submit bug reports.
216
#AVRDUDE_VERBOSE = -v -v
221
#AVRDUDE_VERBOSE = -v -v
217
 
222
 
218
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
223
#AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -b $(AVRDUDE_BAUD)
219
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
224
#AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
220
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
225
#AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
221
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
226
#AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
222
 
227
 
223
 
228
 
224
 
229
 
225
# ---------------------------------------------------------------------------
230
# ---------------------------------------------------------------------------
226
 
231
 
Line 237... Line 242...
237
CC = avr-gcc
242
CC = avr-gcc
238
OBJCOPY = avr-objcopy
243
OBJCOPY = avr-objcopy
239
OBJDUMP = avr-objdump
244
OBJDUMP = avr-objdump
240
SIZE = avr-size
245
SIZE = avr-size
241
NM = avr-nm
246
NM = avr-nm
242
AVRDUDE = avrdude
247
#AVRDUDE = avrdude
243
REMOVE = rm -f
248
REMOVE = rm -f
244
COPY = cp
249
COPY = cp
245
 
250
 
246
 
251
 
247
 
252
 
Line 329... Line 334...
329
# Display compiler version information.
334
# Display compiler version information.
330
gccversion : 
335
gccversion : 
331
	@$(CC) --version
336
	@$(CC) --version
332
 
337
 
333
 
338
 
-
 
339
# Program the device.  
-
 
340
install: $(TARGET).hex $(TARGET).eep
-
 
341
	$(UPLOAD) $(ULFLAGS)
334
 
342
 
335
# Program the device.  
343
# Program the device.  
336
program: $(TARGET).hex $(TARGET).eep
344
program: $(TARGET).hex $(TARGET).eep
-
 
345
	$(UPLOAD) $(ULFLAGS)
337
	$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
346
#	$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
338
 
347
 
339
#programlock: 
348
#programlock: 
340
#	$(AVRDUDE) $(AVRDUDE_FLAGS) -U lock:w:0x00:m
349
#	$(AVRDUDE) $(AVRDUDE_FLAGS) -U lock:w:0x00:m
341
 
350
 
342
#programinit: 
351
#programinit: