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