This article will walk you through all the steps needed to cross compile Qt 5 code for the Raspberry Pi 3 using Linux. Once we have finished, you will be able to write code with Qt as you normally would, and then when you’re ready to build for the Pi, just select it as a build option and compile for the Pi!

The steps that we will cover are:

  1. Install Raspberry Pi OS (Buster) onto an SD card for the Raspberry Pi, and get it ready for development.
  2. Install all software and tools needed in a Linux Virtual Machine (VM).
  3. Create a sysroot folder in the Linux virtual machine, which we will use to synchronize the Qt libraries we will build onto the Pi.
  4. Build Qt from source, and any Qt modules we might need.
  5. Copy the Qt libraries over to the Pi.
  6. Build a Qt example, and deploy and run it on the Pi!

Arduino is a great way to start writing code for microcontrollers, like the venerable ATMega328P used in the Arduino Uno and Nano. With loads of easy to understand examples, organised into categories, it makes it easy to get started. Changing from an Arduino Uno to a Mega when you need more IO or resources is as easy as a drop down menu, even moving to an ARM based platform is pretty straight forward. I learnt embedded programming by using the Arduino IDE and environment, and this even helped me land my first engineering job.