#!/bin/bash # ============================================================================ # build.sh — Build Pico firmware for a given project # ============================================================================ # Runs inside Docker. CMake source directory is the project's cmake/ folder. # Build artifacts (including the .uf2) land in the project's build/ folder. # # Usage (from inside Docker container): # bash /scripts/build.sh # # The script auto-detects the project directory from the Docker working # directory (/project), so no arguments are needed. # ============================================================================ set -e # Configure: cmake/ holds the CMakeLists.txt, build/ holds the output cmake -S cmake -B build # Compile using all available CPU cores cmake --build build -j"$(nproc)"