有(免费)嵌入式 TCP/IP 堆栈的经验吗?
是否有人对以下嵌入式 TCP/IP 堆栈有过特别好的(或不好的)体验?
- uIP
- lwIP
- Bentham 的 TCP/IP Lean 实施
- TCP /IP stack 来自本书
我的需求是一个可靠的、简单的-到端口堆栈。 代码大小并不是非常重要,性能相对重要,但易用性和易用性才是最重要的。 移植非常重要。
该系统可能会使用 RTOS,但尚未决定,但根据我的经验,大多数堆栈都可以在有或没有 RTOS 的情况下使用。 该平台很可能是 ARM 变体(很可能是 ARM7 或 CM3)。
不太关心将堆栈连接到以太网驱动程序,因此这不是选择的重中之重。
我对从操作系统中提取堆栈不太感兴趣,例如 Linux、RTEMS 等。
也不感兴趣...
我对 Interniche、Micrium 等商业产品 堆栈不需要各种铃声和铃声。 口哨,不需要 IPv6,而且我不需要任何东西(Web 服务器、FTP 服务器等)。事实上,我可能只使用 UDP,尽管我可以设想几种场景TCP 更可取。
我错过的其他堆栈的经验当然也非常有趣。
感谢您的时间和信息。 输入。
Does anyone have especially good (or bad) experiences with any of the following embedded TCP / IP stacks?
- uIP
- lwIP
- Bentham's TCP/IP Lean implementation
- The TCP/IP stack from this book
My needs are for a solid, easy-to-port stack. Code size isn't terribly important, performance is relatively important, but ease of use & porting is very important.
The system will probably use an RTOS, that hasn't been decided, but in my experience most stacks can be used with or without an RTOS. Most likely the platform will be an ARM variant (ARM7 or CM3 in all likelihood).
Not too concerned about bolting the stack to the Ethernet driver, so that isn't a big priority in the selection.
I'm not terribly interested in extracting a stack out of an OS, such as Linux, RTEMS, etc.
I'm also not interested in commercial offerings such as Interniche, Micrium, etc...
The stack doesn't need all sorts of bells & whistles, doesn't need IPv6, and I don't need any stuff on top of it (web servers, FTP servers, etc..) In fact it's possible that I'll only use UDP, although I can envision a couple scenarios where TCP would be preferable.
Experiences with other stacks I've missed are of course also very much of interest.
Thanks for your time & input.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我广泛使用过 uIP 和 lwIP。
uIP
lwIP
编辑:
我们从未将任何一个与 RTOS 一起使用,因为从来没有需要。
I've used both uIP and lwIP extensively.
uIP
lwIP
EDIT:
And we've never used either with an RTOS as there has never been a need.
lwIP+1。
几年前,我们在一个项目中成功地使用了它,并发现它通常非常可靠。 我们发现并修复了一些问题(通常是 TCP 代码中的极端情况),并将其提交回项目,尽管此后该项目已经取得了很大进展,但我们通常没有发现它缺少任何功能。
正如您怀疑的那样,无论有没有 RTOS,它都可以工作。 我们花了大约一周的时间才在带有 RTOS 的系统上运行,其中包括我们必须进行的更改以支持不寻常的 DSP 编译器。 由于您可能在 ARM 上使用 GCC,因此您可以避免任何此类工作。
它确实包含比您需要的更多的功能,但是如果您的需求几年后发生变化,那么您最好从更丰富的堆栈开始。
+1 for lwIP.
We used this successfully on a project a few years back and found it to be generally very reliable. We found and fixed a few issues (generally corner cases within the TCP code) which we submitted back to the project, and even though the project has moved on quite a bit since then we didn't generally find it lacking in any features.
As you suspect it will work with or without an RTOS. It took about a week to get running on our system with an RTOS, which included changes we had to make to support an unusual DSP compiler. As you're probably using GCC on ARM you can avoid any of that effort.
It does contain many more features than you require, but if your requirements change a few years down the line then you'll be better off having started out with a more substantial stack.
lwIP
我参与了一个使用 3G 调制解调器的项目,其中我们需要 PPP 之上的 UDP/IP 堆栈(无 TCP)。 我们将范围缩小到 uIP 和 lwIP。 我们最终选择了 lwIP,因为它已经有 PPP(uIP 没有),而且我们有足够的 RAM 备用。
我们的特定项目没有使用 RTOS,并且 lwIP 在没有 RTOS 的情况下也可以使用。
我没有直接参与 lwIP 代码的移植,尽管我研究了调制解调器驱动程序以与其交互。 我的印象是,对于我们之前有 TCP/IP 经验的工程师来说,移植花了几周时间才让一切顺利进行。 lwIP 代码已被许多人破解,因此有一些粗糙的边缘(例如,有人在某处添加了一个单独的 malloc() ),但经过一些调整后它对我们有用。 我们使用独立的验证套件对其进行了测试。
总之,它“适合”满足我们的 UDP/IP 和 PPP 需求(但我无法评论其 TCP 功能)。
lwIP
I worked on a project with a 3G modem where we needed a UDP/IP stack (no TCP) on top of PPP. We narrowed down to uIP and lwIP. We picked lwIP in the end because it had PPP already (uIP doesn't), and we had enough RAM to spare.
Our particular project didn't use an RTOS, and lwIP was fine to use without an RTOS.
I wasn't directly involved in porting the lwIP code, although I worked on the modem driver to interface with it. My impression was that the porting took a couple of weeks to get everything going smoothly, for our engineer who had previous TCP/IP experience. The lwIP code has been hacked by many people, and consequently has some rough edges (e.g. someone threw in a lone malloc() somewhere) but it worked for us after a little tweaking. We tested it with an independent validation suite.
In summary, it was "suitably functional" for our UDP/IP and PPP needs (but I can't comment on its TCP capabilities).
lwIP+1。
它包含在 Luminary Micros(现为 TI)串行转以太网参考设计中,具有一些在裸机(无 RTOS)上工作的附加功能(某种“服务器端脚本”和 cgi)。
它坚如磐石,性能非常好,只有 32KB 或 RAM。
问候
PFM
+1 for lwIP.
It is included in the Luminary Micros (now TI) Serial to Ethernet reference design with some added capabilities (some sort of "server side scripting" and cgi) working on bare metal (without RTOS).
It is rock solid and very performant with only 32KB or RAM.
Regards
PFM
我对 Stellaris Cortex-M3 上的 lwip 感到满意。
适用于 LM3S6965 评估板的 StellarisWare 包括 enet_lwip 演示。 这是一个在 lwip 上运行的小型 Web 服务器,它在裸机上运行——在这种情况下没有 FreeRTOS。 该系统由定时器和以太网中断驱动。 拆除网络服务器并放入我的应用程序非常容易。 我不必成为 lwip 专家就能第一次运行它。
后来我意识到我的应用程序本质上是由上行呼叫驱动的。 起初,它有一个从插座到上电的垫圈。 我用一个更简单的层替换了该层,该层将 lwip 本机上行调用转换为应用程序的上行调用,并选择了 lwip 的套接字 API。 这节省了更多闪存和 RAM 空间,并使整个过程更快、更简单。 经过一些调整,我让它在使用 52K 闪存和 30K RAM 的 S2E 板上运行。
I am pleased with lwip on the Stellaris Cortex-M3.
StellarisWare for the LM3S6965 eval board includes the enet_lwip demo. This is a small web server running over lwip which is running over bare metal -- no FreeRTOS in this case. The system is driven by the timer and Ethernet interrupts. It was pretty easy to rip out the web server and drop in my app. I did not have to become an lwip expert to get this running the first time.
Later I realized that my app was intrinsically up-call driven. At first, it had a sockets-to-upcall gasket. I replaced that layer with a much simpler one that translates lwip native upcalls to the app's upcalls, and optioned out lwip's socket API. This saved more flash and RAM space, and made the whole thing faster and simpler. With a little tweaking I got it running on the S2E board using 52K flash and 30K RAM.
您可以尝试开源 FNET TCP/IP 堆栈。
You can try the open-source FNET TCP/IP stack.
我使用了 Microchip TCP/IP 堆栈。 我对此非常满意。 它非常容易实现,有很多演示代码/教程可用,并且支持很多协议 HTTP、tFTP、SMTP、SNTP 等。但不符合您的要求的一点是它不易移植到另一个架构。 事实上,我认为堆栈的许可证明确禁止这样做,因为 Microchip 希望您仅使用其硬件 PIC18、PIC24 和 PIC32 来运行堆栈。 然而,他们出售一个外部以太网控制器,允许您将该堆栈的某些部分与他们的 ENC28J60 一起使用。
I've used the Microchip TCP/IP stack. I've been very happy with it. It was very easy to implement, lots of demo code/tutorials available, and has support for a lot of protocols HTTP, tFTP, SMTP, SNTP, etc. A point that doesn't match your requirements however is that it is not easily portable to another architecture. In fact I think the license for the stack explicitly forbids this because Microchip wants you to run the stack only using their hardware the PIC18, PIC24, and PIC32. There is however an external Ethernet controller they sell that they will allow you to use certain portions of this stack with their ENC28J60.
我在 FreeRTOS 上使用过 Interniche。
它是一个成熟的堆栈并支持相当多的功能。
由于您正在寻找非商业版本,因此我投票给 lwIP。
I have used Interniche on FreeRTOS.
It's a full-fledged stack and supports quite a few features.
Since you are looking for a non-commercial version, my vote is on lwIP.