Skip to content

Commit 535cca3

Browse files
committed
make: correct tinygo update, and add task for pico power cycling
Signed-off-by: deadprogram <[email protected]>
1 parent 4556408 commit 535cca3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Makefile

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TARGET_GOVERSION := go1.19.5
1+
TARGET_GOVERSION := go1.20
22
GOINSTALLED := $(shell command -v go 2> /dev/null)
33
CURRENT_GOVERSION := $(shell go version | awk '{print $$3}')
44
TARGET_TINYGOVERSION := 0.26.0
@@ -80,7 +80,6 @@ test-stm32f407disco: build/testrunner
8080
./build/testrunner /dev/ttyUSB0 115200 3
8181

8282
update-go:
83-
@test "$(CURRENT_GOVERSION)" = "$(TARGET_GOVERSION)" && ( echo "$(RED)$(TARGET_GOVERSION) has already been installed$(NOCOLOR)\n" ; exit 1 )
8483
wget "https://dl.google.com/go/$(TARGET_GOVERSION).linux-amd64.tar.gz" -O /tmp/go.tar.gz
8584
sudo rm -rf /usr/local/go
8685
sudo tar -xzf /tmp/go.tar.gz -C /usr/local
@@ -109,7 +108,7 @@ endif
109108

110109
update-tinygo:
111110
wget "https://github.com/tinygo-org/tinygo/releases/download/v$(TARGET_TINYGOVERSION)/tinygo$(TARGET_TINYGOVERSION).linux-amd64.tar.gz" -O /tmp/tinygo.tar.gz
112-
tar -xzf /tmp/tinygo.tar.gz -C /usr/local
111+
sudo tar -xzf /tmp/tinygo.tar.gz -C /usr/local
113112

114113
install-bossa:
115114
sudo apt install build-essential libreadline-dev libwxgtk3.0-*
@@ -245,5 +244,14 @@ powercycle-circuitplay-express:
245244
@sleep 3.0s
246245
@uhubctl -l 1-3.4 -a on -p 1
247246

247+
powercycle-pico:
248+
@uhubctl -l 1-4.4 -a off -p 1
249+
DEV="/sys/bus/usb/devices/1-4.4.1/"; \
250+
if [ -d $$DEV ]; then \
251+
sudo udevadm trigger --action=remove $$DEV ; \
252+
fi
253+
@sleep 3.0s
254+
@uhubctl -l 1-4.4 -a on -p 1
255+
248256
# powercycle-maixbit:
249257
# @uhubctl -l 1-2 -a cycle -p 1

0 commit comments

Comments
 (0)