Commit graph

5615 commits

Author SHA1 Message Date
Anas Nashif
bd8597c9d7 x86: rename DEBUG_INFO to X86_DEBUG_INFO
This is an X86 specific option and should not appear as generic debug
option.

Fixes zephyrproject-rtos/zephyr#52929

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-20 14:43:42 -05:00
Jamie McCrae
6d73a9c45a scripts: ci: check_compliance: Add support for modules for Kconfig
Adds support for checking modules for disallow Kconfig's in boards
and SoCs, which have been defined in a Zephyr module file

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-20 14:41:20 -05:00
Pieter De Gendt
e454aaa6b6 scripts: ci: check_compliance: Pass path representation to magic
On windows the Magic.from_file method fails to convert a PathLike to its
representation.
Pass using os.fspath.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-20 13:25:45 -04:00
Benjamin Cabé
ba56cd1020 scripts: ci: disable trailing-whitespace check in SphinxLint
SphinxLint doesn't need to report trailing whitespace errors as it's
already checked by checkpatch.pl.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-20 13:21:13 -04:00
Anas Nashif
c1229e308f ci: remove pylint checks covered by ruff
Few rules are duplicate and are reported multiple times, so disable
those from pylint and rely on ruff reporting them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-20 08:52:22 +02:00
Anas Nashif
91dc04d5d0 twister: adapt ctest results for twister
When we have skips in ctest, the overall result should not be marked as
a SKIP unless all tests have been skipped. If we have passing tests,
mark the test as PASS. Any failures/errors obviously will fail the
tests.

Also pass the skip reason from ctest to twister to give a hint about
what is going on in case of skips.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-19 14:04:18 +02:00
Anas Nashif
c511b16fca twister: remove useless . at end of message
No need to have a period here.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-19 14:04:18 +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
43971ea0d5 ci: add member check
Verify that collaborators/maintainers added to the MAINTAINERS.yml file
actually have access to the project and are members.
Only those who already gained access following the process shall be
added to the file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-18 17:47:54 -04:00
Benjamin Cabé
14ea8b087b tests: cmake: actually test SBOM files generation
The current test was just a basic sanity check.
This adds actual validation of the SPDX files being generated as
being spec-compliant.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-18 17:45:16 -04:00
Fabio Baltieri
a626d865c0 scripts: do_not_merge: print the API limit stats
This information is useful for troubleshooting and not available
anywhere else, does not quite belong to this script but this runs for
every PR so it's not a bad place to have it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-06-18 09:54:12 -04:00
Camille BAUD
d03b7ffdbb scripts: gen_edt.py: add ability to get properties from /cpus
Adds ability to get properties from the /cpus group,
in the goal of retrieving timebase-frequency for CPU groups.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-06-18 09:12:26 -04:00
Fin Maaß
0d8f41b594 scripts: Fix bindings style migration script
the script is in the utils subdir, which it didn't knew.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-18 09:08:05 -04:00
Joel Holdsworth
56e5121d39 code_relocation: Handle relocation of noinit sections
The code relocation feature allows code and data section to be located
inside a designated RAM region.

Currently, this feature supports relocation of code (text) and data
including mutable data (data), read-only data (rodata), and
zero-initialized data (bss).

However, relocation of non-initialized data sections was not previously
supported, meaning that any data annotated with the __noinit attribute
could not be relocated into the desired RAM region.

This patch adds a NOINIT memory-type which can be used implicitly or
explictly in the zephyr_code_relocate() CMake function. This causes the
build system to generate additional linker-script section-matching rules.

By the nature of noinit data, no action is required by Zephyr at boot.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-06-18 11:16:37 +01:00
Grzegorz Swiderski
64bb8b6796 scripts: kconfig: Add hex variants of arithmetic functions
Functions like `add` and `sub` can only return base 10 integers, which
means they can't really be used to define Kconfig symbols of type `hex`.

For the same reason, there already exist pairs of devicetree functions
named e.g., `dt_node_reg_addr_(int|hex)` after different return types.

Introduce `add_hex`, `sub_hex`, and friends.

To avoid confusion, it should be possible for those new functions to
accept arguments in base 16 as well. It's actually easier to let all
arithmetic functions take their inputs in "any" base, by leveraging
Python's built-in: `int(..., base=0)`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-06-17 16:09:41 +02:00
James Roy
4240853a06 scripts: ci: Add CI bindings style checker
Implement a check in the CI pipeline to enforce
that property names in device tree bindings do
not contain underscores.

Signed-off-by: James Roy <rruuaanng@outlook.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2025-06-17 16:03:54 +02:00
James Roy
9cf9416dec scripts: Add bindings style migration script
This script replaces all underscore(_)
separation in a binding with hyphens(-).

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-06-17 16:03:54 +02:00
Johann Fischer
3c2dffa601 scripts: trace_capture_usb: disable tracing on exit
Disable tracing on exit and do not discard data immediately after
enabling tracing. The length of the data depends on the timings of the
host and targets and may simply be an arbitrary length that does not fit
any trace format or frame.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Carles Cufi
5a13cdcf52 scripts: trace_usb_capture: Clean up on exit
When the user presses Ctrl+c to exit the infinite capturing loop, ensure
that the cleanup funciton is always executed.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Jason Yu
c387d9c73d modules: hal_nxp: mcux-sdk-ng: Fix LPC55S16 build error
Fix build error when CONFIG_MCUX_COMPONENT_driver.fro_calib is set.
Error message:

modules/hal/nxp/mcux/mcux-sdk-ng/cmake/extension/function.cmake:2084 (if)
  if given arguments:

    "IN_LIST" "NEED_WRAP_TOOLCHAINS"

The error is because, mcux sdk ng cmake functions `mcux_add_xxx` support
add content based on toolchains. CMake should set current toolchain in
CMake Variable `CONFIG_TOOLCHAIN` to use this feature.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-06-16 14:15:12 -04:00
Maureen Helm
29ca4bdfd2 scripts: ci: check_compliance: Ignore additional mcuboot Kconfigs
Adds BOOT_IMAGE_EXECUTABLE_RAM_START and BOOT_IMAGE_EXECUTABLE_RAM_SIZE
to the list of mcuboot symbols ignored by the compliance checking
script.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2025-06-13 10:29:20 -04:00
Fin Maaß
c2fff4a3e4 devicetree: Enhance DT_ENUM_HAS_VALUE macro for arrays
On arrays DT_ENUM_HAS_VALUE() and DT_INST_ENUM_HAS_VALUE()
were only checking the first index, this changes it to check all indexes.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-12 11:44:46 +02:00
Jacob Wienecke
0c7fbd164e scripts: ci: check_compliance.py: Fix check_disallowed_defconfigs: Windows
#78615 Added a check for disallowed Kconfigs which does not work
on Windows machines. Windows machines seem to behave differently when
faced with the \b word boundary marker. I have removed the \b word
boundary marker from the grep commands when os.name=='nt'.
The script performs the same as before for any other os.

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2025-06-12 11:35:07 +02:00
Daniel Leung
1df55181be scripts: gen_app_partitions: only parse known arguments
Since compiler options are unconditionally passed to the script,
we may pass arguments that are not recognized. So we change to
only parse known arguments. Currently, it only cares about -l,
which is related to linking libraries.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-11 16:10:53 -07:00
Grzegorz Chwierut
db3c344af9 west: runners: Add ncs-provision to west flash command
Added automatic KMU key provisioning, when keyfile.json
file exists in the build directory.
This enables automated key provisioning during the
flashing process to enable testing nRF54L aplications using Twister.
Only applicable on nrfutil runner.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2025-06-11 16:09:05 -07:00
Yangbo Lu
e960af1cb1 scripts: west_commands: runners: add nxp spsdk
Added nxp spsdk as west runner.

Secure Provisioning SDK (SPSDK) is a unified, reliable,
and easy to use Python SDK library working across the
NXP MCU portfolio providing a strong foundation from
quick customer prototyping up to production deployment.

Docs: https://spsdk.readthedocs.io

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-11 16:03:37 -07:00
Yangbo Lu
497c02709f scripts: requirements: extras: add spsdk
Secure Provisioning SDK (SPSDK) is a unified, reliable,
and easy to use Python SDK library working across the
NXP MCU portfolio providing a strong foundation from
quick customer prototyping up to production deployment.

Docs: https://spsdk.readthedocs.io

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-11 16:03:37 -07:00
Keith Packard
513e6ed5d2 arch/common: Mark interrupt tables const when !DYNAMIC_INTERRUPTS
When not using dynamic interrupt mapping, various interrupt tables are
configured to be stored in read-only memory in the linker script.. Mark
them const so that the linker doesn't complain.

This affects _sw_isr_table, _irq_vector_table, and z_shared_sw_isr_table in
arch/common along with _VectorTable in arch/arc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-10 22:13:09 +02:00
Maciej Perkowski
61e9de5ec4 twister: Minor quarantine fixes
Statuses of quarantined test cases were not updated properly.
Quarantined tests shouldn't cause errors in integration mode.
Removed obsolate filter type.

Signed-off-by: Maciej Perkowski <maciej.perkowski@nordicsemi.no>
2025-06-10 10:22:51 -04:00
Benjamin Cabé
be504b000d west: spdx: allow to generate for different SPDX versions
When support for SPDX 2.3 was added, it effectively dropped support for
SPDX 2.2, which in retrospect was a bad idea since SPDX 2.2 is the
version that is the current ISO/IEC standard.
This commit adds a `--spdx-version` option to the `west spdx` command
so that users can generate SPDX 2.2 documents if they want.
Default is 2.3 given that's effectively what shipped for a few releases
now, including latest LTS.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-10 13:28:38 +02:00
Benjamin Cabé
22b089432c scripts: west: spdx: handle error codes in makeSPDX()
Add missing error handling of some of the calls to writeSPDX().

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-10 13:28:38 +02:00
Benjamin Cabé
4655e0d9d4 west: spdx: remove unnecessary format strings
As reported by sonarqube, "String formatting should be used correctly"

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-10 13:28:38 +02:00
Anas Nashif
4f4ad2e9c3 maintainers: add options to area command
Add options to area command:

--without-maintainers
--without-collaborators

To show areas without any collaborators or maintainers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-10 12:10:40 +02:00
Anas Nashif
047c9f58d8 scripts: get_maintainers: improve display of areas table
Improve layout and make it more readable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-10 12:10:40 +02:00
Pieter De Gendt
e5759f469a scripts: zephyr_module.py: Take EXTRA_ZEPHYR_MODULES variable into account
When running purely with Python, the extra modules set with environment
variables are not taken into account.
If left empty, check the environment variables.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-09 10:26:54 +01:00
Arkadiusz Cholewinski
471aa1b477 PM: Record metrics in power management tests
Add metrics recording functionality to power management tests.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2025-06-09 08:55:31 +02:00
Pieter De Gendt
ffeca1695a scripts: logging: dictionary: log_parser: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-09 08:55:14 +02:00
Pieter De Gendt
3a8106b598 scripts: logging: dictionary: utils: Fix redundant open flags
Fix issue reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-09 08:55:14 +02:00
Pieter De Gendt
5759f5584e scripts: logging: dictionary: mipi_syst: Format imports
Fix format issue reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-09 08:55:14 +02:00
Pieter De Gendt
57df7883b9 scripts: logging: dictionary: log_parser_v3: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-09 08:55:14 +02:00
Pieter De Gendt
18a8e5c5b5 scripts: logging: dictionary: log_parser_v1: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-09 08:55:14 +02:00
Pieter De Gendt
03fbe7fb3f scripts: logging: dictionary: log_parser: Format imports
Fix formatting issue reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-09 08:55:14 +02:00
Pieter De Gendt
4fdd6c6cdc scripts: logging: dictionary: log_database: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-09 08:55:14 +02:00
Pieter De Gendt
00727ed5b1 scripts: logging: dictionary: data_types: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-09 08:55:14 +02:00
Pieter De Gendt
6af247e227 scripts: logging: dictionary: database_gen: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-09 08:55:14 +02:00
Pieter De Gendt
c773f42013 scripts: list_hardware: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-06 11:52:17 +02:00
Pieter De Gendt
b2687468b5 scripts: list_boards: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-06 11:52:17 +02:00
Benjamin Cabé
a89c79275f scripts: hwm_v2: add full_name property for archs
Allow to specify a human readable full name for archs that can then be
leveraged e.g. in the documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-06 10:29:44 +02:00
Benjamin Cabé
061cbb7bc0 scripts: hwmv2: cache pykwalify validators
speed up the various list_*.py scripts by means of caching the
pykwalify core object so that schemas don't get unnecessarily
processed multiple times.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-06 10:29:38 +02:00
Benjamin Cabé
17ab862169 scripts: ci: add vermin (min python version check)
Add a compliance check that allows to flag when a given file requires a
Python version higher than 3.10 (minimum supported version in Zephyr at
the time of writing) since not all Python scripts are tested against
3.10 in CI and we want to avoid introducing changes that could break
users.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-06 08:45:13 +02:00