Giter VIP home page Giter VIP logo

nuc126usb's Introduction

sample Nuvoton NUC126 USB device code

The Nuvoton NUC126 is an ARM Cortex-M0 based USB microcontroller capable of crystal-less USB operation. It could be compared to the Atmel/Microchip SAMD21.

At present, source code is provided for these sample devices:

  • USB CDC to UART bridge
  • USB HID mouse emulator

To their credit, Nuvoton does provide sample code in their NUC126_Series_BSP_CMSIS download. However, that code is specifically for IAR and Keil toolchains.

This code, in contrast, is written for gcc and clang.

It uses a new USB device stack written specifically for the NUC126 and uses an API modeled on vcp. vcp was written for the SAMD11 / SAMD21. Since the USB stack APIs are nearly the same, code can be more easily ported between the ataradov vcp USB stack and this NUC126usb one (as well as NUC121). Another advantage of this approach is that the code size is a little more efficient than the Nuvoton reference code.

Alternatives

I've also contributed a NUC121/NUC125/NUC126 driver to TinyUSB. Since TinyUSB runs on many different microcontrollers, code originally written for one device can often be readily adapted to many others.

Build Requirements

One approach is to use Rowley Crossworks for ARM to compile this code. It is not free software, but has been my favorite go-to ARM development tool for a decade and counting. Rowley does not officially support the Nuvoton NUC126, but you can download an open-source CPU support package for the NUC126.

OR

I've modified the build environment provided by mcu-starter-projects to work with the NUC126. With this approach, the code can be built using only open-source software. In Ubuntu-derived distributions, this is likely achieved with as little as:

sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential

nuc126usb's People

Contributors

majbthrd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.