From 385819e571357b6ce13fe3fa8f7b5909eb7be4cd Mon Sep 17 00:00:00 2001
From: Holden Rohrer
Date: Tue, 19 May 2020 20:47:35 -0400
Subject: added ld-script and made a.ihx primary tgt
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'Makefile')
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 $@
--
cgit