comparison Makefile @ 9:7da9a3f23592

Import ds18x20 code
author Matt Johnston <matt@ucc.asn.au>
date Fri, 18 May 2012 23:57:08 +0800
parents 52cb08a01171
children 1bfe28c348dd
comparison
equal deleted inserted replaced
8:c55321727d02 9:7da9a3f23592
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 = atmega328 20 DEVICE = atmega328
21 PROGDEVICE = atmega328p 21 PROGDEVICE = atmega328p
22 CLOCK = 1000000 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)
25 OBJECTS = main.o #ff.o mmc.o onewire.o 25 OBJS_1WIRE = onewire.o ds18x20.o uart_addon.o crc8.o
26 OBJS_SD = ff.o mmc.o
27 OBJECTS = main.o
28 OBJECTS += $(OBJS_1WIRE)
29 #OBJECTS += OBJS_SD
26 LIBS = -lm 30 LIBS = -lm
27 FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x24:m 31
32 # default but 2mhz
33 FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x62:m
28 34
29 # ATMega8 fuse bits used above (fuse bits for other devices are different!): 35 # ATMega8 fuse bits used above (fuse bits for other devices are different!):
30 # Example for 8 MHz internal oscillator 36 # Example for 8 MHz internal oscillator
31 # Fuse high byte: 37 # Fuse high byte:
32 # 0xd9 = 1 1 0 1 1 0 0 1 <-- BOOTRST (boot reset vector at 0x0000) 38 # 0xd9 = 1 1 0 1 1 0 0 1 <-- BOOTRST (boot reset vector at 0x0000)
33 # ^ ^ ^ ^ ^ ^ ^------ BOOTSZ0 39 # ^ ^ ^ ^ ^ ^ ^------ BOOTSZ0
34 # | | | | | +-------- BOOTSZ1 40 # | | | | | +-------- BOOTSZ1
35 # | | | | +---------- EESAVE (set to 0 to preserve EEPROM over chip erase) 41 # | | | | +---------- EESAVE (set to 0 to preserve EEPROM over chip erase)
36 # | | | +-------------- CKOPT (clock option, depends on oscillator type) 42 # | | | +-------------- WDTON
37 # | | +---------------- SPIEN (if set to 1, serial programming is disabled) 43 # | | +---------------- SPIEN (if set to 1, serial programming is disabled)
38 # | +------------------ WDTON (if set to 0, watchdog is always on) 44 # | +------------------ DWEN
39 # +-------------------- RSTDISBL (if set to 0, RESET pin is disabled) 45 # +-------------------- RSTDISBL (if set to 0, RESET pin is disabled)
40 # Fuse low byte: 46 # Fuse low byte:
41 # 0x24 = 0 0 1 0 0 1 0 0 47 # 0x62 = 0 1 1 0 0 0 1 0
42 # ^ ^ \ / \--+--/ 48 # ^ ^ \ / \--+--/
43 # | | | +------- CKSEL 3..0 (8M internal RC) 49 # | | | +------- CKSEL 3..0 (8M internal RC)
44 # | | +--------------- SUT 1..0 (slowly rising power) 50 # | | +--------------- SUT 1..0 (slowly rising power)
45 # | +------------------ BODEN (if 0, brown-out detector is enabled) 51 # | +------------------ CKOUT
46 # +-------------------- BODLEVEL (if 0: 4V, if 1: 2.7V) 52 # +-------------------- CLKDIV8
47 # 53 #
48 # For computing fuse byte values for other devices and options see 54 # For computing fuse byte values for other devices and options see
49 # the fuse bit calculator at http://www.engbedded.com/fusecalc/ 55 # the fuse bit calculator at http://www.engbedded.com/fusecalc/
50 56
51 57