Skip to content

Add WIZnet W5100S driver and W5100S-EVB-Pico (RP2040) port - #204

Open
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:w5100s_evb_pico
Open

dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:w5100s_evb_pico

Conversation

@dgarske

@dgarske dgarske commented Dec 2, 2026

Copy link
Copy Markdown
Member

Bare-metal wolfIP port for the WIZnet W5100S-EVB-Pico (RP2040 Cortex-M0+ with a W5100S Ethernet controller on SPI). No pico-sdk. The W5100S is used as a plain MAC/PHY in MACRAW mode.

  • src/port/wiznet/w5100s.c - bus-agnostic MACRAW link driver
  • src/port/rp2040_w5100s/ - second-stage boot, startup, clocks, UART, SPI, DHCP + TCP/UDP echo demo, README; optional TLS 1.3 echo and TFTP firmware update under wolfBoot
  • src/wolfip.c - the checksum loops read each 16-bit word with two byte loads instead of a 2-byte memcpy, which Thumb-1 GCC does not inline
  • src/port/rp2350_cyw43439/tools/elf2uf2.py - RP2040 family ID and a --base option
  • CI workflow and membrowse target

Validated on a W5100S-EVB-Pico: DHCP, ping, TCP/UDP echo, TLS 1.3 echo, and a TFTP update under wolfBoot. The UART console was not run on hardware; testing used NET_CONSOLE=1.

WOLFBOOT=1 builds need the wolfBoot TARGET=rp2040 PR.

Copilot AI balanced review requested due to automatic review settings December 2, 2026 00:33
@dgarske dgarske self-assigned this Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

amd-versal-ddr

  • DDR: .text -256 B (-0.0%, 2,129,880 B / 16,777,216 B, total: 13% used)

amd-versal-ocm

  • OCM: .text -256 B (-0.1%, 229,336 B / 262,144 B, total: 87% used)

amd-zcu102-ddr

  • DDR: .text -256 B (-0.0%, 2,129,872 B / 16,777,216 B, total: 13% used)

amd-zcu102-ocm

  • OCM: .text -256 B (-0.1%, 229,328 B / 262,144 B, total: 87% used)

amd-zynq7000

  • OCM: .text -136 B (-0.1%, 234,384 B / 262,144 B, total: 89% used)

linux-x64-libwolfip

  • Code: .text -81 B (-0.0%, 165,301 B)

lpc54s018

  • FLASH: .text -128 B (-0.2%, 68,476 B / 16,777,216 B, total: 0% used)

stm32h563-echo

  • FLASH: .text -128 B (-0.3%, 39,788 B / 2,064,384 B, total: 2% used)

stm32h563-freertos-echo

  • FLASH: .text -128 B (-0.2%, 79,232 B / 2,064,384 B, total: 4% used)

stm32h563-freertos-https

  • FLASH: .text -784 B (-0.3%, 283,668 B / 2,064,384 B, total: 14% used)

stm32h563-full

  • FLASH: .text -816 B (-0.2%, 355,372 B / 2,064,384 B, total: 17% used)

stm32h563-https

  • FLASH: .text -784 B (-0.3%, 280,748 B / 2,064,384 B, total: 14% used)

stm32h563-tzen-ssh

  • FLASH: .text -824 B (-0.3%, 320,132 B / 654,336 B, total: 49% used)

stm32h563-wolfhal-nucleo

  • FLASH: .text -128 B (-0.3%, 40,264 B / 2,097,152 B, total: 2% used)

stm32n6

  • SRAM: .text -12 B (-0.0%, 129,772 B / 524,288 B, total: 25% used)

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Configuration changes can silently retain the unauthenticated console and watchdog, while static-IP builds and documented UDP socket overrides fail under -Werror.

6 open issues
What changed in this PR

Adds a bare-metal W5100S-EVB-Pico port, using the W5100S as an Ethernet MAC/PHY with wolfIP providing the network stack.

Changes:

  • Adds a reusable W5100S driver and RP2040 platform support.
  • Provides echo demos, optional TLS and wolfBoot-backed TFTP updates.
  • Optimizes checksum reads and adds firmware tooling, CI and memory reporting.
File Description
src/​wolfip.c Uses byte loads in checksum loops.
src/​port/​wiznet/​w5100s.h Defines the driver interface.
src/​port/​wiznet/​w5100s.c Implements MACRAW Ethernet operations.
src/​port/​rp2350_cyw43439/​tools/​elf2uf2.py Adds RP2040 and raw-binary support.
src/​port/​rp2040_w5100s/​user_settings.h Configures wolfSSL.
src/​port/​rp2040_w5100s/​tools/​boot2_pad.py Pads and checksums boot images.
src/​port/​rp2040_w5100s/​tls_echo.h Declares TLS echo operations.
src/​port/​rp2040_w5100s/​tls_echo.c Implements polled TLS echo.
src/​port/​rp2040_w5100s/​tftp_update.h Declares firmware-update operations.
src/​port/​rp2040_w5100s/​tftp_update.c Downloads updates into flash.
src/​port/​rp2040_w5100s/​target.ld.in Defines firmware memory layouts.
src/​port/​rp2040_w5100s/​syscalls.c Supplies newlib platform stubs.
src/​port/​rp2040_w5100s/​startup.c Adds reset handling and vectors.
src/​port/​rp2040_w5100s/​rp2040.h Declares platform helpers and registers.
src/​port/​rp2040_w5100s/​rp2040_xip.c Enables optional quad-flash reads.
src/​port/​rp2040_w5100s/​rp2040_periph.c Implements UART, SPI and utility routines.
src/​port/​rp2040_w5100s/​rp2040_flash.c Implements flash erase and programming.
src/​port/​rp2040_w5100s/​rp2040_clocks.c Initializes clocks, timers and GPIO.
src/​port/​rp2040_w5100s/​README.md Documents setup, variants and limitations.
src/​port/​rp2040_w5100s/​Makefile Builds firmware and signed images.
src/​port/​rp2040_w5100s/​main.c Integrates networking demos and consoles.
src/​port/​rp2040_w5100s/​config.h Sets network and memory defaults.
src/​port/​rp2040_w5100s/​boot2.S Adds second-stage flash boot.
src/​port/​rp2040_w5100s/​board.h Defines board pins and clock settings.
src/​port/​rp2040_w5100s/​.gitignore Excludes generated artifacts.
.github/​workflows/​rp2040_w5100s.yml Builds default and throughput variants.
.github/​membrowse-targets.json Adds the memory-reporting target.

Review effort: Balanced

Comment thread src/port/rp2040_w5100s/Makefile Resolved
Comment thread src/port/rp2040_w5100s/Makefile Resolved
Comment thread src/port/rp2040_w5100s/main.c Resolved
Comment thread src/port/rp2040_w5100s/main.c Resolved
Comment thread src/port/rp2040_w5100s/main.c Resolved
Comment thread src/port/rp2040_w5100s/tls_echo.c Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants