Commit graph

5595 commits

Author SHA1 Message Date
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
Benjamin Cabé
710a7272ba scripts: requirements: update pinned dependencies
Run uv-compile to update to latest minor versions of dependencies.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-06 08:45:13 +02:00
Luca Burelli
ed7f2e0833 scripts: dts: dtlib: preserve order of properties in DTS output
Ensure that the order of properties in the output DTS file matches the
order in which they are defined in the DTS source files by moving props
to the end of the dictionary when they are accessed.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-06-05 15:18:40 -05:00
Luca Burelli
0a4e2e383f scripts: dts: dtlib: improve formatting of long arrays
Split long arrays into multiple lines to improve readability of the
output DTS file. A new line is started when the array data exceeds
80 characters.

Add a few test entries to verify the new behavior.

Note: the F821 linter suppression prevents flagging 'array_start' and
'array_newline' as undefined variables. This is because these variables
are initialized when an opening brace is output, which is necessarily
before any element in a byte or prop array. A sequence of markers not
following this pattern would indicate a bug in the DTS parsing code.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-06-05 15:18:40 -05:00
Anas Nashif
e12457dd6e twister: reports: try to show more build failures in generated summary
Some Build failures are actually cmake issues, so in that case, if
nothing is found as build failure, try to parse for cmake issues.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-05 15:13:07 -05:00
Pieter De Gendt
c5d1e8e220 scripts: west_commands: patch: Support Python 3.10
The west patch command used hashlib.file_digest which was introduced in
Python 3.11.
Replace with a loop to support Python 3.10 (the current minimum).

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-05 09:34:40 +02:00
Maciej Perkowski
49595c7309 twister: Adjust status for quarantined instances
Skipped status fits quarantined items better than filtered.
Filtered tests are by default removed from reports, which
shouldn't be the case for quarantined tests.
Adjust tests unit and blackbox tests accordingly.

Signed-off-by: Maciej Perkowski <maciej.perkowski@nordicsemi.no>
2025-06-05 09:34:13 +02:00
Maciej Perkowski
50f36f0002 twister: logging: decouple status reporting from logging level
Verbosity >1 should be enough to see filtered tests. Coupling
it with debug logging level makes the output messy.

Signed-off-by: Maciej Perkowski <maciej.perkowski@nordicsemi.no>
2025-06-05 09:34:13 +02:00
Miguel Gazquez
783103ebf6 scripts: west_commands: runners: fix dt-flash handling in some runners
In minichlink and spi_burn, the script checks if dt_flash is True by
checking if the value is "y". But dt_flash is a boolean.
Fix these checks.

Also, when dt-flash is True, spi_burn calculate the address in a
convoluted way, by substrating CONFIG_FLASH_LOAD_OFFSET to
itself.
Simplify this computation.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2025-06-04 10:03:40 +02:00
Miguel Gazquez
8c6a290d4a scripts: west_commands: runners: Fix default value for --dt-flash
The '--dt-flash' parameter accepts a string like "y", "yes", "no", etc,
and is supposed to be converted into a boolean value. This is only the
theory as in practice, the default value is set to 'n' and is never
converted to False afterwards.

Set the default value to False.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2025-06-04 10:03:40 +02:00
Pieter De Gendt
88d7715a29 scripts: west_commands: zspdx: writer: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-02 20:22:51 +02:00
Pieter De Gendt
01bfd2600d scripts: west_commands: zspdx: walker: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-02 20:22:51 +02:00
Pieter De Gendt
e365746fd9 scripts: west_commands: zspdx: scanner: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-02 20:22:51 +02:00
Pieter De Gendt
10bd714110 scripts: west_commands: zspdx: sbom: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-02 20:22:51 +02:00
Pieter De Gendt
8360238ae5 scripts: west_commands: zspdx: getincludes: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-02 20:22:51 +02:00
Pieter De Gendt
3ccda0e4fe scripts: west_commands: zspdx: datatypes: Fix UP008
Replace super call with parameters reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-02 20:22:51 +02:00
Pieter De Gendt
6c4decf272 scripts: west_commands: zspdx: cmakefileapijson: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-02 20:22:51 +02:00
Pieter De Gendt
2913bfee6f scripts: west_commands: zspdx: cmakefileapi: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-02 20:22:51 +02:00
Pieter De Gendt
0a0e691750 scripts: west_commands: zspdx: cmakecache: Fix linter issue
Fix redundant open mode.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-02 20:22:51 +02:00
Pieter De Gendt
62ea066794 scripts: west_commands: simulate: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-31 06:54:39 -04:00
Pieter De Gendt
b9fb5d79e4 scripts: west_commands: robot: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-31 06:54:39 -04:00