Dockerized build system (Dockerfile, docker-compose, build.sh) with Pico SDK cross-compilation. Modular CMake split into project_config, mcu_config, and sources_config under cmake/. Component architecture following inc/prg/cfg convention: STD_TYPES, MCU_USB, HAL_COM, APP_CLSW, SYS_ECU. Full call chain SYS_ECU -> APP_CLSW -> HAL_COM -> MCU_USB verified end-to-end on RP2040-Zero hardware over USB-CDC. Includes flash.sh for automated .uf2 flashing on macOS and devcontainer config for VS Code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
879 B
Markdown
36 lines
879 B
Markdown
# Color Switcher
|
|
|
|
A Raspberry Pi Pico project that sends commands over UART to a connected computer. Written entirely in C using the Pico SDK.
|
|
|
|
## Prerequisites
|
|
|
|
- [Docker](https://docs.docker.com/get-docker/) and Docker Compose
|
|
|
|
No local toolchain installation needed — everything runs inside the container.
|
|
|
|
## Building
|
|
|
|
```bash
|
|
# Build the Docker image (first time only, or after Dockerfile changes)
|
|
docker compose build
|
|
|
|
# Compile the firmware
|
|
docker compose up
|
|
```
|
|
|
|
The `.uf2` firmware file will appear in `build/`.
|
|
|
|
## Flashing
|
|
|
|
1. Hold the **BOOTSEL** button on the Pico and plug it into USB
|
|
2. It mounts as a USB mass storage device
|
|
3. Drag the `.uf2` file from `build/` onto the Pico
|
|
4. The Pico reboots and runs the firmware
|
|
|
|
## Interactive Shell
|
|
|
|
To drop into the build container for debugging or manual commands:
|
|
|
|
```bash
|
|
docker compose run --rm pico-build bash
|
|
``` |