Skip to content

Commit 4bb79cc

Browse files
Add openthread lib with coap api enabled (#22276)
1 parent 08830a5 commit 4bb79cc

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

scripts/examples/gn_efr32_example.sh

+4
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ else
156156
optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" "
157157
shift
158158
;;
159+
--use_ot_coap_lib)
160+
optArgs+="use_silabs_thread_lib=true chip_openthread_target=$SILABS_THREAD_TARGET openthread_external_platform=\"""\" use_thread_coap_lib=true "
161+
shift
162+
;;
159163
*)
160164
if [ "$1" =~ *"use_rs911x=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then
161165
USE_WIFI=true

third_party/openthread/ot-efr32

Submodule ot-efr32 updated 55 files

third_party/silabs/BUILD.gn

+9-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ declare_args() {
2323
efr32_sdk_target = ""
2424
sl_ot_efr32_root = "${chip_root}/third_party/openthread/ot-efr32"
2525
sl_openthread_root = "${chip_root}/third_party/openthread/ot-efr32/openthread"
26+
use_thread_coap_lib = false
2627
}
2728

2829
assert(efr32_sdk_target != "", "efr32_sdk_target must be specified")
@@ -131,7 +132,7 @@ if (use_silabs_thread_lib) {
131132
":libopenthread-platform",
132133
":openthread_core_config_efr32",
133134
"${segger_rtt_root}:segger_rtt",
134-
"${sl_openthread_root}/include/openthread:openthread-platform",
135+
"${sl_openthread_root}/include/openthread:openthread",
135136
"${sl_openthread_root}/src/core/:libopenthread_core_headers",
136137
]
137138

@@ -143,10 +144,16 @@ if (use_silabs_thread_lib) {
143144
XTD = "mtd"
144145
}
145146

147+
# Use silabs openthread library stack with or without coap api enabled
148+
COAP_API = ""
149+
if (use_thread_coap_lib) {
150+
COAP_API = "coap_"
151+
}
152+
146153
public_configs += [ "${sl_openthread_root}:openthread_${XTD}_config" ]
147154

148155
libs = [
149-
"${sl_ot_efr32_root}/libs/libsl_ot_stack_${XTD}_${efr32_family}_gcc.a",
156+
"${sl_ot_efr32_root}/libs/libsl_ot_stack_${XTD}_${COAP_API}${efr32_family}_gcc.a",
150157
"${sl_ot_efr32_root}/libs/libsl_platform_${XTD}_dmp_${efr32_family}_gcc.a",
151158
]
152159
}

0 commit comments

Comments
 (0)