EXCLUSIVE? => LwIP + FreeRTOS vs FreeRTOS Plus

Hi,

At the risk of asking an obvious question, when it comes to implementing LwIP + FreeRTOS vs FreeRTOS Plus TCP, are these mutually exclusive?

In other words, can I use both at the same time?

Besides the information available at

What would be the better option for a project that is in its embryonic phase?

Thank you very much.

well, for once, unless you service two ethernet controllers separately from different network stacks (which also clashes with the idea of multiple end points serviced from the same stack), you would need to find a way to arbitrate your ethernet hardware between the stacks.

2 Likes

Agree with RAc’s post above.

I might be repeating https://forums.freertos.org/t/freertos-plus-tcp-vs-freertos-lwip/16910:
FreeRTOS-Plus-TCP is built for FreeRTOS, meaning seamless integration with tasks, queues, and other FreeRTOS features. You won’t need additional layers or complex configuration, simplifying your development process. It is fully thread/task-safe, eliminating potential issues with concurrent access to resources. This makes it ideal for applications with multiple tasks and complex network interactions.

In addition to the above, FreeRTOS-Plus-TCP is part of our LTS releases, providing long term stability and bug fixes. Hoping this helps you to make a choice?

Any reason you want to run both +TCP and Lwip together? Let us know if you are looking for any specific features or requirements you have to meet?

You can also try out our demos real quick on windows to get a feel for FreeRTOS-Plus-TCP.

1 Like

Thank you very much for your advice and guidance. The reason for the current project is:

Azure IoT Middleware for FreeRTOS

In the Library Architecture Image, we see that both can be used: FreeRTOS+TCP plus / LwIP.

It’s not that I want to run them together, but rather ensure which one would work better in this project, considering that the team is new to this topic. We need to choose the most suitable option for us.

I want to thank the community for this reception.

I also recommend checking what protocols you plan to use. FreeRTOS+TCP probably doesn’t provide all protocols that you need.

There is one thing that I like less about lwIP: their website says that if you want speed, you should not use the BSD (socket) interface, but rather a low-level interface called “netconn”. Find an explanation here.

FreeRTOS+TCP only offers a socket interface which is always fast.

Using netconn leads to code that is hard to understand and difficult to translate to other platforms. I rather write BSD-compatible code that can be compiled on multiple platforms.

Btw. I do run FreeRTOS+TCP and lwIP simultaneously on a Zynq. I give them both their own IP and MAC-address. I use it to compare both stacks.
The lwIP network interface will call functions in FreeRTOS+TCP’s networkInterface.c

Wish you good luck with your project. Please ask if you have new questions.

2 Likes