Exploring The BBC Micro:Bit Software Stack

The BBC micro:bit has been with us for about eighteen months now, and while the little ARM-based board has made a name for itself in its intended market of education, we haven’t seen as much of it in our community as we might have expected.

If you or a youngster in your life have a micro:bit, you may have created code for it using one of the several web-based IDEs, a graphical programming system, TypeScript, or MicroPython. But these high level languages are only part of the board’s software stack, as [Matt Warren] shows us with his detailed examination of its various layers.

The top layer of the micro:bit sandwich is of course your code. This is turned into a hex file by the web-based IDE’s compiler, which you then place on your device. Interestingly only the Microsoft TypeScript IDE compiles the TypeScript into native code, while the others bundle your code up with an interpreter.

Below that is the micro:bit’s hardware abstraction layer, and below that in turn is ARM’s Mbed OS layer, because the micro:bit is at heart simply another Mbed board. [Matt] goes into some detail about how the device’s memory map accommodates all these components, something essential given that there is only a paltry 16 kB of RAM in hand.

You might wish to program a micro:bit somewhat closer to the metal with the Mbed toolchain, but even if that is the case it’s still of interest to read a dissection of its official stack. Meanwhile, have a look at our review of the board, from summer 2016.

26 thoughts on “Exploring The BBC Micro:Bit Software Stack

  1. Walled gardens get lonely — ask Adam.
    Mine-craft was cool, till Microsoft also gave it the sweet embrace of death by making it part of a structured curriculum.

    Kids are raised looking at GPU accelerated multi-core tablets, and like most users — people do not seek a slower performance architecture to reduce their rate of fun. Maybe the people that pushed this mistakingly thought styling like an x286 thirty years later would get people interested in math.

    STEM for the win…

    1. speak for yourself… simple boards are not for reducing fun but to UNDERSTAND systems before tackling more complex devices.

      Given your remark STEM for the win I dont understand the previous part of your comment.

      1. I, uh… dunno…

        The whole graphical programming and abstraction layer means less about understanding on how the system works, but more like enabling to learn what a program (and system) can do.

        Just like arduino, you know (almost) nothing about configuring bits and fuzes and registers, but you just program and see what happens. For most people, that means much less hassle doing the un-fun part and more doing the fun part.

    1. Yes there is, it’s a board that breaks out about 25 pins iirc. I saw a couple of demos with my boys at a local TechFest and they looked like great fun for young and old alike. Time to order some for Christmas!!

      1. I’ve just bought a couple of these, one for me and one for my nephew. Given that it is so easy to program ‘their’ way, it’s a fun way to start. Then with the edge connector the possibilities are endless! I’ve ordered one online and I’m just waiting for it to arrive. Since the Arduino environment already supports it, I’m quite looking forward to seeing what it can do.

  2. You might want to have a look at Calliope – added features – as well – croco connectors further apart, a header, an extension header I2C, microphone and speaker – and flat on the table – one side with parts only – mostly software compatible with microbit http://calliope.cc/en

    1. It’s about twice the price of the micro:bit.

      As a “better” micro:bit, It’s also a great choice for the intended market: kids and education. As a general hacker platform… hard to justify.

  3. I think the main reason “we haven’t seen as much of it in our community as we might have expected”, is because the Raspberry Pi Zero W has more I/O, more power and is cheaper (emitting the micro SD card)

  4. I kind of want one, because BBC, and because it seems cool. but I already have a drawer-full of dev boards, and it’s hard to justify dropping $20 on another one, when the same $20 gets me a handful of Arduinos, or one Mega (or a NodeLua-type board) and a display and some sensors… all of which are more capable and better supported for more hackerly stuff.

    But… Christmas is coming, and I’ve been very good… If I was school-age, I would be all over this.

  5. I got a Micro:Bit when it was on sale at Fry’s just to check it out. I was able to make a connector by cutting down an old PCB edge connector. The main thing that differentiates it is that is has an on board compass and accelerometer (and it has Bluetooth) so it could be a cost effective board for small robots and other mobile applications.

  6. Hard to justify when STM32F3 and F4 Discovery board are much more powerful, much more common (at least here), much more people know how to deal with them (again, at least here), and similarly priced. The only thing it lacks is the bluetooth part, and that rarely matters in control/robotics anyway.

    The lack of community is really a chicken and egg problem. Aside from adventurous-hacker-minded people and sponsored program, I don’t expect a random EE undergrad student from random country to use this.

  7. Thanks, but no. The humble Pi Zero W rendered this product obsolete straight out of the blocks.
    More power.
    More storage.
    More connectivity.
    Video out.
    Audio out with a little extra hardware.
    Full Linux
    The crux – it’s cheaper!

    Even arguing that the Web ide is worth something over the Pi should realise there are tons of development options on the Pi. I’m not an employee / advocate, just somebody doing a straight comparison.

    1. As a board for an experienced developer, the Pi Zero has many features missing from the microbit for a lower price.

      The microbit is designed as an educational tool for school children who have never programmed so that they can potentially progress to a platform like the pi zero. The microbits have an excellent custom board to board radio as well as bluetooth, an array of LEDs, an accelerometer, a magnetic field sensor and an ADC. I have not used the pi zero, correct me if I am wrong, but these elements are not integral to that platform. The microbit fills a different niche. I found a use for the microbits in some enabling technology projects as the microbits have all the features that I need on a single board which is safe to deploy with a disabled user group.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.