From daeb7bf2c61f5d827fcab553703f2bce39dddd96 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 24 May 2022 13:40:23 -0700 Subject: [PATCH] Add support for rebooting a board already running kaleidoscope by calling "device.reset" with focus --- etc/makefiles/sketch.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/makefiles/sketch.mk b/etc/makefiles/sketch.mk index 04ce394b..45feb4ce 100644 --- a/etc/makefiles/sketch.mk +++ b/etc/makefiles/sketch.mk @@ -193,6 +193,8 @@ endif flashing_instructions = $(call _arduino_prop,build.flashing_instructions) +_device_port = $(shell $(ARDUINO_CLI) board list --format=text | grep $(FQBN) |cut -d' ' -f 1 | xargs -n 1) + flash: ${HEX_FILE_PATH} ifneq ($(flashing_instructions),) $(info $(shell printf $(flashing_instructions))) @@ -203,6 +205,7 @@ endif $(info When you're ready to proceed, press 'Enter'.) $(info ) @$(shell read _) + $(QUIET) echo "device.reset" > $(_device_port) $(QUIET) $(ARDUINO_CLI) upload --fqbn $(FQBN) \ $(shell $(ARDUINO_CLI) board list --format=text | grep $(FQBN) |cut -d' ' -f 1 | xargs -n 1 echo "--port" ) \ --input-dir "${OUTPUT_PATH}" \