Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions circuit-python-passthrough/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,24 @@ download-libraries: uv ## Download CircuitPython libraries needed for passthroug

CIRCUIT_PYTHON ?= ./firmware.uf2
BOARD ?=
CIRCUIT_PYTHON_SOURCE_BOARD = $(if $(filter v5e,$(BOARD)),v5d,$(BOARD))

.PHONY: circuit-python
circuit-python: ## Download Circuit Python firmware. Usage: make circuit-python BOARD={v5a|v5b|v5c|v5d}
circuit-python: ## Download CircuitPython firmware. Usage: make circuit-python BOARD={v5a|v5b|v5c|v5d|v5e}
@if [ -z "$(BOARD)" ]; then \
echo "Error: BOARD is not set"; \
echo "Usage: make circuit-python BOARD={v5a|v5b|v5c|v5d}"; \
echo "Usage: make circuit-python BOARD={v5a|v5b|v5c|v5d|v5e}"; \
exit 1; \
fi
@case "$(BOARD)" in \
v5a|v5b|v5c|v5d) ;; \
*) echo "Error: Invalid board '$(BOARD)'. Must be one of: v5a, v5b, v5c, v5d"; exit 1;; \
v5a|v5b|v5c|v5d|v5e) ;; \
*) echo "Error: Invalid board '$(BOARD)'. Must be one of: v5a, v5b, v5c, v5d, v5e"; exit 1;; \
esac
@echo "Downloading Circuit Python firmware for board $(BOARD)..."
@curl -o $(CIRCUIT_PYTHON) -fsSL https://raw.githubusercontent.com/proveskit/flight_controller_board/main/Firmware/FC_FIRM_$(BOARD)_V1.uf2
@if [ "$(BOARD)" = "v5e" ]; then \
echo "Board v5e currently uses the compatible v5d CircuitPython firmware."; \
fi
@echo "Downloading CircuitPython firmware for board $(BOARD)..."
@curl -o "$(CIRCUIT_PYTHON)" -fsSL https://raw.githubusercontent.com/proveskit/flight_controller_board/main/Firmware/FC_FIRM_$(CIRCUIT_PYTHON_SOURCE_BOARD)_V1.uf2
@echo "Firmware downloaded successfully to $(CIRCUIT_PYTHON)"

.PHONY: clean
Expand Down
18 changes: 16 additions & 2 deletions circuit-python-passthrough/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@

This folder holds the code necessary to set up a flight controller board to act as a GDS ground station passthrough. To install to a board, cd into this directory and run:

```
```sh
make install {sband|lora} BOARD_MOUNT_POINT={path to board}
```

You can also use the `make circuit-python` command to get the CircuitPython firmware for the board you are using.
Power-cycle the board after the first install. The USB data serial endpoint is
enabled by `boot.py` and is not created by a CircuitPython soft reload.

The LoRa passthrough auto-detects the SX1276 used on boards through v5d and
the SX1262-based E22-400M30S used on v5e.

Download the CircuitPython firmware for a board with:

```sh
make circuit-python BOARD={v5a|v5b|v5c|v5d|v5e}
```

The v5e command currently downloads the compatible v5d CircuitPython image.
The LoRa passthrough accesses the v5e radio GPIOs directly, so it does not
depend on v5e-specific CircuitPython board aliases.
Loading
Loading