Home

Awesome

MicroPython Bitcoin bundle for microcontrollers

Focusing on F469-Discovery board from STMicroelectronics, planning to add other boards later as well.

Build includes: secp256k1 bindings, embit bitcoin python library, LittlevGL GUI library

Quick start

Check out the documentation folder for a tutorial and API of crypto modules.

Some examples are located in the examples folder.

To get micropython running on the board:

Build

Clone this repo recursively - we have many submodules. If you forgot - makefile will do it for you, but be patient, submodules are pretty large.

Prerequisities: Board

To compile the firmware for the board you will need arm-none-eabi-gcc compiler.

On MacOS install it using brew:

brew tap ArmMbed/homebrew-formulae
brew install arm-none-eabi-gcc

On Linux:

sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi gdb-multiarch openocd

On Windows: Install linux subsystem and follow Linux instructions.

Prerequisities: Simulator

You may need to install SDL2 library to simulate the screen of the device.

Linux:

sudo apt install libsdl2-dev

MacOS:

brew install sdl2

Windows:

Compilation

We use makefiles. All resulting binaries will end up in the bin folder.

To launch a simulator either run bin/micropython_unix or simly run make simulate.

If something is not working you can clean up with make clean

Run Unittests

Currently unittests work only on linuxport, and there are... not many... Contributions are very welcome!

make test

IDE Configuration

Visual Studio Code configuration