This commit adds the `-Wundef` compiler flag to the OpenThread core,
CLI, and NCP builds when configured for MTD, FTD, or Radio types.
This flag helps ensure that no undefined macros are used within the
source code, protecting against potential typos in conditional
compilation checks (`#if` checks).
This commit introduces a new test framework named Nexus. The
framework includes the Nexus platform implementation that emulates
platform behavior, allowing multiple nodes running the OpenThread
core stack to be simulated and interact with each other within the
same process.
Unlike the simulation platform, where nodes run in separate processes
and interact via POSIX sockets, Nexus nodes are simulated within a
single process. Nexus tests can interact directly with the C++ or C
OT core APIs, providing more control than the simulation platform's
CLI-based interactions. The flow of time in Nexus tests is directly
controlled by the test itself, allowing for quick time interval
advancement.
This model allows for faster and more scalable simulations, enabling
quick simulation of larger networks for longer durations.
This commit introduces the basic platform implementation, including:
- `nexus_alarm`, `nexus_radio`, and `nexus_settings` modules.
- Logging support, allowing logs to be distinguished per emulated
node.
This commit updates and enhances the specification of OT core config
header files. It adds `OPENTHREAD_PLATFORM_CORE_CONFIG_FILE`, which
can be used by platforms to provide a core config header file name.
The project and platform specific config header files are included in
the following order:
1. Project specific header (`OPENTHREAD_PROJECT_CORE_CONFIG_FILE`)
2. Platform specific header (`OPENTHREAD_PLATFORM_CORE_CONFIG_FILE`)
3. Default config values as specified by `config/{module}.h`
CMake config options `OT_PROJECT_CONFIG` and `OT_PLATFORM_CONFIG` are
also defined, which can be used to specify project and platform
config headers. Platforms can define a default config header for
`OT_PLATFORM_CONFIG`. The existing `OT_CONFIG` CMake option is marked
as deprecated (with a warning message which recommends use of the new
configs).
This commit also updates the default simulation and POSIX core config
headers to remove extra Doxygen-style documentation and ensure that
all definitions have an `#ifndef` guard check.
This commit simplifies the definition of CMake configurations by
adding new macros:
- `ot_string_option` for string-valued options (`OT_VENDOR_NAME`)
- `ot_int_option` for int-valued options (`OT_MLE_MAX_CHILDREN`)
- `ot_multi_option` for multi-valued options (`OT_LOG_LEVEL`)
The option definitions have also been moved to the `options.cmake`
file from `./CMakeLists.txt`.
This commit fixes the check for CMake `OT_THREAD_VERSION` against
different version strings ("1.1", 1.2", "1.3", and "1.3.1"). The
previous check used `EQUAL`, which would do a numerical match and
would treat `1.3` and `1.3.1` as equal. This commit changes the check
to use `STREQUAL`, which does a string match and will correctly
distinguish between `1.3` and `1.3.1`.
This commit also adds new `message(STATUS)` commands to output the
selected Thread version. This makes it easier to see which version of
Thread is being built.
This commit adds `OT_THREAD_VERSION_1_3_1` constant (equal to `5`) for
Thread Version 1.3.1. It also updates the build switch options for
CMake `OT_THREAD_VERSION` and autoconfig `THREAD_VERSION` and `BUILD.gn`
to support the new version value of "1.3.1".
Note that this commit does not change the default config value of
`OPENTHREAD_CONFIG_THREAD_VERSION` which is the default version to
use if it is not explicitly specified by build switches or in a
project config file.
This commit migrates unit tests to cmake.
* build unit tests with cmake
* add missing tests in cmake
* use ctest
* add platform udp stubs for test platform
* skip some static_assert with gcc-4
The actual output power of the Thread device may be determined by both
the Thread radio chip and the FEM. Consider the output power error of
the Thread radio chip and the gain error of the FEM, the actual output
power is inconsistent with the expected output power. To guarantee
that the actual output power is accurate and meet the regulatory
requirements, the output power should be calibrated in the factory if
the output power is not accurate.
This commit contains the following changes:
- Adds a power calibration implementation
- Adds a config file to configure the target power for different
countries
- Adds a tool for the factory to persist the power calibration data
This commit adds `OT_THREAD_VERSION_1_3` constant (equal to `4`)
and change=s the `OPENTHREAD_CONFIG_THREAD_VERSION` default value
to be the 1.3 version number.
It also updates the build switch option (Cmake and autoconf)
to support 1.3 and use 1.3 as default version value (when not
explicitly specified).
This commit removes the PACKAGE_VERSION definition from the global
config target so that when the git commit id is changed, only a few
sources will be re-compiled.
This commit adds CMake support for the efr32 platforms and Silicon
Labs gecko_sdk_suite. It also adds the option to build the efr32
sleepy-demo apps.
Other changes:
- jlinkrtt: remove NordicSemi specific options/definitions/includes
from default build
- Remove old include dirs that don't exist anymore from efr32 automake
files
The echo command of the host system may have slight variations between
shell built-in echo and the echo command provided by the OS.
Especially the Windows OS echo command is different from practical any
other echo command.
This means that the currently used `COMMAND echo -e "<text>"` does not
work universally.
This commit introduces `etc/cmake/print.cmake` which allow to print a
CMake list where each item is printed on a new line, to get the desired
behavior on the `print-ot-config` target.
Using `cmake -E echo <text>` ensures identical behaviour across
different systems.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
OT_CONFIG was used to specify a customized OpenThread core config file
which is only included by OpenThread core library. This commit changes
the behavior so that it specifies the OPENTHREAD_CONFIG_FILE which is
used by all components of OpenThread including the core library.
This commit moves the URL parser to src/lib.
Also includes the following changes:
- Split URL on initialization.
- Make a GetValue() const method.
- Check aLastValue.
- Add some negative tests.
- rename "none" to NO, which computes to false in if()
- sort platform names
- add "posix" into the platform list so that it can be selected from cmake-gui
* use an older version for better compatibility
* add version to project
* only use cpack when OpenThread is the top-level project
* exclude posix apps when BUILD_EXECUTABLES is OFF
* exclude all third_party
This commit allows users to specify the mbedtls target by a
OT_EXTERNAL_MBEDTLS option.
The native cmake build system of mbedtls is not so "modern" (for
backward compatibility, it maybe hard to change it soon) and
applications using mbedtls are likely to write wrapper cmake files and
targets by themselves.
- Use cmake to build.
- Use rcp instead of transceiver simplicity.
- Add virtual time options for cmake.
- Enable readline support for posix apps.
- Use ninja instead of make.