Skip to main content

Projects related to micro:bian

Supervisor

Suitable for

MSc in Advanced Computer Science
Computer Science and Philosophy, Part C
Mathematics and Computer Science, Part C
Computer Science, Part B
Computer Science, Part C

Abstract

micro:bian is a very small embedded operating system that is used in the first year course on Digital Systems. At present, it runs on the ARM-based microcontroller on the BBC micro:bit board, but it would be good to port it to other boards and other processors.

Unlike most other embedded operating systems, micro:bian provides process synchronization based on message passing, with interrutps converted into messages at the lowest level in the system. This encourages a style of programming where maximum advantage is made of concurrent processes, with minimum use of shared variables. The design is inspired by Andrew Tanenbaum's operating system Minix, an implementation of the Unix system call interface that uses message passing inside.

At present, micro:bian is specific to the BBC micro:bit. But plenty of other inexpensive ARM-based development boards exist, such as the Freescale FRDM-KL25Z and FRDM-K64F boards, and many other boards that are part of the MBED ecosystem.

The aim of these projects is to port micro:bian to one or more of these other boards, identifying and isolating the parts that are board-specific and providing multiple implementations of device driver processes so that micro:bian applications are as far as possible portable between boards. In addition, we would like to support a wider range of peripherals and communication methods, such as USB or Bluetooth: for complicated protocols like these, a good way forward would be to obtains an open-source software stack and modify it to work with micro:bian.

Microcontroller development boards are divided into what I call "one-chip" and "two-chip" boards. On a two-chip board like the micro:bit, there are two microcontrollers: one that we program, and another microcontroller with fixed firmware that looks after USB communication, and is able to program the first chip using its debugging interface. The second chip also acts as a serial-to-USB adapter for the serial port on the main chip. The micro:bit and the Freescale boards are like this.

On a one-chip board, there is no such second microcontroller, and the main chip contains bootloader firmware. These boards can be programmed over USB using the bootloader, or by using a separate debug probe (which probably contains an ARM-based microcontroller of its own). For a serial interface, you can either use a separate USB-to-serial adapter connected to the UART pins on the board, or include a USB driver in the firmware.

Other boards don't have the switches and lights of the micro:bit but some, including the FRDM boards, support Arduino-compatible add-on 'shield' boards, and we could easily make a shield that replicates the features of the micro:bit.