opc ua open62541 xmc4800

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User16529
Level 4
Level 4
First solution authored
Hi,
I'm implement an opc ua server on the xmc4800 automation board. I've tried to use the Matrikon SDK, but now i'm trying with the open62541 https://github.com/open62541/open62541.
I've followed the instructions for the LWIP implementation, that include adding the following defines to the lwipopts.h file


#define LWIP_COMPAT_SOCKETS 0
#define LWIP_SOCKET 1
#define LWIP_DNS 0
#define SO_REUSE 1
#define LWIP_TIMEVAL_PRIVATE 1


the NO_SYS define is set to 1.

When I compile I get this error from the lwip library init.c file

#if ((LWIP_SOCKET || LWIP_NETCONN) && (NO_SYS==1))
#error "If you want to use Sequential API, you have to define NO_SYS=0 in your lwipopts.h"
#endif


I need to use socket and I have to set NO_SYS = 1, so i don't know what to do.
Do anyone has suggestions?

Thank you
0 Likes
7 Replies
lock attach
Attachments are accessible only for community members.
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

See attachment (upcoming example for the next lwIP release) and as a reference https://open62541.org/doc/current/building.html#freertos-lwip
You need to set NO_SYS to 0, to use the SOCKET interface see www.nongnu.org/lwip/2_1_x/group__lwip__opts__nosys.html

Regards,
Jesus
0 Likes
User16529
Level 4
Level 4
First solution authored
I've downloaded the projecty, but when i compile it stop at 30%, after build the task.c file, and goes no further. Is this a DAVE problem or is this project so heavy that the compilation may takes more than ten minutes?
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Yes, it will take longer than usual because open62541.c/.h are quite big files.

Regards,
Jesus
0 Likes
User16529
Level 4
Level 4
First solution authored
Hi,
I've build the project and run it in the xmc4800 automation board, but I don't think the server is working. I'm not able to ping the board and I've made test with a client, but it can't find the server at the board ip.
Am I missing somenthing?
0 Likes
User16529
Level 4
Level 4
First solution authored
Hi,
I've build the project and run it in the xmc4800 automation board, but I don't think the server is working. I'm not able to ping the board and I've made test with a client, but it can't find the server at the board ip.
Am I missing somenthing?
0 Likes
User16529
Level 4
Level 4
First solution authored
Nevermind, I've solved the problem. It was just the rx and tx ethercat defines in the main.c. I've set both to 4 and now everithing works fine
0 Likes
User16529
Level 4
Level 4
First solution authored
How can I add variables to the address space? through UART, or maybe with segger_rtt?
0 Likes