Skip to content

Commit 250745e

Browse files
Cristib05fabiobaltieri
authored andcommitted
modules: openthread: Fix compile warnings introduced by OT stack upmerge
Changes done to accomodate -Wundef introduced flag when compiling OT openthread/openthread@2918437 Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
1 parent 371c4d5 commit 250745e

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

modules/openthread/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,13 @@ target_compile_options(ot-config INTERFACE
207207
-imacros ${AUTOCONF_H}
208208
)
209209

210+
# FIXME Temporary suppress -Wundef option to avoid warning about
211+
# MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT undefined option. To be removed
212+
# when the issue is resolved in mbed TLS (the faulty option is already removed
213+
# on the development branch or there is a pending bugfix for the 3.6 branch
214+
# https://github.com/Mbed-TLS/mbedtls/pull/10112).
215+
target_compile_options(ot-config INTERFACE -Wno-undef)
216+
210217
# Openthread depends on errno.h, which includes errno_private.h in minimal libc.
211218
# errno_private.h is generated as part of ${SYSCALL_LIST_H_TARGET} target.
212219
add_dependencies(ot-config ${SYSCALL_LIST_H_TARGET})

modules/openthread/platform/openthread-core-zephyr-config.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,16 @@
211211
* in platform.
212212
*
213213
*/
214-
#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE \
215-
((CONFIG_OPENTHREAD_CSL_RECEIVER && \
216-
(OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2)) || \
217-
CONFIG_OPENTHREAD_WAKEUP_END_DEVICE)
214+
#if defined(CONFIG_OPENTHREAD_CSL_RECEIVER) || defined(CONFIG_OPENTHREAD_WAKEUP_END_DEVICE)
215+
#if defined(CONFIG_OPENTHREAD_CSL_RECEIVER) && \
216+
(OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2)
217+
#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 1
218+
#elif defined(CONFIG_OPENTHREAD_WAKEUP_END_DEVICE)
219+
#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 1
220+
#else
221+
#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 0
222+
#endif
223+
#endif /* CONFIG_OPENTHREAD_CSL_RECEIVER || CONFIG_OPENTHREAD_WAKEUP_END_DEVICE */
218224

219225
/* Zephyr does not use OpenThread's heap. mbedTLS will use heap memory allocated
220226
* by Zephyr. Here, we use some dummy values to prevent OpenThread warnings.

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ manifest:
340340
revision: c30a6d8b92fcebdb797fc1a7698e8729e250f637
341341
path: modules/lib/open-amp
342342
- name: openthread
343-
revision: 3ae741f95e7dfb391dec35c48742862049eb62e8
343+
revision: 2bc7712f57af22058770d1ef131ad3da79a0c764
344344
path: modules/lib/openthread
345345
- name: percepio
346346
path: modules/debug/percepio

0 commit comments

Comments
 (0)