Top-level docs for the multi-project Pico repository. Lists projects, common conventions, prerequisites, and getting-started instructions.
22 lines
1.3 KiB
Markdown
22 lines
1.3 KiB
Markdown
# 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 |