Running open62541 on STM32 Nucleo-H7S3L8 (Baremetal)

68 views
Skip to first unread message

Muhammed Sajid

unread,
Aug 22, 2025, 7:31:42 AMAug 22
to open62541

Hello everyone,

I am planning to test the open62541 library on my STM32 Nucleo-H7S3L8 board using bare-metal programming (without RTOS). I have just downloaded the latest release v1.4.13 of open62541.

If anyone has already worked on a similar project or has experience porting open62541 to STM32 platforms, I would greatly appreciate your guidance on how to get started. Specifically:

  • How to configure open62541 for STM32 (H7 series) in a bare-metal environment

  • Any project structure, examples, or minimal setup that could help

  • Key challenges or limitations I should be aware of

Your support or pointers to relevant resources would be very helpful.

Thank you in advance for your help and suggestions!

  Best regards,
Muhammed Sajid  

Proxima Centauri

unread,
Nov 26, 2025, 6:27:42 AM (9 days ago) Nov 26
to open62541
Hi Muhammed,
yes, I am trying that with NUCLEO-H536zi. I have it got running for up to 10 connections (so far only from UAexpert, but will test it with other clients soon), still have some problems with reconnections (if clients are connected and I reboot the board, then the clients sometimes  get out-of-sequence error), but basically my server looks  promising.

I downloaded the lwip stack for TCP/IP, and the open62541 vers. 1.4.14, configured with CMAKE and manually added files to the STM32CubeIDE. I do not know, how far you are with the project, but if you ask me specific questions, I can try to help you. 

Regards,
Proxima

Julius Pfrommer

unread,
Nov 26, 2025, 6:36:44 AM (9 days ago) Nov 26
to Proxima Centauri, open62541
Good to hear, Procima!
Without an RTOS do you register an interrupt handler to put incoming packets directly to lwip?

The lwip POSIX layer requires threading from an RTOS.

Regards, Julius

--
You received this message because you are subscribed to the Google Groups "open62541" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open62541+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/open62541/7f3196f0-73f3-4144-9513-1bb31993422dn%40googlegroups.com.

Proxima Centauri

unread,
Dec 2, 2025, 11:14:50 AM (3 days ago) Dec 2
to open62541
I’m not sure if my previous reply reached you, as I don’t see it here… so I’m sending it again. Apologies for any possible duplication:

No, I don’t register an interrupt handler that would forward packets from the Ethernet port to lwIP. The entire program is single-threaded: in the main loop I call a function that reads a packet from the port (as shown in the example below), and if a packet is available, I pass it to lwIP. In the same loop I also invoke the OPC UA stack UA_Server_run_iterate().

In my ConnectionManagerBAREMETAL (closely modeled on your UA_POSIXConnectionManager), I create a TCP server (in the cm.openConnection callback from open62541), which connects to lwIP through its own callbacks. When a new client connects, I create a ClientConnection 'object' that communicates with the open62541 stack.

I’ll be glad to answer any detailed questions — perhaps they’ll also help me catch potential problems in my approach.

Regards,
Proxima

while (1)
{
ethernetif_input(gnetif);  // provided by echo server example form STM
sys_check_timeouts(); /* Handle timeouts */

#if LWIP_NETIF_LINK_CALLBACK
Ethernet_Link_Periodic_Handle(gnetif);
#endif

#if LWIP_DHCP
DHCP_Periodic_Handle(gnetif);
#endif

userCodeActivation();
UA_Server_run_iterate(server, true);
Reply all
Reply to author
Forward
0 new messages