Revision 89f527ad
Added makefile magic to program bootloader in correct place
scout_avr/bom/Makefile | ||
---|---|---|
12 | 12 |
SRC=bom.c tiny-twi.c |
13 | 13 |
HDR= |
14 | 14 |
FLAGS=-mmcu=$(MCU) -DF_CPU=$(F_CPU)UL -funsigned-char -Os -fpack-struct -Wall |
15 |
BOOT_FLAGS=$(FLAGS) -Wl,-Ttext=0xA00 |
|
16 |
VECT_FLAGS=$(FLAGS) -nostartfiles |
|
15 | 17 |
|
16 | 18 |
default: bom.hex |
17 | 19 |
|
... | ... | |
30 | 32 |
test.elf: test.c tiny-twi-sync.c tiny-twi-sync.h |
31 | 33 |
avr-g++ $(FLAGS) test.c tiny-twi-sync.c -o $@ |
32 | 34 |
|
35 |
bootloader.elf: bootloader.c tiny-twi-sync.c tiny-twi-sync.h |
|
36 |
avr-g++ $(BOOT_FLAGS) bootloader.c tiny-twi-sync.c -o $@ |
|
37 |
|
|
38 |
bootvectors.elf: bootvectors.S |
|
39 |
avr-g++ $(VECT_FLAGS) bootvectors.S -o $@ |
|
40 |
|
|
41 |
burn: bootloader.hex bootvectors.hex |
|
42 |
avrdude -p $(PART) -c $(PROG) -P usb -B 5 -U flash:w:bootloader.hex \ |
|
43 |
-U flash:w:bootvectors.hex |
Also available in: Unified diff