Loads this file in a better way that means samples and modules
should not have to source the file before referencing Kconfig
module path variables
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Replace the default serial device with a virtconsole if it
is configured in the devicetree. Because of the way -nographic
works, -serial none and -monitor none had to be added as well.
Tested with west build -t run and west build -t debugserver_qemu.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
Extra Zephyr modules can be provided via the EXTRA_ZEPHYR_MODULES CMake
list variable. Previously, if this variable were set in multiple places
(e.g. local CMake variable, cache variable set via -D, environment
variable), Zephyr will pick one source based on zephyr_get's documented
hierarchy and ignore the others.
Add the MERGE keyword when EXTRA_ZEPHYR_MODULES is read so that the list
of Zephyr modules is merged from all sources if this variable is set in
multiple places.
An example where this can be useful is when integrating additional Zephyr
modules with a vendor's Zephyr-based application whose build system already
contains usage of EXTRA_ZEPHYR_MODULES.
Signed-off-by: Kesavan Yogeswaran <hikes@google.com>
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Introduce a new Kconfig option CPU_CORTEX_A78 to enable support for the
Arm Cortex-A78 CPU architecture within Zephyr. This configuration can be
selected by boards or SoCs that utilize the Cortex-A78 core, enabling
architecture-specific features and optimizations as needed.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Add a possibility to specify VID and CID for each MCUboot image and pass
it to the imgtool.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Adds a output env file that lists the paths of zephyr modules
which can be used in Kconfig files and uses this in Kconfig. Also
updates Kconfig doc output to generate and use this
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Provide toolchain-specific implementations for the new functions
added in d77b58a, because the default ones end up with build failures.
As the MWDT toolchain doesn't support different combinations of
compilers and linkers, there's no need to pass any linker properties
from the compiler, at least for the time being. Moreover, the default
implementation of compiler_set_linker_properties() uses the compiler
flag (--print-libgcc-file-name) that doesn't make any sense for MWDT.
Therefore, provide an empty implementation of the function.
The default implementation of toolchain_linker_add_compiler_options()
doesn't cause any issues for now, but it's still better to replace
it with the passthrough implementation borrowed from ld/lld.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
Use CMAKE_C_COMPILER_TARGET to allow clang to correctly determine
the runtime library for the target architecture.
Otherwise, the default runtime library will be selected.
Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
The computation of paths to crtbegin.o and crtend.o must be delayed until
after the compiler_file_path function has been defined. The
toolchain_linker_finalize function is where these are supposed to get set
now.
Signed-off-by: Keith Packard <keithp@keithp.com>
Adds a variable that has the path of the module directory, this
is supplied as an argument when running cmake normally but is
not supplied when running the check compliance script, this
addition allows checks to be ran that use such syntax in Kconfig
files. This is then removed from cmake as the python file handles
it instead
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The IAR linker ilink does not have any optimization options, and
with the newly added linker optimization flags that default to
the compiler optimization flags, ilink will fail with an
"illegal command line option" error.
This temporary workaround will use a harmless option instead to
avoid errors, until we can update the linker.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
With inclusion of the optimization flag into the multilib selection
process, we cannot compute the compiler library path when the compiler's
target.cmake is processed as LINKER_OPTIMIZATION_FLAG is not computed until
much later.
Instead, add a function (compiler_file_path) which can be used to locate
the appropriate crtbegin.o and crtend.o files.
Delay computation of lib_include_dir and rt_library until after all
compiler flags have been computed by adding compiler_set_linker_properties
and calling that just before toolchain_linker_finalize is invoked.
Place default implementations of both of these functions in a new file,
cmake/compiler/target_template.cmake, where we assume the compiler works
like gcc or clang and handlers the --print-file-name and
--print-libgcc-file-name options. Compilers needing alternate
implementations can override these functions in their target.cmake files.
These implementations require that no generator expressions are necessary
for the compiler to compute the right library paths.
This mechanism is also used to take any additional compiler options by
adding a new (optional) linker function,
toolchain_linker_add_compiler_options, which maps compiler options to
equivalent linker options, discarding any that aren't applicable.
Signed-off-by: Keith Packard <keithp@keithp.com>
The option -Hlld of the MWDT linker is relevant only for classic ARC.
It is incompatible with ARC-V platform options like -av5rmx.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
This commit adds changes which are necessary to support
the AES256 encryption algorithm in mcuboot.
Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
Commit f499ea0 made it so that the compiler optimization flags are also
passed to the assembler. However, this breaks for the IAR toolchain
since it uses the GNU assembler which does not have the same
optimization flags as the IAR compiler.
This commit separates the compiler and assembler optimizations to make
it possible to specify appropriate flags in a toolchains corresponding
`compiler_flags.cmake`
Signed-off-by: Daniel Flodin <daniel.flodin@iar.com>
Add initial support for the Cortex-M52 Core which is an implementation
of the Armv8.1-M mainline architecture.
The support is based on the Cortex-M55 support that already exists in
Zephyr.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Prefer flashing the confirmed image when one is created with
CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE. This way, the west runner will
flash this image over the signed image if it exists.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
When signing for ramload mode, respect the write alignment size setting.
This is required when creating a confirmed image, as the BOOT_MAGIC
value changes based on the alignment size in use.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Add Kconfigs for RAMLOAD_WITH_REVERT mode in MCUBoot. This mode works in
a manner similar to DIRECT_XIP_WITH_REVERT- namely, mcuboot will only
boot an image that is either confirmed or marked as pending. If both
images are confirmed, mcuboot will still select the one with the higher
version, so downgrading is not possible using this mode.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Adds fixes to get LLEXT tests to work for NSIM VPX on MWDT.
Excludes prelocated extensions for MWDT for now.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Allow users to compile LLEXTs with the MetaWare Design Toolchain.
Provides utility to dramatically shrink bloated extensions by removing
unused section names left behind by MWDT strip. Test extensions will
not fit in NSIM VPX5 memory otherwise; each is reduced from ~16k to ~1k.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Update signing script to use proper arguments for imgtool when SHA512
or pure signature is needed.
Signed-off-by: Michal Kozikowski <michal.kozikowski@nordicsemi.no>
This commit introduces the SRAM_SW_ISR_TABLE option which is selected by
DYNAMIC_INTERRUPT. It allows splitting the DYNAMIC_INTERRUPT option into
two parts:
- One for the relocation of the ISR vector table in RAM
- One for the inclusion of functions needed to install ISRs dynamically
The goal is to later only select the relocation of the ISR vector table in
RAM and not all the associated functions from the dynamic interrupt
mechanism.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Merging in DTS_ROOT from sysbuild allows applications to specify a custom
DTS_ROOT path for the application via sysbuild.
Signed-off-by: Nick Brook <nrbrook@gmail.com>
Before this commit, building llext packages with a `POST_BUILD` step added
via `add_llext_command()` only worked for from-scratch builds (tested with
Ninja).
When the client CMake script called `add_llext_command()` to add a custom
`POST_BUILD` step, `has_post_build_cmds` was set to 1, and a `true` (do
nothing) command was executed instead of `copy` for the `llext_pkg_input`
target. Consequently, the timestamp of `llext_pkg_input` was not updated.
Before executing `llext_proc_target`, Ninja seems to check the timestamp
of `llext_pkg_input`. When the custom command added by
`add_llext_command()` generated a new `llext_pkg_input`, Ninja was unaware
that `llext_pkg_input` had been updated, and the dependent
`llext_pkg_output` was not executed. Building only worked if
`llext_pkg_input` was missing, i.e., only for from-scratch builds.
The fix replaces dependencies so the command for `llext_pkg_input` is
executed after `llext_proc_target` (after `llext_proc_target` may generate
a new `llext_pkg_input`).
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
to be able to choose c++23 dialect
deprecates c++2b, but we should keep the option c++2b for legacy
Signed-off-by: Adrian Bieri <adrian.bieri@loepfe.com>
This commit modifies the 'west build' command to display the closest
matching boards when an invalid board is specified, making it easier
for users to find a typo in the used board name.
The user is also instructed to run 'west boards' if he wants to get
the full list of available boards.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The project root was set unconditionally as the variable ZEPHYR_BASE,
but users developing a Zephyr application may wish to override the project
root used by ECLAIR as the base directory of their projects, so that
all paths processed by the tool are relative to that directory.
- A new cmake variable ECLAIR_PROJECT_ROOT is introduced;
- additional messages to output this information before the build starts.
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Incorporate the basic RTK API as well as a basic client integration
(serial) as a way to receive and publish the RTK data.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
This commit introduces a new Kconfig choice for configuring the code model
used for compilation.
All three code models specified by the RISC-V ELF psABI specification are
supported: medlow, medany and large.
For RV32, the `medlow` code model is always selected.
For RV64, the `large` code model is selected if the SRAM or kernel VM base
address is greater than or equal to 4 GiB; otherwise, the `medany` code
model is selected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit introduces the support for the standard Zicntr extension, which
provides hardware counters.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds the support for the following new Zc* series compressed
instruction extensions:
Zca - Subset of the C extension without FP loads and stores
Zcb - "Simple" instructions
Zcd - Double-precision floating-point instructions
Zcf - Single-precision floating-point instructions
Zcmp - "Complex" instructions for embedded CPUs
Zcmt - Table jump instructions for embedded CPUs
With the introduction of the Zc* extensions, the C extension now implies
the following Zc* extensions:
* Zca, always
* Zcf if F is specified (RV32 only)
* Zcd if D is specified
The Zc* extensions that are implied by the C extension are not specified in
the GCC `-march` flag because they are redundant and can interfere with the
resolution of the correct multi-lib for the selected architecture unless
the the alternate mappings for the redundant forms are manually specified.
All the implementation details in this commit are based on the Zc* v1.0.0
specification, which is the ratified version.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Fixed a problem where the command line option --vla was used
with C++ causing a command line error in the IAR ICCARM compiler.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
Add APP_DIR as a kconfig environment variable.
This is useful in cases where you want to set a config path relative to
the directory of the application.
An example of this is how many sysbuild.cmake files sets the source
directory like this:
ExternalZephyrProject_Add(
APPLICATION remote
SOURCE_DIR ${APP_DIR}/remote
BOARD ${SB_CONFIG_REMOTE_BOARD}
)
The same however cannot be done in Kconfig.sysbuild:
config NETCORE_IMAGE_PATH
default "${APP_DIR}/<image_path>" if NETCORE_ABC
Instead they must use ZEPHYR_MY_MODULE_MODULE_DIR, however not all
applications are part of a zephyr module.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
The #91219 miss some entries when doing the clean-up. This removes
some of remaining SUBALIGN entries in the iterable sections. It do
not consider SECTION_PROLOGUE and zephyr_linker_section entries.
Fixes#92349
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This reverts commit 043bb58488.
Note that scripts/requirements-actions.txt might not be 100% the same
as what was pinned prior to the revert due to it being difficult to
restore previous versions while also accounting for the new dependencies
that were added in the meantime.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
By default west looks at the parents directory to find Zephyr base
directory. However, in the case the build directory is not a subdirectory
of zephyr base and the user run "ninja flash" directly from the build
directory, west fails to detect Zephyr base.
So, this patch explicitly add ZEPHYR_BASE in the environment.
Implementation notes:
* ZEPHYR_BASE is already set for ninja menuconfig in
cmake/modules/kconfig.cmake:201
* ZEPHYR_BASE seems better than --zephyr-base since the environment in
inherited
* BTW, --zephyr-base seems to not have any impact and seems broken
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
This commit fixes the incorrect code formatting used by target_riscv.cmake
by changing the 4-space indent to 2-space and removing the space between if
keyword and parenthesis.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Use MISRA C:2012 Amendment 2 instead of 'MISRA C:2012 Amendment 2' in
all configuration files consistently.
Also fix a typo in one of the deviations.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>