Mercurial > ~darius > hgwebdir.cgi > avr-lib
comparison Makefile.avr @ 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 | 4e10d1eef9a5 |
children | b5e4591b6570 |
comparison
equal
deleted
inserted
replaced
16:3aac1bb54918 | 17:bbe75f183cf9 |
---|---|
7 # Otherwise we get -march=foo | 7 # Otherwise we get -march=foo |
8 NO_CPU_CFLAGS= | 8 NO_CPU_CFLAGS= |
9 _CPUCFLAGS= | 9 _CPUCFLAGS= |
10 | 10 |
11 # Programs | 11 # Programs |
12 AS=avr-as | 12 TPREFIX?= |
13 CC=avr-gcc | 13 AS=${TPREFIX}/avr-as |
14 OBJCOPY=avr-objcopy | 14 CC=${TPREFIX}/avr-gcc |
15 OBJDUMP=avr-objdump | 15 OBJCOPY=${TPREFIX}/avr-objcopy |
16 OBJDUMP=${TPREFIX}/avr-objdump | |
16 SED=sed | 17 SED=sed |
17 TAIL=tail | 18 TAIL=tail |
18 | 19 |
19 # Tell as to generate listings | 20 # Tell as to generate listings |
20 CPPFLAGS+=-Wa,-adhlmsn=${<:T:S/.c/.lst/} | 21 CPPFLAGS+=-Wa,-adhlmsn=${<:T:S/.c/.lst/} |
29 | 30 |
30 PROGRAMMER=avrdude | 31 PROGRAMMER=avrdude |
31 PROGTYPE?=alf | 32 PROGTYPE?=alf |
32 | 33 |
33 # Need the -B 1 or it is very slow. For slow clocks (eg factory fused) -B 10 works | 34 # Need the -B 1 or it is very slow. For slow clocks (eg factory fused) -B 10 works |
34 PROGOPTS+=-B 10 | 35 # For BP programming this is intolerably slow |
36 #PROGOPTS+=-B 1 | |
35 | 37 |
36 .if defined(WITH_FUSES) | 38 .if defined(WITH_FUSES) |
37 FUSEFILE=${PROG}.fuse | 39 FUSEFILE=${PROG}.fuse |
38 PROGOPTS+=`cat ${PROG}.fuse` | 40 PROGOPTS+=`cat ${PROG}.fuse` |
39 .elf.fuse: | 41 .elf.fuse: |
51 .endif | 53 .endif |
52 .if defined(PROGPORT) && ${PROGPORT} != "" | 54 .if defined(PROGPORT) && ${PROGPORT} != "" |
53 _PROGPORT=-P ${PROGPORT} | 55 _PROGPORT=-P ${PROGPORT} |
54 .endif | 56 .endif |
55 | 57 |
56 PROGOPTS+=-p ${PART} -c ${PROGTYPE} ${_PROGPORT} ${_PROGEXITS} -q -U flash:w:${PROG}.hex ${PROGEXTRA} | 58 PROGPART?=${PART} |
59 | |
60 PROGOPTS+=-p ${PROGPART} -c ${PROGTYPE} ${_PROGPORT} ${_PROGEXITS} -U flash:w:${PROG}.hex ${PROGEXTRA} | |
57 | 61 |
58 .if !defined(SRCS) | 62 .if !defined(SRCS) |
59 SRCS= ${PROG}.c | 63 SRCS= ${PROG}.c |
60 .endif | 64 .endif |
61 | 65 |