# HG changeset patch # User darius@Inchoate # Date 1236753613 -37800 # Node ID 43d3b2bef9991862c587b69a0ab71a48af5d6538 # Parent f5022e20d5500b6045b6b0f52856d2be583a07db Make the programmer code smarter, default to Dragon. diff -r f5022e20d550 -r 43d3b2bef999 Makefile.avr --- a/Makefile.avr Wed Mar 11 16:58:26 2009 +1030 +++ b/Makefile.avr Wed Mar 11 17:10:13 2009 +1030 @@ -17,7 +17,7 @@ # Tell as to generate listings CPPFLAGS+=-Wa,-adhlmsn=${<:T:S/.c/.lst/} -MCU?=at90s8515 +MCU?=notset CFLAGS+=-mmcu=${MCU} LDFLAGS+=-Wl,-Map=${PROG}.map,--cref @@ -26,7 +26,22 @@ RM=rm -f PROGRAMMER=avrdude -PROGOPTS?=-p ${PART} -c alf -E vcc,noreset -q +PROGTYPE?=alf +# Need the -B 1 or it is very slow. For slow clocks (eg factory fused) -B 10 works +PROGEXTRA?=-B 1 + +.if ${PROGTYPE} != "dragon_isp" && ${PROGTYPE} != "dragon_jtag" +PROGEXITS?=vcc,noreset +.endif + +.if defined(PROGEXITS) && ${PROGEXITS} != "" +_PROGEXITS=-E ${PROGEXITS} +.endif +.if defined(PROGPORT) && ${PROGPORT} != "" +_PROGPORT=-P ${PROGPORT} +.endif + +PROGOPTS?=-p ${PART} -c ${PROGTYPE} ${_PROGPORT} ${_PROGEXITS} -q ${PROGEXTRA} .if !defined(SRCS) SRCS= ${PROG}.c