Skip to content

Add NXP LPC54S018M-EVK bare-metal port with shared LPC ENET driver#101

Open
dgarske wants to merge 2 commits intowolfSSL:masterfrom
dgarske:nxp-LPC54S-port
Open

Add NXP LPC54S018M-EVK bare-metal port with shared LPC ENET driver#101
dgarske wants to merge 2 commits intowolfSSL:masterfrom
dgarske:nxp-LPC54S-port

Conversation

@dgarske
Copy link
Copy Markdown
Contributor

@dgarske dgarske commented Apr 14, 2026

Add NXP LPC54S018M-EVK bare-metal port with shared LPC ENET driver

First NXP platform support for wolfIP. Adds a bare-metal port for the
LPCXpresso54S018M development board (Cortex-M4F, 96 MHz) with DHCP,
ICMP ping, and TCP echo server over 100 Mbps Ethernet (LAN8720A PHY).

The Ethernet driver is split into a shared lpc_enet/ component (Synopsys
DesignWare Ethernet QoS with enhanced descriptors) and board-specific
code in lpc54s018/, matching the existing stm32/stm32h563 structure for
easy reuse across other NXP LPC boards.

Tested: DHCP lease acquisition, ICMP ping (<1 ms), TCP echo on port 7.

Example UART output:

=== wolfIP LPC54S018M-EVK ===
Starting DHCP...
Ready! ping <ip> / echo test | nc <ip> 7
DHCP configuration received.
IP Address: 10.0.4.148
Subnet Mask: 255.255.255.0
Gateway: 10.0.4.1
DNS Server: 8.8.8.8
DHCP bound: 10.0.4.148

Co-authored-by: Aidan Garske aidan@wolfssl.com

First NXP platform support for wolfIP. Adds a bare-metal port for the
LPCXpresso54S018M development board (Cortex-M4F, 96 MHz) with DHCP,
ICMP ping, and TCP echo server over 100 Mbps Ethernet (LAN8720A PHY).

The Ethernet driver is split into a shared lpc_enet/ component (Synopsys
DesignWare Ethernet QoS with enhanced descriptors) and board-specific
code in lpc54s018/, matching the existing stm32/stm32h563 structure for
easy reuse across other NXP LPC boards.

Tested: DHCP lease acquisition, ICMP ping (<1 ms), TCP echo on port 7.

Co-authored-by: Aidan Garske <aidan@wolfssl.com>
@dgarske dgarske self-assigned this Apr 14, 2026
Copilot AI review requested due to automatic review settings April 14, 2026 22:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first NXP LPC54S018M-EVK bare-metal port for wolfIP, including a shared LPC ENET (DesignWare EQoS) driver intended to be reused across other LPC MCUs, plus board build/flash tooling and CI build coverage.

Changes:

  • Introduce shared src/port/lpc_enet/ MAC/DMA + MDIO/PHY driver and a thin LPC54S018 board wrapper.
  • Add LPC54S018M-EVK bare-metal firmware (startup/IVT/syscalls/linker scripts) with DHCP + ping + TCP echo example.
  • Add build automation: per-board Makefile/scripts and a GitHub Actions workflow to compile the LPC54S018 firmware.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/port/lpc_enet/lpc_enet.h Public header for shared LPC ENET driver and PHY helpers
src/port/lpc_enet/lpc_enet.c Shared LPC ENET MAC/DMA + MDIO/PHY implementation
src/port/lpc54s018/target_ram.ld RAM-only linker script for debugger-loaded runs
src/port/lpc54s018/target.ld SPIFI flash boot linker script with reserved boot-header space
src/port/lpc54s018/syscalls.c Minimal newlib syscall stubs routing _write to USART0
src/port/lpc54s018/startup.c Reset handler and data/BSS initialization
src/port/lpc54s018/main.c Board init + wolfIP init + DHCP + TCP echo server
src/port/lpc54s018/lpc54s018_eth.h Board-specific ENET parameters + aliases to shared driver
src/port/lpc54s018/ivt.c Vector table sized to leave room for enhanced boot header
src/port/lpc54s018/flash_ram.sh pyOCD SRAM load-and-run helper
src/port/lpc54s018/flash.sh pyOCD SPIFI flash programming helper
src/port/lpc54s018/fix_checksum.py Post-build tool to patch vector checksum and write enhanced boot header
src/port/lpc54s018/config.h wolfIP configuration for this bare-metal port
src/port/lpc54s018/README.md Build/flash/test documentation for the port
src/port/lpc54s018/Makefile Standalone firmware build for LPC54S018 + shared ENET driver
Makefile Add cppcheck suppressions for new port startup/syscalls
.github/workflows/stm32n6.yml CI build job for STM32N6 port (added workflow file)
.github/workflows/lpc54s018.yml CI build job for LPC54S018 port
.github/workflows/codespell.yml Add “FRO” to codespell ignore list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/port/lpc54s018/main.c Outdated
Comment thread src/port/lpc54s018/fix_checksum.py
Comment thread src/port/lpc_enet/lpc_enet.c
@dgarske dgarske removed their assignment Apr 15, 2026
@dgarske dgarske requested a review from danielinux April 15, 2026 21:53
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.

4 participants