how import lwip?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
ryota
Posts: 3
Joined: Thu May 19, 2022 4:53 pm

how import lwip?

Post by ryota » Thu May 19, 2022 5:06 pm

hello

I would like to know how to use the lwip in this conversation. https://github.com/micropython/micropython/pull/1517

when I run this command `make MICROPY_PY_LWIP=1 MICROPY_PY_LWIP_SLIP=1`, I got this error.

Code: Select all

Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
GEN build-standard/genhdr/qstr.i.last
In file included from ../../lib/lwip/src/include/lwip/init.h:40,
                 from ../../extmod/modlwip.c:40:
../../lib/lwip/src/include/lwip/opt.h:51:10: fatal error: lwipopts.h: No such file or directory
   51 | #include "lwipopts.h"
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from ../../lib/lwip/src/include/lwip/apps/mdns_opts.h:41,
                 from ../../lib/lwip/src/include/lwip/apps/mdns.h:41,
                 from ../../lib/lwip/src/apps/mdns/mdns.c:58:
../../lib/lwip/src/include/lwip/opt.h:51:10: fatal error: lwipopts.h: No such file or directory
   51 | #include "lwipopts.h"
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from ../../lib/lwip/src/core/def.c:61:
../../lib/lwip/src/include/lwip/opt.h:51:10: fatal error: lwipopts.h: No such file or directory
   51 | #include "lwipopts.h"
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from ../../lib/lwip/src/core/dns.c:87:

how do I fix this?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: how import lwip?

Post by Roberthh » Thu May 19, 2022 8:21 pm

The PR seems to have the lwip include files in extmod/lwip-include. Make sure that this path is included in the set of include directory names.
There is a lien in Makefile which seems to do that (line 249).
Anyway: this PR is pretty old, from 2015. So most likely it will not work.

The actual MicroyPython version uses LWIP and supports it. Might be better to use that as the starting point to enable SLIP.

ryota
Posts: 3
Joined: Thu May 19, 2022 4:53 pm

Re: how import lwip?

Post by ryota » Fri May 20, 2022 2:59 am

Thank you for your reply!
Might be better to use that as the starting point to enable SLIP.
How do I do this ?

Post Reply