Skip to content

Latest commit

 

History

History
30 lines (16 loc) · 1.89 KB

README.md

File metadata and controls

30 lines (16 loc) · 1.89 KB

USB CDC-ECM example for STM32F072 microcontroller

This is a second generation (and hopefully more useful) version of this project. The first was originally written due to the apparent dearth of open-source implementations of this class of device.

However, unlike the previous, this new version has embedded virtual DHCP, DNS, and web servers.

Utilizing a copy of lwIP 1.4.1 from the lrndis project, this is a CDC-ECM implementation for the STM32F072.

This is related to D21ecm, another CDC-ECM implementation (but for the Atmel SAMD21).

Note that this project functions with both Linux and Mac OS X Lion 10.7.5 hosts, but not with Mac OS X El Capitan 10.11.6 nor macOS High Sierra 10.13.16.

Alternatives

Note that my priority going forward is to add the same and additional capabilities to TinyUSB; TinyUSB has the added benefit of supporting many different processors.

Usage

TCP/IP is inherently a high memory user (at least in traditional embedded terms). However, by tweaking the options of lwIP, I have the implementation fitting within the 16kBytes of RAM and 128kBytes of FLASH available to the STM32F072.

Specifics

Look at main.c to get an idea of how the code could be modified. As written, one quantity (systick) is shown in real-time as "Device Time" on the embedded web server (192.168.7.1) and another three quantities (alpha, bravo, and charlie) are "User Controls" on the web page that cause app.c code to be executed.

Requirements for compiling

Rowley Crossworks for ARM is presently needed to compile this code.

All the code is gcc/clang compatible, and as time permits, other options may be added.