Basic framework for RP2040 experiments. Should include all necessary dependencies, including Pico SDK, so you don't need to install it manually.
This repo is published here just for reference. You need to copy Pico SDK Windows distribution contents into third_party/pico-dist folder.
Individual programs must be created in 'programs' directory.
# Print command-line help
build_tool.bat -h
# Clean, deletes '_intermediate' directory
build_tool.bat clean
# Create build system files, this will create '_intermediate' directory
build_tool.bat configure
# Convert a Pure Data patch programs/heavy_test/puredata/_main.pd to C code
# and place it into programs/heavy_test/hvcc_gen
build_tool.bat convert_pd heavy_test
# Compile one program, 'heavy_test' in this example
build_tool.bat build heavy_test
# Compile all programs
build_tool.bat build all
# Upload 'heavy_test' firmware to RP2040 via SWD (e.g. Pico Debug Probe)
build_tool.bat deploy_swd heavy_test
# Starting from scratch
build_tool.bat clean
# Generate C code from the patch
build_tool.bat convert_pd heavy_test
# Create CMake files
build_tool.bat configure
# Building the program
build_tool.bat build heavy_test
# WORKAROUND
# If the build fails unable to find "pico/audio.h", run 'build' command one more time followed by 'configure', then 'build' again
build_tool.bat build heavy_test
build_tool.bat configure
build_tool.bat build heavy_test
# Upload 'heavy_test' firmware to RP2040 via SWD (e.g. Pico Debug Probe)
build_tool.bat deploy_swd heavy_test
_intermediate
- build files generated by CMakeprograms
- place where to put our firmware projectsthird_party
- place that stores vendor librariesthird_party/pico-dist
- Pico SDK distribution, includes SDK and toolchain- note, in order to make build_tool work,
third_party/pico-dist/python/python39._pth
was modified to includetools
directory to PYTHONPATH
- note, in order to make build_tool work,
third_party/pico-examples
third_party/pico-extras
third_party/pico-playeground
tools
- if we ever have custom tools made, they will be placed theretools/build_tool
- a Python module that manages high-level build commands
build_tool.bat
- entry for the Python-based build tool