-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 - Upgrade CHIP to ESP-IDF release v4.1 #2558
ESP32 - Upgrade CHIP to ESP-IDF release v4.1 #2558
Conversation
is your TODO a prerequisite for this landing? doesn't appear to be... |
@rwalker-apple Not really. The example is present in this repository and hence thought of updating it as well. I already have a PR ready and will submit it there. |
8c7b7bc
to
6e31e9f
Compare
0f47bcc
to
683ec7e
Compare
ok, super. I think we just need to address the CI failures, then. |
@@ -30,6 +30,7 @@ | |||
#include <support/logging/CHIPLogging.h> | |||
|
|||
#include "esp_event.h" | |||
#include "esp_netif.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So CI seems to be failing because this header can't be found. I think the Docker Images CI uses need to be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sagar-apple That's right. esp-netif.h
header is added in ESP-IDF release v4.1 and was not present in v4.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwalker-apple whats the right order to fix this in? Does he need to update the dockerfile in this PR and then publish the images?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, Dockerfile, Docker push, rebase :-(
@dhrishi, if you're ok with me pushing to your PR, I can effect the changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwalker-apple Sure, no worries
683ec7e
to
1620508
Compare
64dabbf
to
cddf373
Compare
@dhrishi we're close. here are some of the test failures from the QEMU tests:
|
more digging reveals that esp-if's version of lwip has an ip6_addr_t looks like this:
CHIP isn't expecting that. Looks to be written to expect:
@gerickson you might find this interesting I've turned off that feature of lwip for the esp32 builds |
07b811f
to
49c4b7b
Compare
@rwalker-apple Thanks for debugging and identifying the actual issue. I was not able to see the detailed failure logs in CI (like the ones you pasted above). Are the failure logs uploaded somewhere? If yes, can you please point me to them, for any subsequent issues? |
CXXFLAGS += -std=c++11 -Os | ||
CPPFLAGS += -Os | ||
CFLAGS += -Os | ||
CXXFLAGS += -std=c++11 -Os -DLWIP_IPV6_SCOPES=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kedars Is there a way to perform this configuration via the sdkconfig files? Seems very not esp-idf like to do it this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sagar-apple IMO, the option LWIP_IPV6_SCOPES should not be disabled, neither through CFLAGS nor sdkconfig. The reasons being:
- LWIP mentions that this option is to be disabled only for single-interface configurations, see here
- ESP-IDF esp-netif layer, the newly added one in v4.1, assumes that zone (introduced when LWIP_IPV6_SCOPES is enabled) is present in the IPv6 address
With the current delta in LWIP for ESP-IDF and CHIP, I think we can modify the test memcmp statement to just compare member addr
of ip6_addr_t instead. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I guess we could update the test instead. Since @rwalker-apple has looked at this test already maybe there's a reason he opted to not do it that way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modifying the memcmp() is insufficient because CHIP thinks ip6_addr_t is 16 bytes, allocates 16 bytes for it (as Addr[] in IPAddress) and routinely moves the memory as *(ip6_addr_t *)&Addr, which moves 20 bytes. This can lead to memory corruption or a crash.
My change is a hack, needs to be addressed with a more complete fix if we are planning to use LWIP_IPV6_SCOPES, which looks to me like a breaking change on LWIP's part...
Logs aren't available from CI, I had to diagnose locally. #2585 |
@pan-apple @kedars @dhrishi I think your help is needed in order to get qemu building. The new tooling seems to confuse our qemu test builder. We are ending up with something with no boot partitions: The below is from running transport tests
|
15d7de1
to
6422ad8
Compare
@rwalker-apple Looks like you fixed the Qemu related issue? Thanks! |
841c80f
to
7411f03
Compare
* expand app partition to full extent of 2MB part
7411f03
to
6986c05
Compare
Problem
Upgrade CHIP to latest ESP-IDF release v4.1 from v4.0 for ESP32 platform
ESP-IDF release v4.1 is released a few days back which has updates over release v4.0. More details about the new features, critical bug fixes etc. can be found here
Documentation for ESP-IDF release v4.1 is here
Summary of Changes
Major changes:
ToDo
tft_demo
example and update the corresponding submodule pointer in this or a subsequent PR