Commit graph

136,983 commits

Author SHA1 Message Date
TOKITA Hiroshi
061d376e4d sys: util: Update document comment
Update document comments for `GET_ARG_N` and `GET_ARGS_LESS_THAN`
to remark the value range.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2026-01-28 08:29:57 +01:00
TOKITA Hiroshi
722391f033 sys: util: Add GET_ARGS_FIRST_N to get the first N of the args
Gets the specified number of elements from the beginning of the list.
This is the symmetircal operation as `GET_ARGS_LESS_N`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2026-01-28 08:29:57 +01:00
Michael Zimmermann
7a218e5db5 net: mqtt_sn: udp: tp_udp_recvfrom: store error in errno variable
Returning negative values which are not -1, isn't what POSIX would do and
the API is specifically designed to behave like recvfrom.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-01-27 15:22:32 -06:00
Michael Zimmermann
d0a55b6805 net: mqtt_sn: udp: backup errno if it's used in logs
Otherwise, the log might overwrite it.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-01-27 15:22:32 -06:00
Michael Zimmermann
8e0a04950a net: mqtt_sn: udp: use ssize_t for return value of zsock_recvfrom
int is simply the wrong type.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-01-27 15:22:32 -06:00
Michael Zimmermann
20db4b2f8f net: mqtt_sn: fix types of gw_id and addr
- gw_id is an uint8_t in the protocol, so neither char, nor uint16_t are
  the correct type to use.
- addr is an array of bytes, not a string (of characters).

This also corrects related log messages and makes them more consistent, by
using hex for all gw_id's.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-01-27 15:22:32 -06:00
Michael Zimmermann
be80af2cd4 net: mqtt_sn: drop packets with truncated addresses
The address is only used for gateway discovery, but using a truncated
`struct sockaddr` can lead to out of bounds reads.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-01-27 15:22:32 -06:00
Michael Zimmermann
50e17d5c3d net: mqtt_sn: remove broadcast handling from recvfrom
I don't know, why this was added originally, but there are many issues with
it:
- You can't really return NULL, because src_addr is a `void*`, not a
  `void**`. The `src_addr = NULL` didn't do anything.
- The code was checking if the src_addr equals to the broadcast address,
  but under normal conditions, that's always a unicast address.
- Even if we would check if the destination address was the bcaddr, I don't
  see how that's useful. Currently, the address is only used for messages
  of types advertise and gwinfo, which use it to create a new entry in the
  gateway list. In that list, you always need the unicast address, never
  the broadcast address.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-01-27 15:22:32 -06:00
Muhammad Waleed Badar
6383c67622 doc: shell: improve wildcard feature documentation
Add a note about '*' and '?' characters usage.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-01-27 15:21:19 -06:00
Eran Gal
bcc8d963e1 drivers: i2c_dw: Add SDA_HOLD tx,rx config
Adds an optional configuration for SDA_HOLD_TX and SDA_HOLD_RX in
the Designware I2C driver.

Signed-off-by: Eran Gal <erang@google.com>
2026-01-27 15:20:51 -06:00
Fin Maaß
3c63100522 drivers: serial: litex: fix is pending
include enabled state for the irq
when checking for pending irqs.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-27 15:20:09 -06:00
Mathieu Choplain
11cfe9feed soc: st: stm32mp2x: add OpenAMP resource table section to linker script
The `.resource_table` section was not declared anywhere, leading to an
"orphan section" linker warning when OpenAMP was used with the resource
table enabled.

Fix it by adding the missing section to the SoC-specific linker script.
(the section is identical to the one defined for STM32MP1x series)

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-01-27 15:19:09 -06:00
Benjamin Cabé
ec80c76c34 dts: bindings: sensor: move DTS snippets from description to examples
Use the new `examples` property to provide example usage in a more
structured way.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-01-27 15:18:36 -06:00
Benjamin Cabé
9b54c46e7e drivers: can: adopt SHELL_HELP in CAN shell module
Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules and to save on flash usage.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-01-27 15:17:47 -06:00
Alain Volmat
68d037a2c5 MAINTAINERS: add avolmat-st to display collaborators
Add myself to display collaborators list to aid in reviewing PRs.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-01-27 15:17:11 -06:00
Carles Cufi
17af0d8c8c dts: nordic: Fix ngpios in gpio1 for nRF54L15 (and variants)
This is a follow-up to commit 15716542c2.

See:
https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/chapters/pin.html#ariaid-title6

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2026-01-27 15:16:33 -06:00
Carles Cufi
4a15930b0e doc: domain: Disable warnings when board catalog not present
With the introduction of the board-catalog role in
cd6b1f5c61, using the Zephyr doc
infrastructure without a board catalog instantiated leads to a warning.
Avoid this by disabling the warnings for this role.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2026-01-27 10:28:05 -06:00
Benjamin Cabé
59faf4a7d9 doc: ci: refresh requirements.txt pinned versions and SHAs
This picks up a security fix in urllib3

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-01-27 10:27:03 -06:00
Robert Lubos
c322a815ff tests: net: mdns_responder: Add basic mdns/DNS-SD query test cases
Add test cases for basic mDNS and DNS-SD queries, making sure the
response contains all IP addresses configured for the interface.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-01-27 10:26:37 -06:00
Robert Lubos
2b5c66b10d net: dns_sd: Include A/AAAA records for all valid addresses
According to RFC 6763, chapter 12.1, PTR responses SHOULD include
"All address records (type "A" and "AAAA") named in the SRV rdata.".

This was not the case, as only one IPv6 and one IPv4 address was added
in the response by Zephyr. This commit changes this behavior, Zephyr
DNS SD responder will now try to include all IPv4/6 addresses configured
on a given network interface. The current approach of choosing one IPv6
and one IPv4 address first to include in the message is retained - this
is to prevent situation where for example IPv6 addresses will consume
all buffer space, leaving no place for IPv4 ones. The DNS responder will
encode those selected IPv6 and IPv4 addresses first, and then attempt to
include remaining IPv6/4 addresses with "best effort" approach, if there
still is a space in the buffer to add those.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-01-27 10:26:37 -06:00
Robert Lubos
bdfce4a045 net: dns_sd: Avoid responses with unspecified IPv4/6 addresses
IPv4/IPv6 source address lookups may return unspecified address in case
there's no valid match (like for example LL address for global
destination). As it makes no sense to include unspecified addresses in
DNS SD replies, verify if that's not the case before adding A/AAAA
record in the response.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-01-27 10:26:37 -06:00
Robert Lubos
94a9b971ec net: mdns_responder: Use struct dns_header to encode response header
Use struct dns_header pointer when encoding the response header to
reduce code complexity.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-01-27 10:26:37 -06:00
Robert Lubos
c5572b1882 net: mdns_responder: Use net_buf APIs when creating response
Instead of manipulating net_buf's data buffer directly, use net_buf APIs
to reduce complexity when creating mDNS response.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-01-27 10:26:37 -06:00
Robert Lubos
51a2c9cf0d net: mdns_responder: Include all IPv4/6 addresses in responses
RFC 6762 Section 6.2 "Responding to Address Queries" specifies that mDNS
responses must include all valid addresses on the interface that is
sending the response. That was not the case for Zephyr's implementation,
which sent only on address in the response (and in some corner cases no
address at all).

This commit fixes this problem. Instead of encoding a single
pre-selected address in the response, mDNS responder will now loop over
all addresses on a given interface, and try to encode them as separate
answer records in the reply.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-01-27 10:26:37 -06:00
Sylvio Alves
ae4ec8713f samples: counter: alarm: add esp32h2 overlay
add device tree overlay for esp32h2 to enable timer0 counter in the
counter alarm sample.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-01-27 10:25:53 -06:00
Amneesh Singh
713f9bfe8d arch: arm: cortex_a_r: fix cache line size calculation
Cortex-R5F Technical Reference Manual by Arm says DMINLINE is the Log2 of
the minimum number of words (one word = four bytes) in a cache line.

For instance, say DMINLINE is 3, which means the cache line size is
2^3=8 words or 32 bytes, however with the current calculation, it comes
out to be 16 bytes. Therefore, we fix this calculation by correctly
calculating the number of bytes for the cache line size.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2026-01-27 10:25:34 -06:00
Gatien Chevallier
9d8e06fc92 drivers: ethernet: stm32: remove parts of MAC legacy implementation
Remove parts of the legacy implementation in eth_stm32_hal_common.c for
the loading of the MAC address when the device-tree is used. Use
net_eth_mac_load() for all these cases that were not destined for
production-ready products.

When cfg->mac_cfg.type == NET_ETH_MAC_DEFAULT, it means that neither
"zephyr,random-mac-address", "local-mac-address" or "nvmem-cells" were
used. For this case, keep the legacy property-less implementation to
avoid compilation errors and have a default, backward-compatible case.

Warning: this commit causes backward compatibility breakage for
implementations using "zephyr,random-mac-address" or "local-mac-address"
properties.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
2026-01-27 10:25:10 -06:00
Aric Radzin
8a007f79c9 boards: st: nucleo_f030r8: fix doc typo
fix typo: prob-rs -> probe-rs

Signed-off-by: Aric Radzin <aric.radzin@gmail.com>
2026-01-27 10:24:24 -06:00
Gatien Chevallier
3d3faf9b7d doc: release: 4.4: add new stm32 BSEC driver entry
Add an entry for the new stm32 BSEC driver in the release note.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
2026-01-27 10:24:04 -06:00
Gatien Chevallier
6c321c275b doc: release: 4.4: add new OTP subsystem entry
Add an entry for the new OTP subsystem in the release note.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
2026-01-27 10:24:04 -06:00
Jamie McCrae
51b4baa6cd doc: releases: release-notes: 4.4: Add note on new MCUmgr Kconfigs
Adds Kconfigs newly added in MCUmgr to the release notes

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-27 10:23:45 -06:00
Jamie McCrae
5123838cff doc: services: device_mgmt: smp_transport: Add raw SMP protocol
Adds details of this new transport

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-27 10:23:45 -06:00
Jamie McCrae
8cf1072edc samples: mgmt: mcumgr: smp_svr: Add raw serial Kconfig fragment
Adds a Kconfig fragment demonstrating how to use the raw UART
(serial) transport

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-27 10:23:45 -06:00
Jamie McCrae
aaae55b519 tests: mgmt: mcumgr: Add transport_raw_uart testcase
Adds a testcase to test the raw UART transport

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-27 10:23:45 -06:00
Jamie McCrae
bcc5529eae mgmt: mcumgr: transport: Add raw dummy transport
Adds a raw dummy UART transport which can be used for testing
MCUmgr without a real transport

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-27 10:23:45 -06:00
Jamie McCrae
d5df08a1cc mgmt: mcumgr: transport: uart: Add support for non-console raw mode
Adds support for using MCUmgr over UART (not via shell) in a raw
mode which does not include base64 and other SMP over console
encoding

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-27 10:23:45 -06:00
Jamie McCrae
891c2e3a9c drivers: console: kconfig: Fix MCUmgr names
Fixes the text case used for MCUmgr

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-27 10:23:45 -06:00
Torsten Rasmussen
a99311ebc6 cmake: align board qualifiers in CMake with Kconfig
Follow-up to PR# 102385.

Some occurrences of ${BOARD}${BOARD_QUALIFIERS} was missed in the
original alignment PR.

This commit adjusts the remaining occurrences to know include `/`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2026-01-27 08:41:15 -05:00
Bjarki Arge Andreasen
d05a4fbbc8 samples: tests: drivers: watchdog: exclude nrf54l15tag
The nrf54l15 SoC is already present and tested through the
nrf54l15dk. Exclude from sample to save CI time.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-01-27 08:40:15 -05:00
Bjarki Arge Andreasen
c0dd6eb9fc tests: drivers: pinctrl: nrf: enable PINCTRL
The nrf PINCTRL test suite does not enable PINCTRL. This has worked
until now since the UART driver used for the console typically is
enabled by default, selecting PINCTRL. This is not the case always
however, and the test suite does not require any "real" device being
enabled to test pinctrl.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-01-27 08:40:15 -05:00
Bjarki Arge Andreasen
453667691f boards: nordic: introduce nrf54l15tag
Introduce the nrf54l15tag board which is a hardware platform for
designing and developing applications with the nrf54l15 soc.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-01-27 08:40:15 -05:00
Bjarki Arge Andreasen
fe971ddeb4 dts: bindings: misc: add model for skyworks sky13348 antenna switch
Add devicetree model for skyworks sky13348 antenna switch.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-01-27 08:40:15 -05:00
Fin Maaß
171954f5a7 net: net_pkt: refactor net_pkt_cursor_operate
refactor net_pkt_cursor_operate and
make checks more explicit.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-27 08:40:01 -05:00
Torsten Rasmussen
3a31002dd7 sysbuild: use ZEPHYR_SHARED_TARGETS instead of hard-coded targets
Remove the hard-coded target knowledge of menuconfig, hardenconfig, and
guiconfig and instead use the ZEPHYR_SHARED_TARGETS provided by the
Zephyr image.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2026-01-27 08:39:52 -05:00
Torsten Rasmussen
5c5b11e570 cmake: use zephyr_custom_target_shared for menuconfig and friends
Use zephyr_custom_target_shared for menuconfig and friends so that
knowledge about those targets are available in through the CMake cache.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2026-01-27 08:39:52 -05:00
Torsten Rasmussen
4ce51f12e8 cmake: introduce zephyr_custom_command_shared
The function zephyr_custom_command_shared extends the CMake
add_custom_command.

Sysbuild maps custom image build targets, such as `menuconfig` to
top-level `<image>_menuconfig`, however this knowledge is built into
sysbuild. Providing `zephyr_custom_command_shared` allows an image build
target to be shared with sysbuild and other external tools to share
information about important build targets available in the image.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2026-01-27 08:39:52 -05:00
Torsten Rasmussen
797d42509c cmake: add scope cache to zephyr_set
CMake cache persists between CMake runs.
The CMake cache both ensures a setting keeps its value between CMake
re-runs but the CMake cache is also used by external tools, such as
sysbuild and west, to read information about the build system.

The CMake cache has a limitation when handling lists. It's easy to
extend a CMake cache list with extra values, but it's difficult to clear
the list to ensure only values from current CMake run is present in the
list, because cached lists are always initialized with the value from
previous run.

This commit extends `zephyr_set()` with a cache scope.
The cache scope is empty initialized for a given CMake run.
Any write to the CMake scope is mapped into the CMake cache, and thus
the value is shared to external tools.

This removes the CMake cache limitation for list handling.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2026-01-27 08:39:52 -05:00
Emil Gydesen
ab9ba7be03 Bluetooth: BAP: Broadcast: Add missing NULL check for meta
`meta` may be NULL if `meta_len == 0`, in which case we should not
call `memcpy`.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-01-27 08:39:40 -05:00
Alberto Escolar Piedras
5bc66b7772 manifest: Update nRF hw models to latest
Update the HW models module to:
cf40f6dc7fc441ee6848ea2e177c4522588c1b8c

Including the following:
cf40f6d TIMER: Fix bug with trigger in less than 1us

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-01-27 08:39:30 -05:00
Jukka Rissanen
831f6d729f net: mdns_responder: Re-send announce message for bound DHCPv4 address
If we get DHCPv4 bound event, then resend mDNS announce message
for that interface. This way a new address from DHCP server will
get announced properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2026-01-27 08:39:21 -05:00