comparison Makefile @ 316:8f32eb67a279

reading DS18B20 works add some linker optimisations
author Matt Johnston <matt@ucc.asn.au>
date Sat, 19 May 2012 17:10:13 +0800
parents 7d409dded901
children 06bedbe8540d
comparison
equal deleted inserted replaced
315:7d409dded901 316:8f32eb67a279
19 19
20 DEVICE = atmega328 20 DEVICE = atmega328
21 PROGDEVICE = atmega328p 21 PROGDEVICE = atmega328p
22 CLOCK = 2000000 22 CLOCK = 2000000
23 PROGRAMMER = #-c stk500v2 -P avrdoper 23 PROGRAMMER = #-c stk500v2 -P avrdoper
24 PROGRAMMER = -c stk500 -P ~/dev/stk500 -p $(PROGDEVICE) 24 PROGRAMMER = -c stk500 -P ~/dev/stk500 -p $(PROGDEVICE) -B 2
25 OBJS_1WIRE = onewire.o ds18x20.o uart_addon.o crc8.o 25 OBJS_1WIRE = onewire.o ds18x20.o uart_addon.o crc8.o uart.o
26 OBJS_SD = ff.o mmc.o 26 OBJS_SD = ff.o mmc.o
27 OBJECTS = main.o 27 OBJECTS = main.o
28 OBJECTS += $(OBJS_1WIRE) 28 OBJECTS += $(OBJS_1WIRE)
29 #OBJECTS += OBJS_SD 29 #OBJECTS += OBJS_SD
30 LIBS = -lm 30 LIBS = -lm
56 56
57 57
58 # Tune the lines below only if you know what you are doing: 58 # Tune the lines below only if you know what you are doing:
59 59
60 AVRDUDE = avrdude $(PROGRAMMER) 60 AVRDUDE = avrdude $(PROGRAMMER)
61 COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -g -std=c99 -mcall-prologues 61 COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -g -std=c99 -mcall-prologues -fdata-sections -ffunction-sections -Wl,--print-gc-sections -Wl,--gc-sections -Wl,--relax
62 62
63 # symbolic targets: 63 # symbolic targets:
64 all: main.hex 64 all: main.hex
65 65
66 .c.o: 66 .c.o: