comparison Makefile @ 7:52cb08a01171

serial prints something
author Matt Johnston <matt@ucc.asn.au>
date Fri, 18 May 2012 19:15:40 +0800
parents 9d538f674ff0
children 7da9a3f23592
comparison
equal deleted inserted replaced
6:9d538f674ff0 7:52cb08a01171
15 # add settings like this to your ~/.avrduderc file: 15 # add settings like this to your ~/.avrduderc file:
16 # default_programmer = "stk500v2" 16 # default_programmer = "stk500v2"
17 # default_serial = "avrdoper" 17 # default_serial = "avrdoper"
18 # FUSES ........ Parameters for avrdude to flash the fuses appropriately. 18 # FUSES ........ Parameters for avrdude to flash the fuses appropriately.
19 19
20 DEVICE = atmega168 20 DEVICE = atmega328
21 PROGDEVICE = atmega328p
21 CLOCK = 1000000 22 CLOCK = 1000000
22 PROGRAMMER = #-c stk500v2 -P avrdoper 23 PROGRAMMER = #-c stk500v2 -P avrdoper
23 OBJECTS = main.o ff.o mmc.o onewire.o 24 PROGRAMMER = -c stk500 -P ~/dev/stk500 -p $(PROGDEVICE)
25 OBJECTS = main.o #ff.o mmc.o onewire.o
24 LIBS = -lm 26 LIBS = -lm
25 FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x24:m 27 FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x24:m
26 28
27 # ATMega8 fuse bits used above (fuse bits for other devices are different!): 29 # ATMega8 fuse bits used above (fuse bits for other devices are different!):
28 # Example for 8 MHz internal oscillator 30 # Example for 8 MHz internal oscillator
47 # the fuse bit calculator at http://www.engbedded.com/fusecalc/ 49 # the fuse bit calculator at http://www.engbedded.com/fusecalc/
48 50
49 51
50 # Tune the lines below only if you know what you are doing: 52 # Tune the lines below only if you know what you are doing:
51 53
52 AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE) 54 AVRDUDE = avrdude $(PROGRAMMER)
53 COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -g -std=c99 -mcall-prologues 55 COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -g -std=c99 -mcall-prologues
54 56
55 # symbolic targets: 57 # symbolic targets:
56 all: main.hex 58 all: main.hex
57 59