aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-05-19 20:47:35 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-05-19 20:47:35 -0400
commit385819e571357b6ce13fe3fa8f7b5909eb7be4cd (patch)
tree81e25b677f384a6a439dbf1929b60a80147ce77f /Makefile
parent3bafdaacc12a708ae0fc30da5d54c3ab5d7b3328 (diff)
added ld-script and made a.ihx primary tgtHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b08c634..b6860f5 100644
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,13 @@
CC = avr-gcc
CFLAGS = -Wall -std=c99 -mmcu=avr5 -O2
LD = avr-ld
-LDFLAGS =
+LDFLAGS = -T ld-script
OBJCOPY = avr-objcopy
OBJS = on.o
+a.ihx: a.out
+
send: a.ihx
avrdude -patmega328p -carduino -U flash:w:a.ihx:i -P/dev/ttyACM0 -v
touch send
@@ -19,8 +21,6 @@ clean:
.out.ihx:
$(OBJCOPY) $< $@ --output-target ihex
-a.ihx: a.out
-
a.out: $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $@