[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] lwip os ports

From: Kai Gemlau
Subject: [lwip-devel] lwip os ports
Date: Fri, 7 Dec 2018 03:26:29 -0700 (MST)


first of all, thank you for your long development of the lwip. I know it
since version 1.3 and there are continuous improvements until now.

I have a question about the way lwip is ported for an operating system.
My motivation is to compile the lwip core (LWIPNOAPPSFILES) as a library for
different types of cpus and different OSs.

Of course I have to use the right gcc with the right mcpu flag to create a
architecture specific library.
But I'm wondering why the arch/sysarch.h file is OS specific and therefore I
need to create OS specific libraries.

In lwip/sys.h we have all those abstract OS port functions and that should
be enough combined with generic data types.
Taking a look at the unix port in
lwip-contrib/ports/unix/port/include/arch/sys_arch.h, there are abstract
representations like:
struct sys_thread;
typedef struct sys_thread * sys_thread_t;
and the sys_thread is finally defined in the unix sys_arch.c
On the other hand, the win32 and FreeRTOS port define specific types for
sys_thread_t... in their sys_arch.h

Wouldn't it be better to separate between an OS specific sys_arch.h that is
not required for compiling the lwip core (not included in sys.h) and
abstract struct definitions in the sys.h just like it is done with the
function prototypes?
Then you could just compile the lwip core as a library that is completely
independent of the OS or MAC and just requires the right CPU architecture.


Sent from: http://lwip.100.n7.nabble.com/lwip-devel-f11621.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]