Skip to content

Building RP2040 Code

Michael Shipman edited this page Mar 14, 2024 · 1 revision

Right so there's a few things you need to know.

Setup

First thing I'd start with is this: https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf Make sure to look at Chapter 2, it links to good information on making sure that you have all of the necessary dependencies installed (like the compiler!). My general recommendation is if you are on Windows (boo) to do all of this in Windows Sub-system for Linux (WSL).

Building

In order to run code on the RP2040 we need to compile it to an executable binary format known at UF2. The details are interesting but the primary advantage of this format is that the RP2040 supports dragging and dropping a .uf2 onto the board's flash storage over USB which is very convenient.

To build the code head to the GHOUL/2024-Firmware/2024.0/flight directory. From here the easiest thing to do is run the clean.sh script with . ./clean.sh in your terminal. This will delete and create a build directory and run cmake .. and make which does all the work for you.

Clone this wiki locally