aboutsummaryrefslogtreecommitdiff
path: root/asm/blinkdelay/makefile
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2021-06-05 11:10:23 +0000
committerrodri <rgl@antares-labs.eu>2021-06-05 11:10:23 +0000
commitedf5f145013aa28ffbc7f19f874cd489a92f8449 (patch)
tree05a7dfdae1b63a79bdfbb1fab84af35a51b5b99c /asm/blinkdelay/makefile
downloadavrtoys-master.tar.gz
avrtoys-master.tar.bz2
avrtoys-master.zip
public release.HEADmaster
Diffstat (limited to 'asm/blinkdelay/makefile')
-rw-r--r--asm/blinkdelay/makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/asm/blinkdelay/makefile b/asm/blinkdelay/makefile
new file mode 100644
index 0000000..4ad8b12
--- /dev/null
+++ b/asm/blinkdelay/makefile
@@ -0,0 +1,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