root / scout_avr / bom / Makefile @ c7445989
History | View | Annotate | Download (393 Bytes)
1 | c7445989 | Tom Mullins | #PART=m328p |
---|---|---|---|
2 | #MCU=atmega328 |
||
3 | |||
4 | PART=t85 |
||
5 | MCU=attiny85 |
||
6 | f572eaeb | Tom Mullins | |
7 | PROG=avrispMKII |
||
8 | |||
9 | F_CPU=1000000 |
||
10 | |||
11 | c7445989 | Tom Mullins | SRC=bom.c |
12 | HDR= |
||
13 | f572eaeb | Tom Mullins | FLAGS=-mmcu=$(MCU) -DF_CPU=$(F_CPU)UL -funsigned-char -Os -fpack-struct -Wall |
14 | |||
15 | default: bom.hex |
||
16 | |||
17 | %.hex: %.elf |
||
18 | avr-objcopy -j .text -j .data -O ihex $< $@ |
||
19 | |||
20 | bom.elf: $(SRC) $(HDR) |
||
21 | avr-g++ $(FLAGS) $(SRC) -o bom.elf |
||
22 | |||
23 | program: bom.hex |
||
24 | c7445989 | Tom Mullins | avrdude -p $(PART) -c $(PROG) -P usb -B 5 -U flash:w:bom.hex |