#arm #cortex-m #micro-controller #hal #nrf

no-std calliope-mini

Board support crate for the Calliope mini

3 unstable releases

0.2.1 Jan 1, 2025
0.2.0 Dec 30, 2024
0.1.0 Mar 30, 2024

#292 in Hardware support

Download history 2/week @ 2024-09-18 6/week @ 2024-09-25 1/week @ 2024-10-09 1/week @ 2024-10-16 2/week @ 2024-10-30 2/week @ 2024-11-06 99/week @ 2024-12-25 175/week @ 2025-01-01

274 downloads per month

MIT license

74KB
1K SLoC

calliope-mini

calliope-mini contains everything required getting started using Rust to create firmwares for the Calliope mini microcontroller board. This little board has a lot built-in, even a capable debugging interface.

This Board Support Package (BSP) for the Calliope mini pursues the goal of making most features of the board easily available while still supporting advanced applications to exploit the full capabilities of the hardware. It should enable learners to make first steps in programming with confidence and at the same time experienced programmers to delve into the world of microcontrollers.

Important notes

  • this project is currently under active development, APIs are expected to change.
  • it is a fork of microbit, a Board Support Package (BSP) for the BBC micro:bit
  • currently supported are Calliope mini V1 and V3, support for V2 is not tested
  • Calliope mini V2 however is very similar to V1 and this crate's feature v1 is expected to work on Calliope mini V2 also
  • using the crate you are required to specify the version of the Calliope mini by activating the corresponding feature, e.g. v1

Calliope mini version

For determining the version of your board see the product page.

Getting started

All you need to start programming this device is:

  • A Calliope mini board
  • A computer: Linux is tested
  • A bit of open source software

Install dependencies

On Linux you have the options to use cargo install or nix-shell.

Cargo install

In order to run the examples you need to install flip-link and probe-rs.

> cargo install probe-rs-tools flip-link

Nix

Start a Nix shell in the project's base directory

> nix-shell

Run an example

The first thing to try is one of the examples in this repository. Plug in your Calliope mini and run one of the commands below.

For Calliope mini V1

> cargo run --release --manifest-path ./examples/display-blocking/Cargo.toml --features v1 --target thumbv6m-none-eabi

For Calliope mini V3

> cargo run --release --manifest-path ./examples/display-blocking/Cargo.toml --features v3 --target thumbv7em-none-eabihf

You should see a lot of build output, the orange LED on the back of the Calliope mini should flash quickly, and a message should appear on the LED display.

Congratulations! You've flashed your first Rust program onto your Calliope mini!

Feature support matrix

Feature Board version 1.x Board version 3.x
LED matrix Supported Supported
RGB LED Example given Example given
Beeper Example given Example given
Buttons Supported Supported
Accelerometer No example yet No example yet
Gyroscope No example yet n/a
Magnetometer Example given Example given
Sound sensor Example given Example given
Temperature sensor No example yet No example yet
Light sensor No example yet No example yet
Motor driver No example yet No example yet

License

MIT

Dependencies

~0–2.2MB
~56K SLoC