Skip to content
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-H2: add platform support for Thread end device #9453

Merged

Conversation

wqx6
Copy link
Contributor

@wqx6 wqx6 commented Sep 3, 2021

Problem

Add platform support for Thread end device on ESP32-H2, the new BLE/15.4 combo SoC from Espressif.

Change overview

Add Thread stack in esp32 platform for our 15.4 chip ESP32-H2.

Testing

Test with ESP32-H2

  1. BLE connection with python control.
  2. Thread network provisioning

Copy link
Contributor

@chshu chshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double verify that the change won't break any functionality of ESP32 and ESP32-C3 as Wi-Fi end devices.

config/esp32/components/chip/CMakeLists.txt Outdated Show resolved Hide resolved
config/esp32/components/chip/Kconfig Outdated Show resolved Hide resolved
src/platform/ESP32/ConfigurationManagerImpl.cpp Outdated Show resolved Hide resolved
src/platform/ESP32/ConnectivityManagerImpl.h Outdated Show resolved Hide resolved
src/platform/ESP32/ESPThreadConfig.h Outdated Show resolved Hide resolved
@wqx6 wqx6 force-pushed the support_154_chip_esp32h2_with_thread branch 3 times, most recently from 573d129 to 64ebb8a Compare September 3, 2021 12:31
@wqx6 wqx6 force-pushed the support_154_chip_esp32h2_with_thread branch 2 times, most recently from 802d109 to feb68aa Compare September 3, 2021 12:38
Copy link
Contributor

@andy31415 andy31415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the code to not #ifdef large amount of code. We had this in the system and inet layer and are suffering because of this.

@chshu
Copy link
Contributor

chshu commented Sep 8, 2021

Could you ensure example apps (at least some) compile on the new platform?

./scripts/build/build_examples.py should work (so I can test compilation from vscode).

@andy31415 The ESP32-H2 IDF branch for Matter is not public yet, this PR mainly aims to enable Espressif's Thread platform support, the ESP32-H2 examples will be supported later when its IDF branch is public.

By merging this PR, it helps to unblock our internal development process, that we can develop both Wi-Fi and Thread Matter devices software on the same code base.

@andy31415
Copy link
Contributor

Could you ensure example apps (at least some) compile on the new platform?
./scripts/build/build_examples.py should work (so I can test compilation from vscode).

@andy31415 The ESP32-H2 IDF branch for Matter is not public yet, this PR mainly aims to enable Espressif's Thread platform support, the ESP32-H2 examples will be supported later when its IDF branch is public.

By merging this PR, it helps to unblock our internal development process, that we can develop both Wi-Fi and Thread Matter devices software on the same code base.

My take on this is that we deny any platforms/versions that cannot be compiled by CHIP developers and CI (if we desire) without any need of special configurations/separate downloads/signing NDAs or similar hurdles.

In this case, since this is an unreleased product, CHIP developers cannot compile it without having access to a private/restricted SDK build. This makes it unsuitable for mainline CHIP build. If you have access to some 'beta' SDK and can place that under the vscode (and/or esp32 version) we can reevaluate.

@stale
Copy link

stale bot commented Sep 15, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@woody-apple
Copy link
Contributor

@andy31415 it looks like this compiles happily, but supports upcoming development.

@wqx6 can you fix the merge conflicts here?

@stale stale bot removed the stale Stale issue or PR label Sep 17, 2021
@andy31415
Copy link
Contributor

At some point we may want to make build_examples.py also support the new board type.

@wqx6 wqx6 force-pushed the support_154_chip_esp32h2_with_thread branch from 8edbaa3 to fa47678 Compare September 18, 2021 05:49
@github-actions
Copy link

Size increase report for "esp32-example-build" from 37a6d27

File Section File VM
chip-all-clusters-app.elf .flash.text -20 -20
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,539
.debug_line,0,128
.strtab,0,105
.debug_loc,0,35
.debug_frame,0,24
[Unmapped],0,20
.debug_abbrev,0,18
.symtab,0,16
.debug_aranges,0,8
.debug_ranges,0,8
.debug_str,0,5
.riscv.attributes,0,3
.shstrtab,0,3
.flash.text,-20,-20


@woody-apple woody-apple merged commit cd2154d into project-chip:master Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants