Skip to content

Commit d5d0e5c

Browse files
authored
Getting ready for docs update (#7)
* Update install firmware * Fix firmware file name * Fix readme * Add dev container
1 parent 39723e0 commit d5d0e5c

File tree

3 files changed

+52
-15
lines changed

3 files changed

+52
-15
lines changed

.devcontainer/devcontainer.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"containerEnv": {
3+
"BLINKA_FORCEBOARD": "GENERIC_LINUX_PC",
4+
"BLINKA_FORCECHIP": "GENERIC_X86"
5+
},
6+
"customizations": {
7+
"vscode": {
8+
"extensions": [
9+
"ms-python.python",
10+
"ms-python.vscode-pylance",
11+
"ms-python.isort",
12+
"ms-python.debugpy",
13+
"redhat.vscode-yaml",
14+
"tamasfe.even-better-toml"
15+
]
16+
}
17+
},
18+
"image": "mcr.microsoft.com/devcontainers/python:3.13",
19+
"name": "pysquared-dev",
20+
"postCreateCommand": "make .venv pre-commit-install"
21+
}

Makefile

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
PYSQUARED_VERSION ?= v2.0.0-alpha-25w26-2
22
PYSQUARED ?= git+https://github.com/proveskit/pysquared@$(PYSQUARED_VERSION)
3+
BOARD_MOUNT_POINT ?= ""
4+
BOARD_TTY_PORT ?= ""
5+
VERSION ?= $(shell git tag --points-at HEAD --sort=-creatordate < /dev/null | head -n 1)
36

47
.PHONY: all
58
all: .venv download-libraries pre-commit-install help
@@ -44,9 +47,6 @@ fmt: pre-commit-install ## Lint and format files
4447
typecheck: .venv download-libraries ## Run type check
4548
@$(UV) run -m pyright .
4649

47-
BOARD_MOUNT_POINT ?= ""
48-
VERSION ?= $(shell git tag --points-at HEAD --sort=-creatordate < /dev/null | head -n 1)
49-
5050
.PHONY: install
5151
install-%: build-% ## Install the project onto a connected PROVES Kit use `make install-flight-software BOARD_MOUNT_POINT=/my_board_destination/` to specify the mount point
5252
ifeq ($(OS),Windows_NT)
@@ -57,10 +57,18 @@ else
5757
$(call rsync_to_dest,artifacts/proves/$*,$(BOARD_MOUNT_POINT))
5858
endif
5959

60-
# install-firmware
61-
.PHONY: install-firmware
62-
install-firmware: uv ## Install the board firmware onto a connected PROVES Kit
63-
@$(UVX) --from git+https://github.com/proveskit/[email protected] install-firmware v5a
60+
# install-circuit-python
61+
.PHONY: install-circuit-python
62+
install-circuit-python: arduino-cli circuit-python ## Install the Circuit Python onto a connected PROVES Kit
63+
@$(ARDUINO_CLI) config init || true
64+
@$(ARDUINO_CLI) config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
65+
@$(ARDUINO_CLI) core install rp2040:[email protected]
66+
@$(ARDUINO_CLI) upload -v -b 115200 --fqbn rp2040:rp2040:rpipico -p $(BOARD_TTY_PORT) -i $(CIRCUIT_PYTHON)
67+
68+
.PHONY: list-tty
69+
list-tty: arduino-cli ## List available TTY ports
70+
@echo "TTY ports:"
71+
@$(ARDUINO_CLI) board list | grep "USB" | awk '{print $$1}'
6472

6573
.PHONY: clean
6674
clean: ## Remove all gitignored files such as downloaded libraries and artifacts
@@ -99,11 +107,12 @@ endef
99107
##@ Build Tools
100108
TOOLS_DIR ?= tools
101109
$(TOOLS_DIR):
102-
mkdir -p $(TOOLS_DIR)
110+
@mkdir -p $(TOOLS_DIR)
103111

104112
### Tool Versions
105113
UV_VERSION ?= 0.7.13
106114
MPY_CROSS_VERSION ?= 9.0.5
115+
CIRCUIT_PYTHON_VERSION ?= 9.2.8
107116

108117
UV_DIR ?= $(TOOLS_DIR)/uv-$(UV_VERSION)
109118
UV ?= $(UV_DIR)/uv
@@ -113,6 +122,18 @@ uv: $(UV) ## Download uv
113122
$(UV): $(TOOLS_DIR)
114123
@test -s $(UV) || { mkdir -p $(UV_DIR); curl -LsSf https://astral.sh/uv/$(UV_VERSION)/install.sh | UV_INSTALL_DIR=$(UV_DIR) sh > /dev/null; }
115124

125+
ARDUINO_CLI ?= $(TOOLS_DIR)/arduino-cli
126+
.PHONY: arduino-cli
127+
arduino-cli: $(ARDUINO_CLI) ## Download arduino-cli
128+
$(ARDUINO_CLI): $(TOOLS_DIR)
129+
@test -s $(ARDUINO_CLI) || curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=$(TOOLS_DIR) sh > /dev/null
130+
131+
CIRCUIT_PYTHON ?= $(TOOLS_DIR)/adafruit-circuitpython-proveskit_rp2350_v5a-en_US-$(CIRCUIT_PYTHON_VERSION).uf2
132+
.PHONY: circuit-python
133+
circuit-python: $(CIRCUIT_PYTHON) ## Download Circuit Python firmware
134+
$(CIRCUIT_PYTHON): $(TOOLS_DIR)
135+
@test -s $(CIRCUIT_PYTHON) || curl -o $(CIRCUIT_PYTHON) -fsSL https://raw.githubusercontent.com/proveskit/flight_controller_board/main/Firmware/FC_FIRM_v5a_V1.uf2
136+
116137
UNAME_S := $(shell uname -s)
117138
UNAME_M := $(shell uname -m)
118139

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
# ProvesKit RP2350 v5a CircuitPython Flight Software
1+
# PROVES Kit RP2040 v5a CircuitPython Flight Software and Ground Station
22

33
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
44
![CI](https://github.com/proveskit/CircuitPython_RP2350_v5a/actions/workflows/ci.yaml/badge.svg)
55

6-
Software for the v5a PROVES Kit flight control board.
7-
8-
# Development Getting Started
9-
We welcome contributions, so please feel free to join us. If you have any questions about contributing please open an issue or a discussion.
10-
11-
You can find our Getting Started Guide [here](https://github.com/proveskit/pysquared/blob/main/docs/dev-guide.md).
6+
This is the template repository for v5a PROVES Kit Flight Controller boards. Head to our [docs site](https://proveskit.github.io/pysquared/) to get started.

0 commit comments

Comments
 (0)