News for hackers. Stuff that matters.
Re:LwIP – Lightweight IP Stack by tony-allan on Thursday September 05, 2024 @09:05PM (#41461870)
From the article:

"This making lwIP suitable for use in embedded systems with tens of kilobytes of free RAM and room for around 40 kilobytes of code ROM."

Re:LwIP – Lightweight IP Stack by tonyarkles on Thursday September 05, 2024 @10:14PM (#41462248)
I've run it on a Cortex M4 with a built-in Ethernet MAC peripheral. It was shockingly simple to integrate... basically just needed to set up a receive ISR that handed packets to the LwIP stack and a transmit function that the LwIP stack could call to send packets.
Re:LwIP – Lightweight IP Stack by yuye on Thursday September 05, 2024 @11:22PM (#41462602)
That simple? We've got an overseas software team that was tasked with doing the exact same.

6 months later and they still haven't got a working implementation.

Re:LwIP – Lightweight IP Stack by 1oooqooq on Friday September 06, 2024 @12:00AM (#41462770)
they are probably testing with more than the best case simple connection before declaring success, unlike everyone here.
Re:LwIP – Lightweight IP Stack by yuye on Friday September 06, 2024 @01:20AM (#41463132)
I love your optimism.

I've seen their implementation. It was horrible. We eventually took the project away from them and had the local team work on it.

Also a fun story: they didn't use version control at all. When we eventually forced them to use git, they put the whole codebase in a .zip file and committed that.

Re:LwIP – Lightweight IP Stack by _joel on Friday September 06, 2024 @03:32AM (#41463839)
I've worked with offshore companies that are similarly as bad, but then again there have been some that have been excellent. In your case, I don't know how they lasted 6 months if they're not committing to git etc, if that's the standard. They should be brought into the daily standups as 6 months to wait for some delivery seems a bit waterfally (apologies if this is a mischaracterisation).
Re:LwIP – Lightweight IP Stack by aleph_minus_one on Friday September 06, 2024 @05:16AM (#41464393)
> They should be brought into the daily standups as 6 months to wait for some delivery seems a bit waterfally (apologies if this is a mischaracterisation).

At least it it a clear mischaracterisation of waterfall:

* https://changelog.com/posts/waterfall-doesnt-mean-what-you-t...

* HN discussion: https://news.ycombinator.com/item?id=37405049

* http://bawiki.com/wiki/Waterfall.html

* HN discussion: https://news.ycombinator.com/item?id=26760606

Re:LwIP – Lightweight IP Stack by _joel on Friday September 06, 2024 @06:26AM (#41464746)
That's why I said waterfally
Re:LwIP – Lightweight IP Stack by yuye on Monday September 09, 2024 @01:52AM (#41485799)
>daily standups

Daily what?

Luckily going to another employer soon, this place is a mess.

Re:LwIP – Lightweight IP Stack by pts_ on Friday September 06, 2024 @02:18AM (#41463370)
Your onshore contract handlers were definitely difficult to work with. The number 1 reason for bad work are bad managers. See Boeing.
Re:LwIP – Lightweight IP Stack by rramadass on Friday September 06, 2024 @01:13AM (#41463097)
Are they integrating LwIP as it is or are they hacking its source to fit into your architecture?

I did the latter a decade ago for a home-grown SoC and it is non-trivial. And then testing it with conformance/performance in mind takes more time.

Re:LwIP – Lightweight IP Stack by Thervicarl on Friday September 06, 2024 @03:20AM (#41463764)
I have run it on a few hundred systems with Cortex R5 (used in a production context so demonstrated to be stable over tens of thousands of hours).

At that time there was a reference port for the Hercules development board available on-line. It was mostly working straight out of the box. I just had to fix a few issues with the Halcogen generated files (since then, TI has fixed the bugs), configure the lwIP options (to have DHCP and only use UDP). Since then (7 years ago), I have not touched the code once.

Re:LwIP – Lightweight IP Stack by rowanG077 on Friday September 06, 2024 @06:12AM (#41464653)
Well you need an Ethernet phy driver. If you have that that can work with the api of lwip it really is that easy.
Re:LwIP – Lightweight IP Stack by wiskinator on Saturday September 07, 2024 @02:39AM (#41471958)
Depends on the microcontroller and the rest of your stack but it should be fairly straight forward.

Feed received frames from your MAC into the appropriate receive function in a netif, and link the output function pointer to something that sends frames to your MAC.

Examples for STM32 parts are so prevalent on the web that ChatGPT or Copilot can probably get you working source in 30 seconds.

Re:LwIP – Lightweight IP Stack by leptons on Friday September 06, 2024 @03:39PM (#41469090)
LwIP is part of Espressif's ESP-IDF framework, for the popular ESP32 devices. I've been working with LwIP for years on this platform, and while it does work, it still takes up more memory than I'd like it to. Thankfully we now have ESP32 devices with 2MB of RAM.