create-pico-app
v1.1.3
Published
Scaffold a modern CMake/C++ project for the Raspberry Pi Pico
Downloads
953
Maintainers
Readme
create-pico-app ⚡
A lightning-fast CLI tool to scaffold FreeRTOS and C/C++ projects for the Raspberry Pi Pico and Pico W.
It handles the complex CMake configuration, sets up VS Code IntelliSense automatically, and provides build/flash scripts so you can start coding immediately.
Features
- 🚀 Zero Config: Generates a ready-to-build CMake project.
- 🧠 IntelliSense: Pre-configured
.vscodefolder (no more red squiggles!). - 📶 Pico W Support: Handles the specific linking for the wireless board.
- 📦 Local SDK: Option to download a local copy of the SDK for maximum portability.
- 🛠 Build Scripts: Includes
npm run buildandnpm run flashfor cross-platform ease. - ☁️ GitHub Actions CI: Automatically generates a workflow to compile your project on every push.
- ⏱️ FreeRTOS Ready: Choose between a basic "Super Loop" or a fully configured FreeRTOS kernel (SMP/Dual-Core enabled) out of the box.
Quick Start
You don't need to install anything globally. Just use npx:
npx create-pico-app my-robotFollow the prompts to select your board (Pico or Pico W) and project name.
Project Templates
When you run the tool, you will be asked to select a template:
1. Basic (Blinky)
- Best for: Simple projects, sensors, and learning the basics.
- Structure: A standard
main.cppwith awhile(true)loop. - Libraries: Links
pico_stdlib.
2. FreeRTOS (Multi-tasking)
- Best for: Robotics, IoT, and complex applications needing multiple tasks.
- Structure: * Pre-configured
FreeRTOSConfig.h(optimized for RP2040 Dual Core).main.cppwith two example tasks (Blink and Logger).- CMake setup using the "Manual Source" method for maximum compatibility.
Prerequisites
While this tool creates the project structure, you need the build tools installed on your system to compile the code.
1. CMake & Build Tools
- Windows: Install CMake and Ninja (or Make).
- Mac:
brew install cmake - Linux:
sudo apt install cmake build-essential
2. ARM GCC Compiler
You need the arm-none-eabi-gcc toolchain.
- Windows: Install the Arm GNU Toolchain.
- Mac:
brew install --cask gcc-arm-embedded - Linux:
sudo apt install gcc-arm-none-eabi libnewlib-arm-none-eabi
Usage
Once you have scaffolded your project:
cd my-robotBuild the Project
Compiles the C++ code into a .uf2 file.
npm run buildFlash to Pico
Connect your Pico while holding the BOOTSEL button, then run:
npm run flash(This script auto-detects the mounted Pico on Windows, macOS, and Linux and copies the firmware).
Continuous Integration (CI)
A .github/workflows/build.yml file is automatically generated.
- Push your project to a new GitHub repository.
- Go to the Actions tab on GitHub.
- You will see a Build workflow running automatically. This ensures your code always compiles, even if you are away from your main computer.
License
MIT
