0
|
1 # Programs
|
|
2 PROG=avrdude
|
|
3 CC=avr-gcc
|
|
4 OBJCOPY=avr-objcopy
|
|
5
|
|
6 # Options
|
|
7 PART=8515
|
|
8 MCU=at90s${PART}
|
|
9 CFLAGS=-Os -g -mmcu=${MCU} -Wa,-adhlmsn=$(<:.c=.lst) -Wall
|
|
10 LDFLAGS=
|
|
11 LDADD=
|
|
12 RM=rm -f
|
|
13
|
|
14 all: testavr.hex
|
|
15
|
|
16 testavr.hex: testavr.out
|
|
17 ${OBJCOPY} -j .text -j .data -j .bss -O ihex $> $@
|
|
18 # ${OBJCOPY} -j .text -O ihex $> $@
|
|
19
|
|
20 testavr.out: testavr.o 1wire.o
|
|
21 ${CC} ${LDFLAGS} -g -mmcu=${MCU} -o $@ $>
|
|
22
|
|
23 .c.o:
|
|
24 ${CC} ${CFLAGS} -c $> -o $@
|
|
25
|
|
26 clean:
|
|
27 ${RM} testavr.hex testavr.out testavr.o
|
|
28
|
|
29 prog: testavr.hex
|
|
30 ${PROG} -U flash:w:$> -p ${PART} -c alf -E vcc,noreset -q
|