Compare commits

...

522 Commits

Author SHA1 Message Date
Daniel DeGrasse
64e98eb527 release: Zephyr v4.2.1
Set the version to v4.2.1

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
2025-10-07 17:42:43 -05:00
Daniel DeGrasse
4d44e3280b doc: release_notes: add 4.2.1 release notes
Add 4.2.1 release notes, summarizing the issues addressed since 4.2 was
released.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-10-07 17:31:48 -05:00
Julien Racki
6da1cbcb06 drivers: ethernet: stm32: Move the Ethernet API V1 init
Move the Ethernet API v1 Initialization in eth_init_api_v1()
helper function to match the V2 implementation.

Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2025-10-07 16:29:52 -05:00
Julien Racki
1e5f5af4eb drivers: ethernet: stm32: Fix the init call order
Fix the init call order for V2 API to be able to configure PTP
as PTP initialization happens before iface initialization.

Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2025-10-07 16:29:52 -05:00
Khaoula Bidani
ee29ea2a20 drivers: gpio: stm32: Fix gpio_pin_get_config
This commit updates the function to only set output-related flags
(GPIO_OUTPUT_INIT_HIGH, GPIO_OUTPUT_INIT_LOW) when the pin
is actually configured as output. For input pins, only GPIO_INPUT and
other relevant flags are set.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
(cherry picked from commit e803a10b91)
2025-10-06 14:38:58 -05:00
Detlev Zundel
3d4204036a samples: modules: lvgl: demos: Increase memory pool on native
Due to the added overhead on 64 bit native, we also need to increase
the memory pool size to fix crashes as described in here:

https://github.com/lvgl/lvgl/issues/7648

Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
(cherry picked from commit abd0919bc9)
2025-10-06 14:38:25 -05:00
Detlev Zundel
c60a870b1c samples: modules: lvgl: demos: Increase main stack to fix crash
The increased complexity of the LVGL code now overruns the 4 KiB stack
of the main thread. Increase it to 6 KiB to fix the error.

Fixes: #94473

Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
(cherry picked from commit e05a272817)
2025-10-06 14:38:25 -05:00
Pieter De Gendt
d26b221f53 arch: common: nocache.ld: One nocache MPU region
Combine the load and noload cache regions for a single MPU aligned block.
This is required to have an MPU region with a size that is a power of 2.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
(cherry picked from commit 8f7908694a)
2025-10-06 13:00:31 -05:00
Pieter De Gendt
9cb7b9e4ec linker: Split nocache memory sections into loadable and non-loadable
Commit f9168ae464 made all non-cached memory
loadable by default.

However as nocache memory is typically used for reserving larger buffers to
be shared between peripherals, this comes at fairly large cost towards ROM
usage.

This commit creates two distinct sections for both loadable and
non-loadable nocache memory sections.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
(cherry picked from commit 294f7e52c5)
2025-10-06 13:00:31 -05:00
Benjamin Cabé
e395a9a649 doc: _scripts: ensure twister.yaml file is considered in board catalog
Boards may use twister.yaml file to define Twister platforms, so
board catalog should also parse them.

Fixes: zephyrproject-rtos/zephyr#95721.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit 9f181b6711)
2025-10-06 09:57:10 -07:00
Alen Karnil
9526404c65 dts: arm: st: stm32f303: fix I2C3 address in nodename
Correct stm32f303 I2C3 address in nodename.

Signed-off-by: Alen Karnil <alankarnil@gmail.com>
(cherry picked from commit 4363d14bef)
2025-10-02 16:40:18 -05:00
Samuel Tsai
116c4a9e40 Bluetooth: host: adv: revert 39cb574 to fix spurious error log
Commit 39cb574 changed the log level from LOG_DBG to LOG_ERR in
bt_le_adv_resume(). This causes the error log
"No valid legacy adv to resume" to appear during normal connection
establishment when using bt_le_ext_adv_start(), even though the
system is functioning correctly.

Revert the change to restore the original LOG_DBG level.

Fixes: #94954

Signed-off-by: Samuel Tsai <stsai@atmosic.com>
(cherry picked from commit 07dc0ad40d)
2025-09-30 15:05:15 -07:00
Robert Lubos
46292d748d net: tcp: Fix ACK processing when FIN packet is received
In case FIN packed also acknowledged most recently sent data, not all
ack-related TCP context variables were updated, resulting in invalid SEQ
number values sent in consecutive packets.

Fix this by refactoring the FIN handling in TCP_ESTABLISHED state.
Instead of having a separate block strictly for FIN packet processing,
let the packet be processed by common code responsible for regular
data/ack processing. This should be less error-prone for any future
modifications or not-yet-discovered issues. Only after the common
processing of data/ack is done, we check whether FIN flag was present in
the packet, and mark the connection for closing.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 178150590c)
2025-09-30 15:04:27 -07:00
Robert Lubos
51e1f38026 tests: net: tcp: Add test for FIN,ACK received after final data
Add a test case for a scenario where the final data sent by one peer is
acknowledged in the FIN,ACK response from the other peer. Verify that
the acknowledgment is handled correctly, and a consecutive sequence
number sent by the TCP stack in such case is set correctly.

This complements the other existing test for FIN packet handling, which
verified that data received in a FIN packet is handled correctly. With
those tests in place it should be safer to update any logic related to
FIN packet handling.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 99b435788e)
2025-09-30 15:04:27 -07:00
Robert Lubos
87b06394e6 net: tcp: Preallocate TX packet for TCP context
TCP context cannot operate w/o a TX packet for buffering transmitted
data. So far this net_pkt was allocated at runtime from the common
packet pool, but this created some not-obvious memory requirement on TCP
and could lead to TX packet starvation in case many TCP connections are
open in parallel. Therefore, allocate this packet structure statically,
as a part of the TCP context instead.

This increases the memory requirement of the TCP context by ~64 bytes,
however if that's a concern for the application, the maximum number of
TX packets can be lowered instead. In return, we get a clear separation
between the number of TCP connections opened, and the amount of packets
that can be transmitted.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit eda76ad21b)
2025-09-30 15:02:50 -07:00
Robert Lubos
9800d46c69 net: pkt: Add helper function to initialize TX packet
Add helper function to initialize externally allocated TX packet. It's
especially important to configure net_buf slab for the packet so that
net buffers are allocated from a correct pool for the packet.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit b8c7984099)
2025-09-30 15:02:50 -07:00
Robert Lubos
ac91402f71 net: tcp: Use net_buf pointer directly for out-of-order recv queue
Using net_pkt for TCP out-of-order recv queue was an overshot, as the
mechanism mostly used net_buf operations directly anyway. It can be
easily replaced with a direct net_buf pointer, so that it's not longer
needed to hog one net_pkt per TCP context anymore.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit aca511c91f)
2025-09-30 15:02:50 -07:00
Sudan Landge
e58bca83de arch: arm: switch to privilege stack in SVC handler
Initialize the privilege stack and switch PSP to it early in the SVC
handler to ensure `z_arm_do_syscall` does not start on a user-accessible
stack frame.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit 319c697286)
2025-09-30 15:01:53 -07:00
Sudan Landge
91d1416460 boards: arm: mps2: Add dependency to empty_cpu0 for an521/cpu1's app
`west build` does not build the `empty_cpu0` application making
`west build -b mps2/an521/cpu1 -t run` fail because of the missing
empty_cpu0's binary.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit 52151d0b23)
2025-09-30 15:01:53 -07:00
Sudan Landge
cbb43bee3d tests: overwrite return address of stack frame
Introduce a test to overwrite the return address in the exception
stack frame of a lower-priority thread performing an SVC call.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit f80bef31ef)
2025-09-30 15:01:53 -07:00
Jukka Rissanen
989499c8f4 net: context: Make sure TCP allocation is not leaked
If we have allocated a TCP connection, and if after that
we get an error like EADDRINUSE, then we must de-allocate
the TCP connection otherwise there is a buffer leak.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 909710b598)
2025-09-30 15:01:25 -07:00
Jamie McCrae
6eebe0acf0 cmake: mcuboot: Add dependency to keys
Adds a dependency that causes CMake to re-configure if the input
key files for MCUboot signing/encryption have changed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 271dbb4015)
2025-09-21 20:29:28 -07:00
Mickael Bosch
1ea8bb2e0f drivers: i2c: stm32: fix compilation with DMA
fixes:
- implicit declaration of function 'stm32_buf_in_nocache'
- undefined reference to 'stm32_buf_in_nocache'

Signed-off-by: Mickael Bosch <mickael.bosch@linux.com>
(cherry picked from commit 6e018bbf04)
2025-09-12 14:23:09 -04:00
Etienne Carriere
4217df505a drivers: i2c: stm32: exclude stm32f7 family for PM in RTIO driver
Exclude STM32F7 SoC series from PM support since that SoC doees not
yet manage power management in Zephyr and HAL API functions
LL_I2C_EnableWakeUpFromStop() and LL_I2C_DisableWakeUpFromStop()
are not implemented in the H7 HAL/LL drivers.

This change ports into the STM32 RTIO driver the change made in the
non-RTIO driver through commit 1804eb7bc3 ("drivers: i2c: stm32:
exclude stm32f7 family for PM").

Back ported from commit 5ff3dbeeee ("drivers: i2c: stm32: exclude
stm32f7 family for PM in RTIO driver").

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-09-08 14:43:41 -07:00
Etienne Carriere
d1a9ef6b0b drivers: i2c: stm32: sync stm32_v2 RTIO on PM runtime state
Always call pm_device_runtime_get() when registering a target
even if the device is not wakeup capable to prevent I2C target not being
function if the device goes into a SoC Stop mode.

This change ports into the STM32 v2 RTIO driver the change made in the
non-RTIO driver through commit 67f80e35b8 ("i2c: stm32: always call
runtime_get when registering targets").

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
(cherry picked from commit 181e544550)
2025-09-08 14:43:41 -07:00
Stephanos Ioannidis
bf9345a1ec SDK_VERSION: Use Zephyr SDK 0.17.4
This commit updates ZEPHYR_SDK to point to the Zephyr SDK 0.17.4 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
(cherry picked from commit 59a5909abb)
2025-09-07 15:41:24 -07:00
Stephanos Ioannidis
7f89472f14 ci: Switch to CI image v0.28.4
This commit updates the CI workflows to use the CI image v0.28.4, which
includes Zephyr SDK 0.17.4.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
(cherry picked from commit 13ba04fd1f)
2025-09-07 15:41:24 -07:00
Andreas Schmidt
e3a55c96ef dts: arm: st: u5: fix wkup-pin@8 referencing non-existent port gpiof
With commit d280d89 the gpiof port got moved from file stm32u5.dtsi to
file stm32u5_extra.dtsi. stm32u5_extra.dtsi is not included for
STM32U535/545. In same file stm32u5.dtsi still node wkup-pin@8 references
non-existent port gpiof.

Fixes #93445

Signed-off-by: Andreas Schmidt <andreas.schmidt@dormakaba.com>
(cherry picked from commit 528ab9d9c2)
2025-09-07 15:39:28 -07:00
Johann Fischer
663da2302b doc: update pyOCD repository links
The repository has been moved to a new organization, see
https://pyocd.io/. Update links to the pyOCD repository.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 617b71bc17)
2025-09-02 22:15:47 -07:00
Robin Kastberg
4670cb27c7 iar: ltorg directive not supported
Currently this directive is not supported in EWARM 9.70.1,
it will be in future versions, but we want Zephyr 4.2
to work with IAR EWARM 9.70.1.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
(cherry picked from commit fa165da667)
2025-08-22 18:50:36 -05:00
Tim Pambor
a55b5444c6 twister: Fix race condition in try_making_symlink
Replaces the check-then-create pattern for symlinks with
opportunistic creation. Instead of checking for existence
before creating the symlink, the code now attempts to
create it directly and gracefully handles the case
where it already exists.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
(cherry picked from commit dff24c8c00)
2025-08-22 16:49:22 -07:00
Keith Packard
c1adc507d7 west: Update picolibc to version being proposed for SDK 0.17.4
We're trying to re-synchronize picolibc bits across Zephyr and the Zephyr
SDK. At this point, SDK 0.17.3 is missing some minor updates found in the
module and the module is missing a commit from the SDK.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-08-21 13:33:13 -07:00
Bas van Loon
e918bdac38 fs/ext2: Fix NULL dereference when fs_stat queries root.
When fs_stat() queries the root / mountpoint it should return its root
i_node but instead it tries to return the parent i_node which does not
exist. Fix this by checking if parent is set otherwise return the root
i_node.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/94000.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
(cherry picked from commit 1dcf123e2d)
2025-08-21 13:32:22 -07:00
Pieter De Gendt
8b5e0388cf drivers: ethernet: nxp_imx_netc: Fix LAA bit location
The Locally Administered Address (LAA) bit should be set on the first
octet of the MAC address.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
(cherry picked from commit f1b4c7c992)
2025-08-20 18:11:35 -07:00
Pieter De Gendt
3b7610ec5f drivers: ethernet: stm32: Set LAA bit on MAC address based on device ID
The MAC addressed derived from the device ID is not assigned by the
manufacturer and therefor the Locally Administered Address (LAA) bit should
be set.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
(cherry picked from commit 300016c801)
2025-08-20 18:09:50 -07:00
Daniel Flodin
2b0f179079 cmake: assembler optimization options
Commit f499ea0 made it so that the compiler optimization flags are also
passed to the assembler. However, this breaks for the IAR toolchain
since it uses the GNU assembler which does not have the same
optimization flags as the IAR compiler.

This commit separates the compiler and assembler optimizations to make
it possible to specify appropriate flags in a toolchains corresponding
`compiler_flags.cmake`

Signed-off-by: Daniel Flodin <daniel.flodin@iar.com>
(cherry picked from commit a4b66f9214)
2025-08-20 18:03:03 -07:00
Ofir Shemesh
ff9fb454c6 misc: flexram: allow RAM type node to be disabled in DT
Use DT_NODE_HAS_COMPAT_STATUS to skip disabled child nodes. This
avoids build errors when setting a RAM type to 0 banks.

Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
(cherry picked from commit 169b47ce38)
2025-08-19 13:28:40 -05:00
Marc Lasch
5282c9fdc8 drivers: net: ppp: Fix link-layer address configuration
Restore setting the ppp link-local address either to CONFIG_PPP_MAC_ADDR or
to a random value 00:00:5e:00:53:XX instead of leaving it uninitialized.

Recently the memory handling for the link-layer addresses was changed from
an approach of copying pointers to managing the memory as a member of the
`net_linkaddr` struct (ref ac3cb9dac0).

The piece of code this patch touches however, relied on the use of the
pointers to function properly.

With the recent change, the MAC address was copied to the new member
location before it was even set (either from Kconfig or selected randomly).
As a result, the link-layer address was kept initialized to zero, which
resulted in a IPv6 address of fe80::ff:fe00:0 which is exactly the
link-local EUI-64 representation of the MAC address 00:00:00:00:00:00
(without flipping the "universal/local" bit).

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
(cherry picked from commit 15048337c4)
2025-08-18 11:09:20 -05:00
Fabrice DJIATSA
ee0aecc953 boards: st: nucleo_u385rg_q: update clock domain source for rng
Several tests failed due to a low clock frequency for
the RNG peripheral.
Increase the RNG clock frequency by providing MSIK with
96 MHz as the domain source.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
(cherry picked from commit ac733b1ae9)
2025-08-18 11:08:56 -05:00
Pieter De Gendt
21c942f18c drivers: regulator: shell: Fix regulator parent name completion
Shell functions targeting regulator parents used the auto-completion of
regulator devices instead.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
(cherry picked from commit 576b3daffa)
2025-08-11 10:56:54 -05:00
Maureen Helm
f017af445e drivers: udc: Fix max32 driver high speed support
High speed support has been broken for the max32 driver since commit
faeabc63c9.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
(cherry picked from commit a4c757adc2)
2025-08-11 10:56:19 -05:00
Tahsin Mutlugun
01949d478d tests: drivers: spi: spi_loopback: Update slow rates for MAX32 boards
The requested SPI clock rate and the actual rate that is set can be
different depending on the peripheral clock and divisors available to
the SPI peripheral. For some MAX32 SoCs, actual rate ended up being
higher than the devicetree setting. This would then cause latency tests
to fail as transfers finish earlier than minimum expected duration.

Update the test frequency values in several MAX32 board overlays to pass
latency tests.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
(cherry picked from commit 3de5883fc1)
2025-08-11 10:55:53 -05:00
Tahsin Mutlugun
0dbc00a63b drivers: spi: spi_max32: Return proper error codes in spi_configure
spi_configure was returning HAL error codes that are incompatible with
Zephyr error definitions straight back to the caller. Replace these with
error codes that Zephyr can correctly interpret.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
(cherry picked from commit edc9ff951d)
2025-08-11 10:55:53 -05:00
Tahsin Mutlugun
94b74dbd89 drivers: spi: spi_max32: Fix word size support
Driver was not handling SPI word sizes other than 8 bits. Apply DFS
shift wherever necessary to support non 8-bit transfers.

DMA mode cannot support word sizes that are less than 8 bits so return
-ENOTSUP if word size less than 8-bits is required.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
(cherry picked from commit f47449e7e9)
2025-08-11 10:55:53 -05:00
Robert Lubos
4c362f1aec tests: net: socket: tcp: Add test for keepalive connection upkeep
Add test verifying that if keep-alive messages are exchanged, the
connection remains alive.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit dcbd1ed5fc)
2025-08-11 10:54:29 -05:00
Robert Lubos
bafc9f2a66 net: tcp: Fix handling of keep-alive probes
Keep-alive probes have seq number set to SND.NXT - 1 and may or may not
contain an octet of data. The latter case was not handled properly
therefore add a special case when validating seq number to response to
keep-alive probes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit d93c5d6072)
2025-08-11 10:54:29 -05:00
Henrik Brix Andersen
30de5e8a2c drivers: console: posix_arch_console: remove build warning
Remove build warning when building the posix_arch_console driver with
CONFIG_PRINTK=n and CONFIG_STDOUT_CONSOLE=n.

Fixes: #93790

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
(cherry picked from commit 3eedebe031)
2025-08-04 12:05:41 -05:00
Anas Nashif
ff6295f930 tests: llext: disable debug logging
disable debug in general as it is too verbose and hides test output.
However, this now fixes an issue in the test itself after 4.2 release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit 94e0e5ae85)
2025-08-04 10:32:43 -05:00
Armando Visconti
738e159ede drivers/sensor/: lis2dux12: fix ODR setting
In lis2dux12_freq_to_odr_val, the loop through the array of possible ODR
frequencies can break sooner than expected if power-mode is
set to High Performance mode and the requested ODR is less than or
equal to 25Hz.

Moreover, move the "odr |= 0x10" statement used for HP mode in the
chip_api set_odr_raw() API, so that we enter the HP mode even when the
ODR is set from DT only.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit 0d38a88666)
2025-07-30 11:05:12 -05:00
IBEN EL HADJ MESSAOUD Marwa
183444eed4 drivers: usb: udc: prevent USB clock disable in sleep mode
Prevent disabling OTG HS and USBPHY clocks
during sleep on STM32U5 series

Disabling these clocks during sleep mode
was causing USB device initialization issues

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
(cherry picked from commit 8b355e9306)
2025-07-29 12:23:36 -07:00
IBEN EL HADJ MESSAOUD Marwa
e2efcf7cb6 drivers: usb: device: prevent USB clock disable in sleep mode
Prevent disabling OTG HS and USBPHY clocks
during sleep on STM32U5 series

Disabling these clocks during sleep mode
was causing USB device initialization issues

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
(cherry picked from commit d4b2808b68)
2025-07-29 12:23:36 -07:00
Luis Ubieda
a494c09fcb i3c: stm32: Prevent mutex deadlock on DAA failure
Make sure this function always unlocks bus_mutex.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
(cherry picked from commit ef41627f81)
2025-07-29 12:23:20 -07:00
Martin Stumpf
fb8687a492 spi_nxp_lpspi: Fix underflow in lpspi sck calculation
If `desired_delay_ns` is `0`, it is much saner to set the delay to `0x00`
than to underflow and set it to `0xff`, which is the current behavior.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
(cherry picked from commit 860f9c8ef5)
2025-07-29 12:51:34 -05:00
Tomislav Milkovic
7abcf05115 doc: connectivity: networking: api: tftp: Fix Kconfig option
Instead of CONFIG_MQTT_SN_LIB, correct Kconfig option to
enable TFTP client library is CONFIG_TFTP_LIB

Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
(cherry picked from commit 5410f74664)
2025-07-29 12:50:31 -05:00
Bjarki Arge Andreasen
2ff7f15e5f drivers: can: nrf: fix invalid pointer leading to undef behavior
The can_nrf device driver incorrectly passes its own device
driver pointer to a call to clock_control_get_rate() to get the
rate of the auxpll. The actual device driver which should be passed
to clock_control_get_rate() is the auxpll.

Without this fix, the call jumps to the can_nrf_api and returns
garbage (unfortunately it does not hardfault, which is why this
issue has not been discovered yet).

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
(cherry picked from commit f5ee52ecf3)
2025-07-29 12:43:56 -05:00
Axel Utech
d1f998909d dts: arm: st: u0: fix lpuart1/2 interrupts
Interrupt vectors for lpuart1 and lpuart2 are swapped according to the
reference manual RM0503 table 54.
Fixes the usage of the interrupt-driven uart API.

Signed-off-by: Axel Utech <utech@sofiha.de>
(cherry picked from commit 4664f600d6)
2025-07-27 12:09:37 -07:00
Benjamin Cabé
a9f222b9a7 boards: arduino: nicla_vision: fix VL53L1X I2C address
Nicla Vision datasheet is referring to the 8-bit wire address (0x52) for
the VL53L1X sensor, so that's likely what ended up being used in the
board's devicetree. However, it's the 7-bit I2C address that should be
used so fix that by changing the I2C address to 0x29. Successfully
tested on actual hardware.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit a663b2b374)
2025-07-27 10:58:16 -07:00
Florian La Roche
58be950216 net: sockets: add missing break
Add a missing break to socket handling.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
(cherry picked from commit d933e0301e)
2025-07-27 10:56:20 -07:00
Pieter De Gendt
02f511bb93 doc: release: 4.2: Fix entry in new APIs
Add a missing newline to fix the formatting of the LoRaWAN entry.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
(cherry picked from commit 4867d45647)
2025-07-27 10:56:05 -07:00
Daniel DeGrasse
413b789deb release: Zephyr v4.2.0
Set the version to v4.2.0

Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-18 18:17:09 -05:00
Daniel DeGrasse
5c388ea80b release: update security policy to include 4.2
Update security policy documentation to indicate 4.2 is the latest
version, and drop 4.0 from the supported versions

Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-18 18:17:09 -05:00
Daniel DeGrasse
bde3e6929b doc: release: Finalize v4.2.0 release notes and migration guide
Remove working draft status from the v4.2.0 release notes and migration
guide.

Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-18 18:17:09 -05:00
Daniel DeGrasse
dd20c8e210 doc: release: Remove v4.0.0 from the list of supported releases
Only the two most recent mainline releases are supported.

Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-18 18:17:09 -05:00
Daniel DeGrasse
8178c87c1c doc: release: add v4.2.0 to the list of supported releases
Add 4.2.0 to the supported release, EOL to the tentative 4.4 release
date.

Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-18 18:17:09 -05:00
Daniel DeGrasse
1ba9504811 doc: releases: enforce sorting of entries
Enforce sorting of entries, using zephyr-keep-sorted. This will make
sure that entries don't get out of order again within the release notes
or migration guide by throwing a compliance error.

Note that autogenerated areas do not have this enforcement enabled.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-18 09:35:31 -07:00
Daniel DeGrasse
f821de4d88 doc: releases: 4.2: clean up entry order
Clean up order of entries to be alphabetically sorted in the "new apis"
section

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-18 09:35:31 -07:00
Daniel DeGrasse
db64d7bd5f doc: releases: migration-guide: clean up entry order
Clean up order of entries in the migration guide to be alphabetical.
Combine two duplicate regulator sections, and move driver sections
mistakenly placed under networking where they ought to be.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-18 09:35:31 -07:00
Erwan Gouriou
4ab5efc87d release-notes: 4.2: Add a clarification on a new compatible
Clarify the introduction of st,stm32-ethernet-controller compatible
so that reader could not understand that this is the introduction of
STM32 ethernet (while it is only dts shenanigans).

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-07-18 09:38:39 -05:00
Abderrahmane JARMOUNI
366d45fd34 doc: release-notes-4.2: Add Display notable changes
Add Display notable additions in 4.2 release.

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-07-17 17:36:40 -10:00
Abderrahmane JARMOUNI
a1455b4dfc doc: release-notes4.2: Add LVGL notable changes in Zephyr
Add LVGL notable changes in Zephyr

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-07-17 19:03:41 -05:00
Benjamin Cabé
62ffbb0127 doc: releases: 4.2: Consolidate release highlights
Add twister power harness mention
Use same structure as the one used for 4.1

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-17 19:03:28 -05:00
Benjamin Cabé
d9045ea467 twister: doc: add anchors for various harness sections
Make it possible to cross reference documentation for various harnesses
by adding target locations.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-17 19:03:28 -05:00
Benjamin Cabé
b46b41dd79 doc: releases: 4.2: Misc. typo and spelling fixes
General clean up of small typos and other trivial fixes.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-17 19:03:28 -05:00
Krzysztof Chruściński
8fa515419c doc: releases: Add note about de-deprecation in Nordic UART driver
Add note in release notes for v4.2 about de-deprecation of
CONFIG_CONFIG_UART_x_NRF_HW_ASYNC option.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-07-17 12:46:31 -10:00
Krzysztof Chruściński
08f14961fe drivers: serial: nrfx_uarte: Improve UART_NRFX_UARTE_ENHANCED_RX dependency
Enhanced RX cannot be used when UART_x_NRF_HW_ASYNC is used so changing
default value to depends on.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-07-17 12:46:31 -10:00
Krzysztof Chruściński
3c9389650e Revert "drivers: serial: nrfx_uarte: Deprecate CONFIG_UART_x_NRF_HW_ASYNC"
This reverts commit 384e940c66.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-07-17 12:46:31 -10:00
Krzysztof Chruściński
eb996924fb drivers: serial: nrfx_uarte: use ifdef instead of IS_ENABLED
In certain configurations timeout field is not present in the
data structure so preprocessor ifdef must be used instead of
compiler check.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-07-17 12:46:31 -10:00
Etienne Carriere
72dc0e5f0a doc: migration: 4.2: Note on STM32 TF-M BL2 HW crypto
Add a note about STM32 boards TF-M BL2 bootloader that do not embed
HW crypto drivers since migration to TF-M v2.2.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-07-17 11:29:53 -05:00
Stephanos Ioannidis
31ef45e2f1 ci: maintainer_check: Use zephyrbot token
This commit updates the maintainer check workflow to use the zephyrbot "PR
assigner" token with `org:read` permission because the default workflow
token is not able to retrieve organisation-level user membership
information.

Note that the workflow trigger condition is changed from `pull_request` to
`pull_request_target` because non-workflow secrets may not be accessed from
`pull_request` trigger for security reasons.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-07-17 11:29:36 +09:00
Stephanos Ioannidis
63bf487a56 ci: assigner: Use zephyrbot token
This commit updates the pull request assigner workflow to use the zephyrbot
token instead of the workflow token.

Note that the workflow token, by design, cannot access the
organisation-level user membership information, and may cause the assigner
script to return `Skip 'user': not in collaborators` even for valid
collaborators.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-07-17 11:29:36 +09:00
Gaetan Perrot
eb06ff8d3a docs: raspberrrypi: rpi_pico: Fix broken RP2040 datasheet link
The RP2040 datasheet link in the rpi_pico board documentation was broken.

It has been updated to point to the correct location.

This change ensures consistency and prevents confusion, while keeping the
useful reference to the official RP2040 documentation.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-16 16:41:25 -05:00
Derek Snell
8022e29c0c doc: boards: nxp: mimxrt700_evk: add boot switch details
Document SW10 to boot from default flash.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-07-16 16:41:12 -05:00
Maksim Salau
7ab9d8b668 doc: migration: 4.2: Add Modbus related notes
Add notes regarding changes in Modbus  serial mode configuration.

Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
2025-07-16 16:41:02 -05:00
Jeppe Odgaard
2e14671749 doc: services: storage: fcb: remove deprecated settings recommendation
The recommended back-end depends on the use case. There exists another note
(recommendation) in doc/services/storage/settings/index.rst which is up to
date.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-07-16 16:40:43 -05:00
Anas Nashif
e3278012e4 memmgmt: doc: replace Memory-Attr with Memory Attributes
No need to use abbriviated form here, just spell it out.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-16 16:39:59 -05:00
Tim Pambor
51989cbe0a twister: Fix exception if twister fails to create symlink
This fixes a typo in the formatting code that caused an exception
if the symlink creation failed.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-16 16:39:47 -05:00
Anas Nashif
1a7ce3f45e Revert "init: Make entry init-function less and introduce service objects"
This reverts commit 175da6bdb0.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-16 16:39:36 -05:00
Anas Nashif
7d3a33afd4 Revert "scripts: Removing init function pointer from check_init_priorities.py"
This reverts commit 653f1bf123.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-16 16:39:36 -05:00
Anas Nashif
f2a9bf968d Revert "tests: misc: Fixing expected output on check_init_priorities test"
This reverts commit c341f5389d.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-16 16:39:36 -05:00
Anas Nashif
91cf77f013 Revert "cmake: Add service section to commo-rom linker generator"
This reverts commit 49a96f67a2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-16 16:39:36 -05:00
Anas Nashif
343f29c5a9 manifest: update tf-m sha
Pull in fixes needed to enable warnings being treated as errors.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-16 16:39:04 -05:00
Flavio Ceolin
ca7d99a249 tf-m: build: Treat warnings as errors
Starting in TF-M 2.2.0 there is a build option to treat warnings as
errors. Lets use it.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-07-16 16:39:04 -05:00
Abderrahmane JARMOUNI
f66658a52a soc: stm32: fix FLASH_BASE_ADDR for apps linked in ext Q/OSPI Flash
Following changes in e35ac8f and 14c1b4a to how external Q/OSPI Flash
nodes are declared in DT for boards with STM32 SoCs, FLASH_BASE_ADDRESS
needs to be set manually similar to XSPI Flash, so that it does not
default to (dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)) which gives 0.
This change is critical for running apps with MCUboot from external
Q/OSPI Flash.

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-07-16 16:38:41 -05:00
Ryan McClelland
d84348fbd1 docs: device: remove action for device pm
It is not possible to go from ACTIVE to OFF with device pm
actions.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-07-16 05:22:47 -10:00
Iuliana Prodan
f1eb63a109 MAINTAINERS: Add iuliana-prodan as Open AMP maintainer
Move myself from collaborators to maintainers.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2025-07-16 05:22:23 -10:00
Benjamin Cabé
e41c1b291f MAINTAINERS: Introduce SPDX Tooling area
Add SPDX Tooling area covering custom west command, zspdx library, and
tests. Add kartben as maintainer, swinslow and pdgendt as collaborators.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-16 05:22:05 -10:00
Attie Grande
90bc8f8ff8 MAINTAINERS: Remove myself from SAM Platform collaborators
I've been unable to participate properly for some time, apologies all.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2025-07-16 05:21:48 -10:00
Anas Nashif
66acb364b1 MAINTAINERS: add missing file to areas
quick pass adding files to respective areas.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-15 17:08:57 -10:00
Dmitrii Golovanov
94d9574b0f scripts: footprint: fix hifive1 rev.B board name
Rev B of hifive1 is 'hifive1_revb' since 07e4ba4240

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-07-15 17:08:43 -10:00
Christoph Mair
ab3c514d33 doc: migration: 4.2: typo: NET_REQUEST_ETHERNET_GET_QAV_PARAM used twice
The migration guide mentions NET_REQUEST_ETHERNET_GET_QAV_PARAM twice
in a row. One instance should be NET_REQUEST_ETHERNET_SET_QAV_PARAM.

Signed-off-by: Christoph Mair <christoph.mair@husqvarnagroup.com>
2025-07-15 08:34:34 -10:00
Nabil Elqatib
b663ee861f doc: kernel: drivers: Correct number of initialization levels
Commit a0b746 deleted 2 deprecated driver init levels (EARLY,
APPLICATION), but didn't update the number mentioned in the doc.

Signed-off-by: Nabil Elqatib <nabilelqatib@gmail.com>
2025-07-15 08:34:21 -10:00
Etienne Carriere
0b1cff200f manifest: Update tf-m module to fix STM32 platform BL2
Sync with TF-M to fix STM32 platforms TF-M BL2 firmware (issue 92446),
and OTP provisioning build error and various build warnings.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-07-15 10:50:52 -05:00
Gaetan Perrot
f52d71c8cf drivers: serial: uart_sedi: Remove unused variable 'mask'
The variable 'mask' was declared but never used in
uart_sedi_line_ctrl_set().

This commit removes it to clean up the code..

No functional changes.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-14 11:18:45 -10:00
Gaetan Perrot
aaec242a63 tests: net: socket: net_mgmt: mark unused function argument
Use ARG_UNUSED() to mark unused function argument.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-14 11:18:31 -10:00
Marcin Niestroj
f6b35e637b tests: net: conn_mgr_nsos: fix CONFIG_ETH_NATIVE_TAP=n
Update option name s/CONFIG_ETH_NATIVE_POSIX/CONFIG_ETH_NATIVE_TAP/, which
follows recent Zephyr change.

Fixes 78f800642a ("drivers/ethernet/eth_native_posix: Rename to
  eth_native_tap")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2025-07-14 11:18:20 -10:00
Lyle Zhu
328a96cb65 doc: releases: 4.2: Mention Bluetooth Classic changes
Add the changes of Bluetooth Classic to release notes.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-07-14 11:18:09 -10:00
Patryk Koscik
854e185248 west: spdx: make SBOM generation compatible with Python < 3.12
Avoid f-strings with backslashes for Python < 3.12 compatibility,
which fixes SBOM generation crashes on older Python versions.

Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
2025-07-14 07:11:46 -10:00
Anas Nashif
dda57865c0 twister: adapt tests for new TestConfiguration class
Adapt test to new test configuration class.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-14 07:11:22 -10:00
Anas Nashif
4d82c48789 twister: make test configuration handling a class
Split test configuration code into own class and do parsing in two steps
to get the right context of platforms and scenarios.

Fixes zephyrproject-rtos/zephyr#89774

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-14 07:11:22 -10:00
Daniel Leung
388f7677fb doc: release-notes/4.2: add bits about I3C
Add bits about I3C on added/removed kconfigs, and a new driver.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-07-14 07:09:33 -10:00
Ayush Singh
554084462b boards: beagle: beagley_ai: Add auto-generated features
The auto-generated features table is used in most of the new boards and
is great to show the features available in different targets in the same
board.

So use it instead of manual tables

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-07-14 07:09:18 -10:00
Tom Hughes
9fd547f94d zephyr: sw_isr_table: Fix compilation error
The IRQ_DIRECT_CONNECT macro eventually uses _Z_ISR_DIRECT_TABLE_ENTRY,
which defines a function. IRQ_DIRECT_CONNECT is meant to be used
inside functions. While nested functions are supported as an extension
in GNU C, the nested function cannot have static storage.

https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html:

> A nested function always has no linkage. Declaring one with extern or
> static is erroneous.

./scripts/twister -c -s arch.interrupt.gen_isr_table_local.riscv --all

tests/kernel/gen_isr_table/src/main.c: In function
'gen_isr_table_test_build_time_direct_interrupt':
include/zephyr/sw_isr_table.h:197:41: error: invalid storage class for
function '__isr_table_entry_isr1_irq_2'
#define __MK_ISR_ELEMENT_NAME(func, id) __isr_table_entry_ ## func ## _irq_ ## id
                                        ^~~~~~~~~~~~~~~~~~

Issue #92194

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-07-14 07:09:03 -10:00
Daniel DeGrasse
322da1d1a5 release: Zephyr 4.2.0-rc3
Set version to v4.2.0-rc3.

Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-11 20:03:02 -05:00
Derek Snell
09714390f6 drivers: dma: mipi_dbi_nxp_lcdic: enable inputmux clock
To optimize power consumption, the inputmux clock is only enabled when
a signal is attached.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-07-11 13:16:43 -10:00
Gaetan Perrot
dd180c2789 ipc_service: ipc_icbmsg: fix unchecked error in icmsg_open()
Coverity (CID 516253) reported that the return value of
initialize_tx_with_sid_disabled() was set but not used, leading to
potential silent failures.

Check if the return value is negative and propagate the error through the
existing cleanup path.

Fixes: CID 516253

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-11 13:15:04 -10:00
Tomi Fontanilles
e4e8870180 dts: nordic: remove nordic,cryptocell compatible
It's unused.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-07-11 13:14:49 -10:00
Erwan Gouriou
079899cfd5 samples: display: Fix stm32n6570_dk fsbl variant
When adding new fsbl variant this sample Kconfig overlay was missed
leading to non functional sample on this variant.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-07-11 13:14:30 -10:00
Marcin Niestroj
cd17871cfe drivers: udc: stm32: fix USB_OTG_HS_EMB_PHY macro value check
USB_OTG_HS_EMB_PHY macro is always defined, so
`defined(USB_OTG_HS_EMB_PHY)` always results in true. This means that
driver always selected `USB_OTG_SPEED_HIGH_IN_FULL` and never
`USB_OTG_SPEED_HIGH`.

Fix that by checking value of defined macro.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2025-07-11 11:42:33 -10:00
Daniel Leung
f499ea0a58 cmake: apply optimization flags to assembler
Commit 65471a6095 separated
compiler flags into ASM, C and CXX as those flags may not be
universal to both assembler and compiler. Though, with that
separation, the assembler no longer gets the optimization
flags (e.g. speed/size optimizations). So adds this back so
the assembler can optimize the code if it chooses to. For
example, some instructions can be fused together to result
in small code.

Fixes #92439

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-07-11 11:41:29 -10:00
Gaetan Perrot
8a565c0a2b modules: hostap: supp_events: Fix possible null deference
Move usage of ap_ctx pointers after null checks to prevent potential
crashes.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-11 16:32:57 -05:00
Gaetan Perrot
cd855104f2 modules: hostap: hapd_events: Fix possible null deference
Move usage of ap_ctx pointers after null checks to prevent potential
crashes.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-11 16:32:57 -05:00
Gaetan Perrot
b6a5202e55 modules: hostap: supp_api: Fix possible null deference
Ensure 'params' is not NULL before accessing its fields.

Prevents possible null pointer dereference when calling
strlen(params->ssid).

Delay access to ssid->ssid and ssid->ssid_len until after null check.

Prevents potential crash if wpa_s->current_ssid is NULL.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-11 16:32:57 -05:00
Robert Lubos
151295f98e net: sockets: Move socket vtable definition
Offloaded socket implementations need to create the socket operations
vtable, therefore need access to struct socket_op_vtable. So far this
has been defined in a private header, so implementations needed to add
the header location to the include path in CMake.

Therefore, move struct socket_op_vtable definition to the internal part
of the public socket header, so it's no longer needed to include a
private header. This is also more consistent with the rest of the public
header content, as for example macros needed to register a socket
implementation are already there.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-11 16:32:49 -05:00
Dipak Shetty
fd1f4392a6 include: zephyr: bluetooth: uuid: fix typo in characteristic doxygen
Fixes correct GATT characteristic description for Device Time.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-07-11 16:32:39 -05:00
Ilya Tagunov
708c1dc488 linker: arc: add .rodata_in_data section to avoid unexpected placement
The .rodata_in_data section is produced by MWDT toolchain with -Hccm
option enabled. This option moves read-only data from the executable
memory (ICCM) to the data memory (DCCM), improving performance by
reducing conflicts between instruction fetches and data fetches.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2025-07-11 16:32:28 -05:00
Gaetan Perrot
bac20e419e drivers: wifi: nrf_wifi: wifi_mgmt: remove redundant null check
Deleted a redundant check for 'rpu_ctx_zep' pointer after it was already
dereferenced.

Clarifies code logic in nrf_wifi_get_power_save_config function.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-11 16:32:06 -05:00
Pisit Sawangvonganan
acf2d665c1 modules: mbedtls: fix conditional compilation for MBEDTLS_PKCS1_V21
Fix the conditional compilation to use `CONFIG_MBEDTLS_PKCS1_V21`
instead of `CONFIG_MBEDTLS_PKCS1_V15` when enabling `MBEDTLS_PKCS1_V21`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-07-11 16:31:57 -05:00
Benjamin Cabé
defe9ecb25 doc: develop: manifests: external: add zenoh-pico
Introduce documentation for using zenoh-pico as an external module in
Zephyr.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-11 15:54:17 -05:00
sudarsan N
9e7e58fb54 video: common: fix formatting for heap define to fit CI line length
Wrap K_HEAP_DEFINE to fit within 100-character CI limit and apply
consistent spacing.This is a formatting-only change.

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-07-11 15:54:09 -05:00
sudarsan N
af76ac8b9b video: common: prevent divide-by-zero video_closest_frmival_stepwise()
Adds an assertion and runtime log to ensure 'step' is not zero before
using it in division,preventing undefined behavior without modifying
 the public API.

Avoids a signature change (void → int) to preserve API stability for
Zephyr 4.2.A more complete solution can be proposed for 4.3.

CID: 444378

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-07-11 15:54:09 -05:00
Robert Lubos
2c097a4c00 doc: release-notes: Add 4.2.0 release notes for networking
Add 4.2.0 release notes for networking and move the PM section which
somehow ended up inside Networking.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-11 13:44:54 -05:00
Jamie McCrae
066226edd6 doc: release: 4.2: Add MCUmgr changes
Adds new features/APIs for MCUmgr

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-11 13:44:47 -05:00
Jamie McCrae
cd0fb8a75c doc: release: 4.2: Add sysbuild changes
Adds new features for sysbuild

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-11 13:44:47 -05:00
Jamie McCrae
90d7d2c6ff doc: migration: 4.2: Add note on HWMv1
Adds a note that HWMv1 support has now been dropped

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-11 13:44:47 -05:00
Benjamin Cabé
4f0bbb8fda doc: _static: css: fix navtree +/- icon margins
Fixed selectors that probably went stale overtime since the custom.css
was adopted from Godot and RTD having evolved in the meantime and that
were causing +/- icons to expand/collapse the navtree to be putting
margins where they shouldn't have.

Fixes zephyrproject-rtos/zephyr#78974

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-11 13:44:37 -05:00
Benjamin Cabé
ee173abeb3 doc: doxygen: use STRIP_FROM_INC_PATH to keep #includes clean
Another take on zephyrproject-rtos/zephyr#76953.
This uses STRIP_FROM_INC_PATH to make sure #include snippets in the
documentation are not absolute paths and reflect what one would
actually use in their code.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-11 13:44:27 -05:00
Hake Huang
fb9783d880 tests: ztest: add test hold status in DEVICE_PM
for DEVICE_PM and DEVICE_PM_RUNTIME, ztest need
hold status like CONFIG_PM, otherwise the following
flash will be blocked for some SOC

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2025-07-11 13:44:16 -05:00
Szymon Janc
d699e8ccf0 Bluetooth: Host: Make error messages unique
Both bt_le_adv_stop() and bt_le_adv_resume() were logging same
error message. Add aditional context to it so that logs are
distinguishable.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-07-11 08:25:53 -10:00
Chris Friedt
9e5e294ea4 lib: os: clock: fix for CID 529870
Fix for CID 529870, where Coverity found an issue where `timespec.tv_sec`
is never greater than `UINT64_MAX / NSEC_PER_SEC` (18446744073).

This is naturally true when `time_t` is only 32-bit, which is actually
never the case for any Zephyr platform aside from `native_sim/native/32`.

When `time_t` is a signed 64-bit value, at some point in the future, but
maybe not in our lifetimes, `timespec.tv_sec` could exceed 18446744073,
since `INT64_MAX > UINT64_MAX / NSEC_PER_SEC`.

We should not see coverity issues errors like this in the future, once we
have a consistent `time_t` representation across all Zephyr platforms.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-07-11 08:21:46 -10:00
Sylvio Alves
aa7901c078 drivers: spi: esp32c6: fix struct type zeroing
Fix regression caused by memset() replacement to zero volatile struct.
ESP32-C6 data_buf struct differs from other SoCs and needs custom
handling.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-11 08:20:41 -10:00
Chris Friedt
8fd0b704ab drivers: gpio: gpio_pca_series: check return values and exit on error
Check return values and exit on error to address CID 434641.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-07-11 08:19:39 -10:00
Marcin Niestroj
5e25a3e24a drivers: esp_at: fix net_if_get_by_iface() typo
s/net_if_get_by_ifindex/net_if_get_by_iface/

Fixes: 0e57844b2d ("drivers: wifi: esp_at: Bind DNS to device net
  interface")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2025-07-11 08:19:06 -10:00
Gaetan Perrot
3962dab707 arch: arm64: core: fpu: mark unused function argument
Use ARG_UNUSED() to mark unused function argument.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-11 08:18:43 -10:00
Gaetan Perrot
92826ff312 arch: arm64: core: fatal: mark unused function argument
Use ARG_UNUSED() to mark unused function argument.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-11 08:18:29 -10:00
Sylvio Alves
1d44903e23 west.yml: update hal_espressif to fix Wi-Fi issue
Update HAL to fix Wi-Fi issue when SPIRAM is enabled as HEAP.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-11 08:17:12 -10:00
Benjamin Cabé
125b23ba02 twister: harness: power: fix amp to milliamp conversion
Fix amp to milliamp conversion where a 10^4 factor was applied instead
of 10^3.
Adjust existing test cases accordingly (including a small change to one
of the expected RMS values in pm.power_states that either changed
since the test was introduced or was set too aggressively back then).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-11 08:16:58 -10:00
Benjamin Cabé
4f747cea90 doc: release-notes-4.2: update highlights sections
Add a few bullet points calling out the major highlights of Zephyr 4.2.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-11 08:16:46 -10:00
Chaitanya Tata
a869c3e3a3 manifest: hostap: Pull fix for warning in interface down
Fix a warning seen during interface down.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-11 08:16:34 -10:00
Sylvio Alves
7b240d4fd4 soc: espressif: cleanup unused linker entries
Remove linker entries that are either not associated
with any functions or are redundant.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-11 08:16:19 -10:00
Christoph Winklhofer
d5354449be json: fix encoding of string null pointer
A segmentation fault occurs when a zero initialized struct with a string
field (JSON_TOK_STRING) is encoded. Encode a string null pointer as an
empty JSON string "".

Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-07-11 08:15:36 -10:00
Lars-Ove Karlsson
2a9be50c29 toolchain: compiler: IAR does not allow vla with C++
Fixed a problem where the command line option --vla was used
with C++ causing a command line error in the IAR ICCARM compiler.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2025-07-11 08:14:12 -10:00
Tim Pambor
970c715ef4 sys: cbprintf: Suppress bugprone-sizeof-expression
clang-tidy reports a bugprone-sizeof-expression warning for
sizeof((__v)) when __v is a pointer type. This is a false-positive
in contexts like logging with %p, where using a pointer is
intentional and expected.

Add a NOLINT comment to suppress the warning in static analysis.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-11 09:41:50 -05:00
Tim Pambor
9f5492acec sys: cbprintf: Fix performance-no-int-to-ptr warning
clang-tidy reports a performance-no-int-to-ptr warning due to the cast
(const char *)(uintptr_t)(v).

Previously, only char * was cast to const char *, but there's no downside
to constifying all pointer types.

This change updates the Z_CONSTIFY macro to apply const consistently,
which even aligns better with its name and resolves the warning.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-11 09:41:50 -05:00
Thomas Altenbach
6aeb12d558 drivers: flash: stm32_qspi: Fix flash not reset when in QPI mode
The reset commands were sent only in SPI mode, causing the device not to
be properly reset when in QPI mode. On the STM32H747I-DISCO boards, this
was causing the driver initialization to fail due to a bad SFDP magic
after flashing the external memory using STM32CubeProgrammer since the
external loader is configuring the flash memory in QPI mode.

The commands are sent in QPI mode first, then in SPI mode:
- If the flash memory was in QPI mode, the two first reset commands are
  processed and after reset, the flash memory is in SPI mode and
  correctly handles the SPI mode reset commands.
- If the flash memory was in SPI mode, for each QPI command the chip
  select signal will be released before the flash memory had the
  opportunity to receive a whole command (1 byte), so the partially
  received commands will be ignored and won't cause any harm. Then, the
  chip is reset by the commands sent in SPI mode.

Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
2025-07-11 09:41:38 -05:00
Georgios Vasilakis
0081207078 samples: tfm: tfm_psa_test: Add temporary isolation workaround
Add a workaround which sets the isolation level to 2 in CMake.
The TF-M tests require the large TF-M profile because it supports
the full list of crypto algorithms needed, not because of the
solation level.

For the TF-M tests the isolation level is irrelevant so we
set it to 2 here so that we don't exclude the platforms which
don't support the isolation level 3.

I communicated with a TF-M maintainer and he informed me that this
workaround will be included in the TF-M 2.2 release branch later
so this is a short lived workaround that can be reverted when the
relevant commit from the TF-M branch is cherry-picked.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2025-07-11 09:41:26 -05:00
Declan Snyder
9166d6ac7b spi_mcux_dspi: Hotfix for failing null rx test
This is not really high priority to support and is disrupting test
reporting, for now just hotfix the test by returning that this is not
supported, it's not really necessary anyways, there's multiple ways to
call the API to achieve the same effect.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-11 09:41:14 -05:00
Declan Snyder
a622070a24 dma_mcux_edma: Remove header file
There is really no need for this header file at all besides if
there is a requirement to be annoying.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-11 09:41:14 -05:00
Declan Snyder
b3083dac07 spi_mcux_dspi: Return error if data update fails
This data update returns an error, we should propogate it where it is
called if there is an error returned.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-11 09:41:14 -05:00
Declan Snyder
a94a16c454 dma_mcux_edma: Abort transfer before clear status
The transfer must be aborted before clearing the status flags otherwise
they will be set again before the transfer is aborted and stay set
causing infinite interrupt.

Also, elevate the log message to error level and give it actual useful
information. The "flag" being logged before literally just is a bit that
says if there is an error or not, which we already know by virtue of
handling an error. The channel error status has actual details about
what was the reason of the error. Also this status should be reported
before the transfer is aborted to get the right status.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-11 09:41:14 -05:00
Tomasz Moń
d590d27ec9 drivers: udc_dwc2: Set EP0 IN CNAK only when necessary
Adhere to Programming Guide with regards to when the DIEPCTL0.CNAK is
set. This allows the driver to survive abusive control transfers with
extremely short host timeouts.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-07-11 09:41:04 -05:00
Khaoula Bidani
bcbe5f3b26 tests: drivers: spi_loopback: add latency tolerance for nucleo_u385rg_q
Set a convenient latency for nucleo_u385rg_q

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-07-11 09:40:47 -05:00
Erwan Gouriou
97608e4cc0 boards: stm32n6570_dk: Disable cache on PSRAM
For unclear reason yet, cache activation on PSRAM causes stability issues
when using LTDC.
Disable cache for now.
We'll re-enable once the issue is better understood and fixed.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-07-11 09:40:37 -05:00
Ilya Tagunov
e22ca6b132 libc: arcmwdt: grant all threads access to stdio locks
Some of the locks are created in supervisor mode (i.e. stdout one),
but should be accessed from user mode too. Unfortunately, there is
no way to distinguish these locks, so grant the access to all of them
as the actual reads and writes should end up as syscalls anyway.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2025-07-10 19:54:27 -05:00
Ilya Tagunov
bba649156c libc: arcmwdt: require static initializers
The ARC MWDT C library puts some constructors into .ctors section
to initialize its internal stdio locks. Enable the initializers
to make sure these constructors are actually executed.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2025-07-10 19:54:22 -05:00
Nidhal BEN OTHMEN
6a0d019417 manifest: Update hal_stm32 module with updated license file
Update hal_stm32 module with updated license file.
Impacted source/headers files were updated also.

Signed-off-by: Nidhal BEN OTHMEN <nidhal.benothmen@st.com>
2025-07-10 16:13:06 -05:00
Josuah Demangeon
2aba7112cb doc: release-note-4.2: add new video-related API
Document new API introduced for video drivers as visible on the
<zephyr/drivers/video.h> header.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-10 16:07:27 -05:00
Josuah Demangeon
4f585fd7f5 doc: migration-guide-4.2: add video-related API changes
Document API changes affecting video drivers as visible on the
<zephyr/drivers/video.h> header.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-10 16:07:27 -05:00
Josuah Demangeon
424ad06a33 doc: release-notes-4.2: improve formatting of video notes
Use :c:func:`xxx` and :c:type:`xxx` when applicable, as well as reword
a deprecation to make the replacement appear.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-10 16:07:27 -05:00
Josuah Demangeon
cce8e488d1 doc: migration-guide-4.2: improve formatting of video-related notes
Use :c:func:`xxx` and :c:enum:`xxx` instead of plain ``xxx`` when it is
possible.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-10 16:07:27 -05:00
Josuah Demangeon
d4914965d8 doc: releases: mention the video selection API functions
Add a mention to the video_set_selection() and video_get_selection()
introduced in #91878.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-10 16:07:27 -05:00
Benjamin Cabé
7561eff012 doc: _doxygen: fix doxygen awesome dark theme
Fix issues with Doxygen 1.14 and dark theme. Upstream PRs to
doxygen-awesome will be submitted in parallel.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-10 16:07:18 -05:00
Flavio Ceolin
4591461b55 doc: vuln: Add CVE under embargo
Add an entry to CVE-2025-7403

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-07-10 16:07:10 -05:00
Flavio Ceolin
fe9b1f557f doc: release/4.2: Add CVE under embargo
Add information about CVE under embargo.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-07-10 16:07:10 -05:00
Andrey Dodonov
1c0608dc02 net: http: service: check for uncompressed file correctly
Correct not resetting compression extension,
when checking for an uncompressed file,
in case if compression is enabled, but no compressed file found.

Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2025-07-10 16:01:47 -05:00
Benjamin Cabé
cae12e6d6a doc: twister: inline twister --help output into the docs
In order to make it easier for folks to discover available twister
options when using/searching the documentation, or when making external
search in their favorite search engine, inline the output of
`twister --help` into the docs so as to have an always up-to-date
and searchable snapshot of it.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-10 16:01:34 -05:00
Guillaume Gautier
70b910981d drivers: pwm: stm32: fix four channel pwm capture
With the four-channel-capture-support property enabled, the STM32 PWM
driver was missing every other frames during PWM capture.

The counter values are now reset just after getting the pulse and the
period of the cycle, instead of waiting the next interrupt to do so, and
thus missing a cycle.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-07-10 16:01:23 -05:00
Lucas Tamborrino
79f599ace4 drivers: lp uart: fix initialization
Fix initialization after HAL update

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2025-07-10 16:01:11 -05:00
Robert Lubos
4872527605 net: coap_client: Don't send RST on unrecognized ACK response
According to CoAP RFC (7252, ch. 4.2), Reset cannot be sent in a
response for an ACK reply, rejected ACKs should be silently ignored
instead. Therefore, in case an unrecognized response is received, verify
the response type before sending Reset.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-10 16:01:03 -05:00
Gaetan Perrot
3ff4d051ca drivers: clock_control: Remove unused 'sys' argument
The 'sys' argument in clock_control_renesas_ra_get_rate() is unused and
has been removed to clean up the implementation.

This also aligns with the function's actual behavior and eliminates
misleading validation logic.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-10 16:00:52 -05:00
Guillaume Gautier
d2e8d0a00e drivers: spi: context: check that config exists before reading it
Function spi_context_release reads the content of ctx->config without
checking first if it is set. In many drivers (including STM32), when a bad
configuration is made for the first transaction, ctx->config is not set,
and spi_context_release is called, resulting in hard fault.

This commit adds a check that ctx->config exists before reading it to
avoid this problem.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-07-10 16:00:42 -05:00
Flavio Ceolin
1de500e89f kconfig: hardenconfig: Add support for insecure option
Treat insecure options in Kconfig options.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-07-10 16:00:26 -05:00
Flavio Ceolin
979fcc0b6e hostap: Set enterprise crypto insecure
Set enterprise crypto insecure because certifcate validation
is disabled.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-07-10 16:00:26 -05:00
Flavio Ceolin
674fd094aa build: kconfig: Add support for warning insecure features
Add a new promptless Kconfig symbol (INSECURE). This symbols must
be selected by any setting which is used to enable an insecure
feature.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-07-10 16:00:26 -05:00
Vitaliy Livnov
e6894ad576 drivers: can: sam0: fix clock configuration for SAM0 series
Fixed a bug where unconfigured clocks were connected to the can
interface in the device tree for SAM0, causing the interface to work
incorrectly. Fixed by adding the correct index when calling GENCTRL.
Also, the default divider has been reduced to 6 to allow setting
the bitrate to 500 kbps.

Tested on a canopennode sample on a board with an ATSAMC21E18A
microcontroller.

Signed-off-by: Vitaliy Livnov <vitaliy.livnov@devkit.agency>
2025-07-10 15:53:46 -05:00
IBEN EL HADJ MESSAOUD Marwa
e1248eff82 drivers: clock_control: set voltage scaling before PLL
Move the call to prepare_regulator_voltage_scale()
before PLL setup in clock_stm32_ll_h7.c.

This ensures the voltage regulator is configured
to the appropriate voltage scale before increasing
the system clock frequency via PLLs.
Without this change, the system configuration
may be out of spec.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-07-10 15:49:59 -05:00
cyliang tw
553fc84e77 drivers: spi: fix numaker spi auto cs control
As while there is no cs_gpio, it should enable H/W auto cs control.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2025-07-10 10:14:25 -05:00
Jiafei Pan
255e7f960b drivers: gpio: pca6416: fix dt get id
It should use "n" but not use "inst".

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-07-10 10:14:16 -05:00
Martin Hoff
1ede94dda3 doc: releases: introduce release notes and migration guide docs for 4.3
This introduces the release notes and migration guide for Zephyr 4.3.0
earlier so that people have a placeholder to start adding content as
they line up pull requests for the 4.3 release.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-07-10 10:13:58 -05:00
Simon Piriou
932005abf2 net: l2: ieee802154: mgmt: fix net_pkt leaks
The ieee802154_radio_send() function does not decrease reference counter
of the net_pkt, it's instead done one layer above in ieee802154_send().
This commit updates the mgmt functions using ieee802154_radio_send() to
always free the used net_pkt afterward.

Signed-off-by: Simon Piriou <spiriou31@gmail.com>
2025-07-10 10:13:35 -05:00
Loic Domaigne
28f37e522a drivers: crypto: crypto_ataes132a fix memset undefined behavior
Coverity reported a memory - illegal accesses when using memset in
ataes132a_aes_ecb_block(). This can happen when the input block is
exactly 16 bytes: memset(&param_buffer[19], 0x0, 0) is called. But this
is an undefined behaviour in C even if size is 0, as &param_buffer[19]
is an invalid pointer.

The fix consists of simply skipping memset() in this case, since there's
nothing to zero out.

Coverity CID: 434642

Signed-off-by: Loic Domaigne <tech@domaigne.com>
2025-07-10 10:13:17 -05:00
Thomas Altenbach
81f95f15fa drivers: flash: stm32_qspi: Fix flash configuration in dual flash mode
When the QSPI is used in dual flash mode, e.g. on the STM32H747I-DISCO
board, only the first flash memory was reset and configured in 4-byte
addressing mode. This was in particular causing data to be incorrectly
read from the second flash memory and only even bytes were valid during
a read.

The dual flash mode was only enabled after reading the SFDP table since
it is desired to read the table of only one flash memory, not both.

This commit changes the driver to only disable the dual mode temporarily
while reading the SFDP table, ensuring all other commands and in
particular configuration commands are sent to both flash memories.

Signed-off-by: Thomas Altenbach <altenbach.thomas@gmail.com>
2025-07-10 10:13:06 -05:00
Chaitanya Tata
d5c7cb171b manifest: nrf_wifi: Pull fix for raw TX memory leak
Fixes memory leak seen during continuous raw TX transmission.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-10 10:12:44 -05:00
Luis Ubieda
07c1d010f7 shell: spi: fix typo on spi cs command
Copy-paste error fixed from help text.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-10 10:12:31 -05:00
Jiawei Yang
ff112b5e05 tests: Bluetooth: BR: Add test suite RFCOMM_client
IUT works as an RFCOMM Client. The peer device, RFCOMM server, is a PC
running bumble.

Add following test cases:

Case 6, RFCOMM MTU Size Data Send/Receive Test. To verify that the RFCOMM
client can correctly send and receive data packets that are exactly equal
to the negotiated MTU size.

Case 7, RFCOMM Data Transfer Exceeding MTU Size Test. To verify that the
RFCOMM client can reject sending and receiving data packets that exceed
the negotiated MTU size.

Case 8, RFCOMM Disconnect and Reconnect Test. To verify that the RFCOMM
client can properly handle a normal RFCOMM disconnection and successfully
reestablish the connection.

Case 9, RFCOMM Recovery After ACL Disconnection Test. To verify that the
RFCOMM client can properly recover when the underlying ACL connection is
abruptly disconnected, by reestablishing both ACL and RFCOMM connections.

Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
2025-07-10 10:12:20 -05:00
Mark Wang
a7822079dc tests: bluetooth: add test case that sdp client l2cap connecting fail
test the sdp request callback is called when sdp l2cap connecting fail.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-07-10 10:11:59 -05:00
Can Wang
d56f1e018d tests: Bluetooth: BR: Add test suite of bonding for SMP
IUT works as an SM Initiator/Responder. The peer device,
SM Responder/Initiator, is a PC running bumble on it.

Add shell commands to create and manage L2CAP server and channel with
different security level.

In the test suite, there are 5 test cases. The test matrix combines
each bonding flag:
| Test Case ID | Initiator | Responder | Expected Result |
|--------------|-----------|-----------|-----------------|
| BR_SM_Bonding_INIT_001 | Non-bondable | Non-bondable | Pass |
| BR_SM_Bonding_INIT_005 | General Bonding | General Bonding | Pass |
| BR_SM_Bonding_RSP_010 | Non-bondable | Non-bondable | Pass |
| BR_SM_Bonding_RSP_011 | General Bonding | Non-bondable | Fail |
| BR_SM_Bonding_RSP_014 | General Bonding | General Bonding | Pass |

Signed-off-by: Can Wang <can.wang@nxp.com>
2025-07-10 10:11:38 -05:00
Can Wang
9937be7c30 tests: Bluetooth: BR: Add general test suite for SMP
IUT works as an SM Initiator/Responder. The peer device,
SM Responder/Initiator, is a PC running bumble on it.

Add shell commands to create and manage L2CAP server and channel with
different security level, reboot the board, and transfer data on the
SDP channel.

In the test suite, there are 28 test cases to verify SMP functions.
The test case list is:
- BR_SM_INIT_001: Basic Pairing with No Input No Output Capability
- BR_SM_INIT_002: Pairing with Display Only Capability
- BR_SM_INIT_003: Pairing with Keyboard Only Capability
- BR_SM_INIT_005: L2CAP Connection Failure After Successful Pairing
- BR_SM_INIT_006: L2CAP Server with Incoming Connection
- BR_SM_INIT_008: ACL Disconnection During Pairing
- BR_SM_INIT_011: Repeated Pairing Between Same Devices
- BR_SM_INIT_012: Security Level Escalation
- BR_SM_INIT_013: Multiple Channel Establishment
- BR_SM_INIT_017: Pairing Rejection by Remote Device
- BR_SM_INIT_018: Pairing Timeout
- BR_SM_INIT_021: Authentication Failure during Pairing
- BR_SM_INIT_022: Secure Connection vs. Legacy Pairing Fallback
- BR_SM_INIT_025: Rejection of Weak Pairing Methods
- BR_SM_INIT_028: Reconnection After Key Deletion
- BR_SM_INIT_029: Pairing with Delayed Response
- BR_SM_INIT_030: Stress Testing with Multiple Connect/Disconnect Cycles
- BR_SM_INIT_032: Power Loss Recovery
- BR_SM_INIT_034: Pairing During Active Data Transfer
- BR_SM_INIT_035: Pairing with Very Long PIN/Passkey
- BR_SM_INIT_037: Pairing with Peripheral Requesting Maximum Key Size
- BR_SM_INIT_039: Security Level Downgrade Attempt
- BR_SM_RSP_001: Basic Non-bondable Pairing with No Input No Output
- BR_SM_RSP_002: Display Only with Secure Connection
- BR_SM_RSP_003: Keyboard Only with Dedicated Bonding
- BR_SM_RSP_006: Security Level Enforcement
- BR_SM_RSP_008: L2CAP Connection with Security Level 1
- BR_SM_RSP_009: L2CAP Server with Security Level 2

Signed-off-by: Can Wang <can.wang@nxp.com>
2025-07-10 10:11:22 -05:00
Can Wang
f4257e1318 tests: Bluetooth: BR: Add test suite of SC Only Mode for SMP
IUT works as an SM Initiator/Responder. The peer device,
SM Responder/Initiator, is a PC running bumble on it.

Add shell commands to create and manage L2CAP server and channel with
different security level.

In the test suite, there are 10 test cases. IUT is configured
with Secure Connections Only Mode. The peer device is configured with
Secure Connections Mode or Legacy Mode. The test matrix is:
| Case ID | Secure Connection Option | Security Level | Expected Result |
|---------|--------------------------|----------------|-----------------|
| BR_SM_SC_INIT_005 | SC Only with SC | Level 4 | Pass |
| BR_SM_SC_INIT_006 | SC Only with SC | Level 1 | Fail |
| BR_SM_SC_INIT_007 | SC Only with SC | Level 2 | Fail |
| BR_SM_SC_INIT_008 | SC Only with SC | Level 3 | Fail |
| BR_SM_SC_INIT_009 | SC Only with Legacy | Level 3 | Fail |
| BR_SM_SC_RSP_005 | SC Only with SC | Level 1 | Fail |
| BR_SM_SC_RSP_006 | SC Only with SC | Level 2 | Fail |
| BR_SM_SC_RSP_007 | SC Only with SC | Level 3 | Fail |
| BR_SM_SC_RSP_008 | SC Only with SC | Level 4 | Pass |
| BR_SM_SC_RSP_009 | SC Only with Legacy | Level 3 | Fail |

Signed-off-by: Can Wang <can.wang@nxp.com>
2025-07-10 10:11:01 -05:00
Can Wang
5e8046df2e tests: Bluetooth: BR: Add test suite of IO Capability for SMP
IUT works as an SM Initiator/Responder. The peer device,
SM Responder/Initiator, is a PC running bumble on it.

Add shell commands to create and manage L2CAP server and channel with
different security level.

In the test suite, there are 32 test cases. The peer device is
configured with "Display YesNo" IO capability. The test matrix
combines each local IO capability with each security level requirement:

| Case ID | Local IO Capability | Security Level | Expected Outcome |
|---------|---------------------|----------------|------------------|
| BR_SM_IO_CAP_INIT_001 | No Input No Output | Level 1 | Success |
| BR_SM_IO_CAP_INIT_002 | No Input No Output | Level 2 | Success |
| BR_SM_IO_CAP_INIT_003 | No Input No Output | Level 3 | Failure |
| BR_SM_IO_CAP_INIT_004 | No Input No Output | Level 4 | Failure |
| BR_SM_IO_CAP_INIT_005 | Display Only | Level 1 | Success |
| BR_SM_IO_CAP_INIT_006 | Display Only | Level 2 | Success |
| BR_SM_IO_CAP_INIT_007 | Display Only | Level 3 | Failure |
| BR_SM_IO_CAP_INIT_008 | Display Only | Level 4 | Failure |
| BR_SM_IO_CAP_INIT_009 | Keyboard Only | Level 1 | Success |
| BR_SM_IO_CAP_INIT_010 | Keyboard Only | Level 2 | Success |
| BR_SM_IO_CAP_INIT_011 | Keyboard Only | Level 3 | Success |
| BR_SM_IO_CAP_INIT_012 | Keyboard Only | Level 4 | Success |
| BR_SM_IO_CAP_INIT_013 | Display YesNo | Level 1 | Success |
| BR_SM_IO_CAP_INIT_014 | Display YesNo | Level 2 | Success |
| BR_SM_IO_CAP_INIT_015 | Display YesNo | Level 3 | Success |
| BR_SM_IO_CAP_INIT_016 | Display YesNo | Level 4 | Success |
| BR_SM_IO_CAP_RSP_001 | No input No output | Level 1 | Success |
| BR_SM_IO_CAP_RSP_002 | No input No output | Level 2 | Success |
| BR_SM_IO_CAP_RSP_003 | No input No output | Level 3 | Failure |
| BR_SM_IO_CAP_RSP_004 | No input No output | Level 4 | Failure |
| BR_SM_IO_CAP_RSP_005 | Display Only | Level 1 | Success |
| BR_SM_IO_CAP_RSP_006 | Display Only | Level 2 | Success |
| BR_SM_IO_CAP_RSP_007 | Display Only | Level 3 | Failure |
| BR_SM_IO_CAP_RSP_008 | Display Only | Level 4 | Failure |
| BR_SM_IO_CAP_RSP_009 | Keyboard Only | Level 1 | Success |
| BR_SM_IO_CAP_RSP_010 | Keyboard Only | Level 2 | Success |
| BR_SM_IO_CAP_RSP_011 | Keyboard Only | Level 3 | Success |
| BR_SM_IO_CAP_RSP_012 | Keyboard Only | Level 4 | Success |
| BR_SM_IO_CAP_RSP_013 | Display YesOrNo | Level 1 | Success |
| BR_SM_IO_CAP_RSP_014 | Display YesOrNo | Level 2 | Success |
| BR_SM_IO_CAP_RSP_015 | Display YesOrNo | Level 3 | Success |
| BR_SM_IO_CAP_RSP_016 | Display YesOrNo | Level 4 | Success |

Signed-off-by: Can Wang <can.wang@nxp.com>
2025-07-10 10:10:30 -05:00
Jiawei Yang
bea02a639b tests: Bluetooth: BR: Add test suite RFCOMM_server
IUT works as an RFCOMM Server. The peer device, RFCOMM Client, is a PC
running bumble on it.

Add shell commands to create and manage RFCOMM server with different
flow control mechanisms.

In the test suite, there are seven test cases:
Case 1: RFCOMM Server - Reject RFCOMM Session. IUT should properly
reject incoming RFCOMM session when BR connection is disconnected.
Case 2: RFCOMM Server - Forward compatible with Bluetooth devices that
do not send PN command. IUT should properly handle this case and use
FCON/FCOFF as flow control.
RPN, Test) and send NSC responses
Case 3: RFCOMM Server - Respond to Control Commands After DLC
Establishment. IUT should properly respond to control commands (RLS,
RPN, Test) and send NSC responses.
Case 4: RFCOMM Server - Information Transfer with Aggregate Flow
Control. IUT should handle information transfer with aggregate flow
control and properly issue flow control signals.
Case 5: RFCOMM Server - Information Transfer with Credit Based Flow
Control and Active Disconnection. IUT should handle credit-based flow
control and actively disconnect DLC.
Case 6: RFCOMM Server - Information Transfer with Credit Based Flow
Control and Passive Disconnection. IUT should handle credit-based flow
control and respond to DLC disconnection.

Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
2025-07-10 10:09:13 -05:00
Titan Chen
7a8bd3dbe7 soc : realtek: ec: rts5912: fix VIN polarity issue
fix ulpm driver polarity issue.
when pin-pol set to falling need to set the POL bit to 1.
when pin-pol set to rising need to set the POL bit to 0.

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-07-09 17:18:59 -05:00
Eve Redero
91c71dde8a doc: drivers: display: add basic controller info
Add basic controller information (techno, resolution, color depth...)
for display drivers.

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2025-07-09 17:18:39 -05:00
Declan Snyder
f7853dfb16 tests: spi_loopback: Fix same_buf_cmd test
The tests was written wrong. It was meant to test using same spi bufs
for both rx and tx, as in tree many sensor and other spi device drivers
use this paradigm. But the 2nd buf setup call was overwriting the first.
Fix by not using the helper function for this case.

And for the write back test, test using same spi_buf_set.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-09 17:18:22 -05:00
Fabrice DJIATSA
1804eb7bc3 drivers: i2c: stm32: exclude stm32f7 family for PM
The STM32F7 family does not yet support power management in Zephyr.

Besides, LL_I2C_EnableWakeUpFromStop and LL_I2C_DisableWakeUpFromStop

are not implemented in the H7 HAL/LL drivers

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-07-09 17:16:16 -05:00
Khaoula Bidani
09778c36eb samples: sysbuild: update list of platforms
Add nucleo_u385rg_q boards to test the MCUboot builds.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-07-09 17:15:56 -05:00
Khaoula Bidani
d469eb3a8d soc: stm32u3: Update ROM_START_OFFSET
Update offset to 0x400 o align with MCUboot image.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-07-09 17:15:56 -05:00
Khaoula Bidani
926bf82ca3 boards: st: nucleo_u385rg_q: add flash partition
Define fixed partitions for bootloader (mcuboot),
primary and secondary images, and storage.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-07-09 17:15:56 -05:00
Khaoula Bidani
f02dc0d5e0 dts: arm: st: u3: fix flash erase block size and max erase time
- Change erase-block-size from 8192 to 4096 bytes to match
the 4 KB page size of STM32U3 flash.
- Update max-erase-time from 5 ms to 14 ms according to
datasheet specifications.
- These changes ensure correct flash erase behavior
and timing on STM32U3 devices.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-07-09 17:15:56 -05:00
Magdalena Pastula
df52ba87d8 tests: drivers: mspi: api: make test generic
Add definition of MSPI_PORT for other platforms to make the test
generic.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2025-07-09 17:15:19 -05:00
Van Petrosyan
4834201124 dts: bindings: mark power gpio in bg95 as optional
The Quectel BG95 binding currently marks mdm-power-gpios as
required.  This fits designs that expose the PWRKEY pin, but the
BG95-M3 in Mini PCIe form-factor boots automatically via its
on-module “Automatic Power-On Circuit” and does not route
PWRKEY to the card edge.

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
2025-07-09 17:14:59 -05:00
Sylvio Alves
61147a3841 drivers: spi: esp32: fix volatile array zeroing to use explicit loop
Replace memset() with an explicit loop to zero the data_buf array,
which is part of a volatile struct. Standard memset does not guarantee
volatile stores, which can lead to incorrect hardware access.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-09 17:14:04 -05:00
Sylvio Alves
a7a4583e15 soc: esp32: loader: skip non-valid segment after the last valid one
Some ESP32 images may not end with a segment whose
load_addr is 0xFFFFFFFF, especially if the flash was not fully
erased or the image tool does not write an explicit end marker.
This can cause the loader to process leftover or unrelated data as
additional segments, resulting in boot failures.

Update the IS_LAST() macro to treat any segment not matching
a valid memory region as the end of the segment list.
This ensures only valid segments are loaded and any trailing
invalid data is safely skipped.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-09 17:13:54 -05:00
Mai Shimozato
0f8b7b7443 stdlib : strtoll : fix strtoll overflow handling with unsigned accumulator
ensure correct assignment of overflow values to unsigned accumulator

Signed-off-by: Mai Shimozato <mshimozato@tenstorrent.com>
2025-07-09 09:44:48 -05:00
Philipp Steiner
aa8b259167 samples: fuelgauge: resolve_merge_artifacts
moves adafruit_feather_esp32s3_tft_reverse_procpu.conf file
to the correct folder after PR was merged.

Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
2025-07-09 09:44:35 -05:00
Khaoula Bidani
618044ed78 drivers: clock_control: fix PLL input frequency
Correct PLL input frequency calculation to consider
HSI clock divider in clock_stm32_ll_h7.c file.
For sake of simplicity, use PLLSRC_FREQmacro that
already considers the HSI clock divider when applicable.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-07-09 09:44:25 -05:00
Guennadi Liakhovetski
05616c51b6 posix: fix posix clock undefined type
When built with the minimal libc while using POSIX clocks, Zephyr
compilation breaks with "error: unknown type name 'clockid_t'." Use
int instead of clockid_t to eliminate the dependency.

Suggested-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-07-09 09:43:52 -05:00
Gaetan Perrot
99b988b865 tests: arch: arc: arc_vpx_lock: remove unused variable
Remove the unused variable 'lock_id' from main.c in the arc_vpx_lock test.

No functional change intended.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-09 09:43:25 -05:00
Lyle Zhu
e4569c434a Bluetooth: Classic: L2CAP: Fix retransmission timer restarting
When received the valid S frame, the retransmission timer should not
be restarted if unacknowledged I-frames have been sent but the
retransmission timer has not elapsed.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-07-09 09:43:12 -05:00
Vinayak Kariappa Chettimada
f6495d8b43 Bluetooth: Controller: Fix Tx Ack FIFO index corruption under race
Fix Tx Ack FIFO's first index being advanced beyond a
recorded ack_last value in a node_rx when under race
between ll_rx_get() being pre-empted while executing the
`tx_cmplt_get()` and a call to `ll_rx_put()` in an
interrupt service routine.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-07-09 09:42:58 -05:00
Josuah Demangeon
e0b706b6c6 drivers: video: stm32_dcmipp: move video/ header directory to drivers/
During #89407 a driver-specific header stm32_dcmipp.h got introduced to
support new functionnalities not yet covered by video APIs.
Move this header into a new <include/zephyr/drivers/video/> include
direcctory like what other driver classes do.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-09 09:42:43 -05:00
Simon Piriou
732a3a5c66 net: l2: ieee802154: shell: fix scan argc validation
Bump the argc check from 3 to 4 as the shell scan command has 3 required
parameters, the last being the scan duration:
- argv[0]
- passive|active
- channels
- per-channel duration in ms

Signed-off-by: Simon Piriou <spiriou31@gmail.com>
2025-07-09 00:26:29 -05:00
Gaetan Perrot
503011d0a2 arch: arm: core: cortex_a_r: mark unused function argument
Use ARG_UNUSED() to mark unused function argument.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-09 00:26:17 -05:00
Gaetan Perrot
3aa477ba2e arch: arm: core: cortex_a_r: mark unused function argument
Use ARG_UNUSED() to mark unused function argument.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-09 00:25:52 -05:00
Filip Stojanovic
f0b5911d0a sensor: bme280: Fix bad chip id read after power cycle
Fix an issue where the BME280 sometimes returns an incorrect chip ID
immediately after a power cycle. This causes sensor initialization to fail.

According to the datasheet, the sensor requires a 2 ms start-up delay after
power is applied. This patch introduces a sleep delay to ensure the
required start-up time is respected before reading the chip ID.

Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
2025-07-09 00:25:33 -05:00
Jordan Yates
9245f58b4c modules: hostap: fix connection termination report
If the disconnect event is raised before the network has been connected,
report the connection result as `WIFI_STATUS_CONN_FAIL`, instead of as
`WIFI_REASON_DISCONN_SUCCESS`, which is interpretted as
`WIFI_STATUS_CONN_SUCCESS`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-07-09 00:24:36 -05:00
Emilio Benavente
0bdb9595b1 drivers: misc: mcux_flexio: Set the DOZEN bit
Setting the DOZEN bit in the flexio so the soc
does not force the peripheral to go into
low power mode when the soc is in idle.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-07-09 00:24:14 -05:00
Fin Maaß
809c855a62 mcuboot: cmake: only set write_block_size when needed
only set write_block_size when needed and don't output
a warning, when it's not needed

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-08 18:35:44 -05:00
Luis Ubieda
b0caaed43b rtio: workq: Restructure workqueue as a threads pool with a queue
Based on a discussion around P4WQ limitations for our application, it
was determined that the RTIO workqueue required the ability to use
additional threads from the pool in spite of work items blocked.
Since this is not covered, nor desired for the P4WQ, then remove this
dependency and re-implement it in a way that covers also this use-case.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-08 18:35:26 -05:00
Luis Ubieda
ee44416d88 tests: rtio: workq: Add test-case for same-prio items
Processed on separate worker threads. This test is expected to fail
as the P4WQ limits the number of active items assigned to worker
threads to the number of CPU cores the system has.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-08 18:35:26 -05:00
Gaetan Perrot
3e9eea2cc1 arch: arm: core: cortex_m: mark unused function argument
Use ARG_UNUSED() to mark unused function argument.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-08 18:35:14 -05:00
Gaetan Perrot
eb7fe02aac arch: arm: core: elf: mark unused function argument
Use ARG_UNUSED() to mark unused function argument.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-08 18:35:00 -05:00
Gaetan Perrot
a4fc6723ac arch: arm: core: cortex_m: mark unused function argument
Use ARG_UNUSED() to mark unused function argument.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-08 18:34:49 -05:00
Oleh Kravchenko
35b8ff43f4 soc: stm32f1x: Remove redundant code and clear SB flag
There is no need to call stm32_pwr_wkup_pin_cfg_pupd() because
the SoC does not have a pull-up/pull-down on the WKUP pin.

Call LL_PWR_ClearFlag_SB() before entering StandBy power mode.

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
2025-07-08 18:34:22 -05:00
Anas Nashif
ce119f5d07 tracing: do not mark thread as switched_out in case of no reschedule
If z_get_next_switch_handle determines no reschdule is needed, do not
mark thread as switched_out in set_curent() where new and old thread are
the same.

See zephyrproject-rtos/zephyr#88596 for more details.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-08 18:34:11 -05:00
Anas Nashif
7f282f7928 xtensa: tracing: instrument thread switching
Add missing call to thread_switched_in for the purpose of tracing.

Fixes zephyrproject-rtos/zephyr#76057

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-08 18:34:11 -05:00
Petri Pitkanen
808ee1713d drivers: bluetooth: silabs: Fix indicating support for 2M phy
Previously we always had driver to support 2M PHY regardless of
configuration. As this was fixed the missing support statemenent
caused 2M support to miss regardless of configuration.

Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
2025-07-08 13:44:51 -05:00
Loic Domaigne
a0a47a4b6d Bluetooth: ASCS: fix uninitialized pointer read
Fix uninitialized pointer read reported by Coverity.
Coverity CID: 529879

Signed-off-by: Loic Domaigne <tech@domaigne.com>
2025-07-08 13:44:37 -05:00
Gaetan Perrot
36fe97f2ee samples: net: mqtt_sn_publisher: Remove shadowed variable
Avoids shadowing the outer 'err' variable by reusing it instead of
redeclaring it inside a conditional block.

This improves code readability.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-08 13:44:28 -05:00
Conor Paxton
404c43af6e lib: smf: fix function name typo "share_paren"
looks like a typo and should be share_parent. quick fix

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2025-07-08 13:41:59 -05:00
Anas Nashif
f5e9586d42 MAINTAINERS: fix labels for intel platforms
'platform: Intel' goes to general X86 platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-08 13:41:48 -05:00
Lyle Zhu
d48e2bb4f4 Bluetooth: Classic: L2CAP: Fix issue that pending chan cannot be sent
When the returned buffer is a `NULL` of the pull function, it means
there is not any data needs to be sent. However maybe there is any
frame pending on other L2CAP channel needs to be sent over the same
ACL connection.

Re-trigger the TX processor. It will call the pull function again
and the pending buffer will be pulled from following L2CAP.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-07-08 13:41:39 -05:00
Marcin Szymczyk
d487601379 MAINTAINERS: exclude Wi-Fi related drivers from nRF Platform
Separate entry (see `Drivers: Wi-Fi as nRF Wi-Fi`) handles
Wi-Fi related reviews. Add files-exclude to decrease noise.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-07-08 13:41:28 -05:00
Jukka Rissanen
69fddf8f0b net: dns: Check interfaces to be NULL before use
Make sure interfaces variable is not NULL before using it.

Coverity-CID: 529857

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-07-08 13:41:11 -05:00
Benjamin Cabé
4d98db4a45 doc: doxygen: update doxygen awesome to v2.3.4
No major changes but compatibility is improved with Doxygen 1.12.0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:41:02 -05:00
Benjamin Cabé
5b56e4dc02 .github: workflows: Bump Doxygen to 1.14 from 1.12
Doxygen 1.14 comes with really useful UX improvements which we want to
benefit from in our API documentation so update the CI job accordingly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:41:02 -05:00
Benjamin Cabé
86bea343b1 Bluetooth: BAP: fix bad doxygen @cond placement
Move `@cond INTERNAL_HIDDEN` comment where it belongs (fixing what was
probably a copy-paste/refactoring error).
This also makes the previously `bap_iso`, `group`, `_prev_seq_num`
visible again.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:41:02 -05:00
Fabrice DJIATSA
24af0c8ee1 drivers: pwm: stm32: add stm32h7rs bus prescalers
The clock tree of the STM32H7RS series uses the ppre1
and ppre2 naming convention instead of apb1_prescaler
and apb2_prescaler for bus prescaler.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-07-08 13:40:50 -05:00
Joakim Andersson
12fdde6694 cmake: kconfig: Add APP_DIR to kconfig environment
Add APP_DIR as a kconfig environment variable.

This is useful in cases where you want to set a config path relative to
the directory of the application.

An example of this is how many sysbuild.cmake files sets the source
directory like this:

ExternalZephyrProject_Add(
  APPLICATION remote
  SOURCE_DIR ${APP_DIR}/remote
  BOARD ${SB_CONFIG_REMOTE_BOARD}
)

The same however cannot be done in Kconfig.sysbuild:

config NETCORE_IMAGE_PATH
    default "${APP_DIR}/<image_path>" if NETCORE_ABC

Instead they must use ZEPHYR_MY_MODULE_MODULE_DIR, however not all
applications are part of a zephyr module.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2025-07-08 13:40:34 -05:00
Jacob Wienecke
112cd172c1 drivers: mdio_nxp_enet_qos: fix CR overwrite
Current Implementation to write to MAC_MDIO_ADDRESS causes CR to be
set to 0. This leads to the divide always being 42 (on FRDM_MCXN947)
so, by default the clock is running at ~3.6MHz which is out of spec
range (1.0-2.5MHz)

This stops the do_transaction function from overwriting CR.
It also saves off the CR register before DMA reset

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2025-07-08 13:40:17 -05:00
Gaetan Perrot
0dd63fcbd3 samples: shields: x_nucleo_iks02a1: run clang-format
Run clang-format on files.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-08 13:39:47 -05:00
Gaetan Perrot
f33adc5ade samples: shields: x_nucleo_iks02a1: Remove unused variable
The `die_temp` variable declared under `CONFIG_ISM330DHCX_ENABLE_TEMP` was
never used.

Instead `die_temp2` was used without using
`CONFIG_ISM330DHCX_ENABLE_TEMP`.

Removing it to avoid confusion.

The variable `die_temp2` holds temperature data from IIS2MDC.

Since there is no other variable with this purpose anymore, rename it to
die_temp for clarity.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-08 13:39:47 -05:00
Benjamin Cabé
80b7745d24 include: math: doc: add doxygen groups
add doxygen groups to include/zephyr/math header files and fold them
under Utilities top-level group.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:39:35 -05:00
Benjamin Cabé
3d111dd6e9 include: dsp: doc: cleanup Doxygen for DSP headers
moved docs to Utilities group (vs. top-level)
cleaned several incorrect Doxygen group definitions

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:39:35 -05:00
Chaitanya Tata
e728f80416 drivers: nrf_wifi: Fix TX drop statistics
In case FMAC API fails, increment the TX drop counter, helpful in
debug.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-08 13:39:17 -05:00
Sylvio Alves
85b0a9932f soc: espressif: liker: move PHY and RTC calls
Some of ESP32 Radio calls present in blobs needs to be
executed from IRAM or RAM instead of flash to avoid
cache disabled issues.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-08 13:39:06 -05:00
Daniel Leung
1984236c1d kernel: move z_sched_lock inside k_sched_lock
z_sched_lock() has exactly one user in tree which is
k_sched_lock(). So combine them to make it easier to
follow (or not, since there is no jumping to another
file anymore).

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-07-08 13:38:48 -05:00
Luis Ubieda
a2acc86429 fix: icm42688: fix: Override FSR settings when high-res is enabled
When IMU is set to stream with High-res mode, the FSR settings are
fixed for ICM42688 at 16g and 2000dps.

Unless this is enforced, the driver will provide incorrect scaling for
readings coming through streaming when the current FS setting is any
different than these.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-08 13:38:36 -05:00
Martin Siegumfeldt
87ce158fbc boards: nxp: cleanup duplicate 'chosen' entry
* looks like copy/paste error introduced through commit
   5df6aa8efa

Signed-off-by: Martin Siegumfeldt <mns@gomspace.com>
2025-07-08 13:38:23 -05:00
Fin Maaß
d53e9519a1 docs: replace clock_gettime
the time() implementation now uses
sys_clock_gettime(), change that in the docs.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-08 13:38:11 -05:00
Fin Maaß
c3e4ed7e91 libc: remove POSIX_TIMERS dep from COMMON_LIBC_TIME
remove POSIX_TIMERS dependency from
COMMON_LIBC_TIME, as it is no longer
needed.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-08 13:38:11 -05:00
Philipp Steiner
c8c888d1b7 maintainers: fuelgauge: add collaborator
adds myself as a collaborator for the fuel gauge

Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
2025-07-08 13:37:58 -05:00
Gaetan Perrot
087b7b8890 drivers: ethernet: xilinx: remove unused variable
Clean up unused variable 'ret' and 'link_state' in eth_xilinx_axienet.c to
improve code clarity.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-08 13:37:47 -05:00
Gaetan Perrot
c86f570401 drivers: ethernet: sy1xx: remove unused variable
Clean up unused variable 'rand_mac_addr' in eth_sensry_sy1xx_mac.c to
improve code clarity.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-08 13:37:47 -05:00
Cheng Chang
80602f32c6 bluetooth: AVDTP:in set config_rej_rsp,LOSC can't be added.
The current logic will result in rsp always being accept because LOSC
added is 0. and according to the spec, LOSC should not be added to the
Set Configuration Reject response.

Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
2025-07-08 13:37:37 -05:00
Olivier Lesage
aa4e6ac0dd bluetooth: host: Handle failure to disable scan when updating own_addr
It wasn't taken into account that bt_le_scan_set_enable()
has a return value. It's not likely that the controller
rejects the command when BT_DEV_SCANNING is set, however.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2025-07-08 13:37:26 -05:00
Olivier Lesage
ef7ede64cc bluetooth: host: Do not try to set NRPA when scanning with identity
Attempting this would fail (assuming the controller is implemented
correctly) because when using legacy commands it is not allowed to
change the device address while scanning.

It also did not make sense. If we have configured the scanner to use
the identity address as own_addr, because the advertiser and scanner
addresses are shared when using legacy commands, setting the adv NRPA
here would overwrite the identity address used by the scanner, which
I assume is not the intention.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2025-07-08 13:37:26 -05:00
Olivier Lesage
11782dbbc0 bluetooth: host: rename bool scan_enabled -> scan_disabled
It represents whether scanning was disabled as part of this flow.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2025-07-08 13:37:26 -05:00
Olivier Lesage
43223a1661 bluetooth: host: Fix uninitialized own_addr_type for legacy scan+adv
In 25c993e5b7 a new case was introduced
where own_addr_type is not set by bt_id_set_scan_own_addr properly.

This led to issues for users where increasing their zephyr version
led to failures to start scanning after advertising in the case where
CONFIG_BT_SCAN_WITH_IDENTITY=n and legacy advertising commands are used.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2025-07-08 13:37:26 -05:00
Lidor T
0654fb49d8 counter: cmsdk_apb_timer: Use clock freq from DT clocks
Previously, the CMSDK APB timer driver hardcoded the
counter clock frequency to 24 MHz, which limits reuse
across SoCs and boards with different timer clock
sources.
This patch replaces the hardcoded frequency with a value
derived from the device tree's `clocks` phandle, using
the `clock-frequency` property of the referenced clock
controller node. If the property is missing, it falls
back to a default 24 MHz and issues a build-time
warning.

Signed-off-by: Lidor T <lidor@exibit-iot.com>
2025-07-08 13:36:58 -05:00
Daniel DeGrasse
de001f7c14 release: Zephyr 4.2.0-rc2
Set version to v4.2.0-rc2.

Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-08 07:14:21 -10:00
Alberto Escolar Piedras
8f092623ae tests/lib/timespec_util: Skip two tests by now
These two (sub)tests assume the system tick period divides evenly all
time interval values being tested, but this is not the case in general,
and when it is not, these tests fail.

Let's skip these 2 tests by now so we can release without a broken
CI, and do not block other development while the tests themselves are
being fixed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-08 07:14:08 -10:00
Daniel DeGrasse
980afc8fdf doc: releases: 4.2: add notes for mbedtls 3.6.4 update
Add release notes for mbedtls 3.6.4 update, including CVEs resolved with
this release.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-08 11:05:53 -05:00
Flavio Ceolin
a07fef8679 manifest: mbedtls: update to 3.6.4
Pull in Mbed TLS 3.6.4, updated from 3.6.3.

More details regarding the Mbed TLS 3.6.4 release at:
https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.6.4

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-07-08 11:05:53 -05:00
Daniel DeGrasse
5700ffe9ad samples: mgmt: hawkbit: force BOOT_MAX_IMG_SECTORS for stm32h573i_dk
The stm32h573i_dk target had the default value of BOOT_MAX_IMG_SECTORS
raised in efdd2a8ff2 (west.yml: MCUboot synchronization from upstream).
This currently causes a build failure on some samples running with mcuboot
because the platform has not been moved to use external flash (which was
the reason for increasing BOOT_MAX_IMG_SECTORS)

To workaround this, force the value of BOOT_MAX_IMG_SECTORS for failing
tests.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-08 11:05:36 -05:00
David Leach
e3ed029b55 boards: nxp: mimxrt1060: Disable pwmleds for Rev B/C boards
Disable the pwmleds nodes in the dts overlay for rev B/C boards. The
FLEXPWM is not routed to LED on these versions.

Fixes #92285

Signed-off-by: David Leach <david.leach@nxp.com>
2025-07-07 16:06:45 -05:00
Johann Fischer
56b359b8f5 drivers: udc_dwc2: do not throw error when FIFO settings can be reused
When the endpoint is re-enabled, check if the current FIFO settings can
be reused. Further work is needed to improve FIFO memory handling for
more advanced interface configurations.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-07-07 16:06:34 -05:00
Benjamin Cabé
732785aefa doc: develop: gsg: consolidate python3 install instructions for ubuntu
- Installing python3-venv should be done right when all dependencies are
  installed.
- Installing python3-venv is enough to pull wheel, setuptools
  (python3-setuptools-whl), and pip (python3-pip-whl) so that they are
  available in the venv, so reduce the list of packages to install
  accordingly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-07 16:06:24 -05:00
Benjamin Cabé
6ddf0f48e7 doc: develop: gsg: move from ubuntu 20.04 to 22.04 as minimum version
Ubuntu 20.04 has entered "security fixes only" mode since May 2025, so
we can simplify the getting started guide by making the instructions
apply to 22.04 and onwards, and remove the instructions for adding
Kitware APT repository in the process.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-07 16:06:24 -05:00
Armando Visconti
0d7c751bad drivers/sensor: lis2dux12: add 'return' if data has to be dropped
In lis2dux12_read_status_cb() add a return instruction in case of
SENSOR_STREAM_DATA_NOP/SENSOR_STREAM_DATA_DROP.

Fixes: CID 529855

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-07-07 16:06:13 -05:00
Armando Visconti
df1832e32d drivers/sensor: lsm6dsv16x: add 'return' if data has to be dropped
In lsm6dsv16x_read_status_cb() add a return instruction in case of
SENSOR_STREAM_DATA_NOP/SENSOR_STREAM_DATA_DROP.

Fixes: CID 529864

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-07-07 16:06:13 -05:00
Armando Visconti
79c098a9d9 drivers/sensors: st: fix Null pointer dereferences
Fix Null pointer dereferences in lis2dux12_read_status_cb() and
lsm6dsv16x_read_status_cb().

Fixes: CID 529873
Fixes: CID 529862

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-07-07 16:06:13 -05:00
Armando Visconti
1d8bd6bd53 drivers/sensor: lis2dux12: fix uninitialized variable fifo_mode
Set fifo_mode structure to zero and initialize it properly according
to what interrupt event the user has selected.

Fixes: CID 529871
Fixes: CID 529865

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-07-07 16:06:13 -05:00
Armando Visconti
5792a429c8 drivers/sensor: lsm6dsv16x: fix unreachable code in decoder_decode()
Fix unreachable code in decoder_decode() as reported by Coverity scan.

Fixes: CID 529878

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-07-07 16:06:13 -05:00
Jamie McCrae
efdd2a8ff2 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  4eba8087fa606db801455f14d185255bc8c49467

Brings following Zephyr relevant fixes:

  - 4eba8087 boot: zephyr: boards config of the stm32h573 disco kit
  - 2dd7c655 boot: zephyr: boards config of the stm32h7rs target
    boards
  - cde66e17 boot: zephyr: defines FLASH device for external NOR
  - 6a178d29 bootutil: Use flash base address for direct hash

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-07 16:06:03 -05:00
Jamie McCrae
85d4ebcf51 soc: nordic: ironside: Fix bleeding config
Fixes generating a library for devices that do not need it which
gives a cmake warning

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-07 16:05:53 -05:00
Jamie McCrae
c8d9f4b701 sysbuild: cmake: kconfig: Fix missing sysbuild Kconfig paths
Fixes an issue where external sysbuild Kconfig path variables
were not provided and meant they could not be overwritten

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-07 10:14:14 -05:00
Cheng Kai
ec0865cb4a Bluetooth: SDP: fix attr value len 32 invalid
fix sdp attr value len 32, which was not supported.

Signed-off-by: Cheng Kai <chengkai@xiaomi.com>
2025-07-07 10:13:47 -05:00
Stephanos Ioannidis
d7d3ae5c3b arch: arm: cortex_m: Force literal pool placement in inline asm block
When LTO is enabled, linker may relocate literal pools out of Thumb LDR
instruction's reach causing "offset out of range" errors while linking.

This commit adds `.ltorg` directive in the inline asm blocks where absolute
addresses are loaded using the `ldr` instructions, in order to ensure that
the literal pool containing the absolute addresses are placed near the
`ldr` instructions.

Note that the `.ltorg` directive is recognised by all toolchains supported
by Zephyr and no toolchain abstraction is provided for now.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-07-07 10:13:06 -05:00
Benjamin Cabé
d7ff0e4ba4 doc: develop: gsg: have west init use pinned Zephyr version for releases
When building the docs for a release, the section of the getting started
that lets the user `west init` their workspace now has them check out
the version matchin the release.

Fixes zephyrproject-rtos/zephyr#92163

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-07 10:12:41 -05:00
Sadik Ozer
792e3c2f84 manifest: Update tf-m module to get MAX32657 commits
This commit update tf-m module to get missing commit that requires
to support tf-m v2.2.x release.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2025-07-07 10:10:30 -05:00
Krzysztof Sychla
a51d3c0f74 kernel: heap: Add allocation metadata to allocated_bytes
The allocated_bytes were missing the allocation metadata. Because of that
the sum of free_bytes and allocated_bytes doesn't remain constant after
each allocation. This convention doesn't match glibc's behavior. This
commit changes the chunksz_to_bytes function to include the metadata in the
calculation. The analysis of the mallinfo2 function from glibc has been
done in #92392 Pull Request.

Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
2025-07-07 10:08:58 -05:00
Gerson Fernando Budke
b478cd8f37 linker_script: Remove some remaining SUBALIGN in iterable sections
The #91219 miss some entries when doing the clean-up. This removes
some of remaining SUBALIGN entries in the iterable sections. It do
not consider SECTION_PROLOGUE and zephyr_linker_section entries.

Fixes #92349

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-07-07 10:07:56 -05:00
Make Shi
9104e941f9 Bluetooth: Classic: L2CAP: Set default value for BR timer timeout
When peer monitor and retransmission timeout are zero, set them to the
default values. This ensures that the monitor timeout is always a valid
value to avoid the L2CAP BR timer work queue hang.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-07-07 10:07:10 -05:00
Jonas Remmert
2bdc3e2352 boards: phytec: reel board: update repo link to DAPLink fw
This commit updates the link to the source of the firmware of the DAPLink
on-board debug adapter.

Phytec migrates all repositories from the "PHYTEC-Messtechnik-GmbH" GitHub
organization to the "phytec" GitHub organization. The code in the relevant
branch remains unchanged and the branch has been pushed to the new
organization.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2025-07-07 10:06:40 -05:00
Gaetan Perrot
369d5b170c tests: net: socket: getaddrinfo: Remove unused assignment
In check_dns_query(), the assignment `ret = -ENOMEM` was never used since
the function returns false immediately afterward.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-07 10:05:51 -05:00
Gaetan Perrot
a16c50472a samples: drivers: i2s: i2s_codec: Remove shadowed variable
Avoids shadowing the outer 'ret' variable by reusing it instead of
redeclaring it inside a conditional block.

This improves code clarity.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-07 10:05:24 -05:00
Mathieu Choplain
697d0f845d tests: arch: common: ramfunc: fix the project's name in CMake
The name used in CMakeLists for this test is "zero_latency_irqs" despite
testing the ramfunc feature instead. This might be a copy-paste mistake
as it was originally "arm_zero_latency_irqs", which is another test that
exists.

Change the project name in CMakeLists to match what the test truly is.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-07-07 10:04:45 -05:00
Robert Lubos
8f983ccda5 net: lib: http_client: Fix end of message detection
HTTP 1.1 server has two ways of indicating the message body length -
either by providing the Content Length header, or by closing the
connection when the entire body has been transmitted.

The second method didn't work with Zephyr's HTTP client implementation,
as EOF on a socket was treated as an error condition. Therefore, if no
Content Length was provided by the server, such transfers would always
end up with ECONNRESET error.

In order to fix this, we need to notify the parser about the EOF on a
socket when connection is closed. It is the parser role to determine
whether the EOF was expected in current state (by marking end of message
flag) or not (by setting an error).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-07 10:04:17 -05:00
Josuah Demangeon
b3ccee473e doc: release-notes-4.2: add mentions to the new UVC class
Add references to new API, functions, devicetree bindings introduced
from introduction of the UVC class.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-05 11:56:10 -05:00
Van Petrosyan
960a6f036e sensor: lis2dh: cache CTRL1 on PM_DEVICE_ACTION_TURN_ON
Cache CTRL1 into reg_ctrl1_active_val inside lis2dh_init_chip()
in the PM_DEVICE_ACTION_TURN_ON path.  This prevents the first
runtime-PM RESUME from writing 0x00 to CTRL1 and disabling the sensor
when runtime-PM is enabled.

Fixes: #92196

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
2025-07-05 11:56:00 -05:00
Chris Friedt
7da64e7bda poxi: aio: include zephyr/toolchain.h for ZRESTRICT
Previously, ZRESTRICT was used in aio.h without also including
zephyr/toolchain.h.

Tests may have compiled because the toolchain header was included by
some other means.

We should explicitly include it to ensure that ZRESTRICT is defined.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-07-04 16:44:02 -10:00
Yong Cong Sin
ba3573f87f tests: drivers: syscon: remove dev pointer check
`DEVICE_DT_GET()` guarantees that the `dev` pointer can never
be `NULL`, the check is therefore redundant, remove it.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-07-04 16:42:53 -10:00
Yong Cong Sin
1967d1e699 drivers: syscon: do not assume that a function isn't supported
When a function pointer is `NULL`, it could be that the underlying
hardware doesn't support it, or it isn't implemented.

If a function isn't supported by the hardware, its driver should
return `-ENOTSUP`, the API layer should return `-ENOSYS` when a
function isn't implemented.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-07-04 16:42:53 -10:00
Yong Cong Sin
9696765b56 drivers: syscon: remove unnecessary checks for dev pointer
The `dev` pointer passed to the implementation should never be `NULL`,
remove the checks.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-07-04 16:42:53 -10:00
Grzegorz Chwierut
095d3186e6 tests: fix: limit platforms in boot.with_mcumgr.test_upgrade_ble
Missed in #91596 that more platforms are added in common part.
Excluded nrf9160dk/nrf9160 and nucleo_wba55cg from
configuration with BLE.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2025-07-04 16:41:01 -10:00
Jordan Yates
9c6e6d781d drivers: lora: rylrxxx: fix snprintf usage
The second argument should unconditionally be the size of the output
memory area, not computationally derived from the input payload length.
The previous length validations would be incorrect when
`cmd_len == CONFIG_LORA_RYLRXX_CMD_BUF_SIZE`, as `snprintf` would be
told the output buffer was `CONFIG_LORA_RYLRXX_CMD_BUF_SIZE + 1` bytes
long.

Fixes #92619
Fixes #92624

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-07-04 16:40:46 -10:00
Peter Mitsis
ec80ab5bb6 drivers: timer: Clean up Cortex-M systick Kconfig
Makes the choice CORTEX_M_SYSTICK_LPM dependent upon the
CORTEX_M_SYSTICK to prevent its default from showing up in
the .config of projects that do not use the CORTEX_M_SYSTICK
timer driver.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-07-04 16:40:31 -10:00
Gaetan Perrot
1610aa0e9f bluetooth: host: a2dp: remove redundant null check
Remove duplicated check for 'ep->stream == NULL' to clean up conditionals
and avoid unnecessary repeated evaluations.

This cleans up the code and avoids unnecessary repeated condition
evaluation.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 14:21:47 -10:00
Peter van der Perk
41ef8c3c2f drivers: spi_nxp_lpspi: Don't fetch clockrate from api during configure
The clock get rate api can be slow in certain targets and thus slowing
each SPI transaction. Instead on startup fetch the clock rate and store
this in ram. Then each spi configure action is simply reading that
variable

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-07-04 14:21:35 -10:00
Tim Pambor
ee1468b675 tests: net: socket: Fix function signature
Update the process_dns function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-04 14:21:23 -10:00
Tim Pambor
f682a173d8 net: socket: mgmt: Fix function signature
Update the trigger_events function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-04 14:21:23 -10:00
Tim Pambor
6226bb1264 net: sockets_service: Fix function signature
Update the socket_service_thread function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-04 14:21:23 -10:00
Fin Maaß
19a3b217e5 drivers: ethernet: nxp: don't fail with -EALREADY
don't fail with -EALREADY being returned from
phy_configure_link.

Fixes: #92281
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-07-04 14:20:55 -10:00
Carles Cufi
9a9ae6ffdb boards: nordic: Enable CONFIG_HW_STACK_PROTECTION conditionally
All Nordic boards were enabling CONFIG_HW_STACK_PROTECTION
unconditionally, which is usually not a problem except if the particular
application happens to want to disable the MPU (or equivalent hardware
for RISC-V). In that case, the following warning is shown:

warning: HW_STACK_PROTECTION (defined at arch/Kconfig) was assigned the
value 'y' but got the value 'n'.
Check these unsatisfied dependencies: ARCH_HAS_STACK_PROTECTION (=n).

In order to avoid this warning, conditionally enable the hardware stack
protection only when the architecture supports it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-07-04 14:20:43 -10:00
Emilio Benavente
1142c40c5a scripts: west_commands: runners: Update GDB args
Update gdb arguments to enable linkserver
debugging when app does not reset after load.
This is useful for when the app is loading to
ram. In this case if gdb reset after loaded the
ram would be flushed when debugging and there would be
nothing no image in ram to debug.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-07-04 14:20:30 -10:00
Emilio Benavente
88e95180b5 boards: nxp: mimxrt1170_evk: remove code that is no longer needed
Remove cmake code that updated the linkserver memory view, however
the values passed here are wrong and linkserver already includes
the correct space e.g location = 0x0 && size = 0x00080000

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-07-04 14:20:30 -10:00
Emilio Benavente
3369d84668 boards: nxp: mimxrt1170_evk: Added --no-reset flag
Updated board.cmake to check for single
image builds to indicate rather an additional
reset is needed for cases such as sysbuild.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-07-04 14:20:30 -10:00
Benjamin Cabé
6df72bf56e Revert "ci: workflows: remove unsupported Python version from test matrices"
This reverts commit bb983d09bf.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:50:06 -05:00
Benjamin Cabé
f672cb72d4 Revert "doc: ci: Zephyr now requires Python 3.12 or higher"
This reverts commit 043bb58488.

Note that  scripts/requirements-actions.txt might not be 100% the same
as what was pinned prior to the revert due to it being difficult to
restore previous versions while also accounting for the new dependencies
that were added in the meantime.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:50:06 -05:00
Benjamin Cabé
33d6061fe7 Revert "doc: correct python minimum required"
This reverts commit c68d0b9630.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:50:06 -05:00
Benjamin Cabé
daf5584c63 Revert "scripts: Bump Python target version for ruff"
This reverts commit e8caaf4137.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:50:06 -05:00
Benjamin Cabé
11a552b0f8 include: drivers: virtio: fix doxygen groups
Virtio Doxygen documentation is now folded under Device Driver API group
like it should be.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:49:54 -05:00
Benjamin Cabé
ee2b9a4e6d drivers: virtio: move virtio headers to zephyr/drivers
Virtio headers are moved to zephyr/drivers/ as they have no reason to be
top-level headers since virtio is a driver class.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:49:54 -05:00
Jan Tore Guggedal
a7ce6055b7 zbus: Fix NULL pointer use in zbus_chan_rm_obs()
Fix a bug in zbus_chan_rm_obs() where removing the first observer in a
channel's observer list would cause undefined behavior due to accessing
a member of a NULL pointer.

The issue occurred when prev_obs_nd was NULL (indicating the first node
in the list) and the code attempted to pass &prev_obs_nd->node to
sys_slist_remove(). This resulted in accessing the 'node' member of a
NULL pointer, which is undefined behavior even when taking its address.

The sys_slist_remove() function is designed to handle a NULL prev_node
parameter correctly for removing the first element in a list. The fix
ensures we pass NULL directly instead of attempting to compute the
address of a member within a NULL pointer.

This was detected by Undefined Behavior Sanitizer as "member access
within null pointer".

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
2025-07-04 15:49:32 -05:00
Raffael Rostagno
26818ee100 drivers: clock_control: esp32c6: Fix clock init at JTAG reset
Peripheral clocks are currently not being disabled for JTAG reset
condition, which causes driver init failures when debugging the SoC
with JTAG. Fix by disabling all clocks for this reset type.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-07-04 15:49:17 -05:00
Gaetan Perrot
9207749e83 drivers: sensor: bma4xx: Avoid potential overflow
Coverity reports a potential integer overflow in the accel_range
computation due to the use of a left shift on an int type.

CID 520269: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)

Even though the register value is constrained to 0–3 by the BMA456 spec,
and no real overflow occurs, an explicit cast to int64_t prevents false
positives and aligns with safe coding practices.

Fixes: #90517

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 15:49:09 -05:00
Gaetan Perrot
ad38ef7333 drivers: counter: Fix redundant identical condition
There was an unnecessary nested `if` in `ifx_cat1_counter_init` with the
same condition already checked in the outer block.

This results in dead and redundant code with no functional impact but
harms readability.

The inner `if (rslt != CY_RSLT_SUCCESS)` was removed to clean up the
function.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 15:48:58 -05:00
Gaetan Perrot
f1c27b6e4a drivers: counter: Fix possible null pointer dereference
The function counter_rz_gtm_set_alarm was accessing alarm_cfg->flags and
alarm_cfg->ticks before verifying that alarm_cfg is non-NULL.

This could lead to undefined behavior or crashes if a NULL pointer is
passed.

The pointer check has been moved before any dereference to fix this bug.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 15:48:49 -05:00
Gaetan Perrot
80df24e3b2 net: lib: coap: fix potential null pointer
In coap_well_known_core_get(), move the null check for 'resource' before
applying pointer arithmetic ('resource + 1') to avoid undefined behavior
when 'resource == NULL'.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 15:48:40 -05:00
Robert Lubos
aa4a8789d5 net: sockets: socket_dispatcher: Fix close function type
Socket dispatcher (and offloaded implementations in tests) register
fd as ZVFS_MODE_IFSOCK therefore they should register a  close2(
function instead of close().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
a4fdd2c266 net: sockets: socketpair: Fix close function type
socketpair fd regsiters ZVFS_MODE_IFSOCK therefore it should register a
close2() function instead of close().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
82945a7f52 net: l2: ieee802154: Prevent NULL pointer access
In case address mode in a packet is none, the address pointer within mhr
struct will not be set. Therefore, the pointer should not be used before
address mode is verified inside ieee802154_check_dst_addr().

This was reported by UBSAN:

  subsys/net/l2/ieee802154ieee802154.c:296:41: runtime error: member
  access within null pointer of type 'struct ieee802154_address_field'

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
30c8702b05 tests: net: iface: Fix interface context misuse
The iface test suite uses two different interface types with two
different context types and iid tests mixed up the two. It attempted
to create a mac address for Ethernet interface (which uses
struct eth_fake_context), however the net_iface_get_mac() function
only works with Dummy interface context (struct net_if_test). In
result the Ethernet interface context was corrupted (mac address
overwritten the promisc_mode flag).

Fix this by extracting mac generation code into a common function, and
use it in the Ethernet iface initialization phase instead of directly in
the test.

This was reported by UBSAN:
  tests/net/iface/src/main.c:239:34: runtime error: load of value 11,
  which is not a valid value for type '_Bool'

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
31b79a93af net: pkt: Add explicit casts to uint32_t when bitshifting uint8_t val
Cast uint8_t variable to uint32_t explicitly to avoid implicit cast to
int, and thus potentially undefined behavior, reported by UBSAN:

  net_pkt.c:1946:17: runtime error: left shift of 239 by 24 places
  cannot be represented in type 'int'

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
7949789ce8 net: ip: utils: Avoid casting to in(6)_addr struct in net_addr_ntop()
In order to avoid alignment issues when casting void pointers to
in(6)_addr structures, create a properly aligned copy of the ip(v6)
address on stack.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
bd96b5dd83 net: lib: websocket: Avoid bitshift overflow warning
In order to prevent an overflow warning from UBSAN when bitshifting,
cast to uint64_t first before shifting, and then back to uint32_t.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
c7757b982c lib: os: zvfs: select: Fix warning about bitshifting signed value
This was caught by UBSAN:

  zvfs_select.c:70:2: runtime error: left shift of 1 by 31 places
  cannot be represented in type 'int'

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
2d49ef26ad tests: net: socket: udp: Don't call memset() on a NULL pointer
cmsgbuf pointer can be NULL, therefore verify that before calling
memset() on it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
62a5260e01 net: Fix alignment error with net_ipaddr_copy()
As struct sockaddr have now alignment of 4 bytes, net_ipaddr_copy()
gives the following error if used for sockaddr:

  error: alignment 1 of ‘struct <anonymous>’ is less than 4
  [-Werror=packed-not-aligned]

Just use memcpy() instead, net_ipaddr_copy() was intended to use with IP
addresses, not socket related structs.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
48d1a01b2d net: sockets: Specify alignment for sockaddr* structs
To avoid misalignment errors when casting between
sockaddr_storage/sockaddr and specialied sockaddr_* variants, specify
alignment for the former to match the alignment of the others.

The issue was reported by UBSAN:

  utils.c:802:8: runtime error: member access within misaligned
  address 0xf4aff186 for type 'struct sockaddr_in6', which requires
  4 byte alignment

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
8124032cbb net: ipv4: Avoid casting unaligned address to struct in_addr
Rework the IPv4-related code to avoid casting. Use raw variants of
IPv4-related functions whenever possible (especially on the critical
data path).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
f549bfcfeb net: ipv4: Add raw variants of various IPv4 functions
To address the misaligned access issues reported by UBSAN, introduce raw
variant of certain IPv4 functions used in the critical data path of the
network stack, operating on plain uint8_t buffers in stead of IPv4
address struct.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
0f6dcb37d7 net: ipv6: Avoid casting unaligned address to struct in6_addr
Rework the rest of the IPv6-related code to avoid casting. Use raw
variants of IPv6-related functions whenever possible (especially on the
critical data path). For the routing case, use a copy of the address to
avoid massive rework of the routing module.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
edf5319ca6 net: ipv6: nbr: Avoid casting unaligned address to struct in6_addr
IPv6 Neighbor Discovery interfaces modules like neighbor or routing
tables - converting them to raw variants seems futile. Therefore, for
IPv6 ND case, copy the raw IP address from the packet into the in6_addr
structure, and then pass it to respective functions. Performance
overhead should not be a big problem in such case as those actions are
only performed if a respective ND packet is received.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
f5455e66e3 net: ipv6: 6lo: Avoid casting unaligned address to struct in6_addr
Refactor local functions to work with byte buffers instead of struct
in6_addr and use switch to use raw variants of functions operating on
IPv6 addresses.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
74ccd5fdaa net: ipv6: Add raw variants of various IPv6 functions
To address the misaligned access issues reported by UBSAN, introduce raw
variant of certain IPv6 functions used in the critical data path of the
network stack, operating on plain uint8_t buffers in stead of IPv6
address struct.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
9b00a1d656 net: ipv6: Fix net_ipv6_is_addr_mcast_group() check
Some bytes were compared twice and one comparison used wrong index.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Mark Wang
80c1e6929a bluetooth: smp: add todo comments for ctkd
need to consider corner cases of ctkd as the added code comments.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-07-04 13:10:21 -05:00
Mark Wang
81d938606d bluetooth: smp: CTKD issue when cross br and ble connections and security
The peer uses the RPA address.
A BR connection is created firstly, a subsequent BLE connection is
created secondly, the BR SMP CTKD occur thirdly (The BLE LTK is
derived from BR and the BR SMP distribute peer's IRK and identity address
here), but the BLE LTK is saved to key pool that is not
matched with the previous BLE connection because the derived LTK is saved
with identity address and BLE connection uses RPA. Fix it by: Resolve the
BLE connections' RPA with the derived IRK to find the previous BLE
connections and match the connections with derived LTK key.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-07-04 13:10:21 -05:00
Francois Ramu
3978ca15ff samples: boards: st: blink with low power mode management in DEBUG
Add a precision about the CONFIG_DEBUG :
When CONFIG_DEBUG is set, the system will not enter the low power mode
The DEBUG is possible but with higher power consumption of the target.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-07-04 13:10:12 -05:00
Łukasz Duda
613478f189 modules: hal_nordic: nrf_802154: Increase default number of RX buffers
This commit increases the default number of RX buffers to ensure
headroom for full IPv6 MTU.

Signed-off-by: Łukasz Duda <lukasz.duda@nordicsemi.no>
2025-07-04 13:10:03 -05:00
Benjamin Cabé
3b365fbe54 doc: releases: Intermediate update for new 4.2 boards/samples/drivers
New boards, drivers, samples, and shields since June 10, 2025

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 13:09:52 -05:00
Benjamin Cabé
899b908b69 dts: bindings: update binding-types.txt with recently added types
SENT, PSI5, Virtio where all recently added types. Add them to the
binding-types.txt file so that their full name can be displayed in the
documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 13:09:52 -05:00
Jamie McCrae
84aec64dd3 modules: hal_nordic: nrfx: Remove usage of removed Kconfig
Removes usage and reference of CONFIG_NFCT_PINS_AS_GPIOS

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-04 13:09:34 -05:00
Jamie McCrae
257990d2be soc: nordic: Remove NFCT_PINS_AS_GPIOS Konfig
This Kconfig was deprecated in Zephyr 3.5, remove it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-04 13:09:34 -05:00
Jamie McCrae
7beed788cd soc: nordic: nrf52: Remove prompt from GPIO_AS_PINRESET Kconfig
This Kconfig was deprecated in Zephyr 3.5, remove allowing it to
be selected but keep the symbol as the HAL needs to be updated

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-04 13:09:34 -05:00
Gaetan Perrot
1b6a0e4261 doc: contribute: fix dead link in RFC proposal template
Fix a broken link in the 'contribute/proposals_and_rfcs.rst' file that
pointed to a non-existent Markdown RFC template.

The link previously pointed to:
  .github/ISSUE_TEMPLATE/003_rfc-proposal.md

It has been corrected to point to the actual YAML file:
  .github/ISSUE_TEMPLATE/003_rfc-proposal.yml

Fixes: #92342

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:09:25 -05:00
Fabrice DJIATSA
dee3d3b214 dts: arm: st: u0: disable lptim2 by default
LPTIM2 is enabled by default; disable it to avoid
the build failure:
"Error: Only one LPTIM instance should be enabled"
when LPTIM1 is also enabled in the DTS.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-07-04 13:09:15 -05:00
Fabrice DJIATSA
3867d29d03 samples: boards: st: power_mgmt: blinky: add stm32u083_dk board overlay
define stm32_lp_tick_source since PM is looking for this node
and change clock source for lptim2 to lsi.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-07-04 13:09:15 -05:00
dependabot[bot]
1d4bb3c4d3 ci: github: bump github/codeql-action in the actions-deps group
Bumps the actions-deps group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.29.0 to 3.29.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ce28f5bb42...181d5eefc2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-04 13:09:07 -05:00
Shrek Wang
6a27fd2255 net: tcp: Add TCP ACK validation
According to RFC 793, ch 3.9 Event Processing,
after the connection is sync-ed with seqnum of both sides then,
        1. drop any received segment if the ACK bit is off.
        2. validate the acknum like this:
        SND.UNA =< SEG.ACK =< SND.NXT

The ACK validation is done before entering the state-machine, so
remove the flags <ACK> check in the state-machine processing.

Signed-off-by: Shrek Wang <inet_eman@outlook.com>
2025-07-04 13:08:57 -05:00
Ryan McClelland
b6d955c648 drivers: i3c: check addr slot is free only if it's different
The bus helpers for SETDASA and SETNEWDA could have the same
dynamic address assigned as it's static addr for SETDASA or
as it's dynamic addr for SETNEWDA. (Althrough, only a clown
would set the new dynamic address to the same old dynamic
address, it is still a valid address to set to).

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-07-04 13:08:33 -05:00
Sylvio Alves
c358861280 drivers: i2c: esp32: drop transfer log error
Drop LOG_ERR calls from driver level related to transfer calls.
Application can handle the result and decide whether to log or not.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-04 13:08:23 -05:00
Sylvio Alves
5b876d4c4c drivers: uart: esp32: apply correct mask for TX/RX signal inversion
Build a combined mask from the tx_invert and rx_invert flags and pass it
to uart_hal_inverse_signal(). Only invoke the HAL call when the mask is
non-zero, preventing unintended inversions and eliminating redundant
calls when no inversion is requested.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-04 13:08:14 -05:00
Ian Wakely
1fc66b1caf boards: Adding zephyr_i2c to Adafruit RP2040 QTPY
This adds the generic plugable alias to the Adafruit RP2040 QT PY for
its STEMMA-QT connector.

Signed-off-by: Ian Wakely <raveious.irw@gmail.com>

Signed-off-by: Ian Wakely <raveious.irw@gmail.com>
2025-07-04 13:08:06 -05:00
Ian Wakely
631654f8cd boards: Adding zephyr_i2c to Adafruit ESP32s3 QTPY
This adds the generic plugable alias to the Adafruit ESP32s3 QT PY for
its STEMMA-QT connector.

Signed-off-by: Ian Wakely <raveious.irw@gmail.com>
2025-07-04 13:08:06 -05:00
Alain Volmat
772fbfe9cc display: stm32: ltdc: fix RGB565/BGR565 format to match sample expectations
The LTDC RGB565 format corresponds to the PIXEL_FORMAT_BGR565 format.
Update the LTDC driver to advertise PIXEL_FORMAT_BGR565 as the supported
format instead of PIXEL_FORMAT_RGB565. This change ensures correct color
rendering in the sample display application and enables usage of the
video capture sample application.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-07-04 13:07:55 -05:00
Alex Hogen
075662d8dc drivers: i2c: gecko: Fix EFM32 I2C target
clang-format on drivers/i2c/i2c_gecko.c

Signed-off-by: Alex Hogen <alex@edt.com>
2025-07-04 13:07:45 -05:00
Alex Hogen
257bcb8d58 drivers: i2c: gecko: Fix EFM32 I2C target
Fix I2C target implementation so NACKs are issued if the callback returns
an error. This allows for proper signaling to the I2C host when commands
or data are invalid for the I2C target.

Signed-off-by: Alex Hogen <alex@edt.com>
2025-07-04 13:07:45 -05:00
Alex Hogen
92f7e8d84b drivers: i2c: gecko: Fix EFM32 I2C target
Fix compile error due to unknown macro when building CONFIG_I2C_TARGET for
Silabs Thunderboard EFM32GG12 (SLTB009A). The previous macro exists in
(all?) EFR32 part headers but not EFM32.

Signed-off-by: Alex Hogen <alex@edt.com>
2025-07-04 13:07:45 -05:00
Kapil Bhatt
81ba3dfa92 doc: networking: Modify the wifi documents
Modify the wifi documents for better format.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-07-04 13:07:37 -05:00
Guillaume Gautier
9977ce4eb6 dts: bindings: memc: stm32-fmc: reorder parameters to match code
Description of parameters in st,control property didn't match the values
used in the code.
Modify the description to match with the current driver implementation.
Also add a description for reg property to help setting it properly and
add corresponding dt-bindings.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-07-04 13:07:24 -05:00
Van Petrosyan
4197953d3f drivers: modem_cellular: fix bg95dial cmd resp
bg95 modem should respond "CONNECT <text>" when run dial cmd
similar to eg25g

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
2025-07-04 13:07:12 -05:00
Jamie McCrae
0d12549f7c west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  3430520d7080a8ac3e4b325cfde0ef18837209af

Brings following Zephyr relevant fixes:

  - d905a69e boot: boot_serial: Fix upload for swap using offset
    mode
  - 3fc94b38 boot: boot_serial: Fix slot info response on error
  - e2c97da3 boot: bootutil: Fix serial recovery issues
  - 2fcfba13 boot: bootutil: Fix wrong define for single loader
    mode
  - dc571f0b boot: bootutil: Fix single loader trailer size
  - cf92b6f6 boot: boot_serial: Fix wrong slot ID for hook calls
  - c4a7b250 zephyr: cleanup removed
    CONFIG_BOOT_MGMT_CUSTOM_IMG_LIST

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-04 13:06:59 -05:00
Alberto Escolar Piedras
f8cf1659bf tests/drivers display_read_write: Enable for native_sim//64
These tests can be run equally on native_sim//64.
Let's also allow them in it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-04 13:06:47 -05:00
Alberto Escolar Piedras
f8c2f37e03 tests/drivers display_read_write: Move common kconfig option to overlay
For native_sim[//64], these tests need to be built with
CONFIG_SDL_DISPLAY_USE_HARDWARE_ACCELERATOR=n

Until now we defined this option in the yaml file for each test
targetting the sdl display driver.
But if somebody builds the test directly, it will fail as these yaml
kconfig defined options would not be used.

Let's instead define it in a board overlay, so in that case the test
will also work.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-04 13:06:47 -05:00
Etienne Carriere
9b022972d8 drivers: rtc: stm32: narrow backup domain access window during interrupts
Change backup domain access gating in STM32 RTC interrupt handler
to only request access when RTC registers ar to be modified
instead of during the whole RTC interrupts service including
interrupt consumer callback execution.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
2025-07-04 13:06:36 -05:00
Etienne Carriere
007d3e3c85 drivers: rtc: stm32: fix unbalanced backup domain access request
Fix the backup domain access request in STM32 RTC initialization that
was unbalanced in case of clock configuration failure.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
2025-07-04 13:06:36 -05:00
Etienne Carriere
c35ddccce4 drivers: counter: stm32: Fix RTC write access requests
Add missing backup domain access requests in STM32 RTC counter
driver that are needed to modify RTC registers.

Remove backup domain access requests in rtc_stm32_read() since this
function only reads RTC registers and backup domain access protection
protects RTC registers against write accesses only.

Fixes issue 92511.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
2025-07-04 13:06:36 -05:00
Gaetan Perrot
de1fa4776b drivers: sensor: bmp581: add const qualifier when casting
Add the 'const' qualifier when casting 'dev->config' to 'struct
bmp581_config *' to preserve const-correctness and fix SonarQube warning :

 "A cast shall not remove any const or volatile qualification from the
 type of a pointer or reference."

This improves maintainability by respecting the const contract and resolve
static analysis issues.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:06:22 -05:00
Gaetan Perrot
032c5301de drivers: sensor: bmp581: fix potential null dereference
Move null check for 'dev' before dereferencing it to access dev->config.

This ensures the check is meaningful and avoids undefined behavior in case
of a null device pointer.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:06:22 -05:00
Hake Huang
fe811defb2 tests: vector_table_relocation: fix a mis-use of SRAM_SIZE
SRAM_SIZE is given in kilobytes

fixes: #92533

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2025-07-04 13:06:13 -05:00
Christoph Mair
f64358fcdb pm: fix typo in KConfig
Workqueue is missing a "k".

Signed-off-by: Christoph Mair <christoph.mair@husqvarnagroup.com>
2025-07-04 13:05:56 -05:00
Benjamin Cabé
273e65f2f1 MAINTAINERS: refine coverage for samples
Not pretending for this to be exhaustive, but a pass at adding samples to
their respective areas as opposed to let them fall under the catch-all
"Samples" area.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 13:05:47 -05:00
Gaetan Perrot
4bee190264 sensor: icm42688: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
aee0c34ece sensor: adxl345: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
5d2f4e8dcd sensor: adxl367: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
e6c1f02436 sensor: adxl362: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
89cdd133ad sensor: tmp114: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
fbbb777795 sensor: mc3419: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
0490f03b29 sensor: tmp11x: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Johan Hedberg
c85cc47b5b Bluetooth: samples: Fix off-by-one bug in atomic API usage
The code was accessing bits 1 and 2 (but not 0), effectively needing three
bits, but still requesting only 2 when calling ATOMIC_DEFINE().

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-07-04 13:05:22 -05:00
Oleh Kravchenko
a75abdc5df soc: stm32f1x: fix typo/debug in stop/standby modes
Check for STM32F1 series was done with "#ifdef SOC_SERIES_STM32F1X"
but this symbol comes from Kconfig.

Use the correct "CONFIG_SOC_SERIES_STM32F1X" instead.

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
2025-07-04 13:05:13 -05:00
Nazar Palamar
fdd02c5105 drivers: wifi: AIROC: Added missed whd_bus_spi_protocol
- add whd_bus_spi_protocol

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2025-07-03 12:00:07 -05:00
Fabio Baltieri
88aee15ca4 ci: pr_metadata_check: run the script in unbuffered mode
Makes it easier to debug since there's stuff handling race conditions
now.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-07-03 11:59:56 -05:00
Fabio Baltieri
42e8837085 scripts: do_not_merge: wait for manifest before checking
Seems like github relabel rerun is susceptible to race conditions and
may not rerun the label check script if the manifest workflow runs at
the same time.

Delay the check to explicitly wait until the currently checked sha had a
successful manifest run.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-07-03 11:59:56 -05:00
Fabio Baltieri
db18e4c507 scripts: do_not_merge: integrate the empty body check in the python file
No point spreading the logic around, the python file already has the
data, check it there.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-07-03 11:59:56 -05:00
Fabio Baltieri
5b743871b8 scripts: do_not_merge: add some debug prints
Log the PR link and labels, may come in handy for troubleshooting down
the road.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-07-03 11:59:56 -05:00
Mike J. Chen
93997dab8e tests: bsim: add early disconnect tests for iso and l2cap
Add early_disconnect test cases for iso/cis and l2cap/stress
to test the bluetooth stack handling of disconnects
while transmit is still in progress.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-07-03 11:59:02 -05:00
Mike J. Chen
a392c33c60 bluetooth: fix bug when destroying tx queue buffers on disconnect
Channel tx_queue purging on disconnect was inconsistently handled
by the different channels: iso, l2cap, l2cap_br.

iso channels handled purging in the tx_data_pull hook.

l2cap and l2cap_br did the purging in channel delete functions
and did not expect tx_data_pull to be called for a disconnected
channel. Their data_pull functions could return a ptr to a
net_buf that was still on the tx_queue, which is problematic
when the conn tx_processor unrefs the returned buffer resulting
in multiple calls to the buf destroy function.

To make things consistent and correct, remove the code that tries
to purge tx_queues in the tx_processor and only do purging in
the channels themselves when they are deleted/disconnected.

Also refactor and clarify referencing of the net_buf returned
by tx_data_pull. It was confusing who had a reference and
when, which could vary depending on the length of the original
buffer. There are three cases: the buffer length is less
than the tx.mps, greater the mps but less than the mtu so
requiring segementation but not fragmentation, or greater than
both mps and mtu so requiring both segmentation and fragmentation.
The conn layer would increase the refcnt if the length was
greater than the mtu, but not have any awareness of whether
the net_buf was still on the tx_queue or not.

Now it is the tx_data_pull callbacks responsibitity to increment
the reference count if it is returning a pointer to a net_buf
that it is still keeping on the tx_queue for segmentation purposes.
The conn layer will now always transfer that reference into a
fragment view and not conditional it on the length relative to
the mtu, and always decrement the reference to the parent when
the fragment is destroyed.

So there is no risk of decrementing a reference to a net buf
that might still be on a tx_queue, which simplifies error
handling in particular.

Also add error handling paths for when asserts are not enabled.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-07-03 11:59:02 -05:00
David Leach
a132ebfe17 drivers: watchdog: Add enableWait setting for wdt_mcux_imx_wdog
When WDT_OPT_PAUSE_IN_SLEEP option is passed in set enableWait flag
in addition to the enableStop.

Fixes #86437

Signed-off-by: David Leach <david.leach@nxp.com>
2025-07-03 11:57:17 -05:00
Vinayak Kariappa Chettimada
3eee7c5325 Bluetooth: Controller: Fix peripheral role assertion on conn update
Fix peripheral role assertion during connection update and
simultaneous flash operations.

prepare_cb: Actual EVENT_OVERHEAD_START_US = 6149

This happens due to instant latency at connection update
where the ticks_at_expire was in the past.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-07-03 11:56:59 -05:00
Vinayak Kariappa Chettimada
6935a4bf90 Bluetooth: Controller: nRF54Lx: Flash sync restrict to one iteration
Write operations are not constant time on nRF54Lx SoCs and
depend on the previous value present versus new value to be
written. Hence, perform no more than one iteration.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-07-03 11:56:59 -05:00
Chaitanya Tata
ae198b8169 manifest: nrf_wifi: Pull new raw TX handling
Fixes the issue of leave the packets in the pending queue till a new TX
comes.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-03 11:56:43 -05:00
Chaitanya Tata
b8d31f10d9 modules: nrf_wifi: Implement new Raw TX APIs
The new raw TX handling relies on these APIs, so, implement them for
Zephyr shim.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-03 11:56:43 -05:00
Phi Bang Nguyen
7a3737b9bb samples: video: capture: Enable deferred logging
Immediate log mode may use a lot of stack and hence may cause some stack
overflow on some boards.

Enable deferred log mode to have the least impact on the application.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-07-03 11:56:30 -05:00
Phi Bang Nguyen
1c9f8904ed samples: video: capture: Add condition for test pattern test
Add condition to do the test pattern fixture test only if the test
pattern control was successfully set.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-07-03 11:56:30 -05:00
Alain Volmat
706895cc27 samples: video: capture_to_lvgl: add crop/compose support
Demonstrate the crop/compose API by introducing 4 new
CONFIG options in order to define the crop area.
Moreover, if the selection API is available and if
the targetted size is different from the current crop
size, then try to apply a compose in order to reach
the targetted format size.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-07-03 11:56:07 -05:00
Alain Volmat
aa345401bb samples: video: capture_to_lvgl: add stm32n6570_dk/fsbl conf
Add the conf file for the stm32n6570_dk in its FSBL variant

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-07-03 11:56:07 -05:00
Alain Volmat
5508534685 samples: video: capture: add conf for stm32n6570_dk fsbl
Add the board conf file for the stm32n6570_dk in its fsbl
variant.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-07-03 11:56:07 -05:00
Alain Volmat
a61039ceeb shields: st_b_cams_imx_mb1854: set sensor conf if DCMIPP is enabled
Instead of having a conf file for all variants of STM32N6570_DK,
set the necessary settings for any platform which has DCMIPP enabled.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-07-03 11:56:07 -05:00
Abhinav Kulkarni
fb3f4b1d3a boards: shields: nxp_m2_wifi_bt: doc: Update doc
Updated shield document for NXP's m2 modules.

Signed-off-by: Abhinav Kulkarni <abhinav.kulkarni@nxp.com>
2025-07-03 11:55:53 -05:00
Karol Lasończyk
cd42555ea6 snippets: nordic-flpr: Fix nRF54LM20A memory layout
Fixes wrongly set memory space for FLPR core.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2025-07-03 11:55:42 -05:00
Erwan Gouriou
713c7ac1f8 boards: stm32n6570_dk: Update doc and migration guide.
Clarify expectations about the recently modified default variant of the
board.
Update migration guide to warn existing users about the change.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-07-03 11:55:26 -05:00
Hake Huang
b90651acc2 boards: dts: mimxrt1160_evk_cm4: sram shall not be put to ocram
as in mbox cases the ocram is used as code area, so shall not be used
as sram again. this is a typo introduced by
aec0355380

fixing: #82841

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2025-07-03 11:55:15 -05:00
Jan Behrens
276bdb2246 boards: shields: Fixes Stepper 19 Click GPIO Expander
Replaces TI TCA9538 with NXP PCA9538. Also adds additional links to the
readme.

Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
2025-07-03 11:55:05 -05:00
Jiawei Yang
89d54b6f48 Bluetooth: HFP: Fail to get Bluetooth Profile Descriptor List
In HFP PTS, cases run fail with the log 'Bluetooth Profile Descriptor
List UUID (0x111E) is missing'.

With this patch, the affected cases can pass correctly.

Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
2025-07-03 11:54:40 -05:00
Benjamin Cabé
0a102c90de doc: project_roles: enhance maintainer responsibilities re: CoC
Emphasize the role of maintainers in upholding the project's code of
conduct and fostering an inclusive environment for all.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-03 11:54:29 -05:00
Jukka Rissanen
b573485d5c doc: release-notes: Add wifi information to 4.2
Add information about hostap IPC mechanism change that can save up to
6-8 kB memory when using native wifi stack.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-07-03 11:54:19 -05:00
Mirko Covizzi
5b3a48c063 scripts: requirements-base: pin patool to >=2.0.0
This resolves an issue on MacOS where
`west sdk install` would fail when extracting
a `.tar.xz` package due to the command line
options selected by patool.

Signed-off-by: Mirko Covizzi <mrkcvzz@gmail.com>
2025-07-03 11:54:10 -05:00
Daniel DeGrasse
4852719f98 release: fix PATCHLEVEL revision for RC1
Correct patchlevel version for RC1 to use one zero, it was mistakenly
set to 00

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-07-02 13:42:14 -10:00
Josuah Demangeon
645f3d38e1 drivers: video: fix order of fields to allow use with FIFOs
The struct video_buffer are currently used with `struct k_fifo`, which
require them to preserve the first word of data for use by the kernel.
Move the first fields to make it possible to keep using video buffers in
FIFO safely.

Fixes #92526

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-02 17:58:46 -05:00
Gaetan Perrot
48c85cb065 sensor: sensor_axis_align: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Gaetan Perrot
9125e8941d sensor: adxl3xx: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Gaetan Perrot
ccad3cf5b6 sensor: sensor_axis_align: clarify defgroup
Rename and clarify the @defgroup SENSOR_AXIS_ALIGN to better reflect its
purpose. Replace the vague "DT Options" title with a more descriptive
name: "Sensor axis alignment DT options".

This improves documentation clarity for developers configuring sensor
orientation via Device Tree.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Gaetan Perrot
4d11a1188c sensor: adxl3xx: Clarify defgroup names in DT bindings
Replace vague "ADI DT Options" titles with explicit, device-specific
@defgroup names such as "ADXL345 DT Options", "ADXL362 DT Options",
"ADXL367 DT Options", and "ADXL372 DT Options".

This improves clarity for developers and documentation readers by avoiding
the unclear "ADI" abbreviation.

Fix: #92021

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Jun Lin
aa3db8e5bb mgmt: ec_host_cmd: backend: shi_npcx: fix log message
This commit fixes the content of the log messages that appear when an
error occurs while applying the pinctrl.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-07-02 17:58:20 -05:00
Tom Hughes
d732a51d56 tests: kernel: gen_isr_table: Don't use IRQ1 if already used
IRQ 1 is used by the LiteX timer, so we can't use it for the test:

gen_isr_tables.py: error: multiple registrations at table_index 1 for
irq 1 (0x1)

Existing section
['.irq.WEST_TOPDIR/zephyr/tests/kernel/gen_isr_table/src/main.c.0'],
new section .irq.WEST_TOPDIR/zephyr/drivers/timer/litex_timer.c.0

Has IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the
same irq multiple times?

Issue #92194

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-07-02 17:58:08 -05:00
Tom Hughes
14f1c567f9 arch: riscv: Increase IDT_LIST size
Some boards fail to build arch.interrupt.gen_isr_table_local.riscv test
since this region is too small:

riscv64-zephyr-elf/bin/ld.bfd: zephyr/zephyr_pre0.elf section `.intList'
will not fit in region `IDT_LIST'

riscv64-zephyr-elf/bin/ld.bfd: region `IDT_LIST' overflowed by 239 bytes

This is a bogus memory region, so increasing it has no effect on the
final binary size.

Issue #92194

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-07-02 17:57:58 -05:00
Grzegorz Swiderski
d9c5545804 tests: kernel: interrupt: Fix for nRF54H20 FLPR
Use designated IRQ numbers, instead of generic defaults.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-07-02 17:57:45 -05:00
Jonathan Nilsen
b18c326946 soc: nordic: move nrf_ironside from drivers/firmware to soc/nordic
Move the IronSide APIs to soc/nordic from drivers/firmware since
these are vendor specific APIs. The header files are now included
from <nrf_ironside/*.h>. Adjust code that uses these APIs accordingly.

Also move the DT binding for "nordic,ironside-call" from
bindings/firmware to bindings/misc.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2025-07-02 17:57:45 -05:00
Grzegorz Swiderski
75dd614437 drivers: firmware: nrf_ironside: Update the spelling
s/IRONside/IronSide/g

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-07-02 17:57:45 -05:00
Alberto Escolar Piedras
0903efa882 soc nrf54lm20a: Fix entropy source
nordic,entropy-prng does not exist in Zephyr (it is part of NCS)
but we have in both the nordic,nrf-cracen-ctrdrbg which is
an actual source of true entropy and works with this SOC.
Let's use that instead.

Fixes failures to build targeting the nrf54lm20dk any test/sample
which uses the entropy driver.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-02 03:56:50 -10:00
Jérôme Pouiller
e7fdc84696 cmake: Fix support for "ninja flash"
By default west looks at the parents directory to find Zephyr base
directory. However, in the case the build directory is not a subdirectory
of zephyr base and the user run "ninja flash" directly from the build
directory, west fails to detect Zephyr base.

So, this patch explicitly add ZEPHYR_BASE in the environment.

Implementation notes:
  * ZEPHYR_BASE is already set for ninja menuconfig in
    cmake/modules/kconfig.cmake:201
  * ZEPHYR_BASE seems better than --zephyr-base since the environment in
    inherited
  * BTW, --zephyr-base seems to not have any impact and seems broken

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-07-02 03:55:49 -10:00
Tim Pambor
e6f179d180 tests: net: dns-sd: Fix undefined behavior reported by UBSAN
htons() takes uint16_t as argument. Add the 'u' suffix to the
TTL constants to ensure the correct unsigned type is used and to avoid
undefined behavior if these functions are implemented as macros using
bit shifts.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-02 03:55:06 -10:00
Tim Pambor
659382f1e9 tests: net: dns-sd: Use standard struct in_addr for IPs
Refactored the code to use the standard struct in_addr for
representing IPv4 addresses instead of a uint32_t combined
with the custom IP_ADDR macro.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-02 03:55:06 -10:00
Khaoula Bidani
7fbff46207 STM32U3: boards:st: update U3 board documentation
update U3 board user manual and reference manual links

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-07-02 03:54:20 -10:00
Robert Lubos
d720971ae2 net: coap: Verify block number before processing
Verify if the block number isn't negative before processing it, to
prevent potentially undefined behavior. This was reported by the
undefined behavior sanitizer.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-02 03:53:40 -10:00
Marcin Szymczyk
ad032fca86 MAINTAINERS: add masz-nordic as RISC-V arch collaborator
Adding myself to follow and contribute changes in RISC-V arch.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-07-02 03:52:51 -10:00
Vit Stanicek
fe11acc21c samples: i2s_codec: Fix i2s API misuse
Replace i2s_write invocation with i2s_buf_write invocation for test sine
wave playback.

When CONFIG_USE_DMIC=n, this sample attempts to play back a test sine
wave encoded in sine.h. As the i2s_write treats the given buffer as a
memory slab, it overwrites parts of it, resulting in data corruption and
improper playback. i2s_buf_write accepts a buffer existing outside the
playback queue (heap).

Manually tested on mimxrt595_evk/mimxrt595s/cm33 where it was first
observed.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2025-07-02 03:52:35 -10:00
Mark Wang
b93dec9295 bluetooth: sdp: cast from 'const x *' to 'struct x *' drops const qualifier
SonarQube reports: cast from 'const struct _snode *' to 'struct _snode *'
drops const qualifier. Fix it by removing the const.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 7982ee0df13b7f9e54595f799e32f38c464b0f9e)
2025-07-02 03:52:02 -10:00
Mark Wang
3887980c29 bluetooth: sdp: fix the corner cases for the sdp discover
1. bt_sdp_discover may be called in two tasks at the same time:
(1) If the 2 calls are for 2 acl conns,
the same session may be new allocated to two acl conns.
(2) If the 2 calls are for the same acl conn, the same session should be
used.
Use the bt_conn_index to map acl conn with session to fix it.
2. fix that bt_sdp_discover may use one session that is disconnecting,
put req to reqs_next and process it after disconnected.
3. remove memset of session, reset each members individually.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit dcbe5d7dc5d72ce0d2915cf2b291cc84a916a536)
2025-07-02 03:52:02 -10:00
Mark Wang
2fa9f3b557 bluetooth: sdp: callback the pending reqs when sdp l2cap connecting fail
If the sdp l2cap connecting fail, the pending reqs need callback.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-07-02 03:52:02 -10:00
Chaitanya Tata
4bd1d39c67 wifi: nrf70: Fix system work queue stack size override
Defaults cannot be overidden (even with configdefault extension), they
only work if the original symbol is defined after the override e.g.,
"drivers and then subsys/net" but for kernel symbols,the default value
overrides don't work due "kernel and drivers" order, the kernel defines
the original symbol with the default and then it cannot be overridden.

Move the kernel symbol override to the original definition to make it
affect. Else any sample that uses nRF70 but doesn't enable WPA
supplicant ends up with 1024 and crashes.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-01 19:04:00 -05:00
Chaitanya Tata
54573e2a67 modules: nrf_wifi: Fix accuracy of microseconds API
Using ms and converting to us is a bad idea as we still get ms
granualrity in us units. Use the proper API to get us granularity.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-01 19:03:51 -05:00
Abderrahmane JARMOUNI
dd594d54f5 tests: kernel: device: expand device api coverage
Enhance device z_device_get_all_static API test

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-07-01 19:03:40 -05:00
Abderrahmane JARMOUNI
ddbc7efed6 tests: kernel: device: expand device api coverage
Add test coverage for device device_get_by_dt_nodelabel() API

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-07-01 19:03:40 -05:00
Abderrahmane JARMOUNI
1f4e78eb33 tests: kernel: device: add dev deinit api coverage
Add test coverage for device de-initialization API

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-07-01 19:03:40 -05:00
Florian La Roche
25e1b88880 net: dns: is_server_name_found(): fix return code check
In is_server_name_found() fix the return code checking
of net_addr_ntop().

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2025-07-01 19:03:29 -05:00
Gaetan Perrot
7d5902dd1b drivers: akm09918c: fix null dereference in submit function
Fix a null pointer dereference in akm09918c_submit(), where writeByte_sqe
was dereferenced before checking if it was NULL.

Coverity reported this as CID 516247: the pointer returned by
i2c_rtio_copy_reg_write_byte() may be NULL, and accessing its `flags`
field before checking leads to undefined behavior.

Move the access to writeByte_sqe->flags after confirming both
writeByte_sqe and cb_sqe are valid.

Fixes: CID 516247

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-01 19:03:19 -05:00
Mike J. Chen
9eaed805c1 drivers: audio: dmic_mcux: init active_buf_idx when setting up dma
In case the dmic had previous been run and stopped,
make sure active_buf_idx is initialized to 0 when
setting up dma on start, otherwise the dma callback
can return the wrong buffer.

Also purge the rx_queue before freeing the slab buffers,
to minimize risk of any async read request getting
back a slab buffer that is freed.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-07-01 19:03:07 -05:00
Sylvio Alves
ae3fb6e091 tests: boot: add Espressif boards to MCUboot test case
Include all supported Espressif SoC variants in the MCUboot
test suite to ensure proper CI coverage.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-01 11:12:25 -10:00
Declan Snyder
2e0357c4c4 drivers: spi_nxp_lpspi: Fix extra byte issue on v1
The interrupt handling was not deterministic before because it relied
on "guessing" if the lpspi was a v1 type that was stalling due to design
errata. This obviously ended up being wrong in some cases. So we really
need to fix this so that it is deterministic, and my idea to do that is
to explicitly count how many words we have written to the TX fifo
throughout the whole transfer.

As a side effect of making the IRQ more deterministic, we can't support
the SPI_HOLD_ON_CS flag for v1 LPSPI anymore. It is fundamentally
impossible due to the fact that the transfer can only complete in
hardware as a result of CS deasserting. If this is absolutely a
requirement to support this flag in the future, my recommendation is to
update the driver so that it muxes the pin to a gpio before ending the
transfer, but that would kind of defeat the point of having a native CS,
at least at the end of the xfer.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-01 11:00:43 -10:00
Declan Snyder
0574ac7e84 tests: spi_loopback: skip hold_on_cs test if not supported
This early exit section is only reached if there is an error.
In the case of not supported, the ret variable will be 0 and zassert
won't happen. This is because the test was meant to be skipped, not
passed or failed, in this case. So add the skip call.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-01 11:00:43 -10:00
Emil Gydesen
b9b3529498 MAINTAINERS: Remove inactive collabs for Bluetooth Audio
The two collaborators, Casper-Bonde-Bose and MariuszSkamra,
are not actively collaborating on Zephyr anymore.
Remove to avoid assigning them as reviewer for PRs which
gives a false sense of who may actually review PRs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-07-01 10:59:57 -10:00
Ofir Shemesh
b2d7094f15 drivers: ethernet: nxp_enet: Fix PHY configure for fixed-link config
Update the driver to handle -ENOSYS from phy_configure_link(), which is
now returned when the cfg_link callback is missing (e.g., in fixed-link
PHYs).

Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
2025-07-01 10:59:32 -10:00
Pisit Sawangvonganan
0ec49fa570 kconfig: fix typo in (soc, subsys)
Utilize a code spell-checking tool to scan for and correct spelling errors
in `Kconfig` files within the `soc` and `subsys` directory.
Additionally, incorporates a fix recommended by the reviewer.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-07-01 10:58:54 -10:00
Pisit Sawangvonganan
a163f9db61 kconfig: fix typo in (arch, boards, kernel, modules, samples, share)
Utilize a code spell-checking tool to scan for and correct spelling errors
in `Kconfig` files within the `arch`, `boards`, `kernel`, `modules`,
`samples`, and `share` directory.
Additionally, incorporates a fix recommended by the reviewer.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-07-01 10:58:54 -10:00
Pisit Sawangvonganan
b8a8173c1f drivers: kconfig: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in `Kconfig` files within the `drivers` directory.
Additionally, incorporates a fix recommended by the reviewer.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-07-01 10:58:54 -10:00
Pisit Sawangvonganan
2d3a24b9b6 doc: fix typo in multiple directories before v4.2.0 release
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `doc` directory.

In `dsa_txrx_process.svg`, correct the typo `Tansmit` to `Transmit`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-07-01 10:57:13 -10:00
Jiawei Yang
05e64bd699 Bluetooth: L2CAP: Limit BR/EDR L2CAP RX MTU to configured value
Ensure that the BR/EDR L2CAP RX MTU is limited to the configured
BT_L2CAP_RX_MTU value during channel configuration.

This change prevent potential buffer overflow issues when receiving
data larger than the configured buffer size.

Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
2025-07-01 10:56:44 -10:00
Jiawei Yang
c0b1ed0682 Bluetooth: RFCOMM: Fix MTU calculation in rfcomm_connected
The MTU calculation in rfcomm_connected() was incorrectly adding the FCS
size instead of subtracting it.
This could lead to buffer overflows when sending data that exceeds
the actual available space.

Fix the calculation by properly subtracting both the RFCOMM header size and
the FCS size from the L2CAP MTU to get the correct RFCOMM session MTU.

Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
2025-07-01 10:56:44 -10:00
Emil Gydesen
79204ecc71 Bluetooth: TMAP: Fix issues with _SUPPORTED kconfigs
Some of the Kconfig options did not reflect the actual
requirements from the TMAP spec. Relying on the AUDIO_TX
and AUDIO_RX was misleading, as they could be set by
broadcast configurations when the features required
unicast features.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-07-01 10:56:06 -10:00
Adam Kondraciuk
f7fd6b8e54 soc: nordic: s2ram: Optimize s2am marking functions
Optimize `pm_s2ram_mark_check_and_clear()` function.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-07-01 10:55:35 -10:00
Adam Kondraciuk
394f3c75b2 Revert "soc: nordic: s2ram: Align s2ram marking procedures"
The marking procedures can be reverted, since at this stage
it is already allowed to use the stack.
The MSP is temporairly set to interrupt stack in `reset.S` file before
calling s2ram procedures..

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>

This reverts commit e68d110f7c.
2025-07-01 10:55:35 -10:00
Piotr Koziar
545886bcff soc: nordic: nrf54l: add Kconfig to control whether to apply Errata 56
Adds config option that allows configuration workaround 56.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2025-07-01 10:54:21 -10:00
Emil Gydesen
e72e837971 tests: Bluetooth: Tester: VCP BSIM test
Adds BSIM testing of the VCP features of the BT Tester.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-07-01 10:54:09 -10:00
Cong Nguyen Huu
a53582dab8 tests/samples: drivers: create test, sample for psi5 driver
Create test, sample for psi5 driver

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2025-07-01 10:53:59 -10:00
Cong Nguyen Huu
fb1d1d3b58 boards: s32z270: enable support psi5
enable support psi5

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2025-07-01 10:53:59 -10:00
Cong Nguyen Huu
c52ba71f94 drivers: introduce support Peripheral Sensor Interface (PSI5) driver
This driver allows to communication (send, receive) with PSI5 device

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2025-07-01 10:53:59 -10:00
Emil Gydesen
2298ec49c7 tests: Bluetooth: Audio: Add common start_broadcast_adv
Add a common function, start_broadcast_adv, to start
broadcast advertisement in the LE Audio BSIM tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-07-01 05:57:48 -10:00
Chaitanya Tata
014dee722b modules: hostap: Fix EAP dependencies
In case anyone enabled EAP_*_ALL explicitly without enabling the
Enterprise then it leads to a build error.

Fix by adding the dependency.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-01 05:57:28 -10:00
Alberto Escolar Piedras
3197e7a89d drivers/fuel_gauge/lc709203f: Avoid declaring var right after label
Avoid the following clang error
`error: label followed by a declaration is a C23 extension`
by writing this switch case as a codeblock.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 05:56:25 -10:00
Théo Battrel
f4c8a5256a MAINTAINERS: Remove myself from Bluetooth Host/HCI
This is my last week working at Nordic Semiconductor.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2025-07-01 05:56:14 -10:00
Łukasz Stępnicki
d7fd99ecc6 tests: kernel: interrupt: generic ISR offset definition for nrf54h20 VPRs
All VPRs in nrf54h20 can have same ISR offset configuration.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2025-07-01 05:55:36 -10:00
Andrzej Głąbek
88898b4339 MAINTAINERS: remove anangl as ADC and PWM maintainer
I won't be able to act as a maintainer in these areas.
Degrade my role to collaborator.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-07-01 05:55:19 -10:00
Qiankun Li
305d511c3e modules: hostap: Fix DPP soft AP security type show issue.
[Description]
After starting a DPP soft ap, enter 'wifi ap status'.
Security is shown as 'UNKNOW'.

[Root Cause]
1. Start a DPP soft ap:
   wifi ap enable -s xxx -c x -p xxx -k 11
   The parameter '-k 11' corresponds to
   zephyr security type 'WIFI_SECURITY_TYPE_DPP'.
2. hapd_config_network() will be called to config a
new hostap bss.
3. Filed 'bss->wpa_key_mgmt' is set to
   WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_DPP.
4. When try to get security type of DPP soft ap,
there is no corresponding zephyr security type.

[Fix]
Add enhance code to convert the security type
to zephyr DPP security type.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-07-01 10:18:42 -05:00
Stephanos Ioannidis
d0bded3c8c arch: riscv: Fix incorrect Zalrsc extension name
`Zlrsc` is not a thing and the correct name for it is `Zalrsc`.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-07-01 10:18:19 -05:00
Stephanos Ioannidis
1b3534d627 cmake: gcc: Fix code formatting of target_riscv.cmake
This commit fixes the incorrect code formatting used by target_riscv.cmake
by changing the 4-space indent to 2-space and removing the space between if
keyword and parenthesis.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-07-01 10:18:19 -05:00
Katarzyna Giądła
9b428c8e5f twister: Fix tests statuses if quarantine is verified
If test configuration is not quarantined and `--quarantine-verify`
mode is enabled, these should be filtered and not attached
to reports.

Proposed change applies this approach.

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
2025-07-01 10:17:53 -05:00
Anas Nashif
e31f9bf324 ztest: native_sim: fail instead of crashing on wrong arguments
Instead of crashing fail with a message when -test arguments is of
wrong format.

Fixes zephyrproject-rtos/zephyr#91655

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-01 10:16:54 -05:00
Katarzyna Giądła
bec789d364 twister: Enable gathering footprint if test plan exists
If test plan is used, memory usage metrics are overridden.
Result of this operation is missing memory footprint.

This change removes redundand metrics update and fixes
described inconvenience.

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
2025-07-01 10:16:32 -05:00
Toon Stegen
d1872d7272 net: mdns: make net_buf size configurable
for longer DNS-SD text records and instance names we need a bigger
buffer

Signed-off-by: Toon Stegen <toon@toostsolutions.be>
2025-07-01 10:16:20 -05:00
Alberto Escolar Piedras
35a10937d7 tests/net: dhcpv6: Avoid directly accessing address of unaligned struct
Use UNALIGNED_MEMBER_ADDR when getting the address of possibly
unaligned structures members instead of attempting to directly
get the address as an offset.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 10:15:55 -05:00
Alberto Escolar Piedras
a1d916edd0 net: dhcpv6: Avoid directly accessing address of unaligned struct
Use UNALIGNED_MEMBER_ADDR when getting the address of possibly
unaligned structures members instead of attempting to directly
get the address as an offset.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 10:15:55 -05:00
Alberto Escolar Piedras
1deb2e3c68 net: http_server: Avoid directly accessing address of unaligned struct
Use UNALIGNED_MEMBER_ADDR when getting the address of possibly
unaligned structures members instead of attempting to directly
get the address as an offset.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 10:15:55 -05:00
Alberto Escolar Piedras
82658ea6b2 net: igmp: Avoid directly accessing address of unaligned struct
Use UNALIGNED_MEMBER_ADDR when getting the address of possibly
unaligned structures members instead of attempting to directly
get the address as an offset.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 10:15:55 -05:00
Alberto Escolar Piedras
236ccd379f net: ieee802154: Do not access addr of unaligned struct
Use UNALIGNED_MEMBER_ADDR when getting the address of possibly
unaligned structures members instead of attempting to directly
get the address as an offset.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 10:15:55 -05:00
Alberto Escolar Piedras
93fa3b7831 net: tcp: Avoid directly accessing address of unaligned struct
Use UNALIGNED_MEMBER_ADDR when getting the address of possibly
unaligned structures members instead of attempting to directly
get the address as an offset.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 10:15:55 -05:00
Alberto Escolar Piedras
34fece8f26 toolchain/gcc.h: Add macro to get address of unaligned member
In principle getting the address of an unaligned structure member
is undefined behaviour, and clang warns as much.
Let's provide a macro which can return such an address.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 10:15:55 -05:00
Chaitanya Tata
1fb2c56e86 modules: nrf_wifi: Fix interface down hang
When QSPI LPM is enabled, QSPI will already be uninitialized, and during
deinit if uninitialized is being called again then it leads to a hang as
it waits for mem busy check to pass which it won't.

Fix by checking if the device is initialized before calling
uninitialize.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-01 10:15:41 -05:00
Gaetan Perrot
2fc1dd54af arch: common: semihost: update RISC-V semihosting spec link
Replace dead link in include/zephyr/arch/common/semihost.h.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-01 10:15:32 -05:00
Gaetan Perrot
239007632c arch: common: update RISC-V semihosting spec link
Replace dead link in arch/common/Kconfig.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-01 10:15:32 -05:00
Gaetan Perrot
34fd8d0049 doc: semihosting: update semihosting spec link
Replace dead link in semihosting documentation.

Fix #88206

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-01 10:15:32 -05:00
Sylvio Alves
72b0f08d0b samples: i2s echo: guard audio_codec configuration
Ensure the I2S echo sample only configures the audio_codec driver
when the `audio_codec` node is defined and enabled in the devicetree.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-07-01 10:15:14 -05:00
Łukasz Stępnicki
24322c609f drivers: nrf_ironside: dvfs abb analog status workaround
Until register ABB->STATUSANA is visible it must be checked using
defined offset to base ABB register.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2025-07-01 10:14:58 -05:00
Fabio Baltieri
b15404f998 uart_bridge: log the device name on bitrate changes
Add a log for the device name on bitrate changes, without this it's very
hard to understand what's going on in a system with multiple bridges.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-06-30 17:39:09 -05:00
Yishai Jaffe
6231972dd4 lib: libc: fixed Kconfig typo
Fixed typo streror -> strerror

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-06-30 17:38:17 -05:00
Sylvio Alves
d76e39e8f0 west.yml: hal_espressif: reserve BLE IRQ in interrupt descriptor
Ensure that the BLE interrupt remains marked as reserved in the
interrupt table descriptor when it’s in use. This prevents accidental
reassignment of the BLE IRQ in downstream configurations.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-30 17:38:00 -05:00
Alex Zhou
9aa0ae9378 samples: Bluetooth: PAWR: Fix Response Slot Delay Value is too Small
Previously, reponse slot value is 5* 1.25ms = 6.25ms , on nxp rw61x
platform, host got the periodic adv report v2 and after about 6ms,
send reponse data cmd,  it is too late , so always rpt the 0x46 too
late err code to host , in order to send the response , so make rsp
delay update to 10ms.

Signed-off-by: Alex Zhou <alex.zhou@nxp.com>
2025-06-30 17:37:19 -05:00
Fin Maaß
369517444b lib: smf: mark as unstable
mark State Machine Framework API as unstable,
as it is now used by usb-c and hawkBit.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-30 15:24:37 -05:00
Josuah Demangeon
e23f12d6ae doc: release: mention new video-sw-generator snippet
This snippet got introduced, and is not a breaking change for C APIs but
still introduce a change of command line to use for building projects,
so add a migration guide entry.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-06-30 15:24:03 -05:00
Josuah Demangeon
28639862ba samples: drivers: video: capture: remove invalid build instruction
Remove the build instruction from README about using the native_sim
without using the video-sw-generator snippet, as it cannot build.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-06-30 15:24:03 -05:00
Josuah Demangeon
53dfa28367 samples: drivers: video: add DT_HAS_CHOSEN() safeguards
Add macros giving hints to users using #error, about what might be
missing to build and run the samples, such as a missing "chosen"
devicetree node.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-06-30 15:24:03 -05:00
Adam Kondraciuk
017dca302c tests: drivers: timer: nrf_grtc_timer: Align tests with uptime changes
Update GRTC tests to reflect uptime reset at startup.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-30 15:23:44 -05:00
Adam Kondraciuk
e77f942cff drivers: timer: nrf_grtc_timer: add last_count initialization
The GRTC counter is not cleared at startup, therefore the
`last_count` variable needs to be initialized accordingly.
This change:
- Prevents overflow of the `sys_clock_announce()` int32_t parameter
- Ensures the correct uptime value, which should be reset during
  initialization

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-30 15:23:44 -05:00
Pisit Sawangvonganan
a3d37e3f49 lib: smf: correct redundant ctx->executing assignment
Removed duplicate assignment of ctx->executing under
CONFIG_SMF_ANCESTOR_SUPPORT.
Also replaced #ifndef with #ifdef to align with the positive logic
used elsewhere in this file.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-06-30 15:20:48 -05:00
Vignesh Pandian
810536251d scripts: checkpatch: False alarm warning for macros.
Remove false alarm warning of
`braces {} are required around if/while/for/else`
for macro definitions with if/while/for/else.

Signed-off-by: Vignesh Pandian <vignesh@aerlync.com>
2025-06-30 15:20:28 -05:00
Anas Nashif
67caf3bb09 sca: eclair: use MISRA C:2012 Amendment 2
Use MISRA C:2012 Amendment 2 instead of 'MISRA C:2012 Amendment 2' in
all configuration files consistently.

Also fix a typo in one of the deviations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-30 15:20:13 -05:00
Daniel Leung
a9574c17ae xtensa: gdbstub: fix code stepping
The ICOUNTLEVEL register needs to be manipulated carefully
according to where we want to stop.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-30 15:19:59 -05:00
Tim Lin
0c627e94c8 drivers/pinctrl: ite: Don't clear FUNC3 setting unless alt_func is FUNC3
Previously, FUNC_3 related setting were cleared unconditionally,
regardless of the selected alternate function. This could
unintentionally disable FUNC_3 settings when configuring other
alternate functions.

This change ensures that FUNC_3 gcr/ext bits are only cleared
when alt_func is IT8XXX2_ALT_FUNC_3.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-06-30 15:19:49 -05:00
Daniel Schultz
2c767cbfc0 net: lib: zperf: Fix 'kbps' in output
zperf should only return 'Kbps'. There are still two left-overs
from converting shell prints to 'Kbps'.

Align all prints to make it easier for scripting and parsing
content from console output.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2025-06-30 15:19:39 -05:00
Imran Sajjad
63ebb75083 soc: imxrt: mimxrt1011 i2s clock fix
Fix for compiling i2s drivers on the NXP mimxrt1010_evk board.
For mimxrt1011, the defines kCLOCK_Sai2... are not defined as the sai2
peripheral does not exist. Trying to compile gives error. Fixed by adding
check for device tree node around code that uses the defines. Also added
same for sai1 and sai3. Thanks @lucien-nxp, @ZhaoxiangJin from NXP.

Signed-off-by: Imran Sajjad <imran.sajjad@iconfitness.com>
2025-06-30 15:19:24 -05:00
Matthew Wood
f70adf744d board: ubx_evk_iris_w1: update flash size
Correct flash memory size and storage partition size in
`ubx_evk_iris_w1_common.dtsi`.

Signed-off-by: Matthew Wood <matt.wood@corintech.com>
2025-06-30 15:19:14 -05:00
Robin Kastberg
1601a7d696 iar: linker_script: zero-init BSS
CONFIG_IAR_DATA_INIT did inadvertently not initialize BSS.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-06-30 15:18:30 -05:00
Robert Lubos
ae7d7a800e net: events: Add missing net_mgmt.h include
net_event.h header makes use of macros defined in net_mgmt.h, therefore
it should include that header.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-30 15:18:01 -05:00
Fin Maaß
514258aa23 riscv: select ATOMIC_OPERATIONS based on RISCV_ISA_EXT_A
use RISCV_ISA_EXT_A to select ATOMIC_OPERATIONS_BUILTIN or
ATOMIC_OPERATIONS_C.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-30 15:17:47 -05:00
Juha Ylinen
ed79675199 net: http_client: Fix handling of POLLHUP
POLLHUP event may be returned even if there is still data to read
and POLLIN is set. To ensure all data is consumed, check for
POLLHUP after handling POLLIN.

https://man7.org/linux/man-pages/man2/poll.2.html

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
2025-06-30 15:17:11 -05:00
Shan Pen
bd2f4ef946 drivers: modem_cellular: fix eg25g dial cmd response
eg25g modem should respond "CONNECT <text> " when run dial cmd "ATD"

Signed-off-by: Shan Pen <bricle031@gmail.com>
2025-06-30 15:16:48 -05:00
Yishai Jaffe
3b45feeb8b samples: fade_led: add direction per LED
Fixed a bug where that was caused because the different LEDs use the
same 'dir' variable and that caused them to eventually lose
synchronization.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-06-30 15:16:37 -05:00
Ta Minh Nhat
8d88d02a43 dts: arm: renesas: correct i3c device node address
Fix Devicetree build warning due to mismatched address values
of I3C device node

Signed-off-by: Ta Minh Nhat <nhat-minh.ta.yn@bp.renesas.com>
2025-06-30 15:16:17 -05:00
Shrek Wang
6527a1b23c net: tcp: Set the right th_win value in tester_prepare_tcp_pkt
The 16bit th_win in the TCP header was not set via htons(). It
will bring issues of wrong th_win value in the peer end. For
example, the 1280 (0x0500) TCP window size would be taken as
5 (0x0005) by the peer end.

Signed-off-by: Shrek Wang <inet_eman@outlook.com>
2025-06-30 15:16:02 -05:00
811 changed files with 19766 additions and 4417 deletions

6
.github/SECURITY.md vendored
View File

@@ -8,11 +8,11 @@ updates:
- The most recent release, and the release prior to that.
- Active LTS releases.
At this time, with the latest release of v4.0, the supported
At this time, with the latest release of v4.2, the supported
versions are:
- v4.1: Current release
- v4.0: Prior release
- v4.2: Current release
- v4.1: Prior release
- v3.7: Current LTS
## Reporting process

View File

@@ -44,7 +44,7 @@ jobs:
- name: Run assignment script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ZB_PR_ASSIGNER_GITHUB_TOKEN }}
run: |
FLAGS="-v"
FLAGS+=" -o ${{ github.event.repository.owner.login }}"

View File

@@ -42,7 +42,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.1.20250624
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.4.20250818
options: '--entrypoint /bin/bash'
env:
ZEPHYR_TOOLCHAIN_VARIANT: zephyr

View File

@@ -18,7 +18,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.1.20250624
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.4.20250818
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false

View File

@@ -17,7 +17,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.1.20250624
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.4.20250818
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false

View File

@@ -39,7 +39,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize CodeQL
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
@@ -53,6 +53,6 @@ jobs:
exit 0
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
with:
category: "/language:${{matrix.language}}"

View File

@@ -29,7 +29,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-22.04, macos-14, windows-2022]
steps:
- name: checkout

View File

@@ -15,8 +15,8 @@ permissions:
contents: read
env:
DOXYGEN_VERSION: 1.12.0
DOXYGEN_MD5SUM: fd96a5defa535dfe2e987b46540844a4
DOXYGEN_VERSION: 1.14.0
DOXYGEN_MD5SUM: e761a5097ae20ecccfd02041925f102a
JOB_COUNT: 4
jobs:

View File

@@ -13,7 +13,7 @@ jobs:
check-errno:
runs-on: ubuntu-24.04
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.28.0
image: ghcr.io/zephyrproject-rtos/ci:v0.28.4
steps:
- name: Apply container owner mismatch workaround

View File

@@ -28,7 +28,7 @@ jobs:
group: zephyr-runner-v2-linux-x64-4xlarge
if: github.repository_owner == 'zephyrproject-rtos'
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.1.20250624
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.4.20250818
options: '--entrypoint /bin/bash'
defaults:
run:

View File

@@ -1,7 +1,7 @@
name: Maintainer file check
on:
pull_request:
pull_request_target:
branches:
- main
paths:
@@ -37,7 +37,7 @@ jobs:
- name: Check maintainer file changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ZB_PR_ASSIGNER_GITHUB_TOKEN }}
run: |
python ./scripts/ci/check_maintainer_changes.py \
--repo zephyrproject-rtos/zephyr mainline_MAINTAINERS.yml MAINTAINERS.yml

View File

@@ -36,14 +36,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./scripts/ci/do_not_merge.py -p "${{ github.event.pull_request.number }}"
empty_pr_description:
if: ${{ github.event.pull_request.body == '' }}
name: PR Description
runs-on: ubuntu-24.04
steps:
- name: Check for PR description
run: |
echo "Pull request description cannot be empty."
exit 1
python -u scripts/ci/do_not_merge.py -p "${{ github.event.pull_request.number }}"

View File

@@ -28,7 +28,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-24.04]
steps:
- name: checkout

View File

@@ -56,6 +56,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
with:
sarif_file: results.sarif

View File

@@ -28,7 +28,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-24.04]
steps:
- name: checkout

View File

@@ -127,7 +127,7 @@ jobs:
needs: twister-build-prep
if: needs.twister-build-prep.outputs.size != 0
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.1.20250624
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.4.20250818
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false

View File

@@ -35,7 +35,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-24.04]
steps:
- name: checkout

View File

@@ -26,7 +26,7 @@ jobs:
name: Twister Black Box Tests
strategy:
matrix:
python-version: ['3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-24.04, macos-14, windows-2022]
fail-fast: false
runs-on: ${{ matrix.os }}

View File

@@ -32,7 +32,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-22.04, macos-14, windows-2022]
steps:
- name: checkout

View File

@@ -4,7 +4,7 @@
extend = ".ruff-excludes.toml"
line-length = 100
target-version = "py312"
target-version = "py310"
[lint]
select = [

View File

@@ -214,24 +214,53 @@ endif()
# 1) Using EXTRA_CFLAGS which is applied regardless of kconfig choice, or
# 2) Rely on override support being implemented by your toolchain_cc_optimize_*()
#
get_property(OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET compiler PROPERTY no_optimization)
get_property(OPTIMIZE_FOR_DEBUG_FLAG TARGET compiler PROPERTY optimization_debug)
get_property(OPTIMIZE_FOR_SPEED_FLAG TARGET compiler PROPERTY optimization_speed)
get_property(OPTIMIZE_FOR_SIZE_FLAG TARGET compiler PROPERTY optimization_size)
get_property(OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET compiler PROPERTY optimization_size_aggressive)
get_property(COMPILER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET compiler PROPERTY no_optimization)
get_property(COMPILER_OPTIMIZE_FOR_DEBUG_FLAG TARGET compiler PROPERTY optimization_debug)
get_property(COMPILER_OPTIMIZE_FOR_SPEED_FLAG TARGET compiler PROPERTY optimization_speed)
get_property(COMPILER_OPTIMIZE_FOR_SIZE_FLAG TARGET compiler PROPERTY optimization_size)
get_property(COMPILER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET compiler PROPERTY optimization_size_aggressive)
get_property(ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET asm PROPERTY no_optimization)
get_property(ASM_OPTIMIZE_FOR_DEBUG_FLAG TARGET asm PROPERTY optimization_debug)
get_property(ASM_OPTIMIZE_FOR_SPEED_FLAG TARGET asm PROPERTY optimization_speed)
get_property(ASM_OPTIMIZE_FOR_SIZE_FLAG TARGET asm PROPERTY optimization_size)
get_property(ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET asm PROPERTY optimization_size_aggressive)
# Let the assembler inherit the optimization flags of the compiler if it is
# not set explicitly.
if(NOT ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG)
set(ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG ${COMPILER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
endif()
if(NOT ASM_OPTIMIZE_FOR_DEBUG_FLAG)
set(ASM_OPTIMIZE_FOR_DEBUG_FLAG ${COMPILER_OPTIMIZE_FOR_DEBUG_FLAG})
endif()
if(NOT ASM_OPTIMIZE_FOR_SPEED_FLAG)
set(ASM_OPTIMIZE_FOR_SPEED_FLAG ${COMPILER_OPTIMIZE_FOR_SPEED_FLAG})
endif()
if(NOT ASM_OPTIMIZE_FOR_SIZE_FLAG)
set(ASM_OPTIMIZE_FOR_SIZE_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_FLAG})
endif()
if(NOT ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG)
set(ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
endif()
# From kconfig choice, pick the actual OPTIMIZATION_FLAG to use.
# Kconfig choice ensures only one of these CONFIG_*_OPTIMIZATIONS is set.
if(CONFIG_NO_OPTIMIZATIONS)
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
elseif(CONFIG_DEBUG_OPTIMIZATIONS)
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_DEBUG_FLAG})
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_DEBUG_FLAG})
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_DEBUG_FLAG})
elseif(CONFIG_SPEED_OPTIMIZATIONS)
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SPEED_FLAG})
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_SPEED_FLAG})
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_SPEED_FLAG})
elseif(CONFIG_SIZE_OPTIMIZATIONS)
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SIZE_FLAG}) # Default in kconfig
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_FLAG}) # Default in kconfig
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_SIZE_FLAG})
elseif(CONFIG_SIZE_OPTIMIZATIONS_AGGRESSIVE)
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
else()
message(FATAL_ERROR
"Unreachable code. Expected optimization level to have been chosen. See Kconfig.zephyr")
@@ -245,8 +274,9 @@ SOC_* symbol.")
endif()
# Apply the final optimization flag(s)
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:${OPTIMIZATION_FLAG}>)
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:${OPTIMIZATION_FLAG}>)
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:${ASM_OPTIMIZATION_FLAG}>)
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:${COMPILER_OPTIMIZATION_FLAG}>)
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:${COMPILER_OPTIMIZATION_FLAG}>)
if(CONFIG_LTO)
zephyr_compile_options($<TARGET_PROPERTY:compiler,optimization_lto>)

View File

@@ -507,7 +507,7 @@ config SIZE_OPTIMIZATIONS
config SIZE_OPTIMIZATIONS_AGGRESSIVE
bool "Aggressively optimize for size"
help
Compiler optimizations wil be set to -Oz independently of other
Compiler optimizations will be set to -Oz independently of other
options.
config SPEED_OPTIMIZATIONS
@@ -1037,6 +1037,12 @@ config WARN_EXPERIMENTAL
Print a warning when the Kconfig tree is parsed if any experimental
features are enabled.
config NOT_SECURE
bool
help
Symbol to be selected by a feature to inidicate that feature is
not secure.
config TAINT
bool
help

View File

@@ -272,6 +272,7 @@ ARM SiP SVC:
- include/zephyr/sip_svc/
- include/zephyr/drivers/sip_svc/
- drivers/sip_svc/
- samples/subsys/sip_svc/
labels:
- "area: ARM SiP SVC"
tests:
@@ -371,7 +372,6 @@ Bluetooth HCI:
- hermabe
- Thalley
- sjanc
- theob-pro
- HoZHel
- cvinayak
files:
@@ -424,7 +424,6 @@ Bluetooth Host:
- rugeGerritsen
- sjanc
- Thalley
- theob-pro
- cvinayak
files:
- doc/connectivity/bluetooth/
@@ -482,6 +481,7 @@ Bluetooth Host:
- tests/bsim/bluetooth/hci_uart/
- tests/bsim/bluetooth/ll/
- tests/bsim/bluetooth/mesh/
- tests/bsim/bluetooth/tester/src/audio/
labels:
- "area: Bluetooth Host"
- "area: Bluetooth"
@@ -520,8 +520,6 @@ Bluetooth Audio:
- Thalley
collaborators:
- jhedberg
- Casper-Bonde-Bose
- MariuszSkamra
- sjanc
- asbjornsabo
- fredrikdanebjer
@@ -536,6 +534,7 @@ Bluetooth Audio:
- tests/bluetooth/audio/
- tests/bsim/bluetooth/audio/
- tests/bsim/bluetooth/audio_samples/
- tests/bsim/bluetooth/tester/src/audio/
- tests/bluetooth/shell/audio.conf
- tests/bluetooth/tester/overlay-le-audio.conf
- tests/bluetooth/tester/overlay-bt_ll_sw_split.conf
@@ -648,6 +647,9 @@ Build system:
- scripts/list_boards.py
- scripts/list_hardware.py
- scripts/schemas/*-schema.yml
- tests/misc/test_build/
- tests/application_development/
- samples/application_development/
labels:
- "area: Build System"
tests:
@@ -780,6 +782,7 @@ CMSIS-DSP integration:
- modules/cmsis-dsp/
- tests/benchmarks/cmsis_dsp/
- tests/lib/cmsis_dsp/
- samples/modules/cmsis_dsp/
labels:
- "area: CMSIS-DSP"
tests:
@@ -842,6 +845,7 @@ Common Architecture Interface:
- include/zephyr/arch/common/
- tests/arch/common/
- doc/hardware/porting/arch.rst
- doc/hardware/arch/
labels:
- "area: Architectures"
tests:
@@ -874,7 +878,7 @@ Debug:
- doc/services/profiling/perf.rst
- samples/subsys/profiling/perf/
- scripts/profiling/stackcollapse.py
- subsys/profiling/perf/
- subsys/profiling/
labels:
- "area: Debugging"
tests:
@@ -906,6 +910,7 @@ Demand Paging:
files:
- subsys/demand_paging/
- tests/kernel/mem_protect/demand_paging/
- samples/subsys/demand_paging/
tests:
- kernel.demand_paging
@@ -1014,7 +1019,9 @@ Display drivers:
- samples/subsys/display/
- tests/subsys/display/
- doc/hardware/peripherals/display/
- tests/drivers/*/display/
- tests/drivers/display/
- tests/drivers/build_all/display/
- samples/drivers/display/
labels:
- "area: Display"
tests:
@@ -1086,8 +1093,8 @@ Release Notes:
- "Release Notes"
"Drivers: ADC":
status: maintained
maintainers:
status: odd fixes
collaborators:
- anangl
files:
- drivers/adc/
@@ -1114,6 +1121,9 @@ Release Notes:
- drivers/audio/
- include/zephyr/audio/
- doc/hardware/peripherals/audio/
- samples/drivers/audio/
- tests/drivers/build_all/audio/
- tests/drivers/audio/
labels:
- "area: Audio"
@@ -1143,6 +1153,9 @@ Release Notes:
- drivers/auxdisplay/*
- dts/bindings/auxdisplay/*
- doc/hardware/peripherals/auxdisplay.rst
- samples/drivers/auxdisplay/
- tests/drivers/build_all/auxdisplay/
- samples/drivers/auxdisplay_*/
labels:
- "area: Aux display"
tests:
@@ -1220,6 +1233,7 @@ Release Notes:
- tests/drivers/clock_control/
- include/zephyr/drivers/clock_control/
- doc/hardware/peripherals/clock_control.rst
- samples/drivers/clock_control_*/
labels:
- "area: Clock control"
tests:
@@ -1395,6 +1409,7 @@ Release Notes:
- samples/subsys/edac/
- tests/subsys/edac/
- doc/hardware/peripherals/edac/
- include/zephyr/drivers/edac/
labels:
- "area: EDAC"
tests:
@@ -1475,6 +1490,7 @@ Release Notes:
- include/zephyr/net/phy.h
- include/zephyr/net/mii.h
- include/zephyr/net/ethernet.h
- samples/drivers/ethernet/
labels:
- "area: Ethernet"
tests:
@@ -1498,6 +1514,7 @@ Release Notes:
- include/zephyr/drivers/flash/
- tests/drivers/flash_simulator/
- tests/drivers/build_all/flash/
- tests/drivers/flash_api/
labels:
- "area: Flash"
tests:
@@ -1527,12 +1544,16 @@ Release Notes:
maintainers:
- aaronemassey
- teburd
collaborators:
- DBS06
files:
- drivers/fuel_gauge/
- dts/bindings/fuel-gauge/
- include/zephyr/drivers/fuel_gauge.h
- tests/drivers/fuel_gauge/
- doc/hardware/peripherals/fuel_gauge.rst
- samples/drivers/fuel_gauge/
- tests/drivers/build_all/fuel_gauge/
labels:
- "area: Fuel Gauge"
tests:
@@ -1574,6 +1595,7 @@ Release Notes:
- include/zephyr/dt-bindings/gnss/
- tests/drivers/build_all/gnss/
- tests/drivers/gnss/
- samples/drivers/gnss/
labels:
- "area: GNSS"
tests:
@@ -1703,6 +1725,8 @@ Release Notes:
- samples/drivers/mbox/
- dts/bindings/mbox/
- doc/hardware/peripherals/mbox.rst
- tests/drivers/mbox/
- samples/drivers/mbox_data/
labels:
- "area: mbox"
tests:
@@ -1784,6 +1808,7 @@ Release Notes:
- include/zephyr/drivers/reset.h
- dts/bindings/reset/
- include/zephyr/dt-bindings/reset/
- tests/drivers/reset/
"Interrupt Handling":
status: odd fixes
@@ -1860,6 +1885,7 @@ Release Notes:
- include/zephyr/drivers/led_strip.h
- tests/drivers/build_all/led_strip/
- include/zephyr/drivers/led_strip/
- samples/drivers/led/led_strip/
labels:
- "area: LED"
tests:
@@ -1890,6 +1916,7 @@ Release Notes:
- tests/drivers/build_all/modem/
- dts/bindings/modem/
- include/zephyr/drivers/modem/
- tests/drivers/modem/
labels:
- "area: Modem Drivers"
tests:
@@ -1945,6 +1972,7 @@ Release Notes:
- include/zephyr/drivers/rtc.h
- tests/drivers/build_all/rtc/
- dts/bindings/rtc/
- samples/drivers/rtc/
labels:
- "area: RTC"
tests:
@@ -2010,6 +2038,25 @@ Release Notes:
tests:
- sample.drivers.espi.ps2
"Drivers: PSI5":
status: maintained
maintainers:
- manuargue
- Dat-NguyenDuy
collaborators:
- congnguyenhuu
files:
- drivers/psi5/
- include/zephyr/drivers/psi5/
- dts/bindings/psi5/
- doc/hardware/peripherals/psi5.rst
- tests/drivers/psi5/
- samples/drivers/psi5/
labels:
- "area: PSI5"
tests:
- drivers.psi5
"Drivers: PTP Clock":
status: maintained
maintainers:
@@ -2037,10 +2084,9 @@ Release Notes:
- "area: PM CPU ops"
"Drivers: PWM":
status: maintained
maintainers:
- anangl
status: odd fixes
collaborators:
- anangl
- henrikbrixandersen
files:
- drivers/pwm/
@@ -2052,6 +2098,7 @@ Release Notes:
- tests/drivers/build_all/pwm/
- include/zephyr/drivers/pwm.h
- include/zephyr/drivers/pwm/
- samples/basic/blinky_pwm/
labels:
- "area: PWM"
tests:
@@ -2115,6 +2162,7 @@ Release Notes:
- include/zephyr/dt-bindings/sensor/
- doc/hardware/peripherals/sensor/
- tests/drivers/build_all/sensor/
- include/zephyr/drivers/sensor_*
labels:
- "area: Sensors"
tests:
@@ -2132,6 +2180,8 @@ Release Notes:
- include/zephyr/drivers/sent/
- dts/bindings/sent/
- doc/hardware/peripherals/sent.rst
- tests/drivers/sent/
- samples/drivers/sent/
labels:
- "area: SENT"
tests:
@@ -2167,6 +2217,8 @@ Release Notes:
- dts/bindings/spi/
- include/zephyr/dt-bindings/spi/
- doc/hardware/peripherals/spi.rst
- tests/drivers/build_all/spi/
- samples/drivers/spi_*/
labels:
- "area: SPI"
tests:
@@ -2226,6 +2278,7 @@ Release Notes:
- tests/drivers/*/video/
- dts/bindings/video/
- samples/drivers/video/
- tests/drivers/video/
labels:
- "area: Video"
tests:
@@ -2241,7 +2294,9 @@ Release Notes:
files:
- drivers/virtio/
- dts/bindings/virtio/
- include/zephyr/virtio/
- include/zephyr/drivers/virtio.h
- include/zephyr/drivers/virtio/
- tests/drivers/build_all/virtio/
labels:
- "area: VIRTIO"
@@ -2295,6 +2350,7 @@ Release Notes:
files:
- drivers/wifi/
- dts/bindings/wifi/
- tests/drivers/build_all/wifi/
labels:
- "area: Wi-Fi"
@@ -2369,6 +2425,7 @@ Release Notes:
- include/zephyr/drivers/virtualization/
- doc/services/virtualization/
- include/zephyr/drivers/virtualization/ivshmem.h
- samples/drivers/virtualization/
labels:
- "area: Virtualization"
tests:
@@ -2698,6 +2755,7 @@ Linker Scripts:
- include/zephyr/linker/
- tests/misc/iterable_sections/
- tests/application_development/code_relocation/
- samples/application_development/code_relocation_nocopy/
labels:
- "area: Linker Scripts"
tests:
@@ -2758,6 +2816,8 @@ LoRa and LoRaWAN:
- include/zephyr/dt-bindings/lora/
- dts/bindings/lora/
- doc/connectivity/lora_lorawan/index.rst
- tests/subsys/lorawan/
- tests/drivers/build_all/lora/
labels:
- "area: LoRa"
tests:
@@ -3224,9 +3284,9 @@ Open AMP:
status: maintained
maintainers:
- carlocaione
- iuliana-prodan
collaborators:
- uLipe
- iuliana-prodan
files:
- lib/open-amp/
- samples/subsys/ipc/openamp/
@@ -3301,6 +3361,7 @@ Power management:
- drivers/power_domain/
- dts/bindings/power/
- include/zephyr/dt-bindings/power/
- tests/drivers/build_all/power_domain/
labels:
- "area: Power Management"
tests:
@@ -3328,6 +3389,7 @@ RISCV arch:
- npitre
- ycsin
- VynDragon
- masz-nordic
files:
- arch/riscv/
- boards/enjoydigital/litex_vexriscv/
@@ -3370,6 +3432,7 @@ Samples:
collaborators:
- nashif
files:
- samples/sample_definition_and_criteria.rst
- samples/
labels:
- "area: Samples"
@@ -3427,6 +3490,7 @@ Twister:
- tests/test_config.yaml
- scripts/utils/twister_to_list.py
- tests/robot/common.robot
- scripts/pylib/*-twister-harness/
labels:
- "area: Twister"
@@ -3438,6 +3502,7 @@ Settings:
- tests/subsys/settings/
- samples/subsys/settings/
- doc/services/storage/settings/
- tests/subsys/settings_commit_prio/
labels:
- "area: Settings"
tests:
@@ -3773,6 +3838,7 @@ Intel Platforms (X86):
- drivers/timer/apic*
labels:
- "platform: X86"
- "platform: Intel"
Intel Platforms (Xtensa):
status: maintained
@@ -4042,6 +4108,7 @@ Microchip MEC Platforms:
- tests/boards/mec172xevb_assy6906/
- dts/bindings/*/microchip,mec*
- dts/bindings/*/microchip,xec*
- samples/boards/microchip/
labels:
- "platform: Microchip MEC"
@@ -4064,7 +4131,6 @@ Microchip SAM Platforms:
maintainers:
- nandojve
collaborators:
- attie-argentum
- pdgendt
- mnkp
- stephanosio
@@ -4103,6 +4169,9 @@ nRF Platforms:
- tests/drivers/*/*nrf*/
- snippets/nordic*/
- tests/boards/nrf/
files-exclude:
- drivers/wifi/nrf_wifi/
- dts/bindings/wifi/
labels:
- "platform: nRF"
@@ -4186,6 +4255,8 @@ Renesas RA Platforms:
- dts/bindings/*/*renesas,ra*
- soc/renesas/ra/
- samples/boards/renesas/
- tests/boards/renesas/
- include/zephyr/drivers/misc/renesas_ra_external_interrupt/
labels:
- "platform: Renesas RA"
description: >-
@@ -4528,6 +4599,20 @@ Sensry Platforms:
labels:
- "platform: sensry"
SPDX Tooling:
status: maintained
maintainers:
- kartben
collaborators:
- pdgendt
- swinslow
files:
- scripts/west_commands/spdx.py
- scripts/west_commands/zspdx/
- tests/application_development/software_bill_of_materials/
labels:
- "area: SPDX Tooling"
Storage:
status: odd fixes
files:
@@ -5338,7 +5423,7 @@ West:
files:
- modules/Kconfig.intel
labels:
- "platform: Intel"
- "platform: Intel ISH"
"West project: zephyr-lang-rust":
status: maintained
@@ -5733,6 +5818,7 @@ Xtensa arch:
- soc/cdns/dc233c/
- soc/cdns/xtensa_sample_controller/
- tests/arch/xtensa/
- doc/hardware/arch/xtensa.rst
labels:
- "area: Xtensa"
@@ -5831,6 +5917,7 @@ Random:
files:
- subsys/random/
- include/zephyr/random/
- tests/subsys/random/
labels:
- "area: Random"
@@ -5920,6 +6007,7 @@ RX arch:
- boards/qemu/rx/
- soc/renesas/rx/
- tests/arch/rx/
- include/zephyr/drivers/misc/renesas_rx_external_interrupt/
labels:
- "area: RX"
tests:

View File

@@ -1 +1 @@
0.17.2
0.17.4

View File

@@ -1,5 +1,5 @@
VERSION_MAJOR = 4
VERSION_MINOR = 2
PATCHLEVEL = 00
PATCHLEVEL = 1
VERSION_TWEAK = 0
EXTRAVERSION = rc1
EXTRAVERSION =

View File

@@ -107,6 +107,8 @@ config X86
config RISCV
bool
select ARCH_IS_SET
select ATOMIC_OPERATIONS_C if !RISCV_ISA_EXT_A
select ATOMIC_OPERATIONS_BUILTIN if RISCV_ISA_EXT_A
select ARCH_SUPPORTS_COREDUMP
select ARCH_SUPPORTS_COREDUMP_PRIV_STACKS
select ARCH_SUPPORTS_ROM_START if !SOC_FAMILY_ESPRESSIF_ESP32

View File

@@ -258,10 +258,10 @@ config ARC_CURRENT_THREAD_USE_NO_TLS
select CURRENT_THREAD_USE_NO_TLS
default y if (RGF_NUM_BANKS > 1) || ("$(ZEPHYR_TOOLCHAIN_VARIANT)" = "arcmwdt")
help
Disable current Thread Local Storage for ARC. For cores with more then one
RGF_NUM_BANKS the parameter is disabled by-default because banks syncronization
Disable current Thread Local Storage for ARC. For cores with more than one
RGF_NUM_BANKS the parameter is disabled by-default because banks synchronization
requires significant time, and it slows down performance.
ARCMWDT works with tls pointer in different way then GCC. Optimized access to
ARCMWDT works with TLS pointer in different way then GCC. Optimized access to
TLS pointer via the _current symbol does not provide significant advantages
in case of MetaWare.
@@ -274,7 +274,7 @@ config GEN_IRQ_START_VECTOR
config HARVARD
bool "Harvard Architecture"
help
The ARC CPU can be configured to have two busses;
The ARC CPU can be configured to have two buses;
one for instruction fetching and another that serves as a data bus.
config CODE_DENSITY

View File

@@ -39,7 +39,7 @@ config ARC_XY_ENABLE
bool "ARC address generation unit registers"
help
Processors with XY memory and AGU registers can configure this
option to accelerate DSP instrctions.
option to accelerate DSP instructions.
config ARC_AGU_SHARING
bool "ARC address generation unit register sharing"

View File

@@ -49,7 +49,7 @@ config ROMSTART_RELOCATION_ROM
Most SOCs include an alias for the boot-vector at address 0x00000000
so a default which might be supported by the corresponding Linux rproc driver.
If it is not, additionnal options allows to specify the addresses.
If it is not, additional options allow to specify the addresses.
In general this option should be chosen if the zephyr,flash chosen node
is not placed into the boot-vector memory area.

View File

@@ -203,11 +203,16 @@ int arch_icache_flush_and_invd_all(void)
int arch_icache_flush_range(void *start_addr, size_t size)
{
ARG_UNUSED(start_addr);
ARG_UNUSED(size);
return -ENOTSUP;
}
int arch_icache_invd_range(void *start_addr, size_t size)
{
ARG_UNUSED(start_addr);
ARG_UNUSED(size);
/* Cortex A/R do have the ICIMVAU operation to selectively invalidate
* the instruction cache, but not currently supported by CMSIS.
* For now, invalidate the entire cache.
@@ -219,6 +224,9 @@ int arch_icache_invd_range(void *start_addr, size_t size)
int arch_icache_flush_and_invd_range(void *start_addr, size_t size)
{
ARG_UNUSED(start_addr);
ARG_UNUSED(size);
return -ENOTSUP;
}

View File

@@ -409,6 +409,8 @@ int arch_float_disable(struct k_thread *thread)
int arch_float_enable(struct k_thread *thread, unsigned int options)
{
ARG_UNUSED(thread);
ARG_UNUSED(options);
/* This is not supported in Cortex-A and Cortex-R */
return -ENOTSUP;
}

View File

@@ -96,6 +96,9 @@ int arch_icache_flush_and_invd_all(void)
int arch_icache_flush_range(void *start_addr, size_t size)
{
ARG_UNUSED(start_addr);
ARG_UNUSED(size);
return -ENOTSUP;
}
@@ -108,6 +111,9 @@ int arch_icache_invd_range(void *start_addr, size_t size)
int arch_icache_flush_and_invd_range(void *start_addr, size_t size)
{
ARG_UNUSED(start_addr);
ARG_UNUSED(size);
return -ENOTSUP;
}

View File

@@ -489,20 +489,219 @@ SECTION_FUNC(TEXT, z_arm_svc)
* r8 - saved link register
*/
.L_do_syscall:
/*
* Build a privilege stack frame from the user stack frame, then switch PSP
* to it. This ensures return from SVC does not rely on the user stack.
*
* Layout of privilege stack created from user stack:
*
* +------+-------------------------+------+-------------------------+--------------------------+
* | User stack | Privilege stack | Notes |
* +------+-------------------------+------+-------------------------+--------------------------+
* |Offset| contents |Offset| contents | |
* +------+-------------------------+------+-------------------------+--------------------------+
* | 0 | R0 -> | 0 | R0 | PSP switches from 0th |
* | | | | | offset of user stack to |
* | | | | | 0th offset of priv stack |
* | 4 | R1 -> | 4 | R1 | |
* | 8 | R2 -> | 8 | R2 | |
* | 12 | R3 -> |12 | R3 | |
* | 16 | R12 -> |16 | R12 | |
* | 20 | LR -> |20 | LR | |
* | 24 | Return Address -x> |24 | z_arm_do_syscall |return address from user |
* | | | | |sf is not copied. Instead,|
* | | | | |it is replaced so that |
* | | | | |z_arm_svc returns to |
* | | | | |z_arm_do_syscall. |
* | | | | | |
* | 28 | xPSR (w/ or w/o pad) -> |28 | xPSR (pad bit cleared) |This completes the basic |
* | | | | |exception sf w/ or w/o pad|
* | | | | | |
* | -- | FP regs + FPSCR -> |-- | FP regs + FPSCR |For arch supporting fp |
* | | (w/ or w/o pad) | | |context an additional |
* | | | | |extended sf is copied. |
* |________________________________|______|_________________________|__________________________|
* | | | | |On returning to |
* | | | | |z_arm_do_syscall, the |
* | | | | |above sf has already been |
* | | | | |unstacked and 8B from the |
* | | | | |then sf are used to pass |
* | | | | |original pre-svc sp & the |
* | | | | |return address. |
* | | | | |Note: at the moment |
* | | | | |z_arm_do_syscall also |
* | | | | |expects the return address|
* | | | | |to be set in r8. |
* | | | | | |
* | | | 0 | address that |z_arm_do_syscall expects |
* | | | | z_arm_do_syscall should |the original pre-svc sp at|
* | | | | set as PSP before |0th offset i.e. new sp[0] |
* | | | | returning from svc. |and, |
* | | | | | |
* | | | 4 | Address that |the return address at |
* | | | | z_arm_do_syscall should |sp[4]. Note that this is |
* | | | | return to after handling|the return address copied |
* | | | | svc |from user exception sf[24]|
* | | | | |which was not copied in |
* | | | | |the previous sf. |
* +------+-------------------------+------+-------------------------+--------------------------+
* "sf" in this function is used as abbreviation for "stack frame".
* Note that the "FP regs + FPSCR" are only present if CONFIG_FPU_SHARING=y, and the optional pad
* is only present if PSP was not 8-byte aligned when SVC was executed.
* Also note that FPU cannot be present in ARMv6-M or ARMv8-M Baseline implementations
* (i.e., it may only be present when CONFIG_ARMV7_M_ARMV8_M_MAINLINE is enabled).
*/
/* Start by fetching the top of privileged stack */
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
movs r3, #24
ldr r1, [r0, r3] /* grab address of PC from stack frame */
mov r8, r1
ldr r1, =_kernel
ldr r1, [r1, #_kernel_offset_to_current]
adds r1, r1, #_thread_offset_to_priv_stack_start
ldr r1, [r1] /* bottom of priv stack */
ldr r3, =CONFIG_PRIVILEGED_STACK_SIZE
subs r3, #(_EXC_HW_SAVED_BASIC_SF_SIZE+8) /* 8 for original sp and pc */
add r1, r3
mov ip, r1
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
ldr r8, [r0, #24] /* grab address of PC from stack frame */
ldr ip, =_kernel
ldr ip, [ip, #_kernel_offset_to_current]
ldr ip, [ip, #_thread_offset_to_priv_stack_start] /* bottom of priv stack */
add ip, #CONFIG_PRIVILEGED_STACK_SIZE
#ifdef CONFIG_FPU_SHARING
/* Assess whether svc calling thread had been using the FP registers. */
tst lr, #_EXC_RETURN_FTYPE_Msk
ite eq
moveq r8, #_EXC_HW_SAVED_EXTENDED_SF_SIZE
movne r8, #_EXC_HW_SAVED_BASIC_SF_SIZE
#else
mov r8, #_EXC_HW_SAVED_BASIC_SF_SIZE
#endif
sub ip, #8 /* z_arm_do_syscall will use this to get original sp and pc */
sub ip, r8 /* 32 for basic sf + 72 for the optional esf */
#endif
/*
* At this point:
* r0 has PSP i.e. top of user stack
* ip has top of privilege stack
* r8 has hardware-saved stack frame size (only in case of mainline)
*/
push {r4-r7}
push {r2}
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
mov r2, r0 /* safe to use r2 since it is saved on MSP */
/* Check for padding in the sf */
ldr r1, [r0, #_EXC_HW_SAVED_BASIC_SF_XPSR_OFFSET] /* grab xPSR from sf which has the pad bit */
movs r3, #1
/* Check if pad bit 9 is set */
lsls r3, r3, #9
tst r1, r3
beq .L_no_padding
/* special handling for padded sf */
bics r1, r3 /* clear the pad bit (priv stack is aligned and doesn't need it) */
adds r2, #4
.L_no_padding:
/* Calculate original pre-svc user sp which is psp + sf size (+4B if pad bit was set) */
adds r2, #_EXC_HW_SAVED_BASIC_SF_SIZE
mov r3, ip
str r2,[r3, #0]
/* Store the pre-SVC user SP at the offset expected by z_arm_do_syscall,
* as detailed in the table above.
*/
str r2,[r3, #_EXC_HW_SAVED_BASIC_SF_SIZE]
/* sf of priv stack has the same xPSR as user stack but with 9th bit reset */
str r1,[r3, #_EXC_HW_SAVED_BASIC_SF_XPSR_OFFSET]
/* r0-r3, r12, LR from user stack sf are copied to sf of priv stack */
mov r1, r0
mov r2, r3
ldmia r1!, {r4-r7}
stmia r2!, {r4-r7}
ldmia r1!, {r4-r5}
stmia r2!, {r4-r5}
/* Store the svc return address at the offset expected by z_arm_do_syscall,
* as detailed in the table above.
*/
str r5, [r3, #(_EXC_HW_SAVED_BASIC_SF_SIZE+4)]
ldr r1, =z_arm_do_syscall
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
str r1, [r0, r3] /* overwrite the PC to point to z_arm_do_syscall */
str r1, [r3, #_EXC_HW_SAVED_BASIC_SF_RETADDR_OFFSET] /* Execution return to z_arm_do_syscall */
ldr r1, [r0, #_EXC_HW_SAVED_BASIC_SF_RETADDR_OFFSET] /* grab address of PC from stack frame */
/* Store the svc return address (i.e. next instr to svc) in r8 as expected by z_arm_do_syscall.
*/
mov r8, r1
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
str r1, [r0, #24] /* overwrite the PC to point to z_arm_do_syscall */
mov r2, r0 /* safe to use r2 since it is saved on MSP */
/* Calculate original pre-svc user sp without pad which is psp + sf size */
add r2, r8
/* Also, check for padding in the sf */
ldr r1, [r0, #_EXC_HW_SAVED_BASIC_SF_XPSR_OFFSET] /* grab xPSR from sf which has the pad bit */
tst r1, #(1<<9) /* Check if pad bit 9 is set */
beq .L_no_padding
bics r1, #(1<<9) /* clear the pad bit (priv stack is aligned and doesn't need it) */
/* Calculate original pre-svc user sp with pad */
add r2, #4
.L_no_padding:
str r2,[ip, #0]
/* Store the pre-SVC user SP at the offset expected by z_arm_do_syscall,
* as detailed in the table above.
*/
str r2,[ip, r8]
str r1,[ip, #_EXC_HW_SAVED_BASIC_SF_XPSR_OFFSET] /* priv sf get user sf xPSR with bit9 reset */
/* r0-r3, r12, LR from user stack sf are copied to sf of priv stack */
mov r1, r0
mov r2, ip
ldmia r1!, {r4-r7}
stmia r2!, {r4-r7}
ldmia r1!, {r4-r5}
stmia r2!, {r4-r5}
/* Store the svc return address at the offset expected by z_arm_do_syscall,
* as detailed in the table above.
*/
add r8, #4
str r5, [ip, r8]
ldr r1, =z_arm_do_syscall
str r1, [ip, #_EXC_HW_SAVED_BASIC_SF_RETADDR_OFFSET] /* Execution return to z_arm_do_syscall */
ldr r1, [r0, #_EXC_HW_SAVED_BASIC_SF_RETADDR_OFFSET] /* grab address of PC from stack frame */
/* Store the svc return address (i.e. next instr to svc) in r8 as expected by z_arm_do_syscall.
*/
mov r8, r1
/* basic stack frame is copied at this point to privilege stack,
* now time to copy the fp context
*/
#ifdef CONFIG_FPU_SHARING
tst lr, #_EXC_RETURN_FTYPE_Msk
bne .L_skip_fp_copy
add r1, r0, #32
add r2, ip, #32
vldmia r1!, {s0-s15}
vstmia r2!, {s0-s15}
/* copy FPSCR + reserved (8 bytes) */
ldmia r1!, {r4, r5}
stmia r2!, {r4, r5}
.L_skip_fp_copy:
#endif
#endif
pop {r2} /* restore CONTROL value */
pop {r4-r7}
/* Point PSP to privilege stack,
* note that r0 still has the old PSP
*/
msr PSP, ip
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
ldr r3, =K_SYSCALL_LIMIT
cmp r6, r3
@@ -556,14 +755,12 @@ SECTION_FUNC(TEXT, z_arm_svc)
isb
#if defined(CONFIG_BUILTIN_STACK_GUARD)
/* Thread is now in privileged mode; after returning from SCVall it
* will use the default (user) stack before switching to the privileged
* stack to execute the system call. We need to protect the user stack
* against stack overflows until this stack transition.
*/
ldr r1, [r0, #_thread_offset_to_stack_info_start] /* stack_info.start */
msr PSPLIM, r1
#endif /* CONFIG_BUILTIN_STACK_GUARD */
/* Set stack pointer limit (needed in privileged mode) */
ldr ip, =_kernel
ldr ip, [ip, #_kernel_offset_to_current]
ldr ip, [ip, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
msr PSPLIM, ip
#endif
/* return from SVC to the modified LR - z_arm_do_syscall */
bx lr

View File

@@ -455,6 +455,8 @@ int arch_float_disable(struct k_thread *thread)
int arch_float_enable(struct k_thread *thread, unsigned int options)
{
ARG_UNUSED(thread);
ARG_UNUSED(options);
/* This is not supported in Cortex-M */
return -ENOTSUP;
}
@@ -557,6 +559,10 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
"ldr r4, =z_thread_entry\n"
/* We dont intend to return, so there is no need to link. */
"bx r4\n"
/* Force a literal pool placement for the addresses referenced above */
#ifndef __IAR_SYSTEMS_ICC__
".ltorg\n"
#endif
:
: "r"(_main), "r"(stack_ptr)
: "r0", "r1", "r2", "r3", "r4", "ip", "lr", "memory");
@@ -623,6 +629,10 @@ FUNC_NORETURN void z_arm_switch_to_main_no_multithreading(k_thread_entry_t main_
"ldr r0, =arch_irq_lock_outlined\n"
"blx r0\n"
"loop: b loop\n\t" /* while (true); */
/* Force a literal pool placement for the addresses referenced above */
#ifndef __IAR_SYSTEMS_ICC__
".ltorg\n"
#endif
:
: [_p1] "r"(p1), [_p2] "r"(p2), [_p3] "r"(p3), [_psp] "r"(psp),
[_main_entry] "r"(main_entry)

View File

@@ -104,6 +104,8 @@ static inline int prel31_decode(elf_word reloc_type, uint32_t loc,
{
int ret;
ARG_UNUSED(reloc_type);
*offset = sign_extend(*(int32_t *)loc, SHIFT_PREL31_SIGN);
*offset += sym_base_addr - loc;
if (*offset >= PREL31_UPPER_BOUNDARY || *offset < PREL31_LOWER_BOUNDARY) {
@@ -142,6 +144,8 @@ static inline int jumps_decode(elf_word reloc_type, uint32_t loc,
{
int ret;
ARG_UNUSED(reloc_type);
*offset = MEM2ARMOPCODE(*(uint32_t *)loc);
*offset = (*offset & MASK_BRANCH_OFFSET) << SHIFT_BRANCH_OFFSET;
*offset = sign_extend(*offset, SHIFT_JUMPS_SIGN);
@@ -211,6 +215,8 @@ static inline int thm_jumps_decode(elf_word reloc_type, uint32_t loc,
int ret;
uint32_t j_one, j_two, sign;
ARG_UNUSED(reloc_type);
*upper = MEM2THM16OPCODE(*(uint16_t *)loc);
*lower = MEM2THM16OPCODE(*(uint16_t *)(loc + 2));

View File

@@ -2,6 +2,7 @@
* Userspace and service handler hooks
*
* Copyright (c) 2017 Linaro Limited
* Copyright 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -308,9 +309,8 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
* This function is used to do system calls from unprivileged code. This
* function is responsible for the following:
* 1) Fixing up bad syscalls
* 2) Configuring privileged stack and loading up stack arguments
* 3) Dispatching the system call
* 4) Restoring stack and calling back to the caller of the SVC
* 2) Dispatching the system call
* 3) Restoring stack and calling back to the caller of the SVC
*
*/
SECTION_FUNC(TEXT, z_arm_do_syscall)
@@ -328,41 +328,7 @@ SECTION_FUNC(TEXT, z_arm_do_syscall)
* At this point PSPLIM is already configured to guard the default (user)
* stack, so pushing to the default thread's stack is safe.
*/
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
/* save current stack pointer (user stack) */
mov ip, sp
/* temporarily push to user stack */
push {r0,r1}
/* setup privileged stack */
ldr r0, =_kernel
ldr r0, [r0, #_kernel_offset_to_current]
adds r0, r0, #_thread_offset_to_priv_stack_start
ldr r0, [r0] /* priv stack ptr */
ldr r1, =CONFIG_PRIVILEGED_STACK_SIZE
add r0, r1
/* Store current SP and LR at the beginning of the priv stack */
subs r0, #8
mov r1, ip
str r1, [r0, #0]
mov r1, lr
str r1, [r0, #4]
mov ip, r0
/* Restore user stack and original r0, r1 */
pop {r0, r1}
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
/* setup privileged stack */
ldr ip, =_kernel
ldr ip, [ip, #_kernel_offset_to_current]
ldr ip, [ip, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
add ip, #CONFIG_PRIVILEGED_STACK_SIZE
/* Store current SP and LR at the beginning of the priv stack */
subs ip, #8
str sp, [ip, #0]
str lr, [ip, #4]
#elif defined(CONFIG_CPU_AARCH32_CORTEX_R)
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
/*
* The SVC handler has already switched to the privileged stack.
* Store the user SP and LR at the beginning of the priv stack.
@@ -373,11 +339,6 @@ SECTION_FUNC(TEXT, z_arm_do_syscall)
push {ip, lr}
#endif
#if !defined(CONFIG_CPU_AARCH32_CORTEX_R)
/* switch to privileged stack */
msr PSP, ip
#endif
/* Note (applies when using stack limit checking):
* We do not need to lock IRQs after switching PSP to the privileged stack;
* PSPLIM is guarding the default (user) stack, which, by design, is
@@ -386,14 +347,6 @@ SECTION_FUNC(TEXT, z_arm_do_syscall)
* the maximum exception stack frame.
*/
#if defined(CONFIG_BUILTIN_STACK_GUARD)
/* Set stack pointer limit (needed in privileged mode) */
ldr ip, =_kernel
ldr ip, [ip, #_kernel_offset_to_current]
ldr ip, [ip, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
msr PSPLIM, ip
#endif
/*
* r0-r5 contain arguments
* r6 contains call_id

View File

@@ -362,6 +362,10 @@ static bool z_arm64_stack_corruption_check(struct arch_esf *esf, uint64_t esr, u
static bool is_recoverable(struct arch_esf *esf, uint64_t esr, uint64_t far,
uint64_t elr)
{
ARG_UNUSED(esr);
ARG_UNUSED(far);
ARG_UNUSED(elr);
if (!esf) {
return false;
}

View File

@@ -346,6 +346,8 @@ int arch_float_disable(struct k_thread *thread)
int arch_float_enable(struct k_thread *thread, unsigned int options)
{
ARG_UNUSED(thread);
ARG_UNUSED(options);
/* floats always gets enabled automatically at the moment */
return 0;
}

View File

@@ -12,7 +12,7 @@ config SEMIHOST
a host computer that is running a debugger.
Additional information can be found in:
https://developer.arm.com/documentation/dui0471/m/what-is-semihosting-
https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc
https://github.com/riscv-non-isa/riscv-semihosting/blob/main/riscv-semihosting.adoc
This option is compatible with hardware and with QEMU, through the
(automatic) use of the -semihosting-config switch when invoking it.

View File

@@ -1,6 +1,7 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
* Copyright (c) 2019 Intel Corporation
* Copyright (c) 2025 Basalte bv
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -8,7 +9,7 @@
/* Copied from linker.ld */
/* Non-cached region of RAM */
SECTION_DATA_PROLOGUE(_NOCACHE_SECTION_NAME,,)
SECTION_DATA_PROLOGUE(_NOCACHE_SECTION_NAME,(NOLOAD),)
{
#if defined(CONFIG_MMU)
MMU_ALIGN;
@@ -16,17 +17,31 @@ SECTION_DATA_PROLOGUE(_NOCACHE_SECTION_NAME,,)
MPU_ALIGN(_nocache_ram_size);
#endif
_nocache_ram_start = .;
_nocache_noload_ram_start = .;
*(.nocache)
*(".nocache.*")
#include <snippets-nocache-section.ld>
_nocache_noload_ram_end = .;
} GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
_nocache_noload_ram_size = _nocache_noload_ram_end - _nocache_noload_ram_start;
/* Non-cached loadable region of RAM and ROM */
SECTION_DATA_PROLOGUE(_NOCACHE_LOAD_SECTION_NAME,,)
{
_nocache_load_ram_start = .;
*(.nocache_load)
*(".nocache_load.*")
#if defined(CONFIG_MMU)
MMU_ALIGN;
#else
MPU_ALIGN(_nocache_ram_size);
#endif
_nocache_load_ram_end = .;
_nocache_ram_end = .;
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
_nocache_load_ram_size = _nocache_load_ram_end - _nocache_load_ram_start;
_nocache_load_rom_start = LOADADDR(_NOCACHE_LOAD_SECTION_NAME);
_nocache_ram_size = _nocache_ram_end - _nocache_ram_start;
_nocache_load_start = LOADADDR(_NOCACHE_SECTION_NAME);

View File

@@ -273,7 +273,7 @@ config RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET
default 0
depends on GEN_ISR_TABLES
help
On some RISCV platform the first interrupt vectors are primarly
On some RISCV platform the first interrupt vectors are primarily
intended for inter-hart interrupt signaling and so retained for that
purpose and not available. When this option is set, all the IRQ
vectors are shifted by this offset value when installed into the

View File

@@ -34,7 +34,7 @@ config RISCV_ISA_EXT_M
config RISCV_ISA_EXT_A
bool
imply RISCV_ISA_EXT_ZAAMO
imply RISCV_ISA_EXT_ZLRSC
imply RISCV_ISA_EXT_ZALRSC
help
(A) - Standard Extension for Atomic Instructions
@@ -120,12 +120,12 @@ config RISCV_ISA_EXT_ZAAMO
The Zaamo extension enables support for AMO*.W/D-style instructions.
config RISCV_ISA_EXT_ZLRSC
config RISCV_ISA_EXT_ZALRSC
bool
help
(Zlrsc) - Load-Reserved/Store-Conditional subset of the A extension
(Zalrsc) - Load-Reserved/Store-Conditional subset of the A extension
The Zlrsc extension enables support for LR.W/D and SC.W/D-style instructions.
The Zalrsc extension enables support for LR.W/D and SC.W/D-style instructions.
config RISCV_ISA_EXT_ZBA
bool

View File

@@ -205,7 +205,7 @@ config XTENSA_MMU_NUM_L1_TABLES
default 1 if !USERSPACE
default 4
help
This option specifies the maximum number of traslation tables.
This option specifies the maximum number of translation tables.
Translation tables are directly related to the number of
memory domains in the target, considering the kernel itself requires one.

View File

@@ -598,8 +598,52 @@ void arch_gdb_continue(void)
void arch_gdb_step(void)
{
uint32_t ps = xtensa_gdb_ctx.regs[xtensa_gdb_ctx.ps_idx].val;
uint32_t intlevel = ps & PS_INTLEVEL_MASK;
bool excm = (ps & PS_EXCM_MASK) != 0;
uint32_t icountlevel;
/* Avoid counting while in this function. */
set_one_sreg(ICOUNT, 0);
set_one_sreg(ICOUNTLEVEL, 0);
/*
* Note that ICOUNT only increments when current interrupt level
* is less then ICOUNTLEVEL, and that ICOUNT interrupt is triggered
* when it reaches zero.
*/
if (excm) {
icountlevel = XCHAL_EXCM_LEVEL + 1;
} else if (arch_curr_cpu()->nested > 1) {
/*
* ICOUNT, IBREAK and DBREAK all trigger interrupts.
* So we need to account for nested being 1 when we
* are running GDB stub. If nested is higher than one,
* this means we are debugging inside ISRs.
*/
icountlevel = intlevel + 1;
/*
* PS.INTLEVEL would be zero when it is level-1 interrupts.
* A simple +1 does not work as ICOUNT would not stop inside
* the ISR. So we need to up the ICOUNTLEVEL.
*/
icountlevel = MAX(icountlevel, 2);
/*
* Make sure instructions are only counted below debug
* interrupt level, or else ICOUNT would increment while
* we are working in this function.
*/
icountlevel = MIN(icountlevel, XCHAL_DEBUGLEVEL);
} else {
/* Will break in non-ISR, normal code execution. */
icountlevel = 1;
}
set_one_sreg(ICOUNT, 0xFFFFFFFEU);
set_one_sreg(ICOUNTLEVEL, XCHAL_DEBUGLEVEL);
set_one_sreg(ICOUNTLEVEL, icountlevel);
__asm__ volatile("isync");
}
@@ -965,6 +1009,9 @@ void arch_gdb_init(void)
/* AR0: 0x0100 */
xtensa_gdb_ctx.ar_idx = idx;
break;
case 0x02E6:
/* PS: 0x02E6 */
xtensa_gdb_ctx.ps_idx = idx;
default:
break;
};

View File

@@ -606,6 +606,10 @@ _excint_noflush_\@:
/* Restore A1 stack pointer from "next" handle. */
mov a1, a6
#ifdef CONFIG_INSTRUMENT_THREAD_SWITCHING
call4 z_thread_mark_switched_in
#endif
_restore_\@:
j _restore_context
.endm

View File

@@ -311,7 +311,7 @@ You can debug an application in the usual way. Here is an example for the
:goals: debug
.. _pyOCD:
https://github.com/mbedmicro/pyOCD
https://github.com/pyocd/pyOCD
.. _CMSIS DAP:
https://developer.mbed.org/handbook/CMSIS-DAP
@@ -323,7 +323,7 @@ You can debug an application in the usual way. Here is an example for the
http://wiki.seeed.cc/BLE_Nitrogen/
.. _pyOCD issue 259:
https://github.com/mbedmicro/pyOCD/issues/259
https://github.com/pyocd/pyOCD/issues/259
.. _96Boards IE Specification:
https://linaro.co/ie-specification

View File

@@ -71,7 +71,7 @@
pinctrl-names = "default";
};
&i2c1 {
zephyr_i2c: &i2c1 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c1_default>;

View File

@@ -88,16 +88,16 @@
};
&i2c0 {
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_FAST>;
};
&i2c1 {
zephyr_i2c: &i2c1 {
status = "okay";
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
};

View File

@@ -108,9 +108,9 @@ zephyr_i2c: &i2c1 {
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_FAST>;
vl53l1x: vl53l1x@52 {
vl53l1x: vl53l1x@29 {
compatible = "st,vl53l1x";
reg = <0x52>;
reg = <0x29>;
status = "okay";
xshut-gpios = <&gpiog 10 GPIO_ACTIVE_HIGH>;
int-gpios = <&gpiod 8 GPIO_ACTIVE_HIGH>;

View File

@@ -17,4 +17,5 @@ if(CONFIG_BOARD_MPS2_AN521_CPU1 AND NOT CONFIG_OPENAMP)
BUILD_BYPRODUCTS "${CPU0_BINARY_DIR}/${KERNEL_BIN_NAME}"
BUILD_ALWAYS True
)
add_dependencies(app empty_cpu0)
endif()

View File

@@ -41,18 +41,7 @@ Supported Features
The board configuration supports a console UART via the HAT header pins. Future
versions will also support a console over RPmsg.
+-----------+------------+-----------------------+
| Interface | Controller | Driver/Component |
+===========+============+=======================+
| UART | on-chip | serial port-polling |
| | | serial port-interrupt |
+-----------+------------+-----------------------+
Other hardware features are currently not supported.
The default configuration can be found in the defconfig file.
Future configurations will add support for GPIO, I2C, SPI, etc.
.. zephyr:board-supported-hw::
Running Zephyr
**************

View File

@@ -5,4 +5,7 @@
if BOARD_NRF21540DK
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
endif # BOARD_NRF21540DK

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable GPIO
CONFIG_GPIO=y

View File

@@ -5,4 +5,7 @@
if BOARD_NRF52833DK
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
endif # BOARD_NRF52833DK

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable GPIO
CONFIG_GPIO=y

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable GPIO
CONFIG_GPIO=y

View File

@@ -5,4 +5,7 @@
if BOARD_NRF52840DK
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
endif # BOARD_NRF52840DK

View File

@@ -5,9 +5,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable UART
CONFIG_SERIAL=y

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable GPIO
CONFIG_GPIO=y

View File

@@ -6,6 +6,9 @@
if BOARD_NRF52840DONGLE
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
# To let the nRF5 bootloader load an application, the application
# must be linked after Nordic MBR, that is factory-programmed on the board.

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable GPIO
CONFIG_GPIO=y

View File

@@ -0,0 +1,11 @@
# nRF52 DK board configuration
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
if BOARD_NRF52DK
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
endif # BOARD_NRF52DK

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable GPIO
CONFIG_GPIO=y

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable GPIO
CONFIG_GPIO=y

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable GPIO
CONFIG_GPIO=y

View File

@@ -3,6 +3,9 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS
# Code Partition:

View File

@@ -3,8 +3,6 @@
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_ARM_TRUSTZONE_M=y
CONFIG_GPIO=y

View File

@@ -3,8 +3,6 @@
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_ARM_TRUSTZONE_M=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable GPIO
CONFIG_GPIO=y

View File

@@ -3,6 +3,9 @@
# Copyright (c) 2019-2020 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPP_NS
# Code Partition:

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# enable GPIO
CONFIG_GPIO=y

View File

@@ -1,6 +1,9 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
if BOARD_NRF54H20DK_NRF54H20_CPUAPP
config BT_HCI_IPC

View File

@@ -13,9 +13,6 @@ CONFIG_USE_DT_CODE_PARTITION=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# MPU-based null-pointer dereferencing detection cannot be applied
# as the (0x0 - 0x400) region is unmapped for this target.
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y

View File

@@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
identifier: nrf54h20dk/nrf54h20/cpuapp/iron
name: nRF54H20-DK-nRF54H20-Application (IRONside compatible) (revision 0.9.0)
name: nRF54H20-DK-nRF54H20-Application (IronSide compatible) (revision 0.9.0)
type: mcu
arch: arm
toolchain:

View File

@@ -11,9 +11,6 @@ CONFIG_UART_CONSOLE=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# MPU-based null-pointer dereferencing detection cannot be applied
# as the (0x0 - 0x400) region is unmapped for this target.
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y

View File

@@ -13,9 +13,6 @@ CONFIG_USE_DT_CODE_PARTITION=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# MPU-based null-pointer dereferencing detection cannot be applied
# as the (0x0 - 0x400) region is unmapped for this target.
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y

View File

@@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
identifier: nrf54h20dk/nrf54h20/cpurad/iron
name: nRF54H20-DK-nRF54H20-Radio (IRONside SE compatible) (revision 0.9.0)
name: nRF54H20-DK-nRF54H20-Radio (IronSide SE compatible) (revision 0.9.0)
type: mcu
arch: arm
toolchain:

View File

@@ -13,9 +13,6 @@ CONFIG_USE_DT_CODE_PARTITION=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# MPU-based null-pointer dereferencing detection cannot be applied
# as the (0x0 - 0x400) region is unmapped for this target.
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y

View File

@@ -3,6 +3,9 @@
if BOARD_NRF54L09PDK_NRF54L09_CPUAPP
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
config ROM_START_OFFSET
default 0x800 if BOOTLOADER_MCUBOOT

View File

@@ -13,6 +13,3 @@ CONFIG_GPIO=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

View File

@@ -1,6 +1,9 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
if BOARD_NRF54L15DK_NRF54L05_CPUAPP || BOARD_NRF54L15DK_NRF54L10_CPUAPP || \
BOARD_NRF54L15DK_NRF54L15_CPUAPP

View File

@@ -13,6 +13,3 @@ CONFIG_GPIO=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

View File

@@ -13,6 +13,3 @@ CONFIG_GPIO=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

View File

@@ -2,7 +2,6 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y
CONFIG_ARM_TRUSTZONE_M=y

View File

@@ -13,6 +13,3 @@ CONFIG_GPIO=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

View File

@@ -2,7 +2,6 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y
CONFIG_ARM_TRUSTZONE_M=y

View File

@@ -3,6 +3,9 @@
if BOARD_NRF54L20PDK_NRF54L20_CPUAPP
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
config ROM_START_OFFSET
default 0x800 if BOOTLOADER_MCUBOOT

View File

@@ -13,6 +13,3 @@ CONFIG_GPIO=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

View File

@@ -0,0 +1,11 @@
# nRF7002 DK board configuration
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
if BOARD_NRF7002DK
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
endif # BOARD_NRF7002DK

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

View File

@@ -4,9 +4,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable GPIO
CONFIG_GPIO=y

View File

@@ -3,5 +3,8 @@
# Copyright (c) 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
config BOARD_NRF9131EK
select USE_DT_CODE_PARTITION if BOARD_NRF9131EK_NRF9131_NS

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

View File

@@ -2,6 +2,9 @@
# Copyright (c) 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
#
config HW_STACK_PROTECTION
default ARCH_HAS_STACK_PROTECTION
if BOARD_NRF9151DK_NRF9151 || BOARD_NRF9151DK_NRF9151_NS

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

View File

@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

Some files were not shown because too many files have changed in this diff Show More