Skip to content

Add wolfIP STM32 CubeMX Support#19

Open
aidangarske wants to merge 5 commits intowolfSSL:masterfrom
aidangarske:add-stm32-cube-ide
Open

Add wolfIP STM32 CubeMX Support#19
aidangarske wants to merge 5 commits intowolfSSL:masterfrom
aidangarske:add-stm32-cube-ide

Conversation

@aidangarske
Copy link
Member

@aidangarske aidangarske commented Feb 5, 2026

Description

Adds STM32 CubeMX/CubeIDE integration for wolfIP, enabling users to add the wolfIP TCP/IP stack to any STM32 project with Ethernet via the CMSIS pack workflow.

Changes

  • IDE/STM32Cube/README.md — Step-by-step guide covering pack installation, CubeMX project setup (ETH + NVIC config), main.c integration code, build/flash/ping verification, troubleshooting, and TLS usage with wolfSSL
  • IDE/STM32Cube/default_conf.ftl — FreeMarker template for CubeMX code generation; configures platform defines (WOLFIP_STM32_CUBEMX), socket pool sizes, buffer/MTU settings, and optional features (DHCP, HTTP, loopback, forwarding, debug) driven by CubeMX UI parameters
  • src/port/stm32_hal/stm32_hal_eth.c + stm32_hal_eth.h — HAL-based Ethernet driver with auto-detection for STM32F4/F7/H5/H7 RMII/MII configuration; plugs into wolfIP's device interface
  • src/http/httpd.c + httpd.h — Gate HTTP server code behind WOLFIP_ENABLE_HTTP so it's not compiled on embedded targets that don't need it
  • config.h — Enable HTTP by default for native/POSIX builds
  • Makefile — Add -DWOLFIP_ENABLE_HTTP to httpd-related build targets

Testing

  • Configure CubeMX with ETH + wolfIP pack → generate code → add wolfIP init + poll calls to main.c → build, flash, ping works. Used H5 board with .ioc example as well as from scratch tested ALC readme walk through.

@aidangarske aidangarske self-assigned this Feb 5, 2026
@aidangarske aidangarske marked this pull request as ready for review February 7, 2026 00:44
@danielinux danielinux requested a review from Copilot February 9, 2026 10:12
Copy link
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

This PR adds initial STM32CubeIDE/CubeMX integration scaffolding for wolfIP, and introduces a build-time flag to optionally compile the embedded HTTP server for Cube Pack componentization.

Changes:

  • Add CubeMX FreeMarker template (default_conf.ftl) to generate a wolfIP configuration header for STM32Cube projects.
  • Add STM32CubeIDE usage documentation under IDE/STM32Cube/README.md.
  • Gate the HTTP server (src/http/httpd.[ch]) behind WOLFIP_CONF_HTTP and update the Makefile so the existing HTTPD test/build objects compile with that flag.

Reviewed changes

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

Show a summary per file
File Description
src/http/httpd.h Wraps HTTPD public API behind WOLFIP_CONF_HTTP and adds <stddef.h> include.
src/http/httpd.c Wraps HTTPD implementation behind WOLFIP_CONF_HTTP.
Makefile Adds per-object CFLAGS to compile HTTPD/test objects with -DWOLFIP_CONF_HTTP.
IDE/STM32Cube/default_conf.ftl New CubeMX template to generate platform/config defines for STM32Cube projects.
IDE/STM32Cube/README.md New instructions for installing/using the wolfIP Cube Pack and optional components.

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

- Removed DNS section (WOLFIP_ENABLE_DNS doesn't exist in codebase)
- Added HTTP Server section: WOLFIP_CONF_HTTP → WOLFIP_ENABLE_HTTP
- Fixed include guard comment: _H → ____
  - Add stm32_hal_eth.c/h portable driver supporting F4, F7, H5, H7 families
  - Auto-detects RMII/MII interface configuration per STM32 family
  - Update IDE/STM32Cube/README.md with usage instructions
  - Update config.h with HTTP server configuration option
  README:
  - Add GPIO pin configuration note for custom boards
  - Clarify ETH interrupt required for RX
  - Update example IP to 192.168.0.200

  stm32_hal_eth.c:
  - Add wolfip_get_time_ms callback for CubeMX builds

  Tested on NUCLEO-H563ZI.
@aidangarske aidangarske requested a review from lealem47 February 13, 2026 17:51
@aidangarske aidangarske changed the title Add wolfIP STM32CubeIDE Support Add wolfIP STM32 CubeMX Support Feb 13, 2026
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