From d7ea6ad1cbcfaec12393a5789e0eef34e56c77b9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 15 Dec 2017 15:00:02 +0100 Subject: Arduino Nano: Allow ovverriding port / prog. baud rate --- src/arch/arduino-nano/Makefile.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/arch/arduino-nano') diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc index e8ecd82..68e040f 100644 --- a/src/arch/arduino-nano/Makefile.inc +++ b/src/arch/arduino-nano/Makefile.inc @@ -2,6 +2,8 @@ MCU = atmega328p PROGRAMMER ?= usbasp +PORT = /dev/ttyUSB0 +BAUD = 57600 INCLUDES += -Iinclude/arduino-nano COMMON_FLAGS += -mmcu=${MCU} -DF_CPU=16000000UL @@ -29,12 +31,12 @@ build/system.hex: build/system.elf ${OBJCOPY} -O ihex ${@:.hex=.elf} $@ program: build/system.hex - avrdude -p ${MCU} -c arduino -P /dev/ttyUSB0 -b 57600 -U flash:w:build/system.hex + avrdude -p ${MCU} -c arduino -P ${PORT} -b ${BAUD} -U flash:w:build/system.hex arch_clean: rm -f ${OBJECTS} build/system.hex monitor: - screen /dev/ttyUSB0 115200 + screen ${PORT} 115200 .PHONY: arch_clean monitor program -- cgit v1.2.3