comparison Makefile.avr @ 2:43d3b2bef999

Make the programmer code smarter, default to Dragon.
author darius@Inchoate
date Wed, 11 Mar 2009 17:10:13 +1030
parents f5022e20d550
children 5f21a1c8ca06
comparison
equal deleted inserted replaced
1:f5022e20d550 2:43d3b2bef999
15 OBJDUMP=avr-objdump 15 OBJDUMP=avr-objdump
16 16
17 # Tell as to generate listings 17 # Tell as to generate listings
18 CPPFLAGS+=-Wa,-adhlmsn=${<:T:S/.c/.lst/} 18 CPPFLAGS+=-Wa,-adhlmsn=${<:T:S/.c/.lst/}
19 19
20 MCU?=at90s8515 20 MCU?=notset
21 CFLAGS+=-mmcu=${MCU} 21 CFLAGS+=-mmcu=${MCU}
22 22
23 LDFLAGS+=-Wl,-Map=${PROG}.map,--cref 23 LDFLAGS+=-Wl,-Map=${PROG}.map,--cref
24 LDFLAGS+=${LDADD} 24 LDFLAGS+=${LDADD}
25 25
26 RM=rm -f 26 RM=rm -f
27 27
28 PROGRAMMER=avrdude 28 PROGRAMMER=avrdude
29 PROGOPTS?=-p ${PART} -c alf -E vcc,noreset -q 29 PROGTYPE?=alf
30 # Need the -B 1 or it is very slow. For slow clocks (eg factory fused) -B 10 works
31 PROGEXTRA?=-B 1
32
33 .if ${PROGTYPE} != "dragon_isp" && ${PROGTYPE} != "dragon_jtag"
34 PROGEXITS?=vcc,noreset
35 .endif
36
37 .if defined(PROGEXITS) && ${PROGEXITS} != ""
38 _PROGEXITS=-E ${PROGEXITS}
39 .endif
40 .if defined(PROGPORT) && ${PROGPORT} != ""
41 _PROGPORT=-P ${PROGPORT}
42 .endif
43
44 PROGOPTS?=-p ${PART} -c ${PROGTYPE} ${_PROGPORT} ${_PROGEXITS} -q ${PROGEXTRA}
30 45
31 .if !defined(SRCS) 46 .if !defined(SRCS)
32 SRCS= ${PROG}.c 47 SRCS= ${PROG}.c
33 .endif 48 .endif
34 49