Skip to content

Commit

Permalink
Merge branch 'add_connectedhomeip_component' into 'main'
Browse files Browse the repository at this point in the history
Add matter component based on esp-matter sdk and connectedhomeip

See merge request app-frameworks/esp-matter!552
  • Loading branch information
chshu committed Feb 26, 2024
2 parents 9b86dec + d951642 commit d4cbddc
Show file tree
Hide file tree
Showing 7 changed files with 1,372 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/upload_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Push components to Espressif Component Service

on:
push:
branches:
- main

jobs:
upload_components:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Upload components to component service
uses: espressif/upload-components-ci-action@v1
with:
name: "esp_matter"
namespace: "espressif"
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
28 changes: 28 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,25 @@ variables:
REPOS_PATH: "$CI_PROJECT_DIR/repos"
IDF_CCACHE_ENABLE: 1

.build_managed_component_light_example:
stage: build
image: gitlab.espressif.cn:5050/app-frameworks/esp-matter/build-env:latest
tags:
- build
- matter_cache
before_script:
- *add_gitlab_ssh_key
- *get_build_caches
- *chip_submodule_update
- *setup_idf
- cd ${ESP_MATTER_PATH}
- mkdir -p ${REPOS_PATH}
- *update_build_caches
variables:
IDF_VERSION: "v5.1.2"
REPOS_PATH: "$CI_PROJECT_DIR/repos"
IDF_CCACHE_ENABLE: 1

build_esp_matter_examples_pytest_C6_idf_v5_1:
extends:
- .build_examples_template
Expand Down Expand Up @@ -305,6 +324,15 @@ build_upstream_examples:
script:
- *build_matter_examples

build_managed_component_light:
extends:
- .build_managed_component_light_example
when: manual
script:
- cd ${ESP_MATTER_PATH}/examples/managed_component_light
- idf.py set-target esp32c3
- idf.py build

build_docs:
stage: build
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.1:1-1
Expand Down
454 changes: 454 additions & 0 deletions CMakeLists.txt

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rsource "connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig"
rsource "components/esp_matter/Kconfig"
rsource "components/esp_matter_bridge/Kconfig"
rsource "components/esp_matter_console/Kconfig"
rsource "components/esp_matter_controller/Kconfig"
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# check the source file dirs
set(EXPLANT_SRC_DIRS_LIST "${CMAKE_CURRENT_LIST_DIR}/"
"${CMAKE_CURRENT_LIST_DIR}/route_hook")

set(EXPLANT_INCLUDE_DIRS_LIST "${CMAKE_CURRENT_LIST_DIR}/../../"
"${CMAKE_CURRENT_LIST_DIR}"
"${CMAKE_CURRENT_LIST_DIR}/bluedroid"
"${CMAKE_CURRENT_LIST_DIR}/nimble"
"${CMAKE_CURRENT_LIST_DIR}/route_hook")

set(EXPLANT_EXCLUDE_SRCS_LIST)

if (CONFIG_USE_MINIMAL_MDNS)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/DnssdImpl.cpp")
endif()

if ((CONFIG_USE_MINIMAL_MDNS) OR ((NOT CONFIG_ENABLE_WIFI_STATION) AND (NOT CONFIG_ENABLE_WIFI_AP)))
list(APPEND EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/WiFiDnssdImpl.cpp")
endif()

if((NOT CONFIG_ENABLE_WIFI_STATION) AND (NOT CONFIG_ENABLE_WIFI_AP))
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/ConnectivityManagerImpl_WiFi.cpp"
"${CMAKE_CURRENT_LIST_DIR}/NetworkCommissioningDriver.cpp"
"${CMAKE_CURRENT_LIST_DIR}/route_hook/ESP32RouteHook.c"
"${CMAKE_CURRENT_LIST_DIR}/route_hook/ESP32RouteTable.c")
endif()

if(NOT CONFIG_ENABLE_ROUTE_HOOK)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/route_hook/ESP32RouteHook.c"
"${CMAKE_CURRENT_LIST_DIR}/route_hook/ESP32RouteTable.c")
endif()

if ((CONFIG_BT_ENABLED) AND (CONFIG_ENABLE_CHIPOBLE))
if (CONFIG_BT_NIMBLE_ENABLED)
list(APPEND EXPLANT_SRC_DIRS_LIST "${CMAKE_CURRENT_LIST_DIR}/nimble")
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/bluedroid/BLEManagerImpl.cpp")
if(NOT CONFIG_ENABLE_ESP32_BLE_CONTROLLER)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/bluedroid/ChipDeviceScanner.cpp")
endif()
else()
list(APPEND EXPLANT_SRC_DIRS_LIST "${CMAKE_CURRENT_LIST_DIR}/bluedroid")
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/nimble/BLEManagerImpl.cpp")
if(NOT CONFIG_ENABLE_ESP32_BLE_CONTROLLER)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/nimble/ChipDeviceScanner.cpp"
"${CMAKE_CURRENT_LIST_DIR}/nimble/misc.c"
"${CMAKE_CURRENT_LIST_DIR}/nimble/peer.c")
endif()
endif()
endif()

if (NOT CONFIG_ENABLE_ETHERNET_TELEMETRY)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/ConnectivityManagerImpl_Ethernet.cpp"
"${CMAKE_CURRENT_LIST_DIR}/NetworkCommissioningDriver_Ethernet.cpp")
endif()

if (NOT CONFIG_ENABLE_MATTER_OVER_THREAD)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/OpenthreadLauncher.c"
"${CMAKE_CURRENT_LIST_DIR}/ThreadStackManagerImpl.cpp")
endif()

if (NOT CONFIG_ENABLE_OTA_REQUESTOR)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/OTAImageProcessorImpl.cpp")
endif()


if (NOT CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/ESP32FactoryDataProvider.cpp")
endif()

if (NOT CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/ESP32DeviceInfoProvider.cpp")
endif()

if (NOT CONFIG_SEC_CERT_DAC_PROVIDER)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/ESP32SecureCertDACProvider.cpp")
endif()

if (NOT CONFIG_USE_ESP32_ECDSA_PERIPHERAL)
list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/ESP32CHIPCryptoPAL.cpp")
endif()
Loading

0 comments on commit d4cbddc

Please sign in to comment.