Commit graph

117313 commits

Author SHA1 Message Date
Keith Packard
87029f7422 drivers/flash: Fix #if condition for is_area_readable for mcux
is_area_readable is used for SOCS other than LPC55XXX chips, not just
chips other than LPC55S36. Change the condition which elides this code
to avoid a GCC 14.3 warning.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
fc24bd8449 tests/nrf: Use memcpy instead of strncpy to avoid gcc warnings
While strncpy will work here, this isn't testing strings, it's testing
byte arrays, so use memcpy

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
ec38e9ef64 wifi/esp32: Fix overflow in SSID copy
In the previous code, strnlen could have returned WIFI_SSID_MAX_LEN, and
the following statement ensuring NUL termination would have written one
past the end of the array.

Replace this with code that ensures a NUL termination within the bounds
of the array and then use strlen to compute the length.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
df1cd1b0b1 tests/stack_unwind: Avoid inlining and tail-calls
We want the stack trace to show the correct nesting of functions,
so we need to prevent the compiler from in-lining functions or
performing tail-call optimizations.

Add __noinline to prevent inlining. Add another printf in each
function to avoid tail calls.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
f50ee8c1d3 fs/ext2: Missing error check in ext2_inode_remove_blocks
Don't assume that get_level_offsets will succeed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
eb351f05fe test/kernel: Initialize stack_sem in obj_validation test
GCC 14.3 is not happy when this variable is left uninitialized, although
we don't actually care about the contents, just the address.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
d44f8065da soc/esp32c6: Discard .note.GNU-stack sections while linking
These sections are simple stack behavior annotations and are not
needed in the final executable.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
27318b2771 samples/zbus: Increase dyn_channel stack sizes
Sparc needs more than 1k for these stacks.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
97f96afbd7 linker_script: Remove all SUBALIGN usage for iterable sections
SUBALIGN forces alignment to the specified value, even if the object
requires stricter alignment. This causes mis-aligned access when accessing
the resulting value.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
ff8b24b6bd cmake/modules: Make SUBALIGN parameter to zephyr_iterable_sections optional
Most uses of this macro should *not* include SUBALIGN as that can reduce
the alignment requirement for data and cause unaligned access faults in
the processor. Leave support for this in place in case there are
still uses for it.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
08bd120063 linker: Do not emit SUBALIGN for iterable sections
SUBALIGN forces alignment of input sections to the specified value, even
if they require stricter alignment.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
ce7bd57618 soc/sensry: Discard .note.GNU-stack sections while linking
These sections are simple stack behavior annotations and are not
needed in the final executable.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
246c8272cc soc/openisa: Discard .note.GNU-stack sections while linking
These sections are simple stack behavior annotations and are not
needed in the final executable.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
34a03fb436 posix: Use 'char' for posix_condattr bitfields
Ensure that posix_condattr is smaller than pthread_condattr by keeping it
under one byte.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
32452dfb05 samples/tflite-micro: Include <cstdint> before using uint8_t
inference_process.hpp depended on the C library implicitly including
stdint.h through some path, which is not defined behavior. Explicitly
include <cstdint> to ensure that uint8_t is defined.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Filip Kokosinski
15b73eda7d subsys/tracing: select backend name in Kconfig
This commit allows tracing backend name selection through Kconfig.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-06-17 16:05:59 +02:00
Xinyu Hong
95d945504d drivers: wifi: nxp: add channel load support
Add WIFI_CHANNEL_LOAD macro to support wifi channel load feature

Signed-off-by: Xinyu Hong <xinyu.hong@nxp.com>
2025-06-17 16:05:45 +02:00
Filip Kokosinski
ef20311522 subsys/tracing: add names to Kconfig choice symbols
This commit adds names to Kconfig choice sysmbols. This allows for their
selection from Kconfig, e.g.:

    choice TRACING_FORMAT_CHOICE
    	default TRACING_TEST if CONFIG_FOO
	default TRACING_CTF if CONFIG_BAR
    endchoice

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-06-17 16:05:29 +02:00
Tommi Kangas
941dcd31e7 shell: Make TX mutex timeout configurable
The 50 ms TX mutex timeouts introduced in commit b0a0feb cause
dropped messages when used with the shell log backend. This
commit makes time timeout configurable using the
CONFIG_SHELL_TX_TIMEOUT_MS Kconfig option and makes the
default timeout longer when shell log backend is enabled.

Link: #90215

Signed-off-by: Tommi Kangas <tommi.kangas@nordicsemi.no>
2025-06-17 16:05:20 +02:00
Rex Chen
cc5b1477ff drivers: wifi: nxp: support monitor mode tx frame
Add WIFI_HOST_TXRX_MGMT_FRAME macro to support tx frame
in monitor mode.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-06-17 16:04:54 +02:00
Emil Gydesen
6885a368d4 Bluetooth: Host: Add advertising state to bt_le_ext_adv_info
The bt_le_ext_adv_info struct has been extended to also
contain the advertising and periodic advertising states.

Additionally, the function verifies the input to avoid
NULL pointer access, and the addr field is more
properly documented.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-17 16:04:42 +02:00
Glenn Andrews
94084e5aba Lib: SMF: Add return code to signal event propagation
See Discussion https://github.com/zephyrproject-rtos/zephyr/discussions/83659
for information about the purpose of this change.

Modifies run actions of hierarchical state machines
to return a value indicating if the event was handled
by the run action or should be propagated up to the
parent run action. Flat state machines are not affected,
and their run action returns void.

smf_set_handled() has been removed and replaced by
this return value. smf_set_state() will not propagate
events regardless of the return value as the transition
is considered to have occurred.

Documentation, tests, samples, has been updated.
USB-C and hawkBit use SMF and have been updated to use
the new return codes.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2025-06-17 16:04:04 +02:00
Glenn Andrews
1bee2920f9 Lib: hawkBit: apply clang-format
Apply clang-format in preparation for code changes.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2025-06-17 16:04:04 +02:00
Glenn Andrews
d4a9cc12b9 Lib: USB-C: Apply clang-format
Apply clang-format to USB-C in preparation for code changes

No code is changed, only formatting.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2025-06-17 16:04:04 +02:00
James Roy
92b22be24c doc: Add a new migration guide entry
Bindings now use hyphens(-) instead of
underscores(_) as property separators.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-06-17 16:03:54 +02:00
James Roy
4240853a06 scripts: ci: Add CI bindings style checker
Implement a check in the CI pipeline to enforce
that property names in device tree bindings do
not contain underscores.

Signed-off-by: James Roy <rruuaanng@outlook.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2025-06-17 16:03:54 +02:00
James Roy
9cf9416dec scripts: Add bindings style migration script
This script replaces all underscore(_)
separation in a binding with hyphens(-).

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-06-17 16:03:54 +02:00
Johann Fischer
3c2dffa601 scripts: trace_capture_usb: disable tracing on exit
Disable tracing on exit and do not discard data immediately after
enabling tracing. The length of the data depends on the timings of the
host and targets and may simply be an arbitrary length that does not fit
any trace format or frame.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Johann Fischer
1174308df8 tracing: port USB backend to the new USB device stack
Port USB backend to the new USB device stack.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Johann Fischer
d52f76f9e1 samples: tracing: remove USB backend configuration for testing format
Not all the hooks for k_events, k_lifo, k_fifo, k_msgq, and k_queue are
implemented in tracing_test.h and tracing_test.c and therefore the
testing format cannot be used with the new USB device stack.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Carles Cufi
5a13cdcf52 scripts: trace_usb_capture: Clean up on exit
When the user presses Ctrl+c to exit the infinite capturing loop, ensure
that the cleanup funciton is always executed.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Jun Lin
8ab712a235 drivers: i2c: npcx: prevent unexpected target address match ISR
This commit prevents the hardware from generating an unexpected
target slave address match ISR by the following change:
1. Enable the New Match Interrupt Enable bit (NMINTEN) only when
   necessary.
2. Explicitly clear all SMBnADDRx registers because they are not
   cleared when the I2C hardware is disabled. It will cause the
   asynchrinization between SMBnADDRx and registered_target_mask if the
   system jumps from the RO image to the RW image.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2025-06-17 08:20:39 +02:00
Youssef Zini
8bfb08fbda boards: add gpio, button and led support
Add gpio support for STM32MP257F-EV1 board.
Add the orange (&led0) LED to the device tree and enable GPIOJ.
Add the user button USER2 to the device tree and enable GPIOG.
This step allows building and debugging the blinky and button sample
applications.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
1a7bac5b19 dts: arm: st: stm32mp2_m33.dtsi: add GPIO nodes
Add GPIO A-K nodes to the device tree for STM32MP2 SoC.
Note that GPIOs are disabled by default in the STM32MP2 SoC.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
0972b23171 drivers: gpio: add mp2 gpio clock handling
Remove gpio clock management from the GPIO driver when running on the
cortex-m33 on the mp2 and gpio clocks are managed by the cortex-A, being
the resource manager, allowed by the Resource Isolation Framework (RIF).
Also add a specific binding for the mp2 gpio to make clock property
optional.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
9bc78cfee4 drivers: clock_control: add mp2 clock driver
Add the stm32mp2 clock driver to the clock_control subsystem. The driver
is a reduced version of the generic stm32 clock driver.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
7f23ce2967 dts: clock_control: add mp2 rcc binding
Introduce DeviceTree binding for the STM32MP2 RCC clock controller,
enabling support for STM32MP2-specific clock configuration in Zephyr.
Update Kconfig.stm32 to add a dependency on STM32MP2 configuration,
allowing the use of STM32 LL RCC features when targeting STM32MP2
devices.
Add header for STM32MP2 per peripheral clock definitions.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
0c583441f1 drivers: hwinfo_stm32.c: add support for stm32mp2
Add support for STM32MP2 series in the hwinfo driver.
The STM32MP2 series uses the HAL functions since it doesn't have a
ll_utils.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
38428c6f52 drivers: interrupt_controller: add stm32mp2 exti
Add the mp2 exti2 dts to the dtsi file.
Add mp2 exti hal and ll function calls with EXTI2 instance. We use the
EXTI2 instance because it contains the GPIO interrupts in the non-secure
context. (We are trying to build the blinky sample as a first milestone)

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
64ac64d2d6 drivers: interrupt_controller: change dt macro
Replace the use of `DT_NODELABEL(exti)` which depends on the node label
with the defined EXTI_NODE macro using the instance with the
`st_stm32_exti` compatible.
Since both macros point to the same node, this change doesn't affect
the code logic, but makes it independent of the node label, in
preparation for the addition of the STM32MP2 exti nodes.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
fb4f0f8d18 boards: st: add support for stm32mp257f_ev1 board
Introduce initial board support for the STM32MP257F-EV1. This includes:
- Board metadata (board.yml, stm32mp257f_ev1.yaml)
- Base software configuration (Kconfig.stm32mp257f_ev1)
- CMake build integration (board.cmake)
- Default configuration (stm32mp257f_ev1_stm32mp257fxx_m33_defconfig)
- Minimal device tree (stm32mp257f_ev1_stm32mp257fxx_m33.dts)
- Initial documentation and image for the stm32mp257f_ev1 board.
- OpenOCD configuration files for debugging support.

This enables the STM32MP257F-EV1 board to build and debug a hello world
sample.

Note that other necessary openocd configuration files are added to the
zephyr sdk directory and can be found in the stm-openocd repository[1].
[1]:https://github.com/STMicroelectronics/device-stm-openocd/tree/main

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
c7d8e03ccf soc: linker.ld: add linker script for stm32mp2x
Add a linker script for the stm32mp2x soc series. It includes the
standard arm cortex-m linker and adds standard zephyr relocation
sections.
Replace the rom_start section name with .isr_vectors in the linker
script. This is necessary for the zephyr firmware to be started by the
remote proc driver which expects the section containing the vector table
to be named .isr_vectors.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
e3953f10ad soc: stm32: add initial soc support for stm32mp2x
Add initial soc support for the stm32mp2x series, including
initial Kconfig entries and default configuration files.
This enables Zephyr to recognize and build for the stm32mp2x series,
taking the stm32mp257f_ev1 as a baseline.

Includes:
- Kconfig and defconfig files for SoC selection and defaults
- soc.h for hal headers
- CMakeLists.txt for build system integration
- soc.yml update to register the new SoC

System Clock is configured statically from DTS. So no initialization
hook or soc.c needed.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
898eaa9a3f dts: arm: st: stm32mp25*_m33.dtsi: add init dtsi
Add the initial device tree source include (dtsi) files for the
stm32mp25 series boards, covering non-secure configuration for zephyr on
the Cortex-M33 core.
These files provide the basic hardware description, including CPU
(Cortex-M33), memory, RCC clock controller and NVIC interrupt
controller.

Key features:
- Set flash and RAM addresses to DDR memory.
- Adjust RCC peripheral address for non-secure context.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Youssef Zini
4ea5fce0f9 west.yml: update modules hal stm32 for stm32mp2x
Update west.yml to add the STM32MP2x SoC support in the STM32 HAL.
This is done after the merge of the PRs:
https://github.com/zephyrproject-rtos/hal_stm32/pull/282
https://github.com/zephyrproject-rtos/hal_stm32/pull/286

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00
Emil Gydesen
2ab5882e0b Bluetooth: CAP: Add cap_unicast_group API
Adds a new abstract struct for unicast group that is
specific for CAP. The difference between this and the BAP
unicast group, is that the parameters are CAP streams and
thus ensuring that the streams in the group adhere to the
additional requirements that CAP has on top of BAP.

This also adds foreach functions for both CAP and BAP
to allow users to iterate on the streams in the
abstract groups.

Various samples, modules and tests have been updated
to use the CAP struct and API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-17 08:20:25 +02:00
Benjamin Cabé
7a663fbf99 drivers: pcie: shell: add missing const qualifiers
Ensure string conversion tables end up in flash.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 07:24:52 +02:00
Benjamin Cabé
9b1e05b0ab drivers: sensor: tsl2540: fix channel validation logic in attr_set
Use && instead of & in channel validation logic to ensure channel is
either CHAN_IR or CHAN_LIGHT.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 07:24:41 +02:00
Benjamin Cabé
a00c901377 drivers: sensor: tdk: remove duplicate entries in ICM42X70_CONFIG_COMMON
Eliminate redundant entries for `accel_pwr_mode` and `apex`.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 07:24:29 +02:00
Maochen Wang
0f6aeca490 samples: net: wifi: nxp: add separate conf for IW610
Add one config file for IW610 chip, as it has different net related
settings and thread priority settings from other hosted MCU, due to
Wi-Fi chip capability difference.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-17 07:24:13 +02:00