summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9eba3af
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
1CC = avr-gcc
2CFLAGS = -O2 -Wall -Wextra -Werror -mmcu=atmega328p
3OBJCOPY = avr-objcopy
4
5all:
6 ${CC} ${CFLAGS} main.c
7 ${OBJCOPY} -j .text -j .data -O ihex a.out main.hex
8 rm -f a.out
9
10flash: all
11 avrdude -p atmega328p -c arduino -P /dev/ttyACM0 -b 115200 -U flash:w:main.hex:i