Statistics
| Branch: | Revision:

root / scout_avr / Makefile @ 8969d535

History | View | Annotate | Download (566 Bytes)

1 807483bf Tom Mullins
2
#PART=m128rfa1
3 49090532 Tom Mullins
#MCU=atmega128rfa1
4 807483bf Tom Mullins
5
#PART=m328p
6
#MCU=atmega328
7
8
PART=m2560
9
MCU=atmega2560
10
11
#PROG=avrispMKII
12
PROG=stk600
13
14 49090532 Tom Mullins
F_CPU=8000000
15 88fb3a79 Tom Mullins
SRC=src/*.cpp src/ros_lib/*.cpp
16 cf115e3d Tom Mullins
HDR=src/*.h
17 88fb3a79 Tom Mullins
FLAGS=-Isrc/ros_lib -Isrc -mmcu=$(MCU) -DF_CPU=$(F_CPU)UL -funsigned-char -Os -fpack-struct -Wall
18
19
all: scout_avr.hex
20
21
%.hex: %.elf
22
	avr-objcopy -j .text -j .data -O ihex $< $@
23
24 cf115e3d Tom Mullins
scout_avr.elf: $(SRC) $(HDR)
25 88fb3a79 Tom Mullins
	avr-g++ $(FLAGS) $(SRC) -o scout_avr.elf
26
27 8969d535 Tom Mullins
program: scout_avr.hex
28 807483bf Tom Mullins
	avrdude -p $(PART) -c $(PROG) -P usb -B 1 -F -U flash:w:scout_avr.hex
29 49090532 Tom Mullins
30 88fb3a79 Tom Mullins
clean:
31
	rm -f scout_avr.elf scout_avr.hex