Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By BarryP
#9788 Hi kadamski ,
Thanks for sharing the project.
I have lwip building in windows/eclipse .
I do have a question from a novice .....

How can i integrate eagle_lwip_if_alloc in eagle_lwip_if.c into a project when it appears to already be part of libmain.a ?
Is there a function to set the call to it .. ?

Barry
User avatar
By kadamski
#9800 You have to get rid of eagle_lwip_if_alloc.o in your libmain.a. Libraries are just archives with object files inside. You have to unpack it, remove/replace eagle_lwip_if_alloc.o and pack it again. The AR util from gcc can do it all for you.

Option 1 - replace original eagle_lwip_if_alloc.o with the new one:
Code: Select allxtensa-lx106-elf-ar rs libmain.a PATH_TO_LWIP/our/eagle_lwip_if_alloc.o

This has to be done each time netif structure is changed in your project.

Option 2 (my preferred way) - remove the eagle_lwip_if_alloc.o from libmain.a:
Code: Select allxtensa-lx106-elf-ar ds libmain.a eagle_lwip_if_alloc.o


And modify lwip Makefile to include our/eagle_lwip_if_alloc.o in OBJS so that its added to liblwip.a. This may create some little problems with the linking order in existing projects since eagle_lwip_if_alloc.o is now in different library, though.
User avatar
By BarryP
#9804 Excellent !
Job done . I now have a slimmer libmain.a
BTW , I have gone through most of the files and changed the backslashes to forwardslashes in the includes.
I.E. lwip\ip_addr.h >> lwip/ip_addr.h
Although it all compiled ok , the red error markers in eclipse wouldn't go away without doing the change.

Is The " check framework " something i can download and include in this project ?

Barry