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.
This commit is contained in:
parent
ce5f63b35b
commit
5779ac2fa4
22
CLAUDE.md
Normal file
22
CLAUDE.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# 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
|
||||||
42
README.md
Normal file
42
README.md
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Pico Projects
|
||||||
|
|
||||||
|
A collection of Raspberry Pi Pico (RP2040) firmware projects. Each project is self-contained in its own subfolder with its own Dockerized build system, CMake configuration, and source code.
|
||||||
|
|
||||||
|
## Projects
|
||||||
|
|
||||||
|
| Project | Description | Target Board |
|
||||||
|
|---|---|---|
|
||||||
|
| [color_switcher](color_switcher/) | Interactive color-switching firmware with USB-CDC serial commands and WS2812B LED control via PIO | Waveshare RP2040-Zero |
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
Each project is independent. To work on one, `cd` into its folder:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd color_switcher/
|
||||||
|
docker compose build # first time only
|
||||||
|
docker compose run --rm pico-build bash build.sh # compile
|
||||||
|
./flash.sh # flash to Pico (hold BOOTSEL + plug in)
|
||||||
|
```
|
||||||
|
|
||||||
|
See each project's own `README.md` for project-specific instructions.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- [Docker](https://docs.docker.com/get-docker/) and Docker Compose
|
||||||
|
|
||||||
|
No local ARM toolchain needed — everything builds inside Docker containers.
|
||||||
|
|
||||||
|
## Repository Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
pico/
|
||||||
|
├── color_switcher/ # WS2812B color switcher with USB/UART comm
|
||||||
|
│ ├── cmake/ # modular CMake build system
|
||||||
|
│ ├── src/ # layered C firmware (MCU → HAL → APP → SYS)
|
||||||
|
│ ├── Dockerfile # containerized ARM cross-compilation
|
||||||
|
│ ├── docker-compose.yml
|
||||||
|
│ ├── build.sh / flash.sh
|
||||||
|
│ └── CLAUDE.md / README.md
|
||||||
|
└── README.md # this file
|
||||||
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user