28
GitHub Stars
3
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill ecto/muni --skill mcu-embedded-review- esp32s3-patterns.md13.8 KB
- rp2350-patterns.md13.0 KB
- SKILL.md20.9 KB
Overview
This skill reviews embedded Rust firmware for RP2350 (Raspberry Pi Pico 2 W) and ESP32-S3 (Heltec) microcontrollers with emphasis on Embassy async runtime, memory constraints, LED control, CAN attachment protocols, and SLCAN bridging. It targets no_std environments, hardware-specific peripherals (PIO, RMT), and USB CDC serial or UART bridges used for debugging and SLCAN. Use it to validate patterns, spot resource issues, and confirm correct LED and CAN behaviors for rover peripheral code.
How this skill works
The skill inspects entry points, runtime usage, and peripheral initialization patterns for both RP2350 (Embassy async) and ESP32-S3 (polling/heap). It checks static memory allocation, task spawning, interrupt binding, and async/task boundaries on RP2350, and non-blocking polling, heap use, and RMT timing on ESP32-S3. It validates WS2812/WS2811 timing and byte order, USB CDC and UART SLCAN handling, and CAN/MCP2515 or TWAI attachment protocols.
When to use it
- Reviewing firmware changes that touch Embassy async tasks, spawner usage, or interrupt bindings on RP2350.
- Debugging LED controller issues for WS2812/WS2811 timing, color order, or DMA/PIO/RMT configuration.
- Evaluating memory safety in no_std RP2350 code for improper heap-like usage or missing StaticCell wrappers.
- Validating SLCAN bridge implementations over USB CDC or UART and ensuring correct line coding and packet handling.
- Assessing CAN attachment and protocol handling for MCP2515 (SPI) or ESP32 TWAI peripheral integration.
Best practices
- Initialize all peripherals before spawning tasks and move ownership into tasks to avoid borrowing issues.
- Use StaticCell and fixed-size arrays on RP2350; avoid Vec, Box, String in no_std builds.
- Verify GRB byte order and precise timing for WS2812; prefer DMA/PIO (RP2350) or RMT (ESP32) instead of bit‑banging.
- On ESP32-S3, enable esp_alloc only for low-frequency operations and pre-allocate buffers for hot paths.
- Handle USB CDC and UART reads non-blocking with proper await/read_ready checks and robust error logging.
Example use cases
- Code review checklist for a PR that changes LED animations or updates the PIO/RMT driver.
- Postmortem analysis of LED flicker by checking clock dividers, reset delays, and DMA usage.
- Validating a new SLCAN bridge implementation that translates USB CDC packets to CAN frames.
- Auditing RP2350 firmware to ensure no heap allocations and correct StaticCell usage in channels and buffers.
- Confirming ESP32-S3 TWAI configuration and attachment code correctly handles CAN error states and message arbitration.
FAQ
Typical causes are wrong byte order (RGB vs GRB), incorrect clock divider/timing, missing reset gap (>50µs), or blocking writes instead of DMA/RMT transfers.
How do I spot improper heap usage on RP2350?
Look for Vec, String, Box, or alloc crate usage; check for missing StaticCell wrappers for static mut data and ensure channels and buffers use fixed-size arrays.