aboutsummaryrefslogtreecommitdiff
path: root/asm/blinkdelay/makefile
blob: 4ad8b121f4d8508a5235a890c0d4e759de1e7ef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CC=avr-gcc
AS=avr-as

PORT=/dev/ttyACM0
TARG=blink

all: build

build:
	$(CC) -mmcu=atmega328p -o $(TARG).elf $(TARG).s
	avr-objcopy -j .text -j .data -O ihex $(TARG).elf $(TARG).hex

burn:
	avrdude -v -p atmega328p -c arduino -P $(PORT) -b 115200 -D -U flash:w:$(TARG).hex

clean:
	rm -f $(TARG).elf $(TARG).hex