Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

eu-ch/rp2040-playground

Repository files navigation

rp2040-playground

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.

Usage

Individual programs must be created in 'programs' directory.

Command line

# 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

Example heavy_test: converting a Pd patch and writing it into RP2040

# 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

Directory structure

  • _intermediate - build files generated by CMake
  • programs - place where to put our firmware projects
  • third_party - place that stores vendor libraries
    • third_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 include tools directory to PYTHONPATH
    • third_party/pico-examples
    • third_party/pico-extras
    • third_party/pico-playeground
  • tools - if we ever have custom tools made, they will be placed there
    • tools/build_tool - a Python module that manages high-level build commands
  • build_tool.bat - entry for the Python-based build tool

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published