annotate Makefile @ 494:1800a07f20e0

merge
author Matt Johnston <matt@ucc.asn.au>
date Tue, 11 Feb 2014 23:48:35 +0800
parents b73ea78317dc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
306
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 # Name: Makefile
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2 # Author: <insert your name here>
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 # Copyright: <insert your copyright message here>
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4 # License: <insert your license reference here>
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 # This is a prototype Makefile. Modify it according to your needs.
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
7 # You should at least check the settings for
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
8 # DEVICE ....... The AVR device you compile for
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9 # CLOCK ........ Target AVR clock rate in Hertz
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10 # OBJECTS ...... The object files created from your source files. This list is
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
11 # usually the same as the list of source files with suffix ".o".
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12 # PROGRAMMER ... Options to avrdude which define the hardware you use for
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13 # uploading to the AVR and the interface where this hardware
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14 # is connected. We recommend that you leave it undefined and
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 # add settings like this to your ~/.avrduderc file:
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16 # default_programmer = "stk500v2"
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17 # default_serial = "avrdoper"
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
18 # FUSES ........ Parameters for avrdude to flash the fuses appropriately.
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
19
313
139ecb1840fd serial prints something
Matt Johnston <matt@ucc.asn.au>
parents: 312
diff changeset
20 DEVICE = atmega328
139ecb1840fd serial prints something
Matt Johnston <matt@ucc.asn.au>
parents: 312
diff changeset
21 PROGDEVICE = atmega328p
315
7d409dded901 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents: 313
diff changeset
22 CLOCK = 2000000
306
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
23 PROGRAMMER = #-c stk500v2 -P avrdoper
316
8f32eb67a279 reading DS18B20 works
Matt Johnston <matt@ucc.asn.au>
parents: 315
diff changeset
24 PROGRAMMER = -c stk500 -P ~/dev/stk500 -p $(PROGDEVICE) -B 2
318
31199b2941f6 Add simple_ds18b20.c etc
Matt Johnston <matt@ucc.asn.au>
parents: 317
diff changeset
25 SOURCE_1WIRE = onewire.c simple_ds18b20.c crc8.c
317
4ef5ce596ec6 all these optimisations make it 30% smaller
Matt Johnston <matt@ucc.asn.au>
parents: 316
diff changeset
26 SOURCE = main.c
4ef5ce596ec6 all these optimisations make it 30% smaller
Matt Johnston <matt@ucc.asn.au>
parents: 316
diff changeset
27 SOURCE += $(SOURCE_1WIRE)
312
ef64a178092f - Some basic ADC code
Matt Johnston <matt@ucc.asn.au>
parents: 310
diff changeset
28 LIBS = -lm
315
7d409dded901 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents: 313
diff changeset
29
7d409dded901 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents: 313
diff changeset
30 # default but 2mhz
7d409dded901 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents: 313
diff changeset
31 FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x62:m
306
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
32
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
33 # ATMega8 fuse bits used above (fuse bits for other devices are different!):
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
34 # Example for 8 MHz internal oscillator
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
35 # Fuse high byte:
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
36 # 0xd9 = 1 1 0 1 1 0 0 1 <-- BOOTRST (boot reset vector at 0x0000)
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
37 # ^ ^ ^ ^ ^ ^ ^------ BOOTSZ0
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
38 # | | | | | +-------- BOOTSZ1
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
39 # | | | | +---------- EESAVE (set to 0 to preserve EEPROM over chip erase)
315
7d409dded901 Import ds18x20 code
Matt Johnston <matt@ucc.asn.au>
parents: 313
diff changeset
40 # | | | +-------------- WDTON
306
848b0fe159d2 Some basic bits
Matt Johnston <matt@ucc.asn.au>
parents:
diff