Commit graph

116207 commits

Author SHA1 Message Date
Björn Bergman
bb797ab421 cmake: Fix compilation options for kobject_hash*.c
Rework how the compilation-options for the gperf generated
kobject_hash*.c files are put together to fix problems with SHELL:
and cmake-list separators handling.

zephyr_get_compile_options_for_lang_as_string() returns the set of
options as a cmake generator expression string which is cumbersome to
edit. This caused the command line for the IAR toolchain to have broken
SHELL: entries, and other some command line entries being postfixed by
"gnu".

This also adds CMake compiler properties for no_function_sections and
no_data_sections options

Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
2025-05-31 07:02:36 -04:00
Michal Morsisko
e87e0542b8 drivers: spi_bitbang: Increase supported word size to 32 bits
This change introduces support for words up to 32 bits size
to the spi_bitbang driver

Signed-off-by: Michal Morsisko <morsisko@gmail.com>
2025-05-31 07:02:06 -04:00
Mathieu Choplain
c8c0c294b1 arch: arm: cortex_a_r: use correct name for TLB Conflict Abort
Commit 87719828ac introduced FSR definitions
for ARMv7-A/R; however, the value 16 which is documented in the ARM[1] as
a "TLB Conflict Abort", was introduced as "TLB Conflict Fault" instead and
described as a "Table Conflict Fault".

Update all affected files to use the ARM's naming for this error instead.

[1] Architecture Reference Manual (Document ID: ARM DDI 0406C.d)
    "ARM Architecture Reference Manual for ARMv7-A and ARMv7-R Edition"

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-05-31 07:01:36 -04:00
Sudan Landge
5ab74ff1de doc: arm: cortex_m: Update PACBTI support
Update PACBTI support for architecture variants in the features table
and add a new section introducing PACBTI support/limitations.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-05-31 06:55:18 -04:00
Sudan Landge
c6d1932b17 doc: arm: cortex_m: Update feature table
Add Cortex-M85 under the Arm v8.1-M architecture variant column.
Cortex-M85 shares feature support with Cortex-M55, including Privileged
Execute Never (PXN), and additionally introduces Pointer Authentication
and Branch Target Identification (PACBTI) extensions.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-05-31 06:55:18 -04:00
Sudan Landge
35b5fb3bd6 arch: arm: cortex_m: Add support for PACBTI flags
Introduce a Kconfig choice to select Pointer Authentication and Branch
Target Identification (PACBTI) features on Armv8.1-M Mainline CPUs.
The available options map to supported `-mbranch-protection` levels
(`standard`, `pac-ret`, `bti`, and combinations) documented at
https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
These options enable hardware-assisted control-flow integrity mechanisms on
targets like Cortex-M85, and require a toolchain with PACBTI support, such
as GCC 14.2 or newer.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-05-31 06:55:18 -04:00
Bas van Loon
e7dd7abc0e drivers: i2c: Add support for clock stretching in the i2c-gpio module.
Some I2C peripherals like TI charger or gauge chips need support for I2C
clock stretching. This patch includes that and makes these modules
usable with I2C emulation over GPIO.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2025-05-31 06:55:10 -04:00
Ryan McClelland
d3a7b7df9a drivers: i3c: cdns: fix ibi length with no payload
If the BCR value is not set for ibi w/ payload, then it still
has a ibi length of 1 due to the MDB. Set the PL accordingly.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-05-31 06:54:59 -04:00
Daniel Kampert
a673871970 drivers: sensor: Remove broken reset from apds9306 driver
The reset may cause initialization issues because of a missing
ACK from the sensor. The error check for the I2C communication
is removed to avoid issues during the initialization.

Closes #89850

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2025-05-31 06:54:52 -04:00
Pieter De Gendt
62ea066794 scripts: west_commands: simulate: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-31 06:54:39 -04:00
Pieter De Gendt
b9fb5d79e4 scripts: west_commands: robot: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-31 06:54:39 -04:00
Pieter De Gendt
359a0c2809 scripts: west_commands: flash: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-31 06:54:39 -04:00
Pieter De Gendt
5321c14628 scripts: west_commands: debug: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-31 06:54:39 -04:00
Pieter De Gendt
d9d4daa940 scripts: west_commands: build_helpers: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-31 06:54:39 -04:00
Pieter De Gendt
166fd3e506 scripts: west_commands: build: Fix linter issues
Fix issues reported by ruff.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-31 06:54:39 -04:00
Derek Snell
2dc9c2b360 samples: subsys: nvs: add testcase for MCXN947 internal flash
For boards frdm_mcxn947 and mcx_n9xx_evk test NVS in internal flash in
addition to external QSPI flash.  Also enable the NVS subsystem on
these boards for Twister.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-05-31 05:57:40 -04:00
Derek Snell
bb7f776194 boards: nxp: frdm_mcxn947 and mcx_n9xx_evk: enable clock for FMU
For internal flash FMU programg/erase operations, enable the FRO12MHZ
clock when the flash driver is enabled.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-05-31 05:57:40 -04:00
Derek Snell
1fd24fbdbb soc: nxp: mcx: MCXNx4x: update SOC to use flash_k4 driver
Use flash_k4 driver for internal flash instead of ROM API driver.  One
benefit is the flash program phrase size decreases from 128 Bytes to 16
Bytes.  16 Byte phrases enables this SOC to leverage the Zephyr NVS
subsystem, and the MCUboot swap mode.

Signed-off-by: Derek Snell <derek.snell@nxp.com>

Conflicts:
	west.yml
2025-05-31 05:57:40 -04:00
Manuel Argüelles
6681f8d342 soc: nxp: s32k3: configure missing mpu regions
This fixes a regression introduced in c31640239c where all regions
except Flash and RAM where left unmapped. Before introducing region
0 that prevents speculative access to the entire memory space, we
were relying on the architectural background map to access them.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-05-31 05:57:18 -04:00
Manuel Argüelles
63ebf4d23f Revert "arch: arm: mpu: fix erratum 1013783-B"
This reverts commit 983b1d088c.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-05-31 05:57:18 -04:00
Tom Hughes
db726c40a9 sw_isr_table: Add spaces to fix compiler warning
When using clang to build a C++ file that includes this file, it warns:

include/zephyr/sw_isr_table.h:195:28: error: invalid suffix on literal;
C++11 requires a space between literal and identifier
[-Wreserved-user-defined-literal]
         "." Z_STRINGIFY(prefix)"."file"." Z_STRINGIFY(counter)

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-05-31 05:56:28 -04:00
Luis Ubieda
ae114f175f tests: modem_ubx: Fix clang failure by removing static keyword
Reported on latest clang-build run (250530).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-31 05:56:01 -04:00
Ederson de Souza
923fedb429 arch/x86/core: Use CONFIG_QEMU_TARGET for QEMU specific code
Instead of both checking CONFIG_BOARD_QEMU_X86 and
CONFIG_BOARD_QEMU_X86_64, simply check for CONFIG_QEMU_TARGET.

This also helps qemu_x86_tiny, qemu_x86_lakemont and any
future/downstream QEMU targets to keep things simple.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-05-31 05:55:41 -04:00
Dhruv Menon
d54c308695 docs: fix typo in vendor-prefixes for Digilent Inc.
This commit corrects the spelling to reflect the official name

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
2025-05-31 03:38:01 +02:00
Piotr Kosycarz
dbb32434ba samples: sensor: accel_trig: add fixture for shield-tap
Prevent execution on devices without proper shield.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2025-05-31 03:37:40 +02:00
Matthieu Speder
66d90e7782 soc: nxp_kinetis: Mark __kinetis_flash_config with __used attribute
This is a fix for issue #90426 .
Marking __kinetis_flash_config  with __used attribute prevents
unwanted deletion when compiling with LTO.

Signed-off-by: Matthieu Speder <mspeder@users.sourceforge.net>
2025-05-31 03:37:20 +02:00
Declan Snyder
481711e5a6 tests: spi_loopback: Fix fail handle of thread test
Right now the thread test case does not handle when the test fails, the
test will be aborted by ztest in one of the spawned threads, and cause
desynchronization which messes up the rest of the test. Fix by
synchronizing in the case of fails and return fail from main test thread
instead of the spawned ones.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-31 03:36:33 +02:00
Declan Snyder
c10c13b961 tests: spi_loopback: Handle overflow of print latency
The test that checks latency also prints a measurement of the latency
which is just a visual information for the test output. However, this
print uses a subtraction which can have an overflow in the case where
the kernel timer is behind, so just clamp to 0 in that case where there
is an overflow. This change does not affect the test pass/fail logic.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-31 03:36:33 +02:00
Andrej Butok
eb5014f7a3 soc: imxrt: add mimxrt1052/1062 flashing configuration
- Adds a flash runner configuration for mimxrt1052 and mimxrt1062,
  used for sysbuild multi-image projects, mainly for MCU-boot.
- Avoid unwanted multiple erases and resets.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-05-31 03:36:24 +02:00
Michal Kozikowski
df65918cfa drivers: spi: spi_context.h: remove multithreading dependency
Replace semaphores with proper atomic flags when used without
multithreading enabled.

Signed-off-by: Michal Kozikowski <michal.kozikowski@nordicsemi.no>
2025-05-31 03:36:14 +02:00
John Shelton
7af55237da driver: sensor: aosong,dht: fix sensor protocol broken since change #83192
A recent change 9eeb60c improperly removed a critical line in the driver.

This commit replaces that line and moves an irq_lock to above any pin

value manipulation since the timing is sensitive with the DHT protocol.

This should also fix the timing issue 9eeb60c attempted to fix.

Signed-off-by: John Shelton <moosery@gmail.com>
2025-05-31 03:35:47 +02:00
Benjamin Cabé
1fb86e1470 doc: release: update/consolidate LTS information
Update documentation with new LTS lifecycle information following TSC
decision to extend LTS support to 5 years.
Also removed some duplicate information.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-05-31 03:35:36 +02:00
David Brown
36e0b3dea7 modules: optional: rust: Update to latest development
Bring in the following changes to the Rust module, updating since rev 4.1.

1cab77b436b dts.pest: Add support for comments in devicetree source files
e53f6de1c06 fix(cmake): Evaluate generator expressions in sample cargo...
e64cadb3c9e zephyr: thread: Add 'join_timeout' to RunningThread
a683eb8a3b5 zephyr: Replace critical-section implementation
26cd3bc0c8a zephyr-sys: Export irq_lock/unlock
901edef9bc8 zephyr: Specify minimum rust version
0de6f6c390d zephyr-build: Simplify dt-yaml syntax
edcef3ba39c zephyr: Remove stale doc references to futures
4096ad7c803 cmake: Fix dependency problem
5557cb3fc35 zephyr: object: Fix bad doc link
d921320cc7d zephyr: devicetree: Allow non-snake-case names in DT nodes
14618bd02f7 zephyr: sys: sync: Semaphore: Remove incorrect ALLOC check
47e270d5ac5 zephyr: sync: Conditionalize PinWeak on alloc
f8b228fe71c samples: bench: Increase thread stack size on 64-bit platforms
ec50a4317b9 zephyr: sync: Create PinWeak type
2e5059a209d samples: async-philosophers: Remove overly specific imports
a0061313850 samples: async-philosophers: Convert to general async
5c15fbb9d20 zephyr: Remove work-queue executor
f107c93dce6 samples: rename work-philosophers to async-philosophers
ed8d08bc890 samples: bench: Replace old async with new
087e584eae9 zephyr-macros: Incorporate fn name into thread name
72ed3818192 samples: philosophers: Migrate to new task declaration
44b2dd28073 zephyr: Add proc macro for thread declaration
8952b444b3a CI: Force python version 3.12
e3518de6d07 cmake: add USES_TERMINAL to show cargo output
b7dacdac984 zephyr: embassy: Use a semaphore for the executor
a871c7f588c Add support for board native_sim/native/64
349164d630a samples: blinky: Remove incorrect integration platform
b0866632d42 samples/tests: Ensure test/sample names are unique
7395ae4f486 zephyr-build: fix DTS parser for Windows
a341bc50041 samples: philosophers: Migrate Mutex to const constructor
5000f459f26 samples: bench: Clean up formatting
6020ab7db36 zephyr: Run rustfmt
c1d74e1d5df samples: bench: Make Semaphores static
37754d29e0b samples: bench: Reduce benchmark iterations
11067823e53 samples: bench: Remove the 'basesem' prototype
3a4f08ba1ea zepyr: sys: sync: Mutex/Condvar
64605eb89cf samples: bench: fix for API change
8d7ca493801 zephyr: Convert `Queue` to new atomic initializer up
3a0016dace2 zephyr: sys: sync: Make Semaphore constructors `const`
5ceccc155c2 zephyr: object: Implement new ZephyrObject wrapper
2790674bb7f docgen: Enable async features for doc generation
1b475b7a9a8 tests: drivers: gpio-async: Test the async gpio operations
0347eac6882 zephyr: Add async 'wait_for_high' and 'wait_for_low' to gpio
b60408c54ef zephyr: device: Add a possible static element with each device
28f7ec6b515 zephyr: device: gpio: Add a few more methods
bcc9ee433bd zephyr: embassy: Add Default implementation
a458d8e33eb zephyr: embassy: Eliminate unused printkln import
dea64363115 samples: embassy: Detect proper end to the test
04d9e5714e6 samples: embassy: Increase task pool size
eae89bc4d2b samples: embassy: Fix test name
758a2c264c7 samples: embassy: Update formatting
ac0eaac9d8b zephyr: Update rustfmt
db93ee7978e samples: embassy: Update Embassy Demo for Zephyr executor
a9958395985 zephyr: Implement `executor-zephyr` to use with Embassy
60d7c5396ac samples: embassy: Start of an embassy demo
1540e9ab785 zephyr: Add initial support for embassy
1503a982e00 docs: Update top-level index
c58d1f20024 zephyr: Expand top-level crate docs

Signed-off-by: David Brown <david.brown@linaro.org>
2025-05-30 19:40:57 +02:00
Grzegorz Chwierut
c6a41a47d9 tests: boot: Update imgtool path in west_sign_wrapper
Fixes tests/boot/with_mcumgr in case, when imgtool is
not installed. Added imgtool path to west sign wrapper.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2025-05-30 19:40:44 +02:00
Dipak Shetty
f5d1803eca tests: drivers: build_all: stepper: add uart configuration for tmc51xx
Now added a node to test builds with tmc51xx on uart.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
358907b25f drivers: stepper: adi_tmc: tmc51xx uart support
Added support for tmc51xx uart support alongside the
existing spi support. The tmc51xx driver is now consolidated
into a dedicated folder.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
a66d064dc4 drivers: stepper: adi_tmc: extend rampstat mask range
Now added pos_reached_mask for polling rampstat when
position reached event is not supported, for example,
with uart drivers. Consequently, when the position is
reached, the position is reached, and the event flag is
set active. Hence, an additional value is now introduced.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
b914537603 drivers: stepper: adi_tmc: extend to support uart
Add support for trinamic controller with single wire UART

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
6cc860d892 drivers: stepper: adi_tmc: bus: abstraction layer for bus
Now a bus abstraction for Trinamic stepper drivers with
unified interface for SPI/UART communication. Separates
transport logic from device-specific functionality.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
bceeb766fc dts: bindings: stepper: adi: tmc51xx uart support
Now adds support to tmc51xx via uart. The base yaml supports
the common properties, and uart and spi bindings are
configuration-specific.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Luis Ubieda
94a7f028ef ubx: Refactor codebase in order to improve usability
During testing and code inspection, there were various anti-patterns
on this (and U-Blox driver) codebase(s), including obfuscation, and
lack of data validation. This made it increasingly difficult to
introduce further variants of u-blox GNSS modems.

With this patch, both the UBX modem and the M8 driver have been
refactored to ease the reliability and maintainability of these
codebases. Here are some highlights:

WRT UBX modem:
- Helper macros to easily create UBX frames, (including checksum
calculation), at compile time; thus, making it easier to extend UBX
commands.
- Logic validation by the inclusion of the modem_ubx testsuite, used to
refactor the code through TDD.
- Ability to receive unsolicited messages, in order to enable U-Blox
drivers to rely on modem_ubx to transceive all commands, and avoid
hopping between modem_ubx and modem_chat.

WRT M8 driver:
- Remove GNSS specific protocol header files. Instead, unify them under
modem/ubx/protocol.h. Background: After a survey and looking at ubxlib
SDK I conclude the UBX protocol is by definition a GNSS protocol (there
are non-GNSS u-blox modems, but they're not interfaced through UBX
protocol).
- Establish pattern to create and send/receive commands using new
foundations on modem ubx.
- Remove dependency of Modem chat, and instead use UBX unsolicited
messages to get Navigation and Satellites data.
- Switch from the auto-baudrate detection pattern to a pattern of
transitioning between an initial known baudrate to a desired baudrate,
in order to improve initialization time.
- Add dts property to configure default fix-rate.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-30 19:40:19 +02:00
Declan Snyder
f1df21278c soc: rw: Enable flexcomm wakeup/sleep clocking
Following the new feature in the flexcomm driver to be able to wake up
from low power mode, the clock control drivers have to handle the
platform specific details, so this commit adds to the already ugly mess
that is the LPC syscon driver which is used by RW currently and makes
the required devicetree changes.

Make the console/shell uart on the FRDM_RW612 take advantage of this by
default.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
e5a35e6435 drivers: uart_mcux_flexcomm: Enable as wakeup src
Add the feature for the flexcomm uart to be able to be a wakeup source
from low power modes. To be able to do this on a relevant platform, the
DT node for the UART needs to have the wakeup-source property and define
a "sleep" clock. The details of handling the sleep clock and default
clock are still platform specific but handled by the clock control
driver of the platform, so that this code should be able to be
applicable to any platform that follows the same DT definition.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
4598c18754 soc: rw: Switch main clock on PM2 to LPOSC
On RW, normal configuration has all clock generators gated in PM2.
Only the LPOSC is available for main clock source since it is a low
power clock.

Many of the peripherals on the chip are still "on" and do need a
main clock source in order to be effective as wakeup sources
to the chip as intended. So we should make this switch for PM2
specifically in order to achieve desired wakeup capabilities.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
6bd6e50838 pm: Add API to check if a state disables a device
Add an API function that can be used by client code to check if a state
disables a device.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
65ebecbf78 pm: refactor policy_device_ get/put
Refactor this code so it has less nesting and is able to share some code
between functions, by making a function to find the device constraints
object which can be called before doing operations using it.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
481a2faf1e uart_mcux_flexcomm: Fix TX garbage char bug in PM
There is currently a bug where when entering low power modes, there is a
garbage character sent if the UART is in the middle of a transmit when
entering low power mode. This is because the fifo interrupt happens when
last character is pulled by transmitter from fifo and then we unlock PM
constraints at that moment, instead of waiting for actual transmitter to
become idle. Fix by adding work item to check for this when needed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Jordan Yates
a550c74da1 doc: document WIFI_USAGE_MODE
Add docs for `WIFI_USAGE_MODE` in the Wi-Fi section and release notes.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
3aa61a9503 tests: wifi: nrf_wifi: reduce config overrides
Reduce the number of config overrides needed for the various testcases
by only enabling the options if needed in the first place.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
3d7979ea4a drivers: wifi: nxp: auto NXP_WIFI_SOFTAP_SUPPORT
Automatically enabled `NXP_WIFI_SOFTAP_SUPPORT` if the application
specifies it wants AP support.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00