projects
/
Arduino-Nano-VA-meter
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0de4054
)
make flash, make serial working
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 15 Oct 2016 18:04:50 +0000
(20:04 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 15 Oct 2016 18:05:11 +0000
(20:05 +0200)
Makefile
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
04c71c3
..
09e7878
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,6
+1,13
@@
-all:
+SERIAL=/dev/ttyUSB0
+
+all: main.hex
+
+main.hex: main.c
avr-gcc -mmcu=atmega328p -Wall -Os -o main.elf main.c -w
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
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
+flash: main.hex
+ avrdude -p m328p -carduino -P$(SERIAL) -b57600 -D -U flash:w:"main.hex":a
+
+serial:
+ microcom -p $(SERIAL) -s 9600