Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 2.2 KB

README.md

File metadata and controls

43 lines (30 loc) · 2.2 KB

microbit-v2-samples

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.

Raising Issues

Any issues regarding the micro:bit are gathered on the lancaster-university/codal-microbit-v2 repository. Please raise yours there too.

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.

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.

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 compatilibty 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 documetation soon.