No description
Find a file
2018-11-13 22:43:00 +09:00
build Switch to cmake build system 2016-09-11 13:30:10 +02:00
cmake Fix CXX compiler 2016-09-11 20:09:01 +02:00
include Noise integration compiles 2018-11-08 15:41:46 +09:00
libopencm3@798c1edf4d libusbhost: Open source USB host stack for embedded devices 2015-04-01 16:22:05 +02:00
src Add tracing 2018-11-13 22:43:00 +09:00
.gitignore Noise integration compiles 2018-11-08 15:41:46 +09:00
.gitmodules libusbhost: Open source USB host stack for embedded devices 2015-04-01 16:22:05 +02:00
.travis.yml Added travis.yml 2016-09-11 13:31:34 +02:00
adjectives.py New host-side arch working 2018-11-12 23:18:45 +09:00
CMakeLists.txt Noise integration compiles 2018-11-08 15:41:46 +09:00
COPYING.GPL3 libusbhost: Open source USB host stack for embedded devices 2015-04-01 16:22:05 +02:00
COPYING.LGPL3 libusbhost: Open source USB host stack for embedded devices 2015-04-01 16:22:05 +02:00
Doxyfile Doc: set HAVE_DOT property 2016-09-11 13:31:47 +02:00
hexcom.py Hacked together a packetizing mode for hex serial utility 2018-11-06 21:29:40 +09:00
hexdump.py New host-side arch working 2018-11-12 23:18:45 +09:00
hexnoise.py Add tracing 2018-11-13 22:43:00 +09:00
initRepo.sh libusbhost: Open source USB host stack for embedded devices 2015-04-01 16:22:05 +02:00
keymap.py New host-side arch working 2018-11-12 23:18:45 +09:00
libusbhost_stm32f4.ld Noise integration compiles 2018-11-08 15:41:46 +09:00
nouns.py New host-side arch working 2018-11-12 23:18:45 +09:00
openocd.cfg Make demo work with STM32F4 board from aliexpress for SecureHID project 2018-11-01 16:39:56 +09:00
pairing.py Pairing and passthrough mostly working, except it's too slow 2018-11-13 21:45:24 +09:00
README.md Added travis.yml 2016-09-11 13:31:34 +02:00

Build Status ##General Information

Link to the official repository

###Objectives

  • provide open-source(Lesser GPL3) usb host library for embedded devices
  • execution speed. This library doesn't use blocking sleep, making low overhead on runtime performance
  • use static allocation for all of its buffers. This means no allocation and reallocation is affecting performance (possibility of memory fragmentation. execution time indeterminism). No malloc(), realloc(), free()
  • do not depend on any operating system

Supported hardware

  • stm32f4discovery

Supported device drivers

  • HUB
  • Gamepad - XBox compatible Controller
  • Generic Human Interface driver: mouse, keyboard (raw data)
  • USB MIDI devices (raw data + note on/off)

Steps to compile library and demo

Prerequisities

Make sure the following prerequisities are installed to be able to compile this library

  • git for libopencm3 submodule fetch
  • gcc-arm-none-eabi toolchain for cross compilation
  • cmake
  • ccmake (optional)
  • openocd (optional)

Basic setup

  1. go to build directory located in the root of the project

cd build

  1. compile demo and the library with the default options set

cmake .. && make

Executable demo is placed into build/demo.hex. Library is placed into build/src/libusbhost.a.

Advanced setup

cmake initial cache variables

Cache variableValueDescription
USE_STM32F4_FSTRUEEnable STM32F4 Full Speed USB host peripheral
USE_STM32F4_HSTRUEEnable STM32F4 High Speed USB host peripheral
USE_USART_DEBUGTRUEEnable writing of the debug information to USART6
OOCD_INTERFACE"stlink-v2"Interface configuration file used by the openocd
OOCD_BOARD"stm32f4discovery"Board configuration file used by the openocd
You can alter these by issuing the following commands in the build directory
  • Graphical user interface

ccmake ..

  • Command line interface

cmake .. -D{VARIABLE}={VALUE}

Flashing

If the openocd is installed, make flash executed in the build directory flashes the build/demo.hex to the stm32f4discovery board.

Reading debug output

The following table represents the configuration of the debug output

GPIOGPIOC6
USART peripheryUSART6
FunctionUART TX
Baud rate921600
Uart mode8N1

License

The libusbhost code is released under the terms of the GNU Lesser General Public License (LGPL), version 3 or later.

See COPYING.GPL3 and COPYING.LGPL3 for details.