Skip to content

Latest commit

 

History

106 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlightComputer-SRAD-2026


RP2040 Firmware Build Instructions

This project uses the Raspberry Pi Pico SDK with CMake and the ARM GCC toolchain.

Follow these steps to set up the build environment.


1. Install dependencies (Linux)

On Debian/Ubuntu:

sudo apt update
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential git

On Fedora:

sudo dnf install cmake arm-none-eabi-gcc-cs arm-none-eabi-newlib make git

Check installation:

arm-none-eabi-gcc --version
cmake --version

2. Download the Pico SDK

Clone the SDK somewhere on your system (outside this repo):

git clone https://github.com/raspberrypi/pico-sdk.git ~/pico-sdk

3. Set the SDK path environment variable

Set this variable so CMake can find the SDK:

export PICO_SDK_PATH=~/pico-sdk

To make it permanent (bash):

echo 'export PICO_SDK_PATH=~/pico-sdk' >> ~/.bashrc
source ~/.bashrc

4. Build the project

From the code/ directory:

mkdir build
cd build
cmake ..
make -j$(nproc)

After building, the firmware file will be generated:

flight_computer.uf2

5. Flash to the RP2040

  1. Hold the BOOTSEL button on the Pico
  2. Plug the Pico into USB
  3. Release BOOTSEL
  4. Copy the UF2 file:
cp flight_computer.uf2 /media/$USER/RPI-RP2/

(The mount path may vary depending on your system.)


6. Rebuilding later

After the first build, you usually only need:

cd code/build
make -j$(nproc)

If you change CMakeLists.txt, run:

cmake ..

If something breaks, clean build:

cd code
rm -rf build
mkdir build
cd build
cmake ..
make -j$(nproc)

Submodules / External Libraries

This project uses the SD-card library no-OS-FatFS-SD-SDIO-SPI-RPi-Pico as a Git submodule.

Fresh clone

Clone with submodules:

git clone --recurse-submodules <repo-url>

Existing clone

If the repository was already cloned without submodules:

git submodule update --init --recursive

After pulling updates:

git pull --recurse-submodules
git submodule update --init --recursive

SD-card library notes

This project uses:

no-OS-FatFS-SD-SDIO-SPI-RPi-Pico

in SDIO/PIO 4-bit mode.

The library contains a project-specific patch because the SD clock pin is routed differently on this board.

SD pin mapping:

SD_CMD  -> GPIO18
SD_DAT0 -> GPIO19
SD_DAT1 -> GPIO20
SD_DAT2 -> GPIO21
SD_DAT3 -> GPIO22
SD_CLK  -> GPIO25

The SDIO PIO configuration was modified with:

SDIO_CLK_PIN_D0_OFFSET = 6

The patched submodule commit must be available from the configured submodule remote.

About

HW and SW documentation of a Student Researched And Developed (SRAD) flight computer in charge of telemetry for ITBA's rocketry team 2026

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Contributors

Languages