libmicrohttpd and FreeRTOS

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

libmicrohttpd and FreeRTOS

Martin Velek
Hello,

has anyone tried to port libmicrohttpd to LWIP and FreeRTOS? My first
look stated that it is tightly coupled with pthread but with a little
modifications it could be easy to rewrite it for FreeRTOS. I am afraid
of using special functions like poll, or socket properties, which are
not compatible with lwip.

Regards,
Martin

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

Re: libmicrohttpd and FreeRTOS

goldsimon@gmx.de
Martin Velek <[hidden email]> wrote:
> has anyone tried to port libmicrohttpd to LWIP and FreeRTOS?

I haven't, but I'd be interested to hear of it once you try it. I'd imagine it could also be ported to lwIP's OS abstraction layer if FreeRTOS works...

Simon

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

Re: libmicrohttpd and FreeRTOS

Martin Velek
Hello,

I did it. I cannot say the libmicrohttpd is porting friendly. The
enclosured source code is mostly for an inspiration, it only proves
that it is possible. The libmicrohttpd itself is highly malloc
dependent.

Few points:
pthread functions has to be defined or implemented, I chose the latter
in platform.h ( I prefer static inline... with gcc
~"-functions-section" and eliminitation of unused functions). The
pthread_attr_t carries only stack size.

SO_REUSE should be enabled in lwip.

I have added  option MHD_OPTION_FORCE32 = 0xFFFFFFFFUL to enum MHD_OPTION
see http://lists.gnu.org/archive/html/libmicrohttpd/2012-08/msg00010.html

I have modified md5 and base64 to do not include memory.h if not required.

I have redefined MUNMAP macro.

> I haven't, but I'd be interested to hear of it once you try it. I'd imagine it could also be ported to lwIP's OS abstraction layer if FreeRTOS works...

See platform.h, but I did not do it. I have used my RTOS abstraction layer.

Martin

On Fri, Aug 10, 2012 at 3:16 PM, Simon Goldschmidt <[hidden email]> wrote:

> Martin Velek <[hidden email]> wrote:
>> has anyone tried to port libmicrohttpd to LWIP and FreeRTOS?
>
> I haven't, but I'd be interested to hear of it once you try it. I'd imagine it could also be ported to lwIP's OS abstraction layer if FreeRTOS works...
>
> Simon
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users

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

libmicro.zip (133K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: libmicrohttpd and FreeRTOS

Kieran Mansley

On 20 Aug 2012, at 17:12, Martin Velek wrote:

>  did it. I cannot say the libmicrohttpd is porting friendly. The
> enclosured source code is mostly for an inspiration, it only proves
> that it is possible. The libmicrohttpd itself is highly malloc
> dependent.

We should get this (or at least a link to it) onto the lwIP wiki.

Kieran

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

Re: libmicrohttpd and FreeRTOS

Martin Velek
> We should get this (or at least a link to it) onto the lwIP wiki.

Not yet.
It relies on a socket(netconn) feature to write as much data as
possible introduced in 1.4.1.


Martin

On Fri, Aug 24, 2012 at 8:25 PM, Kieran Mansley <[hidden email]> wrote:

>
> On 20 Aug 2012, at 17:12, Martin Velek wrote:
>
>>  did it. I cannot say the libmicrohttpd is porting friendly. The
>> enclosured source code is mostly for an inspiration, it only proves
>> that it is possible. The libmicrohttpd itself is highly malloc
>> dependent.
>
> We should get this (or at least a link to it) onto the lwIP wiki.
>
> Kieran
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users

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