A quicker way to get started building samples
Switch branches/tags
Nothing to show
Clone or download
xobs Merge pull request #22 from schnommus/usb-synth-pr
Add a USB-MIDI audio synthesizer example
Latest commit fdd76a9 Nov 2, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bare-minimum bare-minimum: add the smallest possible project May 10, 2018
bin bin: add dfu-util binaries Jun 6, 2018
captouch Fix const char compile warning Jun 29, 2018
cbmbasic Add cbmbasic, a Commodore 64 BASIC shell through the serial port. Jul 6, 2018
include include: add toboot header file May 9, 2018
libopencm3-upstream @ 0d5e51a Update libopencm3 (for audio descriptor changes) Jul 7, 2018
libopencm3 Fix generate-libopencm3.sh Nov 2, 2018
miniblink miniblink: use USHFRCO clock for more accuracy Jun 7, 2018
opticspy opticspy: turn LED off when not in use, invert green LED May 11, 2018
prebuilt usb-synth: Add USB-MIDI audio synthesizer example Nov 2, 2018
usb-audiostream Add a usb audio streaming example Jul 8, 2018
usb-cdcacm usb-cdcacm: advertise serial device supports flow control May 11, 2018
usb-hid-keyboard Added missing Makefile for usb-hid-keyboard example Aug 14, 2018
usb-hid projects: rename _ -> - for files May 10, 2018
usb-midi projects: rename _ -> - for files May 10, 2018
usb-msc usb-msc: correct comment description Jun 8, 2018
usb-synth usb-synth: Add USB-MIDI audio synthesizer example Nov 2, 2018
.gitignore gitignore: add *.dfu May 9, 2018
.gitmodules libopencm3: add upstream repo May 9, 2018
LICENSE LICENSE: copy license over from samples repo May 10, 2018
Makefile.common Makefile: add .dfu file to `make clean` Jun 5, 2018
README.md README tweaks for newcomers Nov 2, 2018
generate-libopencm3.sh Fix generate-libopencm3.sh Nov 2, 2018
tomu-efm32hg309.ld libopencm3: update to latest and add generator script May 9, 2018

README.md

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:

  1. An ARM toolchain
  2. Make
  3. dfu-utils

Installation varies depending on your platform:

Platform ARM Toolchain Make dfu-util
Windows GNU Arm Embedded Toolchain GNU Win32 Make precompiled binaries
macOS GNU Arm Embedded Toolchain Xcode Homebrew brew install dfu-util
Debian/Ubuntu sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib sudo apt-get install make sudo apt-get install dfu-util
Fedora sudo dnf install arm-none-eabi-newlib arm-none-eabi-gcc-cs-c++ sudo dnf install make sudo dnf install dfu-util
Arch sudo pacman -S arm-none-eabi-gcc arm-none-eabi-newlib sudo pacman -S make sudo pacman -S dfu-util

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.

Building Examples

To build an example, go into the directory and type make. For example, bare-minimum.

Loading Examples

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 dfu-util --download.

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.

Troubleshooting Tips

  • The miniblink program, when correctly operating, looks quite similar to the bootloader's "waiting for instructions" state. You can change this by editing the system_millis check in the sys_tick_handler function 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-progress over 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);