From 0d139e4eca0a992137a4ec93c86aa56518ed1095 Mon Sep 17 00:00:00 2001 From: Kamil Tomaszewski Date: Fri, 11 Oct 2019 11:31:32 +0200 Subject: [PATCH] Add a way to change serial device name --- ports/cxd56/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/cxd56/Makefile b/ports/cxd56/Makefile index c7350a652f..19d8ad1e98 100644 --- a/ports/cxd56/Makefile +++ b/ports/cxd56/Makefile @@ -76,6 +76,8 @@ else MKSPK = $(SPRESENSE_SDK)/sdk/tools/windows/mkspk.exe endif +SERIAL ?= /dev/ttyUSB0 + INC += \ -I. \ -I../.. \ @@ -204,11 +206,11 @@ $(BUILD)/circuitpython.spk: $(BUILD)/circuitpython.elf flash: $(BUILD)/circuitpython.spk $(ECHO) "Writing $< to the board" - $(SPRESENSE_SDK)/sdk/tools/flash.sh -c /dev/ttyUSB0 $(BUILD)/circuitpython.spk + $(SPRESENSE_SDK)/sdk/tools/flash.sh -c $(SERIAL) $(BUILD)/circuitpython.spk flash-bootloader: $(SPRESENSE_SDK) $(FIRMWARE) $(ECHO) "Writing loader to the board" - $(SPRESENSE_SDK)/sdk/tools/flash.sh -l $(FIRMWARE) -c /dev/ttyUSB0 + $(SPRESENSE_SDK)/sdk/tools/flash.sh -l $(FIRMWARE) -c $(SERIAL) include $(TOP)/py/mkrules.mk