cpu/esp8266: fix compilation problems if module esp_wifi is not used#10980
Closed
gschorcht wants to merge 1 commit intoRIOT-OS:masterfrom
Closed
cpu/esp8266: fix compilation problems if module esp_wifi is not used#10980gschorcht wants to merge 1 commit intoRIOT-OS:masterfrom
gschorcht wants to merge 1 commit intoRIOT-OS:masterfrom
Conversation
Calling the initialization function ensures that the dummy lwIP library is used instead of the real lwIP, even if the esp_wifi module for esp8266 is not used.
Contributor
Author
|
@smlng I there any chance to get this bug fix merged before code freeze? |
Member
|
sure, however it doesn't fail for me on current master, so where is the problem? maybe because #9917 is merged? |
Contributor
Author
|
@smlng Sorry, my fault. I was completely confused with all the different branches and which change is based on which. When I opened this PR, I still supposed that PR #9917 will be delayed further. I said in description:
Of course, since #9917 is already merged, this PR seems to be obsolete. Sorry for the confusion |
Contributor
Author
|
@sming Thank you for trying to review 😎 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR fixes a minor compilation problem caused by the changes in PR #10862. The problem occurs only if module
esp_sdkoresp_sw_timeris used without moduleesp_wifi.Background
If one of the modules
esp_sdk,esp_sw_timeroresp_wifiis enabled, the Espressif SDK must be used. The SDK has to be linked against its own version of thelwIPlibrary, which requires a lot of resources. However, since this version oflwIPis unusable with RIOT, a dummylwIPwas introduced in PR #10862 which overrides alllwIPfunctions called during system initialization with dummy functions. These dummy functions have no real functionality and leave thelwIPof the SDK uninitialized so that it does not consume any resources.The dummy
lwIPfunction approach works as long as moduleesp_wifiis enabled. However, if only moduleesp_sdkoresp_sw_timeris used, a number of multiple definition errors occur during linking.Solution
This PR defines an initialization function of the dummy
lwIPwhich is called during system start independent on whether module moduleesp_wifiis used or not.Initially, I planned to provide this fix as part of PR #9917. However, since the changes in this PR fix a compilation problem and PR #9917 is still not reviewed, I provide them as aseparate PR.
Testing procedure
Compile
test/periph_timewith moduleesp_sw_timer. Compilation should succeed with the PR but should fail without the PR.Issues/PRs references
Compilation problem was introduced with PR #10862.