Skip to content

Commit 0d139e4

Browse files
committed
Add a way to change serial device name
1 parent c062990 commit 0d139e4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ports/cxd56/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ else
7676
MKSPK = $(SPRESENSE_SDK)/sdk/tools/windows/mkspk.exe
7777
endif
7878

79+
SERIAL ?= /dev/ttyUSB0
80+
7981
INC += \
8082
-I. \
8183
-I../.. \
@@ -204,11 +206,11 @@ $(BUILD)/circuitpython.spk: $(BUILD)/circuitpython.elf
204206

205207
flash: $(BUILD)/circuitpython.spk
206208
$(ECHO) "Writing $< to the board"
207-
$(SPRESENSE_SDK)/sdk/tools/flash.sh -c /dev/ttyUSB0 $(BUILD)/circuitpython.spk
209+
$(SPRESENSE_SDK)/sdk/tools/flash.sh -c $(SERIAL) $(BUILD)/circuitpython.spk
208210

209211
flash-bootloader: $(SPRESENSE_SDK) $(FIRMWARE)
210212
$(ECHO) "Writing loader to the board"
211-
$(SPRESENSE_SDK)/sdk/tools/flash.sh -l $(FIRMWARE) -c /dev/ttyUSB0
213+
$(SPRESENSE_SDK)/sdk/tools/flash.sh -l $(FIRMWARE) -c $(SERIAL)
212214

213215
include $(TOP)/py/mkrules.mk
214216

0 commit comments

Comments
 (0)