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>
38 lines
2.0 KiB
YAML
38 lines
2.0 KiB
YAML
# ============================================================================
|
|
# Docker Compose configuration for the Raspberry Pi Pico firmware project
|
|
# ============================================================================
|
|
# The container is configured to be long-running (sleep infinity) rather than
|
|
# running the build on startup. This lets the same container be used for:
|
|
# 1. One-shot builds from the host
|
|
# 2. Interactive shells (docker compose exec) for debugging
|
|
# 3. VS Code Dev Containers - which expects the container to stay alive
|
|
# so it can attach clangd, install extensions, and open a terminal
|
|
#
|
|
# Usage:
|
|
# docker compose build - (re)build the image after Dockerfile changes
|
|
# docker compose up -d - start the persistent container in the background
|
|
# docker compose exec pico-build bash - shell into the running container
|
|
# docker compose run --rm pico-build bash build.sh - one-shot firmware build, container removed after
|
|
# docker compose down - stop and remove the persistent container
|
|
# ============================================================================
|
|
|
|
services:
|
|
pico-build:
|
|
# Build the image from the Dockerfile in the project root
|
|
build: .
|
|
|
|
# Mount the project source code into the container's working directory.
|
|
# This lets the container read our source files and write build artifacts
|
|
# (including the .uf2 firmware file) back to the host filesystem.
|
|
volumes:
|
|
- .:/project
|
|
|
|
# Keep the container alive indefinitely. We intentionally do NOT run the
|
|
# build on startup - `sleep infinity` lets the container stay up so it can
|
|
# be used as a persistent dev environment (VS Code Dev Containers, shells
|
|
# via `docker compose exec`, etc.). To trigger a build, run:
|
|
# docker compose run --rm pico-build bash build.sh
|
|
# or, if you're already inside the container:
|
|
# bash build.sh
|
|
command: sleep infinity
|