Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 48 lines (33 sloc) 1.039 kB
217231d first commit
tz authored
1 all: dcimmer.hex
2
3 .SUFFIXES: .elf .hex .eep .lss .sym .upload .dsm .c .s .S .o .l
4
5 CPU=atmega328p
6 #PORT=/dev/rfcomm0
7 PORT=/dev/ttyUSB0
8 #Note: -O will break something, it won't output characters
9 #XTAL=16000000 #OpenLog
10 #XTAL=8000000 #Arduino 3.3v Pro
11 XTAL=14745600 #JPEG Trigger
12 CFLAGS=-g -Os -Wall -mmcu=$(CPU) -DF_CPU=$(XTAL) -I../fat32lib -I../uart -DRXBUFBITS=9 -DTXBUFBITS=5
13 CC=avr-gcc
14
15 .c.o:
16 $(CC) $(CFLAGS) -c $< -o $@
17
18 .S.o:
19 $(CC) $(CFLAGS) -c $< -o $@
20
21 .c.s:
22 $(CC) $(CFLAGS) -S $< -o $@
23
24 .elf.dsm:
25 avr-objdump --disassemble -S $^ >$@
26
27 MAP=-Wl,"-Map" -Wl,"$@.map" -Wl,"--cref"
28
29 .elf.hex:
30 avr-objcopy -O ihex -R .eeprom $^ $@
31
32 clean:
33 rm -f *.eep *.elf *.lss *.sym *.dsm *.o *.a *.d *.hex
34
35 flash: all
36 avrdude -c stk500v1 -b 57600 -P /dev/ttyUSB0 -p m328p -U dcimmer.hex
37
38 ../fat32lib/libfat32.a:
39 make -C ../fat32lib
40
41 uart.o: ../uart/uart.c
42 avr-gcc $(CFLAGS) -Wall -c $^ -o $@
43
44 OBJS := main.o ../fat32lib/sdhc.o uart.o
45
46 dcimmer.elf: $(OBJS) ../fat32lib/libfat32.a
47 $(CC) $(CFLAGS) -o dcimmer.elf $(OBJS) -L../fat32lib -lfat32
Something went wrong with that request. Please try again.