Skip to content

rovercode/rovercode-microbit-v2

Repository files navigation

rovercode-microbit-v2

This repository is provides the tooling needed to compile a C/C++ CODAL program for the micro:bit v2 and produce a HEX file that can be downloaded to the device.

Installation

You need some open source pre-requisites to build this repo. You can either install these tools yourself, or use the docker image provided below.

We use Ubuntu Linux for most of our tests. You can also install these tools easily through the package manager:

    sudo apt install gcc
    sudo apt install git
    sudo apt install cmake
    sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi

Yotta

For backwards compatibility with microbit-samples users, we also provide a yotta target for this repository.

Docker

You can use the Dockerfile provided to build the samples, or your own project sources, without installing additional dependencies.

Run the following command to build the image locally:

    docker build -t microbit-tools .

Building

  • Clone this repository
  • In the root of this repository type python build.py
  • The hex file will be built MICROBIT.HEX and placed in the root folder.

Docker

You can use the image you built previously to build the project sources in the current working directory (equivalent to executing build.py).

    docker run -v $(pwd):/app --rm microbit-tools

You can also provide additional arguments like --clean.

    docker run -v $(pwd):/app --rm microbit-tools --clean

Developing

You will find a simple main.cpp in the source folder which you can edit. CODAL will also compile any other C/C++ header files our source files with the extension .h .c .cpp it finds in the source folder.

The samples folder contains a number of simple sample programs that utilise you may find useful.

Compatibility

This repository is designed to follow the principles and APIs developed for the first version of the micro:bit. We have also included a compatibility layer so that the vast majority of C/C++ programs built using microbit-dal will operate with few changes.

Documentation

API documentation is embedded in the code using doxygen. We will produce integrated web-based documentation soon.

About

Firmware for the V2 micro:bit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published