Skip to content

Instantly share code, notes, and snippets.

@szekelyisz
Last active January 13, 2024 22:40
Show Gist options
  • Save szekelyisz/7eb3486f12d6fffd4803396c5ae03ddf to your computer and use it in GitHub Desktop.
Save szekelyisz/7eb3486f12d6fffd4803396c5ae03ddf to your computer and use it in GitHub Desktop.
Recompiling LwIP for PlatformIO ESP8266 Arduino framework

Recompiling LwIP2 for PlatformIO ESP8266 Arduino framework

In case, for example, you want to debug it.

  1. Make sure your ~/.platformio/packages/framework-arduinoespressif8266 is a git repository. You can run git status in that directory to find out. If it's not, remove the entire directory and rebuild you sketch. This will pull the stable granch from the official repository. All following paths are relative to this directory.
  2. Install the toolchain: cd tools && ./get.py.
  3. Edit LwIP2 source code which is under sdk/lwip2/builder/lwip2-src. If you just want to change the build options, edit sdk/lwip2/builder/glue-lwip/arduino/lwipopts.h accordingly.
  4. Still in tools, cd to sdk/lwip2.
  5. Run make install.

The recompiled libraries end up in tools/sdk/lib. They will be used the next time you build your sketch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment