comparison Makefile @ 33:a3de303afabf

Add compiled bootloader
author Matt Johnston <matt@ucc.asn.au>
date Thu, 27 Jun 2013 11:46:44 +0800
parents bd9ce7e581ec
children b210df11f968
comparison
equal deleted inserted replaced
32:bd9ce7e581ec 33:a3de303afabf
26 SOURCE_CRYPTO = hmac-sha1.c sha1-asm.S aes.c 26 SOURCE_CRYPTO = hmac-sha1.c sha1-asm.S aes.c
27 SOURCE_SD = byteordering.c fat.c partition.c sd_raw.c 27 SOURCE_SD = byteordering.c fat.c partition.c sd_raw.c
28 SOURCE = main.c 28 SOURCE = main.c
29 SOURCE += $(SOURCE_CRYPTO) $(SOURCE_SD) 29 SOURCE += $(SOURCE_CRYPTO) $(SOURCE_SD)
30 LIBS = 30 LIBS =
31 BOOTLOADER_HEX = ATmegaBOOT_168_pihelp.hex
31 32
32 OBJECTS := $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(SOURCE))) 33 OBJECTS := $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(SOURCE)))
33 34
34 # default but 2mhz 35 # default but 2mhz
35 FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x77:m -U efuse:w:0xfd:m 36 FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x77:m -U efuse:w:0xfd:m
98 $(COMPILE) -S $< -o $@ 99 $(COMPILE) -S $< -o $@
99 100
100 flash: all 101 flash: all
101 $(AVRDUDE) -U flash:w:main.hex:i 102 $(AVRDUDE) -U flash:w:main.hex:i
102 103
104 combined.hex: main.hex $(BOOTLOADER_HEX)
105 srec_cat main.hex -I $(BOOTLOADER_HEX) -I -o $@ -I
106
107 combo: combined.hex
108 $(AVRDUDE) -U flash:w:combined.hex:i
109
103 checkprog: 110 checkprog:
104 $(AVRDUDE) -v 111 $(AVRDUDE) -v
105 112
106 fuse: 113 fuse:
107 $(AVRDUDE) $(FUSES) 114 $(AVRDUDE) $(FUSES)