Skip to content

Overwhelmed with complex build instructions and confusing compiler errors while building C/C++ programs for Raspberry Pi Pico ! This repository can help. It comprises a dockerfile and easy-to-follow guidelines for compiling code on any computer.

License

Notifications You must be signed in to change notification settings

code2k13/pipico_build_setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiling C/C++ code for Pi Pico, the easy way !

This repository provides a Dockerfile and detailed instructions that make compiling C/C++ programs for the Raspberry Pi Pico a straightforward process. The Dockerfile creates an image that allows you to compile programs for the Pi Pico from any operating system that has Docker installed. This eliminates the need to manually install packages, use OS-specific commands, or configure file paths. By using this Docker image, you can save a significant amount of time that would otherwise be spent on configuration and setup, enabling you to quickly start working on your Pi Pico project.

Build the Docker image

To use this approach, you will need to have Docker installed on your machine, which is a one-time step. After creating the Docker image, you can use it to compile as many programs as you need. This method is compatible with all operating systems that support Docker, allowing you to seamlessly switch between different platforms without any additional setup or configuration.

Let us first create the docker image using below commands::

git clone https://github.com/code2k13/pipico_build_setup
cd pipico_build_setup
docker build . -t pipico_build_tool

This creates a local docker image called pipico_build_tool.

Compiling the examples using the docker image

Troubleshooting

If you receive below error

CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_ASM_COMPILE_OBJECT

try deleteing CMake.cache from build directory

rm CMakeCache.txt 

Attribution

The pico_sdk_import.cmake file used in the project is taken from PiPico SDK repository, available under BSD-3-Clause license

About

Overwhelmed with complex build instructions and confusing compiler errors while building C/C++ programs for Raspberry Pi Pico ! This repository can help. It comprises a dockerfile and easy-to-follow guidelines for compiling code on any computer.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published