Commit graph

112257 commits

Author SHA1 Message Date
Nikodem Kastelik
d8506af12a soc: nordic: add support for SPIS120 instance
It is defined as spis120 rather than spi120,
because spi120 is already used for SPIM120 hardware instance,
but their base address is different.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-03-22 13:38:34 +01:00
Mathieu Choplain
c0362a98ae boards: st: nucleo_wb09ke: add and enable IWDG
Enable IWDG in board DTS and document as available.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-22 13:38:22 +01:00
Mathieu Choplain
4266136e3c boards: st: nucleo_wb07cc: add and enable IWDG
Enable IWDG in board DTS and document as available.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-22 13:38:22 +01:00
Mathieu Choplain
01f85d8ddd boards: st: nucleo_wb05kz: add and enable IWDG
Enable IWDG in board DTS and document as available.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-22 13:38:22 +01:00
Mathieu Choplain
d0639fedcf drivers: watchdog: iwdg_stm32: add support for STM32WB0
Add support for the STM32WB0 series to the existing STM32 driver for
Independent Watchdog peripheral.

NOTE: this commit only includes basic support for the watchdog.
STM32WB0 specificities such as the different possible clock sources, LSI
frequency measurement or window support are left for future implementation.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-22 13:38:22 +01:00
Mathieu Choplain
f4ee5fa48b dts: arm: st: wb0: add IWDG node to STM32WB0 series
Add a node for the Independent Watchdog to STM32WB0 series DTSI.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-22 13:38:22 +01:00
Jilay Pandya
b4b5d8b236 drivers: stepper: a4979: add stop function
add stop function to a4979 stepper controller

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-03-22 02:41:23 +01:00
Katarzyna Giądła
cefd85d16f samples: subsys: settings: Extend sample timeout
Defined timeout has not been enough for some platforms.
The change extendes timeout.

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
2025-03-22 02:41:15 +01:00
Alberto Escolar Piedras
72502938b3 samples/drivers/mbox: Fix test regex
In 9d7ee123a5
the regex used to verify the sample is doing what it should was changed
in a way in which it cannot possibly pass.
Let's fix it.

While at it, in the same commit, the simulator version of the test was
merged with the real_hw version, but the test name kept "real_hw" which
is now missleading => let's fix it.

And let's set as integration platform the simulated target, so it
can actually be runtime tested in CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-22 02:41:05 +01:00
Damian Krolik
fa8eef0fbc settings: shell: improve reading and writing string values
Make reading and writing string values more flexible:
1. Eliminate the intermediate buffer when saving a string
   setting. This needlessly limited the maximum string
   length that could be saved using the shell command.
2. Do not add nor assume that a string saved in the settings
   includes the null-terminator. The settings subsystem uses
   metadata for encoding the value length, so there it is
   redundant to also store the null-terminator in flash.

By the way, also make sure the command handlers only return
-EINVAL and -ENOEXEC error codes as documented in the
handler type description.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2025-03-22 02:40:56 +01:00
Luca Burelli
766122f0cd doc: llext: add note on the loader types
Add a note on the new loader types available in LLEXT..

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>

Signed-off-by:
2025-03-21 14:41:30 -04:00
Luca Burelli
3fcd90339d llext: optimize allocations for read-only sections
When loading an extension, read-only sections that do not have
relocations and whose data is accessible from the ELF buffer can be
directly mapped as-is in the extension memory. This avoids the need to
allocate and copy unmodified data from the ELF buffer to the LLEXT heap.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-21 14:41:30 -04:00
Luca Burelli
e5594891ac llext: stricter alignment checks for MPU/MMU regions
This patch moves the alignment checks for MPU and MMU regions to the
beginning of the llext_copy_region() function. This is done to ensure
that the correct region alignment and size are used even in the case
where the region is reused from the ELF file buffer, avoiding MMU/MPU
configuration issues.

This also relaxes the same checks for regions that are accessed by the
kernel only (e.g. symbol and string tables), which do not need special
MMU/MPU treatment. This exposed an inconsistency in the MMU code, which
was setting the permission on the correct regions, but later restoring
the default permissions on every region, including the now-unaligned
ones.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-21 14:41:30 -04:00
Luca Burelli
9fa6a95e30 llext: add storage-specific buffer loaders
This patch adds three new macros to initialize an llext_buf_loader
structure with a specific storage type. The existing LLEXT_BUF_LOADER
macro is discouraged, since its storage type is not explicitly defined
in the code but relies on the CONFIG_LLEXT_STORAGE_WRITABLE option.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-21 14:41:30 -04:00
Luca Burelli
6c2b5f6c92 llext: introduce 'enum llext_storage_type'
This patch introduces an 'enum llext_storage_type' that defines the
storage type of the ELF data that will be loaded:

- LLEXT_STORAGE_TEMPORARY: ELF data is only available during
  llext_load(); even when the loader supports directly accessing the
  memory via llext_peek(), the buffer contents will be discarded
  afterwards.
  LLEXT will allocate copies of all required data into its heap.

- LLEXT_STORAGE_PERSISTENT: ELF data is stored in a *read-only* buffer
  that is guaranteed to be always accessible for as long as the
  extension is loaded.
  LLEXT may directly reuse constant data from the buffer, but may still
  allocate copies if relocations need to be applied.

- LLEXT_STORAGE_WRITABLE: ELF data is stored in a *writable* memory
  buffer that is guaranteed to be always accessible for as long as the
  extension is loaded.
  LLEXT may freely modify and reuse data in the buffer; so, after the
  extension is unloaded, the contents should be re-initialized before a
  subsequent llext_load() call.

To keep full compatibility with existing code, the storage type of
LLEXT_BUF_LOADER is determined by the CONFIG_LLEXT_STORAGE_WRITABLE Kconfig
option between LLEXT_STORAGE_PERSISTENT and LLEXT_STORAGE_WRITABLE.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-21 14:41:30 -04:00
Luca Burelli
63142a377a llext: (cosmetic) add allocated size to debug message
Adding this information allows easy cross-reference of the effects of
memory optimization changes between subsequent commits.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-21 14:41:30 -04:00
Declan Snyder
3a477c56dd tests: spi_loopback: Remove logging module
Since we are using ZTest, if we use the ZTest paradigm properly, we
don't need a logging module, since ZTest already logs what it does.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-21 14:41:02 -04:00
Declan Snyder
6bcee13d9b tests: spi_loopback: Use ZTest properly
Instead of having a bunch of giant if conditions and just running
all the test cases from one actual ZTest case, convert all the test
cases into proper ZTest test cases.

Removing the returns is now required because otherwise there will be
compiler warnings, and they were never doing anything anyways in the
event of zassert fail. ZTest cases are meant to report pass or fail with
ztest paradigm, not with return values and log messages.

Also move the test of the spi lock/release to a separate test suite
since it is not really testing an actual bus transfer, but rather a
that a feature in the SPI API is respected.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-21 14:41:02 -04:00
Declan Snyder
8b8765982a tests: spi_loopback: Standardize buffer defines
More boy scout rule, I noticed every single test case was using
different variations of C syntax to declare the buffers, this is
inconvenient to the reader, make a standard way to declare buffers used
for the test.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-21 14:41:02 -04:00
Declan Snyder
b0197282f9 tests: spi_loopback: Create transceive ztest wrapper
There was a lot of copy paste of this code:

int ret;
ret = spi_transceive_dt(spec, &tx, &rx);
if (ret) {
       LOG_ERR("Code %d", ret);
       zassert_false(ret, "SPI transceive failed");
       return ret;
}

This is quite redundant and can be simplified.
Also, return is not needed because a failed zassert
will not continue to return anyways.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-21 14:41:02 -04:00
Declan Snyder
362218c900 tests: spi_loopback: Clean up file defines
Following the boy scout rule, since I am using this test a lot lately
and going to improve it, the first step will be to clean up the
structure of the file. The following changes are made:

- Remove unused #includes
- Condense some #if #else macro defines or make into single line, to
  simplify the readability of the preprocessor code
- Move definitions around so that related things are all next to
  each other, instead of randomly scattered around the file
- Create section header comments for broadly related things in the file
  to improve developer navigation experience
- Introduce macro for copy pasted print buf size calculation
- A few minor comment edits

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-21 14:41:02 -04:00
Etienne Carriere
04ffa4edd1 drivers: clock_control: remove inline attributes in stm32 clock drivers
Remove the inline attribute from stm32 clock drivers functions
especially for functions that are only referenced in the clock API
operation structure and therefore cannot be inline. As a generic
comment, today compiler are smart enough to optimize embedded software
without needing inline function attributes in the source files.

This change hopes that next stm32 clock driver will no more replicate
this bad habit when using existing source files as implementation
examples.

No functional change.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-21 14:40:36 -04:00
Etienne Carriere
dcf4855fa4 drivers: clock_control: fix IN_RANGE() use in stm32 clock drivers
IN_RANGE() macro from zephyr/sys/util.h returns a boolean value
so it should be treated as such and not compared to a decimal value.
Fix stm32 clock drivers accordingly and simplify places where the
value is compared to true.

No functional change.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-21 14:40:36 -04:00
Etienne Carriere
6c2d354d9c drivers: clock_control: fix typo in STM32H7* clock init
Correct typo in STM32H7 HSI clock calibration directives introduced
in commit 6b167f2596 ("drivers: clock_control: add calibration for
h7 pllx_hsi") that currently has no functionnal impact but is worth
to be fixed for consistency.

No functional change,

Fixes: 6b167f2596
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-21 14:40:36 -04:00
Etienne Carriere
a6ae1d9268 drivers: clock_control: remove STM32H7RSX unused function
Remove function exported stm32_system_clock_update() defined in
STM32H7RS series clock driver but that is not used and not even declared.
There already exists a CMSIS SystemCoreClockUpdate() function in
STM32 HAL drivers for the exact same purpose one may use if needed.

No functional change.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-21 14:40:36 -04:00
Anas Nashif
3b6fe8677b ci: Add codeql workflow for python, actions, js
Integrate codeql code scanning from github to do basic static code
analysis on python, actions, js.

c/cpp to be added later.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-21 14:39:50 -04:00
Benjamin Cabé
911d803291 doc: ci: github: Require hashes during pip install
require hashes in doc ci workflow

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
d794fe42f9 ci: doc: github: drop unused env variable
We get West from the action-zephyr-setup action

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
df2bdb9a6f ci: doc: github: Build PDF from vanilla ubuntu
Moved away from a texlive docker container to a vanilla ubuntu runner
so that we can better track the actual dependencies a user needs to
build the PDF rather than relying on the gigabytes of random stuff
that the texlive docker container pulls in.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
0bc512fa84 ci: github: update dependabot.yml to manage documentation dependencies
Added a new configuration for pip dependencies in the doc/
Groups all updates into one PR.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
d161e29a12 ci: doc: update documentation dependencies to include coverxygen
Removed coverxygen installation from the CI workflow and added it to the
requirements.txt/.in files and make it easier for anyone to potentially
use it locally.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
d64ed911f3 ci: doc: pin Python dependencies to specific versions/hashes
Use secure install for ̦Python documentation dependencies.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Benjamin Cabé
1185942575 ci: doc: github: check Doxygen MD5 checksum
Add a check that we're installing a legit Doxygen binary

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 14:39:29 -04:00
Andrzej Głąbek
a117d12ba6 include: spi: Restore warning in spi_config structure documentation
It was added in commit 7a8a4c9b3e,
but then, presumably unintentionally, was removed in commit
4c4e2c5213.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-03-21 17:06:29 +01:00
Nazar Palamar
e2af9e38e3 soc: infineon: update default IDLE_STACK_SIZE for PM
Update default IDLE_STACK_SIZE to 1024 for PM

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2025-03-21 17:06:21 +01:00
Randy Scott
66e0bcc117 boards: ezurio: Fix FEM name for BL654PA DVK
For Kconfig auto-configuration of the FEM in the MPSL,
the node in the device tree MUST be named
"nrf_radio_fem".

Signed-off-by: Randy Scott <randy.scott@ezurio.com>
2025-03-21 17:06:10 +01:00
Aleksander Wasaznik
b2d21f9b87 Bluetooth: Host: Improve documentation of bt_le_ext_adv_start_param
This clarifies the documentation of `bt_le_ext_adv_start_param` and
`bt_le_ext_adv_cb.sent`, and links them by via references.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2025-03-21 17:05:50 +01:00
Niek Ilmer
1d65c4c5ed doc: Renesas: adopt board-supported-hw directive
Replace the old manual supported features block with
the awesome new directive.

Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
2025-03-21 17:05:32 +01:00
Lucas Tamborrino
054aced95c samples: boards: espressif: ulp
Add ULP directory for samples related to the
Ultra Low Power Coprocessor.
Add a sample to demonstrate the debug process of the LP Core

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2025-03-21 17:05:20 +01:00
Lucas Tamborrino
c6f84d0ba2 boards: espressif: esp32c6: Add LP Core board support
Add ULP Coprocessor board support for C6.
This requires a change in the board qualifier depending on the build
target.
Update esp32c6 overlay and configuration files to the proper name.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2025-03-21 17:05:20 +01:00
Lucas Tamborrino
0b9e4e013a soc: espressif: esp32c6: Add LP Core
Add ULP Coprocessor support for ESP32C6.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2025-03-21 17:05:20 +01:00
Jukka Rissanen
cc282e56e8 net: mdns_responder: Use memcpy instead of strncpy for iface name
Following warning is printed if using strncpy(), so use memcpy()
instead. Note that this is false positive as there is no error here but
in order to avoid the warning, change the copy function.

subsys/net/lib/dns/mdns_responder.c:1371:25: warning:
'strncpy' output may be truncated copying 7 bytes from a string
of length 8 [-Wstringop-truncation]
 1468 | strncpy(if_req.ifr_name, name, sizeof(if_req.ifr_name) - 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

subsys/net/lib/dns/mdns_responder.c:1468:25: warning:
'strncpy' output may be truncated copying 7 bytes from a string
of length 8 [-Wstringop-truncation]
 1468 | strncpy(if_req.ifr_name, name, sizeof(if_req.ifr_name) - 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-21 17:05:10 +01:00
Benjamin Cabé
1e75b82244 sensors: lsm6dsv16x: fix double-promotion warning
use roundf instead of round in Q31_SHIFT_VAL macro to avoid
double-promotion warning

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-21 17:03:53 +01:00
Sayooj K Karun
273d60164d net: sockets: IPv6_MULTICAST_LOOP Support
Add support for the IPV6_MULTICAST_LOOP socket option.
This option allows enabling or disabling the consumption of multicast
packets by the sender. By default, the socket option will be enabled.

Co-authored-by: Pieter De Gendt <pieter.degendt@gmail.com>

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2025-03-21 14:19:08 +01:00
Robert Lubos
a61287e876 net: lib: tls_credentials: Rename TLS_CREDENTIAL_SERVER_CERTIFICATE
TLS_CREDENTIAL_SERVER_CERTIFICATE credential type is misleading, as in
fact it just represents a public certificate, it does not matter if the
certificate belongs to a server or a client. And actually, it was
already used in-tree for clients as well, for example in LwM2M.

Therefore rename the credential type to a more generic
TLS_CREDENTIAL_PUBLIC_CERTIFICATE and deprecate the old one.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-21 14:18:52 +01:00
Jukka Rissanen
82b43d50ea net: l2: dummy: Update sent statistics
Update dummy interface sent statistics as that was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-21 14:18:25 +01:00
Jukka Rissanen
5076f5eee0 net: l2: virtual: Handle the packet if no attached interfaces
If there are no virtual interfaces attached to this virtual
interface, check if there is a RX handler for this virtual
interface and pass data to it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-21 14:18:25 +01:00
Cla Mattia Galliard
799742a77b net: sockets_service: Always clear old events when registering
Clear all previous events when register is called a second time. This is
the same behavior as before, if the call happens with `len` equal or
greater then the previous call but in the case if `len` is less then the
first call, now, all events are cleared. This is more predictable behavior.

Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
2025-03-21 14:18:08 +01:00
Valerio Setti
e2344739ac drivers: rtc: pcf8563: some fixes to the driver
- Define alarm_set_callback() only when CONFIG_RTC_ALARM is set otherwise
a warning will be generated at runtime for the function not being
used.

- add "static" keyword to all internal functions.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-03-21 14:17:45 +01:00
Abderrahmane JARMOUNI
4aaf463158 drivers: display: sdl: clear display only for supported pixel formats
Clear display only when display pixel format is actually supported
since buffer size depends on it.

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-03-21 14:17:36 +01:00