Add Pico 2 W C firmware with Soft-AP and LED blink.
Bring up a minimal cyw43 Soft-AP (powersave disabled) plus USB serial blink example, with Makefile flash/monitor helpers and build ignore. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
47c17dba36
commit
b783d97f13
10 files changed
+699
-1
No files matched your search
+43
@@ -0,0 +1,43 @@
|
||||
# Pico 2 W firmware
|
||||
#
|
||||
# make build | flash | test | reset | monitor | clean
|
||||
# make monitor PORT=/dev/ttyACM0
|
||||
|
||||
PICO_SDK_PATH ?= $(HOME)/pico-sdk
|
||||
CMAKE_PREFIX_PATH ?= $(HOME)/.local
|
||||
BUILD_DIR ?= build
|
||||
TARGET ?= led_hoop
|
||||
PORT ?= /dev/ttyACM0
|
||||
BAUD ?= 115200
|
||||
FLASH_WAIT_S ?= 20
|
||||
|
||||
export PICO_SDK_PATH
|
||||
export PATH := $(HOME)/.local/bin:$(PATH)
|
||||
|
||||
UF2 := $(BUILD_DIR)/$(TARGET).uf2
|
||||
|
||||
.PHONY: all build flash test reset monitor clean
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
cmake -S . -B $(BUILD_DIR) -DCMAKE_PREFIX_PATH=$(CMAKE_PREFIX_PATH)
|
||||
cmake --build $(BUILD_DIR) -j$$(nproc)
|
||||
|
||||
flash: build
|
||||
picotool load -fx $(UF2)
|
||||
|
||||
test: build
|
||||
picotool info $(UF2)
|
||||
|
||||
reset:
|
||||
picotool reboot -af
|
||||
|
||||
monitor:
|
||||
@echo "Waiting for $(PORT)..."
|
||||
@until [ -e "$(PORT)" ]; do sleep 0.25; done
|
||||
@sleep 0.5
|
||||
picocom -b $(BAUD) $(PORT)
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR)
|
||||
Reference in new issue
Block a user