Commit graph

116985 commits

Author SHA1 Message Date
Daniel Leung
f7b314347e cmake: compiler/gcc: skip nostdinc property for xt-clang
Xtensa toolchain xt-clang needs similar treatment to xcc in
terms of nostdinc and nostdinc_include, so add it to the if
block to exclude these by default.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-11 16:10:53 -07:00
Daniel Leung
26ea29ddba toolchain: xcc: define __deprecated only if not already defined
Some tests explicitly test for deprecated functions and they
override the macro __deprecated to avoid compiler warnings.
So, for xcc/xt-clang, only define __deprecated if it has not
already been defined.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-11 16:10:53 -07:00
Daniel Leung
1df55181be scripts: gen_app_partitions: only parse known arguments
Since compiler options are unconditionally passed to the script,
we may pass arguments that are not recognized. So we change to
only parse known arguments. Currently, it only cares about -l,
which is related to linking libraries.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-11 16:10:53 -07:00
Grzegorz Chwierut
db3c344af9 west: runners: Add ncs-provision to west flash command
Added automatic KMU key provisioning, when keyfile.json
file exists in the build directory.
This enables automated key provisioning during the
flashing process to enable testing nRF54L aplications using Twister.
Only applicable on nrfutil runner.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2025-06-11 16:09:05 -07:00
Julien Panis
2289fa1770 samples: drivers: crypto: Add entry to sample.yaml for cc23x0
Enable DMA for the test.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
2025-06-11 16:06:55 -07:00
Julien Panis
2d98ac0f0b dts: arm: ti: cc23x0: Add DMA mode support to AES module
Add support to use DMA mode with cc23x0 AES module. This consists in
specifying the DMA channels and peripherals.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
2025-06-11 16:06:55 -07:00
Julien Panis
e0f02d93a6 drivers: crypto: cc23x0: Add support for DMA mode
Two DMA channels are assigned to AES channels A and B respectively.
Each channel A/B has an interface to control the conditions that will
generate requests on the related DMA channel: trigger condition,
R/W address, and DMA done action.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
2025-06-11 16:06:55 -07:00
Matthias Ringwald
b67b5c5dc1 bluetooth: cyw43xxx: support newer PatchRAM files
The CYW43xxx for Infineon Controllers stops after the first LauncRAM
command. Newer Controllers like the CYW5557x update the firmware in
multiple stages, which is supported by this commit.

Signed-off-by: Matthias Ringwald <matthias@ringwald.ch>
2025-06-11 16:04:56 -07:00
Yangbo Lu
eb8cabbccc boards: nxp: imx95_evk: support generating/flashing bootable firmware
Supported NXP Secure Provisioning SDK (SPSDK) generating
and flashing bootable firmware for imx95_evk_mimx9596_m7/a55.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-11 16:03:37 -07:00
Yangbo Lu
0ce51780d4 boards: common: add spsdk flasher support
Added spsdk flasher support.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-06-11 16:03:37 -07:00
Yangbo Lu
e960af1cb1 scripts: west_commands: runners: add nxp spsdk
Added nxp spsdk as west runner.

Secure Provisioning SDK (SPSDK) is a unified, reliable,
and easy to use Python SDK library working across the
NXP MCU portfolio providing a strong foundation from
quick customer prototyping up to production deployment.

Docs: https://spsdk.readthedocs.io

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-11 16:03:37 -07:00
Yangbo Lu
497c02709f scripts: requirements: extras: add spsdk
Secure Provisioning SDK (SPSDK) is a unified, reliable,
and easy to use Python SDK library working across the
NXP MCU portfolio providing a strong foundation from
quick customer prototyping up to production deployment.

Docs: https://spsdk.readthedocs.io

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-11 16:03:37 -07:00
Yangbo Lu
63f647f7ed west.yml: update hal_nxp to support imx95 blobs
Updated hal_nxp to support imx95 blobs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-06-11 16:03:37 -07:00
Jukka Rissanen
bd4c0b746c net: acd: Avoid removing auto IPv4 address twice
When the network interface goes down, we call
net_ipv4_autoconf_reset() which removes the autoaddress
from the network interface.
The net_ipv4_autoconf_reset() is also called when ACD is started
in which case we could see this error message

<dbg> net_if_start_acd: Starting ACD for iface 2
<err> net_if: iface 2 addr 169.254.174.230 (net_if_ipv4_addr_rm():4625)
<dbg> net_if_ipv4_addr_rm: Address 169.254.174.230 not found (-22)

This error is superfluous and not needed. So before trying to
remove the address, check if the interface already has it set and
only then remove it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-11 10:26:56 -07:00
Jukka Rissanen
902c95ab95 net: if: Do not start ACD for localhost or point2point links
When adding IPv4 address to the network interface, there is no
need to start ACD procedure for localhost or point-to-point links.
The ACD start function would mark the IP address like 127.0.0.1 as
tentative and never make it preferred which would then cause issues
when selecting the network address for sending.
As the ACD start is also called when the network interface comes up,
add the localhost and point-to-point link check to ACD start function
so that we will avoid ACD checks in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-11 10:26:56 -07:00
Benjamin Cabé
976f963d13 tests: unit: add unit tests for hex utilities
Ensure 100% code coverage of lib/utils/hex.c

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 10:25:14 -07:00
Benjamin Cabé
455280e5aa lib: hex: remove unnecessary defensive programming
The hex2char() calls in bin2hex() can never fail since buf[i] >> 4
and buf[i] & 0xf always produce values in range 0-15.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 10:25:14 -07:00
Benjamin Cabé
332d8b37ff modbus: fix Apache-2.0 SPDX License identifier case
While SPDX license identifiers are usually considered to be
case-insensitive, matching the case of the canonical identifier is
recommended by the SPDX specification.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 10:23:46 -07:00
Fin Maaß
1b10d276d2 MAINTAINERS.yml: add net/mii.h header to ethernet area
add include/zephyr/net/mii.h header to ethernet area.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:23:15 -07:00
Fin Maaß
db79e78b98 net: mii: use BIT() macro in mii.h
use BIT() macro in mii.h.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:22:46 -07:00
Fabian Blatz
8ed5f0370e maintainers.yml: Add path for LVGL samples
Adds the path for the LVGL samples to the appropriate maintainer section.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-06-11 10:22:08 -07:00
Fin Maaß
f569bb523d drivers: ethernet: phy_mii: restart autoneg after phy_configure_link
make sure that autonegotiation is restarted, after
changing the speeds. Also make sure to only write
the changed registers, as mdio is pretty slow.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:21:21 -07:00
Fin Maaß
b1483a69d6 drivers: ethernet: phy_mii: correct indentation
correct indentation

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:21:21 -07:00
Emil Gydesen
aa6ac8e650 Samples: Bluetooth: HR: Remove use of ISO config for IPC
When compiling with sysbuild and IPC the samples would use the
nrf5340_cpunet_iso-bt_ll_sw_split.conf config file, which was
incompatible with the sample's host configuration.

Instead of using the ISO configuration file, define a hci_ipc
overlay in each sample with the necessary configurations
that support all host configurations.

This commit also updates the sample.yaml files to split
configurations for single- and multicore builds, as what
needs to be configured for each type is different.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-11 10:19:05 -07:00
Fin Maaß
09a270e59f docs: migration-guide: mention ethernet api changes
Mention ethernet api changes.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:17:37 -07:00
Fin Maaß
ed4d421ace drivers: ethernet: remove phy related configs from eth config
remove phy related configs from eth config.
phy related configs chould go directly into the phy.
Most ethernet drivers didn't support the now removed
functions yet. Users should instead use `phy_configure_link()`
together with the `net_eth_get_phy()` function.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:17:37 -07:00
Fin Maaß
c169ac07a0 drivers: ethernet: remove get configs that are unused
remove get configs that are unused by the
ethernet mgmt api.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:17:37 -07:00
Jamie McCrae
99650914c5 tests: lib: devicetree: Add sub-partition tests
Adds tests for sub-partition macros

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-11 10:13:56 -07:00
Jamie McCrae
709526007f storage: flash_map: Add support for sub-partitions
Adds support for sub-partitions to the default flash map

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-11 10:13:56 -07:00
Jamie McCrae
656b6f37da devicetree: fixed-partition: Add sub-partition macros
Adds some macros for usage with sub-partitions

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-11 10:13:56 -07:00
Matthias Ringwald
e50f03404e bluetooth: cyw43xxx: support autobaud feature
Newer AIROC controllers like the CYW55573 don't support changing the
baudrate in Download Mode. However, a higher baud rate can be used
directly to sent HCI Reset.

This commit adds the KConfig flag CONFIG_AIROC_DOWNLOAD_MODE to enable
the new behaviour.

Signed-off-by: Matthias Ringwald <matthias@ringwald.ch>
2025-06-11 10:12:24 -07:00
Adam Kondraciuk
bdab748bcf Revert "tests: arm_thread_swap: Add overlay for nRF54H20"
This reverts commit 28bd478a0b.

This commit can be reverted as the cause of test failure
has been removed in ipc service by increasing workqueue stack size.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-11 10:09:02 -07:00
Adam Kondraciuk
31689690c9 ipc: ipc_service: Parametrize workqueue stack size
Add `IPC_SERVICE_BACKEND_ICBMSG_EP_BOUND_WORK_Q_STACK_SIZE` config
and parametrize its value depending on the optimization level.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-11 10:09:02 -07:00
Maksim Salau
c2fd84fdd5 modbus: serial: Ignore received data when reception is disabled
A byte received when reception has been disabled
corrupts internal state of the server
(e.g. during transmission of a reply in server mode).
The reponse packet is corrupted and its transmission is aborted and the
data in the buffer is treated by the server as a new incoming packet.
Since the buffer is corrupted CRC doesn't match and the following log
message is printed:

  <wrn> modbus_serial: Calculated CRC does not match received CRC

This condition happens when uart_irq_rx_ready() returns true if there is
a new byte in the receive FIFO even with disabled RX interrupt.

The issue has been discovered on a nucleo_u083rc board with a RS485
transceiver with the RI signal floating (a pull-down gives more stable
reproduction). The pull-down ensures that RI is low during transmission
which is seen as byte 0 with a framing error by the receiver.
The byte is received by the MCU and corrupts the response.
Similar effect can be achieved by not disabling the receiver during
transmission (i.e. nRE is driven by the MCU and is fixed low).

The fix discards any data received when reception has been disabled.

Signed-off-by: Maksim Salau <msalau@iotecha.com>
2025-06-11 10:08:25 -07:00
Benjamin Cabé
66f5d701bd shell: fix alignment issue
Casting a char* to a struct* requires checking alignment as this can fail
on platforms requiring strict alignment (ex. Xtensa)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 08:56:04 -07:00
Emil Gydesen
9b4bebbdf3 Bluetooth: ASCS: Sonarcloud fixes
Made a few complex functions simpler
Added missing default cases in switches
Fixes a bad cast that removed const
Moved loop iterators to inner loop

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-11 08:58:09 -04:00
Emil Gydesen
314678c48d Bluetooth: AICS Client: Fix sonarcloud issues
Fixes a few bad casts that ignored const
Add a few missing final else statement
Refactored aics_discover_func to be less complex by
moving some parts of it into a new function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-11 08:57:26 -04:00
Emil Gydesen
bf8570256f Bluetooth: AICS: Fix sonarcloud issues
Add missing else and refactored write_aics_control to
be less complex.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-11 08:57:26 -04:00
Alberto Escolar Piedras
6d7744209b manifest lvgl: Update to fork with hotfix for Zephyr
Update to fork from lvgl's master branch with the following fix:
* fix: ifdef function to avoid unused function build warning
Which fixes this issue being triggered in Zephyr's CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-06-11 11:06:41 +02:00
Mike J. Chen
9075d53355 kernel: fix timeout bugs
When CONFIG_TIMEOUT_64BIT is y, positive values are relative/delta
timeouts and negative values are absolute timeouts, except
for two special values. -1 is K_WAIT_FOREVER and 0 is K_NO_WAIT.
The reserved value of -1 means INT64_MAX is not a valid argument
to K_TIMEOUT_ABS_TICKS(), but there was no check. If a literal
was passed, a preprocessor/compiler warning would be generated
for overflow, but if a variable was passed as the argument,
then the code would compile but not work correctly since the
absolute timeout would be changed to a relative one. One
example of this is task_wdt_init() if no channels are enabled.

Rather than just fixing task_wdt, and trying to find other cases
in an adhoc way, this CL changes K_TIMEOUT_ABS_TICKS() to
limit the larges value to (INT64_MAX-1). It does so silently,
but given the range of int64_t, there should be no practical
difference.

Also, change the implementation for Z_IS_TIMEOUT_RELATIVE() to
fix the case where INT64_MAX relative timeout was being
improperly reported as being not a relative timeout. This was
again due to the -1 reserved value.

Add some tests for these changes to the timer_api test.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-06-11 09:56:13 +02:00
sudarsan N
6d88a62417 drivers: adc: fix underflow in lmp90xxx_adc_start_read channel check
Prevent integer underflow when sequence->channels is 0.
Add an explicit check before calling find_msb_set().

Coverity CID: 487765

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-06-11 09:55:42 +02:00
Benjamin Cabé
660d2b3e7a audio: codec: shell: adopt SHELL_HELP
have audio codec shell commands use the new SHELL_HELP macro

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Benjamin Cabé
3096ea0216 watchdog: shell: adopt SHELL_HELP
have wdt shell commands use the new SHELL_HELP macro

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Benjamin Cabé
b84294c156 w1: shell: adopt SHELL_HELP
have w1 shell commands use the new SHELL_HELP macro

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Benjamin Cabé
9ab0ea73a8 shell: Introduce structured help message
In order to enable better and more consistent help messages for shell
commands, this commit introduces a new SHELL_HELP macro that allows to
document a command's description and usage in a more structured way.

This will allow to get rid of inconsistent (and duplicated!) variations
of "Syntax: ...", "Syntax:\n ...", "Usage: ...", in the commands, and
formatting of the description+usage will be taken care of by the shell
when it detects the help message is using the "structured" format.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Benjamin Cabé
7bdeffb5a6 shell: fix margin handling after newlines in formatted help text
Lines following newlines in shell help text were not properly indented.
For example, in "abc def\ndef ghi\njkl mno", the lines "def ghi" and
"jkl mno" would appear without the expected left margin.

The issue was that after processing a newline and setting proper cursor
position, the function would fall through to z_shell_raw_fprintf() which

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Ling Pei Lee
75bfd799c4 net: shell: iface: Add link speed settings command
Add this to set link speed through net_shell.
Current zephyr version doesn't have user interface to change
speed, hence adding this to accomodate it. Full duplex will
be set by default for each link speed.

Able to change link speed using command below:
net iface set_link <iface idx> <speed> <optional:h(half)/f(full)>
eg: net iface set_link 1 100 h
    net iface set_link 1 10 f
    net iface set_link 1 1000

Able to set multiple link speed like below:
net iface set_link <iface idx> <speed1> <speed2> <optional:h/f>
eg: net iface set_link 1 10 100 h
    net iface set_link 1 1000 f 10

Signed-off-by: Ling Pei Lee <pei.lee.ling@intel.com>
2025-06-11 09:54:56 +02:00
Maochen Wang
6d161802a8 samples: net: wifi: nxp: supplicant enterprise enabledment on IW610
Add mbedtls config file to support enterprise mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-11 09:54:46 +02:00
Abhinav Kulkarni
703fa22b11 samples: net: wifi: shell: nxp: HostAP support for IW416
Added host AP support for IW416 and IW612 socs.
Adding conf files which can be used along with shield for compilation to
test HostAP and WPA supplicant.

Signed-off-by: Abhinav Kulkarni <abhinav.kulkarni@nxp.com>
2025-06-11 09:54:46 +02:00
Eden Uhde
436fabeb0a doc: build: signing: Correct typo – 'singing' to 'signing'
Fixing a typo in two places
Signed-off-by: Eden Uhde <eden@cutegirls.club>
2025-06-11 08:28:30 +02:00