Commit graph

126,787 commits

Author SHA1 Message Date
Johann Fischer
f289613c4c net_buf: do not assert on buffer reset when flags are set
There is only one flag, NET_BUF_EXTERNAL_DATA, used when net_buf was
allocated with external data. The flag is checked in net_buf_clone() and
net_buf_destroy(). net_buf with external buffer can be used for
receiving and transmitting. net_buf_reset() is convenient way
to reset net_buf with external data before it is re-enqueued again.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-10-06 20:01:51 +03:00
Jordan Yates
6685acc5ef tests: modem: modem_chat: test dedicated workqueue
Validate compilation with `CONFIG_MODEM_DEDICATED_WORKQUEUE=y`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 20:01:41 +03:00
Jordan Yates
761961fa28 modem: optional dedicated workqueue
Add the option to use a dedicated workqueue for the modem backend
instead of the system workqueue.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 20:01:41 +03:00
Emil Gydesen
b3ef646160 doc: releases: Add note for bt_le_set_auto_conn
Add note for removed function bt_le_set_auto_conn.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-06 20:01:04 +03:00
Emil Gydesen
360880b7c7 Bluetooth: Host: Remove bt_le_set_auto_conn
Remove the deprecated function bt_le_set_auto_conn
as it has been deprecated since 4.1.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-06 20:01:04 +03:00
Raffael Rostagno
47a7038a2f samples: esp32: deep_sleep: Internal pull support
Some SoCs support EXT1 wake-up pins (RTC IOs) but do not provide
IOMUX features like internal pull-up/down resistors. Support for
these features is indicated by SOC_RTCIO_INPUT_OUTPUT_SUPPORTED.
This change updates the test configuration to account for this
and fixes EXT1 pin mapping for ESP32-H2.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-10-06 20:00:52 +03:00
Raffael Rostagno
73e882f656 soc: esp32h2: Fix LP SRAM size
Fix LP SRAM size on memory map. Correct value is obtained from
device tree.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-10-06 20:00:52 +03:00
Raffael Rostagno
bbc5a83abc soc: esp32h2: Power management support
Power management support for ESP32-H2.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-10-06 20:00:52 +03:00
Raffael Rostagno
1f91cfea21 dts: pm: esp32h2: Add power states
Add power states for PM.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-10-06 20:00:52 +03:00
Raffael Rostagno
da21bee6a0 west.yml: hal_espressif: Update for ESP32-H2 pm support
Update for ESP32-H2 pm support.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-10-06 20:00:52 +03:00
Artur Hadasz
7c1721de03 tests: boot: Fix bootloader.mcuboot boot loop for nrf platforms
The swapped_app image, added via ExternalZephyrProject_Add,
wasn't receiving the swap method configuration from sysbuild.
If trying to build the test with a different configuration that
SWAP_USING_OFFSET (for example SWAP_USING_MOVE)
this resulted in a boot loop due to configuration mismatch
between swapped_image and mcuboot.

This fix ensures proper configuration propagation and prevents
similar mismatches in future scenarios.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
2025-10-06 20:00:40 +03:00
Daniel DeGrasse
79bfd9525e drivers: sdhc: mcux_sdif: report 4 bit bus support
SDIF peripheral supports 4 bit bus width, report this correctly

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-10-06 20:00:29 +03:00
Alberto Escolar Piedras
1264a923f3 net: mqtt_sn: udp: Adapt to new zsock_recvfrom() api.
zsock_recvfrom() takes as last argument a socklen_t pointer
( c546c1cad1 )
whose definition has changed.
So let's ensure we pass the right type of pointer to it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-06 20:00:20 +03:00
Alberto Escolar Piedras
37ff1b254f tracing: ctf: Fix arguments socket tracing functions
Zephyr's socklen_t was changed in
c546c1cad1
to be uint32_t instea of size_t.
Let's fix accordingly the prototypes which expect it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-06 20:00:20 +03:00
Alberto Escolar Piedras
65e099bb98 tests: net: socket: udp: Fix type of pointer
zsock_getsockopt() takes as last argument a socklen_t pointer
which type was changed in
c546c1cad1
as is not anymore equivalent to size_t.
So let's ensure we pass the right type of pointer to it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-06 20:00:20 +03:00
Alberto Escolar Piedras
61e12a4c75 drivers: wifi: eswifi: Fix callback prototype
net_tcp_accept_cb_t takes a socklen_t as 3rd argument,
which type was changed in
c546c1cad1
and is not anymore equivalent to size_t.
So let's correct it.

As a freebie, let's define that function as static as it is.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-06 20:00:20 +03:00
Alberto Escolar Piedras
d4094d431c net: dns: dispatcher: Fix type of pointer
zsock_recvfrom() takes as last argument a socklen_t pointer
which type was changed in
c546c1cad1
as is not anymore equivalent to size_t.
So let's ensure we pass the right type of pointer to it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-10-06 20:00:20 +03:00
Jukka Rissanen
16f4d6c23e tests: net: ipv6: Fix printf modifier
Printing long int requires %ld when priting error.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-10-06 09:38:01 +02:00
Jukka Rissanen
ffb1e63736 tests: net: socketpair: Fix zassert_not_equal call
There was extra parameter when calling zassert_not_equal() which caused
compilation warning.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-10-06 09:38:01 +02:00
Jukka Rissanen
96dff2f864 tests: net: dhcpv6: Fix zassert_ok check
There was extra parameter when calling zassert_ok() which caused
compilation warning.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-10-06 09:38:01 +02:00
Jukka Rissanen
e0c74b25a6 doc: migration-guide: Mention socklen_t changes
Add information that the socklen_t was changed from size_t, which
can be either 32 or 64 bit long depending on system configuration,
to always be 32 bit long. This is now aligned to way Linux is defining
socklen_t.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-10-06 09:38:01 +02:00
Jukka Rissanen
c546c1cad1 net: socket: Change socklen_t to be 4 bytes long
There is an issue when zephyr is compiled with native_sim_64 where
size_t is 8 bytes. The socklen_t in specified as 4 bytes in Linux
even for 64 bit builds so we have a conflict between Linux and Zephyr.
To make things work properly, define socklen_t as uint32_t in order to
align with Linux. Four bytes is enough for socket address length anyway.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-10-06 09:38:01 +02:00
Jonathan Nilsen
b28b570959 soc: nordic: uicr: fix SPIM CSN CTRLSEL values
Fix an incorrect interpretation of the chip select signal
for the SPIM instances. If cs-gpios is used then the chip
select pin is used as a GPIO, and should have CTRLSEL=0.
Only when NRF_FUN_SPIM_CSN is used should CTRLSEL
be configured to enable hardware control of the pin.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2025-10-06 09:37:41 +02:00
Jordan Yates
f047a412e0 modem: cmux: auto calculate work buffer sizes
Automatically size the CMUX work buffers based on
`CONFIG_MODEM_CMUX_MTU`. This eliminates a Kconfig variable that would
otherwise need to manually be kept in sync. The option to extend the
size of these buffers is still provided through
`CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 09:37:26 +02:00
Jordan Yates
4b39be61f1 cellular: extend registration status definitions
Extend the registration status definitions and explicitly tie them to
the values defined in 3GPP TS 27.007. Definitions were copied from
version v18.6.0.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 09:37:00 +02:00
Jordan Yates
e15a65ca23 cellular: update access technologies
Update the defined access technologies to align with the 3GPP standard
TS 27.007. Definitions were copied from version v18.6.0.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-06 09:37:00 +02:00
Jilay Pandya
bc12672ee5 tests: stepper: deprecate drv84xx_api test suite
refactor move_to_negative_direction, run_positive as well as
run_negative direction from drv84xx_api to stepper test-suite

refactor test_microstep_resolution to drv84xx_emul

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-10-06 09:36:35 +02:00
Jilay Pandya
215df9f320 tests: stepper_api: check is_moving in stepper_api tests
add is_moving check to already existing stepper_api move_by
and move_to tests.
delete corresponding redundant test cases from drv84xx

bugfixes in step_dir_stepper_common.c
- start_stepping shall return 0 instead of return ret since
timing_source_start can return 1 depending on which timing
source in selected
- stop timing source before triggering steps_completed event

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-10-06 09:36:35 +02:00
Jilay Pandya
5117b7766f tests: drv84xx: drop duplicate tests
test_actual_position_set, test_test_move_by_zero_steps_no_movement
from drv84xx_api test-suite are already accounted for in stepper_api
test suite through test_actual_position & test_move_by_zero_steps
respectively.

test_move_to_identical_current_and_target_position scenario from
drv84xx_api is now covered in test_move_zero_steps in stepper_api

test_move_to_positive_direction_movement from drv84xx_api test-suite
is now test_move_to_positive_step_count in stepper test-suite

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-10-06 09:36:35 +02:00
Jilay Pandya
ee909efaf8 tests: stepper_api: drop test_run_zero_step_interval_correct_position
Setting 0 as microstep interval is invalid. If microstep_interval is
not set then the motion related functions should return -EINVAL.

drop test_run_zero_step_interval_correct_position

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-10-06 09:36:35 +02:00
Shawn Huang
7b3ac52551 doc: releases: 4.3: add formatting options for log backend
LOG_BACKEND_SHOW_TIMESTAMP and LOG_BACKEND_SHOW_LEVEL

Signed-off-by: Shawn Huang <shawn.huang724@realtek.com>
2025-10-06 09:36:23 +02:00
Shawn Huang
f7412dc0df logging: allow simplified logging of backend
This allows no timestamps and level prefixes in backend log output.

Signed-off-by: Shawn Huang <shawn.huang724@realtek.com>
2025-10-06 09:36:23 +02:00
WenBin Zhang
345121adbf systemview: Systemview section move to .dtcm_bss
Move to dtcm.bss to reduce flash usage.
When increasing SEGGER_SYSVIEW_RTT_BUFFER_SIZE,
it will waste a large amount of flash space.

Signed-off-by: WenBin Zhang <freey7955@gmail.com>
2025-10-06 09:36:05 +02:00
Stefan Schmidt
69548c6d94 documentation: unit tests: extend description
Add a more detailed description on how to unit test using ztest and twister


Signed-off-by: Stefan Schmidt <kontakt@stefanschmidt-embedded.de>
2025-10-05 20:02:22 -04:00
Pieter De Gendt
6693923734 net: wifi: mgmt: Remove extraneous newlines from logs
Some log statements appended unnecessary newlines, remove those.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-05 20:02:08 -04:00
Pieter De Gendt
ce45f4ca53 net: lib: wifi: mgmt: Fix memory leaks
When connecting to WiFi from stored credentials, the key_passwd is never
freed.
Additionally if the connect fails, the allocated data was never freed.

Convert heap allocated memory to stack allocated buffers.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-05 20:02:08 -04:00
Pieter De Gendt
7eba25f472 include: zephyr: toolchain: Introduce macros to ignore -Wcast-qual
Allow enabling/disabling the -Wcast-qual warning, for example to cast away
constness.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-05 20:02:08 -04:00
Lyle Zhu
730efd9a59 MAINTAINERS: Add one collaborator for Bluetooth Classic
Add chengkai15 as collaborator for Bluetooth Classic.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-05 10:06:11 -04:00
Anisetti Avinash Krishna
caead9f4a9 tests: drivers: Add PTL-h overlays to support two applications
Added support for disk_access and I2C with bme280 application
for ptl-h platform.
-samples/sensor/bme280
-tests/drivers/disk

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2025-10-05 10:06:05 -04:00
Anisetti Avinash Krishna
e200719c2b dts: x86: intel: panther_lake: Update RTC to support MFD method
Updated RTC to support MFD method on panther lake platform
and board config to include alarm and update tests.
-boards/intel/ptl/
-dts/x86/intel/
-tests/drivers/rtc/rtc_api/

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2025-10-05 10:06:05 -04:00
Gustavo Romero
5d02fac803 samples: instrumentation: Add a sample for instrumentation subsys
Adds a sample to show the tracing and profiling features when the
instrumentation subsystem is enabled (CONFIG_INSTRUMENTATION=y).

The sample consists in two threads in ping-pong mode, taking turns to
execute loops that spend some CPU cycles. This allows a couple of
context switches and so to demonstrate tracing of thread scheduling
events.

The sample also has an example on how to capture and show traces and
profile info via the CLI tool zaru and also how to export the traces
so they can be loaded in the Perfetto Trace Viewer tool.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2025-10-05 06:18:25 -04:00
Gustavo Romero
9f402bd177 scripts: zaru: Add instrumentation CLI tool
This commit adds 'zaru', a CLI tool for the instrumentation subsystem.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2025-10-05 06:18:25 -04:00
Gustavo Romero
d569a17286 cmake: emu: Allow QEMU to serve serial on a TCP/IP port
This commit enables users to pass -DQEMU_SOCKET=y for 'west' when
selecting to run the build on a QEMU VM. This allows the target's serial
port to be served to the host via a TCP/IP port for convenience, easing
communication with the target from the external world.

Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
2025-10-05 06:18:25 -04:00
Gustavo Romero
139407f818 instrumentation: Add instrumentation subsystem
This commit adds the instrumentation subsystem.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2025-10-05 06:18:25 -04:00
Kevin Townsend
217bb19651 toolchain: gcc: Add __no_instrumentation__ definition
Adds a new '__no_instrumentation__' preprocessor definition for GCC,
mapping it to '__attribute__((__no_instrument_function__))'.

This new macro is used to disable code instrumentation (enabled when
'-finstrument-functions' flag is passed to the compiler) for specific
functions when placed before a function definition.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
2025-10-05 06:18:25 -04:00
Kevin Townsend
03fcfcd0f2 cmake: compiler: Add func_instrumentation flag
Adds a new compiler flag to enable function instrumentation injection
at compile time for compilers that support it.

Adds support for this flag to GCC when `CONFIG_INSTRUMENTATION` is
enabled, setting the `-finstrument-functions` flag during compilation.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2025-10-05 06:18:25 -04:00
Gustavo Romero
9005f8690f arch: arm: aarch32: Refresh CORTEX_M_DWT in menuconfig
Currently, CORTEX_M_DWT option does not refresh its value when
TIMING_FUNCTIONS, on which it depends, is selected via menuconfig.
This occurs because during the early west build steps the
aarch32-specific Kconfig file is parsed with TIMING_FUNCTIONS=n,
resulting in CORTEX_M_DWT being set to 'n' (not set) in .config.

Later, when the user runs west with -t menuconfig and sets
TIMING_FUNCTIONS=y using the menus or any other option that selects
TIMING_FUNCTIONS=y indirectly, CORTEX_M_DWT is already set to 'n' and
remains set as such. That is inconvenient, and, moreoever, since
CORTEX_M_DWT gets set if TIMING_FUNCTIONS is set in prj.conf, the
current behavior is not consistent, i.e. via the menuconfig setting
TIMING_FUNCTIONS=y doesn't imply selecting CORTEX_M_DWT automatically.

This commit addresses this issue by selecting CORTEX_M_DWT=y if
TIMING_FUNCTIONS becomes set to 'y', otherwise allowing it to be set via
the prompt. This is possible by making the CORTEX_M_DWT prompt
conditional. Hence, in menuconfig, if TIMING_FUNCTIONS gets set
CORTEX_M_DWT is set automatically. If TIMING_FUNCTIONS is not set, a
prompt is presented to allow selecting CORTEX_M_DWT manually.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
2025-10-05 06:18:25 -04:00
Jordan Yates
d185f8edd0 testsuite: optional limiting of coverage dumps
Add an option that excludes generation of a given path of `.gcda` files
when running coverage testing. This can be useful when running testing
coverage on downstream repos, which would otherwise result in large
`.gcda` files for paths we don't care about filling up the disk.

One example of using this is to exclude coverage outputs from
mbedtls files with the following:
`CONFIG_COVERAGE_DUMP_PATH_EXCLUDE="*modules/crypto/mbedtls*"`

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-05 06:18:05 -04:00
Holt Sun
1beee4fe66 tests: ram_context_for_isr: exclude frdm_k32l2b3/k32l2b31a.
The assigned fakedriver interrupt number is 31 which
is the PORTC one in frdm_k32l2b3/k32l2b31a, not free.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2025-10-05 06:17:58 -04:00
Anas Nashif
f53ab27157 scripts: set_assignee: add tests as a meta area
Add tests to be a meta area, similar to samples and documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-05 06:17:45 -04:00