Commit Graph

118793 Commits

Author SHA1 Message Date
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