changeset 17:bbe75f183cf9

Allow path to toolchain to be specified.
author Daniel O'Connor <darius@dons.net.au>
date Tue, 08 Jan 2013 09:55:53 +1030
parents 3aac1bb54918
children 0876867347de
files Makefile.avr
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.avr	Tue Jan 08 09:55:23 2013 +1030
+++ b/Makefile.avr	Tue Jan 08 09:55:53 2013 +1030
@@ -9,10 +9,11 @@
 _CPUCFLAGS=
 
 # Programs
-AS=avr-as
-CC=avr-gcc
-OBJCOPY=avr-objcopy
-OBJDUMP=avr-objdump
+TPREFIX?=
+AS=${TPREFIX}/avr-as
+CC=${TPREFIX}/avr-gcc
+OBJCOPY=${TPREFIX}/avr-objcopy
+OBJDUMP=${TPREFIX}/avr-objdump
 SED=sed
 TAIL=tail
 
@@ -31,7 +32,8 @@
 PROGTYPE?=alf
 
 # Need the -B 1 or it is very slow. For slow clocks (eg factory fused) -B 10 works
-PROGOPTS+=-B 10
+# For BP programming this is intolerably slow
+#PROGOPTS+=-B 1
 
 .if defined(WITH_FUSES)
 FUSEFILE=${PROG}.fuse
@@ -53,7 +55,9 @@
 _PROGPORT=-P ${PROGPORT}
 .endif
 
-PROGOPTS+=-p ${PART} -c ${PROGTYPE} ${_PROGPORT} ${_PROGEXITS} -q -U flash:w:${PROG}.hex ${PROGEXTRA}
+PROGPART?=${PART}
+
+PROGOPTS+=-p ${PROGPART} -c ${PROGTYPE} ${_PROGPORT} ${_PROGEXITS} -U flash:w:${PROG}.hex ${PROGEXTRA}
 
 .if !defined(SRCS)
 SRCS=	${PROG}.c