The TEST_SHELL config was removed in commit be0dff6844
("test: remove TEST_SHELL") a while ago.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The config options have been renamed in commit 8dc3f85622
("hwmv2: Introduce Hardware model version 2 and convert devices"),
therefore update them in the hardend file.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
For Windows, if the build dir is under same drive with zephyr base, the
generated link shall be relative url like posix style.
If they are in different drive, url is meaningless. So just use raw link
format so that some editors can directly jump to.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
add dt_node_array_prop_has_val function and
extend dt_nodelabel_array_prop_has_val to be
used with string-arrays.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Fixes this function so that it returns the unit address of the
node, without having to rely on odd tricks to locate various parent
nodes and check that they have reg addresses and perform additions
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add the dt_compat_all_has_prop
kconfig preprocessor function, simillar to
dt_compat_any_has_prop.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add support for arrays and string-arrays to
dt_compat_any_has_prop
kconfig preprocessor function.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
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>
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>
dt_nodelabel_int_prop did not check if the property existed on the node
before accessing it, which would result in a build-time crash (and thus
build error) if used on a node which lacked the requested property.
Fix by using the common _node_int_prop() helper which handles all edge
cases properly.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Make use of `tabulate` to pretty print the results of the hardening tool
instead of custom formatting.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Filter duplicate entries in `kconf.kconfig_filenames` before calling
`os.path.realpath`.
Before (current code), all entries in `kconf.kconfig_filenames` go
through `os.path.realpath`. Including all duplicate entries.
With the proposed change, the duplicate entries are removed before
calling `os.path.realpath`.
Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
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>
Add a new promptless Kconfig symbol (INSECURE). This symbols must
be selected by any setting which is used to enable an insecure
feature.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
Add dt_compat_enabled_num Kconfig helper function for counting the number
of compatible nodes with status okay.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This is an X86 specific option and should not appear as generic debug
option.
Fixeszephyrproject-rtos/zephyr#52929
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Functions like `add` and `sub` can only return base 10 integers, which
means they can't really be used to define Kconfig symbols of type `hex`.
For the same reason, there already exist pairs of devicetree functions
named e.g., `dt_node_reg_addr_(int|hex)` after different return types.
Introduce `add_hex`, `sub_hex`, and friends.
To avoid confusion, it should be possible for those new functions to
accept arguments in base 16 as well. It's actually easier to let all
arithmetic functions take their inputs in "any" base, by leveraging
Python's built-in: `int(..., base=0)`.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Adds a function which can be used to get the integer value of a
devicetree property in Kconfig from a nodelabel
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This driver was deprecated and must be removed by Zephyr version
4.1 according to lifecycle/release guidelines.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add preprocessor function that returns 'y' if any enabled node with
compat does NOT have a certain property. This is different from using
dt_compat_any_has_prop to check that they ALL don't have the property.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Fixes: #69548
Support extending an existing board with new board variants.
This commit introduces the following changes to allow a board to be
extended out-of-tree.
The board yaml schema is extended to support an extend field which
will be used to identify the board to be extended.
A board 'plank' can be extended like this:
> board:
> extend: plank
> variants:
> - name: ext
> qualifier: soc1
For the rest of the build system this means that there is no longer a
single board directory.
The existing CMake variable BOARD_DIR is kept and reference the
directory which defines the board.
A new CMake variable BOARD_DIRECTORIES provides a list of all
directories which defines board targets for the board.
This means the directory which defines the board as well as all
directories that extends the board.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Add optional value parameter to dt_compat_any_has_prop
kconfig preprocessor function, which puts an additional constraint on
the truth of the function in that the property value must match the
parameter value.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Gets experimental and deprecated symbols directly from Kconfig instead
of rely on hardened.csv.
This way we keep the tool consistent with Zephyr's code.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add a kconfig preprocessor function to check if
any node of a certain compatible has a specific property in DT.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
CI reports error:
kconfigfunctions.py:143:11: E0601: Using variable 'edtlib' before
assignment (used-before-assignment)
Initialize edtlib to none when there is no edt.
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
Introduce dt_node_ph_prop_path function.
It takes a node 'path' and a phandle property name
and returns the path to the pointed-to node.
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
Remove the deprecated uart_mux and gsm_mux modules and all of
their configurations/dependencies across zephyr.
Optimally uart_mux and gsm_mux would be removed in their own
respective PRs, but the two modules are directly coupled, so
to preserve bisectability, they must be removed together.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The `BT_DEBUG_*` Kconfig symbols have been deprecated for more than 2
versions, remove them.
Update code that was still using them.
Remove the Bluetooth specific `Kconfig.template.log_config_bt` and use
`Kconfig.template.log_config_inherit` from the logging subsystem
instead, now that the legacy symbols can be removed.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Followup: #69905
Adopting new board terminology for CMake, python, and Kconfig code to
use qualifiers instead of identifiers.
Also adjusted to board target where applicable.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>