Coding Microbit in C++ with Debian 12

First, we need to set the environment: 1. Installing Yotta and '''srecord''' (this is needed to create .hex)

sudo apt install yotta srecord
  1. Clone example git clone https://github.com/lancaster-university/microbit-samples cd microbit-samples
  2. Setup the target for building yotta target bbc-microbit-classic-gcc-nosd@https://github.com/lancaster-university/yotta-target-bbc-microbit-classic-gcc
  3. Build example yotta build 5.Copy .hex to Microbit folder cp ./build/bbc-microbit-classic-gcc/source/microbit-samples-combined.hex /media/"user"/MICROBIT

Reference: Reference