X-Git-Url: http://git.rot13.org/?p=Arduino-Nano-VA-meter;a=blobdiff_plain;f=Makefile;h=71b5d2798507c99f57c1b8aae6962a392c1e0a50;hp=04c71c34876f1185daab57d1db16c2219f8e6f82;hb=a6d6ddef708bd8d085e2b66aceda37e0895abf88;hpb=b6536024cb302ae33a03d4ee3c719998454b64de diff --git a/Makefile b/Makefile index 04c71c3..71b5d27 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,16 @@ -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 -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 + +trend: + microcom -p $(SERIAL) -s 9600 | trend -geometry 800x200 -v -c1a -c2a -L V,A - 600x1