Commit graph

1,886 commits

Author SHA1 Message Date
Lauren Murphy
c792d78cb3 llext: add fixes for various tests on mwdt / harvard arch
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>
2025-08-01 19:36:59 +01:00
Lauren Murphy
92db7bcf11 llext: compile llext with arc mwdt on nsim vpx5
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>
2025-08-01 19:36:59 +01:00
Michal Kozikowski
6c72cd3e65 cmake: mcuboot: SHA512/pure image signing
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>
2025-07-31 07:34:40 -04:00
Martin Hoff
d5f67d04ee arch: split dynamic interrupt symbol
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>
2025-07-30 17:37:43 -04:00
Nick Brook
d7fb46ac04 cmake: Merge in DTS_ROOT from sysbuild
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>
2025-07-30 17:34:39 -04:00
Serhiy Katsyuba
7dbde64738 cmake: llext: Fix llext incremental build
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>
2025-07-30 17:21:53 -04:00
Adrian Bieri
5d42408efa cpp: add kconfig option STD_CPP23 for STD_CPP
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>
2025-07-30 07:27:53 -04:00
Luca Burelli
83b9577f38 west build: display closest matching board names on error
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>
2025-07-30 06:11:09 -04:00
Nicola Vetrini
0de4f8de4a sca: eclair: Make ECLAIR project root configurable.
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>
2025-07-27 17:03:02 -04:00
Luis Ubieda
a000acf85b gnss: rtk: Add basic integration
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>
2025-07-21 09:19:14 -04:00
Stephanos Ioannidis
dc3c9f3560 arch: riscv: Introduce code model options
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>
2025-07-19 15:43:09 -04:00
Stephanos Ioannidis
f5000936a8 arch: riscv: Add Zicntr extension support
This commit introduces the support for the standard Zicntr extension, which
provides hardware counters.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-07-19 15:42:57 -04:00
Stephanos Ioannidis
58a6a696a0 arch: riscv: Add Zc* compressed instruction extension support
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>
2025-07-19 15:32:35 -04:00
Anas Nashif
91cf77f013 Revert "cmake: Add service section to commo-rom linker generator"
This reverts commit 49a96f67a2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-16 16:39:36 -05:00
Lars-Ove Karlsson
2a9be50c29 toolchain: compiler: IAR does not allow vla with C++
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>
2025-07-11 08:14:12 -10:00
Fin Maaß
809c855a62 mcuboot: cmake: only set write_block_size when needed
only set write_block_size when needed and don't output
a warning, when it's not needed

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-08 18:35:44 -05:00
Joakim Andersson
12fdde6694 cmake: kconfig: Add APP_DIR to kconfig environment
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>
2025-07-08 13:40:34 -05:00
Fin Maaß
c3e4ed7e91 libc: remove POSIX_TIMERS dep from COMMON_LIBC_TIME
remove POSIX_TIMERS dependency from
COMMON_LIBC_TIME, as it is no longer
needed.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-08 13:38:11 -05:00
Gerson Fernando Budke
b478cd8f37 linker_script: Remove some remaining SUBALIGN in iterable sections
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>
2025-07-07 10:07:56 -05:00
Benjamin Cabé
f672cb72d4 Revert "doc: ci: Zephyr now requires Python 3.12 or higher"
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>
2025-07-04 15:50:06 -05:00
Benjamin Cabé
33d6061fe7 Revert "doc: correct python minimum required"
This reverts commit c68d0b9630.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:50:06 -05:00
Jérôme Pouiller
e7fdc84696 cmake: Fix support for "ninja flash"
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>
2025-07-02 03:55:49 -10:00
Stephanos Ioannidis
d0bded3c8c arch: riscv: Fix incorrect Zalrsc extension name
`Zlrsc` is not a thing and the correct name for it is `Zalrsc`.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-07-01 10:18:19 -05:00
Stephanos Ioannidis
1b3534d627 cmake: gcc: Fix code formatting of target_riscv.cmake
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>
2025-07-01 10:18:19 -05:00
Anas Nashif
67caf3bb09 sca: eclair: use MISRA C:2012 Amendment 2
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>
2025-06-30 15:20:13 -05:00
Robin Kastberg
1601a7d696 iar: linker_script: zero-init BSS
CONFIG_IAR_DATA_INIT did inadvertently not initialize BSS.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-06-30 15:18:30 -05:00
Carles Cufi
4ea89d0ada cmake: clang: Enable -Waddress-of-packed-member
Several years ago we started enabling the -Waddress-of-packed-member
warning in commit cf111962e0 for GCC.

Do the same for Clang, since there is no reason not to and the warning
is very useful, especially in protocol stacks.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-27 18:28:09 -05:00
Tu Nguyen Van
c68d0b9630 doc: correct python minimum required
Fixes #92059

Update getting started guide, migration-guide and
python.cmake to use Python 3.12.1 as minimum supported
version

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2025-06-27 09:15:42 -10:00
Tim Pambor
a8a4a5a60c cmake: sca: codechecker: Support output to console and export
Enable parsed results to be printed to the console in addition
to being exported, rather than requiring one or the other.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-06-27 10:02:54 -05:00
Tim Pambor
159ad42b2b cmake: sca: codechecker: Finish export before exiting
If exporting to multiple formats (e.g., HTML and JSON), do not stop
after the first format when errors are found. Instead, continue
exporting to all specified formats and only exit afterwards.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-06-27 10:02:54 -05:00
Marcin Szymczyk
496cb0f46e cmake: add option to force raw instruction mnemonics
Some architectures use pseudo instructions in assembly.
Introduce an option that allows forcing raw instruction mnemonics.
Currently implemented for GNU binutils.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-06-27 10:01:11 -05:00
Anas Nashif
5ac9cd119b cmake: targets: support overriding puncover host and port
Allow overriding puncover default host and port. Using
PUNCOVER_HOST/PUNCOVER_PORT it is possible now to set the host and port
to something else other than the default.

example:

export PUNCOVER_HOST=10.0.1.1
export PUNCOVER_PORT=8088

will start puncover on 10.0.1.1:8088 and make it available over the
local network.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-27 09:59:30 -05:00
Simon Maurer
cb982d16ef soc: xlnx: zynq7000: add FPU support
According to its datasheet the Zynq 7000 has a VFPv3 FPU

Signed-off-by: Simon Maurer <mail@maurer.systems>
2025-06-27 09:50:43 -05:00
Tomasz Bursztyka
49a96f67a2 cmake: Add service section to commo-rom linker generator
struct init_entry may point to a struct device or a struct service,
each ones belonging to device or service iterable section.
Service section being newly added, handling it in cmake relevantly.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-06-27 14:13:58 +02:00
Pieter De Gendt
ba905d045b cmake: extensions: Check no arguments are given to zephyr_library
The zephyr_library macro does not expect any arguments, add a check for
that and similar for zephyr_library_named for no unexpected additional
arguments.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:59:22 +02:00
Pieter De Gendt
775696c297 cmake: extensions: Add macro helper for functions to have no arguments
Add zephyr_check_no_arguments that macros and functions can call to check
that no arguments are given.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:59:22 +02:00
Keith Packard
0463827f92 compiler/gcc: Add rx compiler flags to linker too
Many of these affect the library search path.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-26 14:07:03 +02:00
Robin Kastberg
e572e8f491 iar: linker_script: fix bug with alphabetical order
Having alphabetical order on an init block causes a linker error.
So it is one of the things replaced when translating a block to its
corresponding init block.
The recent changes in ff8b24b6bd caused
iterable sections having ONLY alphabetical order as an attribute,
triggering a bug in this regexp.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-06-25 15:53:01 -10:00
Carles Cufi
892ac07a4a cmake: Add a new no_deprecation_warning compiler flag
Commit be40d854c2ccacf14ca3fcfb01bffdc9b075c6c9 introduced the ability
of building Zephyr with deprecation warnings enabled, by making
COMPILER_WARNINGS_AS_ERRORS depend on the newly added DEPRECATION_TEST
Kconfig option. This has the downside of disabling **all** warnings, not
only the deprecation ones.

This patch instead makes DEPRECATION_TEST disable only the deprecation
warning, but leaves COMPILER_WARNINGS_AS_ERRORS enabled.
This has the advantage of being able to see other unrelated warnings
(and fail if they appear) but has the disadvantage of not printing out
the deprecation warnings themselves (since they are disabled).

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-23 12:38:07 -07:00
Tim Pambor
c8ef91fdb7 cmake: llvm: Use '=' for --config to improve compatibility
Replaces space with an equal sign when assigning the clang configuration
file to the --config parameter. This change improves compatibility with
tools that parse the compilation database and expect compiler arguments
to be separated by space.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-06-20 16:23:16 +02:00
Guennadi Liakhovetski
a3089c1ffc llext: xtensa: strip the .xtensa.info section
.xtensa.info section isn't large so it was ignored in the beginning,
but its contents can differ depending on the build platform even if
the sources and the toolchain are the same. Strip the section to
restore binary reproducibility.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-19 13:59:15 +02:00
Benjamin Cabé
043bb58488 doc: ci: Zephyr now requires Python 3.12 or higher
Update getting started guide, release notes, CI actions and
Python version compliance check to use Python 3.12 as
minimum supported version.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-19 13:56:59 +02:00
Anas Nashif
bffb3f63fe sca: eclair: add Xen deviations
Import some useful Xen deviations that apply to Zephyr as well.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-18 17:48:03 -04:00
Björn Bergman
a9ed11c3f6 toolchain: iar: Implement MIN_SIZE and MAX_SIZE for IAR linker
Implement the MIN_SIZE and MAX_SIZE options to
zephyr_linker_section_configurefor the IAR icf linker file
generator

Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
2025-06-18 09:10:46 -04:00
Robin Kastberg
fc7079185c cmake: linker_script: fix __exidx_start
This makes c++ sample
`sample.libraries.hash_map.newlib.cxx_unordered_map.djb2`
start working on gcc w. `CMAKE_LINKER_GENERATOR=y`.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-06-18 09:10:36 -04:00
Joel Holdsworth
f2c8a5acc4 cmake: linker: ld: Use "-Map <mapfile>" for legacy compatibility
The build system currently generates mapfiles by invoking ld with the
"-Map=<mapfile>" command line argument. This variant of the flag was
introduced in GNU binutils 2.20.

To enable compatibility with legacy versions of the GNU ld, the argument
has been replaced with the "-Map <mapfile>" variant.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-06-18 09:09:50 -04:00
Richard Hughes
3c97bf1014 cmake: kconfig: regenerate .config when Kconfig sources are updated
The existing logic caused a regeneration when any of the .conf files
changed, but modifying the Kconfig files can also cause the .config file
to become out of date e.g. by adding a new config option or by changing
the default value of a config option (when that default is not
overridden by a .conf).

Without this change, an incremental build wouldn't pick up the new value
and would require the user to notice that and manually do a clean build.

Signed-off-by: Richard Hughes <rhughes@xilinx.com>
2025-06-18 09:08:52 -04:00
Richard Hughes
3aaa68faad cmake: kconfig: rename variable to correct naming convention
Variables used only internally in the module should have lowercase
names.

Signed-off-by: Richard Hughes <rhughes@xilinx.com>
2025-06-18 09:08:52 -04:00
Björn Bergman
4b3cd02e6a toolchain: iar: Put KEEP on init-blocks
To circumvent peculiarities in the linker, the _init blocks
(as well as their content) needs to be tagged with keep.

Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
2025-06-18 11:20:58 +01:00
Björn Bergman
dff0dbaf34 toolchain: iar: use zephyr_linker_generate_linker_settings_file() to ilink
Use the standard function to generate the input file to the linker
generator.

Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
2025-06-18 11:20:35 +01:00