Giter Site home page Giter Site logo

libusbhost-blackpill's Introduction

##General Information

Link to the official repository

Updated to latest libopencm3 and adapted for the STM32F411 WeAct black pill board by Florian Jung

###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

  • WeAct black pill

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)
  • dfu-util (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 dfu-util is installed, ./flash.sh executed in the repo root flashes the program to the black pill board connected via USB. The black pill must be put into bootloader mode by pressing the NRST button while holding the BOOT0 button.

Reading debug output

The following table represents the configuration of the debug output

GPIOGPIOA9
USART peripheryUSART1
FunctionUART TX
Baud rate115200
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.

libusbhost-blackpill's People

Contributors

amirhammad avatar windfisch avatar

Stargazers

 avatar

Watchers

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