Commit graph

5,899 commits

Author SHA1 Message Date
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
Anas Nashif
b1a3dc00b0 twister: report: switch --detailed-test-id logic
now no-detailed-test-id is enabled by default, so switch the logic so we
do not require the extra parameter when reruning.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-08-01 07:50:10 -04:00
Anas Nashif
7b1cc710b1 ci: test_plan: do not filter same test with different toolchain
Make sure we get same test with different tests included.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-08-01 07:50:10 -04:00
Anas Nashif
45596b7d71 ci: test_plan: fix detailed test id handling
detailed test id is no longer default, so switch the logic to deal with
that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-08-01 07:50:10 -04:00
Declan Snyder
b45bc0332d scripts: check_init_priorities: Fix file leak
The elf file needs to be closed after done being used, otherwise sys
module will generate resource leak warnings.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-30 06:13:21 -04:00
Declan Snyder
0d6b0cebb1 scripts: gen_offset_header: Fix file leak
The files should be closed after done being used, otherwise python
warnings are generated from the sys module

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-30 06:13:21 -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
Robert Robinson
8e69b52205 scripts: twister: handlers: Append dev-id for runner nrfutil_next
appends the --dev-id argument when using nrfutil_next runner.

Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
2025-07-29 11:24:21 -04:00
Fabio Baltieri
b1fccaad6e scripts: check_init_priorities: fix device function name display
Device init pointers have been moved off struct init_entry and into
struct device in 766bfe7b2e, but check_init_priorities.py have not been
modified to check the new pointer so it's been showing NULL for all
devices since.

Fix it by searching down the right pointer for device init entries.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-07-28 04:22:43 -04:00
Tim Pambor
dff24c8c00 twister: Fix race condition in try_making_symlink
Replaces the check-then-create pattern for symlinks with
opportunistic creation. Instead of checking for existence
before creating the symlink, the code now attempts to
create it directly and gracefully handles the case
where it already exists.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-25 23:30:31 +02:00
Jamie McCrae
6751c85c63 scripts: ci: check_compliance: Add check for zephyr module file
Adds a check which fails CI if a zephyr module file is added to the
zephyr repository itself

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-25 08:13:56 -04:00
Arkadiusz Cholewinski
d021851182 CI: Coverage: Fix: Get component name from testsuite name.
Get component name from testsuite name instead of
testcase identifier.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2025-07-24 17:00:48 +01:00
Jonathan Nilsen
78a61579d8 west: runners: nrf: don't recover twice on nrf54h
Update the recover mechanism for nrf54h to only call recover
once. Using nrfutil device recover with both --core Network and
--core Application is redundant with IronSide SE as both of these
map to the same operation which does a full erase of the device MRAM.

Additionally, recovering twice in a row specifically in a nrfutil
batch file (which is used by this runner implementation) triggers some
odd behavior with the current latest version of
nrfutil device + IronSide SE, which can cause the device to enter a
reset loop and appear unresponsive and preventing 'west flash --recover'
from working properly.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2025-07-24 16:57:45 +01:00
Jonathan Nilsen
eb7239c6a8 west: runners: nrf: Program UICR/PERIPHCONF artifacts if present
Program the new UICR and PERIPHCONF artifacts if they are generated.
These are required for the application to operate properly if they
are in use.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2025-07-24 16:57:45 +01:00
Grzegorz Swiderski
b4c18e8999 boards: nrf54h20dk: Merge iron variants into the base variants
This replaces the legacy SDFW compatible board configuration with the
IronSide SE compatible one, thus removing support for running samples
and tests on nRF54H20 devices with the old firmware.

All applications are expected to work on `nrf54h20dk/nrf54h20/cpuapp`
out of the box. For other board targets, all applications are expected
to boot, but may require additional peripheral configuration in UICR.
Build system support for the new UICR format is to be added separately.

Co-authored-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-07-24 16:57:45 +01:00
Pieter De Gendt
b1f398d176 scripts: ci: check_compliance: KeepSorted allow combining strip and re
No reason we couldn't strip a line we want to match to a regex.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-07-24 06:08:10 -04:00
Chaitanya Tata
ef8bbab600 ci: Add missing nrf_wifi directory
This directory is part of the nRF Wi-Fi driver and should trigger tests.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-24 06:04:00 -04:00
Jamie McCrae
744a5635f9 scripts: ci: check_compliance: Add support for module Kconfigs
Adds support for checking module samples and tests for additional
Kconfigs, as well as logging Kconfigs, so that this check can be
reused more easily with out of tree manifest repos

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-23 17:29:07 +01:00
Tim Pambor
c7e97bb5f8 runners: probe-rs: Support debug and debugserver
Add support for west debug and west debugserver to
the probe-rs runner.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-23 17:28:52 +01:00
Benjamin Cabé
99138170b3 scripts: requirements: remove lxml dependency
No more users of lxml in the tree so drop the 3rd party dependency (it
might still be pulled in by other projects, ex. gcovr).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-23 09:31:28 +02:00
Benjamin Cabé
65f2833638 scripts: tests: twister_blackbox: drop lxml dependency
No need to rely on lxml for such a simple XML parsing task.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-23 09:31:28 +02:00
Benjamin Cabé
db47c899e3 scripts: ci: check_compliance: no need for lxml anymore
Remove an old workaround requiring lxml to be present as junitparser was
not working with xml.etree.ElementTree until version 3.0.0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-23 09:31:28 +02:00
Benjamin Cabé
82c955ab7c scripts: net: Remove dependency to lxml in enumerate_http_status.py
Using the third party lxml library for the very simple parsing task this
script performs in unnecessary, so switch to Python's built-in
HTMLParser.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-23 09:31:28 +02:00
Anas Nashif
ac4aabc10d twister: support filtering tests using regex
Use --test-pattern to filter scenarios using regular expressions, for
example:

./scripts/twister --test-pattern '^kernel.semaphore.*' -v

will run all those test using this identifier pattern, and nothing else.
Multiple patterns are possible.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-21 07:23:58 -04:00
Pieter De Gendt
373c0724c9 scripts: ci: check_compliance: Capture failing tests
If a compliance test itself throws an exception, the entire script is
aborted.
Update this by capturing the exception and failing only the test itself.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-07-21 07:22:26 -04:00
Georgij Černyšiov
e71f79d644 scripts: west: runners: stm32cubeprogrammer: fix E0606 related to dl_file
Initialize 'dl_file' to 'None' before the logic that determines
which binary file to load.

Resolves the E0606 Pylint warning.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2025-07-21 07:22:09 -04:00
Tim Pambor
3d077c68ca scripts: requirements: Remove mock
Remove mock from requirements-actions.in as it is not needed anymore.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-21 06:57:41 -04:00
Tim Pambor
12ba98b2dd scripts: requirements: Add back tomli
Add back tomli to the requirements-actions.txt as it is still used by
some dependencies.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-21 06:57:41 -04:00
Anas Nashif
2f35e68dd8 Revert "scripts: ci: check_compliance: Add support for module Kconfigs"
This reverts commit 6013fc7201.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-19 20:58:31 -04:00
Anas Nashif
9219c81b66 twister: make no-detailed-test-id default
Make this option default and reduce amount of details displayed by
twister.
This options has been enabled in CI for a while now with the intention
of making it default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-19 15:50:47 -04:00
Jamie McCrae
6013fc7201 scripts: ci: check_compliance: Add support for module Kconfigs
Adds support for checking module samples and tests for additional
Kconfigs, as well as logging Kconfigs, so that this check can be
reused more easily with out of tree manifest repos

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-19 15:48:24 -04:00
Benjamin Cabé
53ea49539a scripts: requirements: drop tomli dependency
This dependency is not used anywhere so drop it.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-19 15:42:43 -04:00
Benjamin Cabé
edead766dc scripts: requirements: remove dependency to mock package
mock has been available in Python standard lib since Python 3.3, remove
the unnecessary dependency to `mock` pip package.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-19 15:42:19 -04:00
Benjamin Cabé
f39ec79806 scripts: tests: apply ruff linting to test_domains.py
Somehow this file had no exclude rules in .ruff-excludes.toml. Make it
compliant going forward.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-19 15:42:19 -04:00
Benjamin Cabé
0ed775bfc9 scripts: west_commands: canopen: replace progress by tqdm
progress has been unmaintained for years and tqdm is a more
modern and faster alternative, which is already used by other commands.
Replace progress by tqdm in the canopen_program.py script.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-19 15:41:32 -04:00
Appana Durga Kedareswara rao
5e0d266381 runners: xsdb: Add support for optional bl31, pdi, system.dtb arguments
This update enhances the runner script to optionally accept bl31, pdi,
and system.dtb as arguments. These inputs are not mandatory and will
only be used if explicitly provided. This allows for more flexible boot
configurations, especially useful when testing different firmware and
system setups without modifying the script.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
2025-07-19 15:38:57 -04:00
Declan Snyder
1f1a2e25b2 scripts: check_compliance: Fix traceback in junitparser
junitparser had a bug causing a traceback when running the checkpatch
check compliance module, fix is in 4.0.1 of junitparser from this PR:
https://github.com/weiwei/junitparser/pull/168

Update requirements to make sure we get this version.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-19 15:34:47 -04:00
Declan Snyder
3b5bfd9f4a scripts: check_compliance: Fix resource leak
The git diff subprocess was leaking, ie.,
it was still running with it's file streams open,
and python was printing warnings about this. Fix by calling
communicate() on the object which will do the cleanup.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-19 15:34:47 -04:00
Luca Burelli
49bf6aad88 dtlib: (cosmetic) use filename and line number on all messages
Take advantage of the new 'filename' and 'lineno' attributes of Node and
Property objects to provide more informative error and status messages
by printing the actual source file reference of the corresponding
object, always using the unquoted file:line format in error messages.

No functional change is introduced by this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-07-19 15:34:13 -04:00
Afonso Oliveira
467d2e8297 scripts: twister: clarify output directory renaming message
Change "Renaming output directory to" message to "Renaming previous
output directory to" to make it clearer that twister is renaming the
existing directory, not the current output directory.

This helps avoid confusion for new twister users who might think the
current output is going to the renamed directory.

Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
2025-07-19 13:51:57 -04:00
Anas Nashif
63dd2db594 twister: match platform regex pattern
Use --platform-pattern <regex> to match platforms, something like

twister -T samples/hello_world/ --platform-pattern ".*/stm32f4.*"

will build/run all those platform targets with stm32f4 in them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-19 13:45:30 -04:00
Declan Snyder
72f451ee9b scripts: kconfiglib: Fix file leaks
Fixing a couple cases of a programming error where a file is not closed
in case of an exception, which was causing resource leak warnings in
some cases when encountering a kconfig error.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-19 13:25:56 -04:00
Pieter De Gendt
15fbf214b5 scripts: ci: check_compliance: Keepsorted optional folding
Introduce a marker for zephyr-keep-sorted to not fold continued indented
lines.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-07-19 13:23:41 -04:00
Pieter De Gendt
27e36c31b4 scripts: ci: check_compliance: Keepsorted optional stripped characters
Allow passing characters to strip for zephyr-keep-sorted. This can be
useful for optional double quotes in yaml maps.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-07-19 13:23:41 -04:00
Martin Hoff
4d4e6701b8 script: west_commands: silabs: add device type for hostname dev
This commit adds automatic type detection for the dev-id argument and
introduces a device-type option to explicitly tell Silabs Commander how
to handle the dev-id argument. It enables hostname usage for flashing
devices.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-07-19 09:43:43 +02:00
Martin Hoff
3e7b80da3d script: west_commands: jlink: add device type for hostname dev
This commit adds automatic type detection for the dev-id argument and
introduces a device-type option to explicitly tell JLink how to handle
the dev-id argument. It enables hostname usage for flashing and
debugging.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-07-19 09:43:43 +02:00
Tim Pambor
51989cbe0a twister: Fix exception if twister fails to create symlink
This fixes a typo in the formatting code that caused an exception
if the symlink creation failed.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-16 16:39:47 -05:00
Anas Nashif
7d3a33afd4 Revert "scripts: Removing init function pointer from check_init_priorities.py"
This reverts commit 653f1bf123.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-16 16:39:36 -05:00
Dmitrii Golovanov
94d9574b0f scripts: footprint: fix hifive1 rev.B board name
Rev B of hifive1 is 'hifive1_revb' since 07e4ba4240

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-07-15 17:08:43 -10:00
Patryk Koscik
854e185248 west: spdx: make SBOM generation compatible with Python < 3.12
Avoid f-strings with backslashes for Python < 3.12 compatibility,
which fixes SBOM generation crashes on older Python versions.

Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
2025-07-14 07:11:46 -10:00