Commit graph

5588 commits

Author SHA1 Message Date
Carles Cufi
6659d2d711 scripts: runners: nrfutil: Check return code after Popen
The code invoking nrfutil was not checking the return code of the
subprocess, which meant that if the underlying tool was exiting with a
failure error code it remained undetected.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-05-13 17:45:09 +02:00
Mateusz Junkier
04b49fadab twister: harness_config extended by test retries in testcase.yaml
Extend Twister to allow defining repeat counts
for specific scenarios by harness_config.

Signed-off-by: Mateusz Junkier <mateusz.junkier@intel.com>
2025-05-13 03:20:10 +02:00
Alberto Escolar Piedras
3e0eb8a7d1 native_simulator: Get latest from upstream
Align with native_simulator's upstream main
19293fafc9959b03ece651e5e2afb768cfa891cf

Which includes:
19293fa misc trivial changes to please static analyzers
2a41263 nsi_tracing: Annotate functions as noreturn
f0307c1 nct: Simplify and improve switching performance
9f0c825 nce: Optimize/improve performance
63ce7e2 nsi_utils: Add macro to define static inline functions
6035bd8 nsi_errno: Minor optimization with no functional impact

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-05-12 19:20:37 +02:00
Robin Kastberg
5a92e46c92 iar: toolchain: Implement IAR static init routine
This will implement a way of doing static initialization
the "IAR" way. This is done by calling __iar_data_init3
which handles all static initialization that is mentioned
in the linker file "initialize by copy".

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-05-12 19:18:56 +02:00
Vignesh Pandian
d750daa2bb west: fix for west flash --context with sysbuild.
Fix west flash --context fails for Sysbuild projects issue.

Signed-off-by: Vignesh Pandian <vignesh@aerlync.com>
2025-05-08 15:56:02 +02:00
Daniel DeGrasse
6ec7908239 scripts: west_commands: runners: do not print newline in telnet decode
Remove the newline printed after decoding a block of telnet data from
the server in the "pure python" implementation used when netcat is not
available. This newline print is incorrect as it is not in the RTT
output being produced from the device, and can impact programs like
twister which expect specific strings in the output and cannot handle
these strings being split across two lines

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-05-08 12:25:07 +02:00
Kyle Micallef Bonnici
003fb88afd scripts: footprint: fix node size computation
fix issue with (no paths) != sum(<no paths>)

In some cases it was observed that item were being
added to the node_no_paths and these only had a
path of ':' hence no node was ever added.

This resulted in the size of (no paths) to not be
equal to the sum of it's children.

I am not sure if this size should be a child named
of no paths or if  this should be part of the
node_hidden_syms. I assumed it should be part
of node_hidden_syms

Signed-off-by: Kyle Micallef Bonnici <kylebonnici@hotmail.com>
2025-05-07 23:03:29 +02:00
Yuval Peress
5b19a9b94d twister: Better manage gcov sym link
In twister coverage runs we create the gcov sym link to llvm-cov
executable. This code runs multiple times which causes errors with the
current implementation since creating the symlink will fail; then
copying will also fail because we're using the symlink (self copy the
file).

Add a helper function to `try_making_symlink` which will handle the
following cases:
1. If the symlink already exists and is correct, do nothing.
2. If the symlink exists but points to the wrong file, replace it.
3. If the symlink doesn't exist create it.
4. If creating a symlink fails, just copy the file.

Signed-off-by: Yuval Peress <peress@google.com>
2025-05-07 21:20:45 +02:00
Luca Burelli
2d264618bc twister: improve the alignment of columns in verbose output
This commit improves the alignment of columns in the verbose Twister
output by reclaiming extra space in the testsuite name column when the
platform name oveflows its allocated width.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-05-07 03:59:05 +02:00
Luca Burelli
021d90b641 tests: twister_blackbox: fix vendor filter test
Commit 6dc27a4 ("boards: align vendor entry in board.yml files")
unknowingly broke Twister blackbox tests by correctly placing Atom
targets under the 'intel' vendor. Since this was not previously the
case, the Twister blackbox vendor filter test for 'intel' was actually
expecting 'qemu_x86/atom' to be filtered out as "Not a selected vendor
platform."

This commit updates test_filter.py with the new vendor flags.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-05-03 17:49:29 +02:00
Andy Lee
45746c172e scripts: zephyr_module now handles when unable to retrieve git rev
We now return "unknown" as the revision, and only concat onto
the revision if the revision is a valid git has value.

Signed-off-by: Andy Lee <andy@chiefmarley.com>
2025-05-02 10:39:03 +02:00
Duy Nguyen
a87c3acfa9 twister: Add support for new rx arch test
Add "rx" in the arch list of twister

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-05-02 09:18:16 +02:00
Phi Tran
7ac89d33b1 scripts: west: flash: Add support for .mot file format
Add support for .mot file flash using west flash command
The RX build output .mot as binary file to flash into
board

Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-05-02 09:18:16 +02:00
Aksel Skauge Mellbye
73b8d1b637 edtlib: Expose binding title in node class
Make the binding title available from the node the same way
the binding description is propagated.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-05-02 09:15:50 +02:00
Tais Hjortshøj
0709014549 scripts: west_commands: Add powershell autocompletion (west -b)
Windows powershell can by default not autocomplete known boards when
tapping which can cause frustration when you can't quite remember the
exact name or you don't want to type it out.
west build .\path\to\application\ -p -b stm<tab> will search for
available board including 'stm' in their name.

Signed-off-by: Tais Hjortshøj <tbh@mjolner.dk>
2025-05-02 01:16:00 +02:00
Jamie McCrae
51cf4157e6 scripts: dts: gen_defines: Add support for fixed-subpartitions
Adds support for generating defines for this binding type

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-30 18:44:06 +02:00
TOKITA Hiroshi
4b563934a6 west: runners: openocd: Add option to start RTT server during debug
Add `--rtt-server` option to start RTT server when the OpenOCD
launched from `debug`, `debugserver`, and `attach` commands.

This option starts the RTT server and opens a port,
but RTT logging must be done externally.
That is, you must connect to port 5555 using `telnet` or `nc`
in another terminal to view the RTT log.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-29 20:08:20 -04:00
Jamie McCrae
088c8f4df8 Revert "west: fix for context with sysbuild"
This reverts commit 8972146302.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-28 13:41:34 +02:00
Vignesh Pandian
8972146302 west: fix for context with sysbuild
show `west flash --context` with sysbuild

Signed-off-by: Vignesh Pandian <vignesh@aerlync.com>
2025-04-25 15:55:40 +02:00
Jamie McCrae
4876ff4b42 scripts: ci: check_compliance: Add Kconfig to allow list
Adds a Kconfig used in MCUboot to the allow list

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-25 14:03:34 +02:00
Sebastian Bøe
fff2fef27c west: runners: nrf_common: Temp hack for NRF54H20_IRON
Temp hack while waiting for NRF54H20_IRON support for Network in
nrfutil.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2025-04-24 20:28:51 +02:00
Ederson de Souza
01d10a4115 twister: Look at SIMICS_PROJECT environment variable to find simics
While cmake/emu/simics.cmake uses SIMICS_PROJECT env var, twister checks
if a build is "runnable" by checking if `simics` is executable, but it
doesn't look at SIMICS_PROJECT env var.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-04-24 16:54:00 +02:00
Fin Maaß
e6d6aacf32 ci: set_assignee: don't allways pick next area when submitter = assignee
we don't want to pick the next area when there
are other maintainers available in the same area.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-23 17:54:38 +02:00
Chris Friedt
5fb47cd97f scripts: check_compliance: un-ignore diff and patch for CheckPatch
Un-ignore diff and patch files for CheckPatch.

This was originally added to avoid throwing false-positives when diff
and patch files were actually in the repo, since it would incorrectly
try to perform code-formatting checks on those files instead of on
the content of the commit.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-22 13:14:30 -04:00
Chaitanya Tata
b1dfd13cf3 scripts: utils: tls_creds_installer: Improvements
Improve error handling and reporting.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-04-22 09:59:05 +02:00
Chaitanya Tata
7b3d44e403 samples: net: wifi: Add a script to install certs
For enterprise mode we need to install multiple certs to the TLS
credentials store, so, add a helper script in python to make it work
cross-platforms.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-04-18 10:40:39 +02:00
Chaitanya Tata
d1aa75cdd6 scripts: utils: Add a script to install TLS credentials
This helps install certificates to the TLS credentials store using TLS
credentials shell.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-04-18 10:40:39 +02:00
Carles Cufi
999b6a14a4 west: runners: nrf: Add an option to control the ext erase mode
The erase mode for any external memory that is mapped to the address
space of the MCU is derived from the internal non-volatile memory erase
mode. In order to allow users to override the default value, add a new
--ext-erase-mode command-line option that takes an erase mode just like
--erase-mode does.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-04-16 08:07:44 +02:00
Carles Cufi
58e0e31c7e west: runners: nrf: Generalize the erase command
Instead of providing an `--erase-pages` command, generalize it to a new
`--erase-mode` one that can be set to `none`, `ranges`, or `all`. This
gives the user full control over the erase mode that will be passed on
to nrfutil.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-04-16 08:07:44 +02:00
Carles Cufi
01f65f658b west: runners: nrf: Fix typo in nrjfprog runner
The correct string is `ERASE_NONE`.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-04-16 08:07:44 +02:00
Jordan Yates
a5ffd7f7a3 scripts: twisterlib: extend testcase schema for reboots
Extend the testcase schema to provide a way to communicate that a given
test is expected to reboot during execution. The generic harness takes
that information and suppresses `already STARTED` warnings if the
restart is expected.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-14 13:05:46 +02:00
Fabrice DJIATSA
cf517f92fc scripts: twister: fix regenerate serial device with unknown platform
Since BOOT-SERIAL isn't a recognized STMicroelectronics product name,
when Twister saves the new map.yaml, it will also check if the previous
map.yaml had the 'SERIAL-BOOT' product name and attach the corresponding
serial device.It won't generate a new one with an unknown platform name.


Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-04-14 11:49:13 +02:00
Chris Friedt
b032304bbe scripts: ci: check_compliance: use git-top to check modules
BoardYml, DeviceTreeBindings, Kconfig, and KconfigBasic checks
can be run with a decentralized west manifest.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-11 06:32:31 +02:00
Chris Friedt
07a023d779 scripts: ci: check_compliance: GIT_TOP and ZEPHYR_BASE as paths
Use pathlib.Path objects for GIT_TOP and ZEPHYR_BASE instead of
strings.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-11 06:32:31 +02:00
Chris Friedt
af342e5205 scripts: ci: check_compliance: allow mcuboot log level dbg
Currently, only MCUBOOT_LOG_LEVEL_INF and MCUBOOT_LOG_LEVEL_WRN
are allowed in UNDEF_KCONFIG_ALLOWLIST. Let's allow
MCUBOOT_LOG_LEVEL_DBG as well, since some use cases may require
this level of scrutiny.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-11 06:32:31 +02:00
Chris Friedt
305e648d63 scripts: ci: check_compliance: ignore patch and diff files
Was getting several false positives about whitespace at line
endings with check_compliance.py because it was analyzing
.patch and .diff files as source.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-11 06:32:31 +02:00
James Roy
285b8ac933 style: edtlib: Use a more efficient expression
Replaced nested loops with a list comprehension
to improve performance. Execution time improved
from 0.0046203136444s to 0.0040774345397s

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-04-09 22:05:22 +02:00
Lukasz Mrugala
d698209647 twister: Remove C object buildlist from -i test
The disparity in C objects built causes
the test to fail.
This removes those lines from the log
to inline log comparison.

Let's disable it in the relevant test.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2025-04-08 22:59:12 +02:00
Ederson de Souza
e420b21834 share/sysbuild: Support single app slot RAM load mode
Adds a new Kconfig to support MCUboot single application slot RAM load
mode.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-04-08 16:12:33 +02:00
Dmitrii Golovanov
067126abcd twister: harness: fix Ztest case summary pattern
Fix missing match on Ztest test case summary log entries, so even
if the test case 'END' log entry is missed or corrupted, its status
will be updated from the Ztest summary log entries, if present.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-04-08 11:45:08 +02:00
Torsten Rasmussen
483c76759d scripts: support quoted sysbuild Kconfig settings in twister
Kconfig settings of string type is passed to CMake with quotes to ensure
they are properly handled, for example when specified in testcase.yml as
>   extra_args:
>    - CONFIG_FOO="bar"

Support sysbuild Kconfig settings `SB_CONFIG` by performing the same
quoting for settings starting with `SB_CONFIG_`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2025-04-04 14:56:39 +02:00
Jamie McCrae
2f55dc8add scripts: ci: check_compliance: Disallow board hooks in defconfigs
Adds board hooks to the disallowed defconfig symbol list as
these should be selected, not put in a defconfig

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-04 12:06:38 +02:00
Sven Ginka
de6f1873c8 west: runners: add flash runner for sensry sy1xx socs
With this commit we add a runner that is capable of flashing
the sensry sy1xx socs via uart to support the onboard OTP
bootloader. Added the sy1xx runner to the list for
automated test.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-04-04 12:06:07 +02:00
Pieter De Gendt
b2c37e00fc scripts: ci: compliance: Check .pyi files with ruff
Add pyi stub files to be checked by the ruff CI compliance rule.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-04-03 00:07:03 +02:00
James Roy
ee17657ad3 edtlib: binding: Add a title keyword
Add a 'title' keyword to the binding to provide a short
description of the binding, while 'description' serves as
the long description.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-04-02 12:54:24 +02:00
Anas Nashif
1823c394c3 actions: update requirements-actions.in
pin gcovr to 6.0

See #87899

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-01 16:26:22 +02:00
Håkon Amundsen
1fac1b917f boards: nordic: add 'iron' board variant
This is needed for next generation Secure Domain firmware.

Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
2025-04-01 11:54:30 +02:00
Hakan Jansson
f107dad6e9 west: runners: openocd: Fix version format regression
Change OpenOCD version regex to be compatible again with format strings
not having a space or newline immediately after the version nr.

Modified regex has been verified with the strings listed below.

Ubuntu:
"Open On-Chip Debugger 0.11.0"

ADI:
"Open On-Chip Debugger (Analog Devices 0.12.0-1.1.1)  OpenOCD 0.12.0 (2024-
08-27-17:25)"

Zephyr SDK:
"Open On-Chip Debugger 0.11.0+dev-00728-gb6f95a16c (2024-02-17-23:51)"

Infineon:
"Open On-Chip Debugger 0.12.0+dev-5.2.1.3248 (2024-08-08-17:29)"

Espressif:
"Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:25)"

Fixes: 1c05f2121c

Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
2025-04-01 04:14:58 +02:00
Peter Johanson
4399d9e3a2 west: runners: rfp: Add Reneses Flash Programmer runner
Add a basic RFP runner that supports the `flash` command targettting
the Renesas Standard Boot Firmware.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2025-03-31 19:49:22 -04:00
Carles Cufi
f42cef9c81 runners: nrf: Default to ERASE_NONE for the nRF54L series
The Nordic nRF54L series ICs use RRAM instead of flash. This implies
that erasing the internal storage before writing the new firmware is not
required anymore (unlike NOR flash, which does).
Note that RRAM on nRF54L devices is not physically paged, and paging is
only artificially provided, with a page size of 4096 bytes, for an easier
transition of nRF52 software to nRF54L devices.
In order to speed up the flashing operation and avoiding doing wasteful
write operations on the RRAM, default to ERASE_NONE for ICs in these
series.
A new ``--erase-pages`` command-line switch has been added to allow
users to keep erasing the pages that will be written to the firmware.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-03-31 22:01:35 +02:00