[Top][All Lists]

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

Re: [lwip-users] What is the recommended steps to upgrade to 2.0.0?

From: Sergio R. Caprile
Subject: Re: [lwip-users] What is the recommended steps to upgrade to 2.0.0?
Date: Fri, 27 May 2016 10:08:52 -0300
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

This is my personal opinion, I'm no lwIP developer, just another user.
Your problem is not lwIP's fault but your vendor's fault.
Every port has to reference lwIP files somehow, common practice is to use a makefile or an IDE file list. In some cases you can just reference directories. The stack started as an IPv4 stack and so the file was named ip.c; then it has grown to support IPv6 and as in every project, files may change names to keep consistency and maintainability. If you (or your vendor) want(s) to hardcode lwIP into a library, that is your (his) business. For example, this is my build (bash) script for an example (SMTP) on my testbed in Linux:
LWIPINCLUDE="-I${LWIPDIR}/include -I${LWIPDIR}/include/ipv4"
PLATFORMINCLUDE="-I${CONTRIBDIR}/ports/unix/include -I${CONTRIBDIR}/ports/unix/proj/minimal"

gcc ${*} -DSMTP_DEBUG=LWIP_DBG_ON ${CFLAGS} -o smtp smtp.c ${LWIPUNIXDIR}/lwip_unix.o ${CONTRIBDIR}/ports/unix/proj/minimal/liblwip4.a ${CONTRIBDIR}/ports/unix/proj/minimal/timer.o ${CONTRIBDIR}/apps/smtp/smtp.c -I${CONTRIBDIR}/apps/smtp

Here, lwip_unix is where I do the Linux specific stuff.
As you can see, there are not many references to change.

This is part of the config for my project in Keil, whose generated code I run on my Cortex-M3 hardware:


As you see, files are referenced by name, and a name change is just a matter of watching the "file not found" error and replacing by point and click. I bet many other options will be very similar, so our little effort for once in the project lifetime is nothing in comparison to code readability and maintainability, and name changes are part of that.

reply via email to

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