Skip to content

Commit

Permalink
Merge branch 'update_ext_plat_gn' into 'main'
Browse files Browse the repository at this point in the history
example: Update external platform BUILD.gn file to support thread devices

See merge request app-frameworks/esp-matter!723
dhrishi committed Apr 30, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents cc635e2 + 58fdd40 commit 7bb5b53
Showing 1 changed file with 51 additions and 10 deletions.
61 changes: 51 additions & 10 deletions examples/common/external_platform/BUILD.gn
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ declare_args() {
chip_use_device_info_provider = false
chip_config_software_version_number = 0
chip_enable_chipoble = true
chip_enable_ethernet = false
chip_bt_nimble_enabled = true
chip_bt_bluedroid_enabled = true
chip_max_discovered_ip_addresses = 5
@@ -61,6 +62,7 @@ buildconfig_header("custom_buildconfig") {
"EXTERNAL_BLEMANAGERIMPL_HEADER=<platform/ESP32_custom/BLEManagerImpl.h>",
"EXTERNAL_KEYVALUESTOREMANAGERIMPL_HEADER=<platform/ESP32_custom/KeyValueStoreManagerImpl.h>",
"EXTERNAL_PLATFORMMANAGERIMPL_HEADER=<platform/ESP32_custom/PlatformManagerImpl.h>",
"EXTERNAL_THREADSTACKMANAGERIMPL_HEADER=<platform/ESP32_custom/ThreadStackManagerImpl.h>",
"CHIP_CONFIG_SOFTWARE_VERSION_NUMBER=${chip_config_software_version_number}",
"CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES=${chip_max_discovered_ip_addresses}",
]
@@ -107,6 +109,11 @@ static_library("ESP32_custom") {
"${chip_root}/src/setup_payload",
]

public = [
"${chip_root}/src/credentials/CHIPCert.h",
"${chip_root}/src/credentials/DeviceAttestationCredsProvider.h",
]

public_deps = [
"${chip_root}/src/crypto",
"${chip_root}/src/platform:platform_base",
@@ -143,17 +150,12 @@ static_library("ESP32_custom") {
"ConnectivityManagerImpl_WiFi.cpp",
"NetworkCommissioningDriver.cpp",
"NetworkCommissioningDriver.h",
"route_hook/ESP32RouteHook.c",
"route_hook/ESP32RouteHook.h",
"route_hook/ESP32RouteTable.c",
"route_hook/ESP32RouteTable.h",
]
if (chip_mdns == "platform") {
sources += [
"DnssdImpl.cpp",
"DnssdImpl.h",
]
}
}
if (chip_mdns == "platform") {
sources += [
"DnssdImpl.cpp",
]
}

if (chip_use_factory_data_provider) {
@@ -169,4 +171,43 @@ static_library("ESP32_custom") {
"ESP32DeviceInfoProvider.h",
]
}

if (chip_enable_ethernet || chip_enable_wifi) {
if (chip_mdns == "platform") {
sources += [
"ESP32DnssdImpl.cpp",
"ESP32DnssdImpl.h",
]
}
if (chip_mdns == "minimal") {
sources += [ "ESP32EndpointQueueFilter.h" ]
}
if (chip_enable_route_hook) {
sources += [
"route_hook/ESP32RouteHook.c",
"route_hook/ESP32RouteHook.h",
"route_hook/ESP32RouteTable.c",
"route_hook/ESP32RouteTable.h",
]
}
}

if (chip_enable_openthread) {
sources += [
"${chip_root}/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp",
"${chip_root}/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h",
"${chip_root}/src/platform/OpenThread/OpenThreadUtils.cpp",
"OpenthreadLauncher.cpp",
"OpenthreadLauncher.h",
"ThreadStackManagerImpl.cpp",
"ThreadStackManagerImpl.h",
]
if (chip_mdns == "platform") {
sources += [
"${chip_root}/src/platform/OpenThread/OpenThreadDnssdImpl.cpp",
"${chip_root}/src/platform/OpenThread/OpenThreadDnssdImpl.h",
]
}
configs -= [ "${chip_root}/build/config/compiler:warnings_default" ]
}
}

0 comments on commit 7bb5b53

Please sign in to comment.