These projects are simple programs for the Tomu. They do various things, and are intended to offer code examples and simple testing to ease your introduction to the Tomu platform.
These are based on the libopencm3 library. To build projects using the Gecko_SDK
provided by Silicon Labs, see the gecko-sdk directory.
libopencm3 is an Open-Source lowlevel hardware library for ARM Cortex-M3 microcontrollers (but also M0, M4 are supported and more to come).
Upstream libopencm3 now supports the EFM32HG. The examples located here were modified to support the EFM32HG and tested on the Tomu with a Linux host:
usb_cdcacm
)usb_hid
)usb_msc
)usb_midi
)To compile these, you'll need a cross-compiling toolchain to arm-none-eabi.
sudo apt-get install gcc-arm-none-eabi
sudo yum install arm-none-eabi-gcc-cs arm-none-eabi-newlib
sudo pacman -S arm-none-eabi-gcc arm-none-eabi-newlib
Fetch the required git submodules:
git submodule update --init --recursive
make
to build all examplesIt can be helpful to run the build with:
CFLAGS='-v' make
This will show you include paths, commands and more, and may help you to diagnose the issue.
These examples are compatible with the non-DFU serial AN0042 bootloader. They will run in legacy mode with a DFU-enabled bootloader, such as the one shipped on v0.4 boards. They run from flash offset 0x4000, and do not auto-boot. To get back into the bootloader, reset the board (e.g. by unplugging it and plugging it back in).
If you have a DFU-enabled bootloader, upload programs using dfu-util
. For example, to upload miniblink, run:
dfu-util -d 1209:70b1 -D ./usb_hid/usb_hid.bin
If you're using the serial bootloader, upload the binary using XMODEM.
The libopencm3 code & examples are released under the terms of the GNU Lesser General Public License (LGPL), version 3 or later.
See COPYING.GPL3 and COPYING.LGPL3 for details.