Remove the source of non-determinism during emulation
by keeping terminal events reproducible between runs.
By using the mechanism of precise pause in Renode emulator
every interaction with terminal happens at the same virtual time
from the perspective of an emulated system, hence makes it independent
of the host. Otherwise the result of a test is susceptible to
the load on the host and robot process keywords' timing.
Renode emulator supports precise pausing when specified sequence of
characters is received on a terminal. Besides that,
char delay parameter is specified to set time interval between
consecutive characters entered in the terminal.
'Start Emulation' keyword is redundant, because 'Wait For'
keywords automatically continue emulation up to the nearest pause
event (e.g. matched pattern on the terminal).
Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Removed boards that are not exercised in the CI pipeline, as they are
highly downstream-specific and not relevant to upstream validation.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
For the SAI peripheral, the MCLK signal input/output direction is
independent from the TX or RX bit clocks directions (TCR2[BCD] and
RCR2[BCD]). Introduces mclk-output property.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
I just happened to try to run this testsuite manually today and
noticed that it was being skipped due to a copy-paste error.
This test was migrated from tests/posix/common, where tests
were skipped for non-dynamic threads, since it would mostly
duplicate tests that had already been run.
However, while migrating, the condition to skip tests was
mistakenly left in when it should not have been.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
timer_create() will error if there are no dynamic threads to
run the SIGEV_THREAD handler, causing the test to fail (where
it was previously expected to pass).
Ensure that there is at least 1 dynamic thread available to
the POSIX API.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add return value to z_add_timeout. It returns system tick when timeout
will expire.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The ADC and watchdog samples are not currently supported for the
non secure target of the nRF54L10 DK.
Add exclusions for these until they are supported.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
As it is a common pattern for drivers performing writes (e.g: write
reg-addr + write reg-data) without having to memcpy both into a buffer.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Add test cases where spi_transceive gets NULL spi_buf_set
once for tx and once for rx.
Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
Remove the dependency on the system heap existing when enabling
`ZBUS_RUNTIME_OBSERVERS`. Instead the previously allocated memory is
required to be provided to `zbus_chan_add_obs` (which can still be
allocated through malloc).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Update `bt_irk_eq` to use `util_memeq` instead of `memcmp` and the
"disconnect" BabbleSim test to use `util_eq` instead of a first
assertion on the size followed by a `memcmp`.
This is done as an example usage of the two new functions.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
This adds the best HD=4 CRC32 polynomial. The discovery
is the result of research by Philip Koopman of Carnegie
Mellon University, and is well documented at
https://users.ece.cmu.edu/~koopman/crc/.
The user is given the option of trading 1024B of RAM to
improve the execution speed. The unit tests are parameterized
with this KConfig option.
Signed-off-by: JP Hutchins <jp@intercreate.io>
Previously, these tests were part of tests/posix/common.
In an effort to tie feature tests to specific POSIX features
(Option Groups), these tests were moved to a separate suite in a
previous commit.
However, the memory requirements for the legacy
tests/posix/common testsuite were significantly higher while the
memory requirements for tests in tests/posix/c_lib_ext are
significantly lower.
Remove the minimum flash and ram requirements to run the test so
that it passes tests on the integration platform qemu_cortex_m0.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add simple helper macro so users can define a CCCD with a write cb
without having to combine BT_GATT_CCC_MANAGED() and
BT_GATT_CCC_INITIALIZER() themselves.
Unlike the changed callback the write callback has a return value
that can be used to reject the write request.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
The tmp116 sensor driver also supports tmp117 and tmp119. Therefore rename
to indicate that is supports a range of tmp devices.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
The osFlagsWaitAny option is not handled correctly. It returns once any
flag at all is set, whereas it is supposed to only return once one of
the flags specified in flags is set.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
Support parsing and serializing of struct fields that are defined as a
char array.
Use the token JSON_TOK_STRING_BUF to parse and serialize a string for a
char array, for example:
struct foo {
const char *str;
char str_buf[30];
};
struct json_obj_descr foo_descr[] = {
JSON_OBJ_DESCR_PRIM(struct foo, str, JSON_TOK_STRING),
JSON_OBJ_DESCR_PRIM(struct foo, str_buf, JSON_TOK_STRING_BUF),
};
The struct 'json_obj_descr' now has an additional union member 'field'
to store the size of the struct field, which is used with the token
'JSON_TOK_STRING_BUF' to determine the element size.
Fixes: #65200
Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
Create a driver implementation for the battery charge controller
TI BQ25713.
It includes the ability to enable / disable the controller and also
to setup max current and voltage charge parameters at initialization
time but also at run time.
On the other hand, it is possible to assign / obtain input voltage
and current regulation.
Signed-off-by: Kiara Navarro <knavarro@paltatech.com>
Validate that a received LL_CIS_REQ is valid and reject if it is not
Fixes EBQ test failure in LL/CIS/PER/BI-07-C
Signed-off-by: Troels Nilsson <trnn@demant.com>
Update the JSON test cases to explicitly cast NAN and INFINITY to double
type to avoid implicit promotion.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add overlays required to run the test on:
- nrf54l09pdk/nrf54l09/cpuflpr,
- nrf54l20pdk/nrf54l20/cpuflpr.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Enable nrf_grtc_timer test on:
- nrf54l09pdk/nrf54l09/cpuflpr and
- nrf54l20pdk/nrf54l20/cpuflpr.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Add overlay required to run gpio_basic_api test on
- nrf54l09pdk/nrf54l09/cpuflpr and
- nrf54l20pdk/nrf54l20/cpuflpr.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Allow compiler optimizations to remove High-Speed handling code. Knowing
that maximum operating speed is Full-Speed allows to reduce bulk buffers
from 512 to 64 bytes. More RAM optimizations are possible but this
commit only gets the low hanging fruits.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Switching the intermediate file format from JSON to YAML has a very
significant benefit: the file is now loaded via yaml_load(), which
internally calls Python to parse the file into the JSON format that
CMake expects. This means that the file contents are now automatically
escaped properly for JSON; it is a huge improvement over the previous
implementation, which was escaping everything given as input to
to_yaml().
With the removal of the now-redundant call in to_yaml(), escaping is
applied exactly once per value or list, when it is passed to yaml_set().
This allows to convert the logic in zephyr_string(ESCAPE ...) to a more
robust "escape everything" approach.
These changes fix the handling of strings with backslashes and different
types of quotes passed either directly or via generator expression. The
existing tests are updated to cover these cases.
Two other small changes are made in this commit:
- a small check in internal_yaml_list_append() is removed, as the same
issue is already detected by the caller yaml_set() logic.
- the to_yaml() function is modified to initialize the YAML output
variable at the top level, which is the expected behavior. This
resulted in genex temp files sometimes having duplicate lines.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Store strings in YAML as single-quoted entries to avoid issues with
special characters. This also fixes a quirk with the current test
suite where the quotes in the expected value are filtered out by the
YAML import.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Up to now, the handling of type float was offloaded to the users of the
JSON utility, with the token JSON_TOK_FLOAT.
Improve handling of floating point types and support the types 'float'
and 'double' in a built-in way so that they can be directly parsed to
and serialized from variables (of type float or double).
The types are serialized in the shortest representation, either as a
decimal number or in scientific notation:
* float (with JSON_TOK_FLOAT_FP): encoded with maximal 9 digits
* double (with JSON_TOK_DOUBLE_FP): encoded with maximal 16 digits
* NaN, Infinity, -Infinity: encoded and decoded as:
{"nan_val":NaN,"inf_pos":Infinity,"inf_neg":-Infinity}
Enable the floating point functionality with the Kconfig option:
JSON_LIBRARY_FP_SUPPORT=y
It requires a libc implementation with support for floating point
functions: strtof(), strtod(), isnan() and isinf().
Fixes: #59412
Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
Loopback test requires this in order to properly execute half
transactions. Otherwise, testsuite fails.
It was overlooked when fixing #85894.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Both EXMIF and SPIS peripherals are claiming GPIO port 6 pin 0, but
with different CTRLSEL values. This will trigger a build error with
nrf-regtool 9.0.0 as it is not possible to apply this configuration
to hardware.
Fix the issue by disabling the EXMIF node that is enabled by default.
Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
Renamed the drv8424 stepper driver to indicate its support of the drv8424,
drv8425, drv8426, drv8434 and drv8436 stepper controllors. Also made the
microstep pins optional. All test files are renamed as well.
Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>