Zephyr OS on the BBC Microbit V2

In previous years I used mbed OS to program the BBC Microbit (V1). As far as I can tell, the V2 board is not supported in mbed’s web compiler (yet?). So I began to look around at alternatives operating systems that would help me develop BLE peripheral applications. I considered install size and system requirements and decided that Zephyr looked like a good fit. I have begun writing examples for the various peripherals on the microbit v2 source code for which is over on github.

You will need to install zephyr to compile these. I found that the Getting started guide worked well. I compile my examples within the zephyrproject/zephyr directory (copy them from github to here) with the following command:

west build -b bbc_microbit_v2 magnetometer_serial_microbit_v2 –pristine

This will wipe the build directory and recompile the magnetometer example. Change “magnetometer_serial_microbit_v2” to one of the other directory names when you want to try them out. The output from the application on the microbit is sent to UART at 115200 bps.

I’m using Zephyr SDK version 0.12.4

2 thoughts on “Zephyr OS on the BBC Microbit V2

  1. Peter N. November 16, 2021 / 2:50 pm

    As far as I understand, the support for mBed of the Nordic SOCs is the work of ARM engineers, not Nordic engineers. Nordic shows no interest whatsoever in mBed. This situation will not change. In my comparison, my heart prefers mBed (C++) over the kind of old school Zephyr but reason tells me that the architecture of Zephyr and the code base is superior in the end.

    Like

    • Frank November 16, 2021 / 5:43 pm

      I like mbed also. I was drawn to zephyr because it just worked for the chip I had. The license is also nice. Having tinkered with it for a while I have come to like it a lot. The device tree mechanism is still a bit of a mystery to me 🙂

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s