From 79ded4bf468066cbbd500c2b8df9128fb55815dd Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sat, 15 Oct 2016 20:04:50 +0200 Subject: [PATCH 1/1] make flash, make serial working --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 04c71c3..09e7878 100644 --- 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 -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 -- 2.20.1