ワンクリックで
pins
GPIO pin-assignment rules for Raiden Pico (RP2350). Invoke whenever you add, change, move, or claim a GPIO pin — e.g. editing pin
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
GPIO pin-assignment rules for Raiden Pico (RP2350). Invoke whenever you add, change, move, or claim a GPIO pin — e.g. editing pin
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Firmware-change discipline for Raiden Pico — ANY change to the firmware (src/*.c, src/*.pio, include/*.h that alters the built raiden_pico.uf2's behavior or output) MUST bump the firmware version string in the SAME change. The version is what the VERSION command prints, in src/command_parser.c. Invoke whenever you edit firmware source, or are about to build + flash a firmware change.
CLI discipline for Raiden Pico. (1) Every command/sub-command/argument MUST emit an explicit error on unrecognized, mistyped, or malformed input — never silently no-op or fall through to a wrong/default branch. (2) Every CLI add/change/rename MUST update the config_none pytest regression tests AND the docs/HELP in the same change. Invoke whenever you add, change, rename, or review a CLI command path in src/command_parser.c (verbs, sub-commands, argument parsing, dispatch branches) or the matchers in command_parser_match / match_and_replace.
Keep requirements.txt and requirements-dev.txt in sync with the actual third-party Python imports across the repo. Invoke whenever you add, remove, or move a Python `import` of a non-stdlib package in any .py file — especially before committing changes that touch .py files. The repo's dependency graph on GitHub reads these manifests.
Fetch open GitHub issues for the current repo so we catch problems users have reported. Use at least once per working day, ideally at the start of a session, and again when the user mentions "issues", "bugs", "reports", or asks "anything new?".
Build and flash firmware to Pico2. Use after code changes to deploy to hardware.
| name | pins |
| description | GPIO pin-assignment rules for Raiden Pico (RP2350). Invoke whenever you add, change, move, or claim a GPIO pin — e.g. editing pin |
| allowed-tools | Bash, Read, Edit |
Two hard rules govern GPIO assignment in this project. Apply them whenever a change adds, moves, or claims a pin — and check them when reviewing any PR that touches pin #defines, gpio_* calls, or wiring docs.
GP26–GP29 are the RP2350's analog inputs and are reserved for ADC use only. Do not assign them to digital I/O, glitch outputs, crowbar gates, triggers, status lines, or any switching signal. A fast digital edge on an ADC-capable pad couples noise into AVDD / the ADC reference and corrupts exactly the measurements the glitch loop depends on.
| Pin | ADC | Role — keep clear |
|---|---|---|
| GP26 | ADC0 | target VDD monitor / VMIN gating — in active use |
| GP27 | ADC1 | shunt-current capture / TRACE — in active use |
| GP28 | ADC2 | reserved for analog; do not switch digital signals here |
| GP29 | ADC3 | VSYS sense (internal) — do not use |
Also avoid the board-internal pins GP23 (SMPS power-save), GP24 (VBUS sense), GP25 (onboard LED) for new functions on the base Pico 2.
When you need a free GPIO, take it from the digital range and confirm it isn't already claimed (see the authoritative sources below). On the Olimex RP2350-XXL (BOARD=xxl) there are many more GPIOs (GP30+) — prefer a board-conditional assignment so the base Pico 2 isn't forced to double-book a pin.
A GPIO assignment lives in four places that must stay consistent. When you add or change a pin, update all that apply in the same PR:
include/config.h (or the relevant header, e.g. swd.h, jtag.h, target headers). This is the source of truth.PINS CLI command — its output in src/command_parser.c must list the new/changed pin. (Also update any HELP/usage strings that name the pin.)README.md — the pin/wiring reference section.NRF52840_WIRING_*.md, PIC18_ICSP.md, EFM32_GLITCH.md — whichever describe the affected wiring.A pin change that updates the #define but not the PINS output or the docs is incomplete — reviewers should request the doc/CLI updates before merge.
# Current pin #defines across headers
grep -rnE '#define[[:space:]]+[A-Z0-9_]*(PIN|GP)[A-Z0-9_]*[[:space:]]+[0-9]' include/
# Hardcoded GPIO usage in firmware (power group, GRBL alt-func, trigger pin, ADC)
grep -rnE 'POWER_PIN|POWER_MASK|GRBL_(TX|RX)_PIN|adc_gpio_init|gpio_(init|set_dir|set_function)' src/
The live PINS command on the device prints the current assignment — treat include/config.h + PINS as authoritative (PIO_ARCHITECTURE.md is partly stale).
pico2 vs xxl).#define in the correct header.PINS output (and any HELP/usage text) in src/command_parser.c.README.md and the relevant wiring doc(s).