Project

General

Profile

Statistics
| Branch: | Revision:

scoutos / scout_avr / bom / Makefile @ c7445989

History | View | Annotate | Download (393 Bytes)

1
#PART=m328p
2
#MCU=atmega328
3

    
4
PART=t85
5
MCU=attiny85
6

    
7
PROG=avrispMKII
8

    
9
F_CPU=1000000
10

    
11
SRC=bom.c
12
HDR=
13
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
	avrdude -p $(PART) -c $(PROG) -P usb -B 5 -U flash:w:bom.hex