This is a separate repo for software developed using the Pico SDK.
Written by Claude 3.5
- CMake
- Ninja build system
- Raspberry Pi Pico SDK (expected at ~/.pico-sdk/sdk/2.0.0)
- ARM GCC Toolchain
The project includes a big_build.sh
script that simplifies the build process. The script supports several options:
./build.sh [-j jobs] [-n output_name] [-c] [-v] [-h]
Options:
-j: Number of parallel jobs for compilation (default: number of CPU cores)
-n: Name for the output .uf2 file (default: boot)
-c: Clean only, don't build
-v: Verbose output
-h: Show help message
Example:
./big_build.sh -j8 -n battery_firm_v1.0 -v
- The script first checks for required tools (CMake, Ninja)
- Cleans the build directory to ensure a fresh build
- Generates build files using CMake with Ninja generator
- Compiles the project using specified number of parallel jobs
- Generates the UF2 file for Pico flashing
- Creates a backup of any previous builds
- Copies the final UF2 file to the project root directory
Batt_Pico_sdk/
├── Battery_Software/
│ ├── lib/ # Core libraries and functionality
│ └── boot/ # Boot and initialization code
├── build/ # Build directory (generated)
└── build.sh # Build script
- Primary output:
<name>.uf2
in project root - Backup files:
<name>_backup_<timestamp>.uf2
- Build artifacts in
build/
directory
- Hold the BOOTSEL button on the Pico
- Connect the Pico to your computer via USB
- Release BOOTSEL once the Pico mounts as a drive
- Copy the generated .uf2 file to the mounted Pico drive
- The Pico will automatically reboot and run the new firmware
The script automatically includes timestamps in backup files and can handle version numbering through the output name parameter. It's recommended to use semantic versioning in the output name:
./big_build.sh -n battery_firm_v1.0.0