Compare commits

..

1108 Commits

Author SHA1 Message Date
Tomi Fontanilles
cef5c14c1e manifest: tf-m: update to 2.1.4
From 2.1.2.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2026-01-13 09:20:16 -05:00
Stephanos Ioannidis
011d1dcf1e ci: twister: Trigger on pull_request event
As of 2025-12-08, GitHub no longer allows `pull_request_target` events to
be triggered from non-default branches [1] and this effectively rendered
the `pull_request_target` trigger for the Twister workflow in the
v3.7-branch unfunctional.

This commit reworks the Twister workflow to trigger on the `pull_request`
event instead of the `pull_request_target` event to work around the above
issue; as part of this, the Elasticsearch test result upload step, which
requires a secret access and hence `pull_request_target`, is dropped.

[1] https://github.blog/changelog/2025-11-07-actions-pull_request_target-and-environment-branch-protections-changes/

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-12-12 10:09:00 -05:00
Mathieu Choplain
c3be04dc03 drivers: udc: stm32: fix clock configuration for STM32F7 w/ USBPHYC
OTGHS using the USBPHYC on STM32F723 and some STM32F730 requires
special clock configuration to work.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-10 15:32:01 -05:00
Mathieu Choplain
8e658b51cb drivers: usb: dc: stm32: fix clock configuration for STM32F7 w/ USBPHYC
OTGHS using the USBPHYC on STM32F723 and some STM32F730 requires
special clock configuration to work.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-10 15:32:01 -05:00
Robert Lubos
2dd00c4204 net: websocket: Fix truncated string warning on copying
WS_MAGIC is a constant string and when calculating lengths for copying
we always exclude the NULL terminator. In result, using strncpy() for
copying can generate a warning about truncated string, as WS_MAGIC will
always be truncated from the NULL terminator. Therefore replace
strncpy() with memcpy() as it seems more appropriate for this case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 8b91d3abc3)
2025-12-10 15:26:47 -05:00
Fabian Blatz
8220fd3785 modules: lvgl: Prevent false pointer input events
Fixes an issue where input events which have the sync flag set but are
neither X/Y coordiante updates nor press/release updates triggers a false
reporting of input to LVGL.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
(cherry picked from commit 25d96b2589)
2025-12-04 17:09:24 -05:00
Sudan Landge
483124b36a arch: arm: fix start of the privileged stack
Make sure that arch.mode is set with appropriate flags before setting up
the privileged stack start.

Fixes #99895

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit 9962bc12cf)
2025-12-02 12:19:23 -05:00
Robert Lubos
0004e41a5d net: dns: Fix potential buffer overflow when unpacking labels
As the loop unpacking the DNS name from records checks the current
label length on each iteration, it's also needed to update the remaining
buffer length on each iteration, otherwise the buffer length checks
doesn't work as expected.

Additionally, the remaining buffer checks while technically worked, they
were conceptually wrong and unintuitive. The buf->data pointer doesn't
move, so comparing against this pointer when adding new labels doesn't
make sense. It's more intuitive to simply compare the label size vs
the remaining buffer space.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 7bd45cd39b)
2025-12-01 07:32:01 -05:00
Valerio Setti
5ef39dbc2c doc: release-notes: add note for Mbed TLS version bumping to 3.6.5
Update release notes to include changes from Mbed TLS 3.6.4 to 3.6.5.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-12-01 07:30:47 -05:00
Valerio Setti
360a55e652 manifest: mbedtls: bump version to 3.6.5
Update Mbed TLS revision from 3.6.4 to 3.6.5.

Fixes #100227

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-12-01 07:30:47 -05:00
Anas Nashif
58765dff59 release: bump release to 3.7.2-rc1
Mark version as RC1.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-11-14 05:06:36 -05:00
Anas Nashif
2356c09154 doc: update 3.7.2 release notes with fixed bugs
Update release notes for 3.7.2 with all fixed bugs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-11-14 05:06:36 -05:00
Jean Nanchen
5d6cbce872 drivers: i2c: stm32: fix build error after timeout patch
Follow-up to PR #88631: fix missing variable declarations introduced in
the STM32 I2C LL driver after adding timeouts to blocking loops.

The missing declarations caused a build failure when interrupts were
disabled (CONFIG_I2C_STM32_INTERRUPT=n).

Fixes a regression introduced in #88631.

Signed-off-by: Jean Nanchen <jean.nanchen@gmail.com>
(cherry picked from commit bc097a6fe6)
2025-11-12 06:50:07 -05:00
Aditya Bhutada
2b9be29f77 drivers: espi: Add return value to eSPI send_vwire API
Added note about return value to the eSPI send_vwire API in the header:
-ETIMEDOUT & _EINVAL.

Signed-off-by: Aditya Bhutada <aditya.bhutada@intel.com>
(cherry picked from commit 4102010456)
2025-11-12 06:32:23 -05:00
Aditya Bhutada
f9ef3f0427 drivers: espi: espi_mchp_xec: Fix the VW change check time
Adjusted the VW change check timings:
- Polling time changed from 100 uSec to 1 uSec.
- Timeout value changed from 10 mSec to 1 mSec.

This is to achieve the lowest possible pulse width for SCI VW in S0,
while ensuring that the VW change check is still reliable for S0iX
where SoC may take longer to process upstream events.

Also added -ETIMEDOUT error when failure.

Signed-off-by: Aditya Bhutada <aditya.bhutada@intel.com>
(cherry picked from commit 2c36616dd2)
2025-11-12 06:32:23 -05:00
Khaoula Bidani
c186d83613 drivers: gpio: stm32: Fix gpio_pin_get_config
This commit updates the function to only set output-related flags
(GPIO_OUTPUT_INIT_HIGH, GPIO_OUTPUT_INIT_LOW) when the pin
is actually configured as output. For input pins, only GPIO_INPUT and
other relevant flags are set.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
(cherry picked from commit e803a10b91)
2025-11-12 06:31:22 -05:00
Sudan Landge
652de8dfac tests: arm: exclude mps2/an385 on user stack test
Temporarily disable running the user stack tests on mps2/an385 to
unblock ci issues reported in #98494.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit 2408b808d2)
2025-11-12 06:30:53 -05:00
Sudan Landge
3f0f832186 tests: fix arch.arm.user.stack test failure
Fixes #97473 by:
- Marking the test as passed if the hardware executes user threads for a
  while without triggering a stack corruption, instead of waiting
    indefinitely.
- Adding a timeout to ensure the test exists gracefully if the issue is
  not reproduced.

Also fixes a stack corruption issue on QEMU targets, caused by
insufficient stack size and revealed by the timer change.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit a55053b216)
2025-11-12 06:30:53 -05:00
Jukka Rissanen
1f67ed44bb net: context: Make sure TCP allocation is not leaked
If we have allocated a TCP connection, and if after that
we get an error like EADDRINUSE, then we must de-allocate
the TCP connection otherwise there is a buffer leak.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 909710b598)
2025-11-12 06:30:17 -05:00
Jamie McCrae
e7a0c77dd9 doc: hardware: porting: board_porting: Fix outdated merged info
Fixes some information that is very outdated to do with board
Kconfig files, which are not merged, and multiple dts files

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 88176a795d)
2025-11-12 06:26:20 -05:00
Robert Lubos
b06f55f7a4 tests: net: icmp: Add test cases for ICMP family mismatch
Add test cases that respective ICMPv4/ICMPv6 handlers are not called for
packets where address family doesn't match (i.e. malformed ICMPv4 packet
imitating ICMPv6 one).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 486e8247c6)
2025-11-12 06:24:14 -05:00
Robert Lubos
164f7356ff net: icmp: Verify the address family before calling the callback
Check the address family of the packet before passing it to a ICMP
handler, to avoid scenarios where ICMPv4 packet is paseed to a ICMPv6
handler and vice versa.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 587d9e6a4a)
2025-11-12 06:24:14 -05:00
Sudan Landge
e4d3915454 arch: arm: start threads on privileged stack
Use the privileged stack when starting K_USER threads in arch_new_thread().
Threads entering user mode with k_thread_user_mode_enter() keep their
existing flow. To support both cases, z_arm_userspace_enter() now takes an
internal ABI flag (sp_is_priv) indicating whether PSP already points to
the privileged stack.

Also fix calculation of the privileged stack top: use priv_stack_end
directly instead of priv_stack_start + CONFIG_PRIVILEGED_STACK_SIZE, which
failed to account for guard/FPU offsets applied to priv_stack_start.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit 0438b9f29e)
2025-10-20 11:35:50 -04:00
Sudan Landge
1773c944cf arch: arm: switch to privilege stack in SVC handler
Initialize the privilege stack and switch PSP to it early in the SVC
handler to ensure `z_arm_do_syscall` does not start on a user-accessible
stack frame.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit 319c697286)
2025-09-19 13:12:30 -04:00
Sudan Landge
0603419523 boards: arm: mps2: Add dependency to empty_cpu0 for an521/cpu1's app
`west build` does not build the `empty_cpu0` application making
`west build -b mps2/an521/cpu1 -t run` fail because of the missing
empty_cpu0's binary.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit 52151d0b23)
2025-09-19 13:12:30 -04:00
Sudan Landge
3abc5ace7f tests: overwrite return address of stack frame
Introduce a test to overwrite the return address in the exception
stack frame of a lower-priority thread performing an SVC call.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit f80bef31ef)
2025-09-19 13:12:30 -04:00
Ilya Tagunov
ada192a3f2 soc: snps: rmx: replace custom buildlib with generic RMX linker option
Do not use the custom buildlib configuration for the RMX series as it
was replaced with several even more specific configurations in the
recent MWDT release. Pass the generic RMX option to the linker instead.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
(cherry picked from commit 6a427995b0)
2025-09-19 13:11:07 -04:00
Ilya Tagunov
e4f2417e39 arcmwdt: linker: append -Hlld option only for ARC architecture
The option -Hlld of the MWDT linker is relevant only for classic ARC.
It is incompatible with ARC-V platform options like -av5rmx.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
(cherry picked from commit d8a1e858a1)
2025-09-19 13:11:07 -04:00
Jamie McCrae
08f934deab cmake: mcuboot: Add dependency to keys
Adds a dependency that causes CMake to re-configure if the input
key files for MCUboot signing/encryption have changed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 271dbb4015)
2025-09-19 13:09:32 -04:00
Chekhov Ma
f8e980312a drivers: gpio_adp5585: fix input register address
The input register address was somehow missing, fix it.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
(cherry picked from commit 7726b70033)
2025-09-13 21:23:11 -04:00
Chekhov Ma
80f2bfde85 drivers: gpio_adp5585: fix non-contiguous pin layout issue
Fixes #90988. The pin gap handling is wrong in the original code.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
(cherry picked from commit 41950cab0f)
2025-09-13 21:23:11 -04:00
Ilya Tagunov
ae52d17ac0 libc: arcmwdt: grant all threads access to stdio locks
Some of the locks are created in supervisor mode (i.e. stdout one),
but should be accessed from user mode too. Unfortunately, there is
no way to distinguish these locks, so grant the access to all of them
as the actual reads and writes should end up as syscalls anyway.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
(cherry picked from commit e22ca6b132)
2025-09-13 18:15:17 -04:00
Bas van Loon
c847cb7470 fs/ext2: Fix NULL dereference when fs_stat queries root.
When fs_stat() queries the root / mountpoint it should return its root
i_node but instead it tries to return the parent i_node which does not
exist. Fix this by checking if parent is set otherwise return the root
i_node.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/94000.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
(cherry picked from commit 1dcf123e2d)
2025-09-13 18:15:04 -04:00
Ilya Tagunov
cccd50489e linker: arc: add .rodata_in_data section to avoid unexpected placement
The .rodata_in_data section is produced by MWDT toolchain with -Hccm
option enabled. This option moves read-only data from the executable
memory (ICCM) to the data memory (DCCM), improving performance by
reducing conflicts between instruction fetches and data fetches.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
(cherry picked from commit 708c1dc488)
2025-09-13 12:08:27 -04:00
Jamie McCrae
4b84d5569a west.yml: MCUboot synchronization from v3.7-branch
Update Zephyr fork of MCUboot to revision:
  6127fc06a54d7a364626a96a33ae652703b505e4

Brings following Zephyr relevant fixes:

  - 6127fc06 bootutil: Fixed security counter overflow detected to
    late
  - 45f96eb7 boot/boot_serial: build-time skip of the erasing of
    img status page
  - a3166c52 boot: zephyr: boards: nrf52: Fix minimal config
  - 29ea8ef4 boot: zephyr: Remove reference to old Kconfigs
  - 0c1950df boot: bootutil: image_validate: Add error on security
    counter fail
  - 4d2f3b7f bootutil: Remove pointless includes of asn1 headers
  - 9d7d58d9 boot: bootutil: declare fih_panic_loop() as noreturn
  - 11c0611a bootutil: Unify app_max_size() implementations

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-09-13 12:06:04 -04:00
Johann Fischer
1d335dee71 doc: update pyOCD repository links
The repository has been moved to a new organization, see
https://pyocd.io/. Update links to the pyOCD repository.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 617b71bc17)
2025-09-13 12:04:38 -04:00
Jamie McCrae
10c1f871fe mgmt: mcumgr: smp: Fix custom payload size
Fixes an issue when using custom payloads where the size was still
using the zcbor buffer instead of the size of the network buffer

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 13ac8fe1f5)
2025-09-12 14:24:00 -04:00
Jukka Rissanen
70b7e8376c tests/samples: net: Fix the max number of file descriptors
Make sure that CONFIG_ZVFS_OPEN_MAX in the tests and samples is at
least the same value as CONFIG_NET_SOCKETS_POLL_MAX so that we
cannot have more polled sockets than there are available file
descriptors.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 759f3a0c7c)
2025-09-10 10:03:18 -04:00
Jukka Rissanen
cc01bf767a net: dns: Check that dispatcher table is not overflowing
Add CHECKIF() checks that verify that dispatcher table is
not overflowing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 2ff26674a2)
2025-09-10 10:03:18 -04:00
Jukka Rissanen
edcd03d12f net: dns: Increase the size of dispatcher table
The dispatcher table needs to be large enough to have support
for all file descriptor values.

Fixes #79042

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 077dd8f142)
2025-09-10 10:03:18 -04:00
Dominik Ermel
81b6d4f2c9 storage/flash_map: Fix is_in_flash_area_bounds
Prevent possible overflow in is_in_flash_area_bounds while
validating offset and length of an operation.

Fixes #89349

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
(cherry picked from commit 3d4b427245)
2025-09-06 06:37:42 -04:00
Flavio Ceolin
85f003c804 west: mbedtls: Bump to 3.6.4
Bump mbedtls to 3.6.4.

Fixes: #94925

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-09-03 09:13:20 -04:00
Stephanos Ioannidis
9405eaf174 arch: arm: cortex_m: Force literal pool placement in inline asm block
When LTO is enabled, linker may relocate literal pools out of Thumb LDR
instruction's reach causing "offset out of range" errors while linking.

This commit adds `.ltorg` directive in the inline asm blocks where absolute
addresses are loaded using the `ldr` instructions, in order to ensure that
the literal pool containing the absolute addresses are placed near the
`ldr` instructions.

Note that the `.ltorg` directive is recognised by all toolchains supported
by Zephyr and no toolchain abstraction is provided for now.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
(cherry picked from commit d7d3ae5c3b)
2025-08-11 10:05:00 +02:00
Henrik Brix Andersen
f88a83a2db drivers: console: posix_arch_console: remove build warning
Remove build warning when building the posix_arch_console driver with
CONFIG_PRINTK=n and CONFIG_STDOUT_CONSOLE=n.

Fixes: #93790

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
(cherry picked from commit 3eedebe031)
2025-08-11 10:04:15 +02:00
Kevin ORourke
9cd8d8f41d shell: backend: telnet: Don't assert if connection closed
The code in shell_ops.c that calls telnet_write will assert if it
returns non-zero. For a telnet shell it's normal that the
network might disconnect unexepectedly, so that should not
trigger an assert.

Fixes #67637

Link: https://github.com/zephyrproject-rtos/zephyr/issues/67637

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
(cherry picked from commit 3399e0614a)
2025-07-20 20:02:02 -04:00
Eric Mechin
cea4a1949f drivers: flash: STM32WBA flash_stm32wba_fm.c: fix sector erase error
The STM32WBA Flash Manager driver is failing to erase a sector, instead of
erasing one sector, two sectors are erased.
Fix it by correctly calculating the number of sectors to erase

Signed-off-by: Eric Mechin <eric.mechin@st.com>
(cherry picked from commit 62a1b8a306)
2025-07-20 20:01:11 -04:00
Daniel DeGrasse
6239b5740a cmake: arm: linker: remove usage of ld-specific ADDR() function
Remove usage of ld-specific ADDR function within the cmake linker
generator scripting. Since the linker generator scripting doesn't
support MPUs, we can simply set the __ramfunc_region_start symbol to be
equal to __ramfunc_start

Fixes #87200

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
(cherry picked from commit b84076a192)
2025-07-20 19:59:24 -04:00
Daniel DeGrasse
3d955caf3b arch: common: fix copy for ramfunc region during XIP init
ramfunc region is copied into RAM from FLASH region during XIP init. We
copy from the loadaddr of the region, and were previously loading to the
symbol __ramfunc_start. This is incorrect when using an MPU with
alignment requirements, as the __ramfunc_start symbol may have padding
placed before it in the region. The __ramfunc_start symbol still needs
to be aligned in order to be used by the MPU though, so define a new
symbol __ramfunc_region_start, and use that symbol when copying the
__ramfunc region from FLASH to RAM.

Fixes #75296

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
(cherry picked from commit 6023d6a142)
2025-07-20 19:59:24 -04:00
Fabio Baltieri
0ce01a16f2 ci: pr_metadata_check: convert DNM logic to python
GitHub seems to have issue with workflow state caching that causes the
DNM step to not work properly in few cases and not detecting changes in
the DNM tag, forcing people to mess with tags or close/opening PRs,
which in turns restarts all workflows.

Convert the script to Python so that the tag data is guaranteed to be
fresh.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-07-20 19:58:54 -04:00
Anas Nashif
944d900fa6 ci: workflows: rename do_not_merge workflow
Add more functionality to the workflow, it is not only about not-merging
anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-20 19:58:54 -04:00
Jamie McCrae
1ddf975853 west.yml: MCUboot synchronization from v3.7-branch
Update Zephyr fork of MCUboot to revision:
  7a29b5a6a10f9179cac3935645c2a1356dafb2b6

Brings following Zephyr relevant fixes:

  - 70ad2d44 boot: bootutil: Fix serial recovery issues
  - 4e659a94 boot: bootutil: Fix wrong define for single loader
    mode
  - 8f6f4b4b boot: bootutil: Fix single loader trailer size
  - 99cecb5a boot: boot_serial: Fix wrong slot ID for hook calls
  - 3519605c zephyr: cleanup removed
    CONFIG_BOOT_MGMT_CUSTOM_IMG_LIST
  - 86dc36ed boot_serial: Avoid re-initializing state in
    boot_image_validate_encrypted
  - 16472e08 boot_serial: Initialize a bootloader state for bs_list
    and bs_set
  - 5ee8ede0 zephyr: Fix pinreset trigger
  - f448629c bootutil: boot_decrypt_key: Only one
    bootutil_hmac_sha256_drop needed
  - 2f5d6bf9 imgtool: fix dependency on click version
  - 50c14ceb boot: bootutil: bootutil_misc: Fix max image size for
    single images
  - 18d9df1f bootutil: Fix crash when bootutil_sha_init() is called
    in loop
  - c2f2f90d boot: bootutil: Only update the security counter for
    confirmed images
  - 5a7ee345 boot: bootutil: Fix max image size computation for
    swap-move/swap-offset
  - 116925f7 boot/zephyr/main: fix placement of pointer to arm
    vector
  - b4cff578 boot: bootutil: swap_scratch: Fix issue with bricking
    device
  - 480464d2 boot: bootutil: Refactor erase functionality to fix
    watchdog feeding
  - cc38cc27 boot: Use boot erase function instead of flash erase
    function
  - bb148939 boot: zephyr: flash_map: Fix missing include
  - 51620768 boot: boot_serial: Fix issue with CBOR and setting
    image state
  - a277cf03 zephyr: Fix trailer size computation for swap-scratch
  - ac0ac75e zephyr: Fix TLV area was included in trailer size when
    rounding up
  - 25922090 boot: bootutil: swap_move: Fix maximum application
    size

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-04 17:23:06 +02:00
Jamie McCrae
3cd7ed6dc8 manifest: Updated trusted-firmware-m
Updates TF-M to bring in flash function cherry pick

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-07-04 17:23:06 +02:00
Kalle Kietäväinen
c291ed46f9 tests: kernel: metairq: Ensure meta-IRQ can preempt a cooperative thread
The intention of the test is to have a meta-IRQ preempt a cooperative
thread, then ensure the same cooperative thread is resumed back to instead
of a higher priority thread. Thus, the test needs to assert that the lower
priority cooperative thread is not yet complete when it makes the higher
priority thread ready to run.

This change reveals bugs like #80574, where the meta-IRQ is unable to
preempt a cooperative thread.

Signed-off-by: Kalle Kietäväinen <kalle.kietavainen@silabs.com>
(cherry picked from commit 52b8e3d370)
2025-07-03 16:27:46 -04:00
Kalle Kietäväinen
e011c60592 Revert "arch: arm: cortex_m: Only trigger context switch if thread is preemptible"
This reverts commit 42036cdbca.

Architecture specific code should not do preemption checking before context
switch. This is already handled by the scheduler, so duplicating it would
be redundant and error prone. These checks used to be necessary, but the
scheduler has been rewritten since then and the checks were removed in
3a0cb2d35d (kernel: Remove legacy preemption checking, 2018-05-23).

The check this reverts was also incorrect, as it didn't take scheduler
locking nor meta-IRQs into account.

Fixes #80574

Signed-off-by: Kalle Kietäväinen <kalle.kietavainen@silabs.com>
(cherry picked from commit d929b8a9fa)
2025-07-03 16:27:46 -04:00
Joel Guittet
f7a2eb9f69 eswifi: fix include path to use tls credentials
Include path is missing when CONFIG_TLS_CREDENTIALS is set.

Fixes #92243

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2025-07-01 16:04:15 -04:00
Benjamin Cabé
018d91a02e doc: _templates: show correct version in sidebar in case of releases
Ensure that version indicator in sidebar is correct in case of releases.

Fixes zephyrproject-rtos/zephyr#91799.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit bbfaf8adec)
2025-06-27 09:08:48 -10:00
Benjamin Cabé
5e6962cefb boards: seagate: legend: Add board revision configurations
board.yml file was missing the list of custom revisions of this board.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit 9c803c02b5)
2025-06-18 09:21:05 -04:00
Pieter De Gendt
30cc718855 net: lib: coap: Return an error on removing a non-existing observer
If we're parsing a CoAP request with an observe option of '1', but there is
no matching observer, return an error instead of returning a zero.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
(cherry picked from commit d5931bae93)
2025-06-18 09:20:19 -04:00
Piotr Ciura
be9fab39b9 drivers: usb: Prevent from perpetual locked state
The USB CDC driver is unable to process any bulk IN transfers
after receiving spurious 'Clear Feature - Endpoint Halt' request
from host due to perpetual locked state caused by previously
scheduled transfer, that will never be finished, as the endpoint's state
is set to NAK. Fix by ignoring spurious request.

Signed-off-by: Piotr Ciura <piotr.ciura@hidglobal.com>
(cherry picked from commit 29a191ad38)
2025-06-18 09:19:23 -04:00
Jun Lin
528d13912f drivers: watchdog: npcx: fix T0 timer reload procedure
The correct procedure to reload the T0 timer is:
    1. Load TWDT0 register with the new value or write 1 to RST bit in
       T0CSR register to load the old value.
    2. Wait until RST bit in T0CSR register becomes 1.
    3. Wait until RST bit in T0CSR register becomes 0.
The current watchdog driver misses step 2.
Fix the issue in this commit.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
(cherry picked from commit 6c3b617bca)
2025-06-18 09:18:25 -04:00
Jun Lin
bc26e1a407 drivers: flash: npcx: add k_usleep when polling busy status
Adding k_usleep while polling the flash's busy status yields the CPU
resource, giving lower-priority threads the opportunity to run.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
(cherry picked from commit dee7927a21)
2025-06-18 09:17:40 -04:00
Yong Cong Sin
7cfc15395d logging: log_cmds: init uninitialized backend on log_go()
For backends that do not autostart themselves, initialize
& enable them on `log backend <log_backend_*> go`, so
that they function properly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-06-18 09:15:20 -04:00
Yong Cong Sin
97976e7421 logging: init backend id regardless of autostart
The `id` is basically a compile-time constant. Setting it every
time the backend is enabled is unnecessary. Instead, set it on
`log_core_init()` regardless of whether or not it requires to be
`autostart`ed.

Fixes an issue where the `filter_get`/`filter_set`
accessed the wrong index and displayed the wrong log level when
user accesses the status of an uninitialized backend via:
`log backend <uninitialized_backend> status`.

Also fixes an issue when user tries to list the backends via:
`log list_backends`, where all uninitialized backends will have
ID = 0.

This commit is a combination of 8dd9d92 & dd9fd7d.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-06-18 09:15:20 -04:00
Jean Nanchen
e2444509ab drivers: i2c: stm32: add timeout to avoid infinite loop
Fix issue where STM32 I2C LL driver could block forever when SDA and SCL
are shorted and interrupts are disabled (CONFIG_I2C_STM32_INTERRUPT=n).

Added timeouts to all blocking wait loops in the STM32 LL I2C driver to
avoid indefinite blocking.

Fixes #88506

Signed-off-by: Jean Nanchen <jean.nanchen@hevs.ch>
(cherry picked from commit 2066b8c7b9)
2025-06-18 09:14:13 -04:00
Glenn Andrews
b45ca8df4c boards: disco_l475_iot1: fix arduino_i2c assignment
0f05f58bf5 assigned the `arduino_i2c` to the incorrect pins for the Arduino UNO connector. This assigns them back.

signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
(cherry picked from commit a2da571172)
2025-06-17 16:04:13 +02:00
Fabian Blatz
9a69db7201 modules: lvgl: Register print callback after lv_init
Move initialization of the print callback handler after calling lv_init, as
the latter zeroes the global callback structure.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
(cherry picked from commit 5cffb8e5a6)
2025-06-04 18:40:43 -04:00
Jun Lin
e3248cda99 driver: timer: npcx: bypass timer counter reading issue
Originally, when the timer's source clock is 32.768 kHz, the timer driver
uses two consecutive reads to ensure the timer reading is correct.
However, it is not robust enough due to an asynchronous timing issue in
the chip. The workaround is to add at least two NOPs between the
LDR and CMP instructions. This commit implements the workaround in the
assembly code to ensure it is not affected by the compiler toolchain
or optimization flags.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
(cherry picked from commit 2bda7b87ee)
2025-06-04 18:39:49 -04:00
Jun Lin
4286a3c7a5 driver: timer: npcx: fix possible vulnerabilities
This commit fixes some potential leakage in the timer driver.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
(cherry picked from commit bdf0500497)
2025-06-04 18:39:49 -04:00
Henrik Brix Andersen
8b7305d22f tests: drivers: virtualization: qemu_kvm_arm64.overlay: fix SPDX license
"UNLICENSED" is not a valid SPDX License Identifier. Remove it from the
list and just keep "Apache-2.0".

Fixes: #89413

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
(cherry picked from commit b240f11592)
2025-06-04 18:39:26 -04:00
Emil Gydesen
9844851b3e Bluetooth: BAP: SD: Fix missing clear of notify flag on reject
For add and modify source, if the request was rejected by the
application layer, the BASS_RECV_STATE_INTERNAL_FLAG_NOTIFY_PEND
would be set but not unset.

Add unsetting the flag on reject.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-04 17:03:34 +02:00
Josh DeWitt
f630c6f60f kernel/sched: Re-sort waitq on priority change
k_thread_priority_set() on a pended thread wasn't re-inserting into the
waitq, causing the incorrect thread to run based on priority. When using
the scalable waitq config, this can also break assumptions of the tree
and leave the owner of a waitq still being in the waitq tree, cycles in
the tree, or a crash.

Remove and re-add a thread to a waitq to ensure the waitq remains in
order and the tree's assumptions are not violated.

To illustrate the issue, consider 4 threads in decreasing priority
order: A, B, C, and D along with two mutexes, m0 and m1. This is
implemented in the new complex_inversion mutex_api test.
1. D locks m1
2. C locks m0
3. C pends on m1
4. B pends on m1
5. A pends on m0, boosts C's priority, now tree on m1 is not sorted
6. D unlocks m1, left-most thread on tree is B. When removing B from
   tree it cannot be found because it searches to the right of C due to
   C's boosted priority when the node is actually on the left. rb_remove
   silently fails.
7. B unlocks m1, left-most thread on tree is still B and it tries to
   unpend itself, resulting in a NULL pointer dereference on
   B->base.pended_on.

Signed-off-by: Josh DeWitt <josh.dewitt@garmin.com>
(cherry picked from commit c05cfbf15e)
2025-05-31 06:38:41 -04:00
Robert Lubos
be6b87c005 tests: net: dhcpv4: client: Verify Request xid
According to RFC 2131 Request message Exchange ID should be the same as
the one received in the Offer message from the server. Modify test to
verify that.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 1c46508c54)
2025-05-28 13:20:11 -04:00
Robert Lubos
32d5b59a18 tests: net: dhcpv4: client: Verify that Pad option is handled
Add Pad option to the DHCP packets generated by the fake server, to
verify the client processes them correctly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit eabeb84350)
2025-05-28 13:20:11 -04:00
Robert Lubos
2a5b891a79 net: dhcpv4: client: Do not generate new xid for Request message
According to RFC 2131, DHCP clients should use the same xid as
received in the Offer message when sending DHCP Requests. Therefore,
when generating DHCP Request message, the xid value should not be
incremented.

One vague topic is whether the xid value should be updated when
sending Requests from Renewing or Rebinding states, however RFC makes no
exception for those states, and other implementations (dhclient, lwip)
seem to reuse the same xid in such cases, so comply with this behavior.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 45a1cf7fcc)
2025-05-28 13:20:11 -04:00
Robert Lubos
db8c09832a net: dhcpv4: client: Handle Pad option
Pad option (option code 0) can be present in between other options for
alignment. The option has a fixed 1-byte length (i. e. no length field),
therefore it did not fall under the common processing code for
unrecognized options (which include the length field at the second
byte). Therefore, not processing this option explicitly could disturb
other options processing, as the parser would wrongly interpret the next
option code as the length field. This commit adds Pad option handling to
fix the issue.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 9d54465559)
2025-05-28 13:20:11 -04:00
Robert Lubos
532d11bf48 net: dhcpv4: client: Prevent asserting on malformed message
In case the received DHCP message is malformed and contains invalid
message type, the code responsible for matching message type with a
string would assert. This shouldn't be the case that external conditions
(like receiving malformed packet) trigger asserts in the system.
Therefore modify that code, to return "invalid" string in such case
instead.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit f4408c088c)
2025-05-28 13:20:11 -04:00
Tom Chang
3ef6fe9481 mgmt: ec_host_cmd: npcx: workaround for backend SHI
There is an issue on the SHI hardware peripheral to detect CS
rising/failing with bits CSnFE/CSnRE in the EVSTAT2 register in
npcx9m7fb chip. This commit workarounds it by using MIWU to detect the
CS rising and failing.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
(cherry picked from commit 0726198776)
2025-05-28 12:41:56 -04:00
Tom Chang
46edf3b42e dts: npcx: change the default memory configuration of npcx9m7fb
The internal flash size of npcx9m7fb is 512KB. Reduce the default
Code RAM size from 320KB to 256KB because the Code RAM size is limited
by FLASH_SIZE/2 in the Chromebook EC application.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
(cherry picked from commit f2e11e424e)
2025-05-28 12:41:56 -04:00
Jukka Rissanen
815102387c net: http: server: Select POSIX_C_LIB_EXT instead of FNMATCH
The CONFIG_POSIX_C_LIB_EXT will get support for fnmatch() function.
The old CONFIG_FNMATCH is deprecated.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-05-28 12:41:37 -04:00
Jukka Rissanen
5b82a68ab1 net: http: server: The detail length of wildcard detail was wrong
The path length of the detail resource was not set properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-05-28 12:41:37 -04:00
Tomi Fontanilles
cab2f9d27f doc: releases: add entry for TF-M 2.1.2 update
Document the update of TF-M to 2.1.2.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-04-30 08:45:49 +02:00
Tomi Fontanilles
ff7e187124 modules: tf-m: update to 2.1.2
Update TF-M to 2.1.2 from version 2.1.1.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-04-30 08:45:49 +02:00
Jamie McCrae
610a26ab83 manifest: Remove wrong remote
Removes a remote which was accidentally included

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-16 05:18:16 -04:00
Jamie McCrae
92e879b8a2 west.yml: MCUboot synchronization from v3.7-branch
Update Zephyr fork of MCUboot to revision:
  58538ddfe21843edb39d7e7502812e61696e55c4

Brings following Zephyr relevant fixes:

  - 58538ddf swap_move: correct appsize calcs and warning
  - 5ce8b311 zephyr: flash map: fix comparison signedness
  - 7d4de010 boot: bootutil: Fix usage of flash_area object
  - 61e1264b boot: bootutil: Take into account scratch trailer
    when computing max image size
  - 1a50ec2f boot: bootutil: Ensure the whole trailer is erased
    when it is large
  - c81ba032 boot: bootutil: Fix scratch trailer overwritten if
    image trailer is large
  - 913e9162 boot: bootutil: Fix underflow in swap-scratch when
    trailer is large
  - 509834cd boot: bootutil: Fix invalid last sector computation
    for swap-scratch
  - 834a0afa mynewt: Add flash_sector_get_size
  - ad7a2dd9 doc: imgtool: importance of clear flag
  - 50b727e7 docs: release-notes: Add note on fix for revert issue
  - 014d436c boot: bootutil: loader: Fix issue with stuck revert
  - 0c3ecbef boot: bootutil: Refactor some functions to have state
  - 78bb9c09 zephyr: Fix image encryption configuration for
    mbedTLS.
  - d8647ed3 zephyr: Fix usage of CONFIG_MBEDTLS_BUILTIN and ASN1
  - 41c82413 bootutil: Add missing MBEDTLS_ASN1_PARSE_C
  - 6f61d4fc zephyr: Remove scratch from
    flash_area_id_from_multi_image_slot
  - f48f5c5a boot: boot_serial: Fix uninitialised variables for
    upload
  - f40c2430 added missing MCUBOOT_VERSION_TWEAK in Zephyr port
  - a49a0337 boot: bootutil: loader.c: Add check if has upgrade
    before pushing state change
  - 664093d0 bootutil: Fix device brick after power failure during
    swap-move revert
  - c50b332b bootutil: Fix the reading of image headers after
    partial swap completion
  - 172694ea boot: zephyr: Fix
    sample.bootloader.mcuboot.usb_cdc_acm_recovery
  - 226a9a70 Allow bootstrapping for multiple images

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-15 15:35:12 -04:00
Ivan Wagner
8bb572c431 drivers: sensor: meas: ms5837 supporting 02 and 30 variants via dt
Fixes #87870

This patch adds support via dt compatible property.

Signed-off-by: Ivan Wagner <ivan.wagner@tecinvent.ch>
2025-04-14 15:10:02 -04:00
Chekhov Ma
6eda124b70 drivers: gpio: adp5585: fix wrong reg during pin configure
The ADP5585_GPO_OUT_MODE_A is used when configuring initial output
during pin configuration, causing pins configured HIGH is incorrectly
configured as open-drain. Replacing the reg with ADP5585_GPO_DATA_OUT
fixes the issue.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
(cherry picked from commit c87900aa40)
2025-04-14 15:03:49 -04:00
Jukka Rissanen
f23e4e1d34 tests: net: dns: packet: Add test case for compression bit in CNAME
Add checks that we will be able to catch invalid compression bit in
response CNAME handling.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-14 15:01:39 -04:00
Jukka Rissanen
92602700dd net: dns: Check compression flag properly
Allow only 0xc (0b11) as two highest bit to mark the compression
when parsing the CNAME response. See RFC 9267 ch. 2 for details.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-14 15:01:39 -04:00
Jukka Rissanen
3f751d85fb tests: net: dns: packet: Add test case for recursive name in CNAME
Add checks that we will be able to catch recursive name pointers and
abandon the response for CNAME handling.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-14 15:01:39 -04:00
Jukka Rissanen
1500de818b net: dns: Check recursive pointers for CNAME handling
Make sure that the CNAME handling checks recursive name pointers
and fails the response if recursion is detected.
See RFC 9267 ch. 2 for details.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-14 15:01:39 -04:00
Jukka Rissanen
9adcb8db4c net: dns: Use DNS_EAI_SYSTEM error properly
The DNS_EAI_SYSTEM error value tells that the errno value
contains the actual system error value. So set the errno
properly when there is a system error.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-14 15:01:39 -04:00
Luis Ubieda
446d227b19 rtio: workq: Select Early P4WQ threads init
Otherwise the RTIO Workqueue is not functional for devices during init.

An example of this issue is devices using SPI transfers with default
spi_rtio.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
(cherry picked from commit 2ce2794987)
2025-04-14 07:03:56 -04:00
Luis Ubieda
5e6362ba52 p4wq: Add Kconfig to perform early init on threads
In order to make them functional for devices during init. Default
behavior is to keep late initialization, as before.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
(cherry picked from commit ec45b29ea3)
2025-04-14 07:03:56 -04:00
Anas Nashif
8912bb475d twister: tests: set ZEPHYR_BASE using export
Use export to set ZEPHYR_BASE.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Lukasz Mrugala
fe674b4d11 twister: Remove C object buildlist from -i test
The disparity in C objects built causes
the test to fail.
This removes those lines from the log
to inline log comparison.

Let's disable it in the relevant test.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
a2c712a351 twister: tests: do not error on warnings when testing asan
In case of warning turning into errors which is expected, do not error
out and continue with execution.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
2a109583d2 ci: twister/blackbox: pin pip modules
Rework workflow to use pinned python packages and zephyr setup action.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
16a31355a7 ci: twister/tests: install pinned pip packages
Install packages from scripts/requirements-actions.txt.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
a4f72e825f ci: twister_blackbox: do not fetch HALs and unused modules
Those would fill the runner disk space and would abort the workflow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
9b03f0318f ci: update workflows to use docker v0.26.18
This docker image version contains the 0.16.9 SDK which is the supported
SDK version for v3.7.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
e87830437a ci: remove workflow from branch
Remove action intended to run on main branch and avoid unneeded
exposure.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
7604bf9b2d ci: pin more actions across various workflows
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
5aaf347fa8 ci: pin backport action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
046d6183a4 ci: pin cache action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
6cf7ea3cd0 ci: pin stale-workflow-queue-cleanup action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
ff2ed0317b ci: pin zephyrproject-rtos/action_scancode action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
a2d2af0375 ci: pin dawidd6/action-download-artifact action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
50f295f76f ci: pin codecov/codecov-action action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
c29efe3d2b ci: pin tj-actions/changed-files action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
3232f97f1c ci: pin EnricoMi/publish-unit-test-result-actiom action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
78b9235f37 ci: pin actions/download-artifact action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
b624dced8a ci: pin actions/upload-artifact action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
2e6ed1656b ci: pin zephyrproject-rtos/action-zephyr-setup action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
11560e288c ci: pin actions/setup-python action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
b15fb08b73 ci: pin actions/checkout action
Pin actions to a specific sha to avoid supply chain attacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
5a718811b3 ci: use gh managed tokens in workflows
Do not use custom tokens, rely on GH provided and managed tokens.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Anas Nashif
dd2bdfbcec ci: remove all workflows intended for main branch
Reduce exposure by removing all those workflows that do not make sense
on a release branch.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-14 06:28:39 -04:00
Jun Lin
1be7a2044c soc: npcx: scfg: select host interface type in global
The Host Interface Type in the DEVCNT register sets the HIF type
(either eSPI or LPC).
Currently, it is configured in the host-interface-related drivers like
eSPI or SHI. However, some I/O pads sourced from VHIF in the other
modules such as GPIO and I3C also rely on this field. It might be
problematic when using those I/Os without enabling eSPI or SHI drivers.
This commit moves the setting from the specific drivers to the global
system initialization function scfg_init().

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
(cherry picked from commit 1aff275642)
2025-04-13 13:40:39 +02:00
Robert Lubos
66acbd5332 net: coap_client: Fix CoAP client thread priority
The default thread priority for the CoAP client thread is set to
NUM_PREEMPT_PRIORITIES which is not a valid thread priority, as the
lowest application thread priority is actually
NUM_PREEMPT_PRIORITIES - 1. Because of this, CoAP client library gave an
assert on boot if assertions were enabled.

Kconfig does not allow for arithmetics when setting integer defaults,
therefore handle this at the preprocessor stage by limiting the actual
priority assigned to the CoAP client thread to a valid range.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit cf0b6068d2)
2025-04-13 13:40:21 +02:00
Tomi Fontanilles
06cec72faf modules: mbedtls: update to 3.6.3
Update Mbed TLS to 3.6.3.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-04-13 13:40:00 +02:00
Tomi Fontanilles
80c0e7d324 doc: releases: add release notes template for 3.7.2
Add the boilerplate for 3.7.2.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-04-13 13:40:00 +02:00
Michal Myczkowski
bf440dec23 dts: atmel sam4s: fix sram address
Changed Atmel SAM4S series sram adress from 0x20100000 to 0x20000000. Now
it matches what is in Atmel SAM4S Series Datasheet chapter 8
section 1.1 Internal SRAM:

https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/Atmel-11100-32-bitCortex-M4-Microcontroller-SAM4S_Datasheet.pdf#G1.1069257

Fixes #85211.

Signed-off-by: Michal Myczkowski <mmyczkowski@antmicro.com>
(cherry picked from commit 3a53845fad)
2025-04-01 09:56:47 -04:00
Benjamin Cabé
0e686addf7 doc: Update Graphviz font configuration
Customize Graphviz dot rendering to use same font stack as our Sphinx
theme.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit c0f76d9363)
2025-04-01 09:55:17 -04:00
Benjamin Cabé
f639801afa doc: make graphviz diagrams look good in dark theme
Add filter to invert colors in dark mode.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit fd919b5160)
2025-04-01 09:55:02 -04:00
Anas Nashif
81337c6880 ci: assigner: harden workflow
Various improvements:

- pin actions and pip packages
- set permissions
- use gh token instead of custom token.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-01 09:53:17 -04:00
Anas Nashif
d4b62d497a ci: add requirements for gh action
Add pinned python requirements for github actions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-01 09:53:17 -04:00
Jukka Rissanen
7fb377a30f net: if: Release the interface lock early when starting IPv4 ACD
In order to avoid any mutex deadlocks between iface->lock and
TX lock, release the interface lock before calling a function
that will acquire TX lock. See previous commit for similar issue
in RS timer handling. So here we create a separate list of ACD
addresses that are to be started when network interface comes up
without iface->lock held.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-01 09:52:53 -04:00
Jukka Rissanen
1ab995a235 net: if: Release the interface lock early when starting IPv6 DAD
In order to avoid any mutex deadlocks between iface->lock and
TX lock, release the interface lock before calling a function
that will acquire TX lock. See previous commit for similar issue
in RS timer handling.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-01 09:52:53 -04:00
Jukka Rissanen
9d55a6010a net: if: Release the interface lock early in IPv6 RS timeout handler
The net_if.c:rs_timeout() is sending a new IPv6 router solicitation
message to network by calling net_if_start_rs(). That function will
then acquire iface->lock and call net_ipv6_start_rs() which will try
to send the RS message and acquire TX send lock.
During this RS send, we might receive TCP data that could try to
send an ack to peer. This will then in turn cause also TX lock
to be acquired. Depending on timing, the lock ordering between
rx thread and system workq might mix which could lead to deadlock.
Fix this issue by releasing the iface->lock before starting the
RS sending process. The net_if_start_rs() does not really need to
keep the interface lock for a long time as it is the only one sending
the RS message.

Fixes #86499

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-01 09:52:53 -04:00
Jukka Rissanen
6ce77c29e6 net: if: Documentation missing for IPv4 ACD timeout variable
Add documentation for ACD timeout variable as it was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-01 09:52:53 -04:00
Jukka Rissanen
60e664181c net: if: Documentation missing for IPv6 DAD start time variable
Add documentation for DAD start time variable as it was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-01 09:52:53 -04:00
Dong Wang
a5880423f6 logging: Ensure atomic update of log filter slot in LOG_FILTER_SLOT_SET
Replaced the read-modify-write sequence with a single read and write
operation, preventing the intermediate value is wrongly used to filter
out logs of another thread with higher priority that preempts the current
thread.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
(cherry picked from commit 872f363696)
2025-04-01 09:51:08 -04:00
Jukka Rissanen
5e5baa5ddc net: core: Free packet properly if TTL/hop limit is 0
We drop the packet if TTL or hop limit is 0, but we should
also unref the packet in this case because we return 0 to
the caller which is not then able to free the packet because
it thinks that the packet was sent properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-01 09:50:39 -04:00
Robert Lubos
7dcd584429 net: if: Setup DAD timer regardless of DAD query result
In rare occasions when sending DAD NS packet fails, we should still
setup the DAD timer, unless we implement some kind of more advanced
retry mechanism. If we don't do that, the IPv6 address added to the
interface will never be usable in such cases.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 008a7ca202)
2025-03-02 16:25:03 -05:00
Robert Lubos
64fa3d8923 net: if: Clear neighbor cache when removing IPv6 addr with active DAD
DAD creates an entry in the neighbor cache for the queried (own)
address. In case the address is removed from the interface while DAD is
still incomplete, we need to remove the corresponding cache entry (just
like in case of DAD timeout) to avoid stale entries in the cache.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit a09fd8e97f)
2025-03-02 16:25:03 -05:00
Robert Lubos
7e8af7c380 tests: net: conn_mgr: Use valid LL address in tests
Using L2 address of length 1 (invalid/unsupported one) confused IPv6
layer during LL address generation - since that length was not a valid
one, the address was not initialized properly and a part of it was set
semi-random. This could result for example in filling out the neighbor
tables.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 3089a5d116)
2025-03-02 16:25:03 -05:00
Derek Snell
120267bc34 soc: nxp: rw: Update system core clock frequency
After updating the main_clk, need to update the frequency tracked in
HAL MCUXpresso SDK framework for other drivers.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
(cherry picked from commit 793e44afdd)
2025-03-02 16:24:06 -05:00
Jukka Rissanen
0ea086845b net: Update IP address refcount properly when address already exists
If an IP address already exists when it is tried to be added to the
network interface, then just return it but update ref count if it was
not updated. This could happen if the address was added and then removed,
but for example an active connection was still using it and keeping the
ref count > 0. In this case we must update the ref count so that the IP
address is not removed if the connection is closed.

Fixes #85380

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-02-20 21:16:47 -05:00
Robert Lubos
764bc21073 net: iface: Add missing interface mutex locks
net_if_ipv4/6_addr_rm() were missing the iface mutex lock, this commit
adds it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-02-20 21:16:47 -05:00
Robert Lubos
77775858cd net: ipv6: Fix Neighbor Advertisement processing w/o TLLA option
According to RFC 4861, ch. 7.2.5:

 "If the Override flag is set, or the supplied link-layer address
  is the same as that in the cache, or no Target Link-Layer Address
  option was supplied, the received advertisement MUST update the
  Neighbor Cache entry as follows

  ...

  If the Solicited flag is set, the state of the entry MUST be
  set to REACHABLE"

This indicates that Target Link-Layer Address option does not need to be
present in the received solicited Neighbor Advertisement to confirm
reachability. Therefore remove `tllao_offset` variable check from the
if condition responsible for updating cache entry. No further changes in
the logic are required because if TLLA option is missing,
`lladdr_changed` will be set to false, so no LL address will be updated.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 02c153c8b1)
2025-02-20 20:40:15 -05:00
Robert Lubos
816b782299 net: ipv6: Send Neighbor Solicitations in PROBE state as unicast
According to RFC 4861, ch. 7.3.3:

 "Upon entering the PROBE state, a node sends a unicast Neighbor
  Solicitation message to the neighbor using the cached link-layer
  address."

Zephyr's implementation was not compliant with behavior, as instead of
sending a unicast probe for reachability confirmation, it was sending a
multicast packet instead. This commit fixes it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 8cd213e846)
2025-02-20 20:40:15 -05:00
Robert Lubos
8e4856c913 net: ipv6: Fix neighbor registration based on received RA message
When Router Advertisement with Source Link-Layer Address option is
received, host should register a new neighbor marked as STALE
(RFC 4861, ch. 6.3.4). This behavior was broken however, because
we always added a new neighbor in INCOMPLETE state before processing
SLLA option. In result, the entry was not updated to the STALE state,
and a redundant Neighbor Solicitation was sent.

Fix this by moving the code responsible for adding neighbor in
INCOMPLETE state after options processing, and only as a fallback
behavior if the SLLA option was not present.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit fce53922ef)
2025-02-20 20:40:15 -05:00
Jamie McCrae
32f69a4d8a mgmt: mcumgr: grp: img_mgmt: Fix calling confirm
Fixes calling the registered callbacks for image being confirmed
if the confirmation was not successful

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 98d5aa3792)
2025-02-20 20:39:55 -05:00
Jukka Rissanen
28f139801f net: socket: Release packets in accepted socket in close
If we have received data to the accepted socket, then release
those before removing the accepted socket. This is a rare event
as it requires that we get multiple simultaneous connections
and there is a failure before the socket accept is called by
the application.
For example one such scenario is when HTTP server receives multiple
connection attempts at the same time, and the server poll fails
before socket accept is called. This leads to buffer leak as the
socket close is not called for the accepted socket because the
accepted is not yet created from application point of view.
The solution is to flush the received queue of the accepted socket
before removing the actual accepted socket.

Fixes #84538

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 535e70a298)
2025-02-20 20:39:41 -05:00
Jordan Yates
0e5cda3505 bluetooth: increment BT_BUF_CMD_TX_COUNT
The extended advertising start procedure can consume both command
buffers in a single API call, resulting in `bt_le_create_conn_cancel`
being unable to claim a buffer to terminate the connection request.

Increase the command count if both extended advertising and Bluetooth
central are enabled in an application.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-02-20 20:39:28 -05:00
Jordan Yates
322ec30af3 bluetooth: host: hci_core: add missing NULL check
Add check that the command buffer claimed in `bt_le_create_conn_cancel`
is not `NULL`. Fixes a fault caused by providing the `NULL` buffer to
`bt_hci_cmd_state_set_init`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-02-20 20:39:28 -05:00
Florian Weber
4d489098b1 rtio: workq: bugfix of memory allocation
This commit fixes the bug that the memory of the work request is
freed up in the work handler, before it is not needed anymore by the p4wq.
This is fixed now, by using the new done_handler in the p4wq
for freeing up that memory.

Signed-off-by: Florian Weber <Florian.Weber@live.de>
(cherry picked from commit b55b9ae72b)
2025-02-20 20:39:09 -05:00
Florian Weber
2479683f77 lib: os: p4wq: add done handler
Add an optional handler to the p4wq to give the submitting code
(e.g. rtio workq) a possibility execute code after the work was
succesfully executed.

Signed-off-by: Florian Weber <Florian.Weber@live.de>
(cherry picked from commit 093b29fdb5)
2025-02-20 20:39:09 -05:00
Erwan Gouriou
30102936bc west.yml: hal_stm32: stm32h7: Fix ethernet load issue
Point to fix cherry picked from hal_stm32 main branch to fix
a ethernet load issue.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-02-08 19:46:04 -05:00
Vinayak Kariappa Chettimada
b6c8212c7a Bluetooth: Controller: Fix regression in connection update
The connection event at the connection update instant was
skipped due to previous ticker node in use that is being
stopped was registering a relative occupied time that
overlapped with the new ticker node being started for
scheduling the connection with new interval.

Added mock interface for ticker_stop_abs() hence needed by
the Controller unit testing.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 5dffad061c)
2025-01-29 11:10:55 -05:00
Mayank Narang
8bbbf1d5b6 drivers: sensor: lis2de12: add length check in spi write incr routine
Added a length check in the spi write incr routine to handle both
single and multi byte write operations properly.

Signed-off-by: Mayank Narang <narang.may77@gmail.com>
(cherry picked from commit cb608812cf)
2025-01-29 10:11:57 -05:00
Mayank Narang
ba7c85d6f7 drivers: sensor: lis2de12: fix read accel via spi
The lis2de12 sensor driver spi interface was calling spi read api.
This leads to a single byte operation on reading acceleration data
which is a multi byte operation. Fix it by adding a call to spi read
incr api instead. Added a length check to handle both single and multi
byte read properly.

Signed-off-by: Mayank Narang <narang.may77@gmail.com>
(cherry picked from commit 7b062f5b09)
2025-01-29 10:11:57 -05:00
Jordan Yates
4aa3e56238 net: nsos_sockets: free allocated socket on close
Free the socket object allocated in `nsos_socket_create` when closing
the socket.

Signed-off-by: Jordan Yates <jordan@embeint.com>
(cherry picked from commit c22233a1af)
2025-01-29 10:11:31 -05:00
Jakub Rzeszutko
9cc6307f17 shell: fix unsafe API calls and add configurable autoflush behavior
Fixes an issue where the shell API could block indefinitely when called
from threads other than the shell's processing thread, especially when
the transport (e.g. USB CDC ACM) was unavailable or inactive.

Replaced `k_mutex_lock` calls with an indefinite timeout (`K_FOREVER`)
by using a fixed timeout (`K_MSEC(SHELL_TX_MTX_TIMEOUT_MS)`) in shell
API functions to prevent indefinite blocking.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
(cherry picked from commit b0a0febe58)
2025-01-29 10:11:03 -05:00
Jakub Rzeszutko
2f93ce6c5d shell: add Kconfig option for configurable autoflush behavior
Introduced a new Kconfig option `SHELL_PRINTF_AUTOFLUSH` to allow
configuring the autoflush behavior of shell printing functions.

Updated `Z_SHELL_FPRINTF_DEFINE` to use the
`CONFIG_SHELL_PRINTF_AUTOFLUSH` setting instead of hardcoding
the autoflush behavior to `true`.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
(cherry picked from commit 8991b954bc)
2025-01-29 10:11:03 -05:00
Krzysztof Chruściński
4ef146d12c pm: device_runtime: Fix bitfields misuse
PM_DEVICE_FLAG_ISR_SAFE is an enum and it must be converted to
a bit mask before masking with flags.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
(cherry picked from commit 581c55496d)
2025-01-23 19:58:17 -05:00
Yong Cong Sin
afdd87e509 lib: os: mpsc_pbuf: do not wait when spinlock is held
Check if the spinlock is held before attempting to wait by
taking the semaphore, as that would cause a context switch which
isn't allowed and will trigger an assertion error when
`CONFIG_SPIN_VALIDATE` is enabled.

Logging in spinlock-held context when the log buffer is full can lead
to an infinite assertion error loop, as the logging subsys attempts to
allocate buffer when there's none available, it will try to wait for
one and thus triggers the assertion error, the error message will be
printed through the logging sybsys but there's no buffer available,
so it will try to wait for one and triggers another assertion error..
This loop just goes on and on forever, and nothing gets printed to
the terminal.

Added a test to validate the fix.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Maxim Adelman <imax@meta.com>
(cherry picked from commit 1a578eb72c)
2025-01-23 18:55:08 -05:00
Alberto Escolar Piedras
e6d5b78a24 tests/subsys/lorawan/frag_decoder: Change random seed
These tests are quite sensitive to the exact random sequence.
After a change of the native_sim entropy generation 2 of them
started failing. Let's set a random seed which avoids the failure.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
(cherry picked from commit 64d4fcd8cb)
2025-01-23 18:53:32 -05:00
Alberto Escolar Piedras
d776876a70 drivers: entropy: fix native_posix driver for more than 3 byte requests
Fix the native_posix fake entropy driver for more than 3 byte requests,
and specially for native_sim//64 builds.

The host random() provides a number between 0 and 2**31-1 (INT_MAX),
so bit 32 was always 0.
So when filling a buffer with more than 3 bytes we would be filling
each 4th byte with a byte which always had its MSbit as 0.

For LP64 native_sim//64 builds, this was even worse, as the driver had
another bug where we assumed random() returned the whole long filled,
and therefore all 4 upper bytes would be 0.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
(cherry picked from commit b3407f04e7)
2025-01-23 18:53:32 -05:00
Chen Shu
78f87d566c fs: ext2: Fix nbytes_to_read calculation in ext2_inode_read()
Fix incorrect nbytes_to_read calculation in ext2_inode_read() function.
Previously nbytes_to_read was decremented by read value which caused
incorrect calculation of bytes to read in subsequent iterations.
Now nbytes_to_read is decremented by to_read value which represents
the actual number of bytes read in current iteration.

This fixes potential data corruption issues when reading files from
ext2 filesystem.

Signed-off-by: Chen Shu <751541594@qq.com>
(cherry picked from commit 5a5f05ba4e)
2025-01-23 18:48:11 -05:00
Emil Gydesen
c3e4c50866 samples: Bluetooth: TMAP periph: Handle empty URI string
The supported URI list may be empty which the sample did not
properly support.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-01-23 18:47:24 -05:00
Emil Gydesen
b1dc99d0c1 Bluetooth: TBS: Return empty string instead of NULL for empty data
If we read an empty GATT characteristic that should contain a
string value, then we provide the empty string, instead of NULL,
to be true to the API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-01-23 18:47:24 -05:00
Luis Ubieda
2aee9e34ed samples: sensor🐚 test all channels
Loop through all of the channels and make sure that each
channel has an output.

Changes in patch originally present in #72972.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Luis Ubieda <luisf@croxel.com>
(cherry picked from commit 1e64d7bea1)
2025-01-23 09:19:03 -05:00
Luis Ubieda
9c24c4a998 tests: sensor: generic_test: Remove special-handling for axis values
Since now they're treated as q31 values when individually queried, as
opposed to lump them in a triplet.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
(cherry picked from commit 19a4261517)
2025-01-23 09:19:03 -05:00
Luis Ubieda
1443e29701 sensor: default_rtio_sensor: fix: Treat individual axis data as q31_t
Instead of assuming that an individual axis must contain all
data-values. Additionally, for determining that there's XYZ data, all
three channels must be present in the header.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
(cherry picked from commit 5a1dfc82c3)
2025-01-23 09:19:03 -05:00
Luis Ubieda
3029229422 sensor: shell: Allow individual axis data to be processed
For the supported channels, instead of just allowing 3-axis data being
printed out, allow individual channels to be processed (e.g: accel_x,
gyro_y, etc).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
(cherry picked from commit 36dfea121d)
2025-01-23 09:19:03 -05:00
Jonathan Rico
e6598030a8 Bluetooth: L2CAP: Downgrade user_data API error to a warning
When user_data is not zeroed-out, the API returns an error. Downgrade
the API error to a warning log instead.

Introducing this check (#76489) broke a few PTS tests, as user_data is
not initialized by `net_buf_alloc()`. Doing so is in discussion:

https://github.com/zephyrproject-rtos/zephyr/issues/77088

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 6fa6c4c256)
2025-01-23 09:18:26 -05:00
Derek Snell
6a519f6d94 drivers: flash: soc_flash_mcux: remove CMD_MARGIN_CHECK
The CMD_BLANK_CHECK can return errors when the flash is readable, and
should only be used after programming, not in is_area_readable().  From
the LPC55S69 datasheet: "As cells age and lose charge, a correctly
programmed address will fail this check, while still being able to be
read successfully for the remaining duration of the data retention time."

Signed-off-by: Derek Snell <derek.snell@nxp.com>
(cherry picked from commit 88b9cb6efc)
2025-01-22 15:13:41 -05:00
Pieter De Gendt
8b5fee6186 drivers: spi: spi_mcux_ecspi: Fix data size when using 16/32 bit transfers
The data size is set using a burst length, the data size for 8/16/32 is
always 1 in those cases.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
(cherry picked from commit 0e8aed7393)
2025-01-22 15:11:24 -05:00
Pieter De Gendt
ad8fd5da35 drivers: spi: spi_mcux_ecspi: Ignore chip select channel with cs-gpios
The internal chip selects are limited to 4, however when using GPIOS
does not pose this limitation.
Also set internal channel to 0 if GPIOS are used.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
(cherry picked from commit 7250e987e5)
2025-01-22 15:11:24 -05:00
Tomislav Milkovic
0010b775f1 drivers: can: can_tcan4x5x: fix compiler build warning/error
Fix compiler warning when optional property reset-gpios
is not supplied in the ti,tcan4x5x-compatible device tree
node

Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
(cherry picked from commit fb98387f4d)
2025-01-22 15:10:26 -05:00
Erik Tamlin
1182a4ca73 manifest: update percepio
Update the percepio module to use TraceRecorder v4.10.2

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
(cherry picked from commit 91b2156398)
2025-01-07 09:19:39 -05:00
Jamie McCrae
7c0a74e708 samples: mgmt: mcumgr: smp_svr: Fix re-advertise issue on connection
Fixes an issue introduced with commit
c6ad4a7927 which wrong restarts
advertising after a device connects when it should only restart
advertising if a device fails to connect

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 655be99fa7)
2025-01-07 09:17:19 -05:00
Jilay Pandya
d790dcc0f8 drivers: auxdisplay: jhd1313: fix Out-of-bounds read
fix out of bounds read by doing the comparison with ARRAY_SIZE correctly

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
(cherry picked from commit 3202773b11)
2025-01-07 09:16:51 -05:00
Dominik Ermel
228f1406c3 drivers/flash: Correct flash_erase userspace handler
As the erase callback is optional, handler should not check
if it is not NULL.

Fixes #81777

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
(cherry picked from commit 486428951b)
2025-01-07 09:16:19 -05:00
DEVER Emiel
f02f2837a5 fs: ext2: Fix ext2 read buffer overflow
Keep track of the amount of bytes read so no buffer overflow occurs.

Signed-off-by: DEVER Emiel <emiel.dever@psicontrol.com>
(cherry picked from commit 336c650646)
2024-12-16 16:14:13 -05:00
Marcio Ribeiro
73abf94f8a drivers: uart: esp32: reset tx fifo during driver init
Resets uart tx fifo during driver initialization to have a well defined
initial condition mainly preventing unwanted characters being sent

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
(cherry picked from commit f0516ead27)
2024-12-16 16:14:00 -05:00
Daniel DeGrasse
c52903cbda drivers: flash: flash_mcux_flexspi_nor: check all 3 bytes of JEDEC ID
The FlexSPI NOR driver should verify all 3 bytes of the JEDEC ID match
the expected value before attempting to use a custom LUT table with a
flash chip. This reduces the odds that an incompatible LUT will be used
with a flash chip, as some flash chips may share the same first byte of
their device ID but not be compatible with the custom LUT table.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-12-14 14:09:05 -05:00
Jukka Rissanen
7109586f8e tests: net: dns_dispatcher: Add tests for dispatcher
Make sure that the socket service is properly unregistered when
dispatcher is unregistered.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit d98fe73684)
2024-12-14 14:07:40 -05:00
Jukka Rissanen
c8e2e4605c net: dns: Close socket service properly from dispatcher
We need to close the socket service context when dispatcher is
unregistered.

Fixes #82652

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit da148ab3bc)
2024-12-14 14:07:40 -05:00
Jukka Rissanen
830126b573 net: dns: Avoid errors when DNS dispatcher is already registered
Skip error prints and extra DNS events if DNS dispatcher was already
registered.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit c110331507)
2024-12-14 14:07:40 -05:00
Jukka Rissanen
9265176867 net: dns: Fix the debug print when dispatcher fails
Depending on DNS type, print the output (mDNS vs DNS) correctly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit efcfcfe292)
2024-12-14 14:07:40 -05:00
Jakub Rzeszutko
c26e6e7074 lib: shell: replace strtol with strtoul in cmd_load for address parsing
Addresses in cmd_load() should always be unsigned. Previously, strtol()
was used, which is limited to signed long values, causing issues with
addresses >= 0x80000000. This commit replaces strtol() with strtoul(),
ensuring proper handling of the full 32-bit address space.

Fixes #81343

Signed-off-by: Aaron Fontaine <aaron.fontaine@dojofive.com>
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
(cherry picked from commit 1aaf08f7f1)
2024-12-14 14:07:03 -05:00
Steven Poon
40851dc2c6 net: lib: lwm2m: Fix missing mutex unlock
lwm2m_engine_set() and lwm2m_engine_get() locks
the registry_lock mutex, but this is not unlocked
when setting or getting a time resource where the buffer
lengths are invalid resulting in an early return without
unlocking the mutex. This results in a deadlock when
attempting to lock the registry in another thread.

Signed-off-by: Steven Poon <steven-github@outlook.com>
(cherry picked from commit 30b30c29a3)
2024-12-04 17:11:31 -05:00
Jukka Rissanen
d4631eaa8a tests: net: dns: Add test for invalid DNS answer parsing
Make sure we catch invalid answer during parsing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 16669ec4d5)
2024-12-04 06:26:31 -05:00
Jukka Rissanen
4556aa9941 net: dns: Check DNS answer properly
The dns_unpack_answer() did not check the length of the message
properly which can cause out of bounds read.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 6e7fcff579)
2024-12-04 06:26:31 -05:00
Jukka Rissanen
347ea04384 net: dns: Validate source buffer length properly
Make sure that when copying the qname, the source buffer is large
enough for the data.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 43c2b9cfe8)
2024-12-04 06:26:31 -05:00
Jukka Rissanen
26e3be8508 tests: net: dns: Add checking of malformed packet
Make sure we test malformed packet parsing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 6f96915a14)
2024-12-04 06:26:31 -05:00
Jukka Rissanen
72603173c6 net: dns: Check parsing error properly for response
If the packet parsing fails in dns_unpack_response_query(), then
do not continue further but bail out early.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit eb2550a441)
2024-12-04 06:26:31 -05:00
Jukka Rissanen
df28014805 tracing: segger-sysview: Fix compilation issues with networking
The networking tracing function definitions were missing for sysview.

Fixes #79805

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 8134673309)
2024-12-04 06:25:38 -05:00
Jerzy Kasenberg
cc3d24a69e i2c: target: eeprom_target: Fix buffer write
When larger buffer index was introduced only function:
eeprom_target_write_received() was updated to handle
address-width = 16

This adds the same functionality when buffered API is used,
enabled by CONFIG_I2C_TARGET_BUFFER_MODE.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
(cherry picked from commit e6c9e9a2dd)
2024-11-29 14:08:03 -05:00
Matthias Alleman
6051bfc95d posix: fpu: Fix compiler error when enabling fpu on posix boards
Enabling CONFIG_FPU and CONFIG_FPU_SHARING requires the
definition of `arch_float_disable` and `arch_float_enable`.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
(cherry picked from commit e7c353bf14)
2024-11-29 09:26:56 -05:00
Gerson Fernando Budke
5ee1a27e7c drivers: rtc: sam: Fix missing function
The #64939 introduced a few convenience function like
rtc_utils_validate_rtc_time. However the PR did not replace all
occurrences which result on a build error. This add the missing
header include to remove a building warning and replace the old
function by the new one.

Fixes #81454

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
(cherry picked from commit d71d4c0e80)
2024-11-29 09:26:27 -05:00
Anas Nashif
9f824289b2 release: Bump version to 3.7.1
Update version to 3.7.1

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-21 19:13:14 -05:00
Anas Nashif
bce2eb00eb doc: release notes: update with new issues resolved
Updated issue list with latest changes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-21 19:13:14 -05:00
Szymon Janc
2c6e41cfe7 bluetooth: gatt: Fix ATT Read By Type by DB change unaware client
When change unaware client send ATT request it shall get Database
Out of Sync error. Reading GATT database hash is an exception here.

This was affecting GATT/SR/GAS/BV-05-C qualification test case.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
(cherry picked from commit 77cbd27a80)
2024-11-19 19:07:58 -05:00
Armin Kessler
4404621e82 scripts: twister: Fix serial_py referenced before assignment
This fixes `serial_py referenced before assignment` if `flash_before`
is set.

Signed-off-by: Armin Kessler <ake@espros.com>
(cherry picked from commit 78f688a3e7)
2024-11-19 19:06:30 -05:00
Sylvio Alves
6a50fd3ca8 [v3.7-branch] west.yml: fix phy nested critical section
PHY section needs nested locking/unlocking control, which was
wrongly removed from v3.7.x.

Fixes #81570

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-19 19:06:02 -05:00
Jamie McCrae
33fce6ad48 doc: release: 3.7: Add MCUboot/TF-M updates for 3.7.1
Adds update notes for what has been fixed in 3.7.1

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-15 11:03:08 -05:00
Jamie McCrae
b2a3811342 west.yml: MCUboot synchronization from v3.7-branch
Update Zephyr fork of MCUboot to revision:
  ea2410697dd0262edec041a0ccb07fdbde7c1aff

Brings following Zephyr relevant fixes:

  - ea241069 boot: bootutil: boot_record: Fix issue with saving
    image data
  - 03b64828 boards: mcxn947_qspi: fix mcuboot partition allocation
  - 4a0f42c0 doc: remove repetition
  - 1c47465c boot: zephyr: use EXTRA_CONF_FILE instead of
    deprecated OVERLAY_CONFIG
  - 8e8ecd91 boot: zephyr: Fix serial recovery for NXP IMX.RT
    platforms
  - 52c7231a boot: zephyr: Fix Warning 'boot_serial_enter defined
    but not used'
  - a58d9026 zephyr: hello_world: Fix the main() return type
    warning
  - 50b7b9ee bootutil: Fix AES and SHA-256 contexts not zeroized
    with mbedTLS
  - 9b1b95c1 ci: Fix zephyr workflow
  - 809b0e42 bootutil: Add better mode selection checks
  - 0fe7ffd8 ci: Fix FIH Docker image release usage
  - a990c6b6 ci: Update FIH docker to Ubuntu Jammy (22.04)
  - 03d1a443 boot: zephyr: board: Fix nrf54l15pdk Kconfig fragment
  - 323eb8d1 boot: zephyr: MCXN947 currently only does not support
    swap mode
  - 0a88733d boot_serial: Fix `format` warning
  - 157547c8 boot_serial: Fix `incompatible-pointer-types` warning
  - 60ac682a bootutil: loader: Verify image header before checking
    image
  - 1cd53982 boot: main: avoid unused build warning
  - 587289d6 bootutil: Fix missing include
  - 610b8e2b bootutil: Fix swap move max app size calculation
  - a4800ce0 imgtool: Add missing encodings to emitter tests
  - 80397e0f imgtool: Fix getpub fails for ed25519 key
  - e29a123d docs: release-notes: Add note on name clash fix
  - a375a14d zephyr: Fix issue with sysbuild if something else is
    named mcuboot
  - 77b03c7f Fix style issues
  - 35bf48c5 boot: Change boot_enc_load to take slot number instead
    of image
  - 90836499 docs: release-notes: Add note on fixed zephyr RAM load
    address
  - 24de0fbc boot: zephyr: Fix RAM load chain load address
  - 197287ce imgtool: Bump cryptography library version
  - 7566edaf boot: Move encryption context invalidation to
    boot_enc_drop.
  - 86b1ef19 boot: Rename boot_enc_decrypt to boot_decrypt_key
  - 597a1996 boot: boot_serial: change logging to debug level
  - 2fa42bfa doc: readme-zephyr: fix the scratch partition example
  - f2971d20 boot: Add missing boot_enc_init
  - 071b3b8e boot: Remove pointless slot identification
  - 2cd6ce9f sim: Fix MCUBOOT_SWAP_USING_SCRATCH defined in
    direct-xip and ram-load
  - 3c2f8375 bootutil: Properly retrieve image headers after
    interrupted swap-scratch
  - fb2cf0ec docs: release-notes: Add note on fixed nordic boards
  - 89807992 boot: zephyr: Fix build for nrf9160dk
  - 2f5a7f47 boot: zephyr: Fix build for thingy53
  - c9e4ab8b boot: zephyr: Fix build for thingy52
  - c06f7bb3 Revert "boot: Add MCUBOOT_HW_KEY support for image
    encryption"
  - 1d79ef35 boot: Fix ASN.1 for mbedtls >= 3.1
  - 86acda9e ext: fiat: Use user-defined assert macro

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-15 11:03:08 -05:00
Jamie McCrae
d3395d4b6f manifest: Update TF-M
Updates TF-M to pull in fixes from 2.1.1, and updates the tests
revision to work with this version

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-15 11:03:08 -05:00
Ioannis Karachalios
88b1906052 drivers: counter: Fix unbalanced policy state lock
This commit should deal with fixing unbalanced policy state locks.
When PM and PM_DEVICE are declared, default state, policy locks
should be given only when  active.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
(cherry picked from commit a66c070598)
2024-11-15 11:02:20 -05:00
Ioannis Damigos
8cd40948c7 driver/dma_smartbond: Fix driver initialization when PM_DEVICE is set
Fix DMA driver initialization when PM_DEVICE is set.
Don't put PM policy state lock if it is not active.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
(cherry picked from commit 135214d844)
2024-11-15 11:00:22 -05:00
Fabio Baltieri
37363d5eb6 arch: arm: cortex_m: add memory to the clobber list
Add "memory" to the clobber list"

From GCC 14 the compiler optimizes away memory accesses that do not
impact the asm block. Adding the memory to the clobber list lets the
compiler know that the memory state is to be preserved.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
(cherry picked from commit 63890e2526)
2024-11-14 16:58:35 -05:00
Fabio Baltieri
8926e65d35 arch: arm: cortex_m: move _main in input list
Move the _main argument to the input list rather than the output one on
the asm block and change the spec to "r". The ASM block does not return,
so it does not make sense for it to expect any output.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
(cherry picked from commit 7015a0ee37)
2024-11-14 16:58:35 -05:00
Daniel Leung
8bae4f2490 xtensa: remove mem_domain excess padding
The ptables field in arch_mem_domain for Xtensa has excessive
padding as it is incorrectly marked with needing page size
alignment. This is simply a pointer and not the actual page
table so there is no need for that alignment. So remove it.

Fixes #71896

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
(cherry picked from commit eb9fc642b9)
2024-11-14 16:57:39 -05:00
Daniel Leung
558658e64e tests: thread_error_case: no ICOUNT for qemu/xtensa/dc233c/mmu
For some weird reasons, enabling ICOUNT would result in some
tests crashing QEMU. So disable ICOUNT.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
(cherry picked from commit 0e9376ebff)
2024-11-14 16:57:39 -05:00
Yong Cong Sin
c1eab8272a tests: arch: riscv: make sure that gp reg can't be corrupted
Add a test to make sure that the `gp` global pointer register used for
relative addressing when `CONFIG_RISCV_GP` is enabled can't be
corrupted by a rogue user thread.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit 408c151282)
2024-11-14 16:56:33 -05:00
Yong Cong Sin
f3c39c704c arch: riscv: reset global pointer on exception
Reset the gp on exception entry from u-mode to protect the kernel
against a possible rogue user thread.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
(cherry picked from commit e30db2d53f)
2024-11-14 16:56:33 -05:00
Yong Cong Sin
69e62ed8cd arch: riscv: add macro to access hardware registers
Add macros to read / write hardware registers.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit de3a845612)
2024-11-14 16:56:33 -05:00
Anas Nashif
321e39a457 release: bump version to 3.7.1-rc1
Bump version to 3.7.1-rc1

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 14:56:52 -05:00
Anas Nashif
7be15c0bd9 doc: releases: update release notes for 3.7.1
Add list of fixed bugs in the 3.7.1 release section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 14:56:52 -05:00
Krzysztof Chruściński
f7e9a609ed kernel: fatal: Fix NO_OPTIMIZATIONS build
When logging is on and optimization and multithreading is off then
build fails to link because unoptimized compiler/linker seems to not
look beyond the function and it fails trying to link k_thread_name_get.
Reworking the code to make it known to the compiler without optimization
that k_thread_name_get is not needed and not logging current thread
name in that case.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
(cherry picked from commit 28b4bab01c)
2024-11-11 10:06:03 -05:00
Simon Moser
c480aa3e96 doc: fix body length in SMP UART transport
In the description of the partial-final frame of the SMP UART transport
specification was a typo in the maximum allowed raw body size. The size
must not be larger than MTU - 5 because there are 5 bytes occupied by
total length (2), frame termination (1) and crc (2).

Signed-off-by: Simon Moser <simon.github@mailbox.org>
(cherry picked from commit a77d499e2d)
2024-11-11 10:04:43 -05:00
Declan Snyder
713d8c8a62 drivers: nxp_enet: Fix tx error handling
The code path for error handling and timestamping in tx path
was meant to be identical in function to old eth_mcux driver,
but there is actually a discrepancy causing no error handling
for timestamped frames, fix it.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
(cherry picked from commit b29190c314)
2024-11-11 10:04:14 -05:00
Declan Snyder
4c806352bd drivers: ethernet: ksz8081: RMII override RNB part
I for the life of me do not know what is going on here with the RNB chip
but it seems this override must be set in order for the chip to work,
regardless of strap-in configuration, and if not set explicitly, the
value after a reset for these two bits will be seemingly random and
inconsistent. And it was working before by luck before removing a second
redundant reset in a recent commit, because apparently the register
was getting the opposite of the reset value according to the datasheet
which makes it work. The result of these bits after reset seem to vary
depending on host mcu, board, debugger, number of times reset, type of
reset, and with a pinch of random chance after keeping all variables
seemingly the same, so let's just set it to the value that works
explicitly, even if it doesn't make sense. The bit here doesn't have
clear documentation but it seems it's for using RMII regardless of the
strap in option, which is what we want to do anyways if we know the
interface type from DT, so I think it's fine, considering it is making
this driver work again.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
(cherry picked from commit 495a374a0d)
2024-11-11 10:03:51 -05:00
Declan Snyder
efb8a1d030 drivers: ethernet: ksz8081: Fix reset times
500 ms reset time is only for software reset and comes from IEEE spec.
Datasheet mentions for hardware reset the assertion of the signal should
only need to be 500 us, and 100 us after deassert to wait to access
programming interface.

Also remove an unused macro.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
(cherry picked from commit 96877736e4)
2024-11-11 10:03:51 -05:00
Declan Snyder
7098b56481 drivers: mdio_nxp_enet: Don't disable IRQ
No real need to be enabling and disabling IRQs, this logic has been
reported to be causing spurious interrupts and strange behavior, we can
just enable the interrupt and switch to interrupt based logic one time
and keep the interrupt enabled at that point.

Also, fix a W1C bug where |= was used instead of = to clear a flag.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
(cherry picked from commit 2ab104625e)
2024-11-11 10:03:28 -05:00
Zak Portnoy
1aa25cc633 mgmt: smp: shell: Respond on uart shell device when changed at runtime
Responses are currently set to the shell device that was configured
in the device tree.

The shell_uart driver allows for changing it's device during runtime
which leads to a situation where we recieve packets on one device
and respond on another.

This patch causes smp_shell_tx_raw to use the shell_uart device

Signed-off-by: Zak Portnoy <zakportnoy@gmail.com>
(cherry picked from commit 32b1140066)
2024-11-11 09:54:19 -05:00
Dominik Ermel
30af4b2696 tests/storage/stream_flash: Add erase range check test
The commit adds test for stream_flash_erase_page range check.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
(cherry picked from commit 23805301b0)
2024-11-08 12:26:20 -05:00
Dominik Ermel
219d0343fa storage/stream_flash: Fix range check in stream_flash_erase_page
Added check where stream_flash_erase_page checks if requested
offset is actually within stream flash designated area.

Fixes #79800

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
(cherry picked from commit 8714c172ed)
2024-11-08 12:26:20 -05:00
Anas Nashif
064fcfca6b arm: cortex_m: restore fix for loading z_arm_int_exit
This change was in the same commit previously reverted and seem to be
unrelated and should not be reverted.

Fixes the problem:

..... /swap_helper.S:432:(.text.z_arm_svc+0x26):
relocation truncated to fit: R_ARM_THM_JUMP11 against symbol
`z_arm_int_exit' defined in .text._HandlerModeExit section in
....core/cortex_m/libarch__arm__core__cortex_m.a(exc_exit.c.obj)

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit d9bc0b60b9)
2024-11-05 21:07:46 -05:00
Anas Nashif
3993287ce4 Revert "arch: arm: cortex_m: move part of swap_helper to C"
This reverts commit 773739a52a.

Fixes #80701

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit e646b7f3bb)
2024-11-05 18:58:59 -05:00
Anas Nashif
c6635808de Revert "arch: arm: cortex_m: restore comment lost in translation"
This reverts commit 7d7616214b.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit 7aa4032ac6)
2024-11-05 18:58:59 -05:00
Mathieu Choplain
0b41a2713e tests: dma/chan_blen_transfer: move buffer to DMA-accessible memory
This commit moves the test buffer from ITCM (not accessible by DMA) to DTCM
on several NXP boards, to make the test successful.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
(cherry picked from commit eaa799a9b5)
2024-11-05 10:53:37 -05:00
Mathieu Choplain
a23758dbb1 tests: dma/chan_blen_transfer: relocate TX and RX buffers
This commit places the chan_blen_transfer DMA test's TX and RX buffers
in a separate file that gets entirely relocated. This ensures that the
buffers reside in the correct memory, without breaking other things
due to relocation of test data/code.

Fixes #75676.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
(cherry picked from commit 3099491f3e)
2024-11-05 10:53:37 -05:00
Yong Cong Sin
422657bc7f shell: shell_help: fix width for subcommands help text
The terminal offset for subcommands' help text isn't
computed correctly, fix it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit fd1be9849c)
2024-11-05 10:53:22 -05:00
Yong Cong Sin
480fa71ca5 shell: devmem: minor optimizations
- Use `SHELL_CMD_ARG_REGISTER` for the main cmd to state the
  required number of arguments, this helps to remove the
  runtime check from the command, and also print the help
  message to the terminal when the argument count is
  unexpected.
- Some changes to the help text that hopefully makes the
  mandatory and optional arguments more obvious to the user

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit 276ccd04e7)
2024-11-05 10:53:22 -05:00
David Leach
05acdcfbe4 soc: nxp: lpc55s69: Fix part number typo
There is a typo in the part number list for LPC55S69. The
LPC55S69JET98 should be LPC55S69JEV98.

Fixes #80541

Signed-off-by: David Leach <david.leach@nxp.com>
(cherry picked from commit 46042f73cf)
2024-11-05 10:52:34 -05:00
Abderrahmane Jarmouni
6fc41c1cce drivers: display: stm32_ltdc: fix return value
Blanking On/Off calls should not return 0 when there is no panel
controller to forward them to, instead they should return ENOSYS to
signal to the application that they were not actually executed.

"device_is_ready" does check for null, but also for
"dev->state->initialized == false", so we need to isolate the
"dev == NULL" case.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
(cherry picked from commit f7de44dfaf)
2024-11-05 10:52:08 -05:00
Andrej Butok
b258fb0230 samples: smp_svr: fix overlay-udp.conf build
- fixes overlay-udp.conf build for platforms without TRNG.
- adds TEST_RANDOM_GENERATOR, as for most network samples.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
(cherry picked from commit 5c376ad24c)
2024-11-05 10:51:34 -05:00
Henrik Brix Andersen
c125e3b80f drivers: can: sam: fix sys_write32() arguments order
Fix the order of the arguments to sys_write32().

Fixes: #80750

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
(cherry picked from commit 0bb5270f7b)
2024-11-05 10:51:16 -05:00
Fin Maaß
aa18fb8d1f drivers: flash: spi_nor: simplify defines
simplify defines by using `DT_INST_**_OR` macros.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
(cherry picked from commit 83c3b1c708)
2024-11-04 09:25:14 -05:00
Fin Maaß
3c242d5eaf drivers: flash: spi_nor: fix config struct
lots of values from the DT where not set corretly, if
`CONFIG_SPI_NOR_SFDP_RUNTIME` was
enabled. This fixes it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
(cherry picked from commit 27aeabb5b2)
2024-11-04 09:25:14 -05:00
Artur Wilczak
debf3e0ffc boards: Fix to accommodate for slowly tests on UP2
To accommodate for some slow tests on up2.
For example: tests/arch/x86/info/arch.x86.info.userspace
Execution time of this test is close to 55s and sometimes
above up to the 60s.
Related issue: #80134

Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
(cherry picked from commit 9cce72daa1)
2024-11-04 09:24:50 -05:00
Gerson Fernando Budke
739247e680 mgmt: mcumgr: stat: Fix stat_mgmt_list behavior
The MCUmgr statistics only work correctly when selecting
MCUMGR_SMP_LEGACY_RC_BEHAVIOUR option. Checks the option
flag on the stat_mgmt_list and fix the behavior.

Fixes: 80476

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
(cherry picked from commit b46e176704)
2024-11-04 09:24:35 -05:00
Daniel DeGrasse
04bbca7464 boards: nxp: frdm_rw612: correct max frequency for WS25Q512JV
WS25Q512JV can only run at 104MHz at 3.3V, unless the read parameter
bits are changed. Since we don't reprogram these currently, reduce max
frequency to safe value

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
(cherry picked from commit 23d253727c)
2024-11-04 09:24:07 -05:00
Daniel DeGrasse
29b2bf89f8 drivers: flash: flash_mcux_flexspi: add support for W25Q512JV
Add support for the W25Q512JV with the FLEXSPI, using a custom
LUT table.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
(cherry picked from commit 6bc73df06b)
2024-11-04 09:24:07 -05:00
Andreas Huber
96a05d09f2 net: ipv4: Fix ARP probe check in address conflict detection
The second condition needs to check ARP probes only

The ACD is not properly implemented as described in RFC5227 ch. 2.1.1
The implementation incorrectly detects an IP conflict, if an ARP request
is received for the target IP.
The reason is that the current implementation checks for ARP requests
instead of ARP probes.

Signed-off-by: Andreas Huber <andreas.huber@ch.sauter-bc.com>
(cherry picked from commit 27d93f8b6c)
2024-11-04 09:23:45 -05:00
Alberto Escolar Piedras
a3315af1d1 manifest: Update EDTT to latest version
Update the EDTT module to:
b9ca3c7030518f07b7937dacf970d37a47865a76

Including the following:
* b9ca3c7 Fix for for python >= 3.11
* fe9b1d1 Corrected ISO interval for LL/CIS/PER/BV-05-C

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
(cherry picked from commit 59685b512e)
2024-11-04 09:22:34 -05:00
Daniel Leung
db2df7129f xtensa: mpu: update hardware if manipulating current domain
If adding/removing to the domain of the current running
thread, we need to update the hardware MPU regions or else
the addition or removal would not be reflected to current
running thread.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
(cherry picked from commit da5f7e1816)
2024-11-04 09:20:49 -05:00
Daniel Leung
5d466aad19 xtensa: mpu: make sure write to MPU regions is atomic
This adds a spinlock to make sure writing to hardware MPU
regions is atomic, and cannot be interrupted until all
regions are written to hardware.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
(cherry picked from commit 6bd0dcf920)
2024-11-04 09:20:49 -05:00
Yong Cong Sin
4aa56071f1 testsuite: coverage: fix typo in the CMakeLists.txt
`zephyr_BASE` should have been `ZEPHYR_BASE`, fix it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
(cherry picked from commit a5555ab077)
2024-11-04 09:20:21 -05:00
Benjamin Cabé
61c2965c65 doc: css: fix styling of signatures
Sync the section of the custom.css dedicated to object
signatures with Godot custom CSS.

Fixes #80005.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit c7f1f32ebe)
2024-11-04 09:20:06 -05:00
Henrik Brix Andersen
30b0a75429 ci: build samples/cpp/hello_world as part of the multiplatform test
Build the C++ version of the Hello, World sample as part of the
multiplatform (build) test in CI.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
(cherry picked from commit cd543887f4)
2024-11-04 09:19:36 -05:00
Henrik Brix Andersen
1f93bd74b3 SDK_VERSION: Use Zephyr SDK 0.16.9
This commit updates ZEPHYR_SDK to point to the Zephyr SDK 0.16.9 release.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-11-04 09:19:36 -05:00
Torsten Rasmussen
6da35a811a cmake: limit Zephyr SDK to 0.16.x series for Zephyr 3.7 LTS
Zephyr SDK compatibility level 0.16 is now an LTS intended for
Zephyr v3.7 LTS.

Thus, limit the upper Zephyr SDK lookup to <0.17, so that developers
working with Zephyr v3.7 LTS and latest Zephyr main can install both
Zephyr SDK 0.16.x along side Zephyr SDK >=0.17 and have the Zephyr SDK
0.16.x series being used for v3.7 LTS development.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-24 14:05:16 +02:00
Torsten Rasmussen
c94fee82c1 cmake: support range for find_package(Zephyr-sdk)
Fixes: #80200

CMake `find_package(<package> <version>)` support the use of ranges,
like `1.0.0...4.0.0`.

Update the FindZephyr-sdk.cmake module to support this.
This allows looking up the Zephyr SDK with an upper boundry, for example
`find_package(Zephyr-sdk 0.16...<0.17)`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-24 14:05:16 +02:00
Jakub Topic
f5e54e6255 drivers: rtc: rv3028: preserve CLKOUT when enabling callbacks
This commit addresses an issue where enabling the alarm or update
callbacks unexpectedly disabled the RTC's programmable clock output
during runtime.

The interrupt configuration has been moved to the driver's init
function.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
(cherry picked from commit f395519104)
2024-10-23 20:10:18 -04:00
Tomi Fontanilles
d662d62ef0 mbedtls: update to 3.6.2
https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.6.2

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-23 20:09:42 -04:00
Jun Lin
a3266a8b62 drivers: espi: host_subs: npcx: fix LDN register definition of PMCH
The register offset definition of the I/O port Data Base Address
register (0x60, 0x61) and Command/Status Base Address register
(0x62, 0x63) are reversed. This commit fixes it to avoid confusion.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
(cherry picked from commit 51cfbd8c5f)
2024-10-17 23:20:45 -04:00
Yong Cong Sin
793065cc19 irq: multilevel: fix irq_parent_level_3()
The IRQ for level 1 and above is incremented by 1 when encoded
with Zephyr's multilevel IRQ scheme, so it should be
decremented by 1.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-17 23:20:08 -04:00
Laurentiu Mihalcea
22b72e62d3 drivers: dai: sai: don't crash on underrun/overrun
TX/RX FIFO underrun shouldn't crash the RTOS when it occurs.
Also, since this can also happen under "normal" conditions
(i.e: DMA doesn't copy data fast enough from/to SAI's FIFOs)
the software should be able to recover from it.

As such:
	1) Remove `z_irq_spurious()` call.
	2) Clear error flag
	3) De-escalate error message to warning message

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
(cherry picked from commit e224a41ec8)
2024-10-17 23:19:03 -04:00
Ibe Van de Veire
ff72087063 test: net: igmp: Add extra IGMPv3 testcase
Added extra testcases for the IGMPv3 protocol. The IGMP driver is
supposed to send an IGMPv3 report when joining a group.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
(cherry picked from commit e6dd4cda89)
2024-10-17 23:18:32 -04:00
Ibe Van de Veire
29f425f687 net: ip: igmp: Add igmp.h for definitions
Add igmp.h file to declare definitions for IGMP that are not meant te be
included by the application but can be used in e.g. tests.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
(cherry picked from commit ba9eca3181)
2024-10-17 23:18:32 -04:00
Ibe Van de Veire
a126a0858c net: ip: igmp: Remove too strict length check
According to RFC2236 section 2.5, the IGMP message may be longer then 8
bytes. The rest of the bytes should be ignored.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
(cherry picked from commit c646dd37e5)
2024-10-17 23:18:32 -04:00
Ibe Van de Veire
ea219dbb82 net: ip: igmp: Fix wrong header length
The header length of the net ip packet was calculated using only the
net_pkt_ip_hdr_len function. The correct header length should be
calculated by adding net_pkt_ip_hdr_len and net_pkt_ipv4_opts_len. This
resulted in an incorrect IGMP version type in case of IGMPv2 message
(when IGMPv3 was enabled). The IGMP message was not parsed correctly and
therefore dropped.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
(cherry picked from commit f852c12360)
2024-10-17 23:18:32 -04:00
Marcio Ribeiro
c69bea047f sample: input_dump: enables INPUT_ESP32_TOUCH_SENSOR for Espressif boards
.conf files added to enable INPUT_ESP32_TOUCH_SENSOR during sample build.
The absence of these files incorrectly prevented the input_dump sample
build from failing due to missing required hal files.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-17 23:17:53 -04:00
Marcio Ribeiro
a3f574e5dd manifest: esp32: update hal_espressif
Update to fix regression regarding to touch_sensor on hal_espressif.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-17 23:17:53 -04:00
Johann Fischer
1c9470285a drivers: udc: add opaque pointer to store upper layer private data
Add an opaque pointer to store upper layer private data and initialize
it with the USB device context during controller initialization. Use the
pointer in event processing to get the correct context.

Fixes commit 48f2a4bc1a
("usb: device_next: remove initialized state checks in event processing")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
(cherry picked from commit 5ddaa3b1a1)
2024-10-17 23:16:08 -04:00
Daniel DeGrasse
da137a587a soc: nxp: lpc55xxx: fix dependencies for SOC_FLASH_MCUX
SOC_FLASH_MCUX has additional dependencies for LPC55xxx CPUs, due to the
fact that the flash should be disabled when executing in nonsecure mode.

Since the merge of HWMv2, this dependency has been set incorrectly at
the SOC level, resulting in the IAP flash driver being enabled when
targeting CPU1, which is incorrect. Fix the Kconfig dependency to
resolve this issue.

Fixes #79576

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
(cherry picked from commit feb0241536)
2024-10-17 23:15:29 -04:00
Gero Schwäricke
69f61ebcaa boards: hardkernel: odroid_go: fix PSRAM size
Booting the hello world sample fails with an error on the odroid go:

  I (124) quad_psram: This chip is ESP32-D0WD
  I (124) esp_psram: Found 4MB PSRAM device
  I (124) esp_psram: Speed: 40MHz
  I (125) esp_psram: PSRAM initialized, cache is in normal (1-core) mode.
  SPIRAM size is less than configured size, aborting.
  abort()

The device features only 32 Mbit PSRAM (4 MiB), see

  dts/xtensa/espressif/esp32/esp32_wrover_e_n16r4.dtsi

included from

  boards/hardkernel/odroid_go/odroid_go_procpu.dts

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
(cherry picked from commit db1adf4c7e)
2024-10-16 13:35:09 -04:00
Benjamin Cabé
65cc5d4d31 doc: fix issue with keydown/keyup being ignored
Ensure initial search menu visibility is properly set so that key
events don't get trapped preventing arrow key navigation on the
document.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit b3776ca97c)
2024-10-16 13:34:53 -04:00
Jamie McCrae
cd43f1be07 sysbuild: cmake: Fix ExternalZephyrProject_Add() revision handling
Fixes an issue with HWMv2 boards whereby the specified board
revision was not applied at the correct place, which would cause
the target image to fail configuration

Fixes #79208

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 96c6c7863a)
2024-10-16 13:34:37 -04:00
Abram Early
32029b8dd0 modbus: reset wait semaphore before tx
A response returned after a request times out would increment the
semaphore and stay until the next request is made which will immediately
return when k_sem_take is called even before a response is returned. This
will once again have the same problem when the actual response arrives.
So the wait semaphore just needs to be reset before transmitting.

Signed-off-by: Abram Early <abram.early@gmail.com>
(cherry picked from commit 583f4956dc)
2024-10-16 13:33:55 -04:00
Jonathan Rico
02352b35a2 Bluetooth: L2CAP: document memset requirement
The `struct bt_l2cap_le_chan` and `struct bt_l2cap_br_chan` objects
should be memset before passing them to the stack.

This was not stated anywhere, but all the in-tree users are doing it, so
it must be API.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit e1ac3866ee)
2024-10-15 19:07:56 -04:00
Yong Cong Sin
34a68c47d7 tests: arch: common: stack_unwind: add qemu_riscv32e
qemu_riscv32e uses a different ISA and is kinda special, add it
to the testcase for better coverage.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-15 19:07:37 -04:00
Yong Cong Sin
d1a519e1a5 arch: riscv: stacktrace: fix output without ra on the stack top
Account for the scenario when we are doing `esf`-based
unwinding from a function which doesn't have any callee.
In this case the `ra` is not saved on the stack and the
second function from the top of the frame could be missing.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-15 19:07:37 -04:00
Simone Orru
7caed78e47 modules: mbedtls: Enable PEM writing when PEM cert format is selected
Enable the `MBEDTLS_PEM_WRITE_C` mbedtls configuration option when
`CONFIG_MBEDTLS_PEM_CERTIFICATE_FORMAT` is selected.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
(cherry picked from commit ad208e1e7c)
2024-10-15 19:07:02 -04:00
Kurtis Dinelle
29a84b13ec sensor: tsl2591: fix: Address CID 353644 & 353654
Fixes implicit sign-extension/potential overflow by explicitly casting
to int64_t.

Signed-off-by: Kurtis Dinelle <kurtisdinelle@gmail.com>
(cherry picked from commit 5eeff698ca)
2024-10-15 19:06:46 -04:00
Declan Snyder
46a13006d0 ethernet: phy_mc_ksz8081: Don't reset in cfg link
No need to reset in cfg link, this was blocking system workqueue during
phy callbacks that call cfg link, since this happens from monitor work
handler which is in the system workqueue.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
(cherry picked from commit e904743152)
2024-10-15 19:06:32 -04:00
Christophe Dufaza
9739759fef west: blobs: verify fetched blobs after downloading
Running 'west blobs fetch' does not verify the digest of downloaded files:
1. if the checksum of the previously downloaded file does match
   that in the blob metadata (status BLOB_PRESENT), do nothing
2. if the checksum of the previously downloaded file does not match
   that in the blob metadata (status BLOB_OUTDATED),
   download the "up to date" file
3. if the blob has not yet been downloaded (status BLOB_NOT_PRESENT),
   download it

None of the 2) and 3) code paths will verify that the checksum of the file
just downloaded actually matches the digest in the blob's metadata.

In the event that the metadata of a module is incorrect, then the user
will not notice anything, and may rely on an unexpected binary,
e.g. a static library for a different architecture.

According to the Binary Blobs documentation [1], the expected
behavior is to check the blob digest after downloading.

[1] Fetching blobs, Zephyr 3.6.0 (still applies to Zephyr 3.7.0rc3)
docs.zephyrproject.org/3.6.0/contribute/bin_blobs.html#fetching-blobs

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
(cherry picked from commit 2b2a0e04b2)
2024-10-05 16:11:41 -04:00
Christophe Dufaza
0e62cd5831 west: blobs: prefer constants to literals for blob status
Replace blob status literals with the corresponding
constants defined in zephyr_module.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
(cherry picked from commit ae9326c920)
2024-10-05 16:11:41 -04:00
Martin Stumpf
2da1ef8677 drivers: cc: mcux: Fix incorrect clock source of FlexSPI2
The clock control mcux rev2 returns FlexSPI1 clock rate when FlexSPI2
clock rate is requested.

Signed-off-by: Martin Stumpf <martin.stumpf@vected.de>
(cherry picked from commit 4ec266152d)
2024-10-05 16:11:27 -04:00
Jamie McCrae
68247afbae doc: services: device_mgmt: mcumgr: Correct license for tool
Corrects an incorrect license for a tool

Fixes #78927

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-05 15:58:02 -04:00
Sylvio Alves
53a9f6b7ca soc: esp32s3: fix initialization code
ESP32-S3 initialization code should apply the errata
after cache initialization. This fixes it making sure
data and cache instruction are properly
handled and let following calls to work as needed.

This also update hal_espressif to force gcc to treat
register bitfield structs declared as volatile to
ensure writes on 32 bit peripheral registers.

Fixes #71397
Fixes #76325

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-05 15:57:39 -04:00
Grzegorz Swiderski
1c3cb74c67 cmake: Require Python >= 3.10
The minimum Python version was bumped for Zephyr LTSv3, but only in the
documentation and CI. The build system would still accept Python 3.8,
yet some scripts in tree have already broken support with that version.
Incompatibility errors should be prevented early.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
(cherry picked from commit 9d1b361265)
2024-10-05 15:57:04 -04:00
Daekeun Kang
bc18a9a7c0 net: fix handle unaligned memory access in net_context_bind()
This commit addresses an issue in net_context_bind() where unaligned
memory access was not properly handled when checking for INADDR_ANY.
The problem primarily affected MCUs like ARMv6 that don't support
unaligned memory access.

- Use UNALIGNED_GET() to safely access the sin_addr.s_addr field
- Ensures correct behavior on architectures with alignment restrictions

This fix improves compatibility and prevents potential crashes or
unexpected behavior on affected platforms.

Signed-off-by: Daekeun Kang <dkkang@huconn.com>
(cherry picked from commit b24c5201a0)
2024-10-05 15:56:30 -04:00
Yong Cong Sin
5e4e4bf511 tests: arch: riscv: test csf registers value
Test if callee-saved-registers values are as expected.

Signed-off-by: David Reiss <dreiss@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
(cherry picked from commit 4da4ee8ece)
2024-10-05 15:56:08 -04:00
Yong Cong Sin
6a1f9982ff arch: riscv: isr.S: restore s0 before jumping to z_riscv_fatal_error_csf
Restore the s0 we saved early in ISR entry so it shows up
properly in the CSF.

Signed-off-by: David Reiss <dreiss@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
(cherry picked from commit 4bbc2a7893)
2024-10-05 15:56:08 -04:00
Alexi Demers
b26773fc08 usb: fix wrong capacity report for USB mass storage device
Usb "write" method never copies the input data buffer, it uses the
buffer pointer directly. The fact that it was on the stack made
the buffer ephemeral, and could disappear before the USB transfer
actually occurred. The data transmitted was then random. This commit
converts the transfer buffer to a static buffer, so that it always
exists for the duration of the USB transfer.

Known side-effect: if "read capacity" command is read twice
simultaneously, the same buffer will be used twice. As the capacity of a
USB drive should not change between 2 calls, this side effect can be
ignored.

Signed-off-by: Alexi Demers <alexi.demers@axceta.com>
(cherry picked from commit 32481b6418)
2024-10-02 14:41:57 +01:00
Lyle Zhu
53738cf924 bluetooth: AVDTP: Check buffer len before pulling data
Check the remaining buffer length is not less than
required data length before pulling data from the
buffer.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
(cherry picked from commit 8113ff7e9c)
2024-09-26 09:22:20 -04:00
Yong Cong Sin
448cb69a78 drivers: intc: plic: fix IRQ on every hart regardless of mapping
Allow IRQs to work on every hart regardless of the mapping
of the contexts.

Add a test to validate the hart-context mapping.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit 475ff826d6)
2024-09-26 09:21:59 -04:00
Robert Lubos
60fe9f9d91 net: sockets: tls: Prevent infinite block during handshake
In case peer goes down or we disconnect from the network during the
TLS handshake, the TLS socket may block indefinitely during
connect()/accept(), waiting for data from the peer. This should be
avoided, hence use the preconfigured timeout for the TLS handshake,
same as we use for TCP-level handshake.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit fc007eeef5)
2024-09-26 09:21:29 -04:00
Florian Grandel
60fb882739 net: l2: ieee802154: decouple frame decryption from upper layer fields
The L2 function `ieee802154_decipher_data_frame()` relied on upper layer
LL address fields which breaks encapsulation.

Also fixes a bug introduced in another fix that went overboard (#53734).

Fixes: #78490

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
(cherry picked from commit da0371accf)
2024-09-26 09:21:09 -04:00
Florian Grandel
110eb533a8 net: l2: ieee802154: move vars to top of block
Found a few variable declarations that were not yet moved to the top of
the function/block. Doing this before actually fixing #78490 so that the
fix becomes more readable.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
(cherry picked from commit 766fda06c2)
2024-09-26 09:21:09 -04:00
Florian Grandel
3c3d2a26dc net: l2: ieee802154: fix typo
renamed ieeee802154 to ieee802154

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
(cherry picked from commit a7f235596c)
2024-09-26 09:21:09 -04:00
Lukasz Mrugala
a0ee633030 scripts: Remove wrong bz package
Package in the requirements-run-test.txt file, bz,
is not package enabling bz2 support.
It is a security concern and must be removed.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
(cherry picked from commit cbe5d9833b)
2024-09-26 09:20:44 -04:00
Jukka Rissanen
a62c741720 net: if: Check chksum offloading properly for VLAN interfaces
Make sure we check the checksum offloading capabilities correctly
for VLAN interfaces. Use the real Ethernet interface when doing the
check.

Fixes #78724

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 00bb90a42e)
2024-09-26 09:19:59 -04:00
Florian Grandel
86e62dd482 net: l2: ieee802154: fix deadlock
When an incoming PAN ID does not match or when an error occurs while
sending association requests, then locks were not properly released.

Fixes #78495

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
(cherry picked from commit 041d8c707c)
2024-09-25 04:02:38 -04:00
Jeppe Odgaard
d826a69a88 dts: arm: st: stm32h5: fix spi 1-3 clocks
The STM32 SPI driver, `spi_ll_stm32.c`, reads the clock frequency via
`clock_control_get_rate()`. The first `clocks` index is used as subsystem
argument if there is no second index, but this is not the source clock for
SPI 1, 2, and 3.
This causes the prescaler value calculation to be incorrect, resulting in a
frequency potentially above the `spi-max-frequency` value.

Add clock source for SPI instances 1, 2 and 3, that matches the default
clock configuration register reset value, which resolves the issue.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
(cherry picked from commit 40cae2d281)
2024-09-23 06:56:20 -04:00
Jukka Rissanen
db20aca2c7 net: mdns_responder: Set socket of service for statistics purposes
If the dispatcher is muxing the connection i.e., so there are two
services for the same port, then mark service socket descriptor
of the service with the socket number so that "net sockets" shell
command can show a proper value for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 1f627e3a1b)
2024-09-23 06:56:05 -04:00
Jukka Rissanen
50227e38f6 net: dns: Add per socket user data for the dispatcher
The socket services API has a limitation where the user data is shared
between file descriptors described in the same service.

This can cause problem in DNS dispatcher where each listened socket
needs to have their own dispatcher struct set as user data so that we
can map between dispatcher context and socket. Solve this by always
have a dispatcher table as user data, and then have the actual mapping
done via the dispatcher table when receiving data to the dispatcher socket.

Fixes #78146

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit caf9fd345f)
2024-09-23 06:56:05 -04:00
Yong Cong Sin
51b53de08e arch: riscv: fill all IRQ stacks with 0xAA
Fill the memory of all CPU's IRQ stack with 0xAA on init, so
that `z_stack_space_get` can calculate the remaining space
correctly.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit 035c822253)
2024-09-23 06:55:25 -04:00
Yong Cong Sin
331ad9956a devicetree: add DT_INST_NUM_IRQS()
Add `DT_INST_NUM_IRQS()` to get the number of interrupt lines
of the current `DT_DRV_COMPAT`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit ee08ebd9ca)
2024-09-23 06:54:09 -04:00
Maxime Vincent
f2ef1c8cd8 soc: arm: nxp: fix USB w/ SPEED_OPTIMIZATIONS
Fix USB w/ SPEED_OPTIMIZATIONS for LPC55xxx SoCs
Root cause was non-volatile register access,
which could get optimized by the compiler
(by -fschedule-insns, specifically)

Signed-off-by: Maxime Vincent <maxime@veemax.be>
(cherry picked from commit f86f98fa2e)
2024-09-23 06:52:28 -04:00
Sylvio Alves
ed1db9695e bugfix: soc: esp32: disable interrupts in flash operation
When interrupts are placed in flash, it needs to be disabled
when flash operations are called. This is not happening in current
v3.7.0 release, causing system to crash whenever flash operations
and interrupts happens simultaneously.

Fixes #77952

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-17 20:43:09 -04:00
Flavio Ceolin
062d4d5e11 serial: uart_async_rx: Avoid possible division by zero
Ensures that config->but_cnt is not zero.

Fixes #66800
CID #338107

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
(cherry picked from commit 5822267c23)
2024-09-17 15:05:06 -04:00
Luca Burelli
2b4e3274f2 samples/llext/modules: sample.yaml fixes
Apply cleanups suggested by Anas in a Github discussion to the
sample.yaml file.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
(cherry picked from commit f889c4e288)
2024-09-17 15:04:51 -04:00
Luca Burelli
e6599a1e30 samples/llext/modules: build hello_world as built-in by default
This commit changes the default value of CONFIG_HELLO_WORLD_MODE to 'y'
so that the hello_world function is compiled as a built-in part of the
Zephyr image by default. This is the simplest possible configuration,
that works for all architectures.

To build hello_world as an llext module, the user must either follow the
commands in the documentation or set CONFIG_HELLO_WORLD_MODE=m in the
project file along with additional architecture-specific settings that
may be required for proper LLEXT support on the target.
Leave a note in the prj.conf and sample.yaml files to remind the user.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
(cherry picked from commit 030c1c8308)
2024-09-17 15:04:51 -04:00
Tomi Fontanilles
ef5f7bb9ee doc: release notes: add 3.7.1
And the Mbed TLS update entry.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-16 06:49:19 -04:00
Tomi Fontanilles
bff2e8d1a5 manifest: mbedtls: update to 3.6.1
Brings in Mbed TLS 3.6.1.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
(cherry picked from commit b9b166c7f8)
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-16 06:49:19 -04:00
Matthias Alleman
42bffa7eee drivers: ethernet: nxp_enet: Fused MAC address fixes
Add required initialisation of OCOTP. The IMXRT10XX
variants don't support fuseWords to be greater than 1.
MAC0 fuse map address is 0x22 instead of 0x620.
Fill in mac_addr buffer correctly.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
(cherry picked from commit 931628a78a)
2024-09-11 07:40:49 -04:00
Martin Stumpf
5c8d7b2671 linker: section_tags: fix missing include
If using `<zephyr/linker/section_tags.h>` without including
`zephyr/linker/sections.h` as well, we get a warning an the linker fails
to place the data in the desired section.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
(cherry picked from commit 77eafac1bf)
2024-09-06 13:06:45 -04:00
IBEN EL HADJ MESSAOUD Marwa
b8fa7eec2e drivers: i2s: i2s_ll_stm32: Handle single clock source
Modify the function "i2s_stm32_set_clock" to handle the case where pclk_len
it is not greater then 1 and to ensure that the freq_in
variable is correctly set in both cases.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
(cherry picked from commit 2353b9391b)
2024-09-06 13:06:22 -04:00
Pavel Vasilyev
d4a551437e bluetooth: host: adv: Release buf if failed to set addr
The `bt_id_set_adv_own_addr` function itself tries to allocate a buffer
for the command and it failes due to lack of buffers, it returns error.
However, the `le_ext_adv_param_set` function doesn't handle the error
properly and keeps its own allocated buffer.

This commit releases the allocated buffer.
Partially fixes mesh in #77241.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
(cherry picked from commit 2f02474448)
2024-09-06 13:06:03 -04:00
Erik Tamlin
2d75520b66 modules: percepio: Fix python executable name
Fix python executable name in percepio module's CMakeLists.txt

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
(cherry picked from commit bb784c45dd)
2024-09-02 18:28:30 -04:00
Axel Le Bourhis
9f39eb92c5 tests: net: socket: udp: clear control data buffer before recvmsg
Currently, the test doesn't clear the control data buffer before
calling recvmsg. This leads to recvmsg being unable to add the new
control data, which corresponds to the current received data.
This commit aims to clear the control data buffer to match most use
cases, when the control data buffer is empty before calling recvmsg.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
(cherry picked from commit 179c85aa06)
2024-08-31 06:51:43 -04:00
Axel Le Bourhis
ae03e45bf5 net: sockets: Update msg_controllen in recvmsg properly
According to recvmsg man page, msg_controllen should be set to the sum
of the length of all control messages in the buffer.
This is missing from the current recvmsg implementation.
This commit aims to fix this by updating msg_controllen each time control
data are added to the buffer.
This commit also fixes cases where the msg_controllen is cleared
incorrectly.

Fixes #77303

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
(cherry picked from commit 5d643f4b00)
2024-08-31 06:51:43 -04:00
Jonathan Rico
574a6dff57 tests: Bluetooth: disable optimizations in unit test
Very very weird behavior.

Deleting the `options & BT_LE_ADV_OPT_USE_NRPA` branch in
`id.c:bt_id_set_adv_own_addr` makes the test pass. But add a log in that
branch, and you'll see that we never take it in the UT binary..

I don't have time for this, maybe some compiler guru or C language
lawyer can look at that decompiled function and figure out the root
cause.

Someone should also really fix the Bluetooth unit tests and make them
run on any Bluetooth related PR. Also nightly.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 4ab8073b87)
2024-08-31 06:51:32 -04:00
Johan Hedberg
7378a05350 Bluetooth: Host: Fix incorrect build assert
We want to make sure `struct closure` fits in the user data, so a user data
size of `sizeof(struct closure)` is valid.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
(cherry picked from commit 5736b71193)
2024-08-31 06:51:32 -04:00
Daniel DeGrasse
cc62418d75 drivers: sdhc: imx_usdhc: assume card is present if no detection method
The imx USDHC driver previously queried the peripheral's internal card
detect signal to check card presence if no card detect method was
configured. However, some boards do not route the card detect signal and
do not work correctly with the DAT3 detection method supported by this
peripheral. As a fallback, assume the card is present in the slot but
log a warning to the user.

Fixes #42227

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
(cherry picked from commit 17f71e19f0)
2024-08-31 06:51:21 -04:00
Armando Visconti
d800ccea86 drivers/sensor/st: Fix wrong data byte swap for be
A 16-bit value built using byte shifts and ORs from a given
couple of lsb and msb bytes will result to be the same on both
little-endian and big-endian architectures, e.g.

    uint8_t lsb, msb;
    int16_t val;

    /* val is the same number on both le and be archs, but has
       different layout in memory */
    val = (msb << 8) | lsb;

All the xyz_raw_get() APIs of stmemsc sensor module build the sensor
data using the above method and DO NOT hence require (it actually leads
to wrong values on big-endian machines) to use any le/be swap routines,
such as sys_le16_to_cpu().

Fix #75758

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit 9ea4cb96cd)
2024-08-31 06:51:05 -04:00
Anas Nashif
df9a905979 ci: rerun issue check on PR edit
Re-run issue check when a PR is updated, i.e. when someone adds
'Fixes...` to the PR body.

This is mostly for release branches and has no effect on main branch.

Also, add concurrency check in the workflow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit 4077249cc7)
2024-08-27 21:33:23 -04:00
Dat Nguyen Duy
e84c516589 dts: nxp_rt1010: mark edma channel has separate interrupt entry
In SoC imxrt1010, edma channel has separate interrupt entry,
not like the rest of in-tree imxrt SoC series

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
(cherry picked from commit b7b17fa0eb)
2024-08-26 20:58:46 -04:00
Joel Guittet
57a0dbd729 net: websocket: fix undefined reference
Fix undefined reference to MSG_DONTWAIT while building websocket client.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
(cherry picked from commit 4c16ec1fba)
2024-08-26 20:58:31 -04:00
Peter van der Perk
9b58209b01 soc: rt11xx: Fix bus clocking
IMXRT117X bus clock should be 240MHz and IMXRT116X should be 200MHz

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
(cherry picked from commit d1a6b45345)
2024-08-26 20:58:09 -04:00
Anders Bjørn Nedergaard
abf93151c2 soc: rt11xx: Fix dual core ENET PLL
IMXRT11XX secondary core should not deinit ENET PLL
as it could be configured by primary core.

Signed-off-by: Anders Bjørn Nedergaard <abn@polytech.com>
(cherry picked from commit 29dc419ad2)
2024-08-26 20:57:47 -04:00
Jonathan Rico
afedbb419e Bluetooth: Host: Add missing bt_tx_irq_raise()
Trigger the TX processor on connection teardown.

When a disconnection happens before the controller has acknowledged some
ACL fragments the host has sent, we run `process_unack_tx()` to free
those unacknowledged buffers and their associated TX contexts.

The problem is that the TX processor still holds a reference to the conn
object. That reference is not released until the TX processor is
triggered again and figures out that the connection is invalid.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 80a92f51a5)
2024-08-22 14:22:15 -04:00
Jonathan Rico
22877ed2ae Bluetooth: Host: Add disconnection during TX fragmentation test
Verifies that we don't leak connection references when the peer goes out
of range whilst we are fragmenting and sending data to the controller.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 043de7da2a)
2024-08-22 14:22:15 -04:00
Ioannis Damigos
6c4a190a31 gpio_smartbond: Fix port_set_masked_raw
Writing directly to Px_DATA_REG modifies pins which are not
indicated by mask, causing gpio_basic_api test to fail.

Use Px_SET_DATA_REG and Px_RESET_DATA_REG to modify only
pins indicated by mask.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
(cherry picked from commit 782967a1e3)
2024-08-21 21:07:25 -04:00
Ioannis Damigos
da2d5e6fbe gpio_smartbond: Remove pdc entry only if it exists
Remove pdc entry only if index exists when CONFIG_PM
is set.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
(cherry picked from commit 82d17f1f2c)
2024-08-21 21:07:25 -04:00
Ioannis Damigos
7a24c590cf gpio_smartbond: Set pin to input when it is configured as GPIO_DISCONNECTED
Set pin to input with no resistors selected when it is configured as
GPIO_DISCONNECTED.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
(cherry picked from commit df86860319)
2024-08-21 21:07:25 -04:00
Ioannis Damigos
c0ed85cb60 entropy_smartbond: Clear pending interrupts after disabling TRNG
Clear pending interrupts after disabling TRNG to avoid
smartbond_trng_isr getting called with TRNG disabled

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
(cherry picked from commit bacd6c31d6)
2024-08-21 21:07:25 -04:00
Jonathan Rico
9584ac74d6 Bluetooth: Host: Free ACL RX fragments on disconnection
This function call frees the buffer kept by the host for reassembling L2CAP
PDUs into.

Without this call, the current buffer will eventually be
leaked, leading to a non-functional host due to lack of RX buffers.

The effect is worse when host flow control is not enabled, as the RX
buffer pool is shared with events, which means communication with the
controller is essentially dead.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 8a2fe27c00)
2024-08-21 16:50:44 -04:00
Jonathan Rico
01dc4e1adc Bluetooth: hci_common: Add assert on buf allocation
`net_buf_alloc(K_FOREVER)` can now return NULL if running in the system
workqueue. `bt_hci_evt_create()` is called in that context in a few cases.

Since we can't really do anything about it, add a (default-on) assert.

This should ideally never fail. I saw it fail because of a leak in the ACL
buffer pool, which is also shared with events when host flow control is not
enabled.

In that particular case, the host is rendered non-functional, so trying to
recover using error handling is futile.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 5a4fdfbf3e)
2024-08-21 16:50:44 -04:00
Jonathan Rico
fb270828a6 Bluetooth: L2CAP: Add re-assembly stress test
Add a test that verifies no resources are leaked when re-assembling L2CAP
PDUs over an unreliable channel (ie. lots of disconnects).

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit e489ec2b95)
2024-08-21 16:50:44 -04:00
Benjamin Cabé
25adea3428 fs: fuse: ensure S_IFxxx macros are available
set _XOPEN_SOURCE appropriately to avoid compilation errors
due to missing S_IFxxx macros on some systems.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit 4458a05ec2)
2024-08-20 14:53:13 -04:00
Théo Battrel
4f0e8a80f3 Tests: Bluetooth: Add another ISO frag test
This test create a setup where an ISO broadcaster will send fragmented
data and get stopped after sending the first fragment and repeating that
operation multiple time to verify that buffers are not leaked.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
(cherry picked from commit f3dcaaee35)
2024-08-20 14:51:41 -04:00
Théo Battrel
7e17f1e4ed Bluetooth: Host: Unref ISO fragments after disconnection
When sending data using ISO and the data is fragmented, if the
connection is cut before all the fragments are sent, the data buffer
will be leaked.

Fix the issue by unref'ing the buffer when ISO is not in a connected
state.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
(cherry picked from commit 3a098c9f61)
2024-08-20 14:51:41 -04:00
Théo Battrel
5bd5bf8530 Bluetooth: Host: Free ISO TX context
When disconnected while sending data, if ISO doesn't get the number of
completed packets it will not call `process_unack_tx` and thus will leak
TX context.

Fix that by setting the connection state in ISO disconnection which will
trigger a call to `process_unack_tx`.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
(cherry picked from commit 70696f5b0f)
2024-08-20 14:51:41 -04:00
Maxime Vincent
748ccc1661 soc: arm: nxp lpc55xx: fix nxp,ctimer-pwm init procedure (attach clock)
Add clock init for nxp-ctimer-pwm DTS nodes.

Signed-off-by: Maxime Vincent <maxime@veemax.be>
(cherry picked from commit 3a895ecea8)
2024-08-19 17:23:02 -04:00
Robert Lubos
20e7ef389d net: lib: http_server: Clear http1_headers_sent flag on new request
http1_headers_sent flag has to be cleared when entering
HTTP_SERVER_REQUEST_STATE and not only on the client init. Otherwise,
serving multiple HTTP1 POST requests over the same connection does not
work as intended (headers were not sent for the second and further
requests).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 086faa56aa)
2024-08-18 16:00:45 -04:00
Henrik Brix Andersen
6c4d9e0b59 dts: arm: nxp: lpc55sxx: fix sram node address
Add missing "0" to the SRAM devicetree node addresses.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
(cherry picked from commit ec85b0b4ef)
2024-08-17 08:54:19 -04:00
Ryan Erickson
b421ca7b7e drivers: modem: cellular: hl7800 fix enter cmux
The OK response should be processed before entering CMUX mode.

Use UART ISR mode by default.

Fix warnings and errors produced by the sample.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
(cherry picked from commit bbcf23e95e)
2024-08-17 08:54:01 -04:00
Alberto Escolar Piedras
37cea05f5d Bluetooth: drivers: userchan: Fix gcc 13 overflow warning
gcc 13 produces a build warning (see below), as it seems to
believe the number of read bytes may overflow the frame_size
type.
Let's increase the frame_size bitwidth to avoid this.
(Any 32bit type, signed or unsigned, avoids this warning)

The build warning:
```
In file included from /usr/include/features.h:502,
                 from bits/libc-header-start.h:33,
                 from /usr/include/stdint.h:26,
                 from include/stdint.h:9,
                 from zephyr/include/zephyr/types.h:11,
                 from zephyr/include/zephyr/kernel_includes.h:21,
                 from zephyr/include/zephyr/kernel.h:17,
                 from zephyr/drivers/bluetooth/hci/userchan.c:9:
In function ‘read’,
    inlined from ‘rx_thread’ at drivers/bluetooth/hci/userchan.c:201:9:
/usr/include/i386-linux-gnu/bits/unistd.h:28:10: warning: ‘__read_alias’
specified size between 4294902273 and 4294967295 exceeds maximum object
size 2147483647
[-Wstringop-overflow=]
   28 |   return __glibc_fortify (read, __nbytes, sizeof (char),
      |          ^~~~~~~~~~~~~~~
drivers/bluetooth/hci/userchan.c: In function ‘rx_thread’:
drivers/bluetooth/hci/userchan.c:187:32: note: destination object allocated
  here
  187 |                 static uint8_t frame[512];
      |                                ^~~~~
/usr/include/i386-linux-gnu/bits/unistd-decl.h:29:16: note: in a call to
  function
‘__read_alias’ declared with attribute ‘access (write_only, 2, 3)’
   29 | extern ssize_t __REDIRECT_FORTIFY (__read_alias, (int __fd, void
      |                ^~~~~~~~~~~~~~~~~~
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
(cherry picked from commit ee08327b4c)
2024-08-16 14:08:00 -04:00
Vinayak Kariappa Chettimada
c823c550b0 Bluetooth: Controller: Relax radio packet pointer assignment deadline
Relax the radio packet pointer assignment deadline assertion
until access address being transmitted. The PDU buffer is
probably only needed just after access address is being
transmitted or received by the radio. This will give some
more breathing room for slow CPUs like in nRF51x SoCs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 4dbfb22a7e)
2024-08-16 09:56:50 -04:00
Vinayak Kariappa Chettimada
dcc9255796 Bluetooth: Controller: Fix regression using speed optimization
Fix regression using speed optimization introduced in
commit 1b7fe792e0 ("Bluetooth: Controller: Support Link
Time Optimizations (LTO)").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 642d4be940)
2024-08-16 09:56:50 -04:00
Vinayak Kariappa Chettimada
f5fd647605 Bluetooth: Controller: nRF51x: Fix regression in encrypted connection
Fix regression in encrypted connection introduced in
commit f3deccda91 ("Bluetooth: Controller: CCM read data
to early when DF enabled on PHY 1M").

Due to this nRF51x SoC hang waiting to encrypt and/or
check MIC.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit b9a7a64563)
2024-08-16 09:56:50 -04:00
Vinayak Kariappa Chettimada
17f0ec9900 Bluetooth: Controller: Fix PDU length in case of ISR latency issue
In case of ISR latencies, if packet pointer has not been
set on time then we do not want to check uninitialized
length in rx buffer that did not get used by Radio DMA.
This would help us in detecting radio ready event being
set? We can not detect radio ready if it happens twice
before Radio ISR executes after latency.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 40b71c9773)
2024-08-16 09:56:50 -04:00
Vinayak Kariappa Chettimada
5e00ea9e4f Bluetooth: Controller: Fix empty PDU buffer overrun under ISR latency
Only 3 bytes (PDU_EM_LL_SIZE_MAX) is required for empty PDU
transmission, but in case of Radio ISR latency if rx packet
pointer is not setup then Radio DMA will use previously
assigned buffer which can be this empty PDU buffer. Radio
DMA will overrun this buffer and cause memory corruption.
Any detection of ISR latency will not happen if the ISR
function pointer in RAM is corrupted by this overrun.
Increasing ISR latencies in OS and CPU usage in the
ULL_HIGH priority if it is same as LLL priority in
Controller implementation then it is making it tight to
execute Controller code in the tIFS between Tx-Rx PDU's
Radio ISRs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit e36ddffa7a)
2024-08-16 09:56:50 -04:00
Vinayak Kariappa Chettimada
3125273a78 Bluetooth: Controller: Fix ISR profiling for single timer use
Fix ISR profiling when using single timer for tIFS radio
switching wherein in the timer is cleared on every radio
end. Hence, the captured timer value is the latency and
does not required the radio end timestamp to be subtracted.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 8ef919a7a4)
2024-08-16 09:56:50 -04:00
Vinayak Kariappa Chettimada
269c91850a Bluetooth: Controller: Verbose radio is ready assertion
Provide Radio ISR latency in microseconds when asserting due
to high ISR latency.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 53b6bc56fc)
2024-08-16 09:56:50 -04:00
Vinayak Kariappa Chettimada
680779e5f5 Bluetooth: Controller: Add ISR profiling using ticker ticks
Add ISR profiling using ticker ticks, hence profile ISR
CPU use outside radio events.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 409402f0cc)
2024-08-16 09:56:50 -04:00
Vinayak Kariappa Chettimada
e06bbce3e7 Bluetooth: Controller: Use uint16_t to store ISR profiling value
Use uint16_t to store ISR profiling value to avoid overflow
in case of higher latencies.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 56ca9b873d)
2024-08-16 09:56:50 -04:00
Vinayak Kariappa Chettimada
efb3576a54 Bluetooth: Controller: Fix in-system ISR profiling for adv and conn
Fix in-system ISR profiling for advertiser and connection
role for the missing implementation when there is CRC error.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit 90bc2b2064)
2024-08-16 09:56:50 -04:00
Erik Tamlin
6c454a6edc manifest: update percepio
Update the percepio module to use TraceRecorder v4.9.2.hotfix1

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
(cherry picked from commit 858a687052)
2024-08-16 09:56:37 -04:00
Jonathan Rico
a58f407367 Bluetooth: L2CAP: Set NULL callback for PDUs
It was not being set, and thus if the user_data contained garbage from
before, then conn.c would attempt to call that garbage.

Static channels don't have this issue, as every "SDU" fits into one PDU.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Huajiang Zheng <nxf88597@lsv051208.swis.nl-cdc01.nxp.com>
(cherry picked from commit 1c6510312d)
2024-08-09 08:39:09 -04:00
Jonathan Rico
fcc3a7e483 Bluetooth: remove forgotten TODO
It's already done.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 8d7c1bc7bc)
2024-08-09 08:39:09 -04:00
Jonathan Rico
afb8c8922a Bluetooth: adapt l2cap/userdata test
Modify the test so it checks that user_data is used and then cleared by
the stack.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 08706f98bc)
2024-08-09 08:39:09 -04:00
Jonathan Rico
45a6994f5c Bluetooth: L2CAP: Mark user_data as owned by the stack
Storing stuff in user_data? That's a paddlin'

We have been debugging issue after issue because ownership of this
"user" data is not clearly defined. Now it is. L2CAP owns the user_data
field entirely, as soon as `send()` is called.

Also add a warning and retval using CHECKIF.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit ea9449979b)
2024-08-09 08:39:09 -04:00
Jonathan Rico
e41c69a3c5 Bluetooth: allow compiling host with CONFIG_NO_RUNTIME_CHECKS
Werror fails the build on that function.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 5c6cd27723)
2024-08-09 08:39:09 -04:00
Jonathan Rico
350f9fbc2e Bluetooth: host: add more info to conn.c log
Print user_data and callback pointers.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit d02a13d726)
2024-08-09 08:39:09 -04:00
Sylvio Alves
296983709a linker: esp32: fix cpp rom region
cplusplus-rom linker initialization was wrongly placed
in RAM area when it should be in ROM area.

Fixes #75853

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
(cherry picked from commit c374d3147b)
2024-08-07 08:26:49 -04:00
Armando Visconti
3cd429f0e0 drivers/sensor: lis2dux12: fix mode when setting odr
In lis2dux12_set_odr(), the call to stmemsc module lis2dux12_mode_set()
API is done with the .fs field left uninitialized, so setting the
underlying device regs in an unproper way.

Suggested-by: Luis Ubieda <luisf@croxel.com>
Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit 8bc00e1420)
2024-08-07 08:26:13 -04:00
Thales Bacelar
b8010bf19d logging: Trigger logging thread when we start to drop messages
Wake up logging thread when we start to drop messages.

Signed-off-by: Thales Bacelar <thalesbacelar@duck.com>
(cherry picked from commit d6429431d6)
2024-08-07 08:25:49 -04:00
Yong Cong Sin
2600eaf6de tests: gdbstub: add build-only test
Add build-only test for existing boards.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit 58f66623aa)
2024-08-06 13:04:37 -04:00
Yong Cong Sin
f9770bd48e tests: gdbstub: minor refactor to the testcase.yaml
Change the `platform_allow` to multi-line format so that newly
supported archs/boards can be added as a new line.

Refactor the tags out to `common`, and add
`CONFIG_ARCH_HAS_GDBSTUB` filter

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit b97d97ff17)
2024-08-06 13:04:37 -04:00
Yong Cong Sin
0299538a11 arm: debug: gdbstub: fix header
`exc.h` should be `exception.h` now, fix  it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
(cherry picked from commit 79ed64909f)
2024-08-06 13:04:37 -04:00
Jukka Rissanen
5470dc3f62 net: context: Check null pointer in V6ONLY getsockopt
Make sure we are not accessing NULL pointer when checking
if the IPv4 mapping to IPv6 is enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit cf552905f4)
2024-08-06 13:02:10 -04:00
Rubin Gerritsen
a58e039b6a Bluetooth: Host: Fix compiling PAwR Sync without PAST RX
The function `bt_hci_le_past_received_v2()` is not compiled
in for this configuration, so the reference needs to be removed.

Fixes #76268.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
(cherry picked from commit e23345b4d1)
2024-08-06 13:01:44 -04:00
Jamie McCrae
37e5eb997e samples: tfm_integration: psa_crypto: Disable sample
Disables running this sample as doing so requires qcbor, which
is not apache licensed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit db5a5fa109)
2024-08-06 13:01:05 -04:00
Daniel Berlin
ff02673d6e bl5340_dvk: Move MIPI_DBI interface back to spi4
Commit 3dbbb73 accidentally changed the MIPI_DBI spi interface from
spi4 to spi2 for this board during conversion to use the MIPI_DBI wrapper.

This does not work, and this change reverts it back to spi4.

Tested on actual boards (bl5340, bl5340pa).
Before this change LVGL demo displays nothing, after this change it works
fine again.

Signed-off-by: Daniel Berlin <dberlin@dberlin.org>
(cherry picked from commit 08e44f9dae)
2024-08-06 13:00:40 -04:00
Robert Lubos
4ac4795945 net: tcp: Keep track of recv window size change since last ACK
Windows TCP stack has a peculiar behavior - when running iperf, it will
fill out the RX window almost entirely, but will not set PSH flag on
packets. In result, our stack would delay the ACK and thus window
update, affecting throughputs heavily.

In order to avoid that, keep track of the most recent window size
reported to the peer, and reduce it when receiving new data. In case the
RX window, as seen from the peer perspective, drops below certain
threshold, and the real RX window is currently empty, send an ACK
immediately when updating window, so that peer can continue
with sending data.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 349bf81e00)
2024-08-06 13:00:21 -04:00
Chris Friedt
905f22b018 tests: posix: net: open native_sim in c++,posix,net,native case
Prior to the fixes in the previous commits, combining a build
for native_sim with

CONFIG_CPP=y
CONFIG_POSIX_API=y
CONFIG_STD_CPP20=y
CONFIG_REQUIRES_FULL_LIBCPP=y

would fail.

It succeeds now.

This change adds a testcase to monitor that scenario in CI.

Note: this was partially necessary because the deprecation of
CONFIG_NET_SOCKETS_POSIX_NAMES is not yet complete, so there
is a dependency cycle, and also because <sys/types.h> was
pulling in the host <sys/types.h> instead of Zephyr's or one
of the embedded OSes we support.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
(cherry picked from commit d0808473f2)
2024-08-06 13:00:03 -04:00
Chris Friedt
fe0b5ab37b posix: posix_types.h: simplify conditions on pthread types
Simplify the conditions for pthread type declaration

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
(cherry picked from commit 6cf557d64a)
2024-08-06 13:00:03 -04:00
Chris Friedt
ab836482f0 posix: sys/stat.h: move declarations to posix_types.h
A number of types such as uid_t, gitd_t, etc, were defined in
sys/stat.h to workaround compatibility issues many years ago.

Since posix_types.h is slated to become equivalent to
sys/types.h in terms of standard headers, move these types
to where they belong.

For more information, please see

https://pubs.opengroup.org/onlinepubs/9699919799/\
 basedefs/sys_types.h.html

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
(cherry picked from commit 6667b500c6)
2024-08-06 13:00:03 -04:00
Chris Friedt
117fb6c27f net + posix: avoid host includes when building for native_sim
A corner case involving C++, posix, networking, and native_sim
was causing problems.

Even though C and C++ builds should include zephyr/posix/.. in
the default search path with `CONFIG_POSIX_API=y`, for some
reason, the native compiler pulls in /usr/include first anyway.

The stat.h header pulled in <sys/types.h> (which is normally
fine) but due to the native build, it was pulling in
/usr/include/sys/types.h, from the host toolchain.

Explicitly include <zephyr/posix/posix_types.h> instead of
<sys/types.h> from stat.h, and continue using the workarounds
for native builds (explicitly including zephyr/posix/arpa/net.h
from net/sockets.h .

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
(cherry picked from commit 81f5205006)
2024-08-06 13:00:03 -04:00
Chris Friedt
8fff3c24a4 Revert "net: socket: fix sys/_timespec.h not found error"
This reverts commit 269729a5db.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
(cherry picked from commit 6a0593d554)
2024-08-06 13:00:03 -04:00
Tim Sørensen
13a8b9dcd3 bluetooth: avoid USB starvation in bap_broadcast_sink
fix to ensure that USB audio interface is not starved when
no audio data is received over bluetooth.

Signed-off-by: Tim Sørensen <tims@demant.com>
(cherry picked from commit 86032bcf85)
2024-08-06 12:59:25 -04:00
Declan Snyder
b8c126abfc drivers: mdio: Clear interrupt signal in ISR
Apparently, disabling the intterupt is not enough,
because without clearing the flag, some errors are occurring.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
(cherry picked from commit 9f56ff5d64)
2024-08-06 12:58:47 -04:00
Tom Burdick
79b78b8201 icm42688: Fix divide by zero potential
There were code paths that could have lead to divide by zero given an
invalid scale setting for accel or gyro. In practice this should be an
invalid setup even before getting to these conversion functions. The
conversion functions now better show all valid values are accounted for
by using CODE_UNREACHABLE in the default case.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
(cherry picked from commit 5474b611cb)
2024-08-06 12:58:25 -04:00
Armando Visconti
29c3fc13db boards: st: sensortile_box_pro: remove hts221 sensor
Remove HTS221 sensor support from sensortile_box_pro as it has been ruled
out from final version. In fact, HTS221 is in the process of being
terminated and is not recommended for new design. The candidate replacement
is SHT40 from Sensirion, which is available also as a DIL24 adapter, which
can be plugged on sensortile_box_pro board.

See SENSEVAL-SHT4XV1:
https://www.st.com/en/partner-products-and-services/senseval-sht4xv1.html

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit cdce68e4c8)
2024-08-06 12:57:51 -04:00
Francois Ramu
8a98c84647 drivers: usb: stm32 udc driver get the global otg interrupt
The global otg interrupt hs/fs is enabled by the udc_stm32
driver. Get it in the list of interrupts of the OTG node.
Use UDC_STM32_IRQ naming.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
(cherry picked from commit 9ec7697bdb)
2024-08-06 12:57:35 -04:00
Martin Stumpf
bb65669a94 dts: fix warnings in nxp_rt11xx.dtsi
Caused by a simple typo.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
(cherry picked from commit 706ba43bb5)
2024-08-06 12:56:40 -04:00
Jose Alberto Meza
4744f569ef drivers: i3c: common: Do not tread GETCAPS failure as error for 1.0 device
If it's a I3C v1.0 device without any HDR modes do not treat as an error
if GETCAPS gives no valid response.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
(cherry picked from commit c76e776b67)
2024-08-06 12:50:58 -04:00
Armando Visconti
ee6c00843a drivers/sensor: lis2dux12: fix temperature conversion
Return to sensor_api i/f the temperature in Celsius instead
of the register raw value in LSB.

Fixes #75686

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit a1f9793e0e)
2024-08-06 12:49:31 -04:00
Armando Visconti
a6cbc326e3 drivers/sensor: lis2dux12: fix odr and range
The current implementation assumes that sensor odr and range are
always configured in the Device Tree at compile time which might
not be the case.

Instead, application can set odr and range either at compile time
through the DT or using SENSOR_ATTR_SAMPLING_FREQUENCY and
SENSOR_ATTR_FULL_SCALE attributes at runtime, so each driver instance
must keep trace of the latest values set and use them in the sensor
APIs which require them (e.g. lis2dux12_mode_set).

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit cf20aa050d)
2024-08-06 12:49:31 -04:00
Armando Visconti
81e8c6dc5c sensor: lis2dux12: fix SENSOR_ATTR_FULL_SCALE case
When setting the full scale through SENSOR_ATTR_FULL_SCALE the
driver must convert the g value (i.e. one of 2g/4g/8g/16g) to
the corrispondent sensor fs raw value.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit 2eaec8b779)
2024-08-06 12:49:31 -04:00
Armando Visconti
57ef4996f5 samples/shields: x-nucleo-iks4a1: Add lsm6dsv16x temp display
Extended the x-nucleo-iks4a1 shield standard sample adding lsm6dsv16x
sensor die temperature display.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
(cherry picked from commit 878b5a9d2e)
2024-08-06 12:49:31 -04:00
Anas Nashif
085bf35912 device: remove const qualifier from node label copy
k_usermode_string_copy does not accept const in its arguements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit 2a39132645)
2024-08-06 12:47:58 -04:00
Anas Nashif
508d402aad tests: device: test CONFIG_DEVICE_DT_METADATA=y
Looks like this option is not tested with userspace enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit c5e6416a65)
2024-08-06 12:47:58 -04:00
Alessandro Manganaro
d947fbb378 drivers: bluetooth: hci: Fix stm32wb BLE behavior
Enabling BT_HCI_SETUP for STM32WB55 to have a
correct and proper initialization procedure to fix
#75318 issue

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
(cherry picked from commit 4fc77248de)
2024-08-06 12:45:25 -04:00
Alessandro Manganaro
d698d40bb7 drivers: bluetooth: hci: Fix stm32wb BLE behavior
Implementing HCI setup function to have a correct and proper
initialization procedure to fix #75318 issue

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
(cherry picked from commit 7ca2072ed0)
2024-08-06 12:45:25 -04:00
Robert Lubos
67a6217906 doc: migration-guide-3.7: Add entry about CoAP block API change
Add entry about the coap_get_block1_option() and
coap_get_block2_option() API change.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-06 12:44:17 -04:00
Robert Lubos
0807227653 net: coap: Parse more flag in coap_get_block2_option()
Parse the more flag in coap_get_block2_option(), so that the function
can be used not only with requests but also with replies (where the more
flag should not be ignored).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-06 12:44:17 -04:00
Robert Lubos
bc1c81bc00 net: coap: Fix underlying type for block number
The block number in block1/2 options can be encoded on up to 20 bits
according to RFC 7959, therefore the underlying type used in helper
functions to retrieve the block number should be large enough to hold
the result. Therefore, replace the container for block number with
uint32_t instead of uint8_t.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-06 12:44:17 -04:00
Julia Azziz
c5472feea3 drivers: adc: fix missing ref_internal in adc_sam0
The .ref_internal field in the adc_driver_api
struct was previously unset.
Now it's set to the proper value, 1 V.

Signed-off-by: Julia Azziz <juliaazziz7@gmail.com>
(cherry picked from commit e7cfb05c72)
2024-08-06 12:42:22 -04:00
Georges Oates_Larsen
c5de8ab5d1 net: net_if: fix net_if_send_data for offloaded ifaces
Some offloaded ifaces have an L2, but lack support for
net_l2->send. This edge case is not handled by
net_if_send_data, resulting in a NULL dereference under
rare circumstances.

This patch expands the offloaded iface guard in
net_if_send_data to handle this edge case.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
(cherry picked from commit 1c79445059)
2024-08-06 12:41:41 -04:00
Benjamin Cabé
c394cdb0fa net: ptp: Properly handle second overflow/underflow
Fixes issues with net_ptp_time arithmetic where second
overflow/underflow would not be handled properly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
(cherry picked from commit 43b948f9a8)
2024-08-06 12:41:07 -04:00
Benjamin Cabé
ec8dc79124 net: ptp: Adjust clock using correct offset
Offset should be *subtracted* from current clock value, not added.
This was causing clock to accumulate error instead of actually
"converging".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit dff19c3ac6)
2024-08-06 12:41:07 -04:00
Maochen Wang
642b308bfc net: wifi: Fix the nm type check error
Fix the NM iface type check error, should use (1 << WIFI_TYPE_STA),
instead of WIFI_TYPE_STA. Same for WIFI_TYPE_SAP.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
(cherry picked from commit bf42164084)
2024-08-02 22:11:51 -05:00
Robert Lubos
3a6653a7a9 net: sockets: tls: Fix poll update event check
In case POLLIN is set, and no new application data has been detected,
the ztls_poll_update_ctx() should only return -EAGAIN if no other events
are available for the socket. Otherwise, the function may end up
busy-looping, in case for example POLLOUT is also monitored for the
socket.

Current check verifying that was wrong, as it caused to function to
return -EAGAIN even if some other events could've been reported for the
socket.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit bfe958a7f1)
2024-08-02 22:11:03 -05:00
Manuel Argüelles
7d59805274 soc: s32k3: fix RAM retention
Initialize TCM and SRAM contents only after a destructive reset (e.g.
PoR reset). SRAM retains content during functional reset through a
hardware mechanism, therefore accesses do not cause content
corruption errors.

Fixes #75912

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
(cherry picked from commit ec7289039b)
2024-08-02 22:10:45 -05:00
Yong Cong Sin
57c1f22178 arch: riscv: stacktrace: fix user thread stack bound check
According to the riscv's `arch.h`:

 +------------+ <- thread.arch.priv_stack_start
 | Guard      | } Z_RISCV_STACK_GUARD_SIZE
 +------------+
 | Priv Stack | } CONFIG_PRIVILEGED_STACK_SIZE
 +------------+ <- thread.arch.priv_stack_start +
                   CONFIG_PRIVILEGED_STACK_SIZE +
                   Z_RISCV_STACK_GUARD_SIZE

The start of the privilege stack should be:

  `thread.arch.priv_stack_start + Z_RISCV_STACK_GUARD_SIZE`

Instead of

  `thread.arch.priv_stack_start - CONFIG_PRIVILEGED_STACK_SIZE`

For the `end`, use the same equation of `top_of_priv_stack` in
the `arch_user_mode_enter()`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
(cherry picked from commit 7db18ab721)
2024-08-02 22:10:08 -05:00
Benjamin Cabé
dc7129bd20 boards: disco_l475_iot1: fix arduino_i2c config
disco l475 board exposes I2C3 on standard Arduino Uno pins A4/A5,
not I2C1.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
(cherry picked from commit 0f05f58bf5)
2024-08-02 22:09:41 -05:00
Alberto Escolar Piedras
36940db938 release: Zephyr v3.7.0
Set the version to v3.7.0

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 13:17:55 +02:00
Alberto Escolar Piedras
07ed4b04e3 doc: release: Finalize v3.7.0 release notes and migration guide
Remove working draft status from the v3.7.0 release notes and migration
guide.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 13:17:55 +02:00
Alberto Escolar Piedras
0483685642 doc: release: Add v3.7.0 to the list of supported releases
Adds v3.7.0 to the list of supported releases.
The EOL data is currently set as 2.5 years after release
which is the minimum support period we claim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 13:17:55 +02:00
Jan Kowalewski
51c39d7d3f doc: release-notes-3.7: add ctcc/nrf52840
Add ctcc/nrf52840 entry to newly added boards.

Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-07-26 10:01:28 +02:00
Jan Kowalewski
58f3714d01 boards: ct: ctcc: add M.2 picture and fix pictures quality
Provides a picture of M.2 version of a card and fixes quality
mPCIe version.

Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-07-26 10:01:28 +02:00
Alberto Escolar Piedras
257f9dcb09 doc: 3.7 migration guide: Remove empty headings
Remove headings without content

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Alberto Escolar Piedras
4b26e2698d doc: 3.7 migration guide: Minor fixes
Minor fixes to the migration guide

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Alberto Escolar Piedras
edb8409e01 doc: 3.7 release_notes: Remove empty headings
Remove headings without content

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Alberto Escolar Piedras
48f66a6997 doc: 3.7 release_notes: Remove mention of never introduced options
ac52bd629d removed from the
tree some kconfig options which weren't there for a full release.
Let's also not mention them in the release notes so we avoid
broken links.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Alberto Escolar Piedras
66feacc781 doc: 3.7 release_notes: Fix minor issues
Fix a few typos, minor grammar mistakes and simplify grammar
in a couple of sentences.
Also fix indentation in one list.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Thomas Stranger
cad3320cef doc: release notes: add 1-wire release notes for 3.7
No significant changes to 1-Wire master drivers for the 3.7 release.
Only the changes in the pull-up configuration of the zephyr,w1-gpio
driver added in the migration guide.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-25 12:25:49 +02:00
Tomi Fontanilles
45ae95241a modules: tf-m: fix git clone during build
As of v2.1.0 TF-M has updated to CMSIS v6 and switched from hosting
the sources to depending on the upstream repository, cloning it at
build time.

To prevent a download from happening during the build, CMSIS v6 sources
are pushed to Zephyr's fork of TF-M and the `CMSIS_PATH` CMake variable
is set to point to them.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-25 12:25:32 +02:00
Luis Ubieda
0910c86231 snippets: nus-console: doc: Remove invalid device-tree requirements
These were copied-over from cdc-acm-console by mistake. It's not valid
for this snippet, therefore it's being removed.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-25 09:26:20 +02:00
Jamie McCrae
2aa6b81b64 retention: Fix documentation issue
Fixes a minor issue with the return value in the documentation

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-25 09:25:21 +02:00
Lyle Zhu
b88948d4e7 doc: release-notes-3.7: Add info for bt_foreach_bond and HCI Driver
Add information support for BR key traversal by bt_foreach_bond.
Add information support for NXP IW612.

Change "Added support for NXP platforms." to
"Added support for NXP RW61x.".

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-25 09:24:04 +02:00
Rubin Gerritsen
c3dd1e8a74 Bluetooth: Host: Fix bt_disable() for IPC giving HCI Reset timeout
Some HCI drivers issue HCI reset when disabling, like the IPC HCI
driver. We need to keep the RX thread running to allow receiving
the command complete.

This commit postpones aborting the RX thread until this is done.
The issue happens started occuring after commit
d0e75ab87c.

Fixes #76202.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-25 09:14:39 +02:00
Pisit Sawangvonganan
d6afb8fb52 doc: releases: fix typo release-notes-3.7.rst
Utilize a code spell-checking tool to correct spelling errors
in `doc/releases/release-notes-3.7.rst` file.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-24 09:00:47 +02:00
Emil Gydesen
27d0aad70c doc: Bluetooth: Update LE Audio and iso in the BT features page
Added Isochronous channels to the controller
Moved Isochronous channels from LE Audio to the host
Changed the LE Audio to refer to the page where
the feature is more detailed described.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-24 08:59:24 +02:00
Chris Friedt
95d117259a doc: posix: options: explicitly note kconfig options
Note which Kconfig options activate which POSIX Options
and Option Groups.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-24 08:59:07 +02:00
Chris Friedt
3ec76e82eb doc: posix: options: make column size consistent
For some reason, when the "Supported" coumn of the posix option
documentation included large strings, it would distort the size
of the entire table.

Move blurbs about undefined behaviour and failing with ENOSYS
to a paragraph above the table, so that all tables have a
homogeneous size.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-24 08:59:07 +02:00
Chris Friedt
31c7773484 doc: posix: options: decrement header level
Decrement the header level of option group items so that they
are not listed in the outline.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-24 08:59:07 +02:00
Chris Friedt
d95d5a640d doc: posix: options: alphabetize order of options, groups
Reorder posix options and option groups so that they are
in alphabetical order in the documentation.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-24 08:59:07 +02:00
Johan Hedberg
099209b7d5 doc: release-notes-3.7: Add more details for Bluetooth HCI drivers
Make sure all added (and removed) HCI drivers are mentioned, and also
provide a reference to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-07-23 12:16:32 +02:00
Johan Hedberg
541479c479 doc: migration-guide-3.7: Group Bluetooth sections together
Move Bluetooth HCI section under the existing Bluetooth top-level section.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-07-23 12:16:32 +02:00
Evgeniy Paltsev
f2259ccd7a doc: add release-notes for Synopsys / ARC architecture and platforms
Add release notes for ARC for 3.7 release

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-07-23 09:14:12 +02:00
Joakim Andersson
276850ca02 testsuite: Remove reference to deprecated ztest API
Remove reference to deprecated ztest_test_suite function from API
description.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-07-23 09:14:04 +02:00
Martin Jäger
5681d422fe doc: release-notes-3.7: add DAC release notes
Add newly added DACs for this release.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-07-22 18:04:22 +02:00
Filip Kokosinski
d472dd8864 doc/releases/release-note-3.7: add notes for Renesas RZ/T2M SoC
This commit adds release notes for the Renesas RZ/T2M SoC.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-22 18:03:39 +02:00
Martin Jäger
6a1a3658fe doc: release-notes-3.7: add Task Watchdog section
Mention the newly added shell for the task watchdog subsystem.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-07-22 18:03:14 +02:00
TOKITA Hiroshi
098376e036 doc: release: 3.7: Add note on RaspberryPi Pico related changes
Adds notes on changes about rpi_pico

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-22 18:02:51 +02:00
TOKITA Hiroshi
a004f44b9f doc: release: 3.7: Add note on Renesas RA related changes
Adds notes on changes about rpi_pico

- Add support for Renesas RA8 series

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-22 18:02:29 +02:00
Théo Battrel
f2b6490dee Docs: Bluetooth: Update qualification page
With the new Bluetooth Qualification process the QDID and link to
launchstudio are outdated, remove them.

Also remove the ICS listing as it hasn't been updated for a while.
Instead add a download link to the Zephyr Bluetooth Host ICS file.

Update the documentation configuration script to include the ICS file
(`*.pts`) in the external contents.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-07-22 03:29:29 -04:00
Flavio Ceolin
f9de58efb9 pm: Do not select deprecated symbol
PM_DEVICE_RUNTIME_EXCLUSIVE was deprecated and its behavior
is achived with PM_DEVICE_SYSTEM_MANAGED=n.

Fixes #76037

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-22 03:28:54 -04:00
Benjamin Cabé
f9e3b65d3a doc: porting_guide: fix ReStructuredText in Kconfig.plank
Using <  > in the kconfig:option role was causing the <_board> section
to be omitted from the rendered docs, and using the role was useless
anyway as the option name was not a real one.
Use the fancy :samp: role instead to achieve the same goal.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-21 08:20:10 +02:00
Benjamin Cabé
52a9e7014a doc: release-notes-3.7: misc typo/spelling fixes
Minor fixups (spelling mistakes, formatting issues, ...)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 11:06:08 +02:00
Benjamin Cabé
6fb55e1417 doc: release-notes-3.7: Improve release highlights section
Added links to relevant doc pages when appropriate
Added a mention about PTP
Added a mention about PSA Crypto

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 11:06:08 +02:00
Benjamin Cabé
d8ed0be0f7 doc: migration-guide-3.7: misc typo/spelling fixes
Cleaned up migration guide, mostly fixing single quotes being used
instead of double quotes plus some other minor spelling mistakes.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 11:06:08 +02:00
Benjamin Cabé
2f8cfc670a doc: migration-guide-3.7: fix rendering of Bluetooth HCI section
some bullet points had incorrect indent causing
the list to render as "definition list"

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 11:06:08 +02:00
Benjamin Cabé
68ec34cd2b llext: doc: add EDK acronym to header section
Add "EDK" acronym to help discoverability of EDK for folks
searching for that keyword

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 11:06:08 +02:00
Krzysztof Chruściński
452700b2f0 doc: releases: Add logging release notes
Add release notes for 3.7 for logging subsystem.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-20 10:26:01 +02:00
Chris Friedt
ccadcef020 doc: release-notes-3.7: add fpga release notes
Add fpga release notes for v3.7.0

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-20 10:25:44 +02:00
Chris Friedt
35a1fedb5d doc: release-notes-3.7: add posix api release notes
Add release notes outlining features added for v3.7.0 and bugs
fixed from prior releases.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-20 10:25:36 +02:00
Chris Friedt
9398092d53 doc: release-notes-3.7: fix indentation in posix deprecations
Fix indendtation in posix deprecations.

The top-level bullet was indented by an extra space, so remove
the space.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-20 10:25:36 +02:00
Flavio Ceolin
ec656ba492 doc: relnotes/3.7: Add info about CVE-2024-6137
Information about CVE-2024-6137 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-20 10:19:05 +02:00
Benjamin Cabé
84a04d1ef4 doc: release-notes-3.7: Add shields release notes
Contribute shields changelog for 3.7 release

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 10:18:54 +02:00
Benjamin Cabé
c25ee8bb38 doc: shields: make section IDs consistent with shield name
Convention is to name RST section the same as the shield

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 10:18:54 +02:00
Simon Guinot
5747cc5fbd doc: release-notes-3.7: fix LED release notes
This patch fixes two broken links in the LED strip release note.
:kconfig:option: cannot be used with removed Kconfig options. This
results in broken links. Let's use the code's inline markup delimiter
instead.

It also adds a missing link to the DT compatible of the IS31FL3194
controller.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2024-07-20 10:18:42 +02:00
Tom Burdick
5ef925aa6b doc: Fix typo in SPSC lockfree queue docs
SPSC was typoed as MPSC in the SPSC queue docs.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-20 10:18:28 +02:00
Benjamin Cabé
f0b901085e Revert "doc: develop: tools: Exclude webp images from PDF"
This reverts commit a156b619d4.
Now that Sphinx 7.4 is out, it is possible to use webp images
in the PDF documentation (they're converted to png).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 10:17:55 +02:00
Siddharth Chandrasekaran
d06e95c49b docs: release-notes: Add release entry for OSDP
Patch adds release notes for mgmt/osdp

Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2024-07-19 13:22:12 +02:00
Filip Kokosinski
fd970d4979 doc/releases/release-note-3.7: add notes for LiteX and Microchip RISC-V
This commits adds release notes for the 3.7 release for the following
maintenance areas:
* Microchip RISC-V Platforms
* LiteX Platforms

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-19 13:21:51 +02:00
Chris Friedt
ac52bd629d posix: deprecated: remove new options without deprecation
A few previously deprecated Kconfig options have not yet been
present for 1 release cycle and can (theoretically) just be
removed, without deprecation (see next commit).

* GETENTROPY
* POSIX_CONFSTR
* POSIX_ENV
* POSIX_SYSLOG

For dependency information, please see
https://docs.zephyrproject.org/3.6.0/kconfig.html#kconfig-search

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-18 16:28:02 -04:00
Declan Snyder
139a1cb803 doc: Make PR description a contributor expectation
Make a PR description an expectation/requirement for
pull requests submitted to the zephyr project.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-18 16:27:23 -04:00
Alberto Escolar Piedras
9831c69afa licensing: mention GPL licensed openocd file
Let's mention this GPL licensed file, even that it
is just a configuration file.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-18 12:37:55 -04:00
Piotr Kosycarz
b8ae3a416b scripts: ci: test_plan: use find_modules only when commits are provided
Current implementation will not work if comits were not provided.
ie. use case with list of changed files will fail as args.commits is None.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-07-18 12:34:10 -04:00
Simon Guinot
8d5a7ac141 doc: release-notes-3.7: complete LED release notes
This patch completes the release notes for LED and LED strip subsystems.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2024-07-18 12:32:46 -04:00
Dominik Ermel
65e679214e storage/stream_flash: Fix write_block_size too small
Fix for platforms with write-block-size >= 256 bytes.

Fixes #76029

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-07-18 12:32:35 -04:00
Emil Gydesen
9207def7da MAINTAINERS: Exclude BT classic from BT host
Treat Bluetooth Classic similar to Bluetooth Mesh and Audio by
not including it in the BT host, as most of the BT Host people
are LE-only.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-18 09:29:26 -04:00
Gerard Marull-Paretas
5bf395ba70 doc: doxygen: use full path for USE_MDFFILE_AS_MAINPAGE
Otherwise some recent Doxygen versions (1.11.0) generate a warning.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
941cc6d744 doc: doxygen: remove non-existing INPUT entry
sys/arch_interface.h does no longer exist.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
ce8b99b9f0 net: dns_sd: fix incorrect usage of code/endcode
`@code` needs file extension
`@endcode` doesn't take any arguments

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
bd921a1ca9 debug: symtab: move to os_services doxygen group
Instead of being a top-level group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
8a7fd88ed3 bindesc: add to os_services doxygen group
Instead of being a top-level group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
cf66fc2f2a modem: move to connectivity doxygen group
Instead of being a top-level group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
284bf28169 dt-bindings: sensor: icm42688: move to sensor_interface doxygen group
Instead of showing up as a top-level Doxygen group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
b792e63b0f debug: mipi_stp_decoder: move to os_services doxygen group
The API was placed under a non-existing group: coresight_apis. Place it
under os_services, as other debug/ APIs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
398dd4e505 drivers: tee: move interface to io_interfaces doxygen group
The TEE driver interface was put under a non-existing group: security.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
28a515982c lib: libc: errno: remove non-existing c_std_lib doxygen group
Some groups were being added to a non-existing group: c_std_lib

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Bjarki Arge Andreasen
0779712b40 docs: release-notes: Added GNSS release notes
Added GNSS release notes

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-18 09:23:19 -04:00
Andrzej Głąbek
31a6ac49a8 dts: bindings: Fix license identifiers in a few files provided by Nordic
Correct license identifiers in two files copied from internal Nordic
repositories that were not properly adjusted for Zephyr:
- dts/bindings/flash_controller/nordic,rram-controller.yaml (added in
  commit 3a8ee7df91)
- dts/bindings/misc/nordic,nrf-dppic-local.yaml (added in commit
  796d09d2a6)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-07-18 09:23:03 -04:00
Sylvio Alves
0a82c65d7b doc: release: add v3.7 notes for Espressif
Add notes for Espressif related changes.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-18 09:22:39 -04:00
cyliang tw
d8183d8e2d doc: release: Add Nuvoton Numaker notes for v3.7.0
Adds release notes for Nuvoton Numaker M2L31X SoC, drivers and board
introduced since the last release.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-07-18 06:48:45 -04:00
Anas Nashif
569dbd8e0f tests: cmake: fix test identifier
cmake is part of the build system area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-18 06:47:57 -04:00
Anas Nashif
84221f5219 tests: display: fix test identifier
Fixed test identifiers and places in correct area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-18 06:47:57 -04:00
Anas Nashif
366ddac79e tests: sensing: fix identifier
Fix identifier of test and add to MAINTAINERS file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-18 06:47:57 -04:00
Tom Burdick
6530c8914e docs: DMA Release Notes 3.7
Notable changes for DMA API in 3.7

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-18 09:32:44 +02:00
Swift Tian
45d39f3b7c samples: drivers: mspi: Update readme doc
Update mspi samples readme to match with code and release doc.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-07-18 09:32:29 +02:00
Swift Tian
86da7c31df doc: release-notes-3.7: Add MSPI API release notes
Add description for all the good work done to add the new MSPI API.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-07-18 09:32:29 +02:00
Swift Tian
fe3b65e33e drivers: mspi: Mark MSPI API version 0.1.0
Mark MSPI API as experimental with version 0.1.0 for release 3.7

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-07-18 09:32:29 +02:00
Aaron Massey
e7c8e932c3 doc: release-notes-3.7: fuel gauge notes
Add release notes for fuel gauge drivers.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2024-07-18 09:30:25 +02:00
Ryan Erickson
db256f9c3e doc: release-notes-3.7: Add Ezurio release notes
Laird Connectivity boards were rebranded to Ezurio.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-07-18 09:28:53 +02:00
Andy Ross
ea2f771b25 doc: release-notes-3.7: Kernel and mt8195 notes
Describe some stray changes of mine, two fixes and one new board/soc.

Signed-off-by: Andy Ross <andyross@google.com>
2024-07-18 09:28:44 +02:00
Johann Fischer
6a512e55a8 doc: release-notes-3.7: add release notes for USB
Add release notes for USB support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-18 09:25:30 +02:00
Declan Snyder
7936c20366 doc: migration-guide-3.7: NXP ENET MDIO change
Add migration guide info about the unit of
MDIO_NXP_ENET_TIMEOUT config changing.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-18 09:24:55 +02:00
Declan Snyder
a44fa0d827 doc: release-notes-3.7: Add MDIO release notes
Add release notes for MDIO drivers.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-18 09:24:55 +02:00
Declan Snyder
40607c362c doc: migration-guide-3.7: Add KSZ8081 DT changes
Add migration guide info for the DT property names of the
microchip,ksz8081 binding being changed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-18 09:24:55 +02:00
Declan Snyder
0c7a0162e8 doc: release-notes-3.7: Add ethernet release notes
Add ethernet driver release notes for 3.7 release.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-18 09:24:55 +02:00
Declan Snyder
4bc3fd272d doc: release-notes-3.7: Add ADC release notes
Add release notes for ADC driver class for 3.7 release.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-17 16:28:09 -04:00
Jamie McCrae
21ec7a1e64 doc: release: 3.7: Add notes on various changes
Adds notes on various changes that have been made to LED strip
and sensors

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-07-17 16:26:38 -04:00
Dominik Ermel
96adef1bf5 doc: release-notes-3.7: Add FS related notes
Notes on changes and improvements in FS and storage.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-07-17 16:26:15 -04:00
Tom Burdick
7f85b64ad6 docs: RTIO Release Notes for 3.7
Adds relevant release notes for RTIO subsystem for 3.7

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-17 16:25:55 -04:00
Dominik Ermel
1d6ada1182 doc: release-notes-3.7: Update DFU/MCUmgr release notes
Notes on additions and deprecations.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-07-17 16:25:32 -04:00
Jordan Yates
3e059e7292 sd: sd_spec: update trailing doxygen comments
While doxygen comments on subsequent lines with the `/*<` is technically
valid, it is not standard. It also confuses at a minimum the `vscode`
intellisense provider, which assigns the comments to the wrong enum
values.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-17 16:19:07 -04:00
Jordan Yates
3615e69428 sd: sd_spec: fix voltage enum docs
Fix voltage enum docs as there was a repeated comment at
`SD_OCR_VDD30_31FLAG`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-17 16:19:07 -04:00
Evgeniy Paltsev
5869926063 arc: nsim: vpx5: fix SoC config issue which leads to cmake error
After recent nsim SoCs & boards reorganization the SOC_SERIES_*
config is missing for vpx5 SoC which leads to cmake errors
when building against nsim/nsim_vpx5 configuration.

Fix that and align soc series name in soc.yml

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-17 16:18:40 -04:00
Anas Nashif
52e8b1058c doc: project: clarify WG member eligibility
clarify membership eligibility and need to be a project collaborator,
add references and link to them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-17 16:18:27 -04:00
Flavio Ceolin
90c50401ad doc: release-notes-3.7: Additional crypto note
This add some additional information about crypto TinyCrypt and
PSA Crypto.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-17 16:18:15 -04:00
Andrzej Głąbek
4250309cda doc: release: Add v3.7 notes for I2S, PWM and Nordic related stuff
Add notes for Nordic HAL and a few more entries for I2S and PWM drivers,
as well as for Nordic SoCs and boards.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-07-17 16:17:48 -04:00
Krzysztof Chruściński
e36357ccfe doc: releases: Add cbprintf release notes
Add release notes for 3.7 for cbprintf.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-17 16:17:31 -04:00
HaiLong Yang
cb17f5f5a4 doc: release-notes-3.7: gd32 notes
Some incorrect gd32 implement is fixed in this release.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2024-07-17 13:18:36 +02:00
Fyall Ian (CSS ICW SW MTO INT)
02acb4bc65 docs : Infineon Release Notes for Zephyr 3.7.
Add Infineon CYW20829 SoC and board information to release notes for
Zephry 3.7.

Signed-off-by: Fyall Ian (CSS ICW SW MTO INT) <ian.fyall@infineon.com>
2024-07-17 13:17:55 +02:00
Andries Kruithof
3828c8b86a Documentation: Bluetooth: audio: add table for profile dependencies
Added tables for showing the dependencies of profiles on other
profiles and services

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-07-17 08:25:51 +02:00
Daniel Leung
f7f1e222d2 doc: release-notes/3.7: bits about Intel Audio DSP
There is one externally visible change which affects
the process of booting the audio DSP from the host,
where dedicated registers are now used to communicate
the boot status instead of using arbitrary memory
locations. This affects the ACE family of audio DSP.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-17 08:25:15 +02:00
Daniel Leung
37adf88b2d doc: release-notes/3.7: a word about thread stack size
The declaration of statically allocation stacks have been
updated to use another macro, which also unifies both
single stack declaration and array stack declaration.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-17 08:25:15 +02:00
Daniel Leung
e547d356b0 doc: release-notes/3.7: on demand paging
Adds some bits on demand paging and eviction algorithm as
the logic of NRU has changed, and LRU introduced.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-17 08:25:15 +02:00
Wilfried Chauveau
2418d229e9 doc: releases: add some Arm entries to v3.7 notes
This adds a few noticeable entries for Arm architectures.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-07-16 16:52:25 -04:00
TOKITA Hiroshi
7243ea9f4b doc: release-notes-3.7: Update LED Strip notes
Add an explanation for the ``CONFIG_WS2812_STRIP_DRIVER`` deletion.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-16 16:51:23 -04:00
Jason Kridner
b8c1881416 doc: release-notes-3.7: Beagle notes
Add notes on updates to support for BeagleBoard.org boards.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
2024-07-16 16:49:42 -04:00
Tom Burdick
9f85a70a04 doc: Revamp sensor docs
Docs now start at a high level, discussing sensors, attributes,
channels, and reading data from them.

Followed by more detailed usage guides in how to solve common problems
sensor users may run into.

Additionally renames the sensor_api sphinx tag to sensor

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-16 16:49:24 -04:00
Tom Burdick
2979cf5efb doc: Relabel sensing doc
The sensing_api label wasn't really connected as a whole guide to
sensing. Relabel sensing.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-16 16:49:24 -04:00
Tom Burdick
3a1865ebeb doc: Relabel rtio section
It's more than just an API doc and the label was longer than needed,
shorten to rtio as a doc label.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-16 16:49:24 -04:00
Alberto Escolar Piedras
c346c77a2a soc/espressif/esp32c6: Do not set HAS_PM or HAS_POWEROFF
The source files required for this features are not present
in the tree for this SOC.
So if CONFIG_PM or CONFIG_POWEROFF are enabled, there would
be a cmake failure.

Let's just indicate these features are not supported in
kconfig.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-16 12:53:09 -04:00
Declan Snyder
64b2c263f2 MAINTAINERS: Add kconfig preprocessor doc to DT
Since the kconfig preprocessor functions are under the devicetree
maintainance area, the documentation for them probably should be too.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-16 18:17:34 +02:00
Declan Snyder
42f77ef836 doc: kconfig: Add missing preprocessor functions
Add preprocessor functions missing from the documentation list.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-16 18:17:34 +02:00
Jamie McCrae
3418b53173 doc: release: 3.7: Add notes on build system changes
Adds details of fixes in the build system area

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-16 18:17:08 +02:00
Rodrigo Peixoto
78e10ddb92 doc: release-notes-3.7: additions for zbus
Add zbus changes on release notes for Zephyr v3.7.0.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-07-16 18:16:37 +02:00
Flavio Ceolin
596ef0a519 doc: release-notes-3.7: Power management notes
This adds some bits about additions and improvements on Power
Management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-16 10:22:12 +02:00
Andy Sinclair
7f5d2d7617 doc: release-notes: mfd and regulator release notes
Added release notes for mfd and regulators

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-07-16 10:19:26 +02:00
Maureen Helm
49d0382016 doc: release: Add sensor notes for v3.7.0
Adds release notes for notable changes and new sensor drivers introduced
since the last release. Organizes changes by sensor vendor to reflect
similar changes made in the tree.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-07-16 10:19:16 +02:00
Maureen Helm
e1f5b6a51f doc: release: Add ADI notes for v3.7.0
Adds release notes for new ADI SoCs, drivers, and boards introduced
since the last release.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-07-16 10:19:16 +02:00
Yannis Damigos
d2a4522250 tests: uart_elementary: Correct typos
Correct typos in uart_elementary test

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-07-15 15:15:36 -04:00
Gerard Marull-Paretas
0cfb8a4d10 doc: toolchains: zephyr: remove mentions to M1
Apple has released other processors, e.g. M2 or M3, so Apple Silicon is no
longer a synonym of M1.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-15 15:12:48 -04:00
Yves Vandervennet
79caaee2c7 doc: release: 3.7: NXP's contributions
updated release notes and migration guide

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-07-15 15:12:32 -04:00
Tomi Fontanilles
50c03e9bbe modules: mbedtls: fix MBEDTLS_PSA_P256M_DRIVER_RAW Kconfig option
Make it depend on MBEDTLS_PSA_P256M_DRIVER_ENABLED instead of
selecting it.

This fixes the build of
tests/crypto/secp256r1/crypto.secp256r1.p256-m_raw on filtered-out
platforms since PR #75441 (83cd9f5a01).

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-15 10:36:58 -04:00
Alberto Escolar Piedras
fd0e46506f release: Zephyr v3.7.0-rc3
Set the version to v3.7.0-rc3

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-13 14:07:16 -04:00
Anas Nashif
74a7502fa2 west: update altera hal
Do not build HAL uart driver, use in-tree driver instead.

Fixes #75837

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-13 10:47:22 -04:00
Luis Ubieda
7d9ff8bcb4 rtio: workq: Initialize Work item before using it
As the items come from the memory slab, their initialization state
can't be guaranteed. This is causing some devices triggering an assert
in p4wq where the item's thread is not null (not zero).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-13 10:27:58 -04:00
Jonathan Rico
792ae68165 Bluetooth: host: Use correct user_data size for hci_rx_pool
`struct acl_data` is used even when Host flow control is not enabled.
It is written to through the `acl(buf)` accessor in `conn.c:hci_acl()`.

Hopefully no netbufs were harmed by that :/

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-13 10:25:31 -04:00
Tomi Fontanilles
2e012668e9 modules: tf-m: nordic: fix unused CMake variable warning
Follow-up to d830446c91 that removed
the use of ${ZEPHYR_BASE}.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-12 20:39:26 -04:00
Tomi Fontanilles
fe69a406cd modules: tf-m: fix innocuous build warning
This removes the TF-M CMake warning "Actual TF-M version is not
available from Git repository.  Settled to v2.1.0" which always
got triggered because Zephyr's TF-M repo does not have the upstream
Git tags.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-12 20:39:26 -04:00
Jordan Yates
46167e3234 samples: tfm: add build_config sample
Add a sample that can test various TF-M build options. For now we only
test `CONFIG_TFM_BL2=n` and `CONFIG_TFM_MCUBOOT_IMAGE_NUMBER=1`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-12 20:38:49 -04:00
Jordan Yates
1bbfbef88d modules: tfm: fix TFM_MCUBOOT_IMAGE_NUMBER == 1
Fix builds with `CONFIG_TFM_MCUBOOT_IMAGE_NUMBER=1`. The merged binary
should be signed with the same argumements as a secure build, not a
non-secure build, except with a different layout file generated by the
TF-M build system.

Fixes #68345.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-12 20:38:49 -04:00
Yong Cong Sin
0155c6f87f lib/libc: minimal: remove deprecated headers
This headers have been deprecated for > 2 releases,
remove them.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-12 20:38:20 -04:00
Erik Tamlin
c2e0c43559 manifest: update percepio
Update the percepio module to use TraceRecorder v4.9.2

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
2024-07-12 20:37:52 -04:00
Stefan Schwendeler
5feb028512 modules: hal_nordic: defines NRF_CONFIG_NFCT_PINS_AS_GPIOS for nRF54L15
Currently, the NFCT pins cannot be used as GPIOs on the nRF54L15 MCU
because the Nordic HAL for this MCU uses the new upcoming `NRF_CONFIG_`
style configuration settings for this MCU.
To support all nRF5x MCUs, the old configuration is still required
because Nordic didn't update their MDK entirely to the new style.

Signed-off-by: Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
2024-07-12 16:11:44 -04:00
Gerard Marull-Paretas
092fc2c706 doc: release-notes: add device model changes
Most notable changes are DT metadata and deferred initialization.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 16:11:15 -04:00
Gerard Marull-Paretas
57b08634bc doc: release-notes: add pinctrl relevant changes
List new drivers and relevant updates.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 16:11:15 -04:00
Gerard Marull-Paretas
5e082fe855 doc: release-notes: add nRF54H20 changes
- PDK to DK migration
- PPR now runs from RAM, there's a xip variant.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 16:11:15 -04:00
Gerard Marull-Paretas
1c8e46bb23 doc: release-notes: group all board additions/changes
Since the introduction of HWMv2, boards can have multi-arch SoCs (e.g.
nRF54), so changes to these kind of boards do not have a clear place
now. Simply group all of them together.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 16:11:15 -04:00
Gerard Marull-Paretas
ac618678c7 boards: nrf54h20: extend and fix documentation
- Add PPR core information
- Fix flash/debugging information (nrfutil required now, debugging
  limited to app/radio core using JLink)

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 16:11:15 -04:00
Anas Nashif
4139f2ed60 MAINTAINERS: add bugs scripts to CI
Add script to an area and ignore in twister CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-12 16:10:13 -04:00
Anas Nashif
47aa08026f ci: scripts: do not count PRs labeled as bug in snapshot
Doing duplicates count of bugs, a PR fixing a bug is not a bug report.
Many PRs fixing an open bug are labeled with 'bug' and thuse are being
counted twice.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-12 16:10:13 -04:00
Tavish Naruka
ca02651f01 toolchain: gcc: fix SECTION_DATA_PROLOGUE for XIP
Current if CONFIG_XIP is enabled, then ALIGN_WITH_INPUT and the align
argument to SECTION_DATA_PROLOGUE are set together, and that is not a
valid option combination; if ALIGN_WITH_INPUT is present, then the
section's LMA alignment is inherited from the previous section, and that
cannot be combined with another alignment option.

The background for this line is in the following commit:
6b3c5e8bb2

Additionally, this is the documentation from ld:

(from https://sourceware.org/binutils/docs/ld/Forced-Output-Alignment.html)

> 3.6.8.3 Forced Output Alignment
>
> You can increase an output section’s alignment by using ALIGN. As an
> alternative you can enforce that the difference between the VMA and
> LMA remains intact throughout this output section with the
> ALIGN_WITH_INPUT attribute.

Signed-off-by: Tavish Naruka <t-naruka@ispace-inc.com>
2024-07-12 16:09:36 -04:00
Jimmy Zheng
7802fffc7f drivers: interrupt_controller: nuclei_eclic: do not modifiy trap entry
RISC-V trap entry is handled in soc/common/riscv-privileged/vector.S.
Remove the redundant modification in CLIC driver.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-07-12 16:09:22 -04:00
Jimmy Zheng
f989ed949a driver: interrupt_controller: nuclei_eclic: fixed interrupt level
CLIC should be the first level interrupt controller because it replaces
the basic RISC-V local interrupt.
The interrupt level in CLIC controls preemption between IRQs, rather than
specifying the number of nested interrupt controllers.
Removed CONFIG_MULTI_LEVEL_INTERRUPTS and the incorrect interrupt level.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-07-12 16:09:22 -04:00
Bjarki Arge Andreasen
ee69e9fadf drivers: sensor: voltage_divider: revert patch
A patch was added to the voltage divider to handle an erroneous
negative voltage reading for the nrfx_saadc which could return
negative voltages even though the ADC mode was single ended.

This has now been patched in the ADC driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-12 19:50:27 +02:00
Bjarki Arge Andreasen
940daa615a doc: release notes: add adc_nrfx_saadc patch note.
Add note describing patch which fixes issue which allowed negative
readings in single-ended mode.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-12 19:50:27 +02:00
Bjarki Arge Andreasen
bb2f49fb51 drivers: adc: adc_nrfx_saadc: remove redundant code
Remove redundant copy of error code and 0 initialization of static
m_data struct.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-12 19:50:27 +02:00
Bjarki Arge Andreasen
13658a6687 drivers: adc: adc_nrfx_saadc: Patch neg single ended readings
The NRF SAADC produces negative values in single ended mode if the
positive input is below 0V (ground). This behavior does not match
the ADC device driver API, which states that in single ended mode,
the readings must be positive [0 .. 2^resolution - 1].

This commit extends the adc_nrfx_saadc device driver to track which
channels in a sequence are configured to be single ended, to then
corrects negative readings for these channels to 0.

This patch only works if the ADC resolution is lower than the sample
bit size. This is the case for 8, 10, 12 and 14 bit resolutions for
the nRF 52, 53 and 91 series which store readings in a int16_t.

The nRF 54H and 54L series store 8-bit resolution readings in a 8-bit
sample size. A check has been added to start_read() to prevent single
ended mode readings if the resolution is 8-bit for these platforms.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-12 19:50:27 +02:00
Jamie McCrae
7f4200494c doc: release: 3.7: Add additional notes on MCUmgr changes
Adds a note about a fix for unaligned memory access

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-12 19:49:54 +02:00
Dat Nguyen Duy
4884262088 drivers: intc: eirq_nxp_s32: allow the same callback to be set
Allow setting the same callback as long as the same data is used

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-07-12 09:39:12 -04:00
Johann Fischer
c5b93effe1 drivers: usb_dc_rpi_pico: set AVAILABLE bit separately
The DPSRAM ports can run at different clocks, this is the default
configuration, follow the advice in the datasheet and wait 3 nop
instructions before setting the AVAILABLE bit.

It can be observed that when the controller is continuously sending data
to the host, it rarely has a 0-byte transaction instead of a short
packet. The reason for this is not easy to find, it also seems to depend
on the runtime of individual components. This may fix the problem, but
there is no sure proof that this is the solution.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-12 09:38:30 -04:00
Evgeniy Paltsev
c2c5f108e9 toolchain: arcmwdt: don't set STDC_LIB_EXT1 macro in case of minimal libc
Don't provide __STDC_LIB_EXT1__ macro (Extensions to the C Library,
Part 1: Bounds-checking interfaces) if we use minimal libc - as we don't
have functions from this extension implemented in minimal libc.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-12 09:34:58 -04:00
Pisit Sawangvonganan
10f495e0fd net: lib: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/lib` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-12 09:33:20 -04:00
Pisit Sawangvonganan
d2af60687e net: l2: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/l2` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-12 09:33:20 -04:00
Pisit Sawangvonganan
d1781da2ba net: lwm2m: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/lib/lwm2m` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-12 09:33:20 -04:00
Anas Nashif
ec71e04cdb samples: env_posix: fix regex in sample test
ALERT is empty, so do not try to match any content.

Fixes #72858

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-12 09:18:56 -04:00
Gerard Marull-Paretas
b5e5aa3335 samples: ipc: icmsg: fix unbalanced nRF53 cpunet enable calls
It looks like sample called nrf53_cpunet_enable(false) before any
nrf53_cpunet_enable(true), resulting in asserts due to unbalanced calls
(error propagated from onoff service).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 09:15:06 -04:00
Johann Fischer
108c52c244 usb: device_next: fix typo in property name
Use rx-fifo-size to set RX ringbuffer size.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-12 09:13:13 -04:00
Yong Cong Sin
269729a5db net: socket: fix sys/_timespec.h not found error
When building `native_sim` with CPP & POSIX enabled, the
POSIX's `unistd.h` header causes a compilation error as
`sys/_timespec.h` doesn't exist in host gcc lib.

Remove the 'zephyr/posix' prefix, and rely on
`CMakeLists.txt`s to do the routing accordingly:
- zephyr/lib/CMakeLists.txt:L11
- zephyr/lib/posix/options/CMakeLists.txt:L8

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-12 09:12:58 -04:00
Liam Beguin
67544a6d2d spi: shell: add missing newline character
Add missing newline in help string.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2024-07-12 09:12:47 -04:00
Krzysztof Chruściński
60911a6d5e tests: drivers: spi: spi_controller_peripheral: Fix nrf54h20_cpurad
Add more memory to dma region for cpurad as otherwise it fails
during initialization due to not enough memory for dmm heap.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-12 09:12:35 -04:00
Lukasz Stepnicki
f71d848c14 modules: hal_nordic: nrfs: fix buffer used in nrfs send
In function nrfs_backend_send_work tx_data buffer was
used in function ipc_service_send instead of
data_to_send. This is fixed and also tx_data and rx_data
are moved to coresponding functions preventing such
issues in future.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-07-12 09:12:25 -04:00
Simon Hein
2479fdcac1 kernel: timer: Add missing parameter description
Add the missing parameter description for the timer API
function k_timer_remaining_ticks.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-07-12 09:12:03 -04:00
Simon Guinot
740d7f735e drivers: serial: lpc11u6x: allow to configure data polarity
This patch adds support for the rx-invert and tx-invert device-tree
properties to the uart_lpc11u6x driver for USARTs 1, 2, 3 and 4.

Note that this feature is not supported by USART 0.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2024-07-12 06:29:56 -04:00
Marcio Ribeiro
3416f9ab47 drivers: adc: esp32: fix invalid width mask and calibration
Fixed WIDTH_MASK invalid values and use HW calibration.

Fixes #72983
Fixes #73798
Fixes #73400

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-07-12 06:25:53 -04:00
Emil Gydesen
eaa2bf0ab7 Bluetooth: VOCS: Add missing documentation in vocs.h
Add missing documentation for some defintions in vocs.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
e647773d01 Bluetooth: VCP: Add missing documentation in vcp.h
Add missing documentation for some defintions in vcp.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
14caa79c45 Bluetooth: TMAP: Add missing documentation in tmap.h
Add missing documentation for some defintions in tmap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
1751a7f190 Bluetooth: TBS: Add missing documentation in tbs.h
Add missing documentation for some defintions in tbs.h
Moved some internal definitions to tbs_internal.h

Removed invalid TBS technology BT_TBS_TECHNOLOGY_IP that
doesn't exist.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
e99d7a0002 Bluetooth: PBP: Add missing documentation in pbp.h
Add missing documentation for some defintions in pbp.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
5023c374e3 Bluetooth: PACS: Add missing documentation in pacs.h
Add missing documentation for some defintions in pacs.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
f711fd7f12 Bluetooth: MICP: Add missing documentation in micp.h
Add missing documentation for some defintions in micp.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
d2e6ed8e5c Bluetooth: Media Proxy: Add missing documentation in media_proxy.h
Add missing documentation for some defintions in media_proxy.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
b0f2d04743 Bluetooth: MCS: Add missing documentation in mcs.h
Add missing documentation for some defintions in mcs.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
8679dcd5ba Bluetooth: MCC: Add missing documentation in mcc.h
Add missing documentation for some defintions in mcc.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
909cb25c88 Bluetooth: LC3: Format documentation in lc3.h
Format documentation for some defintions in lc3.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
2f1d0529d0 Bluetooth: HAS: Add missing documentation in has.h
Add missing documentation for some defintions in has.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
032c5b69ef Bluetooth: GMAP: Add missing documentation in gmap.h
Add missing documentation for some defintions in gmap.h
Also added missing C++ guards, group and version.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
2d9cb00ba0 Bluetooth: GMAP: Add missing documentation in gmap_lc3_presets.h
Add missing documentation for some defintions in gmap_lc3_presets.h
Also added missing C++ guards, group and version.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
4926db6161 Bluetooth: CSIP: Add missing documentation in csip.h
Add missing documentation for some defintions in csip.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
f7930a2f7e Bluetooth: CAP: Add missing documentation in cap.h
Add missing documentation for some defintions in cap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
2d94be4656 Bluetooth: BAP: Add missing documentation in bap.h
Add missing documentation for some defintions in bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
1724ad2f08 Bluetooth: BAP: Add missing documentation in bap_lc3_presets.h
Add missing documentation for some defintions in bap_lc3_presets.h
Also added missing C++ guards, group and version.
Fixes some formatting.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
d92f79d3a1 Bluetooth: Audio: Add missing documentation in audio.h
Add missing documentation for some defintions in audio.h
Makes formatting and placement of @brief consistent.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
84f5d01bb0 Bluetooth: AICS: Add missing documentation in aics.h
Add missing documentation for some defintions in aics.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Gerard Marull-Paretas
e41ab1ab14 samples: drivers: mbox: fix regex when using channels 0/1
The sample will print a ping-pong message indefinitely on both,
application (or main) core and remote core. When twister is run in
device testing mode, only one terminal is evaluated (application), so
the regex just needs to account for the application core output, not
remote.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 06:23:52 -04:00
Krzysztof Chruściński
67403ed73d logging: Do not strip strings when LOG_OUTPUT is used
When CONFIG_LOG_OUTPUT is enabled that indicates that logging
strings are used by the runtime logging processing so they should
not be stripped from the binary.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-12 06:23:09 -04:00
Evgeniy Paltsev
021b5cd38f toolchain: arcmwdt: always enable TLS in case of CPP
The CPP in ARC MWDT toolchain relies on TLS (THREAD_LOCAL_STORAGE)
so enable it if CPP is selected.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-12 06:22:13 -04:00
Fabrice DJIATSA
8408acd970 Boards: st: nucleo_f303re: fix documentation information
Fix Flash size memory  for nucleo_f303re board

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-07-12 06:21:09 -04:00
Fabrice DJIATSA
e87d3ef505 Boards: st: nucleo_f302r8: fix documentation information
Fix Flash size memory for nucleo_f302r8 board

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-07-12 06:21:09 -04:00
Fabrice DJIATSA
06a4cd6b2a Boards: st: nucleo_f303k8: fix documentation information
Fix Flash size and SPI1 MISO pins for nucleo_f303k8 board

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-07-12 06:21:09 -04:00
Luis Ubieda
9c516db69c sensor: coverity-fix: Simplify unsigned comparison
- VEML7700 - Coverity CID 363733, GH: #74759.
- VEML7700 - CID 363719, GH: #74755.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-12 05:56:30 -04:00
Ioannis Damigos
548d333c2a MAINTAINERS: Update Renesas RA Platforms and hal_renesas maintainers
Added to Renesas RA Platforms:

maintainers -> KhiemNguyenT
collaborators ->  duynguyenxa, thaoluonguw

Added to hal_renesas:

collaborators -> soburi, duynguyenxa, thaoluonguw

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-07-12 05:56:09 -04:00
Jimmy Zheng
ba263da94e arch: riscv: fix exception_depth with RISCV_ALWAYS_SWITCH_THROUGH_ECALL
When 'arch_switch()' switches though Ecall, 'exception_depth' is
incorrectly added to the next thread because the current thread is updated
before arch_switch().
Add 'exception_depth' back to the previous thread when Ecall is called from
'arch_switch()'.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-07-12 05:55:26 -04:00
Evgeniy Paltsev
89f3d220d4 tests: posix: headers: fix build error when minimal libc is used
The `tests/posix/headers/portability.posix.headers.without_posix_api`
test fails to build in case of toolchain which uses minimal libc by
default (for example ARC MWDT toolchain).

It can be easily fixed by providing sighal.h handler in minimal libc

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-12 05:49:28 -04:00
Fin Maaß
de82190e13 drivers: clock_control: litex: remove redundant entry
remove litex,sys-clock-frequency from litex,clk,
because we already define that in the clock-frequency of cpu0.
This can be accessed via
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-12 05:49:01 -04:00
Guennadi Liakhovetski
46b356a6b0 intel-adsp: fix ACE power-off assembly
A recent commit fb53d2ef8d ("ace: power: replace pseudo-assembly
movi") contained a bug: the Xtensa "movi" assembly instruction must
be written with the immediate argument already shifted left by 8, the
compiler doesn't do that automatically. This still somehow worked on
MTL but failed on LNL. Fix both occurrences.

Fixes: #75700
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-12 05:48:20 -04:00
Anas Nashif
1e20f58c17 ztest: doc: fix doxygen for ztest
Many ztest macros were not indexed correctly as part of the ztest_test
group, for example ZTEST_SUITE was completely missing in the
documentation.

In addition, document a few macros that did not have any documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 18:58:45 -04:00
Anas Nashif
b485355580 MAINTAINERS: add label/tests to OpenAMP
add missing label for OpenAMP and add related samples.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 18:53:49 -04:00
Anas Nashif
47f327f081 tests: add openamp tags to openamp samples
tag samples with openamp.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 18:53:49 -04:00
Anas Nashif
ebf5ac310f MAINTAINERS: disambiguate ARM area
Stop using "area: ARM" for everything related to ARM, use specific labels
instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 18:53:28 -04:00
Fabio Baltieri
c05500fc6c ci: compliance: add a PR description check step
Add an extra workflow step to block PRs with an empty description so that
these gets flagged automatically and reviewers don't have to ask for it.

Add a message in the actual fail step as well so it's easier for the
user to figure out what went wrong, even in the existing compliance
check case.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-11 18:37:09 -04:00
Ben Marsh
74c871dce2 build: Prefix missed generated syscall includes
PR #63973 namespaced generated headers with zephyr/, including generated
syscall headers.

Since then, some new generated syscall header includes have been added
without the zephyr/ prefix, breaking builds when
CONFIG_LEGACY_GENERATED_INCLUDE_PATH is disabled.

This commit adds the zephyr/ prefix to includes for generated syscall
headers where it has been missed.

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2024-07-11 18:24:58 -04:00
Nicolas Pitre
8d485d4a24 riscv: pmp: actually activate stack overflow protection during boot
Before this, stack protection would be effective only after switching to
the first thread.

Even before the first thread is created, the kernel init code uses the
IRQ stack to set things up. Let's make sure this is safeguarded as well.

This also fixes the incompatibility between CONFIG_RISCV_PMP and
CONFIG_RISCV_ALWAYS_SWITCH_THROUGH_ECALL, the later needing an exception
call to switch to the first thread and exception code assuming stack
guard is already set up in the PMP.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-07-11 18:22:08 -04:00
Nicolas Pitre
0207c7ff73 riscv: pmp: abstract the MPRV catchall entry and its QEMU workaround
This will be needed at more than one location.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-07-11 18:22:08 -04:00
Filip Kokosinski
6138a11acc boards: use lowercase in the renesas,r7fa4m1ab3cfm compatible string
This commit unifies the `renesas,r7fa4m1ab3cfm` compatible string used in
various platforms by making it lowercase for the `arduino_uno_r4` target.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-11 18:21:53 -04:00
Sylvio Alves
0c5d5f796f soc: espressif: disable RNG entropy before app runs
SARADC was kept enabled to feed RNG entropy peripheral,
adding instability to Wi-Fi connection. So we disable it
before app runs as RNG driver already got initial entropy values.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-11 16:19:55 -04:00
Sylvio Alves
43a559080b soc: esp32s2: fix wifi clock gate
ESP32-S2 Wi-Fi clock is not initialized properly, causing
instability when scanning or connecting to a SSID.

Fixes #74899
Fixes #74417

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-11 16:19:55 -04:00
Evgeniy Paltsev
b4f49bf5fc tests: posix: env: fix failure in case toolchain with minimal libc
In case of minimal libc we have CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE = 0
by default. Some toolchains uses minimal libc by default (for example
ARC MWDT toolchain). Let's set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE
explicitly so we can allocate memory for environment variables.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-11 13:24:02 -04:00
Evgeniy Paltsev
67efbf3d57 samples: posix: env: fix failure in case of minimal libc is used
In case of minimal libc we have CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE = 0
by default. Let's set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE explicitly
so we can allocate memory for environment variables.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-11 13:24:02 -04:00
Rubin Gerritsen
85eadcfddc Bluetooth: Mark bt_<type>_err_to_str() APIs experimental
It was pointed out in a future PR that they should have
a corresponding experimental Kconfig entry.

See PR #73795.

This updates the APIs added in PR #73826 and PR #74295.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-11 13:11:59 -04:00
Robert Lubos
5251533f97 net: lib: http_server: Respect Connection close header
In case no "Connection: close" header is present in the request, the
server should keep the connection open for the client. Hence, after
serving a request, we need to check if the header was present (the
parser sets a flag for it), and only close the connection immediately,
if the client requested it. In case the client remains silent, the
connection will be closed anyway after the inactivity timer kicks in.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 13:11:04 -04:00
Robert Lubos
94b1f443ac net: sockets: Allocate FD after receiving connection in accept()
Allocating FD before pulling the new connection from the fifo can lead
to busy looping in certain cases. If the application keeps calling
accept() on a listening socket after failing to allocate new FD for the
incoming connection, it'll start busy looping, as will report POLLIN in
such case (as the new connection is still on the queue), but it'll
consistently fail with ENFILE.

This can be avoided by trying to allocate new file descriptor only after
new connection has been pulled from the fifo. That way, if we fail to
allocate the file descriptor, the incoming connection will be dropped,
which seems correct given we don't have enough resources to service it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 13:11:04 -04:00
Robert Lubos
0e601d4103 net: lib: http_server: Add restart delay
In case there were active connections when restarting the server, it
can't be re-initialized immediately, as binding to the server port will
fail. We need to wait for the TCP connection teardown, as even with
REUSEADDR socket option set, binding will fail if the sockets are not in
TCP TIMED_WAIT state (i. e. connections are active).

Because of this, add a configurable delay when restarting the server.
Additionally, make server initialization failures non-fatal, i. e. try
to restart the server again after the delay if the initialization fails.
It's been observed with Chromium, that it tends to keep connections open
even after closing them on the server side (socket lingers in FIN_WAIT_2
state), so the server re-initialization may fail even with delay, so
it's beneficial in  such case to keep retrying the server
re-initialization.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 13:11:04 -04:00
Robert Lubos
fc10a94683 net: lib: http_server: Close sockets on server core errors
In case of fatal errors (during poll() or when handling listening
socket), the server operation is restarted. It was missed however, that
sockets opened for the server should be closed in such case.

Additionally, in case there were active client connections, it's needed
to cleanup related resources, otherwise running timers may trigger a
crash.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 13:11:04 -04:00
Evgeniy Paltsev
52fabbfda0 linker: fix shared interrupts for MWDT toolchain
MWDT toolchain adds additional suffix to sections name in case of
ffunction-sections / fdata-sections are enabled.

Let's pick a single set of rules and syntax that work for all
toolchain.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-07-11 13:10:45 -04:00
Evgeniy Paltsev
d698c32e0e linker: fix device deferred init for MWDT toolchain
MWDT toolchain adds additional suffix to sections name in case of
ffunction-sections / fdata-sections are enabled.

Let's pick a single set of rules and syntax that work for all
toolchain.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-11 13:10:45 -04:00
Ederson de Souza
6a1d9877ef cmake: Add LL_EXTENSION_BUILD to EDK flags
Since f3e5d9db3d, one needs to define
`LL_EXTENSION_BUILD` to enable exporting symbols from extensions. That
patch added that for `add_llext_target`, but missed it for the EDK, thus
breaking it. This patch fixes that.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-07-11 13:10:27 -04:00
Robert Lubos
be7175351a net: lib: http_server: Fix HTTP1 POST request handling
In previous batch of fixes it was overlooked that streams are
HTTP2-specific concept. While for HTTP2 we need to track headers reply
state for each individual stream, at HTTP1 level we need to track this
at the client level. Hence, reintroduce respective flags to track
headers reply state, but only for HTTP1.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 13:10:09 -04:00
Anas Nashif
83bd3658c3 tests: do not get ZEPHYR_BASE from ENV
find_package() already deals with finding ZEPHYR_BASE, so do not rely on
it being set in ENV, use the variable directly adter find_package() was
called.

Fixes #75387

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 13:09:53 -04:00
Robert Lubos
40d55c68b8 doc: release-notes-3.7: Update networking release notes
Include latest changes/fixes in the networking release notes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-11 10:19:03 -04:00
Luca Burelli
7ba86312e7 doc: llext: improve documentation
This patch improves the documentation for the llext subsystem, adding
information onhow to configure the llext subsystem, how to build
extensions using the Zephyr build system, and how to load and use these
in a Zephyr application.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-11 16:17:52 +02:00
Luca Burelli
c444fdb581 doc: llext: split existing text into separate files
The existing index.rst file contains a mix of information about the
llext subsystem and the LLEXT Extension Development Kit (EDK). This
commit splits the existing text into two separate files, index.rst and
build.rst, as a first step on improving the documentation.

No change in text is done in this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-11 16:17:52 +02:00
Luca Burelli
f257c997b5 doc: llext: improve Doxygen comments
Review and improve comments in source code to better describe the API
and the functionality provided by the llext library.

No actual code changes are performed in this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-11 16:17:52 +02:00
Dmitrii Golovanov
5d80e253b7 ztest: shell: Fix memory leaks processing test arguments
Fix Ztest shell memory leaks when it process test arguments.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-07-11 16:16:28 +02:00
Mark Wang
64f38fc348 Bluetooth: A2DP: Fix mistake parameter
After configuration, the stream instance is valid and stream's
local_ep valid. bt_a2dp_stream_establish's parameter is stream
too. So in bt_a2dp_stream_establish, stream->local_ep should be
used to tell lower level (AVDTP) the sep.
set_config_param is used by copy-paste mistake.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-07-11 16:16:09 +02:00
Lyle Zhu
f3a1cf2782 Bluetooth: SDP: Fix stack override issue
Check the remaining space of the local variable
`filter` to avoid stack override issue.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-11 16:15:53 +02:00
Brett Witherspoon
c76818d949 dts: bindings: dac: ad569x: Remove unused properties
These properties are not used by the driver at all, but are
inconveniently marked as required. Lets just remove them.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-07-11 16:15:28 +02:00
alperen sener
8382fea5b3 test: bluetooth: Correct profile names MBT and DFU
Profile names MBT and DFU are updated as MBTM and DFUM respectively,
according to TCRL 2024-1.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-07-11 16:15:10 +02:00
Chris Friedt
3b54d2b4b9 fs: fcb: rename variables differently than struct tag
Even just making minor edits to fcb, warnings are triggered
from Coding Guidelines of the form

Violation to rule 5.7 (Tag name should be unique) tag: fcb

Rename pointer variable names to fcbp.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-11 16:14:55 +02:00
Anas Nashif
4ed8fa3b9e MAINTAINERS: move test docs to relevant areas
doc/develop/test should go under Twister/Testsuite.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 16:14:41 +02:00
Emil Gydesen
c4840462bf Bluetooth: BAP: Scan delegator: Add log if actionable CBs are not set
If the callbacks are not set, then we cannot do the requested actions
from the broadcast assistant. Since this is a significant issue,
that may prevent the role from working as intended,
LOG_WRN is used other LOG_DBG.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-11 16:13:55 +02:00
Declan Snyder
5fa17a8d39 modules: hal_nxp: Fix i2s define mistake
The commands should be within the if command checking
for CONFIG_HAS_MCUX, fix.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-11 16:13:35 +02:00
Fengming Ye
24773a1810 west: hostap: update hostap revision
Update hostap revision for bug fixes.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-07-11 12:41:38 +02:00
Emil Gydesen
2761204957 Bluetooth: BAP: Fix notifying recv state for bonded devices
The scan_delegator_security_changed function had a few issues
that were addressed:
1) It used an internal field to check level rather than the
   value provided by the API
2) It did not treat bt_addr_le_is_bonded as a boolean return value
3) It did not properly truncate the recv state (fixed by using the
   proper function bass_notify_receive_state)

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-11 12:40:21 +02:00
Fabio Baltieri
367c9d7fa6 input: event-codes: add few missing button codes
Add few missing button codes, these matches the ones used in Linux to
cover HID mouse buttons 1 to 8.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-11 12:39:59 +02:00
Jamie McCrae
0d6532d27c mgmt: mcumgr: smp: Initialise variable
Seemingly newer versions of gcc wrongly detect a variable is used
when it is not set, this is not the case the compiler is wrong,
add a default set to null to prevent the fake warning appearing
as an error in CI

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-07-11 12:39:33 +02:00
Jamie McCrae
f516ee1639 mgmt: mcumgr: transport: Fix SMP header not being packed
Fixes an issue with using SMP on devices that do not support
unaligned memory access e.g. Cortex M0 which would result in a
hard fault

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-07-11 12:39:33 +02:00
Declan Snyder
8a08bea468 doc: release-notes-3.7: Add devicetree notes
Add devicetree and kconfig preprocessor release notes.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-11 12:39:05 +02:00
Brett Witherspoon
f320535f84 drivers: dac: dac_ad569x: Add bit shift for 14/12-bit variants
The 14/12-bit variants (AD5692R/AD5691R) require the data to be in the
upper bits of the two byte data field of the write command. See table 12
and the associated footnotes in the AD5693R/AD5692R/AD5691R/AD5693
datasheet.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-07-11 09:37:12 +02:00
Jamie McCrae
0f97f0ad11 doc: release: 3.7: Add additional notes on MCUboot changes
Adds extra release notes for MCUboot

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-11 09:36:30 +02:00
Jamie McCrae
1e476429c9 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  fb2cf0ec3da3687b93f28e556ab682bdd4b85223

Brings following Zephyr relevant fixes:
  - 89807992 boot: zephyr: Fix build for nrf9160dk
  - 2f5a7f47 boot: zephyr: Fix build for thingy53
  - c9e4ab8b boot: zephyr: Fix build for thingy52
  - 1d79ef35 boot: Fix ASN.1 for mbedtls >= 3.1
  - 86acda9e ext: fiat: Use user-defined assert macro
  - 9ae634f3 bootutil: Fix signed/unsigned comparison in
    boot_read_enc_key
  - 533fef2a imgtool: Update version.py to take command line
    arguments
  - 316a139c imgtool: dumpinfo improvements
  - f3a57028 imgtool: Various dumpinfo fixes
  - d16a613f imgtool: Assert "measurement value" is last in
    boot_record.py
  - 36f8bf30 imgtool: Fix verify command for edcsa-p384 signed
    images
  - 2712f743 imgtool: Add missing requirements to requirements.txt
    file
  - 45d379e7 zephyr: boards: Add files needed for NXP FRDM MCXN947
    QSPI variant
  - 3113df8f imgtool: initial sanity test
  - a4cb878c imgtool: Fixed missing dependency to 'pyyaml' (for
    dumpinfo)
  - faf2dd1f imgtool: fixed keys/general.py to pass existing
    unittests

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-11 09:36:30 +02:00
Jamie McCrae
c769a647fa mgmt: mcumgr: transport: bluetooth: Fix dynamic registration option
Fixes the Kconfig for dynamic service registration to make it depend
on dynamic database support instead of selecting it, which prevents
issues whereby it is not actually selected

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-07-11 09:36:14 +02:00
Anas Nashif
80ce7d2315 MAINTAINER: DTS bindings should not have a catch-all filter
DTS binding area was capturing everything under dts/bindings instead of
leaving those to the areas affected.
Remove general wildcard and add some of the missing file filteres in the
relevant areas.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-10 19:14:17 -04:00
Anas Nashif
913426e585 ci: set_assignee: pick next area when submitter = assignee
Address the cases where submitter is also the maintainer of the code
changed and other areas are being changed. In this case, assign to the
next area maintainers instead of assigning to submitter.

Example: maintainer of component A introduced significant changes to
area A but also makes changes to other areas B and C. Right now
maintainers of B and C are added as reviewers.

This change will assign to the next area after A, i.e. B in cases where the
submitter is also the maintainer of area A.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-10 19:14:17 -04:00
Alberto Escolar Piedras
0cf89bb8b4 drivers/spi/spi_xlnx_axi_quadspi: Build fix w CONFIG_SPI_ASYNC
Fix a build error when CONFIG_SPI_ASYNC is set.
The issue was detected by CI

```
spi_xlnx_axi_quadspi.c: In function 'xlnx_quadspi_isr':
spi_xlnx_axi_quadspi.c:489:21: error: 'ctx' undeclared
  489 |                 if (ctx->asynchronous) {
      |                     ^~~
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-10 19:13:46 -04:00
Declan Snyder
6ac0d8bf84 drivers: mdio_nxp_enet: Fix busy wait
Fix the busy wait in the MDIO driver that was causing timing
problems in systems with real time requirements performing tasks
more frequently than about a millisecond.

Restructure the code to be less redundant and change the busy wait
kconfig to microseconds instead of millliseconds. Also actually signal
to the mdio driver that it can use the interrupt instead of busy
waiting, this seems to have been forgotten.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-10 19:13:27 -04:00
Anas Nashif
9864852540 github: add template text as comments
Instead of including the boilerplate text and showing it in the created
issue, use comments that are still displayed when editing, but not shown
in the final issue, avoiding confusing and mixup between actual issue
and template text.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-10 19:13:04 -04:00
Henrik Brix Andersen
f9672c4700 doc: releases: 3.7.0: minor clean-ups
Added a few missing CONFIG_ prefixes to Kconfig option references,
reshuffled the CAN release notes a bit to account for the
can_get_min_bitrate() being both introduced and deprecated within one
release cycle.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-10 19:12:39 -04:00
Ryan Erickson
7bef3fd8af modem: hl7800: set RX socket remote address
Set the remote address of received sockets.
This is necessary for services that rely on the remote address.
DNS relies on the remote address to be set properly.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-07-10 16:16:03 -04:00
Emilio Benavente
33a9e4b088 modules: hal_nxp: CMakeLists: Added SAI definition to fix I2S.
Added definition MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK
to fix timeout fault on the I2S_Speed test
using MIMXRT1170_evk/mimxrt1176/cm7.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-07-10 16:15:49 -04:00
Wilfried Chauveau
1b820dfa85 arch: arm: cortex_m: add ip & lr to the clobber list
Calls to other function may clobber ip & lr too so these register need to
be added to the clobberlist.
r3 is not actually used in z_arm_switch_to_main_no_multithreading so it is
also removed from the clobber list.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-07-10 11:58:13 -04:00
Dmitrii Golovanov
5d763534d6 doc: twister: ztest: Add test application diagram
Add a diagram to illustrate a test application's project
components with relationships between Ztest and Twister
objects.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-07-10 11:49:59 -04:00
Dmitrii Golovanov
b826805a44 doc: twister: Move diagrams to sub-directory
Move diagrams to a sub-directory.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-07-10 11:49:59 -04:00
Pisit Sawangvonganan
db6a3cb054 include: fix typo in multiple directories
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-10 11:48:03 -04:00
Pisit Sawangvonganan
28eb0eaffd include: fix typo in (logging, mgmt)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr/logging` and `mgmt`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-10 11:48:03 -04:00
Pisit Sawangvonganan
ccc2419465 include: arch: fix typo in multiple directories
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `include/zephyr/arch` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-10 11:48:03 -04:00
Pisit Sawangvonganan
0b24762ed6 include: net: fix typo in multiple directories
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `include/zephyr/net` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-10 11:48:03 -04:00
Pisit Sawangvonganan
631dfb67f2 include: dt-bindings: fix typo in multiple directories
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `include/zephyr/dt-bindings` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-10 11:48:03 -04:00
Jonathan Rico
4afe745a1d Bluetooth: host: Add lower bound for CONFIG_BT_BUF_ACL_RX_COUNT
See comment above assert for more.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-10 11:47:26 -04:00
Jonathan Rico
ff5c577aa8 tests: Bluetooth: Add ACL re-assembly test
This tests shows that there is a problematic buffer configuration.

The host locks up when `CONFIG_BT_BUF_ACL_RX_COUNT` is smaller or equal
to the number of connected peers, and all those peers send an L2CAP PDU
that needs re-assembly at the same time.

Although this seems far-fetched, this bug has been observed in a
real-life situation on actual hardware.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-10 11:47:26 -04:00
Théo Battrel
96d8682a5b Bluetooth: Shell: Fix native shell build
Following changes in HCI drivers
(https://github.com/zephyrproject-rtos/zephyr/pull/72323) the build for
the snippet allowing to have the Bluetooth shell run with BabbleSim was
broken.

Fix the snippet by disabling the HCI UART driver.

Add a twister test case that will build the snippet in CI to avoid
silent breaking.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-07-10 11:47:07 -04:00
Grzegorz Swiderski
9b682308b3 scripts: list_hardware: Find all SoCs before checking runner configs
When validating the flash runner configurations in `soc.yml`, the only
SoCs that were considered had to be defined under this structure:

   family:
     - series:
         - socs:
             - name: ...

However, the `family` and `series` keys are optional, so the `soc.yml`
files can also be arranged like this:

   family:
     - socs:
         - name: ...
   series:
     - socs:
         - name: ...
   socs:
     - name: ...

The solution is to move the validation code further down, so that it can
reuse the SoC data that was already correctly parsed while initializing
a `Systems` instance.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-07-10 11:46:52 -04:00
Nikodem Kastelik
c0d508a142 soc: nordic: common: dmm: fix region alignment getter
Getting the required alignment size for memory region node
and device node needs to be handled by a separate macro.
Otherwise alignment of single byte is reported for any region.
Add a test that checks for this particular issue.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-07-10 08:42:40 -04:00
Krzysztof Chruściński
a575d9bc31 tests: drivers: counter: nrf: fixed_top: Rework nrf54h20 cpuppr config
Rework configuration so that it does not require special treatment
in testcase.yaml.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-10 08:42:03 -04:00
Krzysztof Chruściński
407aa5cc79 tests: drivers: counter: basic_api: Rework nrf54h20 cpuppr config
Rework configuration so that it does not require special treatment
in testcase.yaml.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-10 08:42:03 -04:00
Evgeniy Paltsev
d8929b5dc6 posix: shm: fix build error with minimal libc
In `lib/posix/options/shm.c` we don't include stdio.h
header but use standard SEEK_xxx definitions (i.e. `SEEK_SET`)
which cause build issues (if the minimal libc is used).

Fix that.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-10 14:40:48 +02:00
Jordan Yates
8eff81a627 watchdog: cmsdk_apb: validate in CI
Validate driver in CI by adding the `watchdog` tag to the `mps2/an385`
platform, which uses the driver.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-10 14:39:36 +02:00
Jordan Yates
063d2ff6ec watchdog: cmsdk_apb: only support a single channel
The CMSDK watchdog hardware only supports a single timeout channel.
Return the documented error if more than one timeout is requested to be
installed.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-10 14:39:36 +02:00
Jordan Yates
9138763430 watchdog: cmsdk_apb: validate timeout window
Validate the maximum timeout window, as required by the API tests.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-10 14:39:36 +02:00
Jordan Yates
74f3b587fc watchdog: cmsdk_apb: fix period calculation
The previous calculation was multiplying the timeout in milliseconds
by the clock frequency, giving a cycle count 1000x larger than it should
be.

Fix the calculation and rename `reload_s` to `reload_cycles`, as the
cycle count is what this actually contains.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-10 14:39:36 +02:00
Emil Gydesen
6c71a88ef3 Bluetooth: ISO: Fix and format iso.h documentation
Fixed a few bad or missing documentation parts of iso.h
Also formatted some parts to be consistent with not just
the file itself, but also with bluetooth.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-10 14:38:23 +02:00
Johann Fischer
552c353969 doc: usb: add a note about the deprecation plan
Add a note about about the deprecation of current USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-10 14:36:46 +02:00
Johann Fischer
c9c35fa59f samples: usb: fix API references
Remove references to new device APIs that are not supported by the
samples. Remove the reference to the UART API from the console sample
because it is not really used there, but add it to the CDC ACM sample.
Fix references in HID, MSC and UAC2 samples.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-10 14:36:46 +02:00
Johann Fischer
1248e26b89 include: usbd: add missing macro documentation
Add missing documentation to USBD_DEVICE_DEFINE,
USBD_CONFIGURATION_DEFINE and USBD_DEFINE_CLASS macros.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-10 14:36:46 +02:00
Ben Marsh
8c0d3de0fb posix: sys: sysconf: Unconditionally define POSIX macros
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See #74623 and #74428.

The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.

This commit defines PAGE_SIZE and PAGESIZE unconditionally.

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2024-07-10 14:36:35 +02:00
Vinayak Kariappa Chettimada
f9655ac84e doc: release: 3.7: Add known issue with nRF51x SoC series Bluetooth
Add known issues section with broken Bluetooth support for
nRF51x SoC series boards.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-07-10 14:36:10 +02:00
Ayush Singh
35391f3d34 boards: ti: cc1352p1_launchxl: Refactor for beagleconnect_freedom
- Minimize diff between beagle/beagleconnect_freedom/board_antenna.c
- Make functions static
- Minor formatting
- Remove unused ANTENNA_MUX
- Use DT_FOREACH_PROP_ELEM_SEP for GPIO array

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-07-10 11:41:46 +02:00
Ayush Singh
894e7bdbdc boards: beagle: beagleconnect_freedom: Fix formatting
- Fix formatting in board_antenna.c by using the standard config in
  Zephyr.
- Reduce diff with cc1352p1_launchxl/board_antenna.c as much as possible

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-07-10 11:41:46 +02:00
Ayush Singh
2efe8765a3 boards: beagle: beagleconnect_freedom: Use sky13317
- Use antenna switch sky13317 instead of hack
- Base the board_antenna file on cc1352p1_launchxl/board_antenna.c

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-07-10 11:41:46 +02:00
Ayush Singh
49436854c8 boards: ti: cc1352p1_launchxl: Move out sky13317 bindings
- This antenna switch is used by both beagleconnect_freedom and
  beagleplay.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-07-10 11:41:46 +02:00
Declan Snyder
6eaadc312f tests: i2s_speed: Fix RT1170_EVK overlay files
Remove an overlay with a wrong name not being picked up,
and change the "A" revision overlay to be used by all revisions.

Also fix the "clocks" property in the overlay causing a fault with sai4.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-10 11:38:39 +02:00
Jamie McCrae
5b6b850fb9 scripts: requirements: Bump imgtool to 2.1.0
Updates the minimum version of imgtool to 2.1.0, which is one year
newer than the 2.0.0 release

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-10 11:38:07 +02:00
Natalia Pluta
c9f9c144e9 samples: net: cellular_modem: fix division by zero in sample_echo_packet
A hard fault occurs when the `sample_echo_packet` function attempts
to print the average time per successful echo and no packets have
been sent, resulting in a division by zero error. This fix adds a check
to ensure that `packets_sent` is greater than 0 before performing
the division. This prevents the system from halting due to a usage fault.

Signed-off-by: Natalia Pluta <pluta.natalia.m@gmail.com>
2024-07-10 11:37:44 +02:00
Jukka Rissanen
794d7cf3c5 net: sockets: Remove async service support
As found in PR #75525, we should not modify the polled fd array
in multiple places. Because of this fix, the async version of
the socket service could start to trigger while it is being handled
by the async handler. This basically means that the async version
cannot work as intended so remove its support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-10 11:36:59 +02:00
Rahul Goyal
f1e38e73d7 Drivers: max17048: updated voltage parameter output
present output shows voltage in mV.
updated output shows voltage in uV.

Signed-off-by: Rahul Goyal <goyalrahul1516@gmail.com>
2024-07-10 11:36:28 +02:00
Rahul Goyal
74c86928b2 Samples: max17048: added units to output
present sample output does not contain units.
added units to sample output

Signed-off-by: Rahul Goyal <goyalrahul1516@gmail.com>
2024-07-10 11:36:28 +02:00
Fin Maaß
f82249c932 net: ethernet: check vlan iface existence
Drop a packet, if it has a VLAN tag, for
that we don't have a VLAN interface.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-10 11:35:46 +02:00
Frank Lin
6fc525cc20 drivers: serial: uart_cdns: fix interrupt driven
Fix interrupt driven for shell

Signed-off-by: Frank Lin <linfrank@meta.com>
2024-07-09 19:45:18 -04:00
Yong Cong Sin
49e8c98996 tests: arch: common: stack_unwind: fix symtab test
The symtab test should have the
`CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` enabled. This was not
caught in the CI previously as the regex was also wrong, '['
and ']' are regex syntax and should be escaped.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-09 19:44:08 -04:00
Brett Witherspoon
cb8db004d7 drivers: dac: dac_ad569x: Fix reset error return
The intention here appears to be to return an error. Use an early return
to implement this.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-07-09 19:43:23 -04:00
Yong Cong Sin
f87539081d lib/libc: picolibc: select its source with Kconfig choice
Implement the selection of the picolibc source in a Kconfig
choice as they are mutually exclusive.

The following table represents the possible choices, where 'X'
means that `PICOLIBC_SUPPORTED=n` and is guarded in the parent
level as `PICOLIBC=n`, so we do not need to care.

Module  Toolchain    C++   |       Choice
  0         0         0    |          X
  0         0         1    |          X
  0         1         0    |    Toolchain only
  0         1         1    |    Toolchain only
  1         0         0    |      Module only
  1         0         1    |          X
  1         1         0    |   Toolchain/Module
  1         1         1    |    Toolchain only

The current implementation favors `PICOLIBC_USE_TOOLCHAIN` over
`PICOLIBC_USE_MODULE` whenever possible, that preference is
maintained in this implementation as well - the TOOLCHAIN
source will be the default choice when the toolchain supports
it or when the C++ is enabled. Otherwise, fallback to MODULE.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-09 17:29:12 -04:00
Johann Fischer
38753852c8 MAINTAINERS: move generate_usb_vif to USB-C section
Script was introduced by USB-C people.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-09 17:26:58 -04:00
Johann Fischer
46b849b586 MAINTAINERS: add maintainer and collaborator for DAP controller
Add maintainer and collaborator for DP drivers and DAP controller.
Followup on the commit 7c9259abbc
("dap: add CMSIS-DAP compatible controller")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-09 17:26:58 -04:00
Daniel Leung
0b76fd92fc tests: logging/dictionary: pytest only looks at last output
There are instances where on hardware tests would result in
multiple dictionary logging blocks. This is usually due to
flashing and running via twister in separate steps. Once
flashing is done, the device starts running and sending
logging string to output, but twister is not ready to read
them, thus leaving the strings in the host's UART buffer.
Then twister starts its testing run by resetting the device
which results in another dictionary logging block to show
up. So the pytest script has to be updated to only look at
the last dictionay logging block.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-09 17:25:22 -04:00
Daniel Leung
ea109ce39b tests: logging/dictionary: filter for backend
Since only the UART backend supports output in hexidecimal form
with dictionary logging, so filter for that or else the pytest
would fail due to none, or wrong captured output.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-09 17:24:02 -04:00
Mathieu Choplain
1fd9dc85b2 tests: drivers: adc_api: use proper printf format
This commit changes the adc_api test to use the proper printf
format specifier when printing the ADC samplings. This ensures
that all values are printed on 16-bit. Without this specifier,
negative values are sign-extended and printed on full integer
size (e.g., 0x8000 -> "0xFFFF8000").

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-09 17:23:30 -04:00
Kevin Wang
6cb8956a08 drivers: watchdog: Refine the atcwdt200 driver's code.
Remove the reset vector setting from driver layer,
the reset vector is more suitable to be set at the board layer.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2024-07-09 17:21:28 -04:00
Luis Ubieda
00a3be90d7 sensor: icm42688: Use RTIO workq on icm42688_submit
To make its execution path non-blocking from the caller's perspective.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
8d0c2f15df sensor: bme280: Use RTIO workq on bme280_submit
To make its execution path non-blocking from the caller's perspective.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
5521fc4410 sensor: bma4xx: Use RTIO workq on bma4xx_submit
To make its execution path non-blocking from the caller's perspective.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
59e8919da7 sensor: akm09918c: Use RTIO workq on akm09918c_submit
To make its execution path non-blocking from the caller's perspective.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
aff6e31ec4 sensor: fallback: Decouple RTIO request using RTIO workqueues service
Incorporate RTIO workqueues to turn sensor_submit_callback into an
asynchronous request.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
5686ac48cc tests: rtio: workq: Add testsuite to exercise RTIO work-queues
Basic tests demonstrating ability to decouple, batch-submit, preempt
and keep track of used items.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
3646b63217 rtio: Add RTIO Work-queues service
Adds ability to process synchronous requests in an asynchronous
fashion, relying on dedicated P4WQ's and pre-allocated work items.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
1f3a0910d7 tests: sensor: generic: Set thread priorities for back-to-back readings
In order to support back-to-back readings, it's required that the
RTIO workq threads priority is higher than the caller issuing the
back-to-back requests, otherwise the requests will fail as P4WQ won't
have the opportunity to clear the is_done semaphore, and the subsequent
request will be rejected.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Luis Ubieda
cc139b85df sensor: Enable RTIO Semaphores for Async API
In order to decouple the read request from its implementation, we need
to be able to yield to potential lower-priority threads, which is not
possible with k_yield() itself. As such, using RTIO Consume semaphore
enables us to achieve this.

This patch also refactors blocking API (sensor_read) to also block upon
consumption, so as not to require RTIO_SUBMIT_SEM enabled.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 17:21:05 -04:00
Devansh Tanna
6d4fba1f86 drivers: cc13xx_cc26xx: pwm: enable pwm(gpt) in sleep/deepsleep mode
- enabled GPT(PWM) peripheral for sleep/deepsleep mode in init_pwm()
- Fixed: undefined behaviour when using k_sleep()

Signed-off-by: Devansh Tanna <devansht0210@gmail.com>
2024-07-09 17:20:46 -04:00
Benjamin Cabé
95caf476f1 drivers: ptp_clock_nxp_enet: add module_dev to driver config
c8d8dce755 introduced a regression whereby driver config should hold
module device pointer, except it didn't.
This commit adds module_dev to the driver config.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-09 17:20:12 -04:00
Jean Nanchen
77f9f0e965 drivers: sensor: maxim: max31865: Fix fault bit clearing
Ensures D1 sets and D5, D3, D2 reset, preventing undefined states.

Signed-off-by: Jean Nanchen <jean.nanchen@gmail.com>
2024-07-09 15:38:19 -04:00
Thomas Stranger
48e235445b samples: sensor: ds18b20: clearly indicate any errors
Any errors are clearly indicated and program execution
ended.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger
b5d3dea894 drivers: sensor: ds18b20: indicate error for missing response
When multiple devices are on the bus, and no slave matches
the sent rom, the master receives only ones.
This should be handled explicitly and the error reporting
should not rely on the crc mismatch of the scratchpad.

Note: Make sure that the sensor configuration is loaded to the
eeprom (copy scratchpad), otherwise the resolution will not match
the expectations in case a node looses power and recovers.
As in that case the configuration will not be applied again.
Also the sensor may still report the power on reset value
of +85°C just after the sensor powered up.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger
6fd767d6e4 drivers: sensor: ds18b20: verify scratchpad write
Verify that the scratchpad write was successful by
reading back the configuration.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger
53e3936a2e drivers: sensor: ds18b20: verify crc of scratchpad.
After each read of the scratchpad the crc of the data
is checked and in case of a mismatch an error is returned.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Thomas Stranger
f4acf390dd drivers: sensor: ds18b20: cleanup header/includes
- Move the content of the header file into the source file,
and drop unnecessary includes.
- Also, drop the bus access function.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Brett Witherspoon
97190d76ec drivers: dac: dac_ad56xx: Fix channel range check
An off by one error in the channel range check results in an out of
bound access to the channel lookup array.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-07-09 15:31:58 -04:00
Emil Gydesen
35c7cd2e00 MAINTAINERS: Remove thalley from Bluetooth group
Thalley is not working with BT mesh nor BT classic
and shouldn't be assigned as reviewer for those.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-09 15:27:54 -04:00
Omer Gozderesi
1fc97561ed config: esp32: configurable UART FIFO thresholds
The existing configuration of the ESP32 UART FIFO thresholds
was fixed, leading to inefficiencies in handling
Modbus RTU packages exceeding this size.
This commit introduces two new Kconfig options,
allowing users to adjust the esp32 fifo thresholds as needed.
fixes #74311

Signed-off-by: Omer Gozderesi <omer.gozderesi@enda.com>

config: esp32:  configurable UART FIFO thresholds

The existing configuration of the ESP32 UART FIFO thresholds
was fixed, leading to inefficiencies in handling
Modbus RTU packages exceeding this size.
This commit introduces two new Kconfig options,
allowing users to adjust the esp32 fifo thresholds as needed.
fixes #74311
Signed-off-by: Omer Gozderesi <omer.gozderesi@enda.com>
2024-07-09 15:24:02 -04:00
Simon Hein
a5668c78d1 doc: guidelines: update coding guidelines docs
Remove references to a timline for the coding guidelines enforcement
stages. Mark the current stage better and add notes about the
current stage.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-07-09 15:23:18 -04:00
Declan Snyder
dd86bc63e9 boards: nxp: mimxrtxxx: Fix partition unit address
Fix the partition unit addresses not matching tthe reg addresses.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Declan Snyder
275ba61577 dts: nxp: rtxxx: Fix LPADC unit address
Fix unit address having an extra 0 in RT6xx/5xx dtsi

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Declan Snyder
d8a7b694dc dts: rt6xx: Fix DTC warnings
Fix DTC warnings caused by sram and flexspi definitions.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Declan Snyder
fb693c18ac dts: rt5xx: Fix DTC warnings
Fix DTC warnings caused by flexspi and sram node definitions.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Declan Snyder
67877e7a27 dts: rw6xx: Fix SRAM node address
DTC warning caused by reg address not matching unit address,
but SRAM node address is translated by ranges property anyways.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Declan Snyder
8c8338d456 dts: rw6xx: Fix flexspi address warnings
The unit address didn't match reg which causes the warning, but
flexspi should be part of the peripheral node space anyways.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-09 15:21:36 -04:00
Mateusz Holenko
82a83896c8 dts: npx: Fix sramx offset for LPC55S06
The current value is wrong and overlaps with `syscon`.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-07-09 15:21:14 -04:00
Robert Lubos
9db2dc4aa2 net: lib: http_server: Move stream-specific flags to stream context
The information about replied headers or END_OF_STREAM flag are
stream-specific and not general for a client. Hence, need to move them
to the stream context.

For the upgrade case, we need to allocate a new stream now when HTTP1
request /w upgrade field is received. The stream ID in such case is
assumed to be 1 according to RFC.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
0e1c0a7b6b net: lib: http_server: Fix trailing headers frame processing
In case client decides to send a trailing headers frame, the last data
frame will not carry END_STREAM flag. In result, with current logic
server would not include END_STREAM flag either, causing the connection
to stall. This commit fixes this logic, so that the server replies
accordingly in case END_STREAM flag is present in the trailing headers
frame.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
b4cfee090d net: lib: http_server: Implement proper CONTINUATION frame processing
CONTINUATION frames are tricky, because individual header fields can be
split between HEADERS frame and CONTINUATION frame, or two CONTINUATION
frames. Therefore, some extra logic is needed when header parsing
returns -EAGAIN, as we may need to remove the CONTINUATION frame header
from the stream before proceeding with headers parsing.

This commit implements the above logic and additionally adds more checks
to detect when CONTINUATION frame is expected. Not receiving a
CONTINUATION frame when expect should be treated as a protocol error.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
7e22dd45a0 net: lib: http_server: Fix frame printouts
Frame printouts should not be done from the state handlers, but rather
during state transition, otherwise a single frame can be printed several
times as new data arrive. This also simplifies code a bit, as we just
print the frame in a single place, instead of duplicating code.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
78c2f48091 net: lib: http_server: Remove upper bounds on buffer sizes
There's really no good reason to have an upper bound on the buffer sizes
and this limits testing in some cases, so just remove them.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
ccf2e9b025 net: lib: http_server: Implement proper RST_STREAM frame processing
In case RST_STREAM frame is received it should not be ignored, but the
corresponding stream should be closed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
b98edfd951 net: lib: http_server: Fix parsing of HTTP2 header frames with priority
In case priority flag is present in the HTTP2 headers frame header, we
should expect additional priority fields before the actual frame
content.

The stream priority signalling has been deprecated by RFC 9113, however
we should still be able to handle this in case some implementation
(nghttp for instance) sends them.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
2e288aed08 net: lib: http_server: Fix handling of HTTP2 frames with padding
Data and header frames can contain padding - we need to take this into
account when parsing them, otherwise the stream is broken.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
245b8351f4 net: lib: http_server: Unify HTTP2 header flags checking
Instead of multiplying function to check header flags, just have a
single one, with flag mask as parameter.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
adfdc54434 net: lib: http_server: Update HTTP2-specific structs/enums naming
For HTTP2-specific structures and enums, use "http2_" prefix to clearly
indicate the distinction from the generic HTTP stuff.

Additionally, some structures/enums describing HTTP2 protocol details
had "server" in the name, while in reality they describe nothing
server-specific. Hence, drop the "server" part where applicable.

Remove unused macros.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Robert Lubos
e1e50bdda9 net: lib: http_server: Simplify HTTP2 frame header parsing
* Remove unneeded variable.
* Use system utilities to read big endian numbers instead of parsing
  manually.
* Remove `payload` member from the http_frame structure. It's not used
  for anything useful, and could actually be misleading, as in case of
  large frames, where not entire frame is parsed at once it will point
  to incorrect location.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 15:20:57 -04:00
Guy Morand
0c9858879c samples: logging: disable usermode for some platforms
Those platfroms use rtt as debug port that conflicts with usermode, as
in 27d519b260.

Fixes #75617

Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
2024-07-09 15:20:34 -04:00
Chaitanya Tata
a63a96428e wifi_nm: Fix Wi-Fi interface backward compatibility
If newly introduced interface type is unset then return the first Wi-Fi
interface as a fallback, this fixes backward compatibility.

Also, add NM APIs and use them for type checks, rather than directly
using the type enumeration.

Fixes #75332.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-09 13:07:11 -04:00
Chaitanya Tata
0e6db9c918 modules: hostap: Fix interface addition
WPA supplicant as a network manager monitors interface events and
registers to the Wi-Fi NM module, so, adding a check for NM type before
registering the interface is wrong.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-09 13:07:11 -04:00
Brandon Allen
19d49114a6 net: net_mgmt: fixed typo in doxygen
Replaced "tight" with "tied"

Signed-off-by: Brandon Allen <brandon.allen@exacttechnology.com>
2024-07-09 19:06:56 +02:00
Emil Gydesen
bbf599a3de Bluetooth: TBS: Remove BT_TBS_TECHNOLOGY_IP
BT_TBS_TECHNOLOGY_IP is not a valid technology value
for TBS since it's not defined by the spec.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-09 19:06:29 +02:00
Marcin Niestroj
c368c332c4 drivers: wifi: esp_at: fix UDP socket setup
Right now AT+CIPSTART command is called with both "remote port" and "local
port" being set to the same number. This means that for outgoing UDP
traffic (e.g. when resolving DNS or when reaching out some application
server with CoAP over UDP) always the same outgoing port is used. Such
behavior is wrong, since by default a random outgoing port should be used.

Reusing the same port confuses server implementation that is reached out,
since especially in context of DTLS over UDP, outgoing port defines TLS
context/session to be used. Such servers often ignore TLS packets from new
sessions (e.g. after device reboot) and result in failed DTLS connection
attempts.

Commit dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
UDP sockets") added support for "server-side listening" for incoming
traffic on UDP sockets, which introduced broken behavior of using the same
remote and local port.

In esp_bind() implementation assign newly intorduced 'src' member, instead
of reusing 'dst'. Don't call AT+CIPSTART yet at this stage, as in case of
connect() Zephyr syscall esp_bind() (via bind_default() helper function) is
called implicitly to assign random generated local port, so remote port is
yet to be assigned. Check in esp_recv() whether socket was already
connected (i.e. esp_connect() was called) and if not, invoke
AT+CIPSTART (via _sock_connect()) to start listening on "server-side" UDP
socket.

This patch fixes broken behavior of always reusing the same local port for
outgoing UDP traffic. Instead, randomly generated (by Zephyr net_context
subsys) local port is used. Additionally bind() and recvfrom()
implementation (to handle server-side UDP sockets) is improved, so that
binding to 0.0.0.0 (on any interface) is possible.

Fixes: dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
  UDP sockets")
Fixes: 424ea9f5e4 ("drivers: wifi: esp_at: do not connect socket on
  bind(INADDR_ANY)")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-09 19:06:12 +02:00
Luis Ubieda
95e299ad39 sensor: lis2dux12: fix: CID 363712: Initialize mode-fs
Following the same pattern used in `lis2dux12_sample_fetch_accel`.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 19:05:03 +02:00
Luca Burelli
3cc452c92f llext: consistently use "regions" for memory areas
The term "section" has a very specific meaning in the ELF file format.
After 709b2e4 ("llext: automatically merge sections by type"), some of
the code that was originally dealing with ELF sections is now handling
"memory regions" made of multiple ELF sections of the same type.

Make sure to use the term "region" consistently in the code and
log messages to avoid confusion with the original ELF sections.

Notable exception to this is the "ldr->sect" array, which is actively
used outside Zephyr and will need to be phased out in the future.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-09 19:04:06 +02:00
Luca Burelli
2e085ba29a llext: harmonize error codes
This patch changes the error codes returned by the ELF subsystem to be
more consistent with the standard error descriptions. In particular:

- issues with the ELF file are now reported as -ENOEXEC;
- valid but unsupported edge cases are reported as -ENOTSUP;
- failures in searching for an entry are reported as -ENOENT.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-09 19:04:06 +02:00
Luca Burelli
9450240419 llext: fix table count check
llext_load() included a check to ensure that the ELF file contains all
the necessary tables, but it was not functional. Add the missing check
and rename the variable to avoid confusion with the total section count.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-09 19:04:06 +02:00
Bjarki Arge Andreasen
cdff2575a7 tests: rtc: time_incrementing: set nsec member
The rtc test suite uses timegm to convert a unix
timestamp to datetime, specifically struct tm which has no
nsec field, so the nsec field is not initialized properly.

Update tests to init nsec and isdst members of struct rtc_time.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-07-09 19:03:49 +02:00
Francois Ramu
f3c70b4ab8 tests: drivers: clock control testing on the stm32h7 serie
Disable the pll2 when clearing the clock config prior to
testing the clock_control driver for the stm32h7

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-07-09 19:03:10 +02:00
Krzysztof Chruściński
44c2b19d5e tests: kernel: timer: behavior: pytest: Adjust max stddev
Like in C test. If MAX STDDEV is lower than single clock cycle then
set it to a single clock cycle.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 19:02:51 +02:00
Krzysztof Chruściński
1968cdf556 tests: kernel: timer: timer_behavior: Tweak expected std deviation
If frequency of the system clock is lower then deviation may exceed
default value (10us). Instead of adjusting the default value, test is
rounding up expected standard deviation to a single clock cycle.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 19:02:51 +02:00
Mykyta Poturai
3afd9429c0 json: Fix alignment calculation for nested objects
Currently, json array macros are passing the outer "container" struct
to the Z_JSON_ELEMENT_DESCR macro, causing the alignment to be calculated
from the outer struct which may be incorrect. Fix this by using the
biggest shift from the nested objects to calculate the alignment as the
struct size is calculated based on the biggest alignment of it's members.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
2024-07-09 19:02:25 +02:00
Mykyta Poturai
ddb3234884 json: test: Add test for array elements alignment
Add test to check that alignment and offsets of object array elements
are calculated correctly.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
2024-07-09 19:02:25 +02:00
Nick Kraus
29084dc06b west: Regex based version finding in OpenOCD runner
Previous OpenOCD version finding would fail when additional tokens were
prepended to the 'openocd --version' output, as happens with some third-
party OpenOCD repackages (xPack for one).

Fixes: #71955

Signed-off-by: Nick Kraus <nick@nckraus.com>
2024-07-09 19:02:13 +02:00
Mathieu Choplain
662b9803fa llext: disable verbose for SLID generation scripts
This commit removes the "-vvv" argument from the SLID generation
scripts' command line when building Zephyr or an extension with
Kconfig CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID enabled. This removes
a lot of noise in the build log (usually ~250 lines) and is fine to
do because the printed information is also saved in build artifacts.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-09 17:21:18 +02:00
Pisit Sawangvonganan
9b2ab20f23 bluetooth: fix typo in (include/zephyr/bluetooth, subsys/bluetooth/)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr/bluetooth` and `subsys/bluetooth`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-09 17:20:38 +02:00
Robert Lubos
e5d67adf80 net: sockets: services: Don't modify pollfd array from other threads
pollfd array used with zsock_poll() should not be modified while inside
zsock_poll() function as this could lead to unexpected results. For
instance, k_poll already monitoring some kernel primitive could report
an event, but it will not be processed if the monitored socket file
descriptor in the pollfd array was set to -1. In result,
zsock_poll() may unexpectedly quit prematurely, returning 0 events, even
if it was requested to wait infinitely.

The pollfd arrays used by zsock_poll() (ctx.events) is reinitialized
when the service thread is restarted so modifying it directly when
registering/unregistering service is not really needed. It's enough if
those functions notify the eventfd socket used to restart the services
thread.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 17:19:12 +02:00
Henrik Brix Andersen
09d189cb71 drivers: can: loopback: increase default TX thread stack size
Increase the default TX thread stack size for the CAN loopback driver from
256 to 512 bytes as the former has shown to be too little when using the
loopback driver on real hardware.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-09 17:18:34 +02:00
Henrik Brix Andersen
7a25fbb2d7 drivers: can: loopback: set TX thread name
Set TX thread name to aid in debugging.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-09 17:18:34 +02:00
Andrey Dodonov
a4123a8ea2 net: lib: websocket: call socket poll for websocket
If we couldn't send all (or any data) via the socket,
invoke poll instead of blindly retrying and flooding the socket

Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2024-07-09 14:04:29 +02:00
Andrey Dodonov
15ead53ad9 net: lib: http: call socket poll for http_client send
If we couldn't send all (or any data) via the socket,
invoke poll instead of blindly retrying and flooding the socket.
Respect timeout through http_client_req

Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2024-07-09 14:04:29 +02:00
Pieter De Gendt
9d8881816e zbus: Use section iterator for observations
Iterating the observations can be simplified to a struct iterator instead
of first getting the count and looping afterwards.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 14:03:33 +02:00
Pieter De Gendt
058bfc8065 zbus: Fix ZBUS_CHAN_DEFINE alignment
Align trailing backslashes.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 14:03:33 +02:00
Pieter De Gendt
990c5e13cb zbus: Static channel data initialization
Init the channel data semaphore and observer list statically.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 14:03:33 +02:00
Zihao Gao
6ebb65d163 Bluetooth: fix compiling issue when either A2DP SRC or SNK are not enabled
Some of the A2DP interfaces are not defined if the corresponding feature
is not enabled, and therefore shall not be initialized.
This patchs include the interfaces/variables by the configurations to
go through the compiling stage.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-07-09 14:03:07 +02:00
Krzysztof Chruściński
4a53c69fa5 tests: logging: log_api: Fix logging.frontend.only.rt_filtering
When NO_BACKENDS was not defined then log backends were
initialized (even though not used). During the initialization
filters for that backends were configured and because of that
messages were not filtered out as expected.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 14:01:56 +02:00
Krzysztof Chruściński
347eeababf logging: Fix runtime filtering when frontend and userspace is used
When userspace is used and frontend was used for logging then runtime
filtering was failing because in user context filtering data was
accessed and filtering data is in the kernel space. Fixing that and
adding runtime filtering to the pre frontend function which is
already executed in the kernel space and filter data can be
accessed.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 14:01:56 +02:00
Krzysztof Chruściński
8ed29a625a logging: Fix UART dictionary frontend configuration
Logging string stripping depends on LOG_DICTIONARY_SUPPORT being
enabled and it was not set in UART dictionary frontend.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 14:01:56 +02:00
Krzysztof Chruściński
9876075de1 logging: Allow runtime filtering for frontend only case
Log frontend supports runtime filtering so it should be
allowed to enable it even when only frontend is used with
no backends.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-09 14:01:56 +02:00
Johann Fischer
67a31ef2d7 samples: hid-mouse: protect report buffer
Use the message queue to pass the new report from the input callback,
and use a semaphore to protect the report buffer until it is transferred
to the host.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-09 12:05:04 +02:00
Pieter De Gendt
5e4e51de78 tests: zbus: unittests: Add CMAKE_LINKER_GENERATOR case
Add a test case where the CMAKE_LINKER_GENERATOR is used.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 12:02:51 +02:00
Pieter De Gendt
a6effe318f cmake: linker_script: Fix zbus sections
Use the same zbus linker sections for CMAKE_LINKER_GENERATOR as for
linker scripts.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 12:02:51 +02:00
Pieter De Gendt
6488393937 cmake: linker_script: Add missing k_fifo section
Building for CMAKE_LINKER_GENERATOR needs a section for k_fifo kernel
objects.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-09 12:02:51 +02:00
Abderrahmane Jarmouni
472cf8a8e1 MAINTAINERS: STM32 Platforms: collaborators: remove ajarmouni-st
Starting next week, I will no longer be active on this work account,
& I will no longer be available to contribute to STM32 in Zephyr.
I will be reachable on my personal account: @JarmouniA

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-07-09 11:59:02 +02:00
Luca Burelli
5ce6a750a5 llext: add explicit cast to fix Coverity CID: 392507
From https://mails.dpdk.org/archives/dev/2021-December/231212.html:

    Downcasting a void* to struct aesni_gcm_session* caused the session
    data to be treated as tainted. Removing the void* temporary variable
    and adding a cast avoids this issue.

Try the same approach here to prevent the ldr->sect_hdrs pointer from
being treated as tainted.

May fix #74817.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-09 11:51:29 +02:00
Luis Ubieda
05f8b9c54b sensor: lps22hh: Prevent overwriting values that weren't overwritten
Previously both temperature and pressure were updated regardless of
which one was requested.

Fixes CID: 392519, GH: 74779.
Fixes CID: 392497, GH: 74777.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-09 11:51:16 +02:00
Benjamin Bigler
1db356e35c net: mgmt: Fix build error when event direct enabled without event info
If CONFIG_NET_MGMT_EVENT_DIRECT is enabled and CONFIG_NET_MGMT_EVENT_INFO
disabled it does not build because mgmt_push_event writes to non existing
struct members

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-07-09 11:49:47 +02:00
Benjamin Bigler
06a725c1c8 net: mgmt: prevent event_work_handler from blocking
Fix system workqueue block caused by mgmt_event_work_handler
when CONFIG_NET_MGMT_EVENT_SYSTEM_WORKQUEUE is enabled.

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-07-09 11:49:47 +02:00
Aksel Skauge Mellbye
a677e974ef soc: silabs: Include series-specific Kconfig
The series-specific Kconfig files were not included, leading
to RTT not being considered available.

Fixes #75511.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-07-09 08:59:02 +02:00
Jared Kangas
c0fd916fbc drivers: sensor: wsen_itds: fix device ID mismatch return value
During initialization, zero is returned if an unexpected device ID is
read because the returned variable is not written to after a previous
non-zero check. Return -EIO instead to indicate an error occurred.

Detected with the following Coccinelle script:

        @@
        identifier I;
        @@

        *if (I) {
             ...
             return ...;
         }

         if (...) {
             ... when != I
                 when any
        *    return I;
         }

Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
2024-07-09 08:56:04 +02:00
Emil Gydesen
62da8152d0 Bluetooth: BAP: Remove doc for past_sync in pa_sync_req
The past_sync field is no longer there and should not
be documented.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-09 08:50:06 +02:00
Evgeniy Paltsev
4b9828c2a8 tests: logging: fix build error
Currently we get the build error when building
'tests/subsys/logging/log_backend_uart':

error: static_assert expression is not an integral constant expression
BUILD_ASSERT(strlen(TEST_DATA) < SAMPLE_DATA_SIZE);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It can be easily workarounded by using sizeof instead of strlen
to calculate string size.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-09 08:49:05 +02:00
Evgeniy Paltsev
edfb690587 test: logging: dictionary: fix build error
In `tests/subsys/logging/dictionary` we don't include stdio.h
header but use standard stream definitions (i.e. `stdout`)
which cause build issues (if the minimal libc is used).

Fix that.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-09 08:48:24 +02:00
Jordan Yates
af0cbb19c0 scripts: twisterlib: coverage: ignore __ASSERT branches
Disable branch coverage for the `__ASSERT` family of macros. Covering
all of the assertion branches by definition means triggering the
assertion, which can be either challenging or impossible to exercise,
and in either case results in the immediate termination of the test.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-08 20:41:31 -04:00
Jordan Yates
53bd9ead64 scripts: twisterlib: coverage: fix multiple branch excludes
Multiple values for `--exclude-branches-by-pattern` will result in only
the last value taking effect. Resolve this by merging all the provided
regex patterns into a single pattern with the `|` operator.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-08 20:41:31 -04:00
Sylvio Alves
6ade0cf715 wifi: esp32: fix memory leak
In case where the system is overloaded, net stack buffer
could fail to allocate next packet. That scenario requires
wifi internal Wi-Fi driver to free current rx buffer. This is
currently not being called. This fixes it by making sure
esp_wifi_internal_free_rx_buffer() is called in all scenarios.

Fixes #63043

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-08 20:41:16 -04:00
Glenn Andrews
1c19d43564 Driver: i2c_ll_stm32_v2: Remove log msg on boot
Converts the `<inf> i2c_ll_stm32_v2: I2C TIMING` message
displayed by the driver to a LOG_DBG. Also makes an actual
error message a LOG_ERR instead of a LOG_DBG.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-07-08 20:40:54 -04:00
Marc Herbert
65f63622e2 tests: cpp: add C++ coverage for pm/device.h
Note CONFIG_PM_* affects device.h too. Even if not compiled, the more
code the pre-processor sees the better.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-08 17:20:26 -04:00
Marc Herbert
c1852b83cd pm: device.h: fix pm_device designated initializers order for C++
Fixes the following error appearing in the test coverage added by the
next commit:

In file included from zephyr/tests/lib/cpp/cxx/src/main.cpp:18:
```
zephyr/include/zephyr/pm/device.h:275:9: error: designator order for
  field 'pm_device_base::state' does not match declaration order
                        in 'pm_device_base'
  275 |         }
      |         ^
zephyr/include/zephyr/pm/device.h:315:17: note: in expansion of
                                                macro 'Z_PM_DEVICE_INIT'
  315 |              Z_PM_DEVICE_INIT(Z_PM_DEVICE_NAME(dev_id), node_id,
```

Note this failure is observed with any g++ -std=c++NN standard value -
even before C++20.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-08 17:20:26 -04:00
Marc Herbert
c25b9b240e tests: cpp: add some C++ coverage for device.h / Device Tree
This provides C++ build test coverage for device.h (notably:
Z_DEVICE_INIT() fixed in the previous commit) and for some other Device
Tree macros.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-08 17:20:26 -04:00
Marc Herbert
c275eaac2d device.h: conditionally remove init braces for C++20 compatibility
Conditionally remove braces for designated initializers of anonymous
unions. This makes it compatible with C++20 while not breaking pre-C11
gcc.

This does for device.h what commit c15f029a71 ("init.h: restore
designated initializers in SYS_INIT_NAMED()") did for init.h

See https://docs.zephyrproject.org/latest/develop/languages/cpp/ and
long discussion in #69411 for more obscure C/C++ compatibility details.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-08 17:20:26 -04:00
Sylvio Alves
e04964aebd requirements: bump pyelftools to >=0.29
The minimum version of pyelftools is 0.29 to make it working
with scripts/footprint/size_report

Fixes #75605

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-08 17:18:29 -04:00
Tom Burdick
983ee54dfd sensors: ICM42688 read/writes chain callbacks
RTIO expects the CHAINED flag to be set when ordering of operations is
important. The callbacks in the icm42688 stream handling were not
chained into, meaning the callbacks would have occured immediately
rather than *after* the SPI reads/writes.

Update all the spi transactions to chain into the desired callbacks in
the driver.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-08 17:18:16 -04:00
Krzysztof Chruściński
47df73e51b lib: os: mpsc_pbuf: Do not use sem when CONFIG_MULTITHREADING=n
When multithreading is off packet buffer should not use feature which
allows waiting for available buffer.

mpsc_pbuf is used by logging which can work in deferred mode in
no multithreading build.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-08 14:58:32 -04:00
Zhaoxiang Jin
1e93796f8f boards: frdm_mcxn947: Update index.rst
Update index.rst, lowercase regulator.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
5b8bac37d0 tests: adc: Add 'zephyr,vref-mv' property.
Add 'zephyr,vref-mv' property to frdm_mcxn947 overlay file.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
599fddc867 tests: Add frdm_mcxn947 into regulator and adc test scope
Add frdm_mcxn947 into regulator and adc test scope

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
2bd4151ac6 docs: migration-guide: Add NXP LPADC driver update info
Add NXP LPADC (nxp,lpc-lpadc) driver update info.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
630203de97 drivers: lpadc: Update lpadc driver to use the latest feature
Updated nxp lpadc driver, because the phandle type property
'nxp,reference-supply' was removed, and a new phandle-array
type property 'nxp,references' added.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
2eb61a82da dts: arm: nxp_mcxn947: Add 'nxp,reference-cells' for vref node
Add new property 'nxp,reference-cells' for vref node.
Remove lpadc nodes 'nxp,reference-supply' property.
Add new property 'nxp,references' for lpadc nodes.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
8b01be8a16 dts: bindings: lpadc: Change 'nxp,reference-supply' property
Remove 'nxp,reference-supply' property.
Add new phandle-array type 'nxp,references' property.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Zhaoxiang Jin
bb524682c7 dts: bindings: vref: Add specifier cells for nxp vref
Add specifier cells for nxp vref, when some other
peripherals use the vref to provide reference voltage,
this cells can be used to pass-in vref target voltage.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Szymon Janc
7bfd6b6256 test: bluetooth: Update ICS to TCRL 2024-1
This ICS was generated with new Qualification Workspace tool.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-07-08 14:57:12 -04:00
Szymon Janc
8665117411 test: bluetooth: Remove qualification project BLS file
With new BT SIG Qualification Workspace it is no longer possible to
export/import full project. Only ICS export/import is possible.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-07-08 14:57:12 -04:00
Mateusz Holenko
bea06ae846 drivers: i2c: configure sleep pins for Smartbond I2C
Adds missing i2c_sleep pins configuration definition required
to properly support power management operations for
Smartbond I2C controller on da14695_dk_usb board.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-07-08 14:56:14 -04:00
Sylvio Alves
5196bdf964 drivers: eth: esp32: fix build to enable statistics
When CONFIG_NET_STATISTICS=y is enabled, build fails
due to wrong interface pointer.

Fixes #75515

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-08 14:55:47 -04:00
Flavio Ceolin
96b9ab7827 doc: relnotes/3.7: Add info about CVE-2024-6258
Information about CVE-2024-6258 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-08 14:55:33 -04:00
Alberto Escolar Piedras
65fb6264cb samples/drivers/adc/adc_sequence: Build fix for sam_v71_xult
Fix build error due to cmake requiring a separate
overlay for each of this target's SOCs.

Error being fixed:
```
-- Board: sam_v71_xult, qualifiers: samv71q21
CMake Error at cmake/modules/extensions.cmake:2742 (message):
Board sam_v71_xult defines multiple SoCs.

Shortened file name (sam_v71_xult.overlay) not allowed, use
'<board>_<soc>.overlay' naming
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-08 14:55:15 -04:00
Alberto Escolar Piedras
bf53b06a06 tests/drivers pwm_clock: Build fix sam_v71_xult
Fix build error due to cmake requiring a separate
overlay for each of this target's SOCs.

Error being fixed:
```
-- Board: sam_v71_xult, qualifiers: samv71q21
CMake Error at cmake/modules/extensions.cmake:2742 (message):
  Board sam_v71_xult defines multiple SoCs.

  Shortened file name (sam_v71_xult.overlay) not allowed, use
  '<board>_<soc>.overlay' naming
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-08 14:55:15 -04:00
Hess Nathan
980d3f4c4f kernel: corrected parameter names
- applied the exact parameter names of the interface to implementation

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-07-08 12:18:31 -04:00
Adrien Ricciardi
8ca14a7762 fs: nvs: Add more strict checks to determine if an ATE is valid
Make sure that the ATE metadata does not overflow the sector size.
Take into account the data length and also the mandatory reserved ATEs
in each sector.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-07-08 12:15:42 -04:00
Tomi Fontanilles
83cd9f5a01 modules: mbedtls: properly guard PSA_CRYPTO_C
Instead of silently `#undef`ing PSA_CRYPTO_C when TF-M is in use,
enforce that rule at the Kconfig level.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-08 12:14:49 -04:00
Johann Fischer
48dd5c9915 sample: usb: allow samples to be built on all platforms with 'usbd'
Replace platform_allow with integration_platforms, what allow CI to
build samples on all platforms with test feature 'usbd' but still limits
number of platforms when it is invoked with the --integration option.
Replace/add some platforms that already have test feature 'usbd'.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-08 12:13:54 -04:00
Jens Rehhoff Thomsen
efddc8723c Bluetooth samples: Broadcast code handling
The broadcast sink sample no longer treats the broadcast_code_received
semaphore as a boolean.

Fixes #75469

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-07-08 12:12:54 -04:00
Sylvio Alves
3163680427 soc: esp32c6: remove idle source file
risc-v idle call is being fetched from arch/ implementation.
This soc file is not used and can be removed.

Fixes #75540

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-07-08 12:12:21 -04:00
Henrik Brix Andersen
bbf5183996 MAINTAINERS: use shorter, more intuitive label for llext
Use a shorter, more intuitive label for the Linkable Loadable Extensions
(llext) area.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-08 16:04:13 +02:00
Andrej Butok
c3dd3c69ac soc: nxp: add flashing configuration
- Added a flash runner configuration for rw, mcx, lpc, kinetis and imxrt,
  used for sysbuild multi-image projects like MCUBoot.
- Solved the mass erase issue.
- The sysbuild project "west flash --erase" command caused
  the mass_erase->flash_img1->reset->mass_erase->
  flash_img2->reset sequence.
  It was fixed to the mass_erase->flash_img1->
  flash_img2->reset sequence.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-07-08 16:04:04 +02:00
Emil Gydesen
5901dcbaa7 Bluetooth: Kconfig: Increase BT_HCI_TX_STACK_SIZE for ISO_BROADCAST
When using an encrypted broadcast, the previous value is no
longer enough and caused a stack overflow.

Slightly increased the value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-08 16:03:21 +02:00
Pieter De Gendt
0e9a6ee802 net: buf: Add const to net_buf API
Some public API functions do not modify the net_buf instances and can
declare these arguments as const.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-08 16:02:39 +02:00
Stephan Linz
e823cc5fb4 modules: lvgl: fix initialization macro syntax
Adding a semicolon after the do-while loop in the LV_DEV_INIT()
macro also supports multiple instantiation.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-07-08 15:53:46 +02:00
Daniel Leung
bebff3fb35 soc: mt8195: remove prompts for SoC kconfigs
This removes the prompts for the mt8195 and related kconfigs,
so these cannot be overridden from command line (though
technically they cannot be disabled as they are being selected).
This also prevents them from appearing in the build .config
file as not being set even when we are being for other SoCs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-08 15:53:08 +02:00
Henrik Brix Andersen
370787a227 doc: hardware: peripherals: eeprom: reorganize and add EEPROM shell page
Reorganize the EEPROM periheral documentation to make room for subpages
with additional details. Add a page describing the EEPROM shell module.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-08 15:52:21 +02:00
Pisit Sawangvonganan
5ed3cd4bc9 kernel: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `kernel` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-08 15:51:37 +02:00
Nazar Palamar
b55999d3de samples: bluetooth: exclude cyw920829m2evk_02 from build
exclude cyw920829m2evk_02 from build. For cyw920829m2evk_02
need `west bloobs fetch` (to get BT fw),  which does not
allowed in CI.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-07-08 15:51:21 +02:00
Nazar Palamar
bf17ba9d43 driver: spi: psoc6: fix build error in driver
fix build error related to pinctrl.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-07-08 15:51:21 +02:00
Jiafei Pan
1ed04e7b49 board: imx8mp_evk: update doc to add remoteproc boot
Add document for boot M7 Core by using Linux remoteproc to address
some known issues when boot DDR Zephyr kernel.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-07-08 12:53:22 +02:00
Nils Larsen
dcfc3e7872 drivers: gpio: imx rt11xx: fix wrong gpio pull disable mask
Fixes: #75390
A wrong bit mask (wrong: IOMUXC_SW_PAD_CTL_PAD_PUS_MASK = 0x8) was used.
That bit mask is for PUE/PUS-type gpio registers, but this is the
section for registers with alternative PULL (PDRV) type layout.
Right bit mask: IOMUXC_SW_PAD_CTL_PAD_PULL_MASK

Signed-off-by: Nils Larsen <nils.larsen@posteo.de>
2024-07-08 09:30:15 +02:00
Mark Wang
2ee21ecc0b boards: nxp: add test feature 'usbd' to mimxrt1170_evk
mimxrt1170_evk has supported usb device next stack.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-07-08 09:28:41 +02:00
Mark Wang
0141bc0f40 sample: usb: mass: add next device sdcard test case
update the sample.yaml file.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-07-08 09:28:41 +02:00
Mark Wang
9a45300ab5 boards: nxp: enable mcux udc on RT1170-EVK
enable clock and usb phy device tree

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-07-08 09:28:41 +02:00
Emil Gydesen
c46b2e086b Bluetooth: Kconfig: Add dependency on BT_CONN for PAST
PAST only works if you have a connection, so the PAST
feature should depend on that.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-08 09:27:11 +02:00
Emil Gydesen
711b42ae16 Bluetooth: Host: Fix recv_enabled field for PAST
When syncing to a PA using PAST then the sync_info.recv_enabled
was always just set to true, regardless of what mode was set
during the subscribe parameters.

The mode(s) are now stored in an array (with the default value
as well) so that we can retrieve that information when the PA
has synced via PAST.

It was considered to put the `mode` value into the `bt_conn`
struct, but that would require an API change as the `bt_conn`
parameter for the subcribe function uses `const`.

This commit also modifies the guard for PAST to be the more
correct value CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER instead
of just CONFIG_BT_CONN.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-08 09:27:11 +02:00
Jordan Yates
0010dec4f0 watchdog: wdt_nrfx: don't zero init static
Don't zero initialise the static data structure, as statics are
explicitly initialised to 0 per the C standard, and checkpatch normally
complains about the pattern.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-08 09:25:24 +02:00
Jordan Yates
23afa2124f watchdog: wdt_nrfx: install return error if enabled
Return the documented error if `wdt_install_timeout` is called after
`wdt_setup`, instead of triggering the state assertion inside of
`nrfx_wdt_channel_alloc`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-08 09:25:24 +02:00
Jordan Yates
7fe440121f watchdog: wdt_nrfx: feed return error when not enabled
Return an error code if `wdt_feed` is called before `wdt_setup`, instead
of triggering the state assertion inside of `nrfx_wdt_channel_feed`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-08 09:25:24 +02:00
Hake Huang
e0f772e880 test: pytest: add linkserver support in pytest
pytest supporting add linkserver for nxp platforms

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-07-08 09:23:48 +02:00
Pisit Sawangvonganan
eead5104fc doc: fix typo in multiple directories before v3.7.0 release
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `doc` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-08 09:21:24 +02:00
Declan Snyder
33c87c8e8b boards: frdm_rw612: Fix flash size
Flash size property is in bits, not bytes. The size
of this flash is 512 Mbits, fix this mistake.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-08 09:21:01 +02:00
Alberto Escolar Piedras
a912bb6f14 tests/subsys/ipc/pbuf: Filter out partial native/posix arch builds
Some AMP native simulator targets (like the nrf5340bsim net core)
will not produce a final executable if only one of the core images
is built, when IPC is enabled, as those images require the other
core image to be able to link.
So this test cannot be run when targetting that core alone
(without using sysbuild to build the other).

Let's filter out these targets to avoid twister building
but finding itself with no executable and error out badly
as it cannot run the test.

The filter condition is effectively:
If building for a native target, there must be an .exe being
produced.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-06 17:03:26 +02:00
Alberto Escolar Piedras
7826f7cd20 boards: nrfbsim: Fix testargs with non host libC
Ensure that we call the host libC when allocating space
for a possible set of test arguments even if we are
building Zephyr with an embedded libC.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-06 17:03:26 +02:00
Alberto Escolar Piedras
3da87b9779 kernel kconfig: Do not enable STATIC_INIT_GNU w the old native_posix
native_posix (unlike native_sim) or its breathen (NATIVE_APPLICATION)
link together the "runner" code and the embedded code.
This means that when CONFIG_STATIC_INIT_GNU is set,
any host library code (like the llvm fuzzer) constructors will get
postponed to the Zephyr initialization.
These libraries are unlikely to work if we do this.
(the llvm fuzzer does not)

So let's instead not enable STATIC_INIT_GNU for these targets.
This means possible embedded library constructors will continue to be
picked during the link and be still called during the native runner
initialization instead of during the Zephyr OS initialization as they
were just before we introduced STATIC_INIT_GNU in
6e977ae2d5

Note that native_posix will be deprecated shortly and its users
are strongly encouraged to move to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-06 17:03:18 +02:00
Pisit Sawangvonganan
41b941f9d2 include: drivers: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr/drivers` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-06 17:03:10 +02:00
Robert Lubos
e91c47d338 samples: net: zperf: Optimize configuration for better performance
Increase the number of network packets and buffers for better TCP
performance in the sample out-of-the-box.
Decrease the network buffer data size for better buffer management in
the sample (less buffer space wasted for L2 header). The only drawback
of this is reduced TCP TX performance, but less than 2 Mbps in my case.
Finally, enable speed optimizations for another small performance boost.

As the RAM requirements of the sample now increase considerably in the
default configuration, add a note in the readme file about it, and how
to make it fit into smaller boards.

Tested on nucleo_h723zg:
  Before (current defaults):
    UDP      TX          RX
         76.47 Mbps  93.48 Mbps
    TCP      TX          RX
         76.18 Mbps  67.75 Mbps

  After (new defaults):
    UDP      TX          RX
         76.08 Mbps  93.62 Mbps
    TCP      TX          RX
         74.19 Mbps  85.51 Mbps

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-06 17:03:01 +02:00
Emil Gydesen
d05f211289 tests: Bluetooth: tester: Re-add support for checksum
The bug should be fixed now, so it possible to have it enabled as
long as OTS is not registered with the feature flag.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-06 17:02:23 +02:00
Emil Gydesen
03d07950aa Bluetooth: OTS: Fix issue with callbacks not being set
The checks for callbacks in bt_ots_init did not correctly take the
ots_init->features.oacp into account for all callbacks, which
caused some issues.

Slightly optimized the check for ots->cb->obj_read by moving the check
and reducing the number of places the code calls oacp_read_proc_cb.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-06 17:02:23 +02:00
Emil Gydesen
08b9ca4356 samples: Bluetooth: central_iso: Remove K_FOREVER for buf alloc
Allocating a buffer in the system workqueue thread should never
be done wiht a K_FOREVER as that may block the thread forever.

Replace the K_FOREVER with a K_NO_WAIT and slightly modified
the function to handle this case.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-06 17:01:34 +02:00
Marcin Niestroj
2e956c239b drivers: wifi: esp_at: check if MAC address was parsed successfully
Log an error when MAC address was not parsed successfully.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-05 18:45:47 +02:00
Marcin Niestroj
4150765549 drivers: wifi: esp_at: use memcpy() to copy SSID
Target SSID buffer might not be NULL terminated, so use memcpy() instead of
strncpy() for copying it from temporary (AT response fragment) buffer.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-05 18:45:29 +02:00
Marcin Niestroj
f15c4e3adb drivers: nsos: fix resource leak in nsos_adapt_accept() error path
Close file descriptor returned by accept() in error path of
nsos_adapt_accept(), so that file descriptor is not leaked.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-05 18:44:13 +02:00
Jonathan Rico
be61ae4c9c Bluetooth: host: disallow scan with timeout when BT_PRIVACY=y
See comment in code.

Fixes #73634

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-05 18:43:40 +02:00
Miguel Gazquez
3408694960 drivers: memc: fix Kconfig option MEMC_STM32
This commit fixes a bug with the declaration of the Kconfig option
MEMC_STM32.

The option is defined in two files:
- `drivers/memc/Kconfig.stm32`, wich depends on
   - `MEMC`
   - `DT_HAS_ST_STM32_FMC_ENABLED`
-`soc/st/stm32/Kconfig.defconfig`, wich depends on
   - `MEMC`
   - `SOC_FAMILY_STM32`

So, if you have `CONFIG_MEMC=y` in your Kconfig options and you are on a
STM32 SoC, `CONFIG_MEMC_STM32` will be enabled, even if there is no
STM32 FMC enabled.

This Kconfig option causes the driver for the STM32 FMC to be compiled,
regardless of the presence of an enabled node for the FMC.
However, the driver fails to compile if there is no FMC node in the
devicetree. So, if you compile a project with `CONFIG_MEMC=y` on a board
with an STM32 SoC and no enabled FMC, the build will fail.

This commit deletes the Kconfig declaration in the `Kconfig.defconfig`,
as it isn't useful and is the one provoking the bug.
It also add in the `Kconfig.stm32` the compatible `st,stm32h7-fmc`, wich
use the same driver and so need to be enabled by the same Kconfig
option.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-05 18:43:06 +02:00
Emil Gydesen
877895afa5 Bluetooth: GATT: Add additional documention to bt_gatt_unsubscribe
The subscribe parameters shall be a struct that has previously
been subscribed to, as it works as a linked list.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-05 18:41:52 +02:00
Luca Burelli
e35126f83a soc: intel_socfpga_std/cyclonev: enforce ARM_AARCH32_MMU
Currently the code in soc.c depends on the MMU of the CPU being enabled,
but this is not enforced. It is thus possible to cause a build error by
manually disabling it (as is required for some LLEXT tests, see #75289).

Make sure this is averted by explicitly selecting ARM_AARCH32_MMU in the
SoC Kconfig.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-07-05 18:39:53 +02:00
Fabio Baltieri
ac27d81a95 boards: nucleo: tag some st boards to test for "usbd"
Add the usbd test tag to few ST boards, this should be picking a board
for every variation of the HAL file (checked for #define USBD_FS_SPEED),
so it should catch any inconsistencies between HALs.

There should be one for each of: f0 f1 f2 f3 f4 f7 g0 g4 h5 h7 l0 l4
l5 u5 wb.

Nothing for l1, can't find any boards with a USB port.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-05 18:39:44 +02:00
Fabio Baltieri
4877efd78a boards: nucleo_f042k6: enable USB
The board has a USB port, enable it in devicetree so we can build USB
tests for it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-05 18:39:44 +02:00
TOKITA Hiroshi
40629ac9f9 fb: cfb: Fix CID 394240
This is a simple deletion of unnecessary processing.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-05 18:39:22 +02:00
Jonathan Rico
a7c5fb7065 Bluetooth: GATT: factor out notify callback
- De-duplicate code
- Add `LOG_WRN` on unsubscribe error

Fixes #74720
Fixes #74721

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-05 18:38:17 +02:00
Grzegorz Swiderski
7a10c7dff1 scripts: west_commands: Fix west boards for SoC and arch in modules
Fixes #71761

The `west boards` command parses extra BOARD_ROOTs from Zephyr modules,
so that the boards defined in those modules are automatically listed.

In HWMv2, OOT boards can be described in terms of OOT SoCs, which means
that extra SOC_ROOTs must also be provided. Otherwise, an error message
will be displayed when attempting to list all boards. Therefore, every
Zephyr module SOC_ROOT should be included as well.

In HWMv1 (deprecated), OOT boards can be defined in terms of OOT archs,
but module ARCH_ROOTs had never been included automatically. The fix for
this is long overdue, but it's included for symmetry.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-07-05 14:55:08 +02:00
Lyle Zhu
c9708ff951 Bluetooth: A2DP: Check the pointer before using
Check the pointer `sep` before using it.

Fixes #74734.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-05 12:33:38 +02:00
Lyle Zhu
8276d4f79a Bluetooth: A2DP: Fix NULL pointer references issue
The opposite logic is used to determine if a
pointer is valid.

Correct the judgment logic.

Fixes #74728.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-05 12:32:41 +02:00
Lyle Zhu
6fad658569 Bluetooth: A2DP: Fix NULL pointer references issue
The opposite logic is used to determine if a
pointer is valid.

Correct the judgment logic.

Fixes #74732.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-05 12:32:05 +02:00
Yong Cong Sin
89bf4b2ad9 lib/libc: select PICOLIBC_SUPPORTED if toolchain has it or module exists
Currently, `PICOLIBC_SUPPORTED` could be enabled even when
neither the toolchain has picolibc nor the picolibc module is
present, this can be the case when Zephyr is built with
external toolchain (non-Zephyr SDK) + external build system
where PICOLIBC module doesn't exist.

Fix this by having `PICOLIBC_SUPPORTED` depends on either
toolchain OR module, while taking the libc++ into
consideration.

Here's the full logic table of when the PICOLIBC should
be marked as supported.

libc++  TOOLCHAIN       MODULE          PICOLIBC_SUPPORTED
  0         0             0                     0
  0         0             1                     1
  0         1             0                     1
  0         1             1                     1
  1         0             0                     0
  1         0             1                     0
  1         1             0                     1
  1         1             1                     1

Co-authored-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-05 12:30:42 +02:00
Yong Cong Sin
7950638e53 lib/libc: picolibc: cleanup PICOLIBC_USE_TOOLCHAIN dependencies
Since `PICOLIBC_USE_TOOLCHAIN` is available only if
`PICOLIBC` is enabled, it doesn't need to depend on the latter
again.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-05 12:30:42 +02:00
Robert Lubos
4625fa713f net: mqtt: Fix possible socket leak with websocket transport
In case underlying TCP/TLS connection is already down, the
websocket_disconnect() call is expected to fail, as it involves
communication. Therefore, mqtt_client_websocket_disconnect() should not
quit early in such cases, as it could lead to an underlying socket leak.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-05 12:29:33 +02:00
Lyle Zhu
9be685eefe Bluetooth: A2DP: Access pointer if it is valid
Only access if the pointer `stream` is valid.

Fixes #74735
Fixes #74740

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-05 12:28:45 +02:00
Emil Gydesen
19fe0673f9 Bluetooth: ISO: Tone down some dbg logs
Several log statements were using the regualar LOG_DBG,
but when ISO is actually used, those were called every TX
which at 10ms SDU intervals would fill up the log really fast
and not provided much value outside of some specific debugging.

Modified those logs to use BT_ISO_DATA_DBG which is another
log level for ISO data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-05 12:28:01 +02:00
Carlo Caione
2e1c04a9d4 manifest: Bump libmetal and open-amp
To v2024.05.1

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2024-07-05 12:26:54 +02:00
Jared Kangas
34e4edc28a drivers: eeprom: emulator: correct improper exponentiation
The top-level driver comment states that a uint16_t is used to store
changes if the EEPROM size is smaller than 64kB, or uint32_t otherwise.
However, the 64kB threshold is represented as 2^16 in the actual code,
which is a bitwise XOR instead of an exponent. This causes a uint16_t
to be used only if the size is less than or equal to 18 bytes. Correct
this by using KB(64) instead of 2^16.

Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
2024-07-05 09:18:31 +02:00
Flavio Ceolin
f80c75c3da doc: security: Disclose CVE-2024-3332
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-05 09:18:20 +02:00
Sigmund Klåpbakken
0f776cf0bf arch: arm: cmake: Correct endian in output format
Sets the property `PROPERTY_OUTPUT_FORMAT` to `elf32-bigarm` when
`CONFIG_BIG_ENDIAN` is set to `y`.

Signed-off-by: Sigmund Klåpbakken <sigmundklaa@outlook.com>
2024-07-04 18:01:51 -04:00
Sigmund Klåpbakken
5100f1185d arch: arm: cortex_a_r: Set XPSR endianness bit
When this bit is not set, it defaults to 0 (little endian). This
causes issues for big-endian devices, as data will be accessed using
little endian.

Signed-off-by: Sigmund Klåpbakken <sigmundklaa@outlook.com>
2024-07-04 18:01:51 -04:00
Guennadi Liakhovetski
fb53d2ef8d ace: power: replace pseudo-assembly movi
When switching off memory banks we cannot use movi with arbitrary
immediate arguments, they will be converted by the compiler to memory
accesses. Only constants within the allowed range should be used.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-04 18:01:02 -04:00
Daniel Leung
4ffb813110 tests: logging/dictionary: wait longer for first output
Some hardware takes longer to boot before any output is visible
from the app. So lengthen the initial timeout on waiting for
any output.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 18:00:47 -04:00
Daniel Leung
ddfc39bd63 tests: logging/dictionary: fix pytest log parsing regex
When doing device testing, there may be some other characters
being printed before the dictionary logging header string.
Also the delay boot banner may also be there. So change
the regex to ignore those them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 18:00:47 -04:00
Daniel Leung
04c9637db7 tests: logging/dictionary: fix pytest when built with sysbuild
With sysbuild, the test app is actually built under another
layer of directory where the dictionary JSON file will reside.
Instead of simply using dut.device_config.build_dir, use
dut.devive_config.app_build_dir instead, which takes into
account of that.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 18:00:47 -04:00
Jonathan Rico
ac37d6483a Bluetooth: Host: Remove conn param update checks
The rationale behind that change is that the Application can use the
`bt_conn_le_param_update()` API to signal the controller to reschedule
the link.

Even if the new connection params are within the old ones, the
controller would be free to choose an e.g. smaller interval. The host
API should not prevent this usage.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/74292

Co-authored-by: Knut Eldhuset <knut.eldhuset@nordicsemi.no>
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-04 18:00:35 -04:00
Hou Zhiqiang
2afc6f0210 boards: imx93_evk: ca55: correct board name in yaml
Correct the board name.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-07-04 18:00:17 -04:00
Joakim Andersson
1f07347746 logging: Fix missing CONFIG_ prefix
Fix missing CONFIG_ prefix for log format section strip check.
Logging was still operating on invalid flash addresses.

Fixes #75161

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-07-04 18:08:55 +02:00
Jonathan Rico
3af358d6fd Bluetooth: remove host/adv/resume test
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.

That feature is going away, see #72567.

Prepare that work by removing this test that's in the way.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-04 18:01:03 +02:00
Adam Berlinger
fd45773616 west.yml: stm32: Set __SAUREGION_PRESENT to 0 for STM32H503
This is a mistake in CMSIS header file, since SAU is not present
on STM32H503 devices

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
2024-07-04 18:00:45 +02:00
Erwan Gouriou
b98efa2b87 doc: release-notes-3.7.rst: STM32 additions
Update V3.7.0 release notes with new SoC, boards, drivers and features
related to STM32.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-07-04 18:00:16 +02:00
Erwan Gouriou
e4b03b79e6 samples: stm32: i2c_timing: Fix README header
Move sample README header to the new format designed for cross reference.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-07-04 18:00:16 +02:00
Daniel Leung
b118da62b8 doc: release,migration-notes/3.7: add bits for serial
This adds some bits about serial drivers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 17:59:57 +02:00
Daniel Leung
f797508c06 doc: release-notes/3.7: add bits about Xtensa architecture
Adds some bits on Xtensa architecture.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 17:59:57 +02:00
Daniel Leung
e783ec6d21 doc: release-notes/3.7: add some bits about I3C
This adds some bits about additions and improvements on I3C.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 17:59:57 +02:00
Daniel Leung
9750920c79 doc: migration-notes/3.7: moving of arch_interface.h
Mention the moving of arch_interface.h from include/zephyr/sys/
to include/zephyr/arch/.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 17:59:57 +02:00
Daniel Leung
018d41845e doc: release-notes/3.7: bits for PCIe
Mention the removal of two functions that have been deprecated
since v3.3.0.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-04 17:59:57 +02:00
Alberto Escolar Piedras
1a1032de48 samples/net/dhcpv4_client: Exclude native_posix due to EVENTFD
EVENTFD is not anymore compatible with these targets so let's
disable them with this sample to avoid a failure in twister
otherwise.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-04 17:59:34 +02:00
Dat Nguyen Duy
2457f730f4 soc: nxp_s32: disable TCP/UDP checksum only if eth driver enabled
Only disable TCP/UDP software checksum if the ethernet
driver enabled. This is to avoid interfere with net tests
which don't need the on board driver to function

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-07-04 13:36:55 +02:00
Derek Snell
a610b923df boards: nxp: mimxrt1160_evk: enable LPI2C5 inputs
Enable inputs in pinctrl config.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-07-04 13:27:03 +02:00
Derek Snell
78fd771640 boards: nxp: mimxrt1160_evk: fix LPI2C pinmux
Fixes typos in pinctrl pinmux nodes

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-07-04 13:27:03 +02:00
Leifu Zhao
f504935843 dts: x86: intel: ish: Remove d0i1 and modify d0i2
Remove d0i1 and change threshold for d0i2 to 10ms for pm setting
according to the requirements to pass CTS for chrome projects.

Signed-off-by: Leifu Zhao <leifu.zhao@intel.com>
2024-07-04 13:26:24 +02:00
Aleksander Wasaznik
c33e721c01 Bluetooth: host: test: remove adv/resume2
I am the original author of the test that is being removed. The test was
added in https://github.com/zephyrproject-rtos/zephyr/pull/70670 to try
to specify the behavior of automatic advertiser resuming in the Host.

It turns out now that the behavior of this feature depends on which
Controller is in use and can fail incorrectly.

The test assumes the DUT will be able to create `CONFIG_BT_MAX_CONN`
peripheral connections. But this is not necessarily true. E.g. Some
Controllers, like the SoftDevice Controller, may reserve some Host
connection slots for central roles, making the max number of peripheral
connections smaller.

In conclusion, the test is not correct and should be removed.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-07-04 13:26:01 +02:00
Henrik Brix Andersen
ec601b89df doc: update documentation to use the --shield west build command arg
Update zephyr-app-commands to generate "west build --shield ..." for west
invocations using shields while still generating "cmake .. -DSHIELD=..."
if the tool is set to "cmake".

Updated the various shield documentation pages to recommend using
"--shields" over "-DSHIELD" to match the results of the corresponding
zephyr-app-commands code snippets.

Add proper support to zephyr-app-commands for specifying multiple shields
(using a comma-separated list) and fix a few invocations to use this.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-04 13:25:00 +02:00
Flavio Ceolin
0d0c5afe7a doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-6444

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
5b484b0948 doc: relnotes/3.7: Add info about CVE-2024-6444
Information about CVE-2024-6444 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
c8987a917c doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-6443

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
22e94def61 doc: relnotes/3.7: Add info about CVE-2024-6443
Information about CVE-2024-6443 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
2251e3c0d2 doc: relnotes/3.7: Add info about CVE-2024-6259
Information about CVE-2024-6259 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
0f4f7431ca doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-6442

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Flavio Ceolin
b3e7115f34 doc: relnotes/3.7: Add info about CVE-2024-6442
Information about CVE-2024-6442 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-04 08:35:29 +02:00
Dev Joshi
a9e6fa4b29 drivers: I2C_DW: Fix I2C scan example
Solves two identical issues listed below:

Issue 1: I2C scanner example for DesignWare hardware gets stuck
indefenitely resulting in system hang up.This is because DW I2C driver
does not handle 0 byte transfer correctly which is the case for I2C
scan example.

Fixed it by overwriting the msg length to 1 if it is 0 and the
buffer is not NULL.

Issue 2: Similarly, if the I2C pins are not pulled up (nothing connected
 to I2C pins), the DW hardware does not actually send the data
(assuming contention on the bus) hence not releasing the semaphore
resulting in calling thread waiting forever.

Fixed it by adding a timeout to k_sem_take call and return error if
cannot successfully acquire it.

Tested scenarios where nothing was connected on the bus and saw the
I2C scan example complete the whole scan command. Then connected
two different sensors on the I2C bus and saw both the address on the
console. Tested both the uses cases on Raspberry Pi Pico.

Fixes #70332.

Found that micropython tackles the same issue by implementing I2C scan
commands with Soft I2C because the same reason mentioned in Issue 1.

Signed-off-by: Dev Joshi <quic_devbhave@quicinc.com>
2024-07-04 08:23:43 +02:00
Armando Visconti
cd7119d292 drivers/sensor/st: ism330dhcx: fix gyro range setting
Fix ism330dhcx_gyro_fs_map[] and ism330dhcx_gyro_fs_sens[] arrays
initialization in order to be able to correctly convert from dps
to register raw value through the array index.

Fix: #72617

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-07-04 08:19:03 +02:00
Armando Visconti
50ad2e05dc drivers/sensor/st: ism330dhcx: fix odr setting
Loop inside the odr array until we find the first
value which is "<=" (amd not "==") the argument.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-07-04 08:19:03 +02:00
Furkan Akkiz
abef5a3c86 drivers: serial: uart_max32: Fixing bugs and code optimizations
- Defined 'api_configure' function outside of
'CONFIG_UART_USE_RUNTIME_CONFIGURE' macro because it is the only
configuration function and used in device initialization function.
- Removed unnecessary 'IF_ENABLED' part.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-07-04 08:17:27 +02:00
Fabio Baltieri
cac70373aa github: hello_world_multiplatform: upgrade from macos-12 to macos-13
Upgrade the CI image for x86 macos from 12 to 13, this is apparently the
latest "free" x86 macos runner that will be supported, let's switch to
it until it gets deprecated.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-03 17:00:50 -04:00
Marcin Niestroj
248e54f9c1 drivers: nsos: add missing 'break' in switch statements
There are 2-level switch statements (one switch inside another) which were
not properly terminated with 'break' statements, leading to implicit
fallthrough. Fix that.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-03 17:00:28 -04:00
Nicolas Pitre
0c1301e728 demand_paging: LRU eviction: remove restriction on PF index 0
The first page frame index was reserved for head and tail ^pointers.
However there are cases where the first frame is actually made
evictable and would trigger the assertion guarding against that.

Fix this by applying an offset to actual frame indexes.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-07-03 15:07:03 -04:00
Alessandro Manganaro
375bf0b835 drivers: bluetooth: hci: hci_stm32wba.c
Providing setup implementation for
STM32WBA BLE HCI driver

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-07-03 15:06:48 -04:00
Alessandro Manganaro
2c42032ef4 drivers: bluetooth: hci: Kconfig
Enabling BT_HCI_SET_PUBLIC_ADDR option for
STM32WBA BLE HCI driver

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-07-03 15:06:48 -04:00
Filip Kokosinski
dcc5dd27fa soc/openisa: rely on the CONFIG_RISCV_ISA_EXT_* options for arch string
This commit makes the RV32M1 SoC rely on the default behavior of relying on
the `CONFIG_RISCV_ISA_EXT_*` config options, and removes the
`zephyr_compile_options` override when the standard toolchain is used.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-03 15:06:14 -04:00
Filip Kokosinski
18ddac4acf soc/openisa: enable the C extension
According to the RV32M1 Series Manual, Rev 1.1 RV32M1 series supports the C
extension, and doesn't support the A extension. Apply fixes accordingly.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-03 15:06:14 -04:00
Nazar Palamar
af04e0d3fa drivers: wifi/airoc: Update cb_search to check SSID length
Issue:
When there are two similar SSIDs (e.g. MySSID and MySSID_Guest),
the current implementation may use the wrong (truncated) SSID
for the connection. See issue#74910 for details.

Fix:
Updated airoc_wifi_scan_cb_search to filter all SSID where
length is different than the user-entered SSID.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-07-03 15:05:57 -04:00
Benjamin Cabé
f3a110bcb9 doc: release: Add highlights of Zephyr 3.7 release
This introduces a high-level summary of the most notable changes in 3.7.
This also tries to capture the most useful changes since previous LTS.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-03 15:04:36 -04:00
Alberto Escolar Piedras
846556fa09 Revert "fdtable: read, write, close: only execute methods if non-NULL"
This reverts commit a9a909c558.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
97e925e57d Revert "posix: device_io: require a full libc for c89 functions"
This reverts commit 6f62292d42.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
61e81a7ba8 Revert "posix: device_io: provide stdin, stdout, stderr variables"
This reverts commit 86b92934cc.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
c69ff543ed Revert "posix: device_io: implement pread() and pwrite()"
This reverts commit 2d72966516.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
1df86af309 Revert "net: sockets: move poll implementation to zvfs"
This reverts commit 93973e2ead.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
14e4de6415 Revert "net: sockets: move select() implementation to zvfs"
This reverts commit 49ac1912b2.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
1a2d508e68 Revert "posix: device_io: implement pselect()"
This reverts commit 305ec62a6b.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
a111cec63d Revert "posix: device_io: implement fdopen()"
This reverts commit 581a0f56e6.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
9f38377a66 Revert "posix: device_io: implement fileno()"
This reverts commit 48dff5562c.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
ade54b35ca Revert "posix: device_io: use mode argument correctly in open()"
This reverts commit 499a633976.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
6f0b8b5e66 Revert "doc: posix: mark posix device io as complete"
This reverts commit d9855da483.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
db5266caa4 Revert "posix: kconfig: remove select y from non-user-selectable help"
This reverts commit b82b5b0734.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
9a02561406 Revert "posix: procN: add missing alias for getpid()"
This reverts commit be086f174c.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
772ba464f7 Revert "posix: add stubs for signal.h functions that need process support"
This reverts commit b2243af32d.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
0642737847 Revert "tests: posix: headers: add checks for posix signals option group"
This reverts commit 308322e9b9.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
b2ca594f47 Revert "doc: posix: mark posix signals supported with undefined behaviour"
This reverts commit b10f1ca3a6.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
72e2787e70 Revert "posix: fd_mgmt: implement dup(), dup2(), fseeko(), and ftello()"
This reverts commit b18cad15b9.

PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Alberto Escolar Piedras
57af8a4f64 Revert "doc: posix: mark posis fd mgmt as supported"
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.

For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205

This reverts commit e9b676a9ab.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-03 15:03:05 -04:00
Chaitanya Tata
650227d8c4 modules: hostap: Fix check for iface up
We only need the interface to be administratively up, the operationl
status is managed by the WPA supplicant.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
176a47c2df modules: hostap: Fix SoF
Due to recent changes to hostap, the stack usage is increased, so,
increase the stack size to fix SoF.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
f4e0a1abea modules: hostap: Fix MbedTLS config issue
Fixes build issues when Wi-Fi security is enabled for default
implementation, the alternative implementation is managed separately,
and doesn't need these.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
515f1fee48 modules: hostap: Fix MbedTLS TLS
TLS is only for Enterprise, so, move to enterprise macro.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Jamie McCrae
8924d563bb soc: nordic: Fix run once regex issue and add missing entries
Fixes an issue whereby multiple boards would be grouped when using
a regex to group them, and adds missing nRF91 entries to the list

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-03 09:33:21 -04:00
Guennadi Liakhovetski
32d05d360b intel_adsp/ace: power: fix firmware panic on MTL
The power_down() function attempts to lock the hpsram_mask on-stack
variable in data cache, which causes an exception. Moving it to .bss
by making it static fixes it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-03 15:31:12 +02:00
Jared Kangas
8ec3c045f8 drivers: adc: lmp90xxx: fix checksum mismatch return value
During channel reads, zero is returned on CRC mismatches: the returned
error variable is not written to after a previous non-zero check. Return
-EIO to mirror other drivers' checksum validation behaviors.

Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
2024-07-03 15:29:07 +02:00
Emil Gydesen
b413b505ee Bluetooth: BAP: Broadcast: Fix state checks
The existing state checks for both the broadcast sink
and broadcast source only ever checked the first BIS.
This sort of made sense, since they are all linked by HCI
(i.e. they share the same state), but there is a race condition
in the ISO and BAP callbacks that could allow applications
to delete sinks and sources before all the ISO callbacks
had been handled.

By treating the sink and source states as the highest value
of the BIS, then we better treat all BIS the same.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-03 15:28:17 +02:00
Mathieu Choplain
38ab4b38db tests: dma/chan_blen_transfer: place TX buf in RAM
This commit removes the const qualifier from TX (source) buffer
of the chan_blen_transfer DMA test to ensure it gets placed in
RAM rather than flash. This ensures the test can pass on hardware
where the DMA controller is unable to access flash.

Fixes #75125.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-07-03 15:27:26 +02:00
Jukka Rissanen
c77b818679 net: ipv6-pe: Verify that hmac calculation was ok
Make sure to check return values of mbedtls hmac APIs so that
the digest is calculated properly.

Fixes #75259
Fixes #75260
Fixes #75261

Coverity-CID: 366271
Coverity-CID: 366277
Coverify-CID: 366279

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-03 15:25:58 +02:00
Jeppe Odgaard
7e22942078 samples: modules: canopennode: add bootloader argument
The README "Testing CANopen Program Download" section needs a sysbuild
MCUboot option. Otherwise only the application is built and the test will
fail.

This has probably been missing since commit
238d113185.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-07-03 15:22:01 +02:00
Yong Cong Sin
a6e672f9b2 doc: modules: fix indentation
Fix the indentation of `bar` in the code block.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-03 08:53:46 +02:00
Tom Burdick
ec36e3b97c docs: Add icm42688 changes to migration guide
Adds the icm42688 devicetree binding changes to the migration guide
noting that the previous bindings were not at all in use.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-03 08:52:47 +02:00
Yuval Peress
1b51740fa3 twister: Fix gTest harness
The gTest harness asssumed that the lines end with the test name, but
some gTest implementations include the test duration in the line. Update
both the tests and regex to allow this and also avoid capturing
characters into the `test_name` that cannot be valid test name chars.

Fixes #72318

Signed-off-by: Yuval Peress <peress@google.com>
2024-07-03 08:52:13 +02:00
Jukka Rissanen
9abca61841 doc: net: Add info about misc network config options
Add information about these missing Kconfig options:

CONFIG_NET_CONFIG_MY_IPV6_ADDR
CONFIG_NET_CONFIG_PEER_IPV6_ADDR
CONFIG_NET_CONFIG_MY_IPV4_ADDR
CONFIG_NET_CONFIG_MY_IPV4_NETMASK
CONFIG_NET_CONFIG_MY_IPV4_GW
CONFIG_NET_CONFIG_PEER_IPV4_ADDR

Fixes #75211

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-03 08:50:22 +02:00
Peter Gielda
f925af9c47 dts: riscv: Fix incorrect plic size
Fix wrong size of the plic node dts entry.

Signed-off-by: Peter Gielda <pgielda@antmicro.com>
2024-07-02 22:21:17 -04:00
Daniel Leung
bd2fc8009b doc: doxygen: provide a way to override configs locally
This allows specifying the environment variable
ZEPHYR_DOXYGEN_OVERLAY pointing to a overlay file for
doxygen to override configs in the base zephyr.doxyfile.in
for local document builds.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-02 19:25:53 -04:00
Erwan Gouriou
5ce7462dcc west.yml: TF-M: Fix 2 issues preventing usage on STM32 targets
Points to the updated T-FM

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-07-02 19:24:58 -04:00
Tahsin Mutlugun
700ebe1b55 tests: drivers: i2c: i2c_target_api: Use address-width property
Boards that use 1024 byte EEPROM buffers need 16-bit address widths
otherwise eeprom_target driver will cause build failure.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-07-02 19:24:13 -04:00
Tahsin Mutlugun
223447262c tests: drivers: i2c: i2c_target_api: Support 16-bit word addresses
Existing tests fail when 16-bit address width is used. Adjust the code
to support 16-bit addresses as well.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-07-02 19:24:13 -04:00
Fabio Baltieri
36d90be198 drivers: udc_stm32: only check for HS_SPEED if defined
Seems like not all stm32 devices define USBD_HS_SPEED in the HAL, only
check for USBD_HS_SPEED if defined. Fixes a build failure with the new
stack on F1 MCUs.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-02 19:23:35 -04:00
Erwan Gouriou
6700a154be west.yml: hal_stm32: Remove autoconf.h
Sync with hal_stm32 PR

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-07-02 14:25:14 +02:00
Eve Redero
cc3558ba00 doc: detail how to find the drop-down version selector
Adding more guidance in the documentation website top banner

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2024-07-02 14:19:46 +02:00
Benjamin Bigler
81556d6150 drivers: ethernet: phy_mii: check if there is a mdio config
In fixed-link mode, mdio remains unconfigured. This results in a null
pointer dereference, triggering a bus fault

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-07-02 14:18:46 +02:00
Jonathan Rico
85c57c2da3 Bluetooth: host: ensure ownership of conn on TX path
This is a bug-fix:

When upper layers want to send something, they add a `conn` object to a
list. They do so by adding a node on `struct conn` rather than the object
itself.

We forgot to increase the reference count of the connection object when
doing so. This means that there can be a scenario where the conn object is
destroyed and re-used while still being on the TX list/queue.

This is bad for obvious reasons.

This patch fixes that by:
- increasing the refcount when putting on the TX list
- decreasing the refcount *only* when popping off the TX list
- passing a new reference from `get_conn_ready` into `bt_conn_tx_processor`

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-02 14:18:23 +02:00
Robert Lubos
71f668d1f3 samples: net: dhcpv4_client: Enable DNS in the sample
The DHCP server can distribute DNS addresses, hence enable DNS resolver
in the sample to show this functionality.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-02 14:17:16 +02:00
Robert Lubos
28ed03afc4 samples: net: dhcpv4_client: Replace example DHCP server with kea
Currently used DHCP server in the sample, dhcpd, is no longer maintained
and reached EOL. Therefore, update the sample's readme file with a
sample configuration for its successor, kea.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-02 14:17:16 +02:00
Yong Cong Sin
4f1ee4b753 arch: riscv: irq: include util_macro.h for the macros
Macros like `BIT()` & `BIT64()` from the `util_macro.h` are
used, include their header to compile properly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 14:14:35 +02:00
Jukka Rissanen
9647db8808 net: dns: Avoid superfluous error message
If we have configured the DNS dispatcher to be only as a
responder but receive a query response, or if we are only
as a resolver but receive a query, then the dispatcher just
ignores the packet and returns -ENOENT.

Unfortunately we print an error message in this case

[00:10:18.818,000] <err> net_dns_dispatcher: DNS recv error (-2)

which is totally unnecessary and causes confusion so do not
print an error message in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-02 14:11:15 +02:00
Sreeram Tatapudi
d0474cefde tests: bluetooth: shell: Enable flow control
Enabling UART flow control for CYW20829

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Sreeram Tatapudi
e3f4a63ac0 soc: infineon: cyw20829: Updates linker script
Add missed #include <zephyr/toolchain/common.h>
in linker script to fix build error with
samples/subsys/bindesc/hello_bindesc

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Sreeram Tatapudi
28b03b86b7 samples: bluetooth: Update samples to support cyw920829m2evk_02
Update bluetooth projects to support cyw920829m2evk_02 platform

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Yong Cong Sin
e912a95355 arch: riscv: update the description of INCLUDE_RESET_VECTOR Kconfig
Update the description of the `INCLUDE_RESET_VECTOR` Kconfig so
that it is more clear to the user what it does.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Yong Cong Sin
6de21fc1d2 Revert "soc: riscv-privileged: support SoCs without reset vector"
This reverts commit 75f5d98002.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Yong Cong Sin
5ee20e11ef soc: nordic: vpr: select INCLUDE_RESET_VECTOR for default implementation
For SOCs that do not implement a custom `__reset` function,
select `INCLUDE_RESET_VECTOR` so that Zephyr provides a default
implementation that simply jumps to `__initialize`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Henrik Brix Andersen
e5aad45bb1 west: commands: runners: canopen: increase default SDO timeout
Increase the default SDO timeout for the CANopen program download west
runner from 0.3 seconds to 1 second. Depending on the flash size and speed,
a full erase may take slightly longer than 300 ms.

The timeout can be customized by using the --sdo-timeout runner parameter.

Fixes: #73987

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-02 09:20:57 +02:00
Declan Snyder
94815e7955 tests: arm_irq_vector_table: Fix RT/WXXX
Fix preprocessor expression for custom vector table due
to OS timer isr being needed. The parentheses are missing.
Also add RW6xx to the list which has the same isr needed for ostimer.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-02 09:19:46 +02:00
Gerson Fernando Budke
768b8bbca3 scripts: west robot & simulation: Fix OOT
The current version of scipts do not consider OOT boards use cases and
the tests with robot now are strict to only one robot file, which is
not realistic for real environment. This address those issues and allow
multiple testsuits at command line and lists at tests entries. It add
another test parameter to allow configure robotframework options.

Fixes: #74563

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2024-07-01 16:10:35 -04:00
Krzysztof Chruściński
0825f24910 soc: nordic: nrf54h: DMM shall be applied only to rad&app
cpuppr can only use slow peripherals and uses RAM3 as RAM so
it does not need to use DMM.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Krzysztof Chruściński
7a6b355535 tests: boards: nrf: dmm: Adjust test to dmm changes
After changing dmm to not apply data cache line alignment for all
regions test needs to be aligned.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Krzysztof Chruściński
5f32265459 soc: nordic: common: dmm: Fix memory utilization
DMM was enforcing cache line alignment all memory regions, including
those which were not cacheable. Fixing it by using memory attribute
from the device tree to determine if alignment needs to be applied.

Because of that memory usage was significantly increased because
even 1 byte buffers (e.g. for uart_poll_out) was consuming 32 bytes
(cache line size).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Xudong Zheng
19c1f9f6c5 drivers: serial: pl011: add support for hardware flow control
Flow control will be enabled for UART if hw-flow-control is set.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-07-01 16:08:23 -04:00
Pisit Sawangvonganan
94b752d2b4 lib: smf: use while (true) in get_child_of for better clarity
Replace the condition-less `for` loop (`;;`) in `get_child_of` with
a `while (true)` loop and remove the redundant `return NULL;`
at the end, which is never reached.

This change aims to enhance readability since `while (true)` is better
suited for this scenario.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-01 16:08:05 -04:00
Hakan Jansson
f371ea4b97 boards: infineon: cyw920829m2evk_02: update documentation
Update documentation, mainly to clarify use of onboard KitProg3 debug
adapter and Infineon custom OpenOCD.

Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
2024-07-01 16:07:42 -04:00
Krzysztof Chruściński
ce157c689d tests: lib: spsc_pbuf: Do not run test with cache
Test was using a configuration which enforces cache management in the
packet buffer. However it shall not be used if producer and consumer
is the same core. Testing this configuration on a single core does
not make sense as it actually fails on cores with data cache.

Making this configuration build_only so it is checked against
compilation errors.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:07:30 -04:00
Krzysztof Chruściński
0bb25d2e17 lib: os: spsc_pbuf: Clarify using cache management in the module
Packet buffer can be used for sharing data between cores. In that
case when any core has data cache then data cache handling must
be enabled in the module. However, it shall never be enabled when
the packet buffer is used on a single core. Adding that information
to the documentation.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:07:30 -04:00
Jan Zyczkowski
b737598dcf boards: nordic: Change NRFS logs to debug level
Change NRFS logs to debug level not to break tests.

Signed-off-by: Jan Zyczkowski <jan.zyczkowski@nordicsemi.no>
2024-07-01 16:07:15 -04:00
Johann Fischer
6aaad0a5cd drivers: udc_stm32: handle ZLP flag
A function, such as CDC ECM, can set the ZLP flag to handle a
class-specific protocol. This is not to be confused with the ZLP role in
control transfers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-01 16:06:26 -04:00
Johann Fischer
de728c393b drivers: udc_stm32: implement driver API to get actual device speed
Implement driver API to get actual device speed.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-01 16:06:26 -04:00
Henrik Brix Andersen
c4c5f168e8 ci: ignore changes to the CANopen program download runner
Ignore changes to the CANopen program download west runner in CI.

This script is only executed when performing a DFU using the CANopen
protocol via CAN, which is never triggered in CI anyways.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-01 16:05:44 -04:00
Henrik Brix Andersen
f14697d4c3 MAINTAINERS: put the CANopen runner script under the CAN area
Put the scripts/west_commands/runners/canopen_program.py script under the
CAN area.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-01 16:05:44 -04:00
Emil Gydesen
0eb612b28b doc: Bluetooth: Audio: Remake zephyr_gaf.svg to graphviz
Remake the Zephyr Generic audio framework (GAF) figure to a graphviz
version.
This makes it easier to modify it directly in the .rst file.

This also adds the missing GMAP/GMAS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Emil Gydesen
05b11e58eb doc: Bluetooth: Audio: Remake gaf.svg to graphviz
Remake the Generic audio framework (GAF) figure to a graphviz version.
This makes it easier to modify it directly in the .rst file.

This also adds the missing GMAP/GMAS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Emil Gydesen
0b4d7523fd doc: Bluetooth: Audio: Remake audio_arch to graphviz
Remake the Bluetooth Audio Architecture figure to a graphviz
version. This makes it easier to modify it directly in the
.rst file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Nikolay Agishev
80fe531119 ARCMWDT: Fix issues with posix types
Fix posix pid_t type redifiniton (zephyr vs arcmwdtlib).
Add omitted in arcmwdtlib type sigevent.

This Fixes https://github.com/zephyrproject-rtos/zephyr/issues/75105

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-07-01 18:14:34 +02:00
Emil Gydesen
fa447948d2 Bluetooth: BAP: Scan del: Overwrite metadata if len == 0
If the metadata length is 0 in the mod source operation,
we set the length to 0 and memset the stored value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:14:14 +02:00
Benjamin Cabé
1f0c22eb01 net: ptp: fix incorrect req_timestamp decoding
Removed incorrect use of ntoh to decode Delay_Req timestamp

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 18:13:42 +02:00
Benjamin Cabé
a89a5ee52d net: ptp: fix offset check by adding missing int64_t cast
Add cast to NSEC_PER_SEC macro to correctly check offset.
Prior to this commit, the would eval to true incorrectly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 18:13:42 +02:00
Benjamin Cabé
5a07cf4e0d doc: esp32: fix rendering of MCUboot note
Use proper syntax to ensure rendering of the
CONFIG_BOOTLOADER_MCUBOOT snippet is correct.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 18:12:43 +02:00
Henrik Brix Andersen
fa4537df8f ci: move github runners from macos-11 to macos-14
Move the GitHub runners currently on macos-11 to macos-14 as the former is
no longer supported by GitHub.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-01 18:12:21 +02:00
Gerard Marull-Paretas
574f939432 device: only define/initialize metadata for DT devices
Check if node identifier is valid to define and initialize device
metadata. Without this patch, "software devices", ie, DEVICE_DEFINE,
would fail to compile when enabling the device metadata feature.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-01 09:25:27 -04:00
Gerard Marull-Paretas
91e16f16b3 device: add missing comma to Z_DEVICE_INIT
When PM_DEVICE is enabled, pm_base needs to be expanded with a trailing
comma.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-01 09:25:27 -04:00
Alex Fabre
9b9d455f02 boards: st: fix sysbuild multi image flash
Problem:

When flashing a multi-image project with STLink through sysbuild,
the flash utility is told to erase the whole flash between each
single image flash.

Resulting in a partial flash where only the last image is effectively
stored on flash...

Correction:

A `west flash` must not implicitly perform a mass erase on its own.

If a flash erase is required, the option has to be passed manually.

The problem is discussed in the following issue:
zephyrproject-rtos/zephyr#69582

Due to CI tests errors, the correction is not applied on
eval board `b_u585i_iot02a`.

See following issue:
zephyrproject-rtos/zephyr#75164

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2024-07-01 09:06:50 -04:00
Guillaume Gautier
c93d6b8559 drivers: adc: stm32: apply extended calibration on u5
Some STM32U5 can apply an extended calibration to enhance the ADC
performance.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-07-01 09:06:22 -04:00
Guillaume Gautier
aa670f7e4a drivers: adc: stm32: check ldo ready bit
For STM32H7, U5 and WBA, check the LDORDY bit of the ADC ISR register
after enabling the internal regulator. This method is safer than the
delay.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-07-01 09:06:22 -04:00
Hao Luo
faa5fa1ab0 drivers: i2c: bugfix for ambiq i2c driver
Added k_sem_give for error return case.
Changed enabled interrupt bits.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-07-01 09:06:05 -04:00
Valerio Setti
3dac7cb936 MAINTAINERS: add valeriosetti as collaborator for Mbed TLS module
Previous commit 8defc560fe forgot
to add valeriosetti also in "West project: mbedtls". This commit
fixes this.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-07-01 09:05:45 -04:00
Krzysztof Chruściński
e367231f29 drivers: uart: uart_elementary: Add missing pull-ups to nrf54h20dk
Add missing pull-up for RX pin in nrf54h20dk dual uart configuration.
Lack of pull-up was causing test failures.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 09:05:33 -04:00
Jiafei Pan
d5a91a24de dts: pinctrl: unify pinctrl binding for imx8mp/n/m
Currently imx8mm/n use pinctrl binding of nxp,imx8m-pinctrl.yaml which
is used for imx8mq series platforms, but imx8mm/n have different pinctrl
hardware module with imx8mq, so change imx8mm/n to use binding of
nxp,imx8mp-pinctrl.yaml as imx8mm, imx8mn and imx8mp have the same
pinctrl hardware module.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-07-01 09:05:02 -04:00
Benjamin Cabé
f19446f35d drivers: ethernet: stm32: fix PTP on STM32F7
As of recent update of stm32f7 HAL to cube version V1.17.2
the workaround for misspelled HAL_ETH_PTP_CONFIGURATED macro
is not needed anymore, and causes PTP support to fail to compile.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 09:04:43 -04:00
Alessandro Manganaro
594e614f49 soc/st/stm32/st32wbax: STM32WBA55 BLE Ext Adv Fix
SYSTEM_WORKQUEUE_STACK_SIZE increase is required to fix not
only BLE Ext Adv (70935), but also other BLE use cases according
STM32WBA HCI driver

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-07-01 09:04:32 -04:00
Alessandro Manganaro
ef91738b86 west.yml: STM32WBA55 BLE Ext Adv Fix
STM32WBA55 BLE Extended Advertising issue (70935) fixed
using a correct BLE Controller configuration.

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-07-01 09:04:32 -04:00
Tim Lin
c79432e108 drivers/input: it8xxx2: Add critical section to prevent race conditions
The KBS_KSOH1 register contains both keyboard and GPIO output settings.
Not all bits are for the keyboard will be driven, so a critical section
is needed to prevent race conditions.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-07-01 09:04:14 -04:00
Henrik Brix Andersen
951a0daa55 boards: nxp: lpcxpresso55xxx: list USB device as supported
List USB device and USB device "next" as supported on the NXP
LPCXpresso55S16 (which uses dedicated USB RAM) and LPCXpresso55S36 (which
does not use dedicated USB RAM).

This allows testing these two implementations during CI runs.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-07-01 09:03:48 -04:00
TOKITA Hiroshi
700910edfc doc: release: 3.7: Remove the duplicated colon.
Beautify the line about the support of the Arduino UNO R4 WiFi board.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-01 09:03:37 -04:00
TOKITA Hiroshi
e0f148fdb9 doc: release: 3.7: Release notes for Renesas EK-RA8M1 board
Add Renesas EK-RA8M1 board that is supported in release 3.7

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-01 09:03:37 -04:00
Abderrahmane Jarmouni
41ab2d4aca doc: stm32h747i_disco: minor fix
minor doc fix.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-07-01 09:03:26 -04:00
Benjamin Cabé
6e4a45f7a9 doc: css: Use body color for captions
Make sure that captions (tables, figures, ...) can be properly
seen on both light and dark them by setting their text color
to the default "body" color.
Fixes #73190.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 09:02:54 -04:00
Ian Morris
2c34da96f0 drivers: clock_control: ra: fix issue with setting memwait cycles
Setting the number of memory wait cycles must take place while the clock
is set to 32MHz or less. This patch ensure the MEMWAIT register is
changed before the clock is changed from its default value (of 8MHz).
Note that in order to set MEMWAIT to 1 the power control mode must be
set to high speed (which is why the lines of code interacting with the
OPCCR register have also been moved).

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-07-01 09:17:54 +02:00
Chang Feng
971a0d1d93 driver: spi: gd32: fix spi reg clear wrong flag
SPI DMATEN and DMAREN flags are in SPI_CTL1 register. fixed wrong register.

Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2024-07-01 09:16:22 +02:00
Andreas Klinger
ac4878e9d0 drivers: gnss: gnss_u_blox_m10: fix compiler warning
Fix warning on implicit declaration of function 'malloc' when compiling
gnss_u_blox_m10.c.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2024-07-01 09:14:12 +02:00
Flavio Ceolin
bb56c3898c bluetooth: host/classic: Fix possible buffer overflow
Fix possible buffer overflow in rfcomm. Check the buffer len
before read it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-01 09:13:22 +02:00
Alberto Escolar Piedras
40810983ea release: Zephyr v3.7.0-rc2
Set the version to v3.7.0-rc2

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-29 13:03:00 +02:00
Jukka Rissanen
3b72fe557e drivers: eth: e1000: Use double with PTP clock
Instead of mixing floats and doubles, convert the code to
use double so that we avoid float->double conversion warning
from compiler.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
c95f61f688 samples: net: txtime: Do not run qemu_x86 with twister
The txtime can be run manually with qemu_x86 but it is enough
to have native_sim compiled with twister.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
ba88c50fb3 samples: net: txtime: Add e1000 overlay for qemu_x86
This allows user to run the sample in qemu_x86.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
d9703934f1 samples: net: txtime: Add support for native_sim board
native_sim needs to enable PTP clock support

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
d121e88390 samples: net: txtime: The option type should be int
When setting boolean options using setsockopt(), the option
type should be int as the size of the option type is checked
and only int is accepted.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Torsten Rasmussen
2bfea20d70 cmake: tf-m: create tfm_api dependency on tfm_s.hex
Incremental builds for TF-M are not picked up by Zephyr linking stage.
Code changes to tf-m repository results in a rebuild of TF-M and thus
an updated tfm_s.hex (and other files).

tfm_s.hex is merged together with the zephyr hex to form a final merged
hex file for flashing. This is done as a post-build command, however
such as step cannot take extra dependencies. The Zephyr target can have
extra dependencies, however that will only ensure the dependency is
brought up-to-date when Zephyr re-link, not re-linking Zephyr when the
dependency changes.

Therefore an object dependency is placed on the interface.c file for
Zephyr TF-M interface implementation, which ensures the tfm_api library
is brought up-to-date whenever TF-M rebuilds, and this update again
ensures the Zephyr itself is re-linked whenever TF-M rebuilds.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-29 05:24:49 -04:00
Yong Cong Sin
cea6bf555f os: fdtable: include zephyr/kernel.h for struct k_mutex
Was getting the following error:

include/zephyr/sys/fdtable.h:150:38: warning: 'struct k_mutex'
declared inside parameter list will not be visible outside of
this definition or declaration
  150 |                               struct k_mutex **lock);
      |                                      ^~~~~~~

(#51667) tried to fix this by including `zephyr/sys/mutex.h`,
but `struct k_mutex` is defined in `zephyr/kernel.h`, so
include the latter instead.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-29 05:21:42 -04:00
Maciej Perkowski
a033ba65d2 twister: Add warning to the "-footprint-from-buildlog" flag
The flag won't work with sysbuild since there is no way to
reliably tell to a parser which data came from which image.

fixes: #74092

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-28 21:12:57 -04:00
Ederson de Souza
d83a649a67 lib/posix: Get uptime in ticks instead of cycles
__z_clock_nanosleep function was getting current time in cycles, via
k_cycle_get_32(), to perform its time calculations. However, when calling
k_sleep() to actually sleep, times are measured in ticks.

This causes a problem when there's a big skew between the uptime
measured in cycles vs uptime measured in ticks: in some platforms, the
system clock maybe up for a long time already when Zephyr starts
counting ticks, for instance, while downloading an image via PXE. In
this case, the calculations done inside __z_clock_nanosleep end up
measuring a much bigger current time than expected, thus sleeping too
much, basically all the time since system clock initialization.

This patch fixes that by avoiding the cycle trip: stick to ticks,
instead. They start counting from Zephyr initialization instead, which
is the expected uptime.

Fixes #69608

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-06-28 21:01:54 -04:00
Sylvio Alves
f65770c1a1 soc: esp32xx: always use section prologue with alignment
ESP32 requires proper alignment between sections. There are some
scenarios, as reported in #74533, that the section can
get shifted, causing runtime failure.
Making sure SECTION_PROLOGUE is used with ALIGN_WITH_INPUT
will guarantee its consistency.

Fixes #74533

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-28 21:00:11 -04:00
Jukka Rissanen
0cfd963ddc net: wifi: shell: Avoid using sscanf
The sscanf() is not available for minimal libc so it cannot be used.
Use the net_bytes_from_str() that is provided for this purposes.

Fixes #75029

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-28 20:58:50 -04:00
Bjarki Arge Andreasen
5343ae6817 tests: drivers: rtc: rtc_api: add config for alarm time mask
RTCs support a variety of combinations of alarm time fields, set
by the alarm time mask. Until now, alarm tests have selected
only the minute and hour fields, as these are always supported,
but some RTCs require setting every supported field when setting
the alarm time, while other RTCs don't support setting every field.

To support all RTCs in the test suite, a configuration has been
added which makes the alarm time mask configurable. Boards can now
define the specific alarm time mask they want to test within
their boards .conf files.

Additionally, the alarm tests have been refactored to not depend
on the time.h library to determine the struct rtc_time times to
set as these are constant, so they are now provided as const
structs instead.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-28 20:58:22 -04:00
Krzysztof Chruściński
90ab94f61d logging: Do not store module name pointer when strings are stripped
When logging strings are stripped then addresses to log module
names are invalid. Do not store that address in the const
data structure associated with the logging module to avoid
someone accessing it. Store null instead.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-28 20:57:41 -04:00
Johann Fischer
a79700623d tests: drivers: udc: add build_only test case
nRF54H20 USB device controller cannot be enabled without VBUS, but the
device should not be connected to the host during testing. Add it to
build_only section.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Johann Fischer
ef512305fb tests: drivers: udc: updates to pass testing on supported platforms
Do not halt control endpoint, control endpoint may not be enabled when
there no host is connected. Yield after buffer is queued to allow the
driver to work.

Tweak pool size and number of buffers to pass the test with high-speed
drivers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Johann Fischer
155ef4bd1d drivers: udc_stm32: disable control endpoints in udc_disable()
Disable control endpoints in udc_disable() implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Johann Fischer
a01ab79685 drivers: udc_kinetis: add missing return statement
Add the missing return statement to the branch where no slabs are
available.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:56:47 -04:00
Henrik Brix Andersen
1c0f241b92 tests: drivers: can: api: restore default bitrates
Restore the default CAN bitrates after having tested setting bitrate and
timing. This ensures the arbitration phase bitrate is proportional to the
data phase bitrate, allowing CAN FD transmission tests to complete.

Fixes: #73723

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-28 20:55:53 -04:00
Jamie McCrae
88f30f3f51 samples: Use DEFAULT_IMAGE for sysbuild
Uses the variable for the default image when adding sysbuild
dependencies so that they can be copied out-of-tree and still work

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-28 20:54:25 -04:00
Maciej Perkowski
116fdc1a23 maintainers: remove gopiotr from twister collaborators
Piotr no longer works in Nordic and was not active in Zephyr
since December 2023.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-28 20:54:13 -04:00
Johann Fischer
88c2476136 samples: usb: mass: increase main stack size
"ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0" observed on a few
supported platforms when using SD card disk. Increase main stack size
for next USB device stack configuration to prevent stack overflow.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:54:01 -04:00
Sylvio Alves
57f6077f7c hal_espressif: remove extra not-used constructor
After #74682, any function with constructor attribution requires
additional configuration. Due to some left-over and not-used
code in hal_espressif with that attribution, some samples started failing.
This is an additional to ##75063

Fixes #75169

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-28 20:53:47 -04:00
Daniel Leung
8c10964435 xtensa: mmu: clear ZSR_DEPC_SAVE at boot
ZSR_DEPC_SAVE is being used to determine whether we are faulting
inside double exception if this is not zero. It is possible that
the boot ROM or custom startup code leaves this non-zero, which
would result in a fake triple fault. So clear it at boot. Note
that the zeroing is done in MMU init code as these triple
faults are not actual hardware ones but only semantics, and will
occur once MMU is enabled.

Fixes #75194

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 20:53:37 -04:00
Adrien MARTIN
fd90c9ba21 drivers: spi: gecko: propagate spi config error
This commit catch the return code of the spi_config function and
early returns on error so that high level spi transfer api gets
the error too.

Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
2024-06-28 21:53:22 +02:00
Iuliana Prodan
f91700e629 linker: nxp: adsp: add orphan linker section
Add missing linker section to avoid warning
about orphans when building with host compiler.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-06-28 21:53:01 +02:00
Chaitanya Tata
fbe7e95359 net: sockets_service: Fix thread failure
In case of thread failure, fix the registrations by properly managing
the synchronization i.e. use conditional wait only if thread is being
initialized or will be initialized, else check for success or failure
without waiting for conditional variables.

Fixes #73523.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-06-28 21:52:49 +02:00
Daniel Leung
9a08fdc1df tests: logging/dictionary: enable pytest to test output
Add pytest to test the output of dictionary logging to make sure
the encoded logs can be decoded back into strings, and to also
make sure the decoded logs have the expected strings.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
d1c222a7c7 tests: logging: copy dictionary logging sample into tests
This is in preparation for introducing pytest to test the output
of dictionary logging. Code is the same, but the testcase.yaml
is trimmed to only those that can be tested.

Note that a copy is made instead of moving the whole sample over
is simply due to various documentation having references to
the sample. Since RST files under tests/ are not parsed for
zephyr:code-sample:<name>, the linking would have been vanished.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
2eb0ffb7ea scripts: logging/dictionary: fix annoying pylint warning
pylint keeps failing and complaining about arg_data_type is
used before assignment. So assign it to None to silence
the warning.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
f5762e07f2 logging: dictionary: new verion 3 format
The package_len has been extended from 10 bits to 11 bits
in the log message header. So the format for dictionary
logging also needs to be updated.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
0e33c7a976 scripts: logging/dictionary: replace %#llx too
Python does not really support long long double, so %llx cannot
be formatted correctly, so we replace it with a simple %lx.
There is another variant %#llx and we also need replace it to
%#lx.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
ecc642b2df scripts: logging/dictionary: refactor common parser functions...
... and put them into the LogParser class file instead of
the verisoned parser. This is in preparation for introducing
a new parser version.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
3da42fb547 scripts: logging/dictionary: fix long long alignment
Printing long long requires alignment on 64-bit before parsing
the actual argument. Or else the parser would be looking at
some unrelated bits. So fix it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
eacf71d92a scripts: logging/dictionary: extract DataTypes into its own file
This extracts the DataTypes class into its own file. This is in
preparation to add a new version of parser which can reuse this
class.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
cb0a3ce6aa logging: dictionary: keep string section if always runtime
If logging packages need to be created at runtime, the format
strings need to be in memory for the packaging code to know
what to be packed. So prevent stripping the logging string
section if CONFIG_LOG_ALWAYS_RUNTIME is enabled.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Daniel Leung
531557a772 logging: fix dictionary database not being generated
Fix the dictionary database not being generated under some
situations even though CONFIG_LOG_DICTIONARY_DB_TARGET is
disabled. For example, build and run through QEMU via
west build -t run.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Louis Feller
5b4c8945fd west : runners : Fix error message when runners.yaml is not found.
Adjust error message so that it clearly states runners.yaml is
missing from <build_dir>/zephyr, instead of referencing CMake cache
variable ZEPHYR_RUNNERS_YAML, which is no longer used (since
3124c02987 ).
Also clean up that variable in CMake since it is no longer used
(0 other references in entire tree).
Fixes #70605

Signed-off-by: Louis Feller <louis.feller@st.com>
2024-06-28 12:23:18 -04:00
Ioannis Damigos
6cc5478530 bme280: Update decoder to decode channels correctly
Update bme280 sensor driver decoder to decode
correctly the requested channels.

Fixes issue #74927

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-28 12:22:54 -04:00
Carles Cufi
457994816b doc: west: Clarify basic west terms
Terms like the west workspace or even west projects and modules were not
documented prominently enough, prompting users to ask for additional
clarification. This patch attempts to resolve this by adding terms and
explanation of concepts to the glossary and west doc pages.

Fixes #67376.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-28 12:22:41 -04:00
Flavio Ceolin
e1f20f36a0 pm: policy: Move device power state constraints to policy
Move information about device power state constraints from device
to policy.

It slows down the constraints lookup since we now have to find the
constraints for a device in a global array, but it saves resources
because we don't need to add a reference to constraints in all devices
instances.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-28 12:22:28 -04:00
Sebastian Głąb
c6ef6941a3 samples: drivers: mbox: Extend mbox sample
Print on what board/core sample is executing.

Print how many bytes of data can be sent
in the mbox message (show use of mbox_mtu_get_dt()).

Print how many channels are available for incoming and/or
outgoing messages (show use of mbox_max_channels_get_dt()).

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-28 12:21:55 -04:00
Sebastian Głąb
92b0d6dda5 samples: drivers: mbox: Fix overlays for nrf54h20
Add sample configuration 'nrf54h20_app_ppr' where:
- cpuapp sends messages to cpuppr vevif channel 15,
- cpuppr sends messages to cpuapp bellboard channel 18.

Add sample configuration 'nrf54h20_rad_app' where:
- cpuapp sends messages to cpurad bellboard channel 12,
- cpurad sends messages to cpuapp bellboard channel 18.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-28 12:21:55 -04:00
Emil Gydesen
cb80ca3a50 doc: Bluetooth: Add sample app for CAP ini/acc in status table
Add the sample application as existing for the CAP initiator
and CAP acceptor.

The samples are still in progress of being improved and
fully featured, but they exist and can be used already now.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 12:21:37 -04:00
Francois Ramu
9e03abb8cb debug: no UNALIGNED_ACCESS_SUPPORTED for cortex M0 or M0plus
Set the UNALIGNED_ACCESS_SUPPORTED only for MCU with cortex M
that are neither M0 nor M0plus
Cortex M0 or M0plus mcus do not support un-aligned address access

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-28 12:21:18 -04:00
Jukka Rissanen
2abd982040 doc: release-notes-3.7: Add notes for selected network components
Added release notes for these network components:

* DNS/mDNS/LLMNR
* gPTP/PTP
* Sockets
* Capture API
* Virtual interface
* VLAN
* Wi-Fi

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-28 12:21:05 -04:00
Emil Gydesen
1159c2adda Bluetooth: OTS: Add return validation of bt_uuid_create for client
The OTS client did not validate the return value of bt_uuid_create.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 07:50:30 -04:00
Jordan Yates
5b0fb6e406 doc: release-notes: document CMSIS-NN upgrade
Update the version update and link to the changelog.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
08eab876d8 samples: tflite-micro: add REQUIRES_FLOAT_PRINTF
Add `CONFIG_REQUIRES_FLOAT_PRINTF=y` to tflite-micro samples as in the
past the module was using its own `printf` implementation, but now uses
our logging infrastructure.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
3905e8d6be tests: lib: cmsis_nn: add missing filter dimension
Specify the missing filter dimension that was the reason for the v6.0.0
version bump.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
f4d09c9791 modules: cmsis-nn: add *_s4.c sources
Add new sources for 4 bit function variants to build system.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
afdbb3b94b submanifests: update tflite-micro
Update `tflite-micro` to the latest version.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
5abf8aa165 manifest: update cmsis-nn to v6.0.0
Update cmsis-nn to version 6.0.0.
Revision history can be found at:
https://arm-software.github.io/CMSIS-NN/latest/rev_hist.html

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
TOKITA Hiroshi
1bcebbafac tests: subsys: display: cfb: Add CFB tests
Add test cases for testing basic CFB functions.

These tests cannot run in CI because the CI environment has no display.
Mark these tests as `build_only`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-28 07:21:47 -04:00
TOKITA Hiroshi
83860c2dfd fb: cfb: Add framebuffer deinitialize function
Add the `cfb_framebuffer_deinit` function for deinitializing
the framebuffer.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-28 07:21:47 -04:00
TOKITA Hiroshi
d542e75975 fb: cfb: Fix CFB_FONT_MSB_FIRST font rendering
I broke the rendering of the CFB_FONT_MSB_FIRST font in
the previously committed #53796.
I will correct the entire font rendering process to make it
easier to remove the restriction that the vertical size of
the font must be a multiple of 8.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-06-28 07:21:47 -04:00
Johann Fischer
06086ce771 drivers: udc_dwc: remove rwup flag
The driver does not implement host_wakeup, remove rwup capability flag.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 07:21:29 -04:00
Nikolay Agishev
5d92abeaec ARCMWDT: Fix cbprintf issue with omitted function prototype
MWDT requires function to be declared with argument types.
This PR provides explisitly type cast for out routine
inside z_cbvprintf_impl().

This PR also actual to LLVM-based compilers with strict
rules of compilation. It covers warnings generated with
additional flag -Wincompatible-function-pointer-types-strict.

This fixes https://github.com/zephyrproject-rtos/zephyr/issues/74562

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-28 07:21:11 -04:00
Emil Gydesen
7b0784c1f6 Bluetooth: ASCS: Validate num_ases in CP requests
Add validation of the number of ASEs in control point
write requests.

This validates that the number of ASEs
in the control point is not greater than the total number
of ASEs we support.

This also validates that the GATT MTU is large enough to
hold all the responses from the write since those can only be
sent as notifications and never be truncated.

Finally this validates and updates the size of the buffer used to
hold the responses, which may be an optimization for some builds.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 07:20:47 -04:00
Jordan Yates
91f8c1aea9 everywhere: replace #if IS_ENABLED() as per docs
Replace `#if IS_ENABLED()` with `#if defined()` as recommended by the
documentation of `IS_ENABLED`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:20:32 -04:00
Cong Nguyen Huu
41418f5266 drivers: nxp_s32_canxl: add CANXL MRU handler
Add CANXL MRU handler, use the same RX, TX IRQ number.
Update the error priority that is lower priority than
the the tx_rx_mru priority incase the error interrupt
happens continuously, mru interrupt priority must be
higher to get report error counter. Otherwise the mru
interrupt can be delayed by error interrupt and
never call to MRU handler. This fixes #75022.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2024-06-28 07:20:20 -04:00
Dominik Ermel
f0d443e3d1 doc: release: 3.7: Add release notes for Flash
Flash API additions and new drivers.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-28 07:19:59 -04:00
Gerard Marull-Paretas
4753005c55 scripts: get_maintainer: check maintenance status
Error if an area is set as maintained but it has no maintainers
assigned.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-28 07:19:49 -04:00
Gerard Marull-Paretas
86e2030ba8 MAINTAINERS: set area status to odd fixes if not maintained
If no maintainers are present, area should not be considered maintained.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-28 07:19:49 -04:00
Dominik Ermel
568ccd585a doc: release: 3.7: Add Flash Map release notes
Add notes on changes in Flash Map.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-28 07:19:39 -04:00
Pisit Sawangvonganan
cfbe2adabc net: if: remove unused eth_ctx variable
Removed the declaration and assignment of `eth_ctx` variable from
`net_if_get_wifi_sta` and `net_if_get_wifi_sap` functions since
it was not being used.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-28 11:37:25 +02:00
Emil Gydesen
6af17919d6 doc: releases: migration-guide-3.7: Add not for BT_LE_ADV_PARAM
The macro was modified in a way that may cause issues for some.
See e.g. 15d66ccc23
for an example of it needing a change.

The migration guide GH PR number refers to the PR that modified
the macro.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 11:35:56 +02:00
Robert Lubos
5442e47dfa net: tcp: Delay ACK if no PSH flag is present
Delay an ACK in case no PSH flag is present in the data packet. as
described in RFC 813. This allows to reduce the number of ACK packets
we send and thus improve the TCP download throughput.

The results achieved on `nucleo_h723zg` board and the zperf sample
are as follows:
Before: 77.14 Mbps
After: 93.14 Mbps

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-28 11:34:50 +02:00
Jordan Yates
cf870e8350 bluetooth: correct bt_le_scan_param scan type
The `type` parameter of `struct bt_le_scan_param` is documented as
taking a `BT_LE_SCAN_TYPE_*` value, not a `BT_HCI_LE_SCAN_*` value.

In practice this makes no difference as the values are defined as the
same integer, but does result in `<zephyr/bluetooth/hci.h>` not needing
to be included.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 11:34:36 +02:00
Benedikt Schmidt
bc4743fbf2 logging: avoid overflow of package length in log_msg
Check if the calculated package length exceeds the maximum possible
value.
Fixes #75015

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-06-28 11:34:25 +02:00
Nerijus Bendžiūnas
31ad324120 drivers: i2c: stm32: remove redundant new line
LOG_* adds "\n" by itself.

Fixes redundant lines during startup:

```
[00:00:00.100,000] <inf> i2c_ll_stm32_v2: I2C TIMING = 0xb0f6343d

[00:00:00.100,000] <inf> i2c_ll_stm32_v2: I2C TIMING = 0xb0f6343d

[00:00:00.100,000] <inf> i2c_ll_stm32_v2: I2C TIMING = 0xb0f6343d

[00:00:00.100,000] <inf> i2c_ll_stm32_v2: I2C TIMING = 0xb0f6343d

[00:00:00.100,000] <inf> flash_stm32_qspi: Reading SFDP
```

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@astrolightspace.com>
2024-06-28 08:56:09 +02:00
Derek Snell
c4ebcfe684 boards: nxp: mimxrt1170_evk: doc: remove LinkServer west debug limitation
`west debug` is no longer an issue with LinkServer runner.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-06-28 08:51:49 +02:00
Hess Nathan
8b942e15e2 arch: x86: corrected parameter names
- applied the exact parameter names of the interface to implementation

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-27 20:06:20 -04:00
Ryan McClelland
fbf209e5c8 dts: bindings: cpu: add definition for arm,cortex-m55
A binding for the m55 cpu was missing. Add the yaml files.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-06-27 20:06:06 -04:00
Andrej Butok
b93453fe56 doc: release: 3.7: Add note about LinkServer runner .hex support
Added note about enabled flash support for Intel Hex
files for the LinkServer runner.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-27 18:02:57 -04:00
Robert Lubos
fcb23000e9 doc: release-notes: Add 3.7.0 release notes for networking
Add 3.7.0 release notes for networking.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-27 18:02:25 -04:00
Sven Ginka
1b09d5a883 drivers: sam_can: fixed MCAN Register Base Address
Before that fix, the default mrba was used; added
DMA Base Address to DTSI. Fixes #68472

Signed-off-by: Sven Ginka <sven.ginka@gmail.com>
2024-06-27 17:56:04 -04:00
Chris Friedt
e9b676a9ab doc: posix: mark posis fd mgmt as supported
Mark the POSIX_FD_MGMT Option Group as supported.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:17:56 -04:00
Chris Friedt
b18cad15b9 posix: fd_mgmt: implement dup(), dup2(), fseeko(), and ftello()
Implement the remaining functions from the POSIX_FD_MGMT Option
Group that are part of POSIX, and add the
CONFIG_REQUIRES_FULL_LIBC dependency to CONFIG_POSIX_FD_MGMT, to
pull in the remaining C89 functions.

The POSIX_FD_MGMT Option Group is required for PSE52, PSE53, and
PSE54 Subprofiling Option Groups.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:17:56 -04:00
Chris Friedt
b10f1ca3a6 doc: posix: mark posix signals supported with undefined behaviour
Mark the POSIX_SIGNALS Option Group as supported to the extent
possible under Zephyr, as Zephyr does not yet support processes.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:16:50 -04:00
Chris Friedt
308322e9b9 tests: posix: headers: add checks for posix signals option group
Add tests for the presence of items in the POSIX SIGNALS Option
Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:16:50 -04:00
Chris Friedt
b2243af32d posix: add stubs for signal.h functions that need process support
Since Zephyr itself does not currently support processes, but
conformant applications should still be able to link, add stubs
for the remaining POSIX functions in the POSIX_SIGNALS Option
Group.

The POSIX_SIGNALS Option Group is required for PSE51, PSE52,
PSE53, PSE54, and likely many other POSIX Subprofiles.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:16:50 -04:00
Chris Friedt
be086f174c posix: procN: add missing alias for getpid()
Newlib requires an alias for the getpid() function. There was
a Kconfig already present for doing so, but the actual alias
was missing.

So this is technically a bugfix.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-27 15:16:50 -04:00
frei tycho
f299516e01 include: logging: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-27 15:16:17 -04:00
Fabio Baltieri
96815be5f7 input: pinnacle: fix return value check for WAIT_FOR
WAIT_FOR returns type in this case is a boolean, use a boolean as
variable and check.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-27 15:16:05 -04:00
Anas Nashif
10c9037ff1 doc: release: allow tests after RC1
After RC1 (feature freeze), new tests for existing features are allowed.
Afterwards, only bug fixes and documentation to existing tests are
allowed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-27 15:15:43 -04:00
Anas Nashif
ef5bb33f7b doc: Update release criteria
Update release criteria based on previous discussions and agreements
reached.
- remove bug count at critria
- Add platform tiers
- Define criteria
- Clarify block bugs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-27 15:15:43 -04:00
Anas Nashif
1706879fbd doc: release: clarify changes allowed during stabilization
Clarificatin on feature freeze and exceptions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-27 15:15:43 -04:00
Sylvio Alves
c029fa5b0a west.yml: update hal_espressif for bugfixes
This update includes bugfixes related to esp_timer,
responsible for handling Wi-Fi thread events.
This also removes all constructor attributes from non-used
hal functions.

Fixes #74368
Fixes #74277
Fixes #75063

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-06-27 15:15:29 -04:00
Adrien Ricciardi
914d7911da doc: storage: nvs: Fixed data CRC notes formatting
Used the same notes format than in other parts of the documentation.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-06-27 15:15:08 -04:00
Emil Gydesen
15d66ccc23 Bluetooth: Tester: Fix issue with initializing adv_params
The macro was changed to return a const pointer, but the
BTP use the returned pointer in a non-const way.

Modify the usage so that the macro is used to initialize
the adv_param instead, and then provide a non-const pointer
to tester_gap_create_adv_instance.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-27 15:14:48 -04:00
Torsten Rasmussen
6f5b183de7 sysbuild: check for existence of APPLICATION_CONFIG_DIR
Check for existence of APPLICATION_CONFIG_DIR in sysbuild.
sysbuild.conf is an optional file, meaning that sysbuild will not fail
if APPLICATION_CONFIG_DIR points to a non-existing folder.

A normal Zephyr build already fails when passing an invalid
APPLICATION_CONFIG_DIR but only because it cannot find a required
prj.conf in the folder.

Checking the existence of APPLICATION_CONFIG_DIR in sysbuild and fail
the build when a non-existing folder is passed to sysbuild ensures
sysbuild behaves similar to a normal Zephyr build regarding a
non-existing folder, while still allow sysbuild.conf itself to be
optional.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-27 10:58:11 -04:00
Karol Lasończyk
ed8d70c2a5 drivers: adc: saadc: Extend gains support for nRF54L15
Add support for gains: 1/2, 1/3, 2/5, 1/4.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-06-27 10:57:54 -04:00
Aleksander Wasaznik
8cd98b139d Bluetooth: test: privacy/legacy: Scan continuously
Some controllers, like the SoftDevice Controller can miss the first few
advertisements after the host tells it to start scanning. The DUT would
assumes the first RPA advertisements report it gets is the first that
was sent, but it was actually not the first. This would skew the
tester's judgement about the timing of RPA rotations.

To remedy this, the tester will scan continuously and switch between
expecting the identity address and the RPA without stopping the scanner.

The tester will tell the DUT to switch to RPA after it has received the
identity address advertisement. This ensures that the tester will not
miss the first RPA advertisement.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-06-27 10:55:55 -04:00
Fin Maaß
115d3d8aa7 drivers: spi: litex: add missing include
add missing include of `soc.h`.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-27 10:55:09 -04:00
Lingao Meng
c51743c849 include: bluetooth: Mark adv params as const
After:https://github.com/zephyrproject-rtos/zephyr/pull/75034

There are not reason not allow structure as const.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-27 10:54:40 -04:00
Anas Nashif
42c5953327 MAINTAINERS: add maintainer to Ambiq platform
Add maintainer to an area that is active and maintained.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-27 10:54:24 -04:00
1535 changed files with 30471 additions and 25804 deletions

View File

@@ -6,8 +6,8 @@ labels: bug
assignees: ''
---
**Notes (delete this)**
<!--
**Notes**
Github Discussions (https://github.com/zephyrproject-rtos/zephyr/discussions)
are available to first verify that the issue is a genuine Zephyr bug and not a
consequence of Zephyr services misuse.
@@ -16,8 +16,10 @@ This issue list is only for bugs in the main Zephyr code base
(https://github.com/zephyrproject-rtos/zephyr/). If the bug is for a project
fork (such as NCS) specific feature, please open an issue in the fork project
instead.
-->
**Describe the bug**
<!--
A clear and concise description of what the bug is.
Please also mention any information which could help others to understand
@@ -27,31 +29,43 @@ the problem you're facing:
- Is this a regression? If yes, have you been able to "git bisect" it to a
specific commit?
- ...
-->
**To Reproduce**
<!--
Steps to reproduce the behavior:
1. mkdir build; cd build
2. cmake -DBOARD=board\_xyz
3. make
4. See error
-->
**Expected behavior**
<!--
A clear and concise description of what you expected to happen.
-->
**Impact**
<!--
What impact does this issue have on your progress (e.g., annoyance, showstopper)
-->
**Logs and console output**
<!--
If applicable, add console logs or other types of debug information
e.g Wireshark capture or Logic analyzer capture (upload in zip archive).
copy-and-paste text and put a code fence (\`\`\`) before and after, to help
explain the issue. (if unable to obtain text log, add a screenshot)
-->
**Environment (please complete the following information):**
- OS: (e.g. Linux, MacOS, Windows)
- Toolchain (e.g Zephyr SDK, ...)
- Commit SHA or Version used
**Additional context**
<!--
Add any other context that could be relevant to your issue, such as pin setting,
target configuration, ...
-->

View File

@@ -8,13 +8,21 @@ assignees: ''
---
**Is your enhancement proposal related to a problem? Please describe.**
<!--
A clear and concise description of what the problem is.
-->
**Describe the solution you'd like**
<!--
A clear and concise description of what you want to happen.
-->
**Describe alternatives you've considered**
<!--
A clear and concise description of any alternative solutions or features you've considered.
-->
**Additional context**
<!--
Add any other context or graphics (drag-and-drop an image) about the feature request here.
-->

View File

@@ -9,43 +9,52 @@ assignees: ''
## Introduction
<!--
This section targets end users, TSC members, maintainers and anyone else that might
need a quick explanation of your proposed change.
-->
### Problem description
<!--
Why do we want this change and what problem are we trying to address?
-->
### Proposed change
<!--
A brief summary of the proposed change - the 10,000 ft view on what it will
change once this change is implemented.
-->
## Detailed RFC
<!--
In this section of the document the target audience is the dev team. Upon
reading this section each engineer should have a rather clear picture of what
needs to be done in order to implement the described feature.
-->
### Proposed change (Detailed)
<!--
This section is freeform - you should describe your change in as much detail
as possible. Please also ensure to include any context or background info here.
For example, do we have existing components which can be reused or altered.
By reading this section, each team member should be able to know what exactly
you're planning to change and how.
-->
### Dependencies
<!--
Highlight how the change may affect the rest of the project (new components,
modifications in other areas), or other teams/projects.
-->
### Concerns and Unresolved Questions
<!--
List any concerns, unknowns, and generally unresolved questions etc.
-->
## Alternatives
<!--
List any alternatives considered, and the reasons for choosing this option
over them.
-->

View File

@@ -8,13 +8,21 @@ assignees: ''
---
**Is your feature request related to a problem? Please describe.**
<!--
A clear and concise description of what the problem is.
-->
**Describe the solution you'd like**
<!--
A clear and concise description of what you want to happen.
-->
**Describe alternatives you've considered**
<!--
A clear and concise description of any alternative solutions or features you've considered.
-->
**Additional context**
<!--
Add any other context or graphics (drag-and-drop an image) about the feature request here.
-->

View File

@@ -15,24 +15,36 @@ on:
types:
- labeled
permissions:
contents: read
jobs:
assignment:
name: Pull Request Assignment
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
permissions:
pull-requests: write # to add assignees to pull requests
issues: write # to add assignees to issues
steps:
- name: Install Python dependencies
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -U PyGithub>=1.55 west
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: 3.12
cache: pip
cache-dependency-path: scripts/requirements-actions.txt
- name: Install Python packages
run: |
pip install -r scripts/requirements-actions.txt --require-hashes
- name: Run assignment script
env:
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
FLAGS="-v"
FLAGS+=" -o ${{ github.event.repository.owner.login }}"

View File

@@ -24,8 +24,8 @@ jobs:
)
steps:
- name: Backport
uses: zephyrproject-rtos/action-backport@v2.0.3-3
uses: zephyrproject-rtos/action-backport@7e74f601d11eaca577742445e87775b5651a965f # v2.0.3-3
with:
github_token: ${{ secrets.ZB_GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_labels: Backport
labels_template: '["Backport"]'

View File

@@ -2,18 +2,26 @@ name: Backport Issue Check
on:
pull_request_target:
types:
- edited
- opened
- reopened
- synchronize
branches:
- v*-branch
jobs:
backport:
name: Backport Issue Check
concurrency:
group: backport-issue-check-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'
steps:
- name: Check out source code
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Python dependencies
run: |
@@ -22,7 +30,7 @@ jobs:
- name: Run backport issue checker
env:
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./scripts/release/list_backports.py \
-o ${{ github.event.repository.owner.login }} \

View File

@@ -13,12 +13,12 @@ jobs:
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@07ab29fd4a977ae4d2b275087cf67563dfdf0295 # v9
with:
run_id: ${{ github.event.workflow_run.id }}
- name: Publish BabbleSim Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
with:
check_name: BabbleSim Test Results
comment_mode: off

View File

@@ -34,7 +34,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci:v0.26.18
options: '--entrypoint /bin/bash'
env:
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
@@ -63,7 +63,7 @@ jobs:
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
@@ -85,7 +85,7 @@ jobs:
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
- name: Check common triggering files
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@823fcebdb31bb35fdf2229d9f769b400309430d0 # v46.0.3
id: check-common-files
with:
files: |
@@ -100,7 +100,7 @@ jobs:
tests/bsim/*
- name: Check if Bluethooth files changed
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@823fcebdb31bb35fdf2229d9f769b400309430d0 # v46.0.3
id: check-bluetooth-files
with:
files: |
@@ -109,7 +109,7 @@ jobs:
subsys/bluetooth/
- name: Check if Networking files changed
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@823fcebdb31bb35fdf2229d9f769b400309430d0 # v46.0.3
id: check-networking-files
with:
files: |
@@ -122,7 +122,7 @@ jobs:
include/zephyr/net/ieee802154*
- name: Check if UART files changed
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@823fcebdb31bb35fdf2229d9f769b400309430d0 # v46.0.3
id: check-uart-files
with:
files: |
@@ -168,7 +168,7 @@ jobs:
- name: Upload Unit Test Results in HTML
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: HTML Unit Test Results
if-no-files-found: ignore
@@ -176,7 +176,7 @@ jobs:
junit.html
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
with:
check_name: Bsim Test Results
files: "junit.xml"
@@ -184,7 +184,7 @@ jobs:
- name: Upload Event Details
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: event
path: |

View File

@@ -1,67 +0,0 @@
# Copyright (c) 2021, 2022 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
# Make a snapshot of open bugs as a python pickle file, compressed
# using xz. Upload the xz file to Amazon S3.
name: Bug Snapshot
on:
workflow_dispatch:
branches: [main]
schedule:
# Run daily at 14:05
- cron: '5 14 * * *'
jobs:
make_bugs_pickle:
name: Make bugs pickle
runs-on: ubuntu-22.04
if: github.repository_owner == 'zephyrproject-rtos'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python dependencies
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -U pygithub
- name: Snapshot bugs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BUGS_PICKLE_FILENAME="zephyr-bugs-$(date -I).pickle.xz"
BUGS_PICKLE_PATH="${RUNNER_TEMP}/${BUGS_PICKLE_FILENAME}"
set -euo pipefail
python3 scripts/make_bugs_pickle.py | xz > ${BUGS_PICKLE_PATH}
echo "BUGS_PICKLE_FILENAME=${BUGS_PICKLE_FILENAME}" >> ${GITHUB_ENV}
echo "BUGS_PICKLE_PATH=${BUGS_PICKLE_PATH}" >> ${GITHUB_ENV}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ vars.AWS_BUILDS_ZEPHYR_BUG_SNAPSHOT_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_BUILDS_ZEPHYR_BUG_SNAPSHOT_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload to AWS S3
run: |
REPOSITORY_NAME="${GITHUB_REPOSITORY#*/}"
PUBLISH_BUCKET="builds.zephyrproject.org"
PUBLISH_DOMAIN="builds.zephyrproject.io"
if [ "${{github.event_name}}" = "schedule" ]; then
PUBLISH_ROOT="${REPOSITORY_NAME}/bug-snapshot/daily"
else
PUBLISH_ROOT="${REPOSITORY_NAME}/bug-snapshot"
fi
PUBLISH_UPLOAD_URI="s3://${PUBLISH_BUCKET}/${PUBLISH_ROOT}/${BUGS_PICKLE_FILENAME}"
PUBLISH_DOWNLOAD_URI="https://${PUBLISH_DOMAIN}/${PUBLISH_ROOT}/${BUGS_PICKLE_FILENAME}"
aws s3 cp --quiet ${BUGS_PICKLE_PATH} ${PUBLISH_UPLOAD_URI}
echo "Bug pickle is available at: ${PUBLISH_DOWNLOAD_URI}" >> ${GITHUB_STEP_SUMMARY}

View File

@@ -12,7 +12,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci:v0.26.18
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
@@ -49,7 +49,7 @@ jobs:
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
@@ -125,7 +125,7 @@ jobs:
- name: Upload Unit Test Results
if: always() && steps.twister.outputs.report_needed != 0
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Unit Test Results (Subset ${{ matrix.platform }})
path: twister-out/twister.xml
@@ -137,7 +137,7 @@ jobs:
if: (success() || failure() ) && needs.clang-build.outputs.report_needed != 0
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: artifacts
- name: Merge Test Results
@@ -148,7 +148,7 @@ jobs:
- name: Upload Unit Test Results in HTML
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: HTML Unit Test Results
if-no-files-found: ignore
@@ -156,7 +156,7 @@ jobs:
junit-clang.html
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
if: always()
with:
check_name: Unit Test Results

View File

@@ -14,7 +14,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci:v0.26.18
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
@@ -61,7 +61,7 @@ jobs:
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
@@ -121,7 +121,7 @@ jobs:
- name: Upload Coverage Results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Coverage Data (Subset ${{ matrix.normalized }})
path: |
@@ -137,12 +137,12 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Download Artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: coverage/reports
@@ -209,7 +209,7 @@ jobs:
- name: Upload Merged Coverage Results and Report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Coverage Data and report
path: |
@@ -220,7 +220,7 @@ jobs:
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
with:
env_vars: OS,PYTHON
fail_ci_if_error: false

View File

@@ -8,13 +8,13 @@ jobs:
name: Run coding guidelines checks on patch series (PR)
steps:
- name: Checkout the code
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: cache-pip
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/coding_guidelines.yml') }}

View File

@@ -1,6 +1,12 @@
name: Compliance Checks
on: pull_request
on:
pull_request:
types:
- edited
- opened
- reopened
- synchronize
jobs:
check_compliance:
@@ -12,18 +18,18 @@ jobs:
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Checkout the code
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: 3.11
- name: cache-pip
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/compliance.yml') }}
@@ -52,6 +58,14 @@ jobs:
west config manifest.group-filter -- +ci,-optional
west update -o=--depth=1 -n 2>&1 1> west.update.log || west update -o=--depth=1 -n 2>&1 1> west.update2.log
- name: Check for PR description
if: ${{ github.event.pull_request.body == '' }}
continue-on-error: true
id: pr_description
run: |
echo "Pull request description cannot be empty."
exit 1
- name: Run Compliance Tests
continue-on-error: true
id: compliance
@@ -68,7 +82,7 @@ jobs:
-c origin/${BASE_REF}..
- name: upload-results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
continue-on-error: true
with:
name: compliance.xml
@@ -94,5 +108,12 @@ jobs:
done
if [ "${exit}" == "1" ]; then
echo "Compliance error, check for error messages in the \"Run Compliance Tests\" step"
echo "You can run this step locally with the ./scripts/ci/check_compliance.py script."
exit 1;
fi
if [ "${{ steps.pr_description.outcome }}" == "failure" ]; then
echo "PR description cannot be empty"
exit 1;
fi

View File

@@ -1,38 +0,0 @@
# Copyright (c) 2020 Intel Corp.
# SPDX-License-Identifier: Apache-2.0
name: Publish commit for daily testing
on:
schedule:
- cron: '50 22 * * *'
push:
branches:
- refs/tags/*
jobs:
get_version:
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ vars.AWS_TESTING_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: install-pip
run: |
pip3 install gitpython
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Upload to AWS S3
run: |
python3 scripts/ci/version_mgr.py --update .
aws s3 cp versions.json s3://testing.zephyrproject.org/daily_tests/versions.json

View File

@@ -27,22 +27,22 @@ jobs:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-22.04, macos-11, windows-2022]
os: [ubuntu-22.04, macos-14, windows-2022]
exclude:
- os: macos-11
- os: macos-14
python-version: 3.6
- os: windows-2022
python-version: 3.6
steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ matrix.python-version }}
- name: cache-pip-linux
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
@@ -50,7 +50,7 @@ jobs:
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: cache-pip-mac
if: startsWith(runner.os, 'macOS')
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/Library/Caches/pip
# Trailing '-' was just to get a different cache name
@@ -59,7 +59,7 @@ jobs:
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: cache-pip-win
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ matrix.python-version }}

View File

@@ -1,20 +0,0 @@
name: Do Not Merge
on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]
jobs:
do-not-merge:
if: ${{ contains(github.event.*.labels.*.name, 'DNM') ||
contains(github.event.*.labels.*.name, 'TSC') ||
contains(github.event.*.labels.*.name, 'Architecture Review') ||
contains(github.event.*.labels.*.name, 'dev-review') }}
name: Prevent Merging
runs-on: ubuntu-22.04
steps:
- name: Check for label
run: |
echo "Pull request is labeled as 'DNM', 'TSC', 'Architecture Review' or 'dev-review'."
echo "This workflow fails so that the pull request cannot be merged."
exit 1

View File

@@ -32,12 +32,12 @@ jobs:
file_check: ${{ steps.check-doc-files.outputs.any_changed }}
steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Check if Documentation related files changed
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@823fcebdb31bb35fdf2229d9f769b400309430d0 # v46.0.3
id: check-doc-files
with:
files: |
@@ -86,7 +86,7 @@ jobs:
echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
@@ -104,7 +104,7 @@ jobs:
git log --graph --oneline HEAD...${PR_HEAD}
- name: cache-pip
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('doc/requirements.txt') }}
@@ -154,13 +154,13 @@ jobs:
tar cfJ api-coverage.tar.xz coverage-report
- name: upload-build
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: html-output
path: html-output.tar.xz
- name: upload-api-coverage
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: api-coverage
path: api-coverage.tar.xz
@@ -180,7 +180,7 @@ jobs:
echo "API Coverage Report will be available shortly at: ${API_COVERAGE_URL}" >> $GITHUB_STEP_SUMMARY
- name: upload-pr-number
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: github.event_name == 'pull_request'
with:
name: pr_num
@@ -212,7 +212,7 @@ jobs:
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: install-pkgs
run: |
@@ -220,7 +220,7 @@ jobs:
apt-get install -y python3-pip python3-venv ninja-build doxygen graphviz librsvg2-bin imagemagick
- name: cache-pip
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('doc/requirements.txt') }}
@@ -259,7 +259,7 @@ jobs:
- name: upload-build
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: pdf-output
if-no-files-found: ignore

View File

@@ -21,7 +21,7 @@ jobs:
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@07ab29fd4a977ae4d2b275087cf67563dfdf0295 # v9
with:
workflow: doc-build.yml
run_id: ${{ github.event.workflow_run.id }}
@@ -32,7 +32,7 @@ jobs:
- name: Check PR number
id: check-pr
uses: carpentries/actions/check-valid-pr@v0.14.0
uses: carpentries/actions/check-valid-pr@e27aa6c531dadd357d2aa4c9a21e90849e23e963 # v0.14.0
with:
pr: ${{ env.PR_NUM }}
sha: ${{ github.event.workflow_run.head_sha }}
@@ -51,7 +51,7 @@ jobs:
fi
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
aws-access-key-id: ${{ vars.AWS_BUILDS_ZEPHYR_PR_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_BUILDS_ZEPHYR_PR_SECRET_ACCESS_KEY }}

View File

@@ -24,7 +24,7 @@ jobs:
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@07ab29fd4a977ae4d2b275087cf67563dfdf0295 # v9
with:
workflow: doc-build.yml
run_id: ${{ github.event.workflow_run.id }}
@@ -37,7 +37,7 @@ jobs:
fi
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
aws-access-key-id: ${{ vars.AWS_DOCS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_DOCS_SECRET_ACCESS_KEY }}

View File

@@ -10,7 +10,7 @@ jobs:
check-errno:
runs-on: ubuntu-22.04
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.13
image: ghcr.io/zephyrproject-rtos/ci:v0.26.18
steps:
- name: Apply container owner mismatch workaround
@@ -22,7 +22,7 @@ jobs:
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Environment Setup
run: |

View File

@@ -1,95 +0,0 @@
name: Footprint Tracking
# Run every 12 hours and on tags
on:
schedule:
- cron: '50 1/12 * * *'
push:
paths:
- 'VERSION'
- '.github/workflows/footprint-tracking.yml'
branches:
- main
- v*-branch
tags:
# only publish v* tags, do not care about zephyr-v* which point to the
# same commit
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
footprint-tracking:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
if: github.repository_owner == 'zephyrproject-rtos'
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
env:
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Print cloud service information
run: |
echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}"
echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}"
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
- name: Update PATH for west
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y python3-venv
sudo pip3 install -U setuptools wheel pip gitpython
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Environment Setup
run: |
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
- name: west setup
run: |
west init -l . || true
west config --global update.narrow true
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update2.log
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ vars.AWS_TESTING_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Record Footprint
env:
BASE_REF: ${{ github.base_ref }}
run: |
export ZEPHYR_BASE=${PWD}
./scripts/footprint/track.py -p scripts/footprint/plan.txt
- name: Upload footprint data
run: |
python3 -m venv .venv
. .venv/bin/activate
pip3 install awscli
aws s3 sync --quiet footprint_data/ s3://testing.zephyrproject.org/footprint_data/

View File

@@ -12,7 +12,7 @@ jobs:
if: github.repository == 'zephyrproject-rtos/zephyr'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: zephyrproject-rtos/action-first-interaction@v1.1.1-zephyr-5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -26,11 +26,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-12, macos-14, windows-2022]
os: [ubuntu-22.04, macos-13, macos-14, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: zephyr
fetch-depth: 0
@@ -49,12 +49,12 @@ jobs:
git log --graph --oneline HEAD...${PR_HEAD}
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: 3.11
- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@v1
uses: zephyrproject-rtos/action-zephyr-setup@f7b70269a8eb01f70c8e710891e4c94972a2f6b4 # v1.0.6
with:
app-path: zephyr
toolchains: all
@@ -68,12 +68,13 @@ jobs:
elif [ "${{ runner.os }}" = "Windows" ]; then
EXTRA_TWISTER_FLAGS="-P native_sim --short-build-path -O/tmp/twister-out"
fi
./scripts/twister --force-color --inline-logs -T samples/hello_world -v $EXTRA_TWISTER_FLAGS
./scripts/twister --force-color --inline-logs -T samples/hello_world -T samples/cpp/hello_world -v $EXTRA_TWISTER_FLAGS
- name: Upload artifacts
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
if-no-files-found: ignore
path:
zephyr/twister-out/*/samples/hello_world/sample.basic.helloworld/build.log
zephyr/twister-out/*/samples/cpp/hello_world/sample.cpp.helloworld/build.log

View File

@@ -1,54 +0,0 @@
name: Issue Tracker
on:
schedule:
- cron: '*/10 * * * *'
env:
OUTPUT_FILE_NAME: IssuesReport.md
COMMITTER_EMAIL: actions@github.com
COMMITTER_NAME: github-actions
COMMITTER_USERNAME: github-actions
jobs:
track-issues:
name: "Collect Issue Stats"
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'
steps:
- name: Download configuration file
run: |
wget -q https://raw.githubusercontent.com/$GITHUB_REPOSITORY/main/.github/workflows/issues-report-config.json
- name: install-packages
run: |
sudo apt-get update
sudo apt-get install discount
- uses: brcrista/summarize-issues@v4
with:
title: 'Issues Report for ${{ github.repository }}'
configPath: 'issues-report-config.json'
outputPath: ${{ env.OUTPUT_FILE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: upload-stats
uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: ${{ env.OUTPUT_FILE_NAME }}
path: ${{ env.OUTPUT_FILE_NAME }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ vars.AWS_TESTING_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Post Results
run: |
mkd2html IssuesReport.md IssuesReport.html
aws s3 cp --quiet IssuesReport.html s3://testing.zephyrproject.org/issues/$GITHUB_REPOSITORY/index.html

View File

@@ -8,16 +8,16 @@ jobs:
name: Scan code for licenses
steps:
- name: Checkout the code
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Scan the code
id: scancode
uses: zephyrproject-rtos/action_scancode@v4
uses: zephyrproject-rtos/action_scancode@23ef91ce31cd4b954366a7b71eea47520da9b380 # v4
with:
directory-to-scan: 'scan/'
- name: Artifact Upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: scancode
path: ./artifacts

View File

@@ -8,7 +8,7 @@ jobs:
name: Manifest
steps:
- name: Checkout the code
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: zephyrproject/zephyr
ref: ${{ github.event.pull_request.head.sha }}
@@ -28,7 +28,7 @@ jobs:
- name: Manifest
uses: zephyrproject-rtos/action-manifest@v1.2.2
with:
github-token: ${{ secrets.ZB_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
manifest-path: 'west.yml'
checkout-path: 'zephyrproject/zephyr'
use-tree-checkout: 'true'

49
.github/workflows/pr_metadata_check.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: PR Metadata Check
on:
pull_request:
types:
- synchronize
- opened
- reopened
- labeled
- unlabeled
- edited
permissions:
contents: read
jobs:
do-not-merge:
name: Prevent Merging
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: 3.12
cache: pip
cache-dependency-path: scripts/requirements-actions.txt
- name: Install Python dependencies
run: |
pip install -r scripts/requirements-actions.txt --require-hashes
- name: Run the check script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./scripts/ci/do_not_merge.py -p "${{ github.event.pull_request.number }}"
empty_pr_description:
if: ${{ github.event.pull_request.body == '' }}
name: PR Description
runs-on: ubuntu-24.04
steps:
- name: Check for PR description
run: |
echo "Pull request description cannot be empty."
exit 1

View File

@@ -29,14 +29,14 @@ jobs:
os: [ubuntu-22.04]
steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ matrix.python-version }}
- name: cache-pip-linux
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}

View File

@@ -10,7 +10,7 @@ jobs:
release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
@@ -21,12 +21,12 @@ jobs:
echo "TRIMMED_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5.0.0
with:
args: spdx -o zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
- name: upload-results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
continue-on-error: true
with:
name: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
@@ -38,7 +38,7 @@ jobs:
- name: Create Release
id: create_release
uses: actions/create-release@v1
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@@ -50,7 +50,7 @@ jobs:
- name: Upload Release Assets
id: upload-release-asset
uses: actions/upload-release-asset@v1
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:

View File

@@ -29,7 +29,7 @@ jobs:
os: [ubuntu-20.04]
steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
@@ -46,13 +46,13 @@ jobs:
git log --graph --oneline HEAD...${PR_HEAD}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ matrix.python-version }}
- name: cache-pip-linux
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}

View File

@@ -18,7 +18,7 @@ jobs:
steps:
- name: Delete stale queued workflow runs
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
uses: MajorScruffy/delete-old-workflow-runs@78b5af714fefaefdf74862181c467b061782719e # v0.3.0
with:
repository: ${{ github.repository }}
# Remove any workflow runs in "queued" state for more than 1 day

View File

@@ -1,24 +0,0 @@
name: Merged PR stats
on:
pull_request_target:
branches:
- main
- v*-branch
types: [closed]
jobs:
record_merged:
if: github.event.pull_request.merged == true && github.repository == 'zephyrproject-rtos/zephyr'
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: PR event
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
PR_STAT_ES_INDEX: ${{ vars.PR_STAT_ES_INDEX }}
run: |
pip3 install pygithub elasticsearch
python3 ./scripts/ci/stats/merged_prs.py --pull-request ${{ github.event.pull_request.number }} --repo ${{ github.repository }}

View File

@@ -6,7 +6,7 @@ on:
- main
- v*-branch
- collab-*
pull_request_target:
pull_request:
branches:
- main
- v*-branch
@@ -25,7 +25,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci:v0.26.18
options: '--entrypoint /bin/bash'
outputs:
subset: ${{ steps.output-services.outputs.subset }}
@@ -56,22 +56,22 @@ jobs:
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
- name: Clone cached Zephyr repository
if: github.event_name == 'pull_request_target'
if: github.event_name == 'pull_request'
continue-on-error: true
run: |
git clone --shared /repo-cache/zephyrproject/zephyr .
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: Checkout
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Environment Setup
if: github.event_name == 'pull_request_target'
if: github.event_name == 'pull_request'
run: |
git config --global user.email "bot@zephyrproject.org"
git config --global user.name "Zephyr Bot"
@@ -87,7 +87,7 @@ jobs:
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
- name: Generate Test Plan with Twister
if: github.event_name == 'pull_request_target'
if: github.event_name == 'pull_request'
id: test-plan
run: |
export ZEPHYR_BASE=${PWD}
@@ -103,7 +103,7 @@ jobs:
- name: Determine matrix size
id: output-services
run: |
if [ "${{github.event_name}}" = "pull_request_target" ]; then
if [ "${{github.event_name}}" = "pull_request" ]; then
if [ -n "${TWISTER_NODES}" ]; then
subset="[$(seq -s',' 1 ${TWISTER_NODES})]"
else
@@ -129,7 +129,7 @@ jobs:
needs: twister-build-prep
if: needs.twister-build-prep.outputs.size != 0
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci:v0.26.18
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
@@ -172,7 +172,7 @@ jobs:
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
@@ -180,7 +180,7 @@ jobs:
- name: Environment Setup
run: |
if [ "${{github.event_name}}" = "pull_request_target" ]; then
if [ "${{github.event_name}}" = "pull_request" ]; then
git config --global user.email "bot@zephyrproject.org"
git config --global user.name "Zephyr Builder"
rm -fr ".git/rebase-apply"
@@ -236,7 +236,7 @@ jobs:
fi
fi
- if: github.event_name == 'pull_request_target'
- if: github.event_name == 'pull_request'
name: Run Tests with Twister (Pull Request)
run: |
rm -f testplan.json
@@ -271,7 +271,7 @@ jobs:
- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Unit Test Results (Subset ${{ matrix.subset }})
if-no-files-found: ignore
@@ -293,7 +293,7 @@ jobs:
- if: matrix.subset == 1 && github.event_name == 'push'
name: Upload the list of Python packages
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Frozen PIP package set
path: |
@@ -301,9 +301,6 @@ jobs:
twister-test-results:
name: "Publish Unit Tests Results"
env:
ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
needs: twister-build
runs-on: ubuntu-22.04
# the build-and-test job might be skipped, we don't need to run this job then
@@ -313,30 +310,16 @@ jobs:
# Needed for opensearch and upload script
- if: github.event_name == 'push' || github.event_name == 'schedule'
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
- name: Download Artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: artifacts
- if: github.event_name == 'push' || github.event_name == 'schedule'
name: Upload to opensearch
run: |
pip3 install elasticsearch
# set run date on upload to get consistent and unified data across the matrix.
run_date=`date --iso-8601=minutes`
if [ "${{github.event_name}}" = "push" ]; then
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
--index zephyr-main-ci-push-1 artifacts/*/*/twister.json
elif [ "${{github.event_name}}" = "schedule" ]; then
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
--index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json
fi
- name: Merge Test Results
run: |
pip3 install junitparser junit2html
@@ -345,7 +328,7 @@ jobs:
- name: Upload Unit Test Results in HTML
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: HTML Unit Test Results
if-no-files-found: ignore
@@ -353,7 +336,7 @@ jobs:
junit.html
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
with:
check_name: Unit Test Results
files: "**/twister.xml"

View File

@@ -36,34 +36,31 @@ jobs:
os: [ubuntu-22.04]
steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ matrix.python-version }}
- name: cache-pip-linux
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: install-packages
cache: pip
cache-dependency-path: scripts/requirements-actions.txt
- name: Install Python packages
run: |
pip3 install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt -r scripts/requirements-run-test.txt
pip install -r scripts/requirements-actions.txt --require-hashes
- name: Run pytest for twisterlib
env:
ZEPHYR_BASE: ./
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
run: |
export ZEPHYR_BASE=${PWD}
echo "Run twister tests"
PYTHONPATH=./scripts/tests pytest ./scripts/tests/twister
- name: Run pytest for pytest-twister-harness
env:
ZEPHYR_BASE: ./
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
PYTHONPATH: ./scripts/pylib/pytest-twister-harness/src:${PYTHONPATH}
run: |
export ZEPHYR_BASE=${PWD}
echo "Run twister tests"
pytest ./scripts/pylib/pytest-twister-harness/tests

View File

@@ -15,63 +15,52 @@ on:
- 'scripts/tests/twister_blackbox/**'
- '.github/workflows/twister_tests_blackbox.yml'
permissions:
contents: read
jobs:
twister-tests:
name: Twister Black Box Tests
runs-on: ${{ matrix.os }}
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-22.04]
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.13
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Apply Container Owner Mismatch Workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Checkout
uses: actions/checkout@v4
- name: Environment Setup
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
west init -l . || true
west config --global update.narrow true
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
west forall -c 'git reset --hard HEAD'
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: zephyr
fetch-depth: 0
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: scripts/requirements-actions.txt
- name: Go Into Venv
shell: bash
- name: install-packages
working-directory: zephyr
run: |
python3 -m pip install --user virtualenv
python3 -m venv env
source env/bin/activate
echo "$(which python)"
pip install -r scripts/requirements-actions.txt --require-hashes
sudo apt-get update -y
sudo apt-get install -y lcov
- name: Install Packages
run: |
python3 -m pip install -U -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt -r scripts/requirements-run-test.txt
- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@f7b70269a8eb01f70c8e710891e4c94972a2f6b4 # v1.0.6
with:
app-path: zephyr
sdk-version: 0.16.9
toolchains: all
- name: Run Pytest For Twister Black Box Tests
working-directory: zephyr
shell: bash
env:
ZEPHYR_BASE: ./
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
run: |
export ZEPHYR_SDK_INSTALL_DIR=${{ github.workspace }}/zephyr-sdk
echo "Run twister tests"
source zephyr-env.sh
PYTHONPATH="./scripts/tests" pytest ./scripts/tests/twister_blackbox
PYTHONPATH="./scripts/tests" pytest ./scripts/tests/twister_blackbox/

View File

@@ -30,22 +30,22 @@ jobs:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-22.04, macos-11, windows-2022]
os: [ubuntu-22.04, macos-14, windows-2022]
exclude:
- os: macos-11
- os: macos-14
python-version: 3.6
- os: windows-2022
python-version: 3.6
steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: ${{ matrix.python-version }}
- name: cache-pip-linux
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
@@ -53,7 +53,7 @@ jobs:
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: cache-pip-mac
if: startsWith(runner.os, 'macOS')
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/Library/Caches/pip
# Trailing '-' was just to get a different cache name
@@ -62,7 +62,7 @@ jobs:
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: cache-pip-win
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v4
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ matrix.python-version }}

View File

@@ -1898,7 +1898,6 @@ if (CONFIG_LLEXT AND CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID)
${ZEPHYR_BASE}/scripts/build/llext_prepare_exptab.py
--elf-file ${PROJECT_BINARY_DIR}/${KERNEL_ELF_NAME}
--slid-listing ${PROJECT_BINARY_DIR}/slid_listing.txt
-vvv
)
endif()
@@ -1989,22 +1988,39 @@ elseif(CONFIG_LOG_MIPI_SYST_USE_CATALOG)
endif()
if(LOG_DICT_DB_NAME_ARG)
if (NOT CONFIG_LOG_DICTIONARY_DB_TARGET)
set(LOG_DICT_DB_ALL_TARGET ALL)
endif()
add_custom_command(
OUTPUT ${LOG_DICT_DB_NAME}
COMMAND
set(log_dict_gen_command
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/logging/dictionary/database_gen.py
${KERNEL_ELF_NAME}
${LOG_DICT_DB_NAME_ARG}=${LOG_DICT_DB_NAME}
--build-header ${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Generating logging dictionary database: ${LOG_DICT_DB_NAME}"
DEPENDS ${logical_target_for_zephyr_elf}
)
add_custom_target(log_dict_db_gen ${LOG_DICT_DB_ALL_TARGET} DEPENDS ${LOG_DICT_DB_NAME})
if (NOT CONFIG_LOG_DICTIONARY_DB_TARGET)
# If not using a separate target for generating logging dictionary
# database, add the generation to post build command to make sure
# the database is actually being generated.
list(APPEND
post_build_commands
COMMAND ${CMAKE_COMMAND} -E echo "Generating logging dictionary database: ${LOG_DICT_DB_NAME}"
COMMAND ${log_dict_gen_command}
)
list(APPEND
post_build_byproducts
${LOG_DICT_DB_NAME}
)
else()
# Seprate build target for generating logging dictionary database.
# This needs to be explicitly called/used to generate the database.
add_custom_command(
OUTPUT ${LOG_DICT_DB_NAME}
COMMAND ${log_dict_gen_command}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Generating logging dictionary database: ${LOG_DICT_DB_NAME}"
DEPENDS ${logical_target_for_zephyr_elf}
)
add_custom_target(log_dict_db_gen DEPENDS ${LOG_DICT_DB_NAME})
endif()
endif()
# Add post_build_commands to post-process the final .elf file produced by

View File

@@ -119,6 +119,7 @@ ACPI:
- lib/acpi/
- include/zephyr/acpi/
- tests/lib/acpi/
- dts/bindings/acpi/
labels:
- "area: ACPI"
tests:
@@ -136,6 +137,7 @@ ARC arch:
- include/zephyr/arch/arc/
- tests/arch/arc/
- dts/arc/synopsys/
- dts/bindings/arc/
- doc/hardware/arch/arc-support-status.rst
labels:
- "area: ARC"
@@ -199,6 +201,7 @@ ARM Platforms:
- soc/arm/designstart/
- soc/arm/fvp_aemv8*/
- dts/arm/armv*.dtsi
- dts/bindings/arm/arm*.yaml
labels:
- "platform: ARM"
@@ -237,10 +240,11 @@ MIPS arch:
- arch.mips
Ambiq Platforms:
status: odd fixes
status: maintained
maintainers:
- AlessandroLuo
collaborators:
- aaronyegx
- AlessandroLuo
- RichardSWheatley
files:
- soc/ambiq/
@@ -300,7 +304,6 @@ Bluetooth:
collaborators:
- hermabe
- Vudentz
- Thalley
- asbjornsabo
- sjanc
files:
@@ -395,6 +398,9 @@ Bluetooth Host:
- subsys/bluetooth/shell/
- tests/bluetooth/host*/
- tests/bsim/bluetooth/host/
files-exclude:
- subsys/bluetooth/host/classic/
- include/zephyr/bluetooth/classic/
labels:
- "area: Bluetooth Host"
- "area: Bluetooth"
@@ -472,6 +478,7 @@ Bluetooth Classic:
- include/zephyr/bluetooth/classic/
labels:
- "area: Bluetooth Classic"
- "area: Bluetooth"
tests:
- bluetooth
@@ -594,6 +601,22 @@ CMSIS API layer:
- portability.cmsis_rtos_v1
- portability.cmsis_rtos_v2
DAP:
status: maintained
maintainers:
- jfischer-no
collaborators:
- maxd-nordic
files:
- include/zephyr/drivers/swdp.h
- drivers/dp/
- subsys/dap/
- samples/subsys/dap/
description: >-
Debug Access Port controller
labels:
- "area: dap"
DSP subsystem:
status: maintained
maintainers:
@@ -782,8 +805,7 @@ DFU:
- dfu
Devicetree:
status: maintained
maintainers: []
status: odd fixes
collaborators:
- decsny
- galak
@@ -794,6 +816,7 @@ Devicetree:
- doc/build/dts/
- include/zephyr/devicetree/
- scripts/kconfig/kconfigfunctions.py
- doc/build/kconfig/preprocessor-functions.rst
- include/zephyr/devicetree.h
files-exclude:
- dts/common/nordic/
@@ -803,13 +826,11 @@ Devicetree:
- libraries.devicetree
Devicetree Bindings:
status: maintained
maintainers: []
status: odd fixes
collaborators:
- decsny
- galak
files:
- dts/bindings/
- include/zephyr/dt-bindings/
- dts/binding-template.yaml
labels:
@@ -849,10 +870,14 @@ Display drivers:
- include/zephyr/drivers/display.h
- subsys/fb/
- samples/subsys/display/
- tests/subsys/display/
- doc/hardware/peripherals/display/
- tests/drivers/*/display/
labels:
- "area: Display"
tests:
- display.cfb
- drivers.display
Documentation:
status: maintained
@@ -885,6 +910,7 @@ Documentation:
files-exclude:
- doc/releases/migration-guide-*
- doc/releases/release-notes-*
- doc/develop/test/
labels:
- "area: Documentation"
@@ -933,6 +959,7 @@ Release Notes:
- doc/hardware/peripherals/adc.rst
- tests/drivers/build_all/adc/
- include/zephyr/dt-bindings/adc/
- dts/bindings/adc/
labels:
- "area: ADC"
tests:
@@ -1009,6 +1036,7 @@ Release Notes:
- samples/modules/canopennode/
- samples/net/sockets/can/
- samples/subsys/canbus/
- scripts/west_commands/runners/canopen_program.py
- subsys/canbus/
- subsys/net/l2/canbus/
- tests/drivers/build_all/can/
@@ -1206,7 +1234,7 @@ Release Notes:
- samples/drivers/eeprom/
- tests/drivers/eeprom/
- tests/drivers/*/eeprom/
- doc/hardware/peripherals/eeprom.rst
- doc/hardware/peripherals/eeprom/
labels:
- "area: EEPROM"
tests:
@@ -1490,6 +1518,7 @@ Release Notes:
- drivers/mdio/
- include/zephyr/drivers/mdio.h
- tests/drivers/build_all/mdio/
- dts/bindings/mdio/
labels:
- "area: MDIO"
tests:
@@ -1537,6 +1566,7 @@ Release Notes:
files:
- drivers/reset/
- include/zephyr/drivers/reset.h
- dts/bindings/reset/
"Interrupt Handling":
status: odd fixes
@@ -1606,6 +1636,7 @@ Release Notes:
- tests/drivers/led/
- doc/hardware/peripherals/led.rst
- tests/drivers/build_all/led/
- dts/bindings/led/
labels:
- "area: LED"
tests:
@@ -1674,6 +1705,7 @@ Release Notes:
- tests/drivers/regulator/
- tests/drivers/build_all/regulator/
- doc/hardware/peripherals/regulators.rst
- dts/bindings/regulator/
labels:
- "area: Regulators"
tests:
@@ -1689,6 +1721,7 @@ Release Notes:
- include/zephyr/drivers/retained_mem.h
- tests/drivers/retained_mem/
- doc/hardware/peripherals/retained_mem.rst
- dts/bindings/retained_mem/
labels:
- "area: Retained Memory"
tests:
@@ -1705,6 +1738,7 @@ Release Notes:
- doc/hardware/peripherals/rtc.rst
- include/zephyr/drivers/rtc.h
- tests/drivers/build_all/rtc/
- dts/bindings/rtc/
labels:
- "area: RTC"
tests:
@@ -1718,6 +1752,7 @@ Release Notes:
- drivers/pcie/
- include/zephyr/drivers/pcie/
- doc/hardware/peripherals/pcie.rst
- dts/bindings/pcie/
labels:
- "area: PCI"
@@ -1732,6 +1767,7 @@ Release Notes:
- include/zephyr/drivers/peci.h
- samples/drivers/peci/
- doc/hardware/peripherals/peci.rst
- dts/bindings/peci/
labels:
- "area: PECI"
tests:
@@ -1789,6 +1825,7 @@ Release Notes:
- include/zephyr/drivers/pm_cpu_ops/
- include/zephyr/drivers/pm_cpu_ops.h
- include/zephyr/arch/arm64/arm-smccc.h
- dts/bindings/pm_cpu_ops/
labels:
- "area: PM CPU ops"
@@ -1900,6 +1937,7 @@ Release Notes:
- drivers/spi/
- include/zephyr/drivers/spi.h
- tests/drivers/spi/
- dts/bindings/spi/
- doc/hardware/peripherals/spi.rst
labels:
- "area: SPI"
@@ -1915,6 +1953,7 @@ Release Notes:
files:
- drivers/timer/
- include/zephyr/drivers/timer/
- dts/bindings/timer/
labels:
- "area: Timer"
@@ -1928,6 +1967,7 @@ Release Notes:
- include/zephyr/drivers/video-controls.h
- doc/hardware/peripherals/video.rst
- tests/drivers/*/video/
- dts/bindings/video/
labels:
- "area: Video"
tests:
@@ -1980,6 +2020,7 @@ Release Notes:
- krish2718
files:
- drivers/wifi/
- dts/bindings/wifi/
labels:
- "area: Wi-Fi"
@@ -2065,6 +2106,7 @@ Xen Platform:
- arch/arm64/core/xen/
- soc/xen/
- boards/xen/
- dts/bindings/xen/
labels:
- "area: Xen Platform"
@@ -2080,6 +2122,7 @@ Filesystems:
- samples/subsys/fs/
- subsys/fs/
- tests/subsys/fs/
- dts/bindings/fs/
labels:
- "area: File System"
tests:
@@ -2178,6 +2221,7 @@ IPC:
- subsys/ipc/
- tests/subsys/ipc/
- doc/services/ipc/
- dts/bindings/ipc/
description: >-
Inter-Processor Communication
labels:
@@ -2900,7 +2944,13 @@ Open AMP:
- carlocaione
files:
- lib/open-amp/
- samples/subsys/ipc/openamp/
- samples/subsys/ipc/openamp_rsc_table/
- samples/subsys/ipc/rpmsg_service/
labels:
- "area: Open AMP"
tests:
- sample.ipc.openamp
POSIX API layer:
status: maintained
@@ -3029,6 +3079,7 @@ Sensor Subsystem:
- "area: Sensor Subsystem"
tests:
- sample.sensing
- sensing.api
Stats:
status: odd fixes
@@ -3045,7 +3096,6 @@ Twister:
collaborators:
- PerMac
- hakehuang
- gopiotr
- golowanow
- gchwier
- LukaszMrugala
@@ -3620,6 +3670,10 @@ Renesas RA Platforms:
status: maintained
maintainers:
- soburi
- KhiemNguyenT
collaborators:
- duynguyenxa
- thaoluonguw
files:
- boards/arduino/uno_r4/
- drivers/*/*renesas_ra*
@@ -3678,7 +3732,6 @@ STM32 Platforms:
maintainers:
- erwango
collaborators:
- ajarmouni-st
- FRASTM
- gautierg-st
- GeorgeCGV
@@ -4058,7 +4111,6 @@ USB:
- tests/drivers/usb/
- tests/drivers/udc/
- doc/connectivity/usb/
- scripts/generate_usb_vif/
labels:
- "area: USB"
tests:
@@ -4080,6 +4132,7 @@ USB-C:
- subsys/usb/usb_c/
- doc/connectivity/usb/pd/
- doc/hardware/peripherals/usbc_vbus.rst
- scripts/generate_usb_vif/
labels:
- "area: USB-C"
tests:
@@ -4131,8 +4184,7 @@ VFS:
- filesystem
West:
status: maintained
maintainers: []
status: odd fixes
collaborators:
- mbolivar-ampere
- carlescufi
@@ -4279,7 +4331,7 @@ West:
files:
- modules/cmsis/
labels:
- "area: ARM"
- "area: CMSIS-Core"
"West project: cmsis-dsp":
status: maintained
@@ -4396,7 +4448,7 @@ West:
- drivers/misc/ethos_u/
- modules/hal_ethos_u/
labels:
- "area: ARM"
- "platform: ARM"
"West project: hal_gigadevice":
status: maintained
@@ -4502,6 +4554,9 @@ West:
- blauret
- andrzej-kaczmarek
- ydamigos
- soburi
- duynguyenxa
- thaoluonguw
files: []
labels:
- "platform: Renesas"
@@ -4668,6 +4723,7 @@ West:
- ceolin
collaborators:
- ithinuel
- valeriosetti
files:
- modules/mbedtls/
labels:
@@ -4966,6 +5022,7 @@ Continuous Integration:
files:
- .github/
- scripts/ci/
- scripts/make_bugs_pickle.py
- .checkpatch.conf
- scripts/gitlint/
- scripts/set_assignees.py
@@ -4987,7 +5044,7 @@ Test Framework (Ztest):
- tests/unit/util/
- tests/subsys/testsuite/
- samples/subsys/testsuite/
- doc/develop/test/ztest.rst
- doc/develop/test/
labels:
- "area: Testsuite"
tests:
@@ -5029,7 +5086,7 @@ Random:
# This area is to be converted to a subarea
Testing with Renode:
status: maintained
status: odd fixes
collaborators:
- mateusz-holenko
- fkokosinski
@@ -5069,6 +5126,6 @@ zbus:
- subsys/llext/
- doc/services/llext/
labels:
- "area: Linkable Loadable Extensions"
- "area: llext"
tests:
- llext

View File

@@ -1 +1 @@
0.16.8
0.16.9

View File

@@ -1,5 +1,5 @@
VERSION_MAJOR = 3
VERSION_MINOR = 7
PATCHLEVEL = 0
PATCHLEVEL = 2
VERSION_TWEAK = 0
EXTRAVERSION = rc1

View File

@@ -1,5 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-littlearm)
if(CONFIG_BIG_ENDIAN)
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-bigarm)
else()
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-littlearm)
endif()
add_subdirectory(core)

View File

@@ -1,6 +1,7 @@
/*
* Copyright (c) 2013-2014 Wind River Systems, Inc.
* Copyright (c) 2021 Lexmark International, Inc.
* Copyright 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -37,6 +38,34 @@
*/
#define DEFAULT_EXC_RETURN 0xFD;
#ifdef CONFIG_USERSPACE
static void setup_priv_stack(struct k_thread *thread)
{
/* Set up privileged stack before entering user mode */
thread->arch.priv_stack_start = (uint32_t)z_priv_stack_find(thread->stack_obj);
/* CONFIG_PRIVILEGED_STACK_SIZE does not account for MPU_GUARD_ALIGN_AND_SIZE or
* MPU_GUARD_ALIGN_AND_SIZE_FLOAT. Therefore, we must compute priv_stack_end here before
* adjusting priv_stack_start for the mpu guard alignment
*/
thread->arch.priv_stack_end = thread->arch.priv_stack_start + CONFIG_PRIVILEGED_STACK_SIZE;
#if defined(CONFIG_MPU_STACK_GUARD)
/* Stack guard area reserved at the bottom of the thread's
* privileged stack. Adjust the available (writable) stack
* buffer area accordingly.
*/
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
thread->arch.priv_stack_start +=
((thread->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
MPU_GUARD_ALIGN_AND_SIZE_FLOAT : MPU_GUARD_ALIGN_AND_SIZE;
#else
thread->arch.priv_stack_start += MPU_GUARD_ALIGN_AND_SIZE;
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
#endif /* CONFIG_MPU_STACK_GUARD */
}
#endif
/* An initial context, to be "restored" by z_arm_pendsv(), is put at the other
* end of the stack, and thus reusable by the stack when not needed anymore.
*
@@ -78,9 +107,24 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
#endif /* FP_GUARD_EXTRA_SIZE */
#endif /* CONFIG_MPU_STACK_GUARD */
#if defined(CONFIG_ARM_STORE_EXC_RETURN) || defined(CONFIG_USERSPACE)
thread->arch.mode = 0;
#if defined(CONFIG_ARM_STORE_EXC_RETURN)
thread->arch.mode_exc_return = DEFAULT_EXC_RETURN;
#endif
#if FP_GUARD_EXTRA_SIZE > 0
if ((thread->base.user_options & K_FP_REGS) != 0) {
thread->arch.mode |= Z_ARM_MODE_MPU_GUARD_FLOAT_Msk;
}
#endif
#endif
iframe = Z_STACK_PTR_TO_FRAME(struct __basic_sf, stack_ptr);
#if defined(CONFIG_USERSPACE)
thread->arch.priv_stack_start = 0;
if ((thread->base.user_options & K_USER) != 0) {
setup_priv_stack(thread);
iframe = Z_STACK_PTR_TO_FRAME(struct __basic_sf, thread->arch.priv_stack_end);
iframe->pc = (uint32_t)arch_user_mode_enter;
} else {
iframe->pc = (uint32_t)z_thread_entry;
@@ -95,6 +139,10 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
iframe->a4 = (uint32_t)p3;
iframe->xpsr = A_BIT | MODE_SYS;
#if defined(CONFIG_BIG_ENDIAN)
iframe->xpsr |= E_BIT;
#endif /* CONFIG_BIG_ENDIAN */
#if defined(CONFIG_COMPILER_ISA_THUMB2)
iframe->xpsr |= T_BIT;
#endif /* CONFIG_COMPILER_ISA_THUMB2 */
@@ -108,20 +156,6 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
thread->callee_saved.psp = (uint32_t)iframe;
thread->arch.basepri = 0;
#if defined(CONFIG_ARM_STORE_EXC_RETURN) || defined(CONFIG_USERSPACE)
thread->arch.mode = 0;
#if defined(CONFIG_ARM_STORE_EXC_RETURN)
thread->arch.mode_exc_return = DEFAULT_EXC_RETURN;
#endif
#if FP_GUARD_EXTRA_SIZE > 0
if ((thread->base.user_options & K_FP_REGS) != 0) {
thread->arch.mode |= Z_ARM_MODE_MPU_GUARD_FLOAT_Msk;
}
#endif
#if defined(CONFIG_USERSPACE)
thread->arch.priv_stack_start = 0;
#endif
#endif
/*
* initial values in all other registers/thread entries are
* irrelevant.
@@ -192,10 +226,8 @@ static inline void z_arm_thread_stack_info_adjust(struct k_thread *thread,
FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
void *p1, void *p2, void *p3)
{
uint32_t sp_is_priv = 1;
/* Set up privileged stack before entering user mode */
_current->arch.priv_stack_start =
(uint32_t)z_priv_stack_find(_current->stack_obj);
#if defined(CONFIG_MPU_STACK_GUARD)
#if defined(CONFIG_THREAD_STACK_INFO)
/* We're dropping to user mode which means the guard area is no
@@ -212,29 +244,29 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
_current->stack_info.start -= MPU_GUARD_ALIGN_AND_SIZE;
_current->stack_info.size += MPU_GUARD_ALIGN_AND_SIZE;
#endif /* CONFIG_THREAD_STACK_INFO */
/* Stack guard area reserved at the bottom of the thread's
* privileged stack. Adjust the available (writable) stack
* buffer area accordingly.
*/
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
_current->arch.priv_stack_start +=
((_current->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
MPU_GUARD_ALIGN_AND_SIZE_FLOAT : MPU_GUARD_ALIGN_AND_SIZE;
#else
_current->arch.priv_stack_start += MPU_GUARD_ALIGN_AND_SIZE;
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
#endif /* CONFIG_MPU_STACK_GUARD */
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
_current->arch.priv_stack_end =
_current->arch.priv_stack_start + CONFIG_PRIVILEGED_STACK_SIZE;
#endif
/* 2 ways how arch_user_mode_enter is called:
* - called as part of context switch from z_arm_pendsv, in this case privileged stack is
* already setup and stack pointer points to privileged stack.
* - called directly from k_thread_user_mode_enter, in this case privileged stack is not
* setup and stack pointer points to user stack.
*
* When called from k_thread_user_mode_enter, we need to check and setup the privileged
* stack and then instruct z_arm_userspace_enter to change the PSP to the privileged stack.
* Note that we do not change the PSP in this function to avoid any conflict with compiler's
* sequence which has already pushed stuff on the user stack.
*/
if (0 == _current->arch.priv_stack_start) {
setup_priv_stack(_current);
sp_is_priv = 0;
}
z_arm_userspace_enter(user_entry, p1, p2, p3,
(uint32_t)_current->stack_info.start,
_current->stack_info.size -
_current->stack_info.delta);
_current->stack_info.delta,
sp_is_priv);
CODE_UNREACHABLE;
}

View File

@@ -55,13 +55,8 @@ FUNC_ALIAS(z_arm_exc_exit, z_arm_int_exit, void);
Z_GENERIC_SECTION(.text._HandlerModeExit) void z_arm_exc_exit(void)
{
#ifdef CONFIG_PREEMPT_ENABLED
/* If thread is preemptible */
if (_kernel.cpus->current->base.prio >= 0) {
/* and cached thread is not current thread */
if (_kernel.ready_q.cache != _kernel.cpus->current) {
/* trigger a context switch */
SCB->ICSR |= SCB_ICSR_PENDSVSET_Msk;
}
if (_kernel.ready_q.cache != _kernel.cpus->current) {
SCB->ICSR |= SCB_ICSR_PENDSVSET_Msk;
}
#endif /* CONFIG_PREEMPT_ENABLED */

View File

@@ -1,6 +1,5 @@
/*
* Copyright (c) 2018 Linaro, Limited
* Copyright (c) 2023 Arm Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -48,63 +47,3 @@ int arch_swap(unsigned int key)
*/
return _current->arch.swap_return_value;
}
uintptr_t z_arm_pendsv_c(uintptr_t exc_ret)
{
/* Store LSB of LR (EXC_RETURN) to the thread's 'mode' word. */
IF_ENABLED(CONFIG_ARM_STORE_EXC_RETURN,
(_kernel.cpus[0].current->arch.mode_exc_return = (uint8_t)exc_ret;));
/* Protect the kernel state while we play with the thread lists */
uint32_t basepri = arch_irq_lock();
/* fetch the thread to run from the ready queue cache */
struct k_thread *current = _kernel.cpus[0].current = _kernel.ready_q.cache;
/*
* Clear PendSV so that if another interrupt comes in and
* decides, with the new kernel state based on the new thread
* being context-switched in, that it needs to reschedule, it
* will take, but that previously pended PendSVs do not take,
* since they were based on the previous kernel state and this
* has been handled.
*/
SCB->ICSR = SCB_ICSR_PENDSVCLR_Msk;
/* For Cortex-M, store TLS pointer in a global variable,
* as it lacks the process ID or thread ID register
* to be used by toolchain to access thread data.
*/
IF_ENABLED(CONFIG_THREAD_LOCAL_STORAGE,
(extern uintptr_t z_arm_tls_ptr; z_arm_tls_ptr = current->tls));
IF_ENABLED(CONFIG_ARM_STORE_EXC_RETURN,
(exc_ret = (exc_ret & 0xFFFFFF00) | current->arch.mode_exc_return));
/* Restore previous interrupt disable state (irq_lock key)
* (We clear the arch.basepri field after restoring state)
*/
basepri = current->arch.basepri;
current->arch.basepri = 0;
arch_irq_unlock(basepri);
#if defined(CONFIG_MPU_STACK_GUARD) || defined(CONFIG_USERSPACE)
/* Re-program dynamic memory map */
z_arm_configure_dynamic_mpu_regions(current);
#endif
/* restore mode */
IF_ENABLED(CONFIG_USERSPACE, ({
CONTROL_Type ctrl = {.w = __get_CONTROL()};
/* exit privileged state when returning to thread mode. */
ctrl.b.nPRIV = 0;
/* __set_CONTROL inserts an ISB which is may not be necessary here
* (stack pointer may not be touched), but it's recommended to avoid
* executing pre-fetched instructions with the previous privilege.
*/
__set_CONTROL(ctrl.w | current->arch.mode);
}));
return exc_ret;
}

View File

@@ -27,7 +27,6 @@ _ASM_FILE_PROLOGUE
GTEXT(z_arm_svc)
GTEXT(z_arm_pendsv)
GTEXT(z_do_kernel_oops)
GTEXT(z_arm_pendsv_c)
#if defined(CONFIG_USERSPACE)
GTEXT(z_arm_do_syscall)
#endif
@@ -118,20 +117,125 @@ out_fp_endif:
#error Unknown ARM architecture
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
mov r4, lr
mov r0, lr
bl z_arm_pendsv_c
mov lr, r4
/* Protect the kernel state while we play with the thread lists */
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
cpsid i
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
movs.n r0, #_EXC_IRQ_DEFAULT_PRIO
msr BASEPRI_MAX, r0
isb /* Make the effect of disabling interrupts be realized immediately */
#else
#error Unknown ARM architecture
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
ldr r1, =_kernel
ldr r2, [r1, #_kernel_offset_to_current]
/*
* Prepare to clear PendSV with interrupts unlocked, but
* don't clear it yet. PendSV must not be cleared until
* the new thread is context-switched in since all decisions
* to pend PendSV have been taken with the current kernel
* state and this is what we're handling currently.
*/
ldr r7, =_SCS_ICSR
ldr r6, =_SCS_ICSR_UNPENDSV
/* _kernel is still in r1 */
/* fetch the thread to run from the ready queue cache */
ldr r2, [r1, #_kernel_offset_to_ready_q_cache]
str r2, [r1, #_kernel_offset_to_current]
/*
* Clear PendSV so that if another interrupt comes in and
* decides, with the new kernel state based on the new thread
* being context-switched in, that it needs to reschedule, it
* will take, but that previously pended PendSVs do not take,
* since they were based on the previous kernel state and this
* has been handled.
*/
/* _SCS_ICSR is still in r7 and _SCS_ICSR_UNPENDSV in r6 */
str r6, [r7, #0]
#if defined(CONFIG_THREAD_LOCAL_STORAGE)
/* Grab the TLS pointer */
ldr r4, =_thread_offset_to_tls
adds r4, r2, r4
ldr r0, [r4]
/* For Cortex-M, store TLS pointer in a global variable,
* as it lacks the process ID or thread ID register
* to be used by toolchain to access thread data.
*/
ldr r4, =z_arm_tls_ptr
str r0, [r4]
#endif
#if defined(CONFIG_ARM_STORE_EXC_RETURN)
/* Restore EXC_RETURN value. */
mov lr, r0
ldrsb lr, [r2, #_thread_offset_to_mode_exc_return]
#endif
/* Restore previous interrupt disable state (irq_lock key)
* (We clear the arch.basepri field after restoring state)
*/
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE) && (_thread_offset_to_basepri > 124)
/* Doing it this way since the offset to thread->arch.basepri can in
* some configurations be larger than the maximum of 124 for ldr/str
* immediate offsets.
*/
ldr r4, =_thread_offset_to_basepri
adds r4, r2, r4
ldr r0, [r4]
movs.n r3, #0
str r3, [r4]
#else
ldr r0, [r2, #_thread_offset_to_basepri]
movs r3, #0
str r3, [r2, #_thread_offset_to_basepri]
#endif
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
/* BASEPRI not available, previous interrupt disable state
* maps to PRIMASK.
*
* Only enable interrupts if value is 0, meaning interrupts
* were enabled before irq_lock was called.
*/
cmp r0, #0
bne _thread_irq_disabled
cpsie i
_thread_irq_disabled:
#if defined(CONFIG_MPU_STACK_GUARD) || defined(CONFIG_USERSPACE)
/* Re-program dynamic memory map */
push {r2,lr}
mov r0, r2
bl z_arm_configure_dynamic_mpu_regions
pop {r2,r3}
mov lr, r3
#endif
#ifdef CONFIG_USERSPACE
/* restore mode */
ldr r3, =_thread_offset_to_mode
adds r3, r2, r3
ldr r0, [r3]
mrs r3, CONTROL
movs.n r1, #1
bics r3, r1
orrs r3, r0
msr CONTROL, r3
/* ISB is not strictly necessary here (stack pointer is not being
* touched), but it's recommended to avoid executing pre-fetched
* instructions with the previous privilege.
*/
isb
#endif
ldr r4, =_thread_offset_to_callee_saved
adds r0, r2, r4
@@ -149,6 +253,9 @@ out_fp_endif:
subs r0, #36
ldmia r0!, {r4-r7}
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
/* restore BASEPRI for the incoming thread */
msr BASEPRI, r0
#ifdef CONFIG_FPU_SHARING
/* Assess whether switched-in thread had been using the FP registers. */
tst lr, #_EXC_RETURN_FTYPE_Msk
@@ -178,6 +285,30 @@ in_fp_endif:
isb
#endif
#if defined(CONFIG_MPU_STACK_GUARD) || defined(CONFIG_USERSPACE)
/* Re-program dynamic memory map */
push {r2,lr}
mov r0, r2 /* _current thread */
bl z_arm_configure_dynamic_mpu_regions
pop {r2,lr}
#endif
#ifdef CONFIG_USERSPACE
/* restore mode */
ldr r0, [r2, #_thread_offset_to_mode]
mrs r3, CONTROL
bic r3, #1
orr r3, r0
msr CONTROL, r3
/* ISB is not strictly necessary here (stack pointer is not being
* touched), but it's recommended to avoid executing pre-fetched
* instructions with the previous privilege.
*/
isb
#endif
/* load callee-saved + psp from thread */
add r0, r2, #_thread_offset_to_callee_saved
ldmia r0, {r4-r11, ip}
@@ -300,6 +431,7 @@ _stack_frame_endif:
/* exception return is done in z_arm_int_exit() */
ldr r0, =z_arm_int_exit
bx r0
#endif
_oops:
@@ -352,20 +484,219 @@ _oops:
* r8 - saved link register
*/
_do_syscall:
/*
* Build a privilege stack frame from the user stack frame, then switch PSP
* to it. This ensures return from SVC does not rely on the user stack.
*
* Layout of privilege stack created from user stack:
*
* +------+-------------------------+------+-------------------------+--------------------------+
* | User stack | Privilege stack | Notes |
* +------+-------------------------+------+-------------------------+--------------------------+
* |Offset| contents |Offset| contents | |
* +------+-------------------------+------+-------------------------+--------------------------+
* | 0 | R0 -> | 0 | R0 | PSP switches from 0th |
* | | | | | offset of user stack to |
* | | | | | 0th offset of priv stack |
* | 4 | R1 -> | 4 | R1 | |
* | 8 | R2 -> | 8 | R2 | |
* | 12 | R3 -> |12 | R3 | |
* | 16 | R12 -> |16 | R12 | |
* | 20 | LR -> |20 | LR | |
* | 24 | Return Address -x> |24 | z_arm_do_syscall |return address from user |
* | | | | |sf is not copied. Instead,|
* | | | | |it is replaced so that |
* | | | | |z_arm_svc returns to |
* | | | | |z_arm_do_syscall. |
* | | | | | |
* | 28 | xPSR (w/ or w/o pad) -> |28 | xPSR (pad bit cleared) |This completes the basic |
* | | | | |exception sf w/ or w/o pad|
* | | | | | |
* | -- | FP regs + FPSCR -> |-- | FP regs + FPSCR |For arch supporting fp |
* | | (w/ or w/o pad) | | |context an additional |
* | | | | |extended sf is copied. |
* |________________________________|______|_________________________|__________________________|
* | | | | |On returning to |
* | | | | |z_arm_do_syscall, the |
* | | | | |above sf has already been |
* | | | | |unstacked and 8B from the |
* | | | | |then sf are used to pass |
* | | | | |original pre-svc sp & the |
* | | | | |return address. |
* | | | | |Note: at the moment |
* | | | | |z_arm_do_syscall also |
* | | | | |expects the return address|
* | | | | |to be set in r8. |
* | | | | | |
* | | | 0 | address that |z_arm_do_syscall expects |
* | | | | z_arm_do_syscall should |the original pre-svc sp at|
* | | | | set as PSP before |0th offset i.e. new sp[0] |
* | | | | returning from svc. |and, |
* | | | | | |
* | | | 4 | Address that |the return address at |
* | | | | z_arm_do_syscall should |sp[4]. Note that this is |
* | | | | return to after handling|the return address copied |
* | | | | svc |from user exception sf[24]|
* | | | | |which was not copied in |
* | | | | |the previous sf. |
* +------+-------------------------+------+-------------------------+--------------------------+
* "sf" in this function is used as abbreviation for "stack frame".
* Note that the "FP regs + FPSCR" are only present if CONFIG_FPU_SHARING=y, and the optional pad
* is only present if PSP was not 8-byte aligned when SVC was executed.
* Also note that FPU cannot be present in ARMv6-M or ARMv8-M Baseline implementations
* (i.e., it may only be present when CONFIG_ARMV7_M_ARMV8_M_MAINLINE is enabled).
*/
/* Start by fetching the top of privileged stack */
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
movs r3, #24
ldr r1, [r0, r3] /* grab address of PC from stack frame */
mov r8, r1
ldr r1, =_kernel
ldr r1, [r1, #_kernel_offset_to_current]
adds r1, r1, #_thread_offset_to_priv_stack_start
ldr r1, [r1] /* bottom of priv stack */
ldr r3, =CONFIG_PRIVILEGED_STACK_SIZE
subs r3, #(_EXC_HW_SAVED_BASIC_SF_SIZE+8) /* 8 for original sp and pc */
add r1, r3
mov ip, r1
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
ldr r8, [r0, #24] /* grab address of PC from stack frame */
ldr ip, =_kernel
ldr ip, [ip, #_kernel_offset_to_current]
ldr ip, [ip, #_thread_offset_to_priv_stack_start] /* bottom of priv stack */
add ip, #CONFIG_PRIVILEGED_STACK_SIZE
#ifdef CONFIG_FPU_SHARING
/* Assess whether svc calling thread had been using the FP registers. */
tst lr, #_EXC_RETURN_FTYPE_Msk
ite eq
moveq r8, #_EXC_HW_SAVED_EXTENDED_SF_SIZE
movne r8, #_EXC_HW_SAVED_BASIC_SF_SIZE
#else
mov r8, #_EXC_HW_SAVED_BASIC_SF_SIZE
#endif
sub ip, #8 /* z_arm_do_syscall will use this to get original sp and pc */
sub ip, r8 /* 32 for basic sf + 72 for the optional esf */
#endif
/*
* At this point:
* r0 has PSP i.e. top of user stack
* ip has top of privilege stack
* r8 has hardware-saved stack frame size (only in case of mainline)
*/
push {r4-r7}
push {r2}
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
mov r2, r0 /* safe to use r2 since it is saved on MSP */
/* Check for padding in the sf */
ldr r1, [r0, #_EXC_HW_SAVED_BASIC_SF_XPSR_OFFSET] /* grab xPSR from sf which has the pad bit */
movs r3, #1
/* Check if pad bit 9 is set */
lsls r3, r3, #9
tst r1, r3
beq .L_no_padding
/* special handling for padded sf */
bics r1, r3 /* clear the pad bit (priv stack is aligned and doesn't need it) */
adds r2, #4
.L_no_padding:
/* Calculate original pre-svc user sp which is psp + sf size (+4B if pad bit was set) */
adds r2, #_EXC_HW_SAVED_BASIC_SF_SIZE
mov r3, ip
str r2,[r3, #0]
/* Store the pre-SVC user SP at the offset expected by z_arm_do_syscall,
* as detailed in the table above.
*/
str r2,[r3, #_EXC_HW_SAVED_BASIC_SF_SIZE]
/* sf of priv stack has the same xPSR as user stack but with 9th bit reset */
str r1,[r3, #_EXC_HW_SAVED_BASIC_SF_XPSR_OFFSET]
/* r0-r3, r12, LR from user stack sf are copied to sf of priv stack */
mov r1, r0
mov r2, r3
ldmia r1!, {r4-r7}
stmia r2!, {r4-r7}
ldmia r1!, {r4-r5}
stmia r2!, {r4-r5}
/* Store the svc return address at the offset expected by z_arm_do_syscall,
* as detailed in the table above.
*/
str r5, [r3, #(_EXC_HW_SAVED_BASIC_SF_SIZE+4)]
ldr r1, =z_arm_do_syscall
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
str r1, [r0, r3] /* overwrite the PC to point to z_arm_do_syscall */
str r1, [r3, #_EXC_HW_SAVED_BASIC_SF_RETADDR_OFFSET] /* Execution return to z_arm_do_syscall */
ldr r1, [r0, #_EXC_HW_SAVED_BASIC_SF_RETADDR_OFFSET] /* grab address of PC from stack frame */
/* Store the svc return address (i.e. next instr to svc) in r8 as expected by z_arm_do_syscall.
*/
mov r8, r1
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
str r1, [r0, #24] /* overwrite the PC to point to z_arm_do_syscall */
mov r2, r0 /* safe to use r2 since it is saved on MSP */
/* Calculate original pre-svc user sp without pad which is psp + sf size */
add r2, r8
/* Also, check for padding in the sf */
ldr r1, [r0, #_EXC_HW_SAVED_BASIC_SF_XPSR_OFFSET] /* grab xPSR from sf which has the pad bit */
tst r1, #(1<<9) /* Check if pad bit 9 is set */
beq .L_no_padding
bics r1, #(1<<9) /* clear the pad bit (priv stack is aligned and doesn't need it) */
/* Calculate original pre-svc user sp with pad */
add r2, #4
.L_no_padding:
str r2,[ip, #0]
/* Store the pre-SVC user SP at the offset expected by z_arm_do_syscall,
* as detailed in the table above.
*/
str r2,[ip, r8]
str r1,[ip, #_EXC_HW_SAVED_BASIC_SF_XPSR_OFFSET] /* priv sf get user sf xPSR with bit9 reset */
/* r0-r3, r12, LR from user stack sf are copied to sf of priv stack */
mov r1, r0
mov r2, ip
ldmia r1!, {r4-r7}
stmia r2!, {r4-r7}
ldmia r1!, {r4-r5}
stmia r2!, {r4-r5}
/* Store the svc return address at the offset expected by z_arm_do_syscall,
* as detailed in the table above.
*/
add r8, #4
str r5, [ip, r8]
ldr r1, =z_arm_do_syscall
str r1, [ip, #_EXC_HW_SAVED_BASIC_SF_RETADDR_OFFSET] /* Execution return to z_arm_do_syscall */
ldr r1, [r0, #_EXC_HW_SAVED_BASIC_SF_RETADDR_OFFSET] /* grab address of PC from stack frame */
/* Store the svc return address (i.e. next instr to svc) in r8 as expected by z_arm_do_syscall.
*/
mov r8, r1
/* basic stack frame is copied at this point to privilege stack,
* now time to copy the fp context
*/
#ifdef CONFIG_FPU_SHARING
tst lr, #_EXC_RETURN_FTYPE_Msk
bne .L_skip_fp_copy
add r1, r0, #32
add r2, ip, #32
vldmia r1!, {s0-s15}
vstmia r2!, {s0-s15}
/* copy FPSCR + reserved (8 bytes) */
ldmia r1!, {r4, r5}
stmia r2!, {r4, r5}
.L_skip_fp_copy:
#endif
#endif
pop {r2} /* restore CONTROL value */
pop {r4-r7}
/* Point PSP to privilege stack,
* note that r0 still has the old PSP
*/
msr PSP, ip
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
ldr r3, =K_SYSCALL_LIMIT
cmp r6, r3
@@ -419,14 +750,12 @@ valid_syscall_id:
isb
#if defined(CONFIG_BUILTIN_STACK_GUARD)
/* Thread is now in privileged mode; after returning from SCVall it
* will use the default (user) stack before switching to the privileged
* stack to execute the system call. We need to protect the user stack
* against stack overflows until this stack transition.
*/
ldr r1, [r0, #_thread_offset_to_stack_info_start] /* stack_info.start */
msr PSPLIM, r1
#endif /* CONFIG_BUILTIN_STACK_GUARD */
/* Set stack pointer limit (needed in privileged mode) */
ldr ip, =_kernel
ldr ip, [ip, #_kernel_offset_to_current]
ldr ip, [ip, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
msr PSPLIM, ip
#endif
/* return from SVC to the modified LR - z_arm_do_syscall */
bx lr

View File

@@ -46,6 +46,35 @@
K_THREAD_STACK_DECLARE(z_main_stack, CONFIG_MAIN_STACK_SIZE);
#endif
#ifdef CONFIG_USERSPACE
static void setup_priv_stack(struct k_thread *thread)
{
/* Set up privileged stack before entering user mode */
thread->arch.priv_stack_start = (uint32_t)z_priv_stack_find(thread->stack_obj);
/* CONFIG_PRIVILEGED_STACK_SIZE does not account for MPU_GUARD_ALIGN_AND_SIZE or
* MPU_GUARD_ALIGN_AND_SIZE_FLOAT. Therefore, we must compute priv_stack_end here before
* adjusting priv_stack_start for the mpu guard alignment
*/
thread->arch.priv_stack_end = thread->arch.priv_stack_start + CONFIG_PRIVILEGED_STACK_SIZE;
#if defined(CONFIG_MPU_STACK_GUARD)
/* Stack guard area reserved at the bottom of the thread's
* privileged stack. Adjust the available (writable) stack
* buffer area accordingly.
*/
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
thread->arch.priv_stack_start +=
((thread->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0)
? MPU_GUARD_ALIGN_AND_SIZE_FLOAT
: MPU_GUARD_ALIGN_AND_SIZE;
#else
thread->arch.priv_stack_start += MPU_GUARD_ALIGN_AND_SIZE;
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
#endif /* CONFIG_MPU_STACK_GUARD */
}
#endif
/* An initial context, to be "restored" by z_arm_pendsv(), is put at the other
* end of the stack, and thus reusable by the stack when not needed anymore.
*
@@ -87,9 +116,24 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
#endif /* FP_GUARD_EXTRA_SIZE */
#endif /* CONFIG_MPU_STACK_GUARD */
#if defined(CONFIG_ARM_STORE_EXC_RETURN) || defined(CONFIG_USERSPACE)
thread->arch.mode = 0;
#if defined(CONFIG_ARM_STORE_EXC_RETURN)
thread->arch.mode_exc_return = DEFAULT_EXC_RETURN;
#endif
#if FP_GUARD_EXTRA_SIZE > 0
if ((thread->base.user_options & K_FP_REGS) != 0) {
thread->arch.mode |= Z_ARM_MODE_MPU_GUARD_FLOAT_Msk;
}
#endif
#endif
iframe = Z_STACK_PTR_TO_FRAME(struct __basic_sf, stack_ptr);
#if defined(CONFIG_USERSPACE)
thread->arch.priv_stack_start = 0;
if ((thread->base.user_options & K_USER) != 0) {
setup_priv_stack(thread);
iframe = Z_STACK_PTR_TO_FRAME(struct __basic_sf, thread->arch.priv_stack_end);
iframe->pc = (uint32_t)arch_user_mode_enter;
} else {
iframe->pc = (uint32_t)z_thread_entry;
@@ -111,20 +155,6 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
thread->callee_saved.psp = (uint32_t)iframe;
thread->arch.basepri = 0;
#if defined(CONFIG_ARM_STORE_EXC_RETURN) || defined(CONFIG_USERSPACE)
thread->arch.mode = 0;
#if defined(CONFIG_ARM_STORE_EXC_RETURN)
thread->arch.mode_exc_return = DEFAULT_EXC_RETURN;
#endif
#if FP_GUARD_EXTRA_SIZE > 0
if ((thread->base.user_options & K_FP_REGS) != 0) {
thread->arch.mode |= Z_ARM_MODE_MPU_GUARD_FLOAT_Msk;
}
#endif
#if defined(CONFIG_USERSPACE)
thread->arch.priv_stack_start = 0;
#endif
#endif
/*
* initial values in all other registers/thread entries are
* irrelevant.
@@ -226,13 +256,10 @@ uint32_t z_arm_mpu_stack_guard_and_fpu_adjust(struct k_thread *thread)
#endif
#ifdef CONFIG_USERSPACE
FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
void *p1, void *p2, void *p3)
FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry, void *p1, void *p2, void *p3)
{
uint32_t sp_is_priv = 1;
/* Set up privileged stack before entering user mode */
_current->arch.priv_stack_start =
(uint32_t)z_priv_stack_find(_current->stack_obj);
#if defined(CONFIG_MPU_STACK_GUARD)
#if defined(CONFIG_THREAD_STACK_INFO)
/* We're dropping to user mode which means the guard area is no
@@ -249,24 +276,26 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
_current->stack_info.start -= MPU_GUARD_ALIGN_AND_SIZE;
_current->stack_info.size += MPU_GUARD_ALIGN_AND_SIZE;
#endif /* CONFIG_THREAD_STACK_INFO */
/* Stack guard area reserved at the bottom of the thread's
* privileged stack. Adjust the available (writable) stack
* buffer area accordingly.
*/
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
_current->arch.priv_stack_start +=
((_current->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
MPU_GUARD_ALIGN_AND_SIZE_FLOAT : MPU_GUARD_ALIGN_AND_SIZE;
#else
_current->arch.priv_stack_start += MPU_GUARD_ALIGN_AND_SIZE;
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
#endif /* CONFIG_MPU_STACK_GUARD */
z_arm_userspace_enter(user_entry, p1, p2, p3,
(uint32_t)_current->stack_info.start,
_current->stack_info.size -
_current->stack_info.delta);
/* 2 ways how arch_user_mode_enter is called:
* - called as part of context switch from z_arm_pendsv, in this case privileged stack is
* already setup and stack pointer points to privileged stack.
* - called directly from k_thread_user_mode_enter, in this case privileged stack is not
* setup and stack pointer points to user stack.
*
* When called from k_thread_user_mode_enter, we need to check and setup the privileged
* stack and then instruct z_arm_userspace_enter to change the PSP to the privileged stack.
* Note that we do not change the PSP in this function to avoid any conflict with compiler's
* sequence which has already pushed stuff on the user stack.
*/
if (0 == _current->arch.priv_stack_start) {
setup_priv_stack(_current);
sp_is_priv = 0;
}
z_arm_userspace_enter(user_entry, p1, p2, p3, (uint32_t)_current->stack_info.start,
_current->stack_info.size - _current->stack_info.delta, sp_is_priv);
CODE_UNREACHABLE;
}
@@ -586,9 +615,11 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
"mov r3, #0\n"
"ldr r4, =z_thread_entry\n"
"bx r4\n" /* We dont intend to return, so there is no need to link. */
: "+r" (_main)
: "r" (stack_ptr)
: "r0", "r1", "r2", "r3", "r4");
/* Force a literal pool placement for the addresses referenced above */
".ltorg\n"
:
: "r" (_main), "r" (stack_ptr)
: "r0", "r1", "r2", "r3", "r4", "ip", "lr", "memory");
CODE_UNREACHABLE;
}
@@ -653,13 +684,15 @@ FUNC_NORETURN void z_arm_switch_to_main_no_multithreading(
"ldr r0, =arch_irq_lock_outlined\n"
"blx r0\n"
"loop: b loop\n\t" /* while (true); */
/* Force a literal pool placement for the addresses referenced above */
".ltorg\n"
:
: [_p1]"r" (p1), [_p2]"r" (p2), [_p3]"r" (p3),
[_psp]"r" (psp), [_main_entry]"r" (main_entry)
#ifdef CONFIG_BUILTIN_STACK_GUARD
, [_psplim]"r" (psplim)
#endif
: "r0", "r1", "r2", "r3"
: "r0", "r1", "r2", "ip", "lr"
);
CODE_UNREACHABLE; /* LCOV_EXCL_LINE */

View File

@@ -45,8 +45,9 @@ GEN_OFFSET_SYM(_thread_arch_t, mode_exc_return);
#endif
#if defined(CONFIG_USERSPACE)
GEN_OFFSET_SYM(_thread_arch_t, priv_stack_start);
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
GEN_OFFSET_SYM(_thread_arch_t, priv_stack_end);
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
GEN_OFFSET_SYM(_thread_arch_t, sp_usr);
#endif
#endif

View File

@@ -2,6 +2,7 @@
* Userspace and service handler hooks
*
* Copyright (c) 2017 Linaro Limited
* Copyright 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -41,45 +42,41 @@ GDATA(_k_syscall_table)
*
* The function is invoked as:
* z_arm_userspace_enter(user_entry, p1, p2, p3,
* stack_info.start, stack_info.size);
* stack_info.start, stack_info.size,
* sp_is_priv);
*/
SECTION_FUNC(TEXT,z_arm_userspace_enter)
/* move user_entry to lr */
mov lr, r0
/* prepare to set stack to privileged stack */
/* load arguments from stack:
* r4 = user stack start
* r5 = user stack size
* r6 = sp_is_priv (1 if already on privileged stack)
*/
pop {r4, r5, r6}
/* get current thread pointer */
ldr r0, =_kernel
ldr r0, [r0, #_kernel_offset_to_current]
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
/* move p1 to ip */
mov ip, r1
ldr r1, =_thread_offset_to_priv_stack_start
ldr r0, [r0, r1] /* priv stack ptr */
ldr r1, =CONFIG_PRIVILEGED_STACK_SIZE
add r0, r0, r1
ldr r1, =_thread_offset_to_priv_stack_end
ldr r0, [r0, r1]
/* Restore p1 from ip */
mov r1, ip
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
ldr r0, [r0, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
ldr ip, =CONFIG_PRIVILEGED_STACK_SIZE
add r0, r0, ip
#elif defined(CONFIG_CPU_AARCH32_CORTEX_R)
ldr r0, [r0, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
ldr ip, =CONFIG_PRIVILEGED_STACK_SIZE
add r0, r0, ip
ldr ip, =_kernel
ldr ip, [ip, #_kernel_offset_to_current]
str r0, [ip, #_thread_offset_to_priv_stack_end] /* priv stack end */
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|| defined(CONFIG_CPU_AARCH32_CORTEX_R)
ldr r0, [r0, #_thread_offset_to_priv_stack_end] /* privileged stack ptr */
#endif
/* store current stack pointer to ip
* the current stack pointer is needed to retrieve
* stack_info.start and stack_info.size
*/
mov ip, sp
/* check if current stack is privileged and switch to it if not */
cmp r6, #1
beq 1f
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
#if defined(CONFIG_CPU_AARCH32_CORTEX_R) || defined(CONFIG_CPU_AARCH32_CORTEX_A)
mov sp, r0
#else
/* set stack to privileged stack
@@ -93,35 +90,28 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
msr PSP, r0
#endif
1:
/* push thread args and entrypoint to stack */
push {r1,r2,r3,lr}
#if defined(CONFIG_BUILTIN_STACK_GUARD)
/* At this point the privileged stack is not yet protected by PSPLIM.
* Since we have just switched to the top of the privileged stack, we
* Since we have switched to the top of the privileged stack, we
* are safe, as long as the stack can accommodate the maximum exception
* stack frame.
*/
/* set stack pointer limit to the start of the priv stack */
ldr r0, =_kernel
ldr r0, [r0, #_kernel_offset_to_current]
ldr r0, [r0, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
ldr r1, =CONFIG_PRIVILEGED_STACK_SIZE
sub r0, r0, r1 /* Calculate start of privileged stack */
/* set stack pointer limit to the start of the privileged stack */
msr PSPLIM, r0
#endif
/* push args to stack */
push {r1,r2,r3,lr}
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
mov r1, ip
push {r0,r1}
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|| defined(CONFIG_CPU_AARCH32_CORTEX_R)
push {r0,ip}
#endif
/* Re-program dynamic memory map.
*
* Important note:
* z_arm_configure_dynamic_mpu_regions() may re-program the MPU Stack Guard
* to guard the privilege stack for overflows (if building with option
* to guard the privileged stack for overflows (if building with option
* CONFIG_MPU_STACK_GUARD). There is a risk of actually overflowing the
* stack while doing the re-programming. We minimize the risk by placing
* this function immediately after we have switched to the privileged stack
@@ -135,29 +125,10 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
ldr r0, [r0, #_kernel_offset_to_current]
bl z_arm_configure_dynamic_mpu_regions
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
pop {r0,r3}
/* load up stack info from user stack */
ldr r0, [r3]
ldr r3, [r3, #4]
mov ip, r3
push {r0,r3}
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|| defined(CONFIG_CPU_AARCH32_CORTEX_R)
pop {r0,ip}
/* load up stack info from user stack */
ldr r0, [ip]
ldr ip, [ip, #4]
push {r0,ip}
#endif
/* clear the user stack area to clean out privileged data */
/* from right past the guard right up to the end */
mov r2, ip
mov r0, r4
mov r2, r5
#ifdef CONFIG_INIT_STACKS
ldr r1,=0xaaaaaaaa
#else
@@ -165,17 +136,18 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
#endif
bl memset
/* At this point:
* r4 contains user stack start
* r5 contains user stack size
* calculate top of user stack in r0 (start+size)
*/
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
pop {r0, r1}
mov ip, r1
adds r0, r4, r5
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) \
|| defined(CONFIG_CPU_AARCH32_CORTEX_R)
pop {r0,ip}
add r0, r4, r5
#endif
/* r0 contains user stack start, ip contains user stack size */
add r0, r0, ip /* calculate top of stack */
/* pop remaining arguments from stack before switching stacks */
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
/* Use r4 to pop lr, then restore r4 */
@@ -188,7 +160,7 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
pop {r1,r2,r3,lr}
#endif
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
#if defined(CONFIG_CPU_AARCH32_CORTEX_R) || defined(CONFIG_CPU_AARCH32_CORTEX_A)
/*
* set stack to user stack. We are in SYSTEM state, so r13 and r14 are
* shared with USER state
@@ -223,10 +195,7 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
isb
/* Set PSPLIM to guard the thread's user stack. */
ldr r0, =_kernel
ldr r0, [r0, #_kernel_offset_to_current]
ldr r0, [r0, #_thread_offset_to_stack_info_start]
msr PSPLIM, r0
msr PSPLIM, r4
pop {r0, ip}
#endif
@@ -308,9 +277,8 @@ SECTION_FUNC(TEXT,z_arm_userspace_enter)
* This function is used to do system calls from unprivileged code. This
* function is responsible for the following:
* 1) Fixing up bad syscalls
* 2) Configuring privileged stack and loading up stack arguments
* 3) Dispatching the system call
* 4) Restoring stack and calling back to the caller of the SVC
* 2) Dispatching the system call
* 3) Restoring stack and calling back to the caller of the SVC
*
*/
SECTION_FUNC(TEXT, z_arm_do_syscall)
@@ -328,41 +296,7 @@ SECTION_FUNC(TEXT, z_arm_do_syscall)
* At this point PSPLIM is already configured to guard the default (user)
* stack, so pushing to the default thread's stack is safe.
*/
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
/* save current stack pointer (user stack) */
mov ip, sp
/* temporarily push to user stack */
push {r0,r1}
/* setup privileged stack */
ldr r0, =_kernel
ldr r0, [r0, #_kernel_offset_to_current]
adds r0, r0, #_thread_offset_to_priv_stack_start
ldr r0, [r0] /* priv stack ptr */
ldr r1, =CONFIG_PRIVILEGED_STACK_SIZE
add r0, r1
/* Store current SP and LR at the beginning of the priv stack */
subs r0, #8
mov r1, ip
str r1, [r0, #0]
mov r1, lr
str r1, [r0, #4]
mov ip, r0
/* Restore user stack and original r0, r1 */
pop {r0, r1}
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
/* setup privileged stack */
ldr ip, =_kernel
ldr ip, [ip, #_kernel_offset_to_current]
ldr ip, [ip, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
add ip, #CONFIG_PRIVILEGED_STACK_SIZE
/* Store current SP and LR at the beginning of the priv stack */
subs ip, #8
str sp, [ip, #0]
str lr, [ip, #4]
#elif defined(CONFIG_CPU_AARCH32_CORTEX_R)
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
/*
* The SVC handler has already switched to the privileged stack.
* Store the user SP and LR at the beginning of the priv stack.
@@ -373,11 +307,6 @@ SECTION_FUNC(TEXT, z_arm_do_syscall)
push {ip, lr}
#endif
#if !defined(CONFIG_CPU_AARCH32_CORTEX_R)
/* switch to privileged stack */
msr PSP, ip
#endif
/* Note (applies when using stack limit checking):
* We do not need to lock IRQs after switching PSP to the privileged stack;
* PSPLIM is guarding the default (user) stack, which, by design, is
@@ -386,14 +315,6 @@ SECTION_FUNC(TEXT, z_arm_do_syscall)
* the maximum exception stack frame.
*/
#if defined(CONFIG_BUILTIN_STACK_GUARD)
/* Set stack pointer limit (needed in privileged mode) */
ldr ip, =_kernel
ldr ip, [ip, #_kernel_offset_to_current]
ldr ip, [ip, #_thread_offset_to_priv_stack_start] /* priv stack ptr */
msr PSPLIM, ip
#endif
/*
* r0-r5 contain arguments
* r6 contains call_id

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
* Copyright 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -57,7 +58,8 @@ static ALWAYS_INLINE void arch_switch(void *switch_to, void **switched_from)
extern FUNC_NORETURN void z_arm_userspace_enter(k_thread_entry_t user_entry,
void *p1, void *p2, void *p3,
uint32_t stack_end,
uint32_t stack_start);
uint32_t stack_start,
uint32_t sp_is_priv);
extern void z_arm_fatal_error(unsigned int reason, const struct arch_esf *esf);

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
* Copyright 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -71,10 +72,9 @@ extern FUNC_NORETURN void z_arm_switch_to_main_no_multithreading(
#endif /* !CONFIG_MULTITHREADING */
extern FUNC_NORETURN void z_arm_userspace_enter(k_thread_entry_t user_entry,
void *p1, void *p2, void *p3,
uint32_t stack_end,
uint32_t stack_start);
extern FUNC_NORETURN void z_arm_userspace_enter(k_thread_entry_t user_entry, void *p1, void *p2,
void *p3, uint32_t stack_end, uint32_t stack_start,
uint32_t sp_is_priv);
extern void z_arm_fatal_error(unsigned int reason, const struct arch_esf *esf);

View File

@@ -45,10 +45,10 @@
#define _thread_offset_to_priv_stack_start \
(___thread_t_arch_OFFSET + ___thread_arch_t_priv_stack_start_OFFSET)
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
#define _thread_offset_to_priv_stack_end \
(___thread_t_arch_OFFSET + ___thread_arch_t_priv_stack_end_OFFSET)
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
#define _thread_offset_to_sp_usr \
(___thread_t_arch_OFFSET + ___thread_arch_t_sp_usr_OFFSET)
#endif

View File

@@ -15,11 +15,11 @@
struct int_list_header {
uint32_t table_size;
uint32_t offset;
#if IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION)
#if defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION)
uint32_t swi_table_entry_size;
uint32_t shared_isr_table_entry_size;
uint32_t shared_isr_client_num_offset;
#endif /* IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */
#endif /* defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */
};
/* These values are not included in the resulting binary, but instead form the
@@ -29,13 +29,13 @@ struct int_list_header {
Z_GENERIC_SECTION(.irq_info) __used struct int_list_header _iheader = {
.table_size = IRQ_TABLE_SIZE,
.offset = CONFIG_GEN_IRQ_START_VECTOR,
#if IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION)
#if defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION)
.swi_table_entry_size = sizeof(struct _isr_table_entry),
#if IS_ENABLED(CONFIG_SHARED_INTERRUPTS)
#if defined(CONFIG_SHARED_INTERRUPTS)
.shared_isr_table_entry_size = sizeof(struct z_shared_isr_table_entry),
.shared_isr_client_num_offset = offsetof(struct z_shared_isr_table_entry, client_num),
#endif /* IS_ENABLED(CONFIG_SHARED_INTERRUPTS) */
#endif /* IS_ENABLED(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */
#endif /* defined(CONFIG_SHARED_INTERRUPTS) */
#endif /* defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) */
};
/* These are placeholder tables. They will be replaced by the real tables

View File

@@ -9,6 +9,7 @@
SECTION_DATA_PROLOGUE(.ramfunc,,)
{
__ramfunc_region_start = .;
MPU_ALIGN(__ramfunc_size);
__ramfunc_start = .;
*(.ramfunc)

View File

@@ -61,6 +61,25 @@ void posix_arch_thread_entry(void *pa_thread_status)
z_thread_entry(ptr->entry_point, ptr->arg1, ptr->arg2, ptr->arg3);
}
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
int arch_float_disable(struct k_thread *thread)
{
ARG_UNUSED(thread);
/* Posix always has FPU enabled so cannot be disabled */
return -ENOTSUP;
}
int arch_float_enable(struct k_thread *thread, unsigned int options)
{
ARG_UNUSED(thread);
ARG_UNUSED(options);
/* Posix always has FPU enabled so nothing to do here */
return 0;
}
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
#if defined(CONFIG_ARCH_HAS_THREAD_ABORT)
void z_impl_k_thread_abort(k_tid_t thread)
{

View File

@@ -30,7 +30,6 @@ config RISCV_GP
config RISCV_ALWAYS_SWITCH_THROUGH_ECALL
bool "Do not use mret outside a trap handler context"
depends on MULTITHREADING
depends on !RISCV_PMP
help
Use mret instruction only when in a trap handler.
This is for RISC-V implementations that require every mret to be
@@ -48,10 +47,11 @@ config RISCV_EXCEPTION_STACK_TRACE
menu "RISCV Processor Options"
config INCLUDE_RESET_VECTOR
bool "Include Reset vector"
bool "Jumps to __initialize directly"
help
Include the reset vector stub, which initializes the stack and
prepares for running C code.
Select 'y' here to use the Zephyr provided default implementation that
jumps to `__initialize` directly. Otherwise a SOC needs to provide its
custom `__reset` routine.
config RISCV_PRIVILEGED
bool

View File

@@ -163,6 +163,14 @@ SECTION_FUNC(exception.entry, _isr_wrapper)
lr t0, ___cpu_t_current_OFFSET(s0)
lr tp, _thread_offset_to_tls(t0)
/* Make sure global pointer is sane */
#ifdef CONFIG_RISCV_GP
.option push
.option norelax
la gp, __global_pointer$
.option pop
#endif /* CONFIG_RISCV_GP */
/* Clear our per-thread usermode flag */
lui t0, %tprel_hi(is_user_mode)
add t0, t0, tp, %tprel_add(is_user_mode)
@@ -398,6 +406,22 @@ is_kernel_syscall:
bne t0, t1, skip_schedule
lr a0, __struct_arch_esf_a0_OFFSET(sp)
lr a1, __struct_arch_esf_a1_OFFSET(sp)
#ifdef CONFIG_FPU_SHARING
/*
* When an ECALL is used for a context-switch, the current thread has
* been updated to the next thread.
* Add the exception_depth back to the previous thread.
*/
lb t1, _thread_offset_to_exception_depth(a0)
add t1, t1, -1
sb t1, _thread_offset_to_exception_depth(a0)
lb t1, _thread_offset_to_exception_depth(a1)
add t1, t1, 1
sb t1, _thread_offset_to_exception_depth(a1)
#endif
j reschedule
skip_schedule:
#endif
@@ -412,6 +436,12 @@ do_fault:
1: mv a1, sp
#ifdef CONFIG_EXCEPTION_DEBUG
/*
* Restore the s0 we saved early in ISR entry
* so it shows up properly in the CSF.
*/
lr s0, __struct_arch_esf_s0_OFFSET(sp)
/* Allocate space for caller-saved registers on current thread stack */
addi sp, sp, -__callee_saved_t_SIZEOF

View File

@@ -204,6 +204,34 @@ static bool set_pmp_entry(unsigned int *index_p, uint8_t perm,
return ok;
}
static inline bool set_pmp_mprv_catchall(unsigned int *index_p,
unsigned long *pmp_addr, unsigned long *pmp_cfg,
unsigned int index_limit)
{
/*
* We'll be using MPRV. Make a fallback entry with everything
* accessible as if no PMP entries were matched which is otherwise
* the default behavior for m-mode without MPRV.
*/
bool ok = set_pmp_entry(index_p, PMP_R | PMP_W | PMP_X,
0, 0, pmp_addr, pmp_cfg, index_limit);
#ifdef CONFIG_QEMU_TARGET
if (ok) {
/*
* Workaround: The above produced 0x1fffffff which is correct.
* But there is a QEMU bug that prevents it from interpreting
* this value correctly. Hardcode the special case used by
* QEMU to bypass this bug for now. The QEMU fix is here:
* https://lists.gnu.org/archive/html/qemu-devel/2022-04/msg00961.html
*/
pmp_addr[*index_p - 1] = -1L;
}
#endif
return ok;
}
/**
* @brief Write a range of PMP entries to corresponding PMP registers
*
@@ -320,8 +348,8 @@ static unsigned int global_pmp_end_index;
*/
void z_riscv_pmp_init(void)
{
unsigned long pmp_addr[4];
unsigned long pmp_cfg[1];
unsigned long pmp_addr[5];
unsigned long pmp_cfg[2];
unsigned int index = 0;
/* The read-only area is always there for every mode */
@@ -351,10 +379,28 @@ void z_riscv_pmp_init(void)
(uintptr_t)z_interrupt_stacks[_current_cpu->id],
Z_RISCV_STACK_GUARD_SIZE,
pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
#endif
/*
* This early, the kernel init code uses the IRQ stack and we want to
* safeguard it as soon as possible. But we need a temporary default
* "catch all" PMP entry for MPRV to work. Later on, this entry will
* be set for each thread by z_riscv_pmp_stackguard_prepare().
*/
set_pmp_mprv_catchall(&index, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
/* Write those entries to PMP regs. */
write_pmp_entries(0, index, true, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
/* Activate our non-locked PMP entries for m-mode */
csr_set(mstatus, MSTATUS_MPRV);
/* And forget about that last entry as we won't need it later */
index--;
#else
/* Write those entries to PMP regs. */
write_pmp_entries(0, index, true, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
#endif
#ifdef CONFIG_SMP
#ifdef CONFIG_PMP_STACK_GUARD
/*
@@ -373,6 +419,7 @@ void z_riscv_pmp_init(void)
}
#endif
__ASSERT(index <= PMPCFG_STRIDE, "provision for one global word only");
global_pmp_cfg[0] = pmp_cfg[0];
global_pmp_last_addr = pmp_addr[index - 1];
global_pmp_end_index = index;
@@ -429,24 +476,7 @@ void z_riscv_pmp_stackguard_prepare(struct k_thread *thread)
set_pmp_entry(&index, PMP_NONE,
stack_bottom, Z_RISCV_STACK_GUARD_SIZE,
PMP_M_MODE(thread));
/*
* We'll be using MPRV. Make a fallback entry with everything
* accessible as if no PMP entries were matched which is otherwise
* the default behavior for m-mode without MPRV.
*/
set_pmp_entry(&index, PMP_R | PMP_W | PMP_X,
0, 0, PMP_M_MODE(thread));
#ifdef CONFIG_QEMU_TARGET
/*
* Workaround: The above produced 0x1fffffff which is correct.
* But there is a QEMU bug that prevents it from interpreting this
* value correctly. Hardcode the special case used by QEMU to
* bypass this bug for now. The QEMU fix is here:
* https://lists.gnu.org/archive/html/qemu-devel/2022-04/msg00961.html
*/
thread->arch.m_mode_pmpaddr_regs[index-1] = -1L;
#endif
set_pmp_mprv_catchall(&index, PMP_M_MODE(thread));
/* remember how many entries we use */
thread->arch.m_mode_pmp_end_index = index;

View File

@@ -62,7 +62,8 @@ boot_first_core:
#ifdef CONFIG_INIT_STACKS
/* Pre-populate all bytes in z_interrupt_stacks with 0xAA */
la t0, z_interrupt_stacks
li t1, __z_interrupt_stack_SIZEOF
/* Total size of all cores' IRQ stack */
li t1, __z_interrupt_all_stacks_SIZEOF
add t1, t1, t0
/* Populate z_interrupt_stacks with 0xaaaaaaaa */
@@ -71,7 +72,7 @@ aa_loop:
sw t2, 0x00(t0)
addi t0, t0, 4
blt t0, t1, aa_loop
#endif
#endif /* CONFIG_INIT_STACKS */
/*
* Initially, setup stack pointer to

View File

@@ -58,12 +58,12 @@ static inline bool in_user_thread_stack_bound(uintptr_t addr, const struct k_thr
/* See: zephyr/include/zephyr/arch/riscv/arch.h */
if (IS_ENABLED(CONFIG_PMP_POWER_OF_TWO_ALIGNMENT)) {
start = thread->arch.priv_stack_start - CONFIG_PRIVILEGED_STACK_SIZE;
end = thread->arch.priv_stack_start;
start = thread->arch.priv_stack_start + Z_RISCV_STACK_GUARD_SIZE;
} else {
start = thread->stack_info.start - CONFIG_PRIVILEGED_STACK_SIZE;
end = thread->stack_info.start;
}
end = Z_STACK_PTR_ALIGN(thread->arch.priv_stack_start + K_KERNEL_STACK_RESERVED +
CONFIG_PRIVILEGED_STACK_SIZE);
return (addr >= start) && (addr < end);
}
@@ -134,22 +134,53 @@ static void walk_stackframe(stack_trace_callback_fn cb, void *cookie, const stru
ra = csf->ra;
}
for (int i = 0; (i < MAX_STACK_FRAMES) && vrfy(fp, thread, esf) && (fp > last_fp);) {
if (in_text_region(ra)) {
if (!cb(cookie, ra)) {
break;
}
/*
* Increment the iterator only if `ra` is within the text region to get the
* most out of it
*/
i++;
for (int i = 0; (i < MAX_STACK_FRAMES) && vrfy(fp, thread, esf) && (fp > last_fp); i++) {
if (in_text_region(ra) && !cb(cookie, ra)) {
break;
}
last_fp = fp;
/* Unwind to the previous frame */
frame = (struct stackframe *)fp - 1;
ra = frame->ra;
if ((i == 0) && (esf != NULL)) {
/* Print `esf->ra` if we are at the top of the stack */
if (in_text_region(esf->ra) && !cb(cookie, esf->ra)) {
break;
}
/**
* For the first stack frame, the `ra` is not stored in the frame if the
* preempted function doesn't call any other function, we can observe:
*
* .-------------.
* frame[0]->fp ---> | frame[0] fp |
* :-------------:
* frame[0]->ra ---> | frame[1] fp |
* | frame[1] ra |
* :~~~~~~~~~~~~~:
* | frame[N] fp |
*
* Instead of:
*
* .-------------.
* frame[0]->fp ---> | frame[0] fp |
* frame[0]->ra ---> | frame[1] ra |
* :-------------:
* | frame[1] fp |
* | frame[1] ra |
* :~~~~~~~~~~~~~:
* | frame[N] fp |
*
* Check if `frame->ra` actually points to a `fp`, and adjust accordingly
*/
if (vrfy(frame->ra, thread, esf)) {
fp = frame->ra;
frame = (struct stackframe *)fp;
}
}
fp = frame->fp;
ra = frame->ra;
}
}
#else /* !CONFIG_FRAME_POINTER */

View File

@@ -100,8 +100,8 @@ void z_x86_irq_connect_on_vector(unsigned int irq,
*/
int arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
void (*func)(const void *arg),
const void *arg, uint32_t flags)
void (*routine)(const void *parameter),
const void *parameter, uint32_t flags)
{
uint32_t key;
int vector;
@@ -124,7 +124,7 @@ int arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
#endif /* CONFIG_INTEL_VTD_ICTL */
z_irq_controller_irq_config(vector, irq, flags);
z_x86_irq_connect_on_vector(irq, vector, func, arg);
z_x86_irq_connect_on_vector(irq, vector, routine, parameter);
}
irq_unlock(key);

View File

@@ -33,6 +33,9 @@ extern char _heap_start[];
/** MPU foreground map for kernel mode. */
static struct xtensa_mpu_map xtensa_mpu_map_fg_kernel;
/** Make sure write to the MPU region is atomic. */
static struct k_spinlock xtensa_mpu_lock;
/*
* Additional information about the MPU maps: foreground and background
* maps.
@@ -629,6 +632,9 @@ void xtensa_mpu_map_write(struct xtensa_mpu_map *map)
#endif
{
int entry;
k_spinlock_key_t key;
key = k_spin_lock(&xtensa_mpu_lock);
#ifdef CONFIG_USERSPACE
struct xtensa_mpu_map *map = thread->arch.mpu_map;
@@ -652,6 +658,8 @@ void xtensa_mpu_map_write(struct xtensa_mpu_map *map)
__asm__ volatile("wptlb %0, %1\n\t"
: : "a"(map->entries[entry].at), "a"(map->entries[entry].as));
}
k_spin_unlock(&xtensa_mpu_lock, key);
}
/**
@@ -765,6 +773,7 @@ int arch_mem_domain_partition_remove(struct k_mem_domain *domain,
{
int ret;
uint32_t perm;
struct k_thread *cur_thread;
struct xtensa_mpu_map *map = &domain->arch.mpu_map;
struct k_mem_partition *partition = &domain->partitions[partition_id];
uintptr_t end_addr = partition->start + partition->size;
@@ -833,6 +842,15 @@ int arch_mem_domain_partition_remove(struct k_mem_domain *domain,
CONFIG_XTENSA_MPU_DEFAULT_MEM_TYPE,
NULL);
/*
* Need to update hardware MPU regions if we are removing
* partition from the domain of the current running thread.
*/
cur_thread = _current_cpu->current;
if (cur_thread->mem_domain_info.mem_domain == domain) {
xtensa_mpu_map_write(cur_thread);
}
out:
return ret;
}
@@ -841,6 +859,7 @@ int arch_mem_domain_partition_add(struct k_mem_domain *domain,
uint32_t partition_id)
{
int ret;
struct k_thread *cur_thread;
struct xtensa_mpu_map *map = &domain->arch.mpu_map;
struct k_mem_partition *partition = &domain->partitions[partition_id];
uintptr_t end_addr = partition->start + partition->size;
@@ -855,6 +874,20 @@ int arch_mem_domain_partition_add(struct k_mem_domain *domain,
CONFIG_XTENSA_MPU_DEFAULT_MEM_TYPE,
NULL);
/*
* Need to update hardware MPU regions if we are removing
* partition from the domain of the current running thread.
*
* Note that this function can be called with dummy thread
* at boot so we need to avoid writing MPU regions to
* hardware.
*/
cur_thread = _current_cpu->current;
if (((cur_thread->base.thread_state & _THREAD_DUMMY) != _THREAD_DUMMY) &&
(cur_thread->mem_domain_info.mem_domain == domain)) {
xtensa_mpu_map_write(cur_thread);
}
out:
return ret;
}

View File

@@ -317,6 +317,13 @@ void xtensa_mmu_init(void)
xtensa_init_paging(xtensa_kernel_ptables);
/*
* This is used to determine whether we are faulting inside double
* exception if this is not zero. Sometimes SoC starts with this not
* being set to zero. So clear it during boot.
*/
XTENSA_WSR(ZSR_DEPC_SAVE_STR, 0);
arch_xtensa_mmu_post_init(_current_cpu->id == 0);
}

View File

@@ -311,7 +311,7 @@ You can debug an application in the usual way. Here is an example for the
:goals: debug
.. _pyOCD:
https://github.com/mbedmicro/pyOCD
https://github.com/pyocd/pyOCD
.. _CMSIS DAP:
https://developer.mbed.org/handbook/CMSIS-DAP
@@ -323,7 +323,7 @@ You can debug an application in the usual way. Here is an example for the
http://wiki.seeed.cc/BLE_Nitrogen/
.. _pyOCD issue 259:
https://github.com/mbedmicro/pyOCD/issues/259
https://github.com/pyocd/pyOCD/issues/259
.. _96Boards IE Specification:
https://linaro.co/ie-specification

View File

@@ -10,7 +10,7 @@
/ {
model = "Arduino Uno R4 Board";
compatible = "renesas,r7fa4m1aB3cfm";
compatible = "renesas,r7fa4m1ab3cfm";
chosen {
zephyr,console = &uart2;

View File

@@ -20,4 +20,5 @@ if(CONFIG_BOARD_MPS2_AN521_CPU1 AND NOT CONFIG_OPENAMP)
BUILD_BYPRODUCTS "${CPU0_BINARY_DIR}/${KERNEL_BIN_NAME}"
BUILD_ALWAYS True
)
add_dependencies(app empty_cpu0)
endif()

View File

@@ -32,7 +32,7 @@ config TEST_EXTRA_STACK_SIZE
endif # COVERAGE_GCOV
endif
endif # BOARD_MPS2_AN383 || BOARD_MPS2_AN385 || BOARD_MPS2_AN386 || BOARD_MPS2_AN500
if BOARD_MPS2_AN521_CPU0 || BOARD_MPS2_AN521_CPU0_NS || BOARD_MPS2_AN521_CPU1
@@ -57,4 +57,11 @@ config UART_INTERRUPT_DRIVEN
endif # SERIAL
endif # BOARD_MPS2_AN521_CPU0 || BOARD_MPS2_AN521_CPU0_NS || BOARD_MPS2_AN521_CPU1
if QEMU_TARGET
config ISR_STACK_SIZE
default 4096
endif

View File

@@ -11,6 +11,7 @@ supported:
- counter
- netif:serial-net
- gpio
- watchdog
testing:
default: true
vendor: arm

View File

@@ -81,14 +81,18 @@
/* On-board antenna pinmux states */
board_ant_tx_pa_off: board_ant_tx_pa_off {
pinmux = <29 IOC_PORT_GPIO>;
bias-disable;
};
board_ant_tx_pa_on: board_ant_tx_pa_on {
pinmux = <29 IOC_PORT_RFC_GPO3>;
bias-disable;
};
board_ant_subg_off: board_ant_subg_off {
pinmux = <30 IOC_PORT_GPIO>;
bias-disable;
};
board_ant_subg_on: board_ant_subg_on {
pinmux = <30 IOC_PORT_RFC_GPO0>;
bias-disable;
};
};

View File

@@ -42,18 +42,33 @@
};
};
/**
* The BeagleConnect Freedom has an on-board antenna switch (SKY13317-373LF) used to select
* the appropriate RF signal port based on the currently-used PHY.
*
* Truth table:
*
* Path DIO29 DIO30
* =========== ===== =====
* Off 0 0
* Sub-1 GHz 0 1 // DIO30 mux to IOC_PORT_RFC_GPO0 for auto
* 20 dBm TX 1 0 // DIO29 mux to IOC_PORT_RFC_GPO3 for auto
*/
antenna_mux0: antenna_mux0 {
compatible = "skyworks,sky13317";
status = "okay";
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>, <&gpio0 30 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&board_ant_tx_pa_off &board_ant_subg_off>;
pinctrl-1 = <&board_ant_tx_pa_off &board_ant_subg_on>;
pinctrl-2 = <&board_ant_tx_pa_on &board_ant_subg_on>;
pinctrl-names = "default", "ant_subg", "ant_subg_pa";
};
leds: leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>; // 2.4GHz TX/RX
};
/* U.FL connector switch */
rf_sw: rf_sw {
gpios =
<&gpio0 29 GPIO_ACTIVE_HIGH>, // SubG TX +20dB
<&gpio0 30 GPIO_ACTIVE_HIGH>; // SubG TX/RX 0dB
};
};
sens_i2c: sensor-switch {

View File

@@ -1,8 +1,9 @@
/* SPDX-License-Identifier: Apache-2.0
*
/*
* Copyright (c) 2021 Florin Stancu
* Copyright (c) 2021 Jason Kridner, BeagleBoard.org Foundation
* Copyright (c) 2024 Ayush Singh <ayush@beagleboard.org>
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
@@ -10,107 +11,108 @@
* switch.
*/
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#define DT_DRV_COMPAT skyworks_sky13317
#include <zephyr/init.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/pinctrl.h>
#include <ti/drivers/rf/RF.h>
#include <driverlib/gpio.h>
#include <driverlib/ioc.h>
#include <driverlib/rom.h>
#include <driverlib/interrupt.h>
/* DIOs for RF antenna paths */
#define BOARD_RF_HIGH_PA 29 /* TODO: pull from DT */
#define BOARD_RF_SUB1GHZ 30 /* TODO: pull from DT */
/* custom pinctrl states for the antenna mux */
#define PINCTRL_STATE_ANT_SUBG 1
#define PINCTRL_STATE_ANT_SUBG_PA 2
static void board_cc13xx_rf_callback(RF_Handle client, RF_GlobalEvent events,
void *arg);
#define BOARD_ANT_GPIO_PA 0
#define BOARD_ANT_GPIO_SUBG 1
static int board_antenna_init(const struct device *dev);
static void board_cc13xx_rf_callback(RF_Handle client, RF_GlobalEvent events, void *arg);
const RFCC26XX_HWAttrsV2 RFCC26XX_hwAttrs = {
.hwiPriority = INT_PRI_LEVEL7,
.swiPriority = 0,
.hwiPriority = INT_PRI_LEVEL7,
.swiPriority = 0,
.xoscHfAlwaysNeeded = true,
/* RF driver callback for custom antenna switching */
.globalCallback = board_cc13xx_rf_callback,
/* Subscribe to events */
.globalEventMask = (RF_GlobalEventRadioSetup |
RF_GlobalEventRadioPowerDown),
.globalEventMask = (RF_GlobalEventRadioSetup | RF_GlobalEventRadioPowerDown),
};
PINCTRL_DT_INST_DEFINE(0);
DEVICE_DT_INST_DEFINE(0, board_antenna_init, NULL, NULL, NULL, POST_KERNEL,
CONFIG_BOARD_ANTENNA_INIT_PRIO, NULL);
static const struct pinctrl_dev_config *ant_pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(0);
static const struct gpio_dt_spec ant_gpios[] = {
DT_FOREACH_PROP_ELEM_SEP(DT_NODELABEL(antenna_mux0), gpios, GPIO_DT_SPEC_GET_BY_IDX, (,))};
/**
* Antenna switch GPIO init routine.
*/
static int board_antenna_init(void)
static int board_antenna_init(const struct device *dev)
{
ARG_UNUSED(dev);
int i;
/* set all paths to low */
IOCPinTypeGpioOutput(BOARD_RF_HIGH_PA);
GPIO_setOutputEnableDio(BOARD_RF_HIGH_PA, GPIO_OUTPUT_DISABLE);
IOCPinTypeGpioOutput(BOARD_RF_SUB1GHZ);
GPIO_setOutputEnableDio(BOARD_RF_SUB1GHZ, GPIO_OUTPUT_DISABLE);
/* default pinctrl configuration: set all antenna mux control pins as GPIOs */
pinctrl_apply_state(ant_pcfg, PINCTRL_STATE_DEFAULT);
/* set all GPIOs to 0 (all RF paths disabled) */
for (i = 0; i < ARRAY_SIZE(ant_gpios); i++) {
gpio_pin_configure_dt(&ant_gpios[i], 0);
}
return 0;
}
SYS_INIT(board_antenna_init, POST_KERNEL, CONFIG_BOARD_ANTENNA_INIT_PRIO);
void board_cc13xx_rf_callback(RF_Handle client, RF_GlobalEvent events, void *arg)
/**
* Custom TI RFCC26XX callback for switching the on-board antenna mux on radio setup.
*/
static void board_cc13xx_rf_callback(RF_Handle client, RF_GlobalEvent events, void *arg)
{
bool sub1GHz = false;
bool sub1GHz = false;
uint8_t loDivider = 0;
int i;
/* Switch off all paths first. Needs to be done anyway in every sub-case below. */
GPIO_setOutputEnableDio(BOARD_RF_HIGH_PA, GPIO_OUTPUT_DISABLE);
GPIO_setOutputEnableDio(BOARD_RF_SUB1GHZ, GPIO_OUTPUT_DISABLE);
/* Clear all antenna switch GPIOs (for all cases). */
for (i = 0; i < ARRAY_SIZE(ant_gpios); i++) {
gpio_pin_configure_dt(&ant_gpios[i], 0);
}
if (events & RF_GlobalEventRadioSetup) {
/* Decode the current PA configuration. */
RF_TxPowerTable_PAType paType = (RF_TxPowerTable_PAType)
RF_getTxPower(client).paType;
RF_TxPowerTable_PAType paType =
(RF_TxPowerTable_PAType)RF_getTxPower(client).paType;
/* Decode the generic argument as a setup command. */
RF_RadioSetup *setupCommand = (RF_RadioSetup *)arg;
switch (setupCommand->common.commandNo) {
case (CMD_RADIO_SETUP):
case (CMD_BLE5_RADIO_SETUP):
case CMD_RADIO_SETUP:
case CMD_BLE5_RADIO_SETUP:
loDivider = RF_LODIVIDER_MASK & setupCommand->common.loDivider;
/* Sub-1GHz front-end. */
if (loDivider != 0)
sub1GHz = true;
break;
case (CMD_PROP_RADIO_DIV_SETUP):
case CMD_PROP_RADIO_DIV_SETUP:
loDivider = RF_LODIVIDER_MASK & setupCommand->prop_div.loDivider;
/* Sub-1GHz front-end. */
if (loDivider != 0)
sub1GHz = true;
break;
default:
break;
}
sub1GHz = (loDivider != 0);
/* Sub-1 GHz */
if (paType == RF_TxPowerTable_HighPA) {
/* PA enable --> HIGH PA */
/* LNA enable --> Sub-1 GHz */
/* Note: RFC_GPO3 is a work-around because the RFC_GPO1 */
/* is sometimes not de-asserted on CC1352 Rev A. */
IOCPortConfigureSet(BOARD_RF_HIGH_PA,
IOC_PORT_RFC_GPO3, IOC_IOMODE_NORMAL);
IOCPortConfigureSet(BOARD_RF_SUB1GHZ,
IOC_PORT_RFC_GPO0, IOC_IOMODE_NORMAL);
} else {
/* RF core active --> Sub-1 GHz */
IOCPortConfigureSet(BOARD_RF_HIGH_PA,
IOC_PORT_GPIO, IOC_IOMODE_NORMAL);
IOCPortConfigureSet(BOARD_RF_SUB1GHZ,
IOC_PORT_GPIO, IOC_IOMODE_NORMAL);
GPIO_setOutputEnableDio(BOARD_RF_SUB1GHZ, GPIO_OUTPUT_ENABLE);
if (sub1GHz) {
if (paType == RF_TxPowerTable_HighPA) {
/* Note: RFC_GPO3 is a work-around because the RFC_GPO1 */
/* is sometimes not de-asserted on CC1352 Rev A. */
pinctrl_apply_state(ant_pcfg, PINCTRL_STATE_ANT_SUBG_PA);
} else {
pinctrl_apply_state(ant_pcfg, PINCTRL_STATE_ANT_SUBG);
/* Manually set the sub-GHZ antenna switch DIO */
gpio_pin_configure_dt(&ant_gpios[BOARD_ANT_GPIO_SUBG], 1);
}
}
} else {
/* Reset the IO multiplexer to GPIO functionality */
IOCPortConfigureSet(BOARD_RF_HIGH_PA,
IOC_PORT_GPIO, IOC_IOMODE_NORMAL);
IOCPortConfigureSet(BOARD_RF_SUB1GHZ,
IOC_PORT_GPIO, IOC_IOMODE_NORMAL);
pinctrl_apply_state(ant_pcfg, PINCTRL_STATE_DEFAULT);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -21,12 +21,17 @@ This board has following features:
* :abbr:`USB (Universal Serial Bus)`
* :abbr:`WDT (Watchdog Timer)`
.. figure:: img/ctcc_nrf52840.webp
.. figure:: img/ctcc_nrf52840_mpcie.webp
:align: center
:width: 300
:alt: CTCC nRF52840
:alt: CTCC nRF52840 mPCIe
ctcc/nrf52840 board target
ctcc/nrf52840 mPCie board
.. figure:: img/ctcc_nrf52840_m2.webp
:align: center
:alt: CTCC nRF52840 M.2
ctcc/nrf52840 M.2 board
More information about the board can be found at the
`ctcc_nrf52840 Website`_ and for SoC information: `Nordic Semiconductor Infocenter`_.

View File

@@ -141,9 +141,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -141,9 +141,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -463,9 +463,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -116,9 +116,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -146,9 +146,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -112,9 +112,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -112,9 +112,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -161,9 +161,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -161,9 +161,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -527,9 +527,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -111,7 +111,7 @@
compatible = "zephyr,mipi-dbi-spi";
reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
dc-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
spi-dev = <&spi2>;
spi-dev = <&spi4>;
write-only;
#address-cells = <1>;
#size-cells = <0>;

View File

@@ -79,9 +79,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -15,7 +15,7 @@ config ESP_SPIRAM
default y if !MCUBOOT
choice SPIRAM_TYPE
default SPIRAM_TYPE_ESPPSRAM64
default SPIRAM_TYPE_ESPPSRAM32
endchoice
config HEAP_MEM_POOL_ADD_SIZE_BOARD

View File

@@ -120,9 +120,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -67,9 +67,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -181,9 +181,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

@@ -19,9 +19,8 @@ Hardware
For more information about the CYW20829 SoC and CYW920829M2EVK-02 board:
- `CYW920829M2EVK-02 Website`_
- `CYW920829M2EVK-02 BT User Guide`_
- `CYW20829 SoC Website`_
- `CYW920829M2EVK-02 Board Website`_
Kit Features:
=============
@@ -86,51 +85,76 @@ To fetch Binary Blobs:
Build blinking led sample
*************************
Here is an example for the :zephyr:code-sample:`blinky` application.
Here is an example for building the :zephyr:code-sample:`blinky` sample application.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: cyw920829m2evk_02
:goals: build flash
OpenOCD Installation
====================
To get the OpenOCD package, it is required that you
1. Download and install the `ModusToolbox`_ software.
2. After the installation, add the directory containing the OpenOCD scripts to your environment's PATH variable.
:goals: build
Programming and Debugging
*************************
The CYW920829M2EVK-02 includes an onboard programmer/debugger (KitProg3) to provide debugging, flash programming, and serial communication over USB. Flash and debug commands must be pointed to the Cypress OpenOCD you downloaded above.
The CYW920829M2EVK-02 includes an onboard programmer/debugger (`KitProg3`_) to provide debugging, flash programming, and serial communication over USB. Flash and debug commands use OpenOCD and require a custom Infineon OpenOCD version, that supports KitProg3, to be installed.
On Windows:
Infineon OpenOCD Installation
=============================
.. code-block:: shell
Both the full `ModusToolbox`_ and the `ModusToolbox Programming Tools`_ packages include Infineon OpenOCD. Installing either of these packages will also install Infineon OpenOCD. If neither package is installed, a minimal installation can be done by downloading the `Infineon OpenOCD`_ release for your system and manually extract the files to a location of your choice.
west flash --openocd path/to/infineon/openocd/bin/openocd.exe
west debug --openocd path/to/infineon/openocd/bin/openocd.exe
.. note:: Linux requires device access rights to be set up for KitProg3. This is handled automatically by the ModusToolbox and ModusToolbox Programming Tools installations. When doing a minimal installation, this can be done manually by executing the script ``openocd/udev_rules/install_rules.sh``.
On Linux:
West Commands
=============
.. code-block:: shell
The path to the installed Infineon OpenOCD executable must be available to the ``west`` tool commands. There are multiple ways of doing this. The example below uses a permanent CMake argument to set the CMake variable ``OPENOCD``.
west flash --openocd path/to/infineon/openocd/bin/openocd
west debug --openocd path/to/infineon/openocd/bin/openocd
.. tabs::
.. group-tab:: Windows
.. code-block:: shell
# Run west config once to set permanent CMake argument
west config build.cmake-args -- -DOPENOCD=path/to/infineon/openocd/bin/openocd.exe
# Do a pristine build once after setting CMake argument
west build -b cyw920829m2evk_02 -p always samples/basic/blinky
west flash
west debug
.. group-tab:: Linux
.. code-block:: shell
# Run west config once to set permanent CMake argument
west config build.cmake-args -- -DOPENOCD=path/to/infineon/openocd/bin/openocd
# Do a pristine build once after setting CMake argument
west build -b cyw920829m2evk_02 -p always samples/basic/blinky
west flash
west debug
Once the gdb console starts after executing the west debug command, you may now set breakpoints and perform other standard GDB debugging on the CYW20829 CM33 core.
.. _CYW920829M2EVK-02 Website:
.. _CYW20829 SoC Website:
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-bluetooth-le-bluetooth-multiprotocol/airoc-bluetooth-le/cyw20829/
.. _CYW920829M2EVK-02 Board Website:
https://www.infineon.com/cms/en/product/evaluation-boards/cyw920829m2evk-02/
.. _CYW920829M2EVK-02 BT User Guide:
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-bluetooth-le-bluetooth-multiprotocol/airoc-bluetooth-le/cyw20829/#!?fileId=8ac78c8c8929aa4d018a16f726c46b26
.. _ModusToolbox:
https://softwaretools.infineon.com/tools/com.ifx.tb.tool.modustoolbox
.. _ModusToolbox Programming Tools:
https://softwaretools.infineon.com/tools/com.ifx.tb.tool.modustoolboxprogtools
.. _Infineon OpenOCD:
https://github.com/infineon/openocd/releases/tag/release-v4.3.0
https://github.com/Infineon/openocd/releases/latest
.. _KitProg3:
https://github.com/Infineon/KitProg3

View File

@@ -111,9 +111,9 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
.. code-block:: cfg
.. code-block:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -108,9 +108,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -134,9 +134,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -160,9 +160,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -109,9 +109,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -78,9 +78,10 @@ There are two options to be used when building an application:
User can select the MCUboot bootloader by adding the following line
to the board default configuration file.
```
CONFIG_BOOTLOADER_MCUBOOT=y
```
.. code:: cfg
CONFIG_BOOTLOADER_MCUBOOT=y
Sysbuild
========

View File

@@ -2,4 +2,6 @@
# SPDX-License-Identifier: Apache-2.0
config BOARD_MT8195_ADSP
bool "Mediatek MT8195 Audio DSP"
select SOC_MT8195_ADSP
help
Board with Mediatek MT8195 Audio DSP

Some files were not shown because too many files have changed in this diff Show More