Mercurial > pihelp
comparison Makefile @ 30:320c8cc7df5a
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 27 Jun 2013 00:12:01 +0800 |
parents | 22badb6239e0 ce5097eacf2f |
children | bd9ce7e581ec |
comparison
equal
deleted
inserted
replaced
29:22badb6239e0 | 30:320c8cc7df5a |
---|---|
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 = atmega328 | 20 DEVICE = atmega328p |
21 PROGDEVICE = atmega328p | 21 PROGDEVICE = atmega328p |
22 CLOCK = 4915200L | 22 CLOCK = 11059200L |
23 PROGRAMMER = #-c stk500v2 -P avrdoper | 23 PROGRAMMER = #-c stk500v2 -P avrdoper |
24 PROGRAMMER = -c stk500 -P ~/dev/stk500 -p $(PROGDEVICE) -B 2 | 24 PROGRAMMER = -c stk500 -P ~/dev/stk500 -p $(PROGDEVICE) -B 2 |
25 SOURCE_1WIRE = onewire.c simple_ds18b20.c crc8.c | 25 SOURCE_1WIRE = onewire.c simple_ds18b20.c crc8.c |
26 SOURCE_CRYPTO = hmac-sha1.c sha1-asm.S aes.c | 26 SOURCE_CRYPTO = hmac-sha1.c sha1-asm.S aes.c |
27 SOURCE = main.c | 27 SOURCE = main.c |
28 SOURCE += $(SOURCE_CRYPTO) | 28 SOURCE += $(SOURCE_CRYPTO) $(SOURCE_SD) |
29 LIBS = -lm | 29 LIBS = |
30 | |
31 OBJECTS := $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(SOURCE))) | |
30 | 32 |
31 # default but 2mhz | 33 # default but 2mhz |
32 FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x77:m -U efuse:w:0xfd:m | 34 FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x77:m -U efuse:w:0xfd:m |
33 | 35 |
34 #LOCKBIT | 36 #LOCKBIT |
69 # For computing fuse byte values for other devices and options see | 71 # For computing fuse byte values for other devices and options see |
70 # the fuse bit calculator at http://www.engbedded.com/fusecalc/ | 72 # the fuse bit calculator at http://www.engbedded.com/fusecalc/ |
71 | 73 |
72 | 74 |
73 # Tune the lines below only if you know what you are doing: | 75 # Tune the lines below only if you know what you are doing: |
76 | |
77 SHELL := /bin/bash | |
78 export PATH := $(PATH):/usr/local/CrossPack-AVR/bin/ | |
74 | 79 |
75 AVRDUDE = avrdude $(PROGRAMMER) | 80 AVRDUDE = avrdude $(PROGRAMMER) |
76 #COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -g -std=c99 -mcall-prologues -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,--relax -fwhole-program -Wl,-u,vfprintf -lprintf_flt -lm | 81 #COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -g -std=c99 -mcall-prologues -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,--relax -fwhole-program -Wl,-u,vfprintf -lprintf_flt -lm |
77 COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -g -std=c99 -Wl,-u,vfprintf -lprintf_flt -lm | 82 COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -g -std=c99 -Wl,-u,vfprintf -lprintf_flt -lm |
78 | 83 |