Fixes#53650
The existing solution for image ordering involves the `IMAGES` variable,
which sysbuild originally provided to let users manually add a new image
in a desired order. This isn't very flexible for the following reasons:
* The order in which `IMAGES` is updated across multiple modules and
`sysbuild.cmake` files is not well defined.
* Having a single variable means that the same order is used for both
configuration and flashing. Usually, there is no reason for the
flashing order to be the same as the configuration order.
Introduce the `sysbuild_add_dependencies()` function for more fine-tuned
ordering of images. It makes one image depend on other images in either
configuration or flashing order. Its usage is similar to the standard
CMake function `add_dependencies()`, but with an extra parameter to
distinguish between two types of dependencies:
sysbuild_add_dependencies(CONFIGURE my_sample sample_a sample_b)
sysbuild_add_dependencies(FLASH my_sample sample_c sample_d)
CONFIGURE dependencies determine the order in which sysbuild configures
(runs CMake for) the individual images. This is useful if there is some
information from one application's build which needs to be available to
another application.
FLASH dependencies control the sequence of images used by `west flash`.
This could be used if a specific flashing order is required by an SoC,
a runner, or something else. Note that these dependencies are not valid
for images specified as `BUILD_ONLY`.
The internal `sysbuild_images_order()` function is responsible for
assembling two sorted lists of images based on the added dependencies,
with the help of `topological_sort()`.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This function performs topological sorting of CMake targets. Its initial
use case in Zephyr will be for implementing sysbuild image dependencies,
i.e., specifying an image order for CMake configuration and flashing.
Sourced from a comment on PR #57884 (anchor: #discussion_r1206807021)
Authored-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
All generic drivers, ie, emulators/SPI/I2C based devices, were defined
in app.overlay, meaning the overlay is picked by all builds. However,
what was defined in app.overlay was only used by the native_posix build.
This will save some CI time, as generic drivers were being built more
than strictly necessary.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
`CONFIG_BT_L2CAP_TX_MTU` drives the maximum supported MTU on a Bluetooth
connection, but the SPI backend also imposes its own hidden limits.
Display a warning if a value is chosen that can result in failures to
send. This is done here instead of as a range on `BT_L2CAP_TX_MTU` as
ranges on that symbol are already defined in terms of software features,
which would conflict with this check.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This should increase the coverage of the testsuite.py module
up to 100%.
Some tests have been commented out, as the code tested there is
incorrect. Thus the real increase is 99%.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes bt_audio_codec_cfg_get_chan_allocation_val return value that
shall be 0 in case of success.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This fixes data pointer that was never set because wrong pointer
assignment.
It's regression introduced in:
b4af917ad0
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Change boards and shields and remove kscan nodes in favor of the
"zephyr,lvgl-pointer-input" compatible.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
After adding the lvgl pointer device into the board dts the custom overlays
are not needed anymore.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Change boards and shields which enable the LV_Z_POINTER_KSCAN symbol to use
the new "zephyr,lvgl-pointer-input" compatible instead.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
The eswifi spi driver sets up spi buffer length as number of frames,
but the length shall be number of bytes. Because eswifi use 16 bit as
frame size, so this turns out reading and writing half of data and
fails to sending any at command request and getting any responds from
eswifi module.
Fix it by setting up length as number of bytes.
Fixes#62056
Signed-off-by: Chien Hung Lin <chienhung.lin.tw@gmail.com>
Zephyr already have support for a couple of sensors on the board:
- Silicon Labs Si7210 hall effect sensor
- Silicon Labs Si7021 relative humidity & temperature sensor
- Vishay VEML6035 ambient light sensor
Add support for those in device tree.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Use NRF_CCM HEADERMASK register to use correct Additional
Authentication Data (AAD) from ISO PDU header.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix a shadow variable build error:
dmic_nhlt.c: In function 'dai_dmic_write_coeff':
dmic_nhlt.c:57:78: error: declaration of 'base' shadows a global
declaration [-Werror=shadow]
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Created set of new functions for configure fir coefficients with support
for packed format. This allowed to make the dai_dmic_set_config_nhlt
function simpler.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Added reading of a necessary register values in
dai_nhlt_dmic_dai_params_get function to simplify its parameter list. The
code that calculates dai_params has been moved to it to simplify the
dai_dmic_set_config_nhlt function.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
More verbose variable pdm_idx was used instead of n. The series of
references to the array of pdm base addresses has been replaced with
a pdm_base variable.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
All fir filters have an identical set of registers so their definitions
were combined to simplify the code. From the dai_dmic_set_config_nhlt
function, a duplicate piece of code responsible for configuring fir was
separated into a new function.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Created dai_dmic_start_fifo_packers function corresponding to an already
existing dai_dmic_stop_fifo_packers.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The while loop in the code fragments waiting for a bit to be cleared has
been replaced with the WAIT_FOR macro call. Added a warning in the case of
timeout.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Added reading of a necessary register values in
dai_nhlt_dmic_dai_params_get function to simplify its parameter list. The
code that calculates dai_params has been moved to it to simplify the
dai_dmic_set_config_nhlt function.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
All PDM controllers have the same set of registers. Their definitions have
been merged to simplify the code.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Moved code fragments responsible for logging and verification of the
configuration register values from the dai_dmic_set_config_nhlt function to
a separate functions. Behavior of the code verifying the correctness of
register values has been changed so that it only displays warnings.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Definitions of a configuration blob structures were separated from the main
drivers header file and moved to a dedicated file to improve code
readability. Removed unnecessary nhlt_pdm_fir_coeffs structure.
The nhlt_pdm_ctrl_cfg structure was extended with nhlt_pdm_ctrl_fir_cfg
and fir coefficients.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
With picolibc being the default C library, we need to explicitly include
testing against the minimal C library for kernel components.
Signed-off-by: Keith Packard <keithp@keithp.com>
The ISO-TP tests were disabled for native_posix in the past because of
timing issues.
The implementation test is working well with native_posix now and
should also be run in CI.
Signed-off-by: Martin Jäger <martin@libre.solar>
Let's also run the BabbleSim tests when either
the native simulator or the the include headers
are changed.
The include path was forgotten when creating the filter.
The nrf52_bsim was changed to use the native simulator
in 3a4bebacb1
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Added a BabbleSim test to check the update of the destination address
of all active connections during the identity resolution operation.
All connection objects associated with the same private peer address
should convert it to the identity address.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Fix an issue in the CCC configuration when the Peripheral device
maintains two or more distinct connections on different identities
with the same peer. The issue occurs when the local device performs
the pairing and the bonding procedure on a connection associated
with one of the Bluetooth identities. During the identity resolution,
the peer address field in the CCC descriptor is converted from the
RPA-type address to the Identity Address. However, the destination
address on the remaining connection objects associated with other
Bluetooth identities is not converted. Due to this, their CCC
configuration is reset and GATT indications and notification fail
to be sent even if the Central device subscribed to them.
Added necessary code to iterate over all connection objects during
the identity resolution phase and aligned their destination address
from the RPA-type to the Identity Address.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Fix timestamp calculation to use CIS reference anchor point
instead of incorrectly used CIG reference anchor point.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
NVS lookup cache currently uses CRC8/16 as a hash function
to determine the cache position, which is not ideal choice.
For example, when NVS lookup cache size is 512 and 256
subsequent NVS IDs are written (that is, 0, 1.., 255), this
results in 128 cache collisions.
It is better to use a dedicated integer hash function. This
PR uses one of the 16-bit integer hash functions discovered
with https://github.com/skeeto/hash-prospector project. The
hash function was additionally tested in the context of NVS
lookup cache using simple NVS ID allocation patterns as well
as using real device NVS dump.
Also, add a test case to verify that the hash function is
not extremely bad.
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
* In Zephyr: The HW models now include N interrupt controllers
The interrupt handling code needs to target one controller
specifically.
* Update the HW models module to
57b61a9a2da75c860f15ca79522b24d57992df2c
Including the following:
* 57b61a9 INT CNTRL: Generalize to N controllers
* 1ea8194 nrf_bsim_redef.h: Add first definitions for nrf5340
* 5f81ee9 irq_ctrl: Lower a bit HW event priority
* 0986acc RNG: Add nrf53 variant in model
* 09345da RNG: Generate level interrupts instead of pulse ones
* f9b7c7a DPPI: Add first version
* 62dabd3 HW models: Initial peripheral adaptation for multi-int_cntr
* f54b59d HW models: Adding initial nrf5340 structure
* fb1edd9 HW models: Use HW types definitions only where neded
* 2744f4c Add basic support for variants
* a5f79cd nrf_bsim_redef.h: Remove unnecessary redefinitions
* 2c781dd HW_models: Improve includes
* bdb0a08 minor: Remove non-ASCII characters from source
* b5e95bd RADIO: Corrected note about MAXLEN and CRCINC behaviour
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a new kconfig option to select which embedded
CPU we are targetting.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>