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>
Filtered testcases are removed by default from Twister tests.
Older functionality is preserved via a new Twister flag:
--report-filtered.
Old tests were adjusted and a new test for that flag added.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Allow twister fixtures to contain extra information, which can be used for
test suite configuration. The extra information can be appended to existing
fixtures separated by a colon (i.e. <fixture>:<configuration>).
This is especially useful for the pytest harness, where a fixture of a
given type may need to refer to an instance of a particular piece of host
hardware needed by the pytest suite (e.g. a network interface, a UART, or a
CAN interface connected to the device under test).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Pass the list of supported twister fixtures for a given platform to pytest
via DeviceConfig. This allows for the pytest suites to use knowledge of the
fixtures for test suite configuration.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add release notes for the deprecation of a number of POSIX
Kconfig options. These have been deprecated so that we can
use more normative Kconfig variable identifiers, based on
the Options and Option Groups of IEEE 1003.1-2017.
To simplify migration, use
python $ZEPHYR_BASE/scripts/utils/migrate_posix_kconfigs.py \
-r root_path
Additionally, document the removal of PTHREAD_BARRIER_DEFINE(),
EFD_IN_USE, EFD_FLAGS_SET, which were previously deprecated
>= 2 release cycles before.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
When something goes wrong with execution, due to twister issues and
bugs, do not continue with execution and abort the process and report
and return an error code.
Fixes#72807
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit introduces support for an alternate linking method in the
LLEXT subsystem, called "SLID" (short for Symbol Link Identifier),
enabled by the CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID Kconfig option.
SLID-based linking uses a unique identifier (integer) to identify
exported symbols, instead of using the symbol name as done currently.
This approach provides several benefits:
* linking is faster because the comparison operation to determine
whether we found the correct symbol in the export table is now an
integer compare, instead of a string compare
* binary size is reduced as symbol names can be dropped from the binary
* confidentiality is improved as a side-effect, as symbol names are no
longer present in the binary
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Make the generated json file match the contents generated with:
* nrfutil device erase --uicr --core Application --x-operation-id 1
--x-family nrf54h --x-append-batch batch.json
* nrfutil device program --firmware uicr_merged.hex
--options chip_erase_mode=ERASE_NONE,verify=VERIFY_READ
--core Application --x-operation-id 2 --x-family nrf54h
--x-append-batch batch.json
* nrfutil device reset --reset-kind RESET_PIN --x-operation-id 3
--x-append-batch batch.json
The erase options are supposed to be placed under "option" subkey.
Without the "option" subkey, nrfutil defaulted to ERASE_ALL.
Remove the firmware file format field because it is auto detected by
nrfutil when executing the batch script.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Read default domain from domains.yaml file and update
paths to proper build directory. It fixes native and qemu
pytest scenarios, when application is build with sysbuild.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Modify the BAP and PBP samples to start with the profile name
(BAP or PBP) and the role of the sample.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Employs the same linkonce magic of sw_isr_table to fix the
multiple definition of the symtab variables issue that I
get in my application build that doesn't use `west`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`start_addr` is the address of the first symbol, rename it to
`first_addr` instead as it seems more intuitive and relatable
to the comments.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Append new entry to the symtab list only if it has unique
address.
Added a bit more comments and move the debug print to after
the list is sorted.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The `symtab_find_symbol_name()` is using an adapted binary
search function to get the entry between 2 addresses, we need
to add a dummy entry at the end so that the search function
can remain simple and straightforward without doing
out-of-bound checks:
20 \
|
|
50 x
|
|
90 x
. |
. |
. |
dummy /
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The flasher was unconditionally cleaning the UICR area, even when the
application didn't have a new configuration generated. This can happen,
when CONFIG_NRF_REGTOOL_GENERATE_UICR=n. In such case, keep the old UICR
configuration on the device.
A real scenario where we should set CONFIG_NRF_REGTOOL_GENERATE_UICR=n
is when building multiple firmware images that are meant to run one
domain. The primary application build generates the UICR configuration
and secondary images don't. Before this change, the flashing process of
the primary application would write new UICR configuration, but the
flashing process of secondary images would erase it.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
To build LLEXT images using the xt-clang toolchain from Cadence
linker flags have to be set similar to other toolchains. Add the
missing cmake files.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.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 nrfutil runner calls "nrfutil --json device list" which outputs
information about all connected serial ports. The list includes not only
actual boards but also any ttyACM instance. If the ttyACM instance does
not have serial number, then the nrfutil runner will fail on matching
serial number regexp on NoneType.
Fix the issue by limiting nrfutil runner board output to only devices
that have trait jlink set.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The coverage_analysis.py while generating report, duplicates
files and functions of components.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.
Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.
Updated the includes path of in-tree sources accordingly.
Most of the changes here are scripted, check the PR for more
info.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Introduce `robot` command for running Robot Framework test suites.
Initial implementation consists of one runner dedicated for renode-test,
which is a Renode wrapper for running Robot tests.
Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Introduce `simulate `command for running samples on a simulator of
choice. Initial implementation consists of one runner, dedicated for
Renode.
Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Add explicit capabilities to nios2, nsim and openocd runners to prevent
them from having potentially unwanted ones (for example when new
capabilities are added to Zephyr).
Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Add capability allowing to suppress the --file parameters that can be
passed to a west command runner.
Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Initial integration with renode-test was introduced in commit bdf02ff,
which added support for calling the `renode-test` command from both west
and twister.
This commit removes the custom run_renode_test target used for running
Robot tests with the `west build` command and makes twister call
`renode-test` directly instead.
Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Add the option to support an external loader for flashing
hex file to internal and external NOR flash using
the STM32CubProgrammer CLI with a board_runner_args
"--extload=MX25LM51245G_STM32U585I-IOT02A.stldr"
The absolute path of the stldr file is added to the
stm32CubeProgrammer command.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
PR #72592 made pylint to use json2 output format. However, this
format is introduced in pylint v3. This commit adds an appropriate
setting in the requirements file.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
In twister, applying quarantine is a part of apply_filters() function.
However, this function is not called when --load-test is used.
Therefore, if one wants to use quarantines in combination with
dynamic scope from the test_plan.py script, one has to pass such
info through the script.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Adding a Kconfig and a header file to control which PSA features
are to be used from MbedTLS:
- new kconfig symbols are placed in a separate header file
(Kconfig.psa) and are guarded by MBEDTLS_PSA_CRYPTO_CLIENT. The
reason for this is that TLS/X509 can either rely on PSA functions
provided by MbedTLS (when MBEDTLS_PSA_CRYPTO_C is defined) or
TFM (when BUILD_WITH_TFM is selected). Therefore we could
not make these new Kconfigs depending on MBEDTLS_PSA_CRYPTO_C.
- by default all PSA symbols are enabled, but they can be
disabled by respective Kconfigs in order to reduce the image
size.
- the new header file (config-psa-generic.h) mimics what
config-tls-generic.h does for MbedTLS builtin symbols: it
enables a build symbol for every Kconfig one. The name is
kept identical in the 2 cases (a part from the initial CONFIG_
in order to simplify the mechanism).
- MBEDTLS_PSA_CRYPTO_CONFIG is finally enabled whenever there
is any PSA crypto provider (either MBEDTLS_PSA_CRYPTO_C or
TFM)
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Use pyelftools to extract the symbol table from the
link stage executable. Then, filter out the function names
and sort them based on their offsets before writing into the
`symtab.c`, this is similar to how the `isr_tables` works.
To access the structure, simply include the new header:
```c
#include <zephyr/debug/symtab.h>
```
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The --flash-before flag allows devices to be flashed before the serial
connection is established. However, the implementation was incomplete and
only worked if the port address already existed at the start of the run.
This is incompatible with devices that implement the USB in software
(eg: USB-CDC).
This commit fixes the implementation to delay setting up the connection
until after the device is flashed, and to retry the connection for two
seconds after flashing to give the device time to enumerate as a USB
device.
Signed-off-by: Mike Szczys <mike@golioth.io>
Do not end except block with a useless return, use a pass instead. This
fixes pylint R1711: "Useless return at end of function or method
(useless-return)".
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add "west build" argument for specifying shields. This saves users from
having to do "west build ... -- -DSHIELD=...", making shields a much better
integrated feature.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add example snippet argument to usage output of the "west build" command
and use the singular "SNIPPET" in the generated help text.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Allow to provide from CLI, threshold value for number of test case roots
selected for execution base on changed files.
When such threshold will be exceeded, full scope will be executed.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>