Commit graph

22128 commits

Author SHA1 Message Date
Koen Van Herck
6ccd228d62 subsys/tracing: do not select (RTT_)CONSOLE in SEGGER_SYSTEMVIEW
Tracing using Segger's SystemView works fine without enabling RTT_CONSOLE
(or CONSOLE, in general).
SEGGER_SYSTEMVIEW was automatically selecting RTT_CONSOLE, which prevents
applications from using another console backend (e.g. UART_CONSOLE).

Signed-off-by: Koen Van Herck <koen.v.herck@gmail.com>
2025-06-24 20:04:07 -10:00
Marc Lasch
86dbcd2cf2 net: lwm2m: Make Bootstrap on Registration Failure configurable
The fallback to Bootstrap on a Registration Failure might not be desirable
for some applications. This change makes the default behavior configure
through Kconfig.

An alternative to configure "Bootstrap on Registration Failure" would be to
set the server object resource id 16 at runtime. However, this is tedious
and error-prone, as it will be reset when the server object is deleted and
might have to be set at different locations in the client code.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
2025-06-24 15:38:27 -05:00
Marc Lasch
4c46b0bc8b net: lwm2m: Fix typo in bootstrap_on_fail
Bootstrap vs. Boostrap.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
2025-06-24 15:38:27 -05:00
Vinayak Kariappa Chettimada
fe348bce8e Bluetooth: Controller: Fixup ticker reschedule with drift
If the next ticker is too close then hop over it when
rescheduling a ticker with drift in slot window is used.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-06-24 15:35:51 -05:00
Emil Gydesen
4adabb49da Bluetooth: BAP: Use IN_RANGE in bt_bap_base_get_base_from_ad
This simplyfies the checks in the function a bit, and makes
Sonarcloud happy.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-24 15:34:17 -05:00
Emil Gydesen
c8ac20f2b2 Bluetooth: Audio: Add missing default case for bt_audio_dir_str
The switch was missing a default case as per the coding
guidelines.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-24 15:34:01 -05:00
Emil Gydesen
ae6b33be07 Bluetooth: CSIP: Remove excess + at start of link for test_k
Removed the excess +.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-24 15:33:41 -05:00
Chris Friedt
03db50b79d net: remove dependency on posix for iso c time() function
The ISO C function time() should not depend on POSIX and this was
corrected recently via the common libc time() implementation.

Remove this dependency from the network subsystem where it has
been unduly needed for some time.

Similarly, XSI_SINGLE_PROCESS was a dependency for time() via
picolibc, because the time() implementation in picolibc relies
on the POSIX gettimeofday() call.

However, since Zephyr's common libc time() implementation no longer
depends on that, it can be removed as a dependency in the network
subsystem as well.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
7868b4d54d logging: use sys_clock_gettime()
Use the newly added sys_clock_gettime() to avoid the unnecessary
dependency on POSIX APIs.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Bjarki Arge Andreasen
ce95b7033c pm: device_runtime: fix unbalanced domain get/put
pm_device_runtime has inconsistent behavior regarding
getting and putting a device's domain. This commit
aligns it to get the domain only once, once device
is resumed, and put only once, once device is
suspended.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-24 09:14:20 +02:00
Benjamin Cabé
13ec1ea3dd Bluetooth: controller: update non-inclusive language
use "Accept List" terminology instead of white list

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-23 16:31:16 -05:00
Benjamin Cabé
6a893fb91b settings: zms: add missing error check
Add a missing assignment of the return value of zms_write() to rc
variable so that potential error is actually checked and returned.

Fixes CID 524778
Fixes zephyrproject-rtos/zephyr#90474

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-23 12:49:07 -07:00
Johan Hedberg
58fe2ab5e6 Bluetooth: Mesh: shell: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
3056d0773e Bluetooth: Host: shell: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
896212933a Bluetooth: Host: scan: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
e9f06126ea Bluetooth: Host: iso: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
354e75d479 Bluetooth: Host: id: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
6f2643638d Bluetooth: Host: direction: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
e23d5a0801 Bluetooth: Host: cs: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
0d47556542 Bluetooth: Host: conn: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
fa0aece2fa Bluetooth: Host: Classic: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
47fa056fb6 Bluetooth: Host: adv: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
2ea9605380 Bluetooth: Host: core: Use bt_hci_cmd_alloc()
Use bt_hci_cmd_alloc() instead of the soon to be deprecated
bt_hci_cmd_create().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
6c61c8c428 Bluetooth: Host: CS: Fix test HCI command encoding
The command buffer was incorrectly encoded due to the recent change to H:4
encoding. Instead of fixing the header offset, just use the newly
introduced bt_hci_cmd_alloc() API, since that takes care of correctly
encoding the command header when it gets sent.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Johan Hedberg
b530b261d9 Bluetooth: Host: Introduce bt_hci_cmd_alloc()
Introduce a new bt_hci_cmd_alloc() API which only allocates a command
buffer and reserves sufficient headroom for H:4 and command headers, but
doesn't actually encode any of those headers into the buffer. Additionally,
modify bt_hci_cmd_send() and bt_hci_cmd_send_sync() so that they handle
such buffers and perform the header encoding correctly. To avoid
duplication, bt_hci_cmd_send_sync() now builds upon (i.e. calls internally)
the bt_hci_cmd_send() API.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-06-23 12:44:53 -07:00
Guennadi Liakhovetski
29f66ab823 gdb: fix building without UART support
GDB can now also be built without UART support, e.g. on Xtensa it can
use a memory window backend. Update the Kconfig dependency to avoid
build failures.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-23 12:32:44 -07:00
Noah Klayman
5882f01b51 gdbstub: make immediate GDB stub entry optional
Add a Kconfig option to be able to postpone entering the GDB stub
until an external trigger.

Signed-off-by: Noah Klayman <noah.klayman@intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-23 12:32:44 -07:00
Guennadi Liakhovetski
cae5e5adc6 soc: intel_adsp: gather debug window indices in one place
All debug window slot indices should be defined in
adsp_debug_window.h, move them there and use them consistently.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-23 12:32:44 -07:00
Vinayak Kariappa Chettimada
ebc023b0ce Bluetooth: Controller: Fix incorrect aux offset using single timer
Fix incorrect aux offset value in the aux pointer in the
primary advertising channel PDUs when using single timer
tIFS switching feature in nRF54Lx.

End time was not captured when only Tx follow by Tx happens
in the primary advertising channels. End time needs to be
always captured when using single timer so that elapsed
packet timer value is correctly accumulated, for use to
setup subsequent radio transmission or reception inside the
same radio event.

Relates to commit 373dc0db71 ("Bluetooth: Controller:
Single timer use Extended Advertising nRF54L support").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-06-23 12:32:00 -07:00
Vinayak Kariappa Chettimada
301ad16406 Bluetooth: Controller: Do not clear timer clear subscription until done
Do not clear timer clear subscription until the radio event
is done. This is required for single timer switching when
periodic chains are to be received by LLL scheduling. Each
PDU in the train requires the timer to be cleared when the
parent PDU has been received such that reception of
auxiliary PDU's radio_tmr_start_us() can use the relative
offset since last PDU reception.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-06-23 12:32:00 -07:00
Vinayak Kariappa Chettimada
964f751fdd Bluetooth: Controller: Use defines for TRX and IFS Radio End Events
Use defines for Transmit/Receive and Inter-frame spacing
related Radio End events. This will ease some spaghetti of
conditional compilations for single timer and direction
finding support.

Direction Finding is not yet supported when using single
timer software tIFS switching.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-06-23 12:32:00 -07:00
Vinayak Kariappa Chettimada
fa1119f9c1 Bluetooth: Controller: Fixup align DDPI usage with nRF54L power domains
Fixup commit 031a17c271 ("Bluetooth: Controller: Align
DDPI usage with nRF54L power domains").

Align DDPI usage with nRF54L series power domains and
available DDPI configurations.

Use indices below 4 when needing to bridge with GPIO,
use indices below 8 when needing to bridge with MCU domain
like CCM and AAR; and use indices above 7 to bridge with
Peripheral domain.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-06-23 12:32:00 -07:00
Vinayak Kariappa Chettimada
ae59e6cfe7 Bluetooth: Controller: Redundant TIMER_CLEAR_PPI disable
HAL_SW_SWITCH_TIMER_CLEAR_PPI is same as
HAL_SW_SWITCH_GROUP_TASK_ENABLE_PPI, hence the single PPI
suffice being disabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-06-23 12:32:00 -07:00
Nick Ward
ab99a53ae7 net: lwm2m: ipso: accelerometer: remove buffers for optional resources
Allows application code to control allocation of buffers of optional
resources.

Y value, Z value, min range value, max range value resources are
optional.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2025-06-23 15:46:18 +01:00
Johann Fischer
7b287ec133 drivers: udc: disable SOF interrupt by default
If the new Kconfig option is disabled, no SOF events are passed to the
higher layer.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-23 15:43:32 +01:00
Yusuke Omae
d9d6f07c27 net: gptp: Add TLV type, OUI check for signaling messages
Add validation to ensure gPTP signaling messages
contain the correct TLV type, IEEE 802.1 Committee OUI
and sub-type before processing it as interval requests.

signed-off-by: Yusuke Omae <s1413091@gmail.com>
2025-06-23 09:47:03 +02:00
Benjamin Cabé
92d4669752 net: lib: http: remove offensive language
Remove use of offensive language in code comment

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-22 18:45:42 -07:00
Benjamin Cabé
e92468c7a6 llext: adopt SHELL_HELP macro
adopt structured help message in llext shell

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-21 18:34:08 +02:00
Anas Nashif
bd8597c9d7 x86: rename DEBUG_INFO to X86_DEBUG_INFO
This is an X86 specific option and should not appear as generic debug
option.

Fixes zephyrproject-rtos/zephyr#52929

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-20 14:43:42 -05:00
Benjamin Cabé
3b60dec110 bindesc: fix typo in errno (ENONET->ENOENT)
Fix typo in errno which isn't caught when building since ENONET
is also a valid code, despite not being defined (nor allowed?)
in Zephyr proper.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-20 13:21:39 -04:00
Johann Fischer
09752374c5 usb: device_next: rework CDC ACM serial for flash usage
Allow optimization if high speed is not supported. Unify strings for
error logging. Allow the application to enable/disable the USB device.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-20 16:23:34 +02:00
Johann Fischer
635a006da7 usb: device_next: bt_hci: drop high-speed descriptors table if not used
If high-speed is not supported, drop the high-speed descriptors table.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 22:36:51 -07:00
Johann Fischer
d2e42c99ac usb: device_next: bt_hci: do not take semaphore if transfer enqueue fail
Do not take semaphore if transfer enqueue fails.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 22:36:51 -07:00
Johann Fischer
96422f262e usb: device: fix Bluetooth buffer handling
In both implementation, when comparing received data length take into
account that the buffer obtained from bt_buf_get_tx() stores the type at
the top. The buffer types are H:4 and in the TX path we need to check for
BT_HCI_H4_* types not BT_BUF_*.

In the legacy implementation, the hci_acl_pkt_len() function obtains the
length from the USB transaction buffer, which does not contain a buffer
type at the top.

In the new implementation, partially revert the changes and restore
hci_pkt_get_len(), this will be required for any further changes anyway.

Fixes commit f85d63a6cc ("Bluetooth: Remove USB H4 mode support").

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 22:36:51 -07:00
Johann Fischer
76579d21ab usb: device_next: allow to limit number or digits in serial number
Add Kconfig option to limit the length requested from HWINFO to a
meaningful number of digits. Also, check the length returned by the
HWINFO driver and rename the variables to a more suitable name.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 14:04:31 +02:00
Johann Fischer
452a53ba1a usb: device_next: hide Kconfig option USBD_MSG_SLAB_COUNT if not used
If deferred mode is not being used, hide the USBD_MSG_SLAB_COUNT option.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-19 14:04:31 +02:00
Luca Burelli
741c5b5a98 llext: rework debug code in llext_link
This removes 'return' statements affecting code flow from debug code in
llext_link(). Also, all valid relocations are tried before returning an
error, so that the user can see all the errors (most likely missing
symbols) at once.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-06-19 14:00:11 +02:00
Jamie McCrae
0adcf2e66d mgmt: mcumgr: grp: os_mgmt: Add optional boot mode for reset
Adds an optional boot mode field which can be used to boot into a
specific image or mode using MCUmgr's OS mgmt reset command

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-18 17:48:44 -04:00
Anas Nashif
d20a52c4aa ztest: add missing break statement in ztest_test_pass function
Adds missing break in switch statement.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-18 17:48:03 -04:00
Jukka Rissanen
9a0e9be8c3 net: shell: dns: Add service discovery command
Add "net dns service <dns-service-name>" which can resolve
service names like "_http._tcp.dns-sd.org" described in DNS-SD
RFC 6763.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-18 09:08:41 -04:00