GithubHelp home page GithubHelp logo

corbolais / tomu-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from im-tomu/tomu-samples

0.0 2.0 0.0 413 KB

Code samples for the Tomu board

Home Page: https://tomu.im

License: GNU General Public License v3.0

Makefile 25.97% C 68.23% Python 0.88% C++ 4.44% Shell 0.48%

tomu-samples's Introduction

Tomu Samples

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

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:

  • A USB-Serial CDCACM device example (usb_cdcacm)
  • A USB HID mouse emulation example (usb_hid)
  • A USB Mass Storage Device example (usb_msc)
  • A USB MIDI example (usb_midi)
  • A raw endpoint example with a sample python program that controls an LED

Building

  1. To compile these, you'll need a cross-compiling toolchain to arm-none-eabi.
  • Debian/Ubuntu/... : sudo apt-get install gcc-arm-none-eabi
  • Fedora : sudo yum install arm-none-eabi-gcc-cs arm-none-eabi-newlib
  • OpenSUSE: sudo zypper ar obs://home:mnhauke home_mnhauke && sudo zypper in cross-arm-none-gcc8 cross-arm-none-newlib-devel dfu-util
  • Arch : sudo pacman -S arm-none-eabi-gcc arm-none-eabi-newlib
  • Other Linux : check your package manager, or
  • Anything else (Windows, OSX, Linux): https://developer.arm.com/open-source/gnu-toolchain/gnu-rm
  1. Fetch the required git submodules:
git submodule init
git submodule update
  1. Run make to build all examples

Debugging build issues

It 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.

Bootloader assumptions

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.

License

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.

tomu-samples's People

Contributors

xobs avatar mithro avatar wxcafe avatar shenki avatar i8-pi avatar juergenpabel avatar micolous avatar theshaun avatar firstyear avatar joshgoes avatar cpebble avatar

Watchers

James Cloos avatar Corbo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.