aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: ce838c562f7edc0bb5e468a2c4ae720ddc2e9cc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
MCU = atmega88
CFLAGS=-Os -Wall -Wextra

all: sanduhr.hex

sanduhr.elf: main.c i2c.c i2c.h uart.c uart.h timer.c timer.h gyro.c gyro.h accel.c accel.h common.h speaker.c speaker.h pwm.c pwm.h ui.c ui.h
	avr-gcc -std=gnu99 -mmcu=$(MCU) $(CFLAGS) -o $@ $^

sanduhr.hex: sanduhr.elf
	avr-objcopy -O ihex -R .eeprom $< $@

program: sanduhr.hex
	avrdude -p m88 -c avrispmkII -U flash:w:sanduhr.hex  -v -P usb

terminal:
	avrdude -p m88 -c avrispmkII -t -v -P usb