root / scout_avr / Makefile @ cf115e3d
History | View | Annotate | Download (475 Bytes)
1 |
#MCU=atmega128rfa1 |
---|---|
2 |
MCU=atmega328 |
3 |
F_CPU=8000000 |
4 |
SRC=src/*.cpp src/ros_lib/*.cpp |
5 |
HDR=src/*.h |
6 |
FLAGS=-Isrc/ros_lib -Isrc -mmcu=$(MCU) -DF_CPU=$(F_CPU)UL -funsigned-char -Os -fpack-struct -Wall |
7 |
|
8 |
all: scout_avr.hex |
9 |
|
10 |
%.hex: %.elf |
11 |
avr-objcopy -j .text -j .data -O ihex $< $@ |
12 |
|
13 |
scout_avr.elf: $(SRC) $(HDR) |
14 |
avr-g++ $(FLAGS) $(SRC) -o scout_avr.elf |
15 |
|
16 |
download: scout_avr.hex |
17 |
avrdude -p m328p -c avrispMKII -P usb -F -U flash:w:scout_avr.hex |
18 |
|
19 |
clean: |
20 |
rm -f scout_avr.elf scout_avr.hex |