This commit adds a test that checks if disconnecting
and restarting the IPC session works correctly. The
test is also focused on the "unbound" callback.
Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
Co-authored-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
Existing logic is passing elf file as parameter only when fsbl
or bit file parameter is present. This is incorrect, elf file should
be always passed irrespective of other parameters.
Signed-off-by: Mubin Sayyed <mubin.sayyed@amd.com>
One might want to select the symbols to be relocated inside a file or
a library. To do this, one can use the FILTER argument of
zephyr_code_relocate which must contain a regular expression of the
section names to be selected for relocation.
The test_function_in_sram2 test case in
`tests/application_development/code_relocation` has been updated to
verify that only one function `function_in_sram()` is relocated to ram
and that the function `function_not_relocated()` is not being relocated
when using relocation filter.
Signed-off-by: Sylvain Chouleur <sylvain.chouleur@gmail.com>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
With code relocation directives passed to the gen_relocate_app.py script
using generated file, then each directive can be place on individual
line in the file and thus free up the `|` character as separator.
Furthermore, a multi-line file with each directive on separate line is
also more user-readable, making debugging easier.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
After adding more detailed information to the reason field in
Twister report, update twister_report_analyzer.py to group
CMake and Build failures.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Updated test_report_summary to match new string with detailed
reason of build failure.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Extended the reason field in Twister report to include
more detailed information for 'Build failure' and
'CMake build failure'
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
To use openocd rtt shell in a non-Windows environment,
you need to turn off ICANON and ECHO.
Refer to pyocd to enable a temporary terminal and configure
it correctly.
Signed-off-by: Findlay Feng <i@fengch.me>
Add 'images' as valid list in build info schema.
This allow sysbuild and regular Zephyr images to populate build_info.yml
with images included in the build.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Introduce a new harness based on pytest that does basic shell command
handling. The harness is enabeld using:
harness: shell
and expects a file with parameters in the form:
test_shell_harness:
- command: "kernel version"
expected: "Zephyr version .*"
- ...
Multiple commands and their expected output can be tested.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Currently, file2hex.py supports conversion of binary data into hexadecimal
character list format only. The generated list can then be used to embed
the binary data by using the list to initialize an array. However, this
approach is highly inefficient for large binary files.
A close but considerably more efficient alternative is to use string
literals composed of hex characters (in escaped form) to initialize the
array, instead of an initializer list. Benchmarking (with GCC and clang)
indicates that compile time and host memory usage by the compiler can be
more than an order of magnitude less with string literal approach compared
to the initializer list form.
The only caveat is that string literals contain the null character as
terminator so where accurate length is required, the correct length must
be specified explicitly while defining the array.
Signed-off-by: Irfan Ahmad <irfan.ahmad@siemens.com>
When using --coverage-per-instance, collect the test names in lcov, and
add --show-details to the html report to display those test names.
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Instead of capturing the coverage data twice with
--coverage-per-instance, just merge the lcov files in the aggregation
report.
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Added script to parse and analyse Twister reports.
Failed tests are grouped together by reason of failure,
Cmake and build errors are grouped using predefined patterns.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Currently, the llext-edk.cmake script requires a number of variables to
be passed in from the main CMakeLists.txt file as arguments to be able
to customize the generated files.
To improve this rigid approach, the script is modified to read in the
following files in the build directory:
* 'zephyr/.config', for the final set of Kconfig options used;
* 'build_info.yml', for the cmake-related variables.
This is more flexible and also easier to maintain, as it doesn't require
manual changes to the main CMakelists.txt file when new variables need
to be referenced.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add a function generate_uuid_registry that calls the gen-uuid-reg.py script
to generate the uuid-registry.h file. If signing an image without sof,
trigger the generation of the uuid-registry.h file.
Instruct the toml file preprocessor to also use the definitions from the
uuid-registry.h file. This will allow the values placed in the
uuid-registry to be used in toml files.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The nRF54H and the nRF92 series do not support the RESET_SYSTEM reset
kind. Instead one must use RESET_HARD, which this patch now implements.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
After commit aaefaad, flashing of the FLPR and PPR cores in the nRF54H20
was broken due to those cores missing from the _get_core() function that
retrieves the core to program, triggering an exception. Fix it by
referencing those cores and mapping them to the application core.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This acts in a similar way to nrfjprog's --qspiini parameter introduced
in 7eb364b, but works slightly differently in nrfutil: it requires a
config file in JSON format instead of .ini, and it is passed along to
the `execute-batch` command instead of providing it together with the
`program` command.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Both backends supported as runners for nRF ICs, nrfjprog and nrfutil,
support erasing external memory as part of the programming operation.
Before this patch, and when the firmware was detected to be partially or
fully placed in external flash by inspecting the .hex address range, the
runner would instruct the backend tool to fully erase the external
flash (but the nrfjprog runner would ignore that, always erasing only
the sectors required). Instead, correctly default to erasing only the
sectors that are required to program the new firmware image in both tools,
and erase it completely only when the --erase flag is provided by the user.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Adds a check for Kconfig settings that are disallowed from being
used in defconfig files (because it is the complete wrong place
for them), with the default entry being PINCTRL
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Co-authored-by: Benjamin Cabé <benjamin@zephyrproject.org>
The Nordic nRF52 series have a peculiarity that is not shared with any
other Nordic families of SoCs: the reset pin can be reconfigured as a
regular GPIO. This has an unintended consequence: if the user has
reconfigured the pin in Devicetree to be a GPIO, `west flash` will
override that and configure the IC to use it as a reset pin, and the
firmware at boot won't be able to switch it back to GPIO, because that
requires a UICR erase. This behavior is very confusing to users, because
the GPIO does not work at all, since it is now just a reset line.
With this patch, `west flash` defaults to using soft reset instead of
pin reset for the nRF52 family of devices, to avoid overwriting the
reset pin configuration that the user includes in the image.
In order to be able to continue to use pin reset for users that so
desire it, a new option `--pinreset` is added that forces the use of pin
reset. The existing `--softreset` option is left exactly as it was, but
it is now applicable only to families other than the nRF52.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Commit dc7d8bb introduced the requirement to provide the erase kind when
executing the corresponding op, but it was forgotten in this particular
spot.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Implement possibility to specify options for --start and --download
arguments.
These options are implemented as lists to better fit STM32CubeProgrammer
programming model.
This options are required to enable the programming of STM32N6 in USB-DFU
mode, which requires "-d my.bin 0x1 -s noack" arguments list.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
If a blob checksum does not match what is recorded in the
associated module.yml file, `west blobs fetch` should
(eventually) fail.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The `erase` command was being used but there was no "backend"
implementation for it in nrfutil nor nrfjprog. Simplify the syntax and
implement it for both tools.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
These are used to detect if the firmware image contains any values
inside the UICR for additional handling.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This is no longer necessary, because thanks to sysbuild we no longer
invoke a runner with a .hex file that is the result of merging builds
for more than one core.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add an if clause to the CheckPatch Class that checks for windows os.
If windows os, check for perl installation.
If no perl installation present. Fail the check.
Without this change, CheckPatch can fail silently on windows,
as windows does not have a way to run perl scripts.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
When pytest is executed, it only writes logging messages to the twister
harness, and does not include information about any test assertion
failures. This information is printed to stdout, so simply write
the contents stdout to the harness log.
Remove the log file arguments previously passed to pytest, as these are
no longer needed.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Node properties are not created for all properties defined
by the node's binding (Binding.prop2specs),
only for those that actually have a value.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
PropertySpec.path does NOT tell "the file where the property
was last modified", but instead the binding file specifying
the devicetree node of which this is a property.
See: #65135
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
In `--coverage-per-instance` mode for 'gcovr' merge individual
coverage.json reports into the aggregate code coverage report
instead of processing .gcda data files again.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
With this change, the coverage data (GCOV dump) is extracted from the
test log files after each of the test instance parallel execution,
instead of post processing all the logs at the end of the Twister run.
The new `--coverage-per-instance` mode extends Twister coverage operations
to report coverage statistics on each test instance execution individually
in addition to the default reporting mode which aggregates data to one
report with all the test instances in the current scope of the Twister run.
The split mode allows to identify precisely what amount of code coverage
each test suite provides and to analyze its contribution to the overall
test plan's coverage. Each test configuration's output directory will have
its own coverage report and data files, so the overall disk space and
the total execution time increase.
Another new `--disable-coverage-aggregation` option allows to execute
only the `--coverage-per-instance` mode when the aggregate coverage
report for the whole Twister run scope is not needed.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Group Twister code coverage command line arguments for better usability.
Add more details in descriptions.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
MCUboot's imgtool requirement has been moved directly to MCUboot
which can be installed using west packages if needed, remove it
from Zephyr's requirements
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
In situations where a test won't be run because there is a gap
in the hardware support, add the gap information to the "reason"
field to aid in debugging test cases.
With this change, the reason field for the error in test case
will show the gap:
e.g. reason field now updated with gaps
"No hardware support {'usbd'} but is one of the integration platforms"
Signed-off-by: David Leach <david.leach@nxp.com>
In commit 6e9e839195, an indirection via
the new `options` dictionary was missed in the SUIT handling.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This reverts commit 034c36cfad.
as it's part of a series of commits causing issues on Windows
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Actually using the error count before clearing it
would probably be more useful.
ExecutionCounter's error count was set to 0
before being used to lower the done count properly.
This should fix in-progress overcounting,
where Twister claimed to execute more tests than planned.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>