Subversion Repositories HomeAutomation

Rev

Rev 389 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 389 Rev 536
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 = atmega32
41
#MCU = atmega168
42
MCU = atmega88
42
MCU = atmega88
43
#MCU = atmega16
-
 
44
 
43
 
45
 
44
 
46
# Main Oscillator Frequency
45
# Main Oscillator Frequency
47
##F_OSC = 1000000
-
 
48
##F_OSC = 1843200
-
 
49
##F_OSC = 2000000
46
#F_CPU = 8000000
50
##F_OSC = 3686400
-
 
51
##F_OSC = 4000000
-
 
52
F_OSC = 8000000
47
F_CPU = 20000000
53
##F_OSC = 11059200
-
 
54
##F_OSC = 16000000
-
 
55
 
48
 
56
# Output format. (can be srec, ihex, binary)
49
# Output format. (can be srec, ihex, binary)
57
FORMAT = ihex
50
FORMAT = ihex
58
 
51
 
59
 
52
 
60
# Target file name (without extension).
53
# Target file name (without extension).
61
TARGET = main
54
TARGET = main
62
 
55
 
63
LIBDIR = ../lib/src/
56
LIBDIR = ../../lib/src/
64
 
57
 
65
 
58
 
66
# List C source files here. (C dependencies are automatically generated.)
59
# List C source files here. (C dependencies are automatically generated.)
67
SRC =	$(TARGET).c\
60
SRC =	$(TARGET).c\
68
		$(LIBDIR)eth/enc28j60/enc28j60.c\
61
		$(LIBDIR)eth/enc28j60/enc28j60.c\
Line 129... Line 122...
129
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
122
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
130
CFLAGS += -Wall -Wstrict-prototypes
123
CFLAGS += -Wall -Wstrict-prototypes
131
CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
124
CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
132
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
125
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
133
CFLAGS += $(CSTANDARD)
126
CFLAGS += $(CSTANDARD)
134
CFLAGS += -DF_OSC=$(F_OSC)
127
CFLAGS += -DF_CPU=$(F_CPU)
135
 
128
 
136
 
129
 
137
 
130
 
138
# Assembler flags.
131
# Assembler flags.
139
#  -Wa,...:   tell GCC to pass this to the assembler.
132
#  -Wa,...:   tell GCC to pass this to the assembler.
Line 142... Line 135...
142
#             for use in COFF files, additional information about filenames
135
#             for use in COFF files, additional information about filenames
143
#             and function names needs to be present in the assembler source
136
#             and function names needs to be present in the assembler source
144
#             files -- see avr-libc docs [FIXME: not yet described there]
137
#             files -- see avr-libc docs [FIXME: not yet described there]
145
##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs 
138
##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs 
146
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
139
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
147
ASFLAGS += -DF_OSC=$(F_OSC)
140
ASFLAGS += -DF_CPU=$(F_CPU)
148
 
141
 
149
 
142
 
150
#Additional libraries.
143
#Additional libraries.
151
 
144
 
152
# Minimalistic printf version
145
# Minimalistic printf version
Line 196... Line 189...
196
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
189
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
197
#
190
#
198
# Type: avrdude -c ?
191
# Type: avrdude -c ?
199
# to get a full listing.
192
# to get a full listing.
200
#
193
#
201
AVRDUDE_PROGRAMMER = avrispv2
194
AVRDUDE_PROGRAMMER = dragon_isp
202
 
195
 
203
# com1 = serial port. Use lpt1 to connect to parallel port.
196
# com1 = serial port. Use lpt1 to connect to parallel port.
204
AVRDUDE_PORT = /dev/ttyUSB0    # programmer connected to serial device
197
AVRDUDE_PORT = usb    # programmer connected to serial device
205
AVRDUDE_BAUD = 115200
198
AVRDUDE_BAUD = 115200
206
 
199
 
207
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
200
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
208
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
201
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
209
 
202
 
Line 220... Line 213...
220
# Increase verbosity level.  Please use this when submitting bug
213
# Increase verbosity level.  Please use this when submitting bug
221
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> 
214
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> 
222
# to submit bug reports.
215
# to submit bug reports.
223
#AVRDUDE_VERBOSE = -v -v
216
#AVRDUDE_VERBOSE = -v -v
224
 
217
 
225
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -b $(AVRDUDE_BAUD)
218
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
226
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
219
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
227
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
220
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
228
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
221
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
229
 
222
 
230
 
223