Tomu Quickstart Guide
This guide describes everything you need to set up your system to develop for Tomu.
This quickstart guide is designed to be used on Mac, Windows, Linux, and anything else that can run GCC and Make.
The main Tomu U2F firmware is in a different repo.
Overview of Requirements
To build and load sample code, you will need three things:
- An ARM toolchain
Installation varies depending on your platform:
|Windows||GNU Arm Embedded Toolchain||GNU Win32 Make||precompiled binaries|
|macOS||GNU Arm Embedded Toolchain||Xcode||Homebrew
This quickstart repo differs from the samples repo in that it has a prebuilt version of
libopencm3, which normally requires various command line programs to compile. This cuts down on compile time, and enables building on platforms that don't have commands like grep, printf, or cat.
To build an example, go into the directory and type
make. For example,
To load examples onto Tomu, ensure it is in DFU mode by verifying that the red and green LEDs are alternately blinking, and that it shows up if you run
dfu-util --list. Then, load the sample you want using
To load another program, unplug Tomu and plug it back in.
Creating a new Project
To create a new project, simply copy an existing project. The
bare-minimum project is a good example if you want to start from scratch.
The new project's .dfu file will be based on the directory name.
miniblinkprogram, when correctly operating, looks quite similar to the bootloader's "waiting for instructions" state. You can change this by editing the
system_millischeck in the
sys_tick_handlerfunction to make the LEDs flash faster or slower.
Early versions of the bootloader only work with programs that have a toboot-v2.0 signature. If you load a program and get a stream of
test-in-progressover the USB serial console instead of what you expect the program to do, you should upgrade toboot. To add a toboot-v2.0 signature, add the following near the top of the program and recompile:
// Make this program compatible with Toboot-V2.0 #include <toboot.h> TOBOOT_CONFIGURATION(0);