This code was deprecated and removed from the documentation many
releases ago, remove the feature from the code
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The CMake extensions module depends on the yaml module, but extensions did
not explicitly include yaml.
When using find_package(Zephyr ...) with no components specified this
issue is not seen as zephyr_default is included which includes many other
modules, including yaml and extensions.
However, when find_package(Zephyr ... COMPONENTS ...) is used only the
components specified are included, which can result in a build error. For
example, using find_package(Zephyr ... COMPONENTS FindHostTools ...)
includes FindHostTools, which includes extensions, which depends on yaml
but doesn't include it.
This issue is fixed by including yaml in extensions.
Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
Fix the issue that occurs when building with GNU and
CONFIG_LINKER_GENERATOR=y.
Currently, the GROUP {region} directive does not function properly
with GNU. The input section cannot link to the memory group
defined by "zephyr,memory-region" in the final output linker
script.
This commit updates the GNU section name parser script, allowing
it to look up both group and region for output block generation
in the final output linker script.
Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Skips updating files if the output already matches the file
contents, this prevents a random occurance whereby sysbuild
reconfigures itself after a reconfiguration for no known
discernable reason
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Replace inefficient string parsing loop with CMake list iteration for
processing list_hardware.py output. The previous implementation used
repeated string operations on the entire output string for each line,
which is increasingly slow as hardware list grows.
Local tests show hwmv2.cmake module loading in ~350 ms instead of
540 ms on my machine.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Instead of mirroring the ld linker script, the CMake Linker Generator for
ARM was placing the IDT_LIST region right after the Zephyr SRAM. While this
may work fine in most cases, this scheme leads to build errors on some SoCs
such as STM32WBxx, where there are multiple RAM banks that are contiguous
but split over multiple `zephyr,memory-region`s: in such scenarios, the
IDT_LIST region will overlap with one of these `zephyr,memory-region` and
cause a build failure.
Mimic the IDT_LIST placement found in ld linker script to avoid this issue,
except that the region start address is aligned: 0xFFFF8000 instead of
0xFFFF7FFF. This is required by `gen_isr_tables.py` which otherwise errors
out due to finding one more byte than expected in the .intList section.
(The exact reason is not clear, but aligning the region fixes the issue)
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
This check is meant to be easier on users so they do not need to bother
setting ZEPHYR_TOOLCHAIN_VARIANT to "host" when building for
native_simulator based targets, so we default in that case to it.
But when somebody has actively set it to "cross-compile" we should not
override it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
As described in this issue:
https://github.com/zephyrproject-rtos/sdk-ng/issues/1038
`-flto=auto` fails on some (slower) Windows machines due to an issue with
the Zephyr SDK's GCC toolchain for Windows.
In order to allow users to work around this issue, introduce a new
CONFIG_LTO_SINGLE_THREADED option that switches to `-flto=1`, which
enforces a single thread when processing LTO.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The `add_dependencies` command in CMake is used to specify dependencies
between targets - here it was used to specify a dependency on a folder,
which is not valid (and causes failures on CMake 4.2 when using
the cmake-file-api).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit fixes bug #95402. When the GNU toolchain is installed
in its default path the library include dir will contain spaces.
By encasulating the library path in quotes the linker works again.
Signed-off-by: Rico van Dongen <rdongen@ziggo.nl>
Quotes around `"SUBALIGN ${SUBALIGN}"` results in the parameters to
become a text string with a space, and therefore will give the warning
> CMake Warning at /.../extensions.cmake:5197 (message):
> zephyr_linker_section(NAME ...) given unknown arguments: SUBALIGN 4
> Call Stack (most recent call first):
> /.../extensions.cmake:5333 (zephyr_linker_section)
> /.../CMakeLists.txt:x (zephyr_iterable_section)
Remove the quotes so that `SUBALIGN` and the value are correctly treated
as argument name and value.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Implement Scalable Vector Extension (SVE) context switching support,
enabling threads to use SVE and SVE2 instructions with lazy context
preservation across task switches.
The implementation is incremental: if only FPU instructions are used
then only the NEON access is granted and preserved to minimize context
switching overhead. If SVE is used then the NEON context is upgraded to
SVE and then full SVE access is granted and preserved from that point
onwards.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This fixes the following:
CMakeStyle File:cmake/gcc-m-cpu.cmake Line:7
Column:Remove space before '(' in if() statements
CMakeStyle File:cmake/gcc-m-cpu.cmake Line:22
Column:Remove space before '(' in if() statements
CMakeStyle File:cmake/gcc-m-cpu.cmake Line:28
Column:Remove space before '(' in if() statements
CMakeStyle File:cmake/gcc-m-cpu.cmake Line:38
Column:Remove space before '(' in if() statements
CMakeStyle File:cmake/gcc-m-cpu.cmake Line:48
Column:Remove space before '(' in if() statements
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add Cortex-A320 support to the unified FVP board structure with ARMv9.2-A
specific configuration parameters.
New board target:
- fvp_base_revc_2xaem/a320
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add ARMv9-A architecture support with Cortex-A510 CPU as the default
processor for generic ARMv9-A targets.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Fixes checking for board folders that have moved by checking if
the BOARD_DIR variable is already set (i.e. loaded from cache)
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add an option to preserve the EDK folder, instead of deleting it after
creating the archive. This can simplify test scripting which can now
avoid immediately uncompressing the archive when compiling an
extension.
If this option is enabled, default to the much faster `.tar.Z` archive
format, since the compression ratio of the archive is not important.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When both `SB_CONFIG_MCUBOOT_MODE_RAM_LOAD` and `SB_CONFIG_BOOT_ENCRYPTION`
are enabled, MCUBoot loads an encrypted image from flash, decrypts it,
and then executes it from RAM.
Previously, the unencrypted image was being flashed. This caused a boot
failure because MCUBoot would attempt to decrypt an unencrypted image.
This commit ensures the encrypted image is flashed when this
configuration is active, allowing the system to boot correctly.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
Will throw an error showing what the issue with the VERSION file
is if a required field is missing
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Removes checks for HWMv1 as the code for HWMv1 was removed from
Zephyr some time ago and these checks are not needed
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The zephyrproject-rtos#91219 missed some entries when doing the clean-up.
This removes some of remaining SUBALIGN entries in the iterable sections.
Fixes CMake Warning:
zephyr_linker_section(NAME ...) given unknown arguments: SUBALIGN 4
Signed-off-by: Joel Schaller <joel.schaller16@gmail.com>
Add support for LD-style file specifications in the
IAR generator for
`zephyr_linker_section_configure(INPUT`
Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
Signed-off-by: Roy Jamil <roy.jamil@ac6.fr>
Puncover v0.6.0 renamed the command-line argument
`--gcc_tools_base` to `--gcc-tools-base`.
Fixes compatibility error when running `west build -t puncover`
with puncover v0.6.0 or newer.
The new 'traceconfig' target generates a Markdown file listing all
configuration symbols, their values, and where those values originated
(user assignment, default, selection, implication, or unset).
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Fix wrong byproduct name for the unencrypted slot 1 image, avoiding
conflicts with the encrypted image.
Signed-off-by: Alberto Dalibor Rodda <fiabarod@proton.me>
Add arcmwdt RISC-V core/ISA mapping in target_riscv.cmake to
automatically derive compiler flags from Kconfig settings.
- Select series core flag from SoC Kconfig: -av5rmx/-av5rhx
- Map RISC-V Kconfig to ccac -Z flags (M/A/C/Zicsr/Zifencei/Zicntr)
- Handle compressed logic correctly: -Zc or individual Zc* sub-extensions
- Add F/D and compressed FPU (-Zf/-Zd, -Zcf/-Zcd)
- Add -Zmmul when M is not selected and ZMMUL is enabled
- Use OPTIONAL include to allow for arch-specific target files
Keep early compiler checks stable by not pushing -Z flags into
CMAKE_REQUIRED_FLAGS.
Co-authored-by: Torsten Tejlmand Rasmussen <torsten.rasmussen@nordicsemi.no>
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
Signed-off-by: Torsten Tejlmand Rasmussen <torsten.rasmussen@nordicsemi.no>
Specifying undefined symbol on linker invocation requests the linker to
search and include the symbol.
This ensures the symbol will be present in final output.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit enables users to pass -DQEMU_SOCKET=y for 'west' when
selecting to run the build on a QEMU VM. This allows the target's serial
port to be served to the host via a TCP/IP port for convenience, easing
communication with the target from the external world.
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Adds a new compiler flag to enable function instrumentation injection
at compile time for compilers that support it.
Adds support for this flag to GCC when `CONFIG_INSTRUMENTATION` is
enabled, setting the `-finstrument-functions` flag during compilation.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
Commit eff5d02872 added
`net_socket_service_desc` to common-rom ld snippet but not to common-rom
CMake linker generator equivalent.
Bring common-rom.cmake up-to-date to ensure `net_socket_service_desc`
works correctly with the linker generator.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
`file(COPY_FILE ...)` is from CMake 3.21.
Zephyr still supports CMake 3.20, so use zephyr_file_copy(...)
instead of `file(COPY_FILE ...)`.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fixes#91045
Adding NO_SPLIT in the TOOLCHAIN_LD_FLAGS list caused every flags in the
list to be checked together by the linker. This caused issues where
incompatible flags was passed together, and the result was that none was
propagated to the linker.
By using separate variables, we can achieve the initial goal of NO_SPLIT to
only group a sub-set of flags.
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
This commit adds support for IAR C-STAT Static Analysis
in the Zephyr's SCA Framework.
By specifying -DZEPHYR_SCA_VARIANT=iar_c_stat in west, a SQLite
database file will be generated under build/sca/iar_c_stat.
Signed-off-by: Felipe Torrezan <felipe.torrezan@iar.com>
Set -Wshadow when compiling unit tests, this way we can test macro
combinations and ensure they don't generate shadowed variables, which
would generate a warning by default in normal Zephyr builds.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Introduce a streaming APIs for ADC devices.
Two new APIs are added to the adc_driver_api: submit and get_decoder.
Added decoder following APIs: get_frame_count, get_size_info, decode,
has_trigger.
Supported triggers are:
- ADC_TRIG_DATA_READY
- ADC_TRIG_FIFO_WATERMARK
- ADC_TRIG_FIFO_FULL
Supported operations to be done on trigger:
- include - whatever data is associated with the trigger
- nop - do nothing with data associated with the trigger
- drop - clear data associated with the trigger
Some changes to the linker scripts were needed to add decoder APIs.
Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
Enhance the armfvp emulator cmake handling to allow additional options
for setting ARMFVP_BIN_PATH, relaxing the previous requirement to set in
an environment variable. This makes it possible to run twister with
multiple armfvp platforms located in different paths.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
This potentially fixes an issues whereby when sysbuild projects
import dts configuration from images and images are reconfigured,
that sysbuild will needlessly rerun even if the output has not
changed by using a temporary output file and then only updating
the actual file if the contents have changed
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Compiler property no_track_macro_expansion is controlled by
CONFIG_COMPILER_TRACK_MACRO_EXPANSION.
When that Kconfig is set to Y, clang fails with the following error
message:
unknown argument: '-ftrack-macro-expansion=0'
This commit modifies clang/compiler_flags.cmake so that there is a
proper clang compiler option for this flag.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Since we're not yet at a consensus on where 'write-block-size' should be
set, make the adjustable alignment expected only in the revert case
to restore functionality on the 'normal' case.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
implemented as an SCA for now but might benefit from being baked into
the build system so that it's always available.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>