Skip to content

Commit 936dfc5

Browse files
committed
docs: Update CONTRIBUTING with prerequisites and devcontainer details.
1 parent 2d3f314 commit 936dfc5

1 file changed

Lines changed: 25 additions & 4 deletions

File tree

CONTRIBUTING.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,40 @@ docs: Update README driver table.
8383
test(mcp23009e): Add mock scenarios for mcp23009e driver.
8484
```
8585

86+
## Prerequisites
87+
88+
For local development (without dev container):
89+
90+
* Python 3.10+
91+
* Node.js 22+ (for husky, commitlint, lint-staged, semantic-release)
92+
* `arm-none-eabi-gcc` toolchain (for `make firmware`)
93+
* OpenOCD (for `make deploy`)
94+
* `mpremote` (installed via `pip install -e ".[test]"`)
95+
* GitHub CLI (`gh`)
96+
97+
Then run `make setup` to install all dependencies and git hooks.
98+
8699
## Dev Container
87100

88-
A dev container is available for VS Code and GitHub Codespaces. It provides Python 3.10, Node.js 20, ruff, pytest, mpremote, arm-none-eabi-gcc, OpenOCD, and the GitHub CLI — everything needed to lint, test, and build firmware.
101+
A dev container is available for VS Code and GitHub Codespaces. It includes all prerequisites out of the box: Python 3.10, Node.js 22, ruff, pytest, mpremote, arm-none-eabi-gcc, OpenOCD, and the GitHub CLI.
89102

90103
1. Open the repository in VS Code
91104
2. When prompted, click **Reopen in Container** (or use the command palette: *Dev Containers: Reopen in Container*)
92105
3. The container runs `make setup` automatically on creation
93106

94-
All `make` targets work inside the container. Hardware tests and firmware flashing require USB passthrough to the STeaMi board.
107+
The container also provides:
108+
109+
* **zsh + oh-my-zsh** as default shell with persistent shell history
110+
* **Pylance** configured with MicroPython STM32 stubs (no false `import machine` errors)
111+
* **Serial Monitor** extension for board communication
112+
* **USB passthrough** for mpremote, OpenOCD, and firmware flashing (the container runs in privileged mode with `/dev/bus/usb` mounted)
113+
* **udev rules** for the DAPLink interface (auto-started on container creation)
114+
115+
All `make` targets work inside the container.
95116

96117
## Workflow
97118

98-
1. Set up your environment: `make setup`
119+
1. Set up your environment: open in the dev container, or run `make setup` locally
99120
2. Create a branch from main (format: `feat/`, `fix/`, `docs/`, `tooling/`, `ci/`, `test/`, `style/`, `chore/`, `refactor/`)
100121
3. Write your code and add tests in `tests/scenarios/<driver>.yaml`
101122
4. Run `make ci` to verify everything passes (lint + tests + examples)
@@ -152,7 +173,7 @@ The firmware source is cloned into `.build/micropython-steami/` (gitignored). A
152173

153174
Use `make firmware` for normal rebuilds from the existing local clone. Use `make firmware-update` only when you want to refresh the `micropython-steami` checkout itself or resync the board-specific submodules before rebuilding.
154175

155-
**Requirements**: `arm-none-eabi-gcc` toolchain, OpenOCD for flashing, and `mpremote` for running scripts on the board.
176+
All these tools are included in the dev container. For local development, see the [Prerequisites](#prerequisites) section.
156177

157178
## Notes
158179

0 commit comments

Comments
 (0)