Commit graph

117288 commits

Author SHA1 Message Date
Daniel Leung
3fbd7dfb75 debug: gdbstub: add arch_gdb_post_memory_write()
This adds an architecture-specific post processing after memory
writes. This introduction is due to GDB's behavior regarding
breakpoints in code. GDB may choose to write break instructions
instead of using hardware breakpoints to interrupt code
execution (e.g. for manual breakpoint or stepping through code).
There is no separate GDB packet type for this. So we need to
make an assumption that a memory write may be to setup break
instructions. Different architectures may have their own unique
ways of dealing with instruction cache in this situation. So we
defer to the architecture code to handle this.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-17 16:27:27 -05:00
Daniel Leung
733305293a xtensa: gdbstub: fix backtracing and stack unwinding
This fixes GDB backtracing by forcibly spilling all registers,
and faking values for WINDOWSTART and WINDOWBASE. This is
effectively telling GDB that only A0-A3 and AR0-AR3 contain
active data and other physical registers do not. GDB then must
rely on spilled values on stack. Otherwise, GDB will try to
look at all AR* registers for previous frame(s). Since we
do not save all AR* register values, there is nothing for GDB
to look at, and thus failing to unwind stack.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-17 16:27:27 -05:00
Daniel Leung
c7841ce472 xtensa: gdbstub: fix compiler warning about discarding const
Inside copy_to_ctx(), we are typecasting the stack pointer into
a 32-bit array pointer, and there was unbalanced const between
two sides. Since we should not be modifying anything inside
that array, add const to the 32-bit array pointer too. So now
the compiler will not complain about discarding the const
qualifier.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-17 16:27:27 -05:00
Daniel Leung
d00095c4a6 xtensa: fix num_high_regs calculation when dumping stack
The calculation of number of high registers is not entirely
correct. We need to get past the pointer to BSA in the stack
frame before reaching the high registers. The location address
difference between the BSA and start of high registers then
can be used to calculate how many high registers in the stack
frame. So correct the start location of high registers in
the calculation as it was incorrect before. Though the result
would be the same as further divisions would mask this error.
However, it is better to correct this for readability.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-17 16:27:27 -05:00
Daniel Leung
f3255fdd03 tests: debug/gdbstub: add an overlay for ESP-WROVER-KIT
Add an overlay in the GDB stub test for ESP-WROVER-KIT board
to enable using its UART for remote GDB communication.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-17 16:27:27 -05:00
Benjamin Cabé
c8349073d5 drivers: rtc: adopt SHELL_HELP
Adopt SHELL_HELP macro for rtc shell

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:25:32 -05:00
Benjamin Cabé
e7f58da491 drivers: adc: use asserts in adc_gain_invert implementations
no need for runtime checks here, let's save a few bytes of code

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:25:15 -05:00
Declan Snyder
b8408575ec MAINTAINERS: Add decsny as SPI collaborator
Add myself as SPI collaborator.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-17 16:25:07 -05:00
Benjamin Cabé
18abef2dbf drivers: mbox: remove duplicate macro definition
Remove duplicate MAILBOX_MBOX_SIZE

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:24:45 -05:00
Pieter De Gendt
b3316fc4fd net: l2: wifi: shell: Fix passphrase long opt help text
A passphrase needs to be passed with --passphrase instead of --psk.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-17 17:47:11 +02:00
Fin Maaß
1497ae6d30 drivers: mdio: remove unused bus_enable/disable
remove unused bus_enable/disable, they don't
need to be implemented, if they are not needed.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 17:46:56 +02:00
Benjamin Cabé
ebfcd24132 drivers: clock_control: ambiq: add missing break statement
add missing break statement so that CLOCK_CONTROL_AMBIQ_TYPE_LFXTAL case
is handled correctly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 17:46:41 +02:00
Benjamin Cabé
ba0954848b drivers: spi: fix bad GENMASK in NXP LPSPI driver
Fixed swapped GENMASK arguments causing bad mask to be generated.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 17:46:27 +02:00
Benjamin Cabé
bb3a898dec drivers: w1: shell: fix off-by-one error
Prevent user to use and invalid setting index

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 17:46:17 +02:00
Benjamin Cabé
d048806bf6 drivers: w1: shell: fix write_bit function
write_bit should write a bit, not a byte.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 17:46:17 +02:00
Anuj Pathak
2af6adc745 drivers: dma: max32: check if bit other than status is set
we iterate over all the channels, and if more than one channel is
active at a time. interrupt on any one of active channel was
triggering callback for other active channel, because flags value
is 1 (enabled). this is commit handle this behaviour and only
trigger callback if bits other than status is set

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2025-06-17 17:46:05 +02:00
Benjamin Cabé
acc1731410 soc: mediatek: fix typo in macro name
s/SOC_SERIES_MT8195/CONFIG_SOC_SERIES_MT8195/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 17:45:47 +02:00
Patryk Koscik
e8ff141f6d tests: drivers: sensor: spi: include gpio.h header
This patch adds a missing include directive to `spi.dtsi` in the
`build_all` configuration.The include is required because commit
2ac316465f introduced the use of `GPIO_ACTIVE_HIGH` and `GPIO_ACTIVE_LOW`
macros.

Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
2025-06-17 17:45:36 +02:00
Joakim Andersson
cc0d00f83a doc: tls_credentials_shell: Document credential load functionality
Document the credential load functionality added to `cred buf` command.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2025-06-17 17:45:26 +02:00
Joakim Andersson
2e5a03877f net: tls_credentials_shell: Add credential buffer load argument
Add argument to the TLS credential `cred buf` command that enables
a shell bypass to write the TLS credential directly to the credential
buffer.
This is useful for writing load credentials that cannot fit in a single
`cred buf` command and would otherwise have to be split into multiple
cred buf commands.
Sending multiple in succession like that from a script for example very
easily causes the shell RX buffer to get full, resulting in multiple
`RX ring buffer full.` warnings.
This is very difficult for a script to handle.

Using a bypass has much better performance and can easily avoid the
RX ring buffer full condition without increasing the RX ring buffer
to much.
It is also easier for a script to use.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2025-06-17 17:45:26 +02:00
The Nguyen
d4758f02b1 samples: counter: alarm: revert PR #90709
Due to the lack of the overlays for lots of platforms, bring up the
platform_allow again before the sample ifdef are refined

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-06-17 16:13:03 +02:00
Benjamin Cabé
8d6316c5b7 drivers: nrf_wifi: put driver ops in flash
Add const qualifiers to the driver ops to save on RAM usage.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:12:44 +02:00
Benjamin Cabé
0f60efe217 drivers: display: stm32: add missing break statement
Add missing break statement causing incorrect fallthrough for ARGB_8888

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:12:26 +02:00
Benjamin Cabé
dcec4ee653 driver: sdhc: fix typo in SAM4E hsmci driver
Fix parameter name (HSMCI -> hsmci)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:12:17 +02:00
Jamie McCrae
97e5d33214 samples: fs: fs_sample: Fix nrf54l15 dts overlay files
Fixes these files to no lonegr delete non-secure partitions
as these no longer exist

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-17 16:11:45 +02:00
Jamie McCrae
5bc71e6e9b boards: nordic: nrf54l05: Change to use common dts partitioning file
Adds a common vendor dts file specifying the default partition
layout for nRF54L05-based cpuapp board targets and updates boards
to use this common file. This also drops the secure/non-secure split
in the partitioning as this was reducing NVM storage that is not
used by this board target and fixes the wrong flash field in
twister yaml files

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-17 16:11:45 +02:00
Jamie McCrae
e542188ce9 boards: nordic: nrf54l15_ns: Change to use common dts partitioning file
Adds a common vendor dts file specifying the default partition
layout for nRF54L15-based cpuapp_ns board targets and updates boards
to use this common file.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-17 16:11:45 +02:00
Jamie McCrae
124a803fc4 boards: nordic: nrf54l15: Change to use common dts partitioning file
Adds a common vendor dts file specifying the default partition
layout for nRF54L15-based cpuapp board targets and updates boards
to use this common file. This also drops the secure/non-secure split
in the partitioning as this was reducing NVM storage that is not
used by this board target and fixes the wrong flash field in
twister yaml files

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-17 16:11:45 +02:00
Jamie McCrae
002838ab9e boards: nordic: nrf54l10_cpuapp_ns: Add workaround for partitions
Adds a workaround for partitions on nrf54l10 non-secure devices to
prevent build issues, this needs to be fixed properly when a TF-M
update is done which sets the partition sizes properly

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-17 16:11:45 +02:00
Jamie McCrae
9dc6040fcd boards: nordic: nrf54l10: Change to use common dts partitioning file
Adds a common vendor dts file specifying the default partition
layout for nRF54L10-based cpuapp board targets and updates boards
to use this common file. This also drops the secure/non-secure split
in the partitioning as this was reducing NVM storage that is not
used by this board target and fixes the wrong flash field in
twister yaml files

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-17 16:11:45 +02:00
Jamie McCrae
0f0c80e931 dts: vendor: nordic: nrf54l10: Fix wrong size of NVM
Fixes the NVM size going beyond what the chip supports

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-17 16:11:45 +02:00
Jamie McCrae
a56cb0ad4d dts: vendor: nordic: nrf91xx_partition: Adapt to sub-partitions
Updates to use sub-partitions for TF-M slots

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-17 16:11:45 +02:00
Michał Stasiak
4d6585488b drivers: adc: adc_nrfx_saadc: Extend internal reference values
Current target-reference mapping does not cover all cases.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-06-17 16:11:33 +02:00
Michał Stasiak
18c0c3aeb9 drivers: Extend analog pins mapping for nRF54L.
Extended analog pins mappings for more nRF54L targets.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-06-17 16:11:33 +02:00
Francois Ramu
17ad5938fa test: drivers: memc: ram testing on adi eval board
When running the tests/drivers/memc/ram on the
adi_eval_adin1110ebz target, do not involve sram1, sram2
That will avoid warning about orphan section for
`DT_N_S_memory_10000000_P_zephyr_memory_region_STRING_TOKEN
and DT_N_S_memory_20040000_P_zephyr_memory_region_STRING_TOKEN

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-06-17 16:11:24 +02:00
Sai Santhosh Malae
d29fd6fcba tests: spi: siwx91x: board config file update
Update CONFIG_SPI_IDEAL_TRANSFER_DURATION_SCALING
value for testcase to pass for higher transfer speeds.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-06-17 16:11:11 +02:00
Sai Santhosh Malae
4bf1c9e8f5 drivers: spi: siwx91x: spi driver fix
Validate word size to only allow 8-bit and 16-bit.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-06-17 16:11:11 +02:00
Bartosz Miller
8aa6557c95 tests: boards: nrf: i2c: Fix nrf52 and nrf53 pin assignment
Fix the i2c loopbacks pins assignments for nrf52 and nrf53 to allow
automated testing.

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2025-06-17 16:10:59 +02:00
Benjamin Cabé
5c422a9d27 tests: drivers: comparator: increase test coverage for await_trigger
Test user-provided timeout value

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:10:46 +02:00
Benjamin Cabé
e564bab82e tests: drivers: comparator: fix typos
Fixed a few dummy asserts

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:10:46 +02:00
Koen Van Herck
4ae5c1e505 boards: raspberrypi: rpi_pico2: Add jlink runner for rpi_pico2 board
jlink runner works fine for the Pico2, just like Pico1 (rpi_pico).
Copied relevant lines from rpi_pico/board.cmake.
Fixed typo in documentation.

Signed-off-by: Koen Van Herck <koen.v.herck@gmail.com>
2025-06-17 16:10:32 +02:00
Benjamin Cabé
2dd0b4fee0 tests: drivers: gnss: add test for get_fix_rate()
Add a test for this previously untested function

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:10:04 +02:00
Benjamin Cabé
64446d2f67 drivers: gnss: emul: increase GNSS_EMUL_MIN_FIX_INTERVAL_MS
Make the GNSS emul driver less capable w.r.t fix interval so that we can
exercise more error paths if e.g. user requests a fix interval of 100ms.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:10:04 +02:00
Guennadi Liakhovetski
87e3e1fed2 llext: move 2 prototypes to llext_internal.h
arch_elf_relocate_global() and arch_elf_relocate_local() aren't LLEXT
API functions, they're internal implementation functions, move them
to llext_internal.h

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-17 16:09:50 +02:00
Guennadi Liakhovetski
53a179ac4e llext: make unresolved symbol errors fatal
With experience it becomes clear, that failing to resolve symbols
during the linking process is likely fatal for the module loading and
a simple warning isn't enough. Fail loading instead.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-17 16:09:50 +02:00
Grzegorz Swiderski
64bb8b6796 scripts: kconfig: Add hex variants of arithmetic functions
Functions like `add` and `sub` can only return base 10 integers, which
means they can't really be used to define Kconfig symbols of type `hex`.

For the same reason, there already exist pairs of devicetree functions
named e.g., `dt_node_reg_addr_(int|hex)` after different return types.

Introduce `add_hex`, `sub_hex`, and friends.

To avoid confusion, it should be possible for those new functions to
accept arguments in base 16 as well. It's actually easier to let all
arithmetic functions take their inputs in "any" base, by leveraging
Python's built-in: `int(..., base=0)`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-06-17 16:09:41 +02:00
sudarsan N
139cdfc243 drivers: uc81xx: fix unchecked return from mipi_dbi_reset()
Check return value to handle potential failure.

Fixes: CID 524752

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-06-17 16:09:27 +02:00
Johan Stridkvist
df0db6a7a3 samples: Bluetooth: hci_ipc: __ASSERT on fail to deliver complete message
The hci_ipc sample does not support fragmentation of IPC-messages.
Give an ASSERT if only parts of an IPC-message is delivered.
This would happen for instance when the underlying transport mechanism
cannot hold the complete message.

Background:
The open-amp backend uses RPMSG_BUFFER_SIZE=512

Most applications and controllers use HCI-packets which are at most
255 bytes. In some cases a controller may deliver HCI-packets beyond
255 bytes.

This may for instance be the case if the controller delivers large ISO
SDUs as a single HCI-packet.

Signed-off-by: Johan Stridkvist <johan.stridkvist@nordicsemi.no>
2025-06-17 16:09:17 +02:00
Benjamin Cabé
639cb9b3bc tests: unit: util: increase coverage of utf-8 utils
Test all possible UTF-8 sequence lengths for utf8_trunc()

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:09:06 +02:00
Benjamin Cabé
f899ff2475 include: util: fix doxygen comment for utf8_trunc
Properly format code block

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:09:06 +02:00