build using make
[Arduino-Nano-VA-meter] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..04c71c3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,6 @@
+all:
+       avr-gcc -mmcu=atmega328p -Wall -Os -o main.elf main.c -w
+       avr-objcopy -j .text -j .data -O ihex main.elf main.hex
+
+flash:
+       avrdude -c usbtiny -p m328p -U flash:w:"main.hex":a