diff options
author | Daniel Friesel <derf@finalrewind.org> | 2017-12-15 15:00:02 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2017-12-15 15:00:02 +0100 |
commit | d7ea6ad1cbcfaec12393a5789e0eef34e56c77b9 (patch) | |
tree | 5dc530decc5233532b1f1c2fd10a96df91d6bf50 | |
parent | 972126fd2406030dbd3abd1a705bb0ae1af9abb3 (diff) |
Arduino Nano: Allow ovverriding port / prog. baud rate
-rw-r--r-- | src/arch/arduino-nano/Makefile.inc | 6 |
1 files changed, 4 insertions, 2 deletions
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 |