Commit graph

85510 commits

Author SHA1 Message Date
Emil Gydesen 37b6ddd918 Bluetooth: BAP: Broadcast Sink only set synced BIS indexes
When updating the Scan Delegator receive state, we shall only
set the BIS indexes in bis_sync that we are actually synced to.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-12 09:33:55 +03:00
Grzegorz Swiderski 5cf5282e60 cmake: extensions: Check status of "zephyr,memory-region" DT nodes
Functions `zephyr_linker_dts_memory()` and `zephyr_linker_dts_section()`
are described as defining a memory region or section based on a DT node,
as long as it "exists and has status okay". However, only the existence
of the node is actually checked, using `dt_node_exists()`. To fix that,
employ `dt_node_has_status()` instead, which can check both conditions.

The status check is important, because both functions require the given
DT node to contain a `zephyr,memory-region` property (not to be confused
with the compatible string). This property is required by the associated
binding as well, but required properties can be omitted from nodes which
don't have status "okay". In those cases, edtlib won't raise an error,
and neither should CMake, because those nodes should be ignored.

Speaking of that property, add a missing error check for it as a bonus
(tucked behind the status check, of course).

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-10-11 22:36:13 +03:00
Grzegorz Swiderski de85a208a0 cmake: extensions: Robustify dt_node_has_status
Calling this function with an output variable named `var` or `okay`
could produce an incorrect result, due to the variable being mishandled.
Add simple changes to avoid this.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-10-11 22:36:13 +03:00
Rodrigo Peixoto 28eb47922e doc: zbus: add entries to the migration guide
ZBus had one break change related to the runtime observers'
configuration, and the VDED delivery sequence has changed. This commit
adds entries on the migration guide about the mentioned changes.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-10-11 22:33:40 +03:00
Rodrigo Peixoto d2001eeb96 doc: zbus: update documentation with changes for 3.5
Add documentation for the new way to storage observers, the message
subscribers, and the confirmed message sample.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-10-11 22:33:40 +03:00
Martí Bolívar 9ceb8ce10a doc: west: build: fix info on --pristine default
In commit commit c19c6fb438
("Revert "scripts: west build: default build.pristine to auto""),
we set the default --pristine value back to 'never', but the
documentation never got updated. Fix it.

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2023-10-11 09:47:23 -07:00
Bjarki Arge Andreasen 0339f2d41f modem: modem_cellular: Adjust chat scripts
This commit adjust the chat scripts for the simcom
sim7080 and gsm_ppp compatibles to fix an issue found
when trying to use a sim7080 modem. The CMUX command
includes optional parameters which are not identical
for all modems, so the AT+CMUX command has been adjusted
to only contain the mandatory parameters.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-10-11 18:57:11 +03:00
Bjarki Arge Andreasen 517bec233e modem: modem_cmux: Increase modem cmux buf size
This commit increases the buffer used for commands
in the control channel within an instance of the
modem_cmux module. The buffer was not large enough to
store an MSC command if the optional break signals
where included. This commit fixes the issue and
updates the test suite to use the max size MSC message.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-10-11 18:57:11 +03:00
Kevin Townsend 905b7dbf3b doc: releases: Rename Arm to Arc
Fixes a typo in the release notes where two 'Arm' entries were
present, and the first should have been 'Arc'.

Signed-off-by: Kevin Townsend <kevin.townsend@analog.com>
2023-10-11 18:44:09 +03:00
Manuel Argüelles 402e1da58d tests: gpio_basic_api: add WKPU interrupts test for mr_canhubk3
Use the same pins as when testing with SIUL2 EIRQ interrupt
controller, but instead test routing the external interrupts
to WKPU controller.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Manuel Argüelles 8a4ec8e024 tests: gpio_basic_api: use GPIO flags from DT
When configuring in/out pins for callback tests, pass the GPIO flags
coming from the in/out-gpios respective nodes.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Manuel Argüelles f95c10d548 mr_canhubk3: document WKPU interrupt controller support
Enhance the documentation by providing an explanation of WKPU
interrupt controller support and how it integrates with GPIO.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Manuel Argüelles 7c661c625c nxp_s32k344: add external interrupts for WKPU
Define WKPU interrupt controller node and its respective interrupt
sources mapping to GPIO pins.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Manuel Argüelles a034cce23c gpio: nxp_s32: support passing external interrupts to WKPU
Extend the NXP S32 GPIO driver to be able to route external interrupts
to either SIUL2 EIRQ interrupt controller or, when available on the
SoC, WKPU interrupt controller.

Since WKPU can support up to 64 external interrupt sources and SIUL2
EIRQ up to 32, gpio_get_pending_int() is removed and the interrupt
controller specific API must be used instead.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Manuel Argüelles ea08227dd0 gpio: nxp_s32: prepare to support multiple interrupt controllers
Refactor external interrupts infrastructure to prepare supporting
multiple interrupt controllers.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Manuel Argüelles c8a5cf6728 intc: add NXP S32 WKPU interrupt controller driver
Introduce an interrupt controller for the NXP S32 WKPU peripheral
that can be integrated with GPIO to trigger interrupts through
external interrupt pad inputs.

WKPU can trigger interrupts from certain input pads that support this
function, as well as wake-up events to the power management domain. This
patch only adds WKPU functionality as an interrupt controller to extend
the number of input pads that can interrupt the core. Power management
functionalities are not supported.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Andries Kruithof 125e65a976 samples: Bluetooth: remove dup pointer in broadcast_audio_sink
In the broadcast_audio_sink sample there are two pointers defined,
both referencing the same address. We reduce this to one pointer

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-10-11 18:29:34 +03:00
Gerard Marull-Paretas 7772cec6bd edtlib: always insert root node to the graph
When we have an empty Devicetree, ie,

```
/dts-v1/;

/ {

};
```

The node's dep_ordinal is never initialized because the node graph is
empty. This ends up with invalid ordinal tokens (-1) in
devicetree_generated.h which in turn produce some cryptic compiler
errors, see e.g.

```
error: pasting "dts_ord_" and "-" does not give a valid preprocessing
token
   95 | #define Z_DEVICE_DT_DEV_ID(node_id) _CONCAT(dts_ord_,
      DT_DEP_ORD(node_id))

...

include/zephyr/devicetree.h:2498:41:
note: in expansion of macro 'DT_FOREACH_OKAY_HELPER'
 2498 | #define DT_FOREACH_STATUS_OKAY_NODE(fn)
      DT_FOREACH_OKAY_HELPER(fn)
            |
	    ^~~~~~~~~~~~~~~~~~~~~~
include/zephyr/device.h:1022:1:
note: in expansion of macro 'DT_FOREACH_STATUS_OKAY_NODE'
     1022 |
	  DT_FOREACH_STATUS_OKAY_NODE(Z_MAYBE_DEVICE_DECLARE_INTERNAL)

```

(devicetree_generated.h)

```
...
 #define DT_N_ORD -1
 #define DT_N_ORD_STR_SORTABLE 000-1
...
```

This patch makes sure root node is always inserted (without any target)
so that it gets initialized later.

Discovered as part of
https://github.com/zephyrproject-rtos/zephyr/pull/63696

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-10-11 18:28:01 +03:00
Grzegorz Swiderski ce1b8d6d16 scripts: kconfig: Make DEPRECATED/EXPERIMENTAL symbols optional
Make `kconfig.py` not crash when any one of these settings is undefined:

  * DEPRECATED
  * EXPERIMENTAL
  * WARN_DEPRECATED
  * WARN_EXPERIMENTAL

While these will continue to exist in Zephyr, they shouldn't be strictly
required for the script to work. One situation in which they could go
missing is when a user creates an application-specific Kconfig root, but
forgets to source "Kconfig.zephyr" inside it - not that this is expected
to work anyway, but it could at least raise a more intelligible error.

Note that when WARN_DEPRECATED is undefined, selecting DEPRECATED will
always produce warnings. Same with WARN_EXPERIMENTAL and EXPERIMENTAL.
This matches the fact that the WARN_* symbols normally have `default y`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-10-11 18:25:57 +03:00
Grzegorz Swiderski 45c369f419 sysbuild: Support SB_CONF_FILE and SB_EXTRA_CONF_FILE as lists
These variables need to be converted to absolute paths internally, but
so far this has only worked when each value consisted of a single path.
Add a common loop to handle lists of paths.

As a bonus, run `string(CONFIGURE)` to expand those variables in the
same way as the regular CONF_FILE and EXTRA_CONF_FILE.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-10-11 18:25:05 +03:00
Benjamin Cabé 3ee0f305b0 dts: bindings: fix typo in iSentek spelling
Fixed a typo in the spelling of the sensor's manufacturer.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-11 15:45:59 +01:00
Cyril Fougeray 49126e2aa9 sensors: vl53l1: fix compilation without xshut or interrupt pin
Fix compilation when CONFIG_VL53L1X_INTERRUPT_MODE=n or
CONFIG_VL53L1X_XSHUT=n

Signed-off-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
2023-10-11 14:58:15 +01:00
Cyril Fougeray 1d0f28737b sensors: vl53l1: build_all without the default Kconfig
in case CONFIG_VL53L1X_INTERRUPT_MODE=n or
CONFIG_VL53L1X_XSHUT=n, the driver won't compile

Signed-off-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
2023-10-11 14:58:15 +01:00
Tomasz Moń 6b8b49c64a drivers: i2s_nrfx: Fix write race condition
There is inherent race condition between i2s_nrfx_write() and I2S
interrupt handler because I2S operates independently from the rest
of the system. If software takes too long to supply next TX pointer
then nRF I2S peripheral will simply resupply the previous buffer.

The race window is rather short. The failed race executes as follows:
  1. i2s_nrfx_write() checks state and loads next_tx_buffer_needed
  2. I2S interrupt handler executes and calls data_handler() which
     notices empty TX queue and therefore sets next_tx_buffer_needed
  3. i2s_nrfx_write() continues with the queue TX path (because the
     next_tx_buffer_needed was false when it was accessed)

If next i2s_nrfx_write() executes before next I2S interrupt:
  4a. i2s_nrfx_write() notices next_tx_buffer_needed is true and
      supplies the buffer directly to I2S peripheral. Previously queued
      buffer will remain in the queue until the just supplied buffer
      starts transmitting. Effectively swapping whole I2S block leads to
      clearly audible artifacts under normal circumstances.

If next I2S interrupt executes before next i2s_nrfx_write():
  4b. data_handler() notices that buffer was reused and stops despite
      having a buffer available in TX queue

Modify i2s_nrfx_write() to always queue the TX pointer first and only
supply the buffer to nrfx if the queue was empty when interrupt handler
executed. This prevents both the out-of-order TX and premature stop.

Fixes: #63730

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-10-11 15:36:15 +02:00
Torsten Rasmussen 8f7180bece cmake: remove clang++ lookup in clang/generic.cmake
Fixes: #63771

The 'compiler/*/generic.cmake' is intended to set a C preprocessor which
can be used for devicetree preprocessing.

No C++ compiler is needed as host tool and should therefore not be set
in this file.

Remove the code to avoid setting a not required C++ compiler.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-10-11 15:35:49 +02:00
Anas Nashif 8c6a3dbe37 tests: mcuboot: fix identifier: boot -> bootloader
Be consistent with other tests using bootloader.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif b1ee8b248a tests: logging: group logging testing and cleanup identifiers
Better group for logging tests removing verbosity and redundancy in
identifiers and making the sub-component a bit more uniform and clear.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif a2ed99687b tests: group all build system tests under build_system
Consistent naming of components related to build system.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif 4dabea6f67 tests: settings: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif 276a0e02c6 tests: mcumgr: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif 2144d6f5e6 tests: bluetooth: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif f7456cb7cd tests: spsc_pbuf/ringbuffer: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif 3a81c76b3a tests: fdtable: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif 1164e33e0f tests: mpsc: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif 38a480c20e tests: cbprintf: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif b2af50a836 tests: object cores: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif c9a2e0f0e8 tests: fcb: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif 47983916a2 tests: nvs: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif 36dde2c2ef tests: fs: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif 4373f250bf tests: uart: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif d5bac8c9a2 tests: clock: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif b0b8f2ff80 tests: sensors: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Anas Nashif dd743c97a4 tests: drivers: fix test meta data and components
Fix meta data and standarize components in test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 14:19:40 +03:00
Filip Kokosinski 739bbbb153 doc/releases/release-notes-3.5: add RISC-V release notes
This commit adds RISC-V release notes for Zephyr v3.5.0.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-10-11 14:13:15 +03:00
Pavel Vasilyev 2c9fc043d7 Bluetooth: Mesh: Print URI and FWID in Upload OOB Start msg
this is useful for debugging.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-10-11 14:04:11 +03:00
Pavel Vasilyev 1c1c5e22b7 tests: bluetooth: tester: Add Upload OOB support for mesh tester
This allow to run the following PTS test:
- DFU/SR/FD/BV-06-C
- DFU/SR/FD/BV-13-C
- DFU/SR/FD/BV-14-C
- DFU/SR/FD/BV-15-C
- DFU/SR/FD/BV-16-C
- DFU/SR/FD/BV-17-C
- DFU/SR/FD/BV-18-C
- DFU/SR/FD/BV-22-C

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-10-11 14:04:11 +03:00
Pavel Vasilyev d1c2ca2525 Bluetooth: Mesh: Release previously reserved slot before reserving again
If the previous upload was in-band and it didn't complete, the slot will
stay reserved. By design we release slot not at the end of the upload
phase, but at the start of a new upload phase.

This fixes DFU/SR/FD/BV-13-C.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-10-11 14:04:11 +03:00
Pavel Vasilyev 7154f356af Bluetooth: Mesh: Ignore duplicate OOB upload request
If a Fw Distribution Client sends the Upload OOB Start message, but the
application layer didn't call bt_mesh_dfd_srv_oob_check_complete yet,
we have no other option other than ignore the message. The next phase
in this case could be Transfer Active, Transfer Success or Failed and it
will be set only after Check Firmware OOB procedure completes.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-10-11 14:04:11 +03:00
Pavel Vasilyev 1329a9d312 Bluetooth: Mesh: Fix Fw Dist Upload OOB Start msg length check
This message _at least_ 2 bytes long, but can be longer, thus
BT_MESH_LEN_MIN should be used.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-10-11 14:04:11 +03:00
Pavel Vasilyev 9641864a20 Bluetooth: Mesh: Fix Upload Progress for already received fw
In OOB upload, when Check Firmware OOB procedure completes successfully
and the firmware is already received, we send Firmware Distribution
Upload Status message with update Phase set to Transfer Success. In this
case, we must set Upload Progress to 100%. This can't be done through
the callback as the application layer doesn't yet know that the firmware
is already received. This will happen by the exist from
bt_mesh_dfd_srv_oob_check_complete function, which will return error
code -EEXIST.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-10-11 14:04:11 +03:00