Skip to content

Commit

Permalink
auto program
Browse files Browse the repository at this point in the history
  • Loading branch information
mkellner committed Feb 20, 2021
1 parent d4830d7 commit 7e11db6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions build/devices/pico/config/programmingMode
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

VENDOR_ID=$1
PRODUCT_ID=$2
VOLUME_NAME=$3

if [[ ! -d $VOLUME_NAME ]]
then
serial2xsbug ${VENDOR_ID}:${PRODUCT_ID} 921600 8N1 -programming
echo -n "Waiting for ${VOLUME_NAME}."
while [ ! -d "${VOLUME_NAME}" ]; do
echo -n "."
sleep 1
done
sleep 1
echo
fi

4 changes: 2 additions & 2 deletions tools/mcconfig/make.pico.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ ifeq ($(HOST_OS),Darwin)
UF2_VOLUME_PATH = /Volumes/$(UF2_VOLUME_NAME)
UF2CONV = $(MODDABLE)/build/devices/pico/config/elf2uf2_mac

PROGRAMMING_MODE = $(PLATFORM_DIR)/config/waitForVolume $(UF2_VOLUME_PATH)
# PROGRAMMING_MODE = $(PLATFORM_DIR)/config/programmingMode $(PICO_VID) $(PICO_PID) $(UF2_VOLUME_PATH)
# PROGRAMMING_MODE = $(PLATFORM_DIR)/config/waitForVolume $(UF2_VOLUME_PATH)
PROGRAMMING_MODE = $(PLATFORM_DIR)/config/programmingMode $(PICO_VID) $(PICO_PID) $(UF2_VOLUME_PATH)
KILL_SERIAL_2_XSBUG = $(shell pkill serial2xsbug)

ifeq ($(DEBUG),1)
Expand Down

0 comments on commit 7e11db6

Please sign in to comment.