This guide explains how to set up a cross-compilation development environment for the Raspberry Pi. We'll be using the familiar APT package manager for installing cross-compilation dependencies, so you can just apt-get install any library from the Debian or Raspberry Pi OS repositories.

We use a modern GCC 11 toolchain for C, C++ and Fortran. Configuration files for easy on-target debugging in Visual Studio Code are provided. A hello world CMake project is included as an example.

Everything was tested on Ubuntu 20.04 LTS on the build machine and Raspberry Pi OS Buster on a Raspberry Pi Zero. A similar guide for a Raspberry Pi running Ubuntu 20.04 is being worked on as well.