HWMv2 was introduced in v3.7, and HWMv1 support was removed in v4.2
so this script is no longer needed
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The commit 125d0daaa1 added 'loc' to the sym.ranges tuples and fixed
kconfiglib.py but guiconfig.py is left untouched. This make menuconfig to
die with:
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.13/tkinter/__init__.py", line 2077, in __call__
return self.func(*args)
~~~~~~~~~^^^^^^^
File ".../scripts/kconfig/guiconfig.py", line 917, in _tree_double_click
return _tree_enter(event)
File ".../scripts/kconfig/guiconfig.py", line 942, in _tree_enter
_change_node(node, tree.winfo_toplevel())
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../scripts/kconfig/guiconfig.py", line 1125, in _change_node
s = _set_val_dialog(node, parent)
File ".../scripts/kconfig/guiconfig.py", line 1219, in _set_val_dialog
range_info = _range_info(sym)
File ".../scripts/kconfig/guiconfig.py", line 1339, in _range_info
for low, high, cond in sym.ranges:
^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
This commit ignores the last element in the tuples.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
The commit 125d0daaa1 added 'loc' to the sym.ranges tuples and fixed
kconfiglib.py but menuconfig.py is left untouched. This make menuconfig to
die with:
Traceback (most recent call last):
File ".../scripts/kconfig/menuconfig.py", line 3284, in <module>
_main()
~~~~~^^
File ".../scripts/kconfig/menuconfig.py", line 663, in _main
menuconfig(standard_kconfig(__doc__))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../scripts/kconfig/menuconfig.py", line 732, in menuconfig
print(curses.wrapper(_menuconfig))
~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib/python3.13/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File ".../scripts/kconfig/menuconfig.py", line 872, in _menuconfig
_change_node(sel_node)
~~~~~~~~~~~~^^^^^^^^^^
File ".../scripts/kconfig/menuconfig.py", line 1586, in _change_node
s, _range_info(sc))
~~~~~~~~~~~^^^^
File ".../scripts/kconfig/menuconfig.py", line 3119, in _range_info
for low, high, cond in sym.ranges:
^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
This commit ignores the last element in the tuples.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Stop `--output-bin` from consuming the first trailing argument that
should have been in `input_files`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Rename dt_node_prop_enabled filtering expression to
dt_nodelabel_prop_enabled as it takes a node label as a 1st argument.
Enhance dt_node_has_prop inline doc and param name.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
3cc9a843e8 added '--external-init' to the GDB
Server command line whenever an external loader is provided, but it is not
a *necessary* argument and sometimes causes issues.
Provide a new runner argument "--external-init" (for consistency) which
controls whether or not the argument is added to command line if an
external loader is used. (It is otherwise ignored)
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The "--swd" argument had both an action='store_true' and default value of
True so it wasn't possible to disable it: providing the argument would set
its value to True, and not providing it would use the default=True!
Add a new argument "--no-swd" which shares its destination variable with
"--swd", but with action='store_false', such that either can be provided
to enable/disable SWD mode. Both arguments are placed in a mutually
exclusive group and use a common help message.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Ensure the blobs command is trying to display the license file for
click-through approval. Ensure that special characters doesn't
cause a problem in Windows by opening the file with utf-8 encoding.
Fixes#98520
Signed-off-by: David Leach <david.leach@nxp.com>
`fork()` is defined by POSIX and for creating a new child process.
It is the preferred method of doing so on systems with virtual memory and
the symbol should not be used outside of the context defined by the
POSIX standard.
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The display harness initial documentation was a separate, stale (had
references to a personal Github repo), README.rst buried in the
twister/scripts folder.
Move the docs to be a "first class" part of the Twister documentation
alongside other harnesses.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update the ruff version to the latest 0.14.2 and update the excluded files
to match with the last checks for linter and formatting issues.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Instead of relying on various exceptions that can happen when one tries
to execute a program that is not installed in the system (typically
FileNotFoundError but sometimes PermissionError), use shutil.which() to
ensure the npx executable is available before running it.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Collect filter commands into a single location and sort them in the
order: arch, vendor, platform, pattern, filter, tag. This enhances
the readability of help information and reduces the time spent
searching for filter command options.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
Collect device-testing commands into a single location to enhance
readability of help information and reduce the time spent
locating device-testing options.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
reworked run_tests.py script:
- removed obsolete arguments from commands called by this script
- avoid code duplication by using a for-loop
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
added pyproject.toml config file which allows to set paths for tools
like mypy or pytest. With this config file it becomes possible to
directly run those tools in a local zephyr tree.
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
This PR fixes incorrect error message when dts-linter is not installed
and provide a proper message instead of:
`Failed to parse dts-linter JSON output: ...`
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
Fixes an oversight of only checking files that are exactly named
CMakeLists.txt - this includes the directory name, so that it
actually checks any file in the tree with this name
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
When debugging boards with external Flash, to make it accessible for
read and write by the debugger, we need the --external-init option
together with --extload <file_path> option.
It allows the ST-LINK GDB server to make external memory accessible
after reset without any need for the app to set it up.
The external memory must be memory mapped and directly accessed because
normal memory read/write is used by gdb.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Add support for the Tigard multi-protocol hardware hacking tool from
SecuringHardware.com.
More information available at https://github.com/tigard-tools/tigard
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
The optional --output-bin parameter instructs the IntelHex class to
save the content as a binary file instead of the Intel Hex format.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
build.dir-fmt format string arguments are extended. New format args are
'west_topdir' (absolute path to the west workspace directory) and
'source_dir_workspace' (relative path of the source directory to
west_topdir).
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
Relax the `Missing a blank line after declarations` checkpatch error by
loosening the requirements for a macro to be treated as one that
declared a variable.
Currently the regex matches the pattern `DECLARE` or `DEFINE`, as long
as there are between 1 and 6 trailing `_FOO` components to the macro
name (e.g. `DECLARE_MY_TYPE()`). Zephyr however contains many macros
that don't have the trailing components but still resolve to variables
(e.g. `ATOMIC_DEFINE`, `K_MUTEX_DEFINE, etc`).
By changing `{1,6}` to `{0,6}`, we remove the requirement for the
trailing `_FOO` component(s) while still allowing them. This stops
checkpatch from erroring on patterns like this:
```
struct driver_data {
uint16_t some_value;
ATOMIC_DEFINE(some_atomic, 16);
};
```
Signed-off-by: Jordan Yates <jordan@embeint.com>
this path only provides autocompletion for the `west` command
itself, not for its subcommands. (i.e. `west [tab]` rather than
`west packages [tab]`). However, it remains highly userful,
significantly reducing typing time and errors when using longer
commands like `west packages`.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
this path only provides autocompletion for the `west` command
itself, not for its subcommands. (i.e. `west [tab]` rather than
`west packages [tab]`). However, it remains highly userful,
significantly reducing typing time and errors when using longer
commands like `west packages`.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
this path only provides autocompletion for the `west` command
itself, not for its subcommands. (i.e. `west [tab]` rather than
`west packages [tab]`). However, it remains highly userful,
significantly reducing typing time and errors when using longer
commands like `west packages`.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
multiprocessing no longer defaults to fork, so force it to maintain pre
3.14 behavior. We will need to revisit the implementation and at some
point move to forkserver
Fixes#95058
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In order to allow for users to invoke "west flash" without actual
hardware connected but still running the logic and pregeneration of
commands, specifically the json file.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Until now, for historical reasons (see
f42cef9c81 and
58e0e31c7e), the use of the --erase-mode
command-line switch was reserved for the nRF54L family. But in fact this
can be used (instead of --erase) for any of the Nordic ICs. This patch
extends the usage of this switch regardless of family.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add a new 'west bindesc extract' subcommand that dumps all binary
descriptors into a separate binary file. It will also report the range
(offset and length) of the dumped data within the original image.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Enhance the `size_report` script to correctly categorize static C++
variables in the memory report.
Static C++ variables are currently listed under the "No paths"
category in the size report. This occurs because the script's
address-based mapping logic is designed for functions, which
occupy an address range, but fails to handle variables that
have only a single memory address.
This commit improves the `do_address_range_matching` function
to handle single-address mappings. The updated logic now correctly
identifies and assigns static C++ variables to their corresponding
source file paths in the report tree, providing a more accurate and
comprehensive memory footprint analysis for C++ applications.
This enhancement ensures that all symbols, regardless of their
linkage or type, are correctly placed in the report, providing a
more accurate overview of memory usage.
Signed-off-by: Nilesh Vyas <nileshvyas1112@gmail.com>
Set the environment:os tag to the return value of platform.system(),
which is more useful than os.name() which always returns "posix".
Signed-off-by: Keith Short <keithshort@google.com>
Align with native_simulator's upstream main
95f560a2140aacb03a74b8c933f3b27a59c56d50
Which includes:
95f560a: nct: fix possible redefinition of GNU_SOURCE
Signed-off-by: Andreas Kurz <info@akurz.net>
The new 'traceconfig' target generates a Markdown file listing all
configuration symbols, their values, and where those values originated
(user assignment, default, selection, implication, or unset).
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Collect and save trace data for all symbols in the merged configuration.
This includes information about where each symbol was defined or
assigned, which can be useful for debugging complex Kconfig setups.
The trace data includes the following information for each symbol:
- Name
- Visibility
- Type
- Value
- Kind and location of value origin (as defined in kconfiglib)
The trace data is saved for later use in two formats: a binary pickle
file and a human-readable JSON file.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Track information about what caused a value to be set in the 'origin'
property of Symbol. 'imply' and 'select' dependencies do not have a
location associated with them, so in those cases the location is
a string representation of the dependency expression. For defaults and
user values, the location in the Kconfig file is stored.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Store the location (filename and line number) where a 'select', 'imply',
'range' or 'default' was added to a Symbol or Choice.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The 'user_loc' stores the location (filename and line number) where a
symbol or choice was last set via a direct user selection.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Replace filename and linenr parameters to _warn() with a single loc
element, which is a constant (filename, linenr) tuple that can be more
efficiently passed and stored.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Replace 'filename' and 'linenr' usages with a single 'loc' attribute,
which is a (filename, linenr) tuple. This simplifies code dealing with
locations, and makes it explicitly constant. The original attributes are
now provided via properties for compatibility.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Instead of using a mutually exclusive group for sysbuild/no-sysbuild
argparse arguments, use the argparse.BooleanOptionalAction to allow passing
multiple arguments, where the last one is applied.
This is consistent with for example gcc compiler flags.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>