Table of Contents


libmaple is a firmware library for the Leaflabs Maple mini and clones with STM32 CPUs.

The firmware library is built with this compiler. dfu-util is required to program the chip.


Here we fetch the source to the maple libraries.

mkdir -p /embedded/arm-cortex/src
cd /embedded/arm-cortex/src
git clone
cd libmaple


The help function of the make file gives us some clues about how to create our own projects with it.

make CROSS_COMPILE=/embedded/arm-cortex/gcc-arm-none-eabi-4_9-2015q1/bin/arm-none-eabi- help

Basic usage (BOARD defaults to maple):
    $ cp your-main.cpp main.cpp
    $ make BOARD=your_board
    $ make BOARD=your_board install

(Multiple source files? Link with libmaple.a (`$ make library')
or hack appropriately.)

Important targets:
    sketch:   Compile for BOARD to MEMORY_TARGET (default).
    install:  Compile and upload over USB using Maple bootloader

You *must* set BOARD if not compiling for Maple (e.g.
use BOARD=maple_mini for mini, etc.), and MEMORY_TARGET
if not compiling to Flash. Run `$ make list-boards' for
a list of all boards.

Valid MEMORY_TARGETs (default=flash):
    ram:    Compile to RAM (doesn't touch Flash)
    flash:  Compile to Flash (for Maple bootloader)
    jtag:   Compile for JTAG/SWD upload (overwrites bootloader)

Other targets:
    clean: Remove all build and object files
    doxygen: Build Doxygen HTML and XML documentation
    help: Show this message
    mrproper: Remove all generated files

List boards

This function didn't list the boards correctly for me, so this is a sanitised listing.

make CROSS_COMPILE=/embedded/arm-cortex/gcc-arm-none-eabi-4_9-2015q1/bin/arm-none-eabi- list-boards


This is the standard LED demo for the Maple mini. You may wish to edit the example to create a blink unlike the default empty firmware blink to confirm that this is working.

cp examples/blinky.cpp main.cpp
make CROSS_COMPILE=/embedded/arm-cortex/gcc-arm-none-eabi-4_9-2015q1/bin/arm-none-eabi- BOARD=maple_mini install
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies