Commit graph zephyr/scripts
Author SHA1 Message Date
Graham Roff
34f33e35cf scripts: west: Add completion for snippets
Add support for command-completion for the snippets arguments for bash,
zsh, and powershell.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-27 15:12:30 +01:00
Graham Roff
49a9fac49b snippets: Add "west snippets" command
Add a "west snippets" command to list available snippets, similar to
"west boards" and "west shields". Default display shows the snippets
along with their description. The "--format" parameter as used by
"west shields" is supported for user-controlled formatting.
Shell completion scripts for bash, zsh, and powershell are also
updated to support completion for snippet names.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-27 15:12:30 +01:00
Graham Roff
f2f8dd8454 snippets: Add snippet description
Add a "description" property to the snippet YAML schema to allow
developers and scripts to understand the purpose. Populate existing
snippets with descriptions pulled from the rst documentation.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-27 15:12:30 +01:00
Anas Nashif
3eceb2e99e tests: twister: fix unit tests for robot support
Fix to support other simulators.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-27 08:32:42 +02:00
Anas Nashif
6489b436e9 twister: add qemu support using the Robot test framework
Now we are able to run tests using the Robot framework with Qemu.

Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-27 08:32:42 +02:00
Anas Nashif
4867140218 twister: add support for running robot tests with native_sim
Support native sim with the Robot framework.

Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-27 08:32:42 +02:00
Sebastian Modersohn
76c6c6020b scripts: west_commands: zspdx: handle ValueError of os.path.commonpath
os.path.commonpath will raise ValueError for paths with different
drives on Windows
Added new is_subpath method which handles ValueError and returns
False since it can't be a sub path. Replaces all 3 occurrences of
os.path.commonpath in walker.py.
Fixes #109641

Signed-off-by: Sebastian Modersohn <im24@msohn.de>
2026-05-26 15:24:36 +02:00
Parthiban Nallathambi
1df7cf5339 scripts: twister: tolerate qemu self-cleanup of qemu.pid
QEMUHandler.handle() reads the qemu pid file at the end of a run and
then unlinks it:

    if os.path.exists(self.pid_fn):
        with open(self.pid_fn) as pid_file:
            qemu_pid = int(pid_file.read())
        os.unlink(self.pid_fn)

The existence check, the open(), and the unlink() are not atomic.
When qemu exits on its own (slow benchmark hitting a harness
timeout, hostshutdown issued via the monitor, qemu killed by an
external signal, ...) it removes its own pid file. If that removal
lands between the os.path.exists() check and the read+unlink,
either open() or os.unlink() raises FileNotFoundError. The
exception escapes handle(), is caught in runner.py pipeline_mgr,
and the worker process exits, aborting the whole twister run.
Other tests that had not yet been scheduled never get to run, and
tests still in flight on other DUTs are abandoned.

Keep the existence check as the happy-path guard (so the no-pid-file
case still logs qemu_pid=None as before), and wrap the read+unlink
in a try/except FileNotFoundError to close the race window. A
missing pid file at cleanup time is not an error -- by definition
the qemu process is gone, which is exactly the post-condition the
cleanup is trying to reach.

Reproduced with a long-running benchmark in qemu where the guest
hit its harness eof and exited a few ms before twister got around
to the unlink. With this fix the failing test is marked FAILED and
the run continues; without it the pipeline aborts on the
FileNotFoundError.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2026-05-26 15:23:59 +02:00
Magdalena Pastula
b45a63f6b3 scripts: ci: remove SOC_NORDIC_BSP_PATH_OVERRIDE
Remove SOC_NORDIC_BSP_PATH_OVERRIDE from list of undefined Kconfigs,
as it's no longer used.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2026-05-26 15:18:49 +02:00
Anas Nashif
22c8bd973b ci: workflows: remove obsolete and outdated issue tracker
This workflow has been running for a while, but it is dated, obsolete
and based on a very old action that is not being maintained anymore.
Most importantly, nobody actually looks at the output of that script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-26 09:24:37 +02:00
Tomasz Leman
fc432f1f6b scripts: west: fix WEST_TOPDIR backslash path on Windows
Commit bfa00dcd1f ("cmake: pass Python information from west build to
CMake") changed WEST_TOPDIR from being obtained via
execute_process(COMMAND ${WEST} topdir) to being passed directly from
Python via -DWEST_TOPDIR=.

The west topdir CLI returns POSIX paths (C:/...) but the Python API
west_topdir() returns native Windows paths (C:\...). When this path
reaches check_c_compiler_flag via:

  zephyr_cc_option(-fmacro-prefix-map=${WEST_TOPDIR}=WEST_TOPDIR)

CMake interprets \U (from \Users) as an invalid escape sequence,
breaking all Windows builds.

Use pathlib.Path.as_posix() to normalize the path, consistent with how
WEST_PYTHON is already handled on the same line.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2026-05-26 09:24:12 +02:00
Alberto Escolar Piedras
560ff28823 valgrind: Suppress hasmap library realloc(ptr,size=0) warning
Add to the valgrind suppression file a rule to waive the warning
about the hash_map code using realloc() with size 0 as free().

Valgrind warns because this is not standard behaviour, but
a (common) extension:
https://en.cppreference.com/c/memory/realloc

But this is the behaviour the API requires from a realloc used
with this component:
https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/sys/hash_map_api.h#L76

As a freebie, add a license and copyright line to silence the CI check
warning

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-05-25 18:18:58 +02:00
Gobi M
e9094d367c tests: twister: expand QEMU_BIN_PATH check_runnable coverage
Extend test_check_build_or_run() to verify both existing and
non-existing QEMU_BIN_PATH values.

The previous test used an empty QEMU_BIN_PATH value, which only
covered the falsy branch and did not exercise os.path.exists().
Add explicit checks for valid and invalid non-empty paths to
improve coverage of the QEMU_BIN_PATH validation logic.

Signed-off-by: Gobi M <gobi@aerlync.com>
2026-05-25 18:18:06 +02:00
Gobi M
3a17a4f442 twister: make QEMU_BIN_PATH optional
QEMU_BIN_PATH is currently treated as a mandatory requirement for
QEMU-based tests on Windows.

Treat QEMU_BIN_PATH as an optional override and validate it only when
explicitly provided. This allows Twister to run QEMU tests using SDK or
other discovery mechanisms without requiring QEMU_BIN_PATH to be set.

Validation:
- QEMU_BIN_PATH unset -> qemu_x86 PASSED
- Invalid QEMU_BIN_PATH -> NOT RUN
- Valid QEMU_BIN_PATH -> qemu_x86 PASSED

Fixes #109332

Signed-off-by: Gobi M <gobi@aerlync.com>
2026-05-25 18:18:06 +02:00
Grzegorz Chwierut
019a118042 twister: Add testsuite option to skip build
Add a new testsuite YAML option `build` that allows a test
scenario to skip its own build step and instead use the build
artifacts from the first entry in `required_applications`.
Default is true; to skip building, set `build: false`.

This is useful for test scenarios that only run a harness (e.g.,
pytest, bsim) against an image built by another scenario, without
needing their own compiled binary.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2026-05-25 13:39:27 +02:00
Carlo Caione
c6fa0d4479 scripts: ci: add MmuRegionsCheck compliance check
Add a compliance check that flags non-GIC MMU region entries in
mmu_regions.c files. Only lines added in the current changeset are
checked, so pre-existing entries do not block unrelated changes.

The check has three tiers:

- MMU_REGION_DT_COMPAT_FOREACH_FLAT_ENTRY: always flagged, these are
  driver compat entries that should use DEVICE_MMIO.

- MMU_REGION_FLAT_ENTRY with MT_DEVICE: flagged unless GIC-related.
  This catches blanket I/O aperture mappings and per-peripheral
  entries like UART0 that should use DEVICE_MMIO. SoC infrastructure
  entries (CCM, IOMUXC) are also flagged but the warning message asks
  for a justifying comment.

- MMU_REGION_FLAT_ENTRY with MT_NORMAL or similar: flagged, these
  memory regions (DRAM, SRAM) should use the zephyr,memory-attr
  devicetree property instead.

GIC entries are always excluded as the interrupt controller cannot use
the device MMIO API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-05-23 17:13:18 -07:00
Henrik Brix Andersen
845254da76 scripts: requirements: actions: refresh pinned versions
Run the uv command to update the pinned version in
requirements-actions.txt.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2026-05-22 21:56:44 +02:00
James Roy
28b8d644c1 devicetree: Add DT_NODELABEL_C_TOKEN_* macros
Add the `DT_NODELABEL_C_TOKEN` and
`DT_NODELABEL_C_TOKEN_BY_IDX` macros to retrieve
the C symbolic name of a node.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2026-05-22 21:55:42 +02:00
Andrii Anoshyn
55efd7a31a twister: tests: add regression test for integration_platforms scope
Add a parametrized pytest in scripts/tests/twister/ that exercises
apply_filters() for a testsuite whose integration_platforms list mixes
default and non-default platforms, asserting the documented platform
scope under both -G (integration mode) and the default mode.

The non-default path (no -G) silently regressed once in #32835 by
dropping integration_platforms from the per-testsuite scope; this test
pins both branches so a similar regression is caught in CI.

The fixture testsuite lives in a separate testsuites_integration/ tree
so that the shared all_testsuites_dict fixture, which calls
add_testsuites() before platforms are loaded, is not affected by the
new fixture's verify_platforms_existence() requirement.

Fixes #33247

Signed-off-by: Andrii Anoshyn <anoshyn.andrii@gmail.com>
2026-05-22 10:50:05 +02:00
Pieter De Gendt
12e09fb959 scripts: west_commands: tests: stm32cubeprogammer fixes
Fix the test suite for the stm32cubeprogammer runner.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-22 10:41:45 +02:00
Anas Nashif
650d37ce3a twister: tests: change testcases.yaml -> tests.yaml
Rename remaining occurance of testcases.yaml.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-21 17:04:56 -04:00
Piotr Kosycarz
113b002dac scripts: ci: twister_report_analyzer: extend info about overflow
As twister already discovers failure reason,
only get additional information from build log.

Get info about oveflow details:
- build step
- memory kind

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2026-05-21 17:03:51 -04:00
Ville Kujala
1abcafa4ff west: runners: don't recover twice on nRF92
Remove unnecessary second recovery call from nRF92,
as nRF92 is running Ironside SE, which already
performs a full erase of MRAM on recovery.

Signed-off-by: Ville Kujala <ville.kujala@nordicsemi.no>
2026-05-21 17:01:11 -04:00
Martin Jäger
f648774b71 twister: log non-numeric errors in catch_system_exit_exception
This helps to diagnose issues when sys.exit is called with a string
as a parameter (as done e.g. in scripts/list_hardware.py).

Signed-off-by: Martin Jäger <martin@libre.solar>
2026-05-21 06:38:40 -04:00
Graham Roff
7904f3e6f8 scripts: dashboard: Add data source documentation
Add documentation on the data-sources used the script to the
docstring. This helps users understand where the information
is coming from and how to update, for example, the per-region
memory reports.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-21 06:32:53 -04:00
Graham Roff
3524883fbf scripts: dashboard: Add per-region memory report tabs
Add a memory report tab for each memory region defined in
devicetree with compatible "zephyr,memory-region" that contains
at least one ELF section. This is helpful for viewing TCM memory
allocations for example.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-21 06:32:53 -04:00
Graham Roff
4f1f0429c2 scripts: footprint: size_report: Add --filter-address-range option
Add a --filter-address-range START LENGTH argument that restricts the
report to ELF sections whose address range overlaps [START, START+LENGTH).
Sections outside the range are skipped entirely, so the generated tree
reflects only the memory region of interest.
This can be used to generate a TCM memory report for example.

Two related fixes are included:

- Symbols that fall outside all known sections are no longer added to
  the unassigned bucket when a filter is active, eliminating spurious
  "WARN: Symbol x is not in RAM or ROM" messages for every out-of-range
  symbol.

- The (hidden) node size is clamped to zero to avoid a negative value
  when a symbol's st_size extends past the boundary of its section (e.g.
  due to alignment padding absorbed by an adjacent section that the
  filter excludes).

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-21 06:32:53 -04:00
Torsten Rasmussen
bfa00dcd1f cmake: pass Python information from west build to CMake
This commit optimizes Python and west implementation and version
handling in Zephyr CMake when west is used for build invocation.

Following information are now passed from west build to CMake when
invoking CMake:
- Python properties as CMake list, this list follows the structure
  of CMake's Python module INTERPRETER_PROPERTIES setting.
- West version information
- West topdir information

This removes the need for several execute_process invocation of Python
from within CMake itself.

If any setting is unknown or the list size changes, then Zephyr CMake
will automatically fallback to the generic implementation.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2026-05-21 06:30:21 -04:00
Grzegorz Chwierut
2a781b7ec0 twister: pytest: use sys.executable to invoke pytest subprocess
Replace the bare 'pytest' string in the Pytest harness command
with sys.executable and '-m' so the subprocess always uses the
same Python interpreter that runs twister. This avoids a
FileNotFoundError when pytest is not on PATH, which happens
e.g. when launching twister from a VS Code debug configuration
that does not activate the virtual environment.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2026-05-20 19:22:31 -07:00
Anas Nashif
990e21e176 ci: check_maintainer_changes: warn instead of fail, annotate PR
When added maintainers or collaborators lack the required GitHub access
level, emit GitHub Actions workflow-command annotations (::warning)
instead of failing the check, so it is purely informational and does
not block merging.

The canonical file path MAINTAINERS.yml (derived from the base-file
argument) is used as the annotation file= value. Previously the temp
file pr_MAINTAINERS.yml was used, which GitHub could not match to any
path in the PR diff, so no inline annotations were shown.

Update assigner.yml to use python3 and drop the now-unneeded --pr
argument.

Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-20 20:07:27 -04:00
Marcin Niestroj
210e561554 native_simulator: trampolines: add fsync and ftruncate
Those trampolines will be used for host FS access.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2026-05-20 20:04:16 -04:00
Pieter De Gendt
5faf064e72 scripts: dts: edtlib: Verify const type
Update the const value validation, to also include falsy constants, and
check for plain integer types in case of int/array property type.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-20 14:06:50 +02:00
Pieter De Gendt
3720dabf37 scripts: dts: edtlib: Verify plain int type for default values
If the binding has a default property that is an int or an array of
integers, we verify for plain ints.
As bool is a subclass of int in Python we should check for non boolean
values.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-20 14:06:50 +02:00
Pieter De Gendt
4cb99015a7 scripts: dts: Add test cases for min/max properties
Add success and error tests for min/max binding properties.

Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-20 14:06:50 +02:00
Pieter De Gendt
7ddcb93d4a scripts: dts: Add min/max properties to edtlib spec.
Add optional min/max properties to edtlib spec to specify a valid range for
int or array type values.

Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-20 14:06:50 +02:00
Alex Fabre
21d3ec1106 scripts: west: runners: stm32cubeprogrammer: fix path lookup on macOS
In the latest release of STM32CubeProgrammer for Apple Silicon macs, the
path to 'STM32_Programmer_CLI' executable has moved.

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2026-05-20 14:06:46 +02:00
Pieter De Gendt
c54d4c6bcf scripts: dts: tests: dtlib: Test signed-aware negative expressions
Add a test case verifying that a parenthesized expression evaluating to
a negative value (e.g. `(4 - 6)`) is preserved as signed when decoded
via to_num(signed_aware=True) and to_nums(signed_aware=True), extending
the existing coverage for negative literals like `(-1)`.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-20 10:56:34 +02:00
Kyle Bonnici
9fc69ebbb1 Style: remove space between block comment and > ]
Linter not ensures that > and ] have no white spaces when these are
preceded with a block comment.

Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
2026-05-19 17:46:18 -04:00
Kyle Bonnici
9bbc417342 CI: Update dts-linter to dts-linter 0.4.1
Security:
- Update dependency to address CWE-1333, CWE-407

Changed:
- `#includes` are no longer indented to match the depth of the node they
are in.

Added:
- Formatting: removes lines ending with `\` when this is not required.
- Formatting: node names are formatted to not have `0x` and `ULL`

Fixed:
- Formatting: Remove extra space between `>` or `]` when token before is
from some comment

Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
2026-05-19 17:46:18 -04:00
Jeremy Truttmann
4b58a7d1e6 twister: allow --flash-timeout and --base-timeout to override config
The --flash-timeout and --base-timeout options in plugin.py had
hardcoded defaults of 60. This breaks the 'or' fallback chain at
twister_harness_config.py:140-141 since 60 is truthy and always
wins over values from the YAML config file.

Result: Command line timeout options were completely ignored when
config file values were present.

Changes:
- Set plugin.py defaults to None so the fallback chain works correctly
- Add explicit 60 fallback at the end of the chain in
  twister_harness_config.py to preserve default behavior
- Update test to use non-default value (120s) to verify config values

Signed-off-by: Jeremy Truttmann <jetstreeam.code@outlook.com>
2026-05-19 14:59:02 +01:00
Pieter De Gendt
9e069738d6 scripts: zephyr_module: Replace deprecated manifest.path
The Manifest.path property is deprecated. Use manifest.abspath
instead, which returns the absolute path to the manifest file.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-05-18 18:41:04 +02:00
Etienne Carriere
6e2362134d scripts: runner: stm32cubeprogrammer: default reset system after flash
Change stm32cubeprogrammer runner to request a system reset ('-rst'
argument instead of STM32_Programmer_CLI) instead of starting execution
from flash base address ('--start' with sub-options) unless a specific
start address and/or start address modifiers argument are passed

Update stm32n6570_dk and nucleo_n657x0_q boards, adding '--no-reset'
option when programming flash since the board cannot boot after flash
programming unless boot pins (boards physical jumpers) are modified
as described in the related Zephyr board documentation.

This change allows to default start execution on TF-M based devices,
where TF-M entry point is already programmed on device (refer to
use of regression.sh script in related ST boards 'ns' variants)
while other boards will boot from their default boot address
as already supported.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-05-18 15:17:42 +01:00
Etienne Carriere
ba96300bf0 scripts: runner: stm32cubeprogrammer: add reset capability
Add reset capability to stm32cubeprogrammer. Upon --reset option
passed to runner, the target device starts execution.

Note that 'west flash' command always passes '--reset' option to
the runner (here stm32cubeprogrammer) unless '--no-reset' is passed
to the 'west flash' command, or there are multiple images/boards to
program should should not execute once the whole setup is programmed.
See the details in scripts/west_commands/run_common.py or commit
a0267d2f48 ("west: runners: Add run once commands and deferred reset").

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-05-18 15:17:42 +01:00
Swift Tian
a8bb4fdf93 scripts: devicetree: add DESCENDANT_NUM_ON_BUS generated macros
Add generated macros for counting nodes on a specific bus under a bus
controller:

- DT_(INST_)DESCENDANT_NUM_ON_BUS()
- DT_(INST_)DESCENDANT_NUM_ON_BUS_STATUS_OKAY()

The count intentionally walks descendants instead of only direct children.
This covers common devicetree structures where helper/container nodes sit
between a controller and the actual on-bus device nodes.

Traversal stops at child bus-controller nodes, so devices behind sub-buses
are not counted in the parent controller's result.

Also add edtlib Node.on_bus resolution, validated against the parent bus
controller bus types, so generation uses the resolved on-bus value.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2026-05-18 10:14:32 +01:00
Graham Roff
dc3d46554c scripts: dashboard: Fix memory type style in top-ten table
The memory type (RAM or ROM) in the top-ten symbol size table is not
styled correctly and just shows up as normal text following the symbol
name. Fix this to match the style used in the main table (right-
aligned and smaller).

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-17 10:42:04 +02:00
Graham Roff
e08d4ae73b scripts: dashboard: Add search to memory report
Add a search input to the memory report tables matching the
one in the devicetree page.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-17 10:42:04 +02:00
Anas Nashif
3e5ed41fca scripts: ci: check_compliance: add per-file Kconfig allowlist
Add scripts/ci/undef_kconfig_files_allowlist.txt, a new configuration
file that lists source files to skip entirely during the undefined
Kconfig symbol check (check_no_undef_outside_kconfig). All CONFIG_
references found in a listed file are ignored, avoiding the need to
add each symbol individually to undef_kconfig_allowlist.txt when an
entire file is known to be a false-positive source (e.g. generated
files or documentation referencing out-of-tree symbols).

The file list is loaded from the default path at run time, and can be
extended via the UNDEF_KCONFIG_FILES_ALLOWLIST_FILE environment
variable, consistent with the existing UNDEF_KCONFIG_OUTSIDE_ALLOWLIST_FILE
mechanism.

Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-15 23:28:18 +02:00
Graham Roff
be641bba92 scripts: footprint: fix location for code at 0x0
Three related bugs caused symbols in memory regions starting at address
0x0 (e.g. ITCM on Cortex-M7) to be mis-attributed to unrelated source
files in the size report.

1. Functions at address 0 silently dropped in do_simple_name_matching

   The guard `if DW_AT_low_pc != 0` was intended to skip weak or
   garbage-collected functions whose linker address was never resolved.
   However it also discards legitimate functions whose VMA is 0x0, such
   as the first function in an ITCM section that starts at address 0.
   Fix: when DW_AT_low_pc is 0, validate against the ELF symbol table
   before deciding whether to skip the DIE.

2. TLS variables not decoded in get_die_mapped_address

   get_die_mapped_address() only recognised DW_OP_addr location
   expressions. TLS variables compiled with the local-exec model use
   a different expression, which was not parsed, leaving every TLS
   variable unmatched.
   Fix: add a DT_TLS_LOCATION regex that extracts the TLS section
   offset from this expression form.

3. Phantom DWARF DIEs capturing unrelated symbols in
   do_address_range_matching

   Concrete instances of inlined functions inside garbage-collected
   outer functions retain DW_AT_low_pc == 0 and a non-trivial
   DW_AT_high_pc in the DWARF, producing address ranges of the form
   [0, N] that overlap every symbol at a low address. These phantom
   DIEs were consuming unmatched symbols (TLS variables, linker-
   generated veneers) and attributing them to unrelated source files.
   Fix: if no non-TLS, unmatched function symbols exist at address
   zero then skip all zero-address DIEs in do_address_range_matching(),
   as they cannot correspond to code in the current binary.

Signed-off-by: Graham Roff <grahamr@qti.qualcomm.com>
2026-05-15 15:21:22 +02:00
Yves Wang
ced6c7f89a scripts: fix libmagic DLL loading on Windows
reuse>=6.0.0 pulls in python-magic, which requires libmagic.dll on
Windows. python-magic-bin bundles it under <magic_pkg>/libmagic/ but
python-magic's loader.py only searches PATH and cwd.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2026-05-15 12:55:46 +02:00
Anas Nashif
d499db177d ci: compliance: remove useless no-name-in-module
Remove no-name-in-module lint, which we attempt to disable but keeps
coming back with no easy way to subpress.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-05-14 21:53:09 +02:00