Open Hardware & RISC-V

lib_pico_usb_Preview offers a from-scratch USB device stack for RP2040 and RP2350

Key Takeaway

Developer serialcomms has published a BSD-3-Clause USB device stack written directly from the RP2040/RP2350 datasheets and USB specifications, positioned as a TinyUSB alternative for Pico C SDK projects.

Summary

A developer going by serialcomms has published lib_pico_usb_Preview on GitHub, a compact USB device stack targeting the Raspberry Pi RP2040 and RP2350 microcontrollers. The library is built for the Pico C SDK and is intended as a drop-in replacement for TinyUSB in C-based projects, with all code derived from the chip datasheets and the USB specifications rather than from existing stack implementations. The project is currently in beta.

The stack implements a core plus CDC, HID and NCM class support, and those components have been tested on real hardware against Windows 10, Ubuntu and macOS hosts. It ships under the BSD-3-Clause license, and the releases include an example that presents the board to the host as a USB network adapter, exposing a telnet console so that printf and getchar are routed over the network link instead of a serial port.

What lib_pico_usb_Preview implements on RP2040 and RP2350

  • Target silicon and SDK: The stack is written for the Raspberry Pi RP2040 and RP2350 microcontrollers and integrates with the Pico C SDK, the same toolchain used by existing Pico projects that currently depend on TinyUSB.
  • Class support: The implemented device classes are CDC (communications device class, the basis for virtual serial ports), HID (human interface device) and NCM (network control model), covering serial, input and USB-Ethernet style functions.
  • Provenance of the code: According to the project description, the implementation is derived entirely from the chip datasheets and the USB specifications, making it an independent implementation rather than a fork or wrapper of an existing USB stack.
  • Host compatibility testing: The core and its CDC, HID and NCM support have been validated on hardware against Windows 10, Ubuntu and macOS hosts, which covers the three desktop operating systems most embedded developers use for host-side testing.
  • Example application: A released example exposes the board as a USB network adapter and runs a telnet console, redirecting printf and getchar over the network connection instead of a CDC serial port.

Why it matters

TinyUSB is the de facto USB stack for the Pico family, so an independent BSD-3-Clause implementation gives RP2040 and RP2350 developers a second option with a different code lineage and licensing footprint. The NCM plus telnet console example is notable for debugging and headless deployments, where a network-style link over USB can replace a serial console. Because the project is still in beta, distributions and embedded projects are unlikely to switch immediately, but it adds a maintenance alternative for anyone concerned about the dependency chain of their USB device firmware.

Original reference: blog.adafruit.com →