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

More cleanup for the openthread build targets and EFR32 #22049

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/chef/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ efr32_executable("chef_app") {
if (chip_enable_openthread) {
deps += [
"${chip_root}/third_party/openthread:openthread",
"${chip_root}/third_party/openthread:openthread_device",
"${examples_plat_dir}:efr-matter-shell",
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/light-switch-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ efr32_executable("light_switch_app") {
if (chip_enable_openthread) {
deps += [
"${chip_root}/third_party/openthread:openthread",
"${chip_root}/third_party/openthread:openthread_device",
"${examples_plat_dir}:efr-matter-shell",
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ efr32_executable("lighting_app") {
if (chip_enable_openthread) {
deps += [
"${chip_root}/third_party/openthread:openthread",
"${chip_root}/third_party/openthread:openthread_device",
"${examples_plat_dir}:efr-matter-shell",
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/lock-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ efr32_executable("lock_app") {
if (chip_enable_openthread) {
deps += [
"${chip_root}/third_party/openthread:openthread",
"${chip_root}/third_party/openthread:openthread_device",
"${examples_plat_dir}:efr-matter-shell",
]
}
Expand Down
15 changes: 4 additions & 11 deletions examples/shell/shell_common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,10 @@ static_library("shell_common") {

if (chip_enable_openthread &&
(current_os == "freertos" || current_os == "zephyr")) {
if (chip_openthread_ftd) {
public_deps += [
"${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd",
"${chip_root}/third_party/openthread/repo:libopenthread-ftd",
]
} else {
public_deps += [
"${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd",
"${chip_root}/third_party/openthread/repo:libopenthread-mtd",
]
}
public_deps += [
"${chip_root}/third_party/openthread:openthread_cli",
"${chip_root}/third_party/openthread:openthread_device",
]
}

if (chip_shell_cmd_server) {
Expand Down
1 change: 1 addition & 0 deletions examples/thermostat/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ efr32_executable("thermostat_app") {
if (chip_enable_openthread) {
deps += [
"${chip_root}/third_party/openthread:openthread",
"${chip_root}/third_party/openthread:openthread_device",
"${examples_plat_dir}:efr-matter-shell",
]
}
Expand Down
1 change: 1 addition & 0 deletions examples/window-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ efr32_executable("window_app") {
if (chip_enable_openthread) {
deps += [
"${chip_root}/third_party/openthread:openthread",
"${chip_root}/third_party/openthread:openthread_device",
"${examples_plat_dir}:efr-matter-shell",
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/inet/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static_library("inet") {
}

if (chip_system_config_use_open_thread_inet_endpoints) {
public_deps += [ "${chip_root}/third_party/openthread:openthread" ]
public_deps += [ "${chip_root}/third_party/openthread:openthread_device" ]
}

if (chip_inet_config_enable_tcp_endpoint) {
Expand Down
4 changes: 2 additions & 2 deletions src/platform/EFR32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ static_library("EFR32") {
"$dir_pw_kvs",
]
if (chip_enable_openthread) {
public_deps += [ "${chip_root}/third_party/openthread:openthread" ]
public_deps += [ "${chip_root}/third_party/openthread:openthread_device" ]

deps += [ "${chip_root}/third_party/silabs:openthread_cli" ]
deps += [ "${chip_root}/third_party/openthread:openthread_cli" ]

sources += [
"../OpenThread/OpenThreadUtils.cpp",
Expand Down
1 change: 1 addition & 0 deletions src/test_driver/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ efr32_executable("efr32_device_tests") {
if (chip_enable_openthread) {
deps += [
"${chip_root}/third_party/openthread:openthread",
"${chip_root}/third_party/openthread:openthread_device",
"${examples_plat_dir}:efr-matter-shell",
]
}
Expand Down
21 changes: 19 additions & 2 deletions third_party/openthread/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,27 @@ group("openthread") {
"${chip_root}/third_party/openthread/platforms:libopenthread-platform",
"${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils",
]
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is openthread-platform...


group("openthread_device") {
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is "openthread":

Copy link
Member Author

@jmartinez-silabs jmartinez-silabs Aug 22, 2022

Choose a reason for hiding this comment

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

I put device as a full thread Device or minimal Thread Device and kept simply open thread for the other one has it was already name that way but sure I scan swap/rename them

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, you should swap them because the names mean something in the upstream, and that meaning should be respected here. "libopenthread" is the openthread core API. "libopenthread-platform" is the platform API.

if (chip_openthread_target != "") {
public_deps = [ chip_openthread_target ]
} else {
if (chip_openthread_ftd) {
public_deps = [ "${openthread_root}:libopenthread-ftd" ]
} else {
public_deps = [ "${openthread_root}:libopenthread-mtd" ]
}
}
}

group("openthread_cli") {
if (chip_openthread_target == "") {
if (chip_openthread_ftd) {
public_deps += [ "${openthread_root}:libopenthread-ftd" ]
public_deps = [ "${openthread_root}:libopenthread-cli-ftd" ]
} else {
public_deps += [ "${openthread_root}:libopenthread-mtd" ]
public_deps = [ "${openthread_root}:libopenthread-cli-mtd" ]
}
}
}
2 changes: 1 addition & 1 deletion third_party/openthread/ot-efr32
Submodule ot-efr32 updated 35 files
+1 −1 examples/sleepy-demo/README.md
+ libs/libsl_ot_stack_ftd_efr32mg12_gcc.a
+ libs/libsl_ot_stack_ftd_efr32mg13_gcc.a
+ libs/libsl_ot_stack_ftd_efr32mg14_gcc.a
+ libs/libsl_ot_stack_ftd_efr32mg21_gcc.a
+ libs/libsl_ot_stack_ftd_efr32mg24_gcc.a
+ libs/libsl_ot_stack_mtd_efr32mg12_gcc.a
+ libs/libsl_ot_stack_mtd_efr32mg13_gcc.a
+ libs/libsl_ot_stack_mtd_efr32mg14_gcc.a
+ libs/libsl_ot_stack_mtd_efr32mg21_gcc.a
+ libs/libsl_ot_stack_mtd_efr32mg24_gcc.a
+ libs/libsl_platform_ftd_dmp_efr32mg12_gcc.a
+ libs/libsl_platform_ftd_dmp_efr32mg13_gcc.a
+ libs/libsl_platform_ftd_dmp_efr32mg21_gcc.a
+ libs/libsl_platform_ftd_dmp_efr32mg24_gcc.a
+ libs/libsl_platform_ftd_efr32mg12_gcc.a
+ libs/libsl_platform_ftd_efr32mg13_gcc.a
+ libs/libsl_platform_ftd_efr32mg14_gcc.a
+ libs/libsl_platform_ftd_efr32mg21_gcc.a
+ libs/libsl_platform_ftd_efr32mg24_gcc.a
+ libs/libsl_platform_mtd_dmp_efr32mg12_gcc.a
+ libs/libsl_platform_mtd_dmp_efr32mg13_gcc.a
+ libs/libsl_platform_mtd_dmp_efr32mg21_gcc.a
+ libs/libsl_platform_mtd_dmp_efr32mg24_gcc.a
+ libs/libsl_platform_mtd_efr32mg12_gcc.a
+ libs/libsl_platform_mtd_efr32mg13_gcc.a
+ libs/libsl_platform_mtd_efr32mg14_gcc.a
+ libs/libsl_platform_mtd_efr32mg21_gcc.a
+ libs/libsl_platform_mtd_efr32mg24_gcc.a
+1 −1 openthread
+12 −0 src/src/ieee802154-packet-utils.cpp
+16 −0 src/src/openthread-core-efr32-config.h
+123 −10 src/src/radio.c
+10 −0 src/src/sl_packet_utils.h
+1 −1 third_party/silabs/gecko_sdk
78 changes: 33 additions & 45 deletions third_party/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,6 @@ group("efr32_sdk") {
public_deps = [ efr32_sdk_target ]
}

if (chip_enable_openthread) {
group("openthread_cli") {
if (!use_silabs_thread_lib) {
if (chip_openthread_ftd) {
public_deps = [ "${sl_openthread_root}:libopenthread-cli-ftd" ]
} else {
public_deps = [ "${sl_openthread_root}:libopenthread-cli-mtd" ]
}
}
}
}

if (use_silabs_thread_lib) {
config("libopenthread-platform_config") {
include_dirs = [ "${sl_openthread_root}/examples/platforms" ]
Expand Down Expand Up @@ -74,7 +62,6 @@ if (use_silabs_thread_lib) {
"RADIO_CONFIG_DMP_SUPPORT=1",
"${efr32_board}=1",
"${efr32_mcu}",
"USE_SL_THREAD_CERT_LIB",
"OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE=\"openthread-core-efr32-config-check.h\"",
]

Expand All @@ -88,7 +75,6 @@ if (use_silabs_thread_lib) {

source_set("openthread_core_config_efr32") {
sources = [
"${sl_openthread_root}/src/cli/cli_config.h",
"${sl_ot_efr32_root}/src/src/openthread-core-efr32-config-check.h",
"${sl_ot_efr32_root}/src/src/openthread-core-efr32-config.h",
]
Expand All @@ -102,37 +88,39 @@ if (use_silabs_thread_lib) {
}

source_set("ot-efr32-cert") {
sources = [
"${sl_openthread_root}/examples/apps/cli/cli_uart.cpp",
"${sl_openthread_root}/src/cli/cli.cpp",
"${sl_openthread_root}/src/cli/cli.hpp",
"${sl_openthread_root}/src/cli/cli_coap.cpp",
"${sl_openthread_root}/src/cli/cli_coap.hpp",
"${sl_openthread_root}/src/cli/cli_coap_secure.cpp",
"${sl_openthread_root}/src/cli/cli_coap_secure.hpp",
"${sl_openthread_root}/src/cli/cli_commissioner.cpp",
"${sl_openthread_root}/src/cli/cli_commissioner.hpp",
"${sl_openthread_root}/src/cli/cli_config.h",
"${sl_openthread_root}/src/cli/cli_dataset.cpp",
"${sl_openthread_root}/src/cli/cli_dataset.hpp",
"${sl_openthread_root}/src/cli/cli_history.cpp",
"${sl_openthread_root}/src/cli/cli_history.hpp",
"${sl_openthread_root}/src/cli/cli_joiner.cpp",
"${sl_openthread_root}/src/cli/cli_joiner.hpp",
"${sl_openthread_root}/src/cli/cli_network_data.cpp",
"${sl_openthread_root}/src/cli/cli_network_data.hpp",
"${sl_openthread_root}/src/cli/cli_output.cpp",
"${sl_openthread_root}/src/cli/cli_output.hpp",
"${sl_openthread_root}/src/cli/cli_srp_client.cpp",
"${sl_openthread_root}/src/cli/cli_srp_client.hpp",
"${sl_openthread_root}/src/cli/cli_srp_server.cpp",
"${sl_openthread_root}/src/cli/cli_srp_server.hpp",
"${sl_openthread_root}/src/cli/cli_tcp.cpp",
"${sl_openthread_root}/src/cli/cli_tcp.hpp",
"${sl_openthread_root}/src/cli/cli_udp.cpp",
"${sl_openthread_root}/src/cli/cli_udp.hpp",
"${sl_openthread_root}/src/cli/x509_cert_key.hpp",
]
if (enable_openthread_cli) {
sources = [
"${sl_openthread_root}/examples/apps/cli/cli_uart.cpp",
"${sl_openthread_root}/src/cli/cli.cpp",
"${sl_openthread_root}/src/cli/cli.hpp",
"${sl_openthread_root}/src/cli/cli_coap.cpp",
"${sl_openthread_root}/src/cli/cli_coap.hpp",
"${sl_openthread_root}/src/cli/cli_coap_secure.cpp",
"${sl_openthread_root}/src/cli/cli_coap_secure.hpp",
"${sl_openthread_root}/src/cli/cli_commissioner.cpp",
"${sl_openthread_root}/src/cli/cli_commissioner.hpp",
"${sl_openthread_root}/src/cli/cli_config.h",
"${sl_openthread_root}/src/cli/cli_dataset.cpp",
"${sl_openthread_root}/src/cli/cli_dataset.hpp",
"${sl_openthread_root}/src/cli/cli_history.cpp",
"${sl_openthread_root}/src/cli/cli_history.hpp",
"${sl_openthread_root}/src/cli/cli_joiner.cpp",
"${sl_openthread_root}/src/cli/cli_joiner.hpp",
"${sl_openthread_root}/src/cli/cli_network_data.cpp",
"${sl_openthread_root}/src/cli/cli_network_data.hpp",
"${sl_openthread_root}/src/cli/cli_output.cpp",
"${sl_openthread_root}/src/cli/cli_output.hpp",
"${sl_openthread_root}/src/cli/cli_srp_client.cpp",
"${sl_openthread_root}/src/cli/cli_srp_client.hpp",
"${sl_openthread_root}/src/cli/cli_srp_server.cpp",
"${sl_openthread_root}/src/cli/cli_srp_server.hpp",
"${sl_openthread_root}/src/cli/cli_tcp.cpp",
"${sl_openthread_root}/src/cli/cli_tcp.hpp",
"${sl_openthread_root}/src/cli/cli_udp.cpp",
"${sl_openthread_root}/src/cli/cli_udp.hpp",
"${sl_openthread_root}/src/cli/x509_cert_key.hpp",
]
}

public_configs = [
":openthread_efr32_config",
Expand Down