Add more macros for interacting with controller/data type of
relationships (phandle arrays / cells)
Add macros for arbitrarily iterating cells of phandle specifiers
Add tests for the new macros
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add a helper script that can take in a size report in json and render it in
a sunburst chart.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Modified the assertion statements to raise informative exceptions
that indicate which lines did not pass the assertions.
Added unit tests using pytest to validate the functionality of
the modified functions.
Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
Adds a output env file that lists the paths of zephyr modules
which can be used in Kconfig files and uses this in Kconfig. Also
updates Kconfig doc output to generate and use this
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
When testing ESP32-based platforms in CI, early boot logs can be missed
if the serial connection isn't reset properly. This patch applies the
standard RTS/DTR toggle sequence to reset the ESP32 after flashing,
ensuring consistent log capture from the very beginning.
The logic is applied conditionally when the runner is "esp32".
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Suppress memory leaks detected by valgrind originating from
nct_new_thread(), part of the native_sim CPU thread emulation.
This covers calls to posix_new_thread() as well, since this function simply
calls nct_new_thread (but may be optimized out by the compiler).
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Currently twister requires west to flash a board, either directly using
west-flash or indirectly through the cmake flash target.
Add an option to specify a custom flash script, this is passed a
build-dir and board-id flags so it can be used to implement custom
flashing scripts in a system that does not use west.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
STM32CubeProgrammer does not support flashing in BOOT-SERIAL mode
using the device's serial number.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Change BoardYml compliance check from using get_module_setting_root()
to load and parse module.yml directly.
get_module_setting_root cannot be used directly with module.yml.
Instead adjust the code so that the module.yml file is loaded locally
and the dts_root setting is extracted from the dictionary.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Multiple handlers were setting status/reason in slightly different ways,
but the code was mostly trying to do the same. Put this code in the
handler class and implement in one place.
This fixes an issue where in some cases qemu failures were not handled
correctly and status of cases was not updated, leading to multiple
failures.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Honor the --flash-before option when using a serial-pty script with
--device-serial-pty <script> and start the script only after
flashing the device.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
`BOOT_ENCRYPT_ALG_AES_128` and `BOOT_ENCRYPT_ALG_AES_256` are used in
`share/sysbuild/image_configurations/BOOTLOADER_image_default.cmake`
They were first introduced in commit 9a1fe30
Signed-off-by: MA Junyi <mjysci@live.com>
Adjust the RFP runner platform check to properly handle Darwin or Windows
and skip setting a default RPF port on those two platforms.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
Reorganize how gen_uicr.py is invoked.
Instead of invoking it from one of the Zephyr images we invoke it from
a new special Zephyr image called uicr.
This uicr Zephyr image is flashed in the same way as normal Zephyr
images so special handling in the runner is no longer necessary.
Also, we simplify gen_uicr.py by moving parsing of Kconfig/DT from
gen_uicr.py to CMake.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
We have a few checks that report warnings, and for some of them it's
actually the _only_ type of failure they report, so it can be confusing
when the output of check_compliance.py says the "check failed" and lists
all the things that are effectively warnings as "ERROR"s.
This commit makes the output more clear by differentiating between
warnings and actual errors, both when printing out individual failures,
but also when printing the summary for each test case (ie. a test case
is said to be "failing" only when it has at least one error, and is only
showing up as having warnings if it only contains... warnings).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Adds a context pool that can be used when a number of threads may be
dynamically created to use with RTIO. While the pool has a small cost to
it, the cost of verifying a statically declared kobject likely makes it
worth avoiding dynamically allocating these with the typical
kobject_alloc method. Instead this arena style pool of objects can be
used where the kobject validation uses the gperf hash created at build
time.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
On Windows and Linux, the stm32cubeprogrammer runner will use
STM32_Programmer_CLI from PATH if it is available, but this was not
implemented on macOS. Add PATH lookup for macOS as well, using the same
approach as Windows and Linux.
Fixeszephyrproject-rtos/zephyr#93056
Signed-off-by: Garrett L. Ward <glward@glward.net>
Proceed if the environment variables ZEPHYR_EXTRA_MODULES or
EXTRA_ZEPHYR_MODULES are set to an empty string. Handle same way as if
the variable is unset.
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
Adds a variable that has the path of the module directory, this
is supplied as an argument when running cmake normally but is
not supplied when running the check compliance script, this
addition allows checks to be ran that use such syntax in Kconfig
files. This is then removed from cmake as the python file handles
it instead
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
extra_configs or extra_args can use additional filtering which was not
supported by the west build command. West is not aware of arch so that
filter type is not supported but platform (board) is known so it can
be used to apply expected configuration.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Users were confused about which toolchain names to pass to
`west sdk install -t`, since the documentation did not list them.
Enhance the help text to suggest installing all toolchains if
unsure and point to the SDK release notes where the available
toolchains are listed.
ref: https://github.com/zephyrproject-rtos/zephyr/discussions/94572
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Create a new, generic parser, that is able to parse dictionary logs live
- showing the messages as they are received from the device.
This functionality previously existed only for reading the log from a UART.
With the new script, the functionality is extended to be able to also read
the log from a file or stdin.
Additionally, the script is written in an extend-able way, making it simple
to support more input sources in the future.
The new script contains a better version of the live functionality than the
old script of log_parser_uart script, therefore, the old script has been
deprecated.
The UART script is still available, and will work by invoking the new
implementation with relevant arguments translation, however, it should
ideally not be used any longer, and should be removed from a future
release.
Signed-off-by: Omri Sarig <omsi@demant.com>
The current implementation of the serial log parser is running in a loop -
every 2 seconds it checks if there is any information ready to be read, and
in this case, it reads this information and parses it.
In case the last packet of the information is not fully available, the
script will read only the first part of the packet, and will fail when
parsing, ending the run with an error.
This should not the be the case, as it is not an error to have only part
of the packet in the buffer.
This commit fixes this problem - now, instead of failing because the parser
does not have enough information, the parser will parse all the full
packets it have, and keep the last, partial packet in the queue, to be
parsed together with the next chunk of data.
This is done by updating the log parsers to return the amount of parsed
data when trying to parse the information, and updating the calling scripts
to correctly handle this new return value.
Additionally, the parser is now quietly failing in case of having a partial
message, and throw an exception for any other kind of error in the parsing
(instead of returning a boolean return code).
In addition to the partial packet handling, the current commit also do the
following, minor improvements:
* parserlib now fails by throwing an exception, instead of exiting - this
is done to make it possible to choose a different handling for the errors
from the calling code, if needed.
* The dictionary and parser are now created before the parse operation.
This makes the uart parser more efficient, and also removes the
previously duplicated messages of build id, target architecture and
endianess (which was printed every time new information was received from
the UART).
Signed-off-by: Omri Sarig <omsi@demant.com>
Python does not support values of long-long (ll) or short-short (hh) in
string-formatting. The current parser is correctly removing the first "h"
or "l" from the format, to make it possible to correctly parse these
strings when they are in the dictionary.
However, the current implementation does not correctly handle the case of
having a number before the "ll" or "hh" argument - which is supported by
both C and Python.
This commit updates the parser to correctly handle these cases, by changing
the simple replace operator with a regex replace, which is able to
correctly handle this case.
Before this commit, the string of:
"This is my long variable: %08llX"
will stay the same, which will throw a ValueError when parsing this
dictionary message:
"ValueError: unsupported format character 'h' (0x68) at index ".
After this commit, the string will be correctly fixed to
"This is my long variable: %08lX"
which is parsed correctly.
Signed-off-by: Omri Sarig <omsi@demant.com>
'MCUX_HW_CORE' and 'MCUX_HW_FPU_TYPE' are used in
modules/hal_nxp/device.cmake. It is a variable used
by MCUX SDK CMake.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
S32DS3.6 requires to use python 3.10, so update
PYTHONPATH for S32DS3.6 when debug on windows.
Update to verify new behavior of supported commands
with S32D3.6 on windows.
Update to find out the usb device connected by VID
and PID instead of class "NXP Probes" on windows
Because based on the S32 Debug probe OS version the
device class of USB is changed. Therefore a reliable
way to identify the probe is check the USB VID and PID.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
gcovr runs gcov to generate temporary coverage files into the gcov
working directory. The working directory defaults to gcovr's -r
argument.
When running twister with the --coverage-per-instance argument, multiple
gcovr instances may run in parallel. Since they all share the same gcov
working directory, they may interfere with each other, resulting in
errors like this:
AssertionError: Sanity check failed, output file
spinlock.h##4167b923a06cc9590c8eef372f016a6d.gcov doesn't exist
but no error from GCOV detected.
To fix this, specify a separate gcov working directory for every test
through gcovr's --gcov-object-directory option.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
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>
Drop the logic to use the generator "flash" target, that is using west
anyway, always call flash directly anyway so that those targets can be
deprecated.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add Kconfig option BOOT_SERIAL_UART, defined in the MCUboot module but
needed to be used in tests, to the UNDEF_KCONFIG_ALLOWLIST.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Updated twister.yaml workflow to fetch esptool for the CI.
Fix format of the arguments used in the esptool-5.0.2.
Check that esptool is available on build time.
Update runners for esp32.
Signed-off-by: Marek Matej <marek.matej@espressif.com>