Commit Graph

104857 Commits

Author SHA1 Message Date
Luca Burelli 33def3036a drivers/flash/soc_flash_mcux: adjust alignment logic
The current alignment logic does not work as expected if given unaligned
values, resulting in a skip of the first word. The length also has to
take into account the starting address: for example, asking for 2 bytes
at offset 3 should actually check 8 bytes.

This patch adjusts the logic so that it always includes the first and
the last word of the input area.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-07 08:32:14 -06:00
Luca Burelli 20cd3a3f09 drivers/flash/mcux: fix flash_read() operation on LPC55S36
As other targets in the LPC55xxx series, the LPC55S36 has a Flash
controller that raises ECC errors when reading erased pages directly.
To avoid this, there is special code for this platform that calls the
HAL FLASH_IsFlashAreaReadable() function. However, this in turn calls a
function at an hardcoded address in ROM that _always_ causes an
instruction fault, making the situation worse.

This patch reworks the read operation to use the FLASH_Read() HAL
function for this target to gracefully handle error conditions and
properly emulate accesses to erased pages. The preprocessor is required
since some targets do not define the FLASH_Read() function.

Fixes: #80325

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-07 08:32:14 -06:00
Andries Kruithof 5a03d3f51c Bluetooth: Audio: Fix description for broadcast_code callback
Small mismatch between the actual procedure name and the name as
described in the doxygen documentation for the bap set broadcast
code procedure

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-11-07 08:32:04 -06:00
Henrik Skreslet e254a7f3c8 modem: cmux: added validation of cmux frame length
Validates cmux frame length and drops it if its larger
than the receive buffer

Signed-off-by: Henrik Skreslet <henrik.skreslet@gmail.com>
2024-11-07 08:31:48 -06:00
Gaofeng Zhang c3466b14d0 manifest: Update hal_nxp to fix hang when board reset
Update hal_nxp to fix hang when board reset

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2024-11-06 18:57:47 -08:00
Fabio Baltieri 5155c0e820 doc: release: add a step to verify that the tag is signed
Add an extra "git show" step to the release process to verify that the
key has been indeed signed.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-11-06 18:52:51 -08:00
Riadh Ghaddab f556826c83 doc: release: 4.0: add notes on ZMS
Add notes about the new storage system ZMS

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-11-06 18:52:39 -08:00
Benjamin Cabé 4300a4c33b doc: boards: esp32: fix XIAO-ESP32S3 build instructions
fix wrong board target in build command snippets

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-06 16:41:21 -06:00
Sylvio Alves 85f9940e14 doc: release: 4.0: Add Espressif changes.
Adds notes on Espressif changes to this release.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-06 16:40:30 -06:00
Sylvio Alves 07fd5600a9 kconfig: fix typo and help description.
Fix typo and re-phrase help description to improve it.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-06 16:40:30 -06:00
Sylvio Alves 41b3cd77df docs: boards: xiao_esp32s3: migrate board name to new directive
Update board name to meet zephyr:board model.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-06 16:40:30 -06:00
Josuah Demangeon 467f31190e doc: release: 4.0: Add video driver and video API updates
Add entries for video driver contributed or enhanced.
Add entries for video APIs introduced or modified.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-06 16:40:13 -06:00
Daniel Leung d4b1302387 doc: release/4.0: add bits about serial
This adds some bits about serial/UART in the migration
and release notes for 4.0.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-06 16:39:55 -06:00
Daniel Leung 6fb8157ee4 doc: release/4.0: add bits about demand paging
This adds some bits about demand paging in release note
for 4.0.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-06 16:39:55 -06:00
Sumit Batra e0d1e5973d mdio: fmurt6: dts: Enable the parent node of mdio
mdio_enet_nxp driver accesses the registers of its parent node Ethernet MAC
This commit enables this node in mimxrt1062_fmurt6 board's device tree.
This also fixes Issue #80881

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2024-11-06 16:39:32 -06:00
Grzegorz Swiderski 8fc161f820 west: runners: nrf: Check for missing UICR
On nRF54H and nRF92, booting certain cores requires programming a UICR,
which is normally generated using nrf-regtool. This should be considered
an optional dependency, because we do not wish to force non-Nordic users
to install it just to work with Zephyr, or just for build-only tests.

When nrf-regtool is not installed, a CMake warning will be displayed,
but people ignore warnings all the time. As the last line of defense,
check for missing UICR in the nrfutil flash runner, to prevent our users
from unintentionally programming unbootable firmware. Show a fatal error
specifically if CONFIG_NRF_REGTOOL_GENERATE_UICR=y, yet no UICR exists.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-11-06 16:39:09 -06:00
Benjamin Cabé ce02d0c0fc doc: releases: Complete documentation release notes for 4.0
This completes the existing "Documentation" section of the release notes
for 4.0 by documenting the various changes/improvements implemented
during the last development cycle.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-06 16:38:49 -06:00
Szymon Janc 2f6a65c8a4 test: bluetooth: Update ICS to TCRL 2024-2
GAP PAST (and BAP) tests were also enabled since controller support is
under review.

This also adds bqw file which is exported draft project from
Qualification Workspace.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-11-06 17:38:36 -05:00
Anas Nashif 8a824f307d mips: tracing: add switched_out trace point
add missing switched_out trace point.

Partially fixes #76057

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-06 14:43:27 -06:00
Christophe Dufaza b0b278503f Revert "edtlib: fix "last modified" semantic for included ... specs"
[1] was introduced to get more valuable answers from
the PropertySpec.path API, which is supposed to tell
in which file the property's specification was "last modfied".

Further work on related issues [2] showed that the
approach chosen in [1] is dead end: we need to first rethink
how bindings (and especially child-bindings) are initialized.

[1] edtlib: fix last modified semantic in included property specs
[2] edtlib: Preserve paths of properties from included child bindings

See also: #65221, #78095

This reverts commit b3b5ad8156.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2024-11-06 14:43:19 -06:00
Christophe Dufaza c58d6761bc edtlib: tests: cover basics of filtering inherited properties
Use-case "B includes I includes X":
- X is a base binding file, specifying common properties
- I is an intermediary binding file, which includes X
  without modification nor filter
- B includes I, filtering the properties it chooses
  to inherit with an allowlist or a blocklist

Check that the properties inherited from X via I
are actually filtered as B intends to,
up to the grandchild-binding level.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2024-11-06 14:43:19 -06:00
Christophe Dufaza 0b946dfc01 Revert "edtlib: test "last modified" semantic for ... specs"
This unit test was added to cover the change introduced by [1].

Further work on related issues [2] showed that the chosen approach
is dead end.
We're reverting all changes made in [1].

[1] edtlib: fix last modified semantic in included property specs
[2] edtlib: Preserve paths of properties from included child bindings

See also: #65221, #78095

This reverts commit 70eaa61cb0.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2024-11-06 14:43:19 -06:00
Christophe Dufaza 308b568219 Revert "edtlib: test filters set by including bindings"
This unit test was added specifically to cover a regression
reported by the CI while working on [1].

Further work on related issues [2] showed that:
- [1] and [2] are dead end: we need to first rethink
  how bindings (and especially child-bindings) are initialized
- the inclusion mechanism supported by Zephyr deserves more systematic
  testing in edtlib if we want to work with confidence

The approach we choose is to:
- revert all changes made in [1]
- from there, systematically add unit tests as we address
  the issues we identified (or the additional features we need)
  one after the other

[1] edtlib: fix last modified semantic in included property specs
[2] edtlib: Preserve paths of properties from included child bindings

See also: #65221, #78095

This reverts commit 33bb3b60d9.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2024-11-06 14:43:19 -06:00
Daniel Kampert ec10d56fbb drivers: rtc: rv8263-c8: Alarm reworking
- Fix typos for alarm field identification
- Fix a bug where an alarm interrupt starts
update interrupts
- Rework interrupt code to reduce code size
and complexity

Signed-off-by: Daniel Kampert <danielkampert@kampis-elektroecke.de>
2024-11-06 14:43:10 -06:00
Xiaoli Ji e20c095eee soc: nxp: imxrt118x: update MPU configuration
fixes: #80721
Updated mpu region address to secure address.

Signed-off-by: Xiaoli Ji <xiaoli.ji@nxp.com>
2024-11-06 14:43:00 -06:00
Emil Gydesen 1f1e4afa4f Bluetooth: CSIP: Handle disconnects while in procedure
If a device disconnects while we are in a procedure then
get_next_active_instance would return a service instance pointer
with the `conn` set to NULL.

The issue was caused by the set_info being potentially memset
when the device that disconnected was the one that held the
set_info pointer.
The solution is to not use a pointer, but rather a copy of the
set_info, so that the active.set_info value is still valid
after a disconnect.

Since the set_info is not longer a pointer to a specific
set_info from one of the members, the logs have been updated
as well, as the pointer of the active.set_info is useless
for debugging.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-06 14:42:51 -06:00
Johan Hedberg b710167f1b Bluetooth: drivers: Rename IPM to IPC
This bus type was originally created for what's today the ipc.c HCI driver.
Since this type hasn't yet been synced with BlueZ, rename it for
consistency, however leave the old define to not break backwards
compatibility with existing DT bindings (there are several more that use
"ipm" than ipc.c).

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-06 14:42:19 -06:00
Johan Hedberg af3dac2131 Bluetooth: drivers: Sync bus types with BlueZ
The authoritative source of these values is BlueZ:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/lib/hci.h#n38

Update our values with the above. The IPM definiton doesn't exist in
BlueZ, but should be added there to make sure we don't get out of sync
again.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-06 14:42:19 -06:00
Henrik Brix Andersen d5c88d6576 doc: releases: 4.0: add EEPROM release notes
Add EEPROM related release notes for Zephyr v4.0.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-11-06 14:41:52 -06:00
Henrik Brix Andersen f5090110da doc: releases: 4.0: add CAN release notes
Add CAN related release notes for Zephyr v4.0.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-11-06 14:41:52 -06:00
Chaitanya Tata 87a9363fa7 drivers: nrfiwif: Enable recovery by default
This is needed to ensure Wi-Fi can always be used.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-06 14:41:44 -06:00
Dominik Ermel 756affe2eb doc: releases: 4.0: Add release notes for Flash and Storage
Update of release notes in areas related to Storage and Flash.
Additionally two known Stream Flash issues have been added to
Know Issue section.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-06 14:41:35 -06:00
Benjamin Cabé d342f9e0c2 doc: releases: introduce release notes and migration guide docs for 4.1
This introduces the release notes and migration guide for 4.1.0 earlier
than we typically do, so that people have a placeholder to start adding
content as they line up pull requests for 4.1.
The two documents are currently orphan and not visible from the main
documentation as this would confuse users of 4.0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-06 14:41:25 -06:00
Benjamin Cabé 99b1c2a912 doc: releases: rework linkage to old release notes/migration guides
Move the link to old release notes and migration guides to the bottom of
the document

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-06 14:41:25 -06:00
Daniel DeGrasse 6023d6a142 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>
2024-11-06 10:19:08 -08:00
Ha Duong Quang 6984237c06 arch: arm: core: cortex_a_r: enable the VFP unit on boot for FPU_SHARING
The FPU is already disabled by the z_arm_svc function when the first
thread starts. Therefore, disabling the FPU at boot is unnecessary for
lazy FPU; instead, it must be enabled to handle floating-point instructions
before the lazy FPU works.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-11-06 10:18:59 -08:00
Mark Holden 8bd4f244b0 coredump: ARM: Ensure sp in dump is set as gdb expects
Gdb is typically able to reconstruct the first two frames of the
failing stack using the "pc" and "lr" registers. After that, (if
the frame pointer is omitted) it appears to need the stack pointer
(sp register) to point to the top of the stack before a fatal
error occurred.

The ARM Cortex-M processors push registers r0-r3, r12, LR,
{possibly FPU registers}, PC, SPSR onto the stack before entering the
exception handler. We adjust the stack pointer back to the point
before these registers were pushed for preservation in the dump.

During k_oops/k_panic, the sp wasn't stored in the core dump at all.
Apply similar logic to store it when failures occur in that path.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-11-06 10:17:59 -08:00
Robin Kastberg 5d52e39a52 random: random_timer.c Remove __GNUC__ ifdef
Remove an old __GNUC__ ifdef

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2024-11-06 10:11:58 -08:00
Emil Gydesen 3a39ca1e7e samples: Bluetooth: BAP: Add missing return in stream_is_streaming
Add missing return before a `false`;.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-06 10:10:06 -08:00
Luca Burelli ba58b066d4 west build: fix a leftover "log" reference in build.py
A recent commit changed all references to the global 'west.log' instance
(now deprecated) to the new WestCommand logging API, but another PR
merged in the same period added an extra instance that is now causing CI
to fail. Convert this last reference to the new API.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:07:13 -08:00
Luca Burelli 6c2bc2ff37 west build: warn about conditional flags in 'extra_configs'
The 'west build' command does not know about conditional flags (in the
format 'type:value:CONFIG_FOO=bar') in the 'extra_configs' argument of
Twister testcase.yaml files, and currently converts them to malformed
arguments that are silently ignored by cmake.

This change adds a check to 'west build' to clearly warn the user if the
'extra_configs' list contains conditional flags and provide a hint on
how to add them to the CMake command line.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:07:13 -08:00
Daniel DeGrasse cbe07bcb92 Revert "drivers: display: elcdif: Modify interrupt enablement"
This reverts commit 206897658a.

We must keep the frame completion interrupt disabled until we send a new
frame to the eLCDIF, as the frame completion interrupt fires at each
vertical blank interval. If we keep it enabled, then the semaphore we
use to indicate the frame has been loaded by the eLCDIF will be posted
to when we do not have a frame queued, and calls to `display_write` will
return before the eLCDIF has actually loaded the new framebuffer.

Fixes #80590

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-06 10:06:47 -08:00
Michal Smola 593f4423ab samples: led: pwm: fix console harness regex
Led blinking period was made configurable and time unit changed
from sec to msec recently in the source code of the sample.
Console harness regex was not changed accordingly in sample.yaml.
Device testing fails when run with twister.
Change the regex to accept any period and change the units to msec.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-11-06 10:06:24 -08:00
Zheng Wu f59e2477ba drivers: serial: fix potential overflow in fifo_fill and fifo_read
Change the type of num_tx/num_rx to avoid overflow.

Fixes #80599

Signed-off-by: Zheng Wu <ken4647@outlook.com>
2024-11-06 10:06:06 -08:00
Luca Burelli de1e76fa4e tests/subsys/llext: fix coverage for readonly_mmu test
The test was not being run on arm64 and riscv because the filter was
incorrect. Properly fix the filter to run the test on all platforms
that have any kind of MMU enabled.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Luca Burelli 7427d1c85b tests/subsys/llext: cleanup memory protection options
Most of the tests in the LLEXT subsystem test suite run with memory
protection hardware (MPU/MMU) disabled, to avoid including memory domain
issues while testing the core functionality. Only a few tests need to
run with MPU/MMU enabled.

This patch simplifies the testcase.yaml by setting the memory protection
as disabled in a shared config file that is included by most tests.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Luca Burelli 184a2a65a2 tests/subsys/llext: update filtering logic
Restore Apollo boards now that the issue has been fixed.
Also remove extra CONFIG_SOC_SERIES_S32ZE filters, as they are already
covered by the 'platform_exclude' common section.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Luca Burelli d33686fef7 tests/subsys/llext: Remove llext.simple.readonly_fs_loader
The fs_loader test is always executed in the main test source when
CONFIG_FILE_SYSTEM is set, and this is in turn enabled by per-board
config overlays. So there is no point in having a separate test case:
it is simply a duplicate of the "readonly" test.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Thao Luong c66dcd52db drivers: Select PINCTRL for renesas RA drivers
Select PINCTRL for drivers: adc, i2c, pwm, serial and spi

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-11-06 09:59:32 -08:00
Thao Luong 56326e4677 soc: renesas: ra: Remove CONFIG_PINCTRL
Remove CONFIG_PINCTRL from ra defconfig files

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-11-06 09:59:32 -08:00