The new CONFIG_OPENTHREAD_SYS_INIT Kconfig option allows OpenThread to be automatically initialised during the Zephyr POST_KERNEL initialisation stage. If Zephyr's L2 layer OpenThread implementation is enabled, the IEEE802.15.4 shim layer initialises OpenThread in the POST_KERNEL phase. However, since Openthread may work without Zephyr's L2 layer, in this case, no object can initialise it automatically. This new Kconfig option may help start OpenThread automatically if the L2 Layer is disabled. Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
32 lines
1.0 KiB
CMake
32 lines
1.0 KiB
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_library_named(openthread_platform)
|
|
zephyr_library_sources(
|
|
alarm.c
|
|
entropy.c
|
|
misc.c
|
|
platform.c
|
|
)
|
|
|
|
if(NOT CONFIG_HDLC_RCP_IF)
|
|
# Radio platform implementation dedicated for L2 Platform adaptation layer
|
|
zephyr_library_sources_ifdef(CONFIG_NET_L2_OPENTHREAD radio.c)
|
|
zephyr_library_sources(spi.c)
|
|
endif()
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_HDLC_RCP_IF
|
|
radio_spinel.cpp
|
|
hdlc_interface.cpp
|
|
)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_BLE_TCAT ble.c)
|
|
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_DIAG diag.c)
|
|
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_COPROCESSOR uart.c)
|
|
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_CRYPTO_PSA crypto_psa.c)
|
|
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_EXTERNAL_HEAP memory.c)
|
|
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_PLATFORM_MESSAGE_MANAGEMENT messagepool.c)
|
|
zephyr_library_sources_ifdef(CONFIG_SETTINGS settings.c)
|
|
zephyr_library_sources_ifndef(CONFIG_LOG_BACKEND_SPINEL logging.c)
|
|
|
|
zephyr_include_directories(.)
|