NO_SYS and socket

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

NO_SYS and socket

Fw89
Hi,
I'm trying to implement an open62541 opc ua server on my mcu and i need to
use socket, but when i compile i get this error

#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 have to set NO_SYS = 1, because my mcu doesn't has an OS. What can i do?
Thank you very much



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: NO_SYS and socket

goldsimon@gmx.de
Am 16.03.2020 um 12:34 schrieb Fw89:

> Hi,
> I'm trying to implement an open62541 opc ua server on my mcu and i need to
> use socket, but when i compile i get this error
>
> #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 have to set NO_SYS = 1, because my mcu doesn't has an OS. What can i do?
> Thank you very much

The socket API currently needs threads. This *could* be changed to allow
non-blocking calls, but that's currently not implemented.

The standard socket API does block calling application threads on
specific functions like send (if there's no buffer) or recv (if there's
no data). That doesn't work without an OS, as you would block the whole
stack in absence of multiple execution contexts (a.k.a. threads).

Regards,
Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users