[riot-notifications] [RIOT-OS/RIOT] cpu/esp8266: init function in dummy lwIP to fix compilation problems if esp_wifi is not used (#10980)

Gunar Schorcht notifications at github.com
Sat Feb 9 19:02:27 CET 2019

### Contribution description

This PR fixes a minor compilation problem that is caused by PR #10862.

#### Background

If one of the modules `esp_sdk`, ` esp_sw_timer` or `esp_wifi` is enabled, the Espressif SDK must be used. The SDK has to be linked against its own version of the `lwIP` library, which usually requires a lot of resources. However, since this `lwIP` is not required by RIOT, a dummy `lwIP` was introduced in PR #10862. It overrides all `lwIP` functions called during system initialization by dummy functions without real functionality to leave `lwIP` uninitialized so that it does not consume any resources.

The dummy `lwIP` function approach works as long as module `esp_wifi` is enabled. However, if only module `esp_sdk` or `esp_sw_timer` is used, a number of multiple definition errors occur during linking.

#### Solution

This PR defines an initialization function in dummy `lwIP` which is called during system start independent on whether module module `esp_wifi` is used or not.

Initially, I planned to provide this fix as part of PR #9917. However, since PR #9917 is still not reviewed and this change is a fix, I provide it as separate PR.
### Testing procedure

Compile `test/periph_time` with module `esp_sw_timer`. Compilation should succeed with the PR but should fail without the PR.
USEMODULE=esp_sw_timer make -C tests/periph_timer BOARD=esp8266-esp-12x

### Issues/PRs references

Compilation problem was introduced with PR #10862.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * cpu/esp8266: add init function in dummy lwIP

-- File Changes --

    M cpu/esp8266/sdk/lwip.c (7)
    M cpu/esp8266/startup.c (4)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190209/dcd24400/attachment.html>

More information about the notifications mailing list