Follow-up: #41301
This commit is a rework and cleanup of the tools handling in Zephyr
CMake build system.
Instead of directly loading code a CMake modules for tool lookup, the
host tools now follows the CMake `find_package()` pattern for finding
programs / tools in module mode.
This makes it more clear which modules are responsible for finding tools
and which modules provides build integration / features.
The following tools can now be found using `find_package()`:
- Zephyr-sdk : find_package(Zephyr-sdk <version>)
- Generic host tools: find_package(HostTools)
This further allows us to decouple the `verify-toolchain` CMake script
part required by `twister` into a tool lookup module and a dedicated
CMake script which utilizes the lookup module.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Create a cmake/modules folder containing all Zephyr CMake modules.
All Zephyr cmake files that are included from boilerplate are now
converted into CMake modules which can be individually loaded.
The Zephyr CMake package is updated to support loading of individual
CMake modules using the COMPONENTS argument to `find_package(Zephyr)`.
If the COMPONENTS argument is not specified, the default Zephyr build
system will load.
If COMPONENTS is specified then, only those components and the
dependencies will be loaded.
If a Zephyr CMake module depends on another CMake module which has not
been loaded, it will automatically be loaded.
This allows us to modularize and reuse individual parts of the Zephyr
CMake build system in a more flexible way in future.
Such usage could be:
- Higher livel multi image build system
- Invocation of individual components, for example dts processing by
twister without loading all build code
- Doc build
- Unittesting
With this new CMake package and CMake module scheme then direct
sourcing of boilerplate.cmake has been deprecated.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
With the revert of commit 820d327b46 then
some additional code can be cleaned up.
This removes the final left-overs from Zephyr SDK 0.11.1 support and
older.
It further aligns message printing when including Zephyr SDK toolchain
to other toolchain message printing.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit sets the minimum required Zephyr SDK version to 0.13.1,
which fixes the following critical issues:
1. Xtensa initial malloc failure (GitHub issue #38258)
2. ARMv8-M security extension vulnerability (CVE-2021-35465)
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
In order to use the newlib retagetable locking interface (for thread
safety), which requires the newlib multi-threading feature to be
enabled, the Zephyr SDK 0.13.0 or above must be used.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
After the ARM/ARM64 split the SDK 0.12.4 is needed to be able to compile
the ARM64 arch code. Bail out if an old SDK is detected at compile time.
Also change the minimal supported Zephyr SDK to v0.12, as agreed in
Toolchain WG. Main reason is added compiler architectures and important
inclusion of fixes, for example qemu and arm fixes for veneers (TFM)
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Fixes: #30713
Now using the common script `verify-toolchain.cmake` for verifying
toolchain settings.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>