pi_pico/CLAUDE.md
Mohamed Salem 5779ac2fa4 Add repo-level README and CLAUDE.md
Top-level docs for the multi-project Pico repository. Lists projects,
common conventions, prerequisites, and getting-started instructions.
2026-04-13 03:43:38 +02:00

1.3 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Repository

Multi-project repository for Raspberry Pi Pico (RP2040) firmware. Each project is a self-contained subfolder with its own Docker build, CMake config, and source tree.

Projects

  • color_switcher/ — WS2812B LED control with USB-CDC serial commands. See color_switcher/CLAUDE.md for project-specific architecture, build commands, and conventions.

Common Conventions

All projects in this repo follow the same embedded C conventions:

  • Component structure: each component has inc/ (public API), prg/ (implementation + private header), cfg/ (configuration)
  • Layered architecture: STD_TYPES (library) → MCU (hardware drivers) → HAL (abstractions) → APP (application logic) → SYS (orchestrator)
  • Coding style: MISRA-C influenced — single return per function, fixed-width types from STD_TYPES (never native C types except void), Hungarian naming, no function calls in conditions
  • Build system: Dockerized ARM cross-compilation with modular CMake. No local toolchain required.
  • Always add descriptive comments to all code and config files
  • Avoid magic numbers — use named constants in config headers