Page 1 of 1

how import lwip?

Posted: Thu May 19, 2022 5:06 pm
by ryota
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?

Re: how import lwip?

Posted: Thu May 19, 2022 8:21 pm
by Roberthh
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.

Re: how import lwip?

Posted: Fri May 20, 2022 2:59 am
by ryota
Thank you for your reply!
Might be better to use that as the starting point to enable SLIP.
How do I do this ?