Commit Graph

101449 Commits

Author SHA1 Message Date
Dmitrii Golovanov d9f567051e ci: elasticsearch: Upload script improvements
Multiple improvements of the `upload_test_results_es.py` script:

 * JSON objects flattening.

   This feature allows `twister.json` file preprocessing to simplify
   its Elasticsearch index structure for complex hierarhical objects,
   for example with memory footprint, or code coverage data.

   A new command line option `--flatten` is added to change testsuite data
   structure in regard of one of its list objects: either `testcases` or
   `recording`, so each item there becomes an independent data record
   inheriting all other testsuite properties, whereas the children
   object's properties are renamed with the parent object's name
   as a prefix: 'testcases_' or 'recording_' respectively.
   Only one testsuite property can be flattened this way per index upload.
   Other children objects will be treated accorging to the index structure.

   Related new command line options (with help text explanations):
    `--flatten-dict-name`,
    `--flatten-list-names`,
    `--flatten-separator`,
    `--transpose-separator`,
    `--escape-separator`

 * A new command line option `--transform` is added to allow regexp group
   parsing in string propertites extracting additional derived properties.

 * A new command line option `--exclude` is added to exclude testsuite
   properties not needed to store at Elasticsearch index.

 * Branch name `--run-branch` and Workflow ID `--run-workflow` command
   line options as additional key fields to allow data from different
   branches, workflows and triggering events in the same index.

 * A new command line option `--map-file` is added to apply
   an explicit index structure to the `twister.json` input data.

 * Add bulk operation timeout parameter for heavy/long uploads.

Other changes:
  * batch upload error handling and logging;
  * inline documentation improvements;
  * some corner case fixes on empty objects.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-09-09 15:24:26 +03:00
Emil Gydesen fa0bbad205 tests: Bluetooth: Run Audio BSIM test on nrf5340bsim
Add support for running the audio BSIM tests on the
nrf5340bsim board.

This expands the tests we run in CI.

To support all tests with the hci_ipc sample for the netcore,
it is updated to support a bit more while still fitting on the
netcore on the nRF5340 series.

The behavior of advertisement seems to differ a little bit,
which required the bap_unicast_server_test.c to update how it
restarts advertisements.

Two broadcast tests that are passing on the nRF52 BSIM is also
failing due an assert. This should be investigated at a later
time.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-09 15:23:57 +03:00
Yong Cong Sin 5365421fa1 arch: riscv: use string array instead of switch statement for cause
Get rid of the switch statement and use an string array
for the cause instead. This saves about ~600 bytes.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-09 15:23:43 +03:00
Yong Cong Sin 7844f5aebb arch: riscv: fatal: make `cause_str` reusable
Rename `cause_str` to `z_riscv_mcause_str` and make it non-static,
so that it can be used in user-implemented `k_sys_fatal_error_handler`.

Also, this function should return a constant string, so add `const`
to it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-09 15:23:43 +03:00
Yong Cong Sin 951af0d457 arch: riscv: fatal: always print mcause & mtval
Relocate the logging of mcause & mtval from `_Fault` to
`z_riscv_fatal_error_csf` so that they are always printed
upon exception.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-09 15:23:43 +03:00
Johan Hedberg 68b8cd6d2c Bluetooth: HCI: Add definition for Bluetooth 6.0
Add a definition for HCI version 6.0, now that the new core specification
version has been released.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-09-09 15:23:25 +03:00
Johan Hedberg 131a11e61e Bluetooth: Host: Add decoding for Bluetooth HCI version 6.0
Add decoding for version 6.0, now that the new core specification has been
released.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-09-09 15:23:25 +03:00
Johan Hedberg ceedf72c51 Bluetooth: shell: Use common HCI version decode function
There's a generally available bt_hci_get_ver_str() function, so use that
instead of defining our own.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-09-09 15:23:25 +03:00
Jamie McCrae 9354e181d6 scripts: ci: check_compliance: Add MCUboot Kconfig
Adds a Kconfig used by MCUboot to the allow list

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-09 15:23:16 +03:00
Jamie McCrae 8a71f617bf tests: boot: mcuboot_data_sharing: Fix test
Fixes the test which stopped working after changes were made to
MCUboot

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-09 15:23:16 +03:00
Anas Nashif 8c32a82e47 arch: arc: replace ARC_EARLY_SOC_INIT with PLATFORM_RESET_HOOK
Use generic hook infrastrucutre instead of custom Kconfig and hooks for
ARC.

Replace soc_early_asm_init_percpu() with platform_reset()

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Anas Nashif 81cf87001c arch: arm: select PLATFORM_RESET_HOOK if is PLATFORM_SPECIFIC_INIT set
Temporary until usage of PLATFORM_SPECIFIC_INIT is removed in modules.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Anas Nashif f519dd1411 arch: arm: replace PLATFORM_SPECIFIC_INIT with PLATFORM_RESET_HOOK
Use generic hook infrastrucutre instead of custom Kconfig and hooks for
ARM.

Replace z_arm_platform_init() with platform_reset().

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Anas Nashif e260d03686 init: introduce soc and board hooks
Introduce soc and board hooks to replace arch specific code
and replace usages of SYS_INIT for platform initialization.

include/zephyr/platform/hooks.h introduces the hooks to be implemented
by boards and SoCs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Bjarki Arge Andreasen 736289a691 docs: release notes: Mention GNSS periodic config APIs removed
Mention that the GNSS periodic config APIs have been removed in the
release notes for 4.0

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-09 09:28:45 +02:00
Bjarki Arge Andreasen a28ba1d1a2 drivers: gnss: api: Remove periodic configuration
The GNSS device driver API includes an API for setting the periodic
power configuration at runtime. This API is not used in-tree, and is
antithetical to the pm device subsystem.

The periodic config configures the GNSS to search for a fix for a
given amount of time, then suspend itself for a given amount of time,
and repeat this pattern. The issue with this is that both the
application and the GNSS modem itself can be in a conflicting power
state, where the device is resumed (pm device), but actually suspended.

Applications which wish to periodically resume/suspend the modem, even
in more sophisticated ways like suspended after first fix, can simply
implement this logic, using the pm_device calls and the GNSS callbacks.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-09 09:28:45 +02:00
Lukasz Mrugala 345eb8e94a scripts: twister: Elevate Status Error
Status errors previously logged an error, but didn't fail the running test.
This commit changes that
 and introduces a new StatusAttributeError to use there.

One test is modified so it follows proper status form.
One test for the new error has been added.

Status errors now will properly mark the Instance as ERROR
and not run TestCases as SKIP.
This necessitated some code layout changes in runner.py

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-09-09 09:28:37 +02:00
Marek Pieta 8b50d3768f drivers: usb: udc_dwc2: Notify upper layer on failed TX
Change ensures that `dwc2_handle_xfer_next` would notify upper layer if
`dwc2_tx_fifo_write` fails. This is necessary to ensure that upper layer
is aware of the failed TX for the submitted transfer. It also ensures
that the submitted transfer is removed from the TX queue.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2024-09-09 09:28:29 +02:00
Jukka Rissanen da97542a6e net: dhcpv6: Do not wait forever when allocating net_pkt
As the allocation is run in system workqueue context, it can
cause problems if waiting forever when allocating net_pkt.

Fixes #77935

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-09 09:28:21 +02:00
Jukka Rissanen 254e757539 net: dhcpv4: Do not wait forever when allocating net_pkt
As the allocation is run in system workqueue context, it can
cause problems if waiting forever when allocating net_pkt.

Fixes #77935

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-09 09:28:21 +02:00
Benjamin Cabé 951b4943a9 docs: don't show doc version admonition on main
It is hard to justify keeping the version admonition/disclaimer eating
up so much real estate on all documentation pages. It was useful when
search engines tended to index old versions of the documentation and
reminding people where they "landed" was a good idea.
Now, it is just taking up space and we can safely assume that people
explicitly interested in older releases will find their way to the right
place, as our version selector is in a very similar spot to how other
projects do it.

Note that the admonition will still be included on "released" versions
of the docs, since the "there might be a more current version of this
page" admonition is actually useful to have.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-09 09:28:15 +02:00
Piotr Kosycarz c0b5aeb702 boards: nordic: nrf54l15dk: enable HWFC
For both UARTs connected to debugger chip.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-09-09 09:27:39 +02:00
Henrik Brix Andersen 5b15751d0b doc: releases: migration-guide: 4.0: mention rename of net_buf header
Mention the rename of the network buffer header file.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Henrik Brix Andersen 83e30552ab tests: lib: net_buf: move network buffer tests to tests/lib/net_buf
Move the network buffer tests to tests/lib/net_buf as their implementation
now lives outside of the networking subsystem.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Henrik Brix Andersen f86f5263b0 doc: net_buf: move the network buffer documentation to services
Move the network buffer documentation from networking to services as the
implementation now lives outside of the networking subsystem.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Henrik Brix Andersen 159f7dbbb1 lib: net_buf: rename header file from zephyr/net/buf.h to zephyr/net_buf.h
Move the network buffer header file from zephyr/net/buf.h to
zephyr/net_buf.h as the implementation now lives outside of the networking
subsystem.

Add (deprecated) zephyr/net/buf.h header to maintain compatibility with old
file path.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Henrik Brix Andersen ced80b13bf lib: net_buf: move the network buffer implementation to lib
Move the net_buf implementation from the networking subsystem to a library
as they have no dependency on the networking subsystem.

Network buffers are used in subsystems outside of networking
(e.g. Bluetooth, USB).

Fixes: #36374

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Mahesh Mahadevan cfc010ff4e samples: sensor/mcux_lpcmp: Overlay for the QSPI variant of FRDM-MCXN947
Add overlay for the QSPI variant of FRDM-MCXN947

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan f34c78535f samples: adc_dt: Add overlay for the QSPI variant of FRDM-MCXN947
Add overlay for the QSPI variant of FRDM-MCXN947

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan bc5c075953 samples: dac: Add overlay for FRDM MCXN947 qspi variant
- Add overlay for the FRDM MCXN947 qspi variant
- Fix the overlay file name for the default variant

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan d5ae219799 test: frdm_mcxn947_mcxn947: Add config and overlay for QSPI variant
Add config and overlay files for the QSPI variant of the
NXP FRDM-MCXN947 board

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan 99131b92ff boards: frdm_mcxn947: Enable CACHE64 FlexSPI cache
1. Enable CACHE64 block used by FlexSPI.
2. LPCAC cache is already enabled by SystemInit which
   is called earlier
3. Configure the FlexSPI clock when running in XIP mode
   as we cannot rely on the driver setting this up as it
   may not be enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan b32a86ad8d boards: frdm_mcxn947: Add a variant for executing from QSPI
1. The boards always boots from internal flash. However it does
have an external QSPI that can be used to store Zephyr.
Add a variant to support running Zephyr from QSPI Flash.
Running Zephyr from QSPI requires a bootloader like MCUboot
to be pogrammed to internal flash.
2. Create a common dts file to add features that are enabled for
CPU 0 that is included by both vairants i.e internal flash (default)
and QSPI variant.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan bdfd1d2e1b soc: mcx: Fix build errors when building for XIP from FlexSPI
Include compile of the flash file when FlexSPI_XIP is enabled
even when the FlexSPI driver is not enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan 0543dd6bd7 west.yml: Update to the NXP HAL to get fixes to CACHE64 driver
Get the fixes made to the NXP SDK CACHE64 driver

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Jukka Rissanen 36137bc8cc net: vlan: Fix RX debug print
The interface index and tag prints were swapped.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 18:01:15 -04:00
Jukka Rissanen 25301ace0e net: virtual: Pass status to caller when starting/stopping interface
When virtual interface is being started or stopped so when the
interface is brought up or down, check the return code and pass
it to net_if_up() or net_if_down() calls.
This helps to avoid printing success status even if the interface
up/down failed at the virtual interface level.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 18:01:15 -04:00
Jukka Rissanen 5355920f98 tests: net: bridge: Update the bridging tests
Make sure that tests work after overhaul.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 18:01:15 -04:00
Jukka Rissanen 6986b1ef71 net: bridge: Overhaul the code to use virtual interfaces
The legacy bridging code prevented normal IP traffic to the
bridged Ethernet interfaces. This is not intuitive and differs
how bridging setup works in Linux. This commit changes that and
creates a separate virtual interface that is doing the actual
bridging. This enables the bridged Ethernet interfaces to work
normally and provide IP connectivity.

How this works in practice:

* User needs to enable CONFIG_NET_ETHERNET_BRIDGE
* User needs to have a device with more than one Ethernet
  interface
* After booting, the net-shell or program API can be used
  to add interfaces to the bridge like this.
     net bridge addif 1 3 2
  where the 1 is the bridge interface index and
  2 and 3 are the Ethernet interface indices.
* The bridging is then finally enabled / started when the
  bridge interface 1 is taken up
     net iface up 1
* If bridged interfaces are removed from the bridge (minimum
  of two interfaces are needed there), then the bridging is
  disabled automatically. The bridge interface stays up in
  this case and can be taken down manually.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 18:01:15 -04:00
Anas Nashif 5fdbbf7d7e uart: nrfx: fix config check
we should be checking for config, not data.

Fixes #78114

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-06 17:52:03 -04:00
Alberto Escolar Piedras 1b4c47ab28 Revert "dts: nordic: nrf5340: Change nRF5340 IPC backend to icbmsg"
This reverts commit 518de763a6.

This commit switched nrf5340 devices to use the icbmsg
IPC backend.
Unfortunately this backend is not currently supported
in the nrf5340bsim target (it is not properly configured)
which results in a segfault during its initialization.
As this issue is currently blocking CI for all BT development
in Zephyr, let's revert this provisionally while we add
support for it.

See
https://github.com/zephyrproject-rtos/zephyr/issues/78099
for more info.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-06 17:51:39 -04:00
Yong Cong Sin 31ebb79c86 arch: multilevel_irq: fix interrupt bits check
The bits allocated for each aggregator level only need to be enough to
encode CONFIG_MAX_IRQ_PER_AGGREGATOR, instead of the combined number of
IRQs from all aggregators in that level.

Add additional check for L3 interrupts as well, if it is enabled.

Updated the assert in `z_get_sw_isr_table_idx()` to be more verbose.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-06 14:06:23 -05:00
Yong Cong Sin 4e54cff223 soc: qemu: riscv: update IRQ config
- Update `MAX_IRQ_PER_AGGREGATOR` to 1024 to match with the
  devicetree
- Update `2ND_LEVEL_INTERRUPT_BITS` to 11 bits to
  be able to encode the L2 IRQs.
- Update `NUM_IRQS` to 1036 (L1 has 12, L2 has 1024)

Update the `MAX_IRQ_PER_AGGREGATOR` config in testcase
accordingly, so that it won't overflow the configured bits.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-06 14:06:23 -05:00
Daniel Mangum a80af336c2 drivers: wifi: esp_at: only log errors in active mode with full IPD
Removes constant error logging when parsing IPD headers in active mode and
waiting on remote IP and port. Currently an error message is logged for
every character in the remote IP and port until the full length obtained.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-09-06 12:04:49 -05:00
Shen Xuyang bce1193e45 tests: drivers: Add overlay for test of IST3931 display driver
Add the overlay for the test of IST3931 display driver

Signed-off-by: Shen Xuyang <shenxuyang@shlinyuantech.com>
2024-09-06 12:03:57 -05:00
Shen Xuyang 74f3bf3aa4 driver: display: Add driver for diplay controller ist3931
Add the driver of diplay controller ist3931, i2c/spi
128x64 monocolor display driver. Only the i2c mode
driver of the controller is implemented and tested.

Signed-off-by: Shen Xuyang <shenxuyang@shlinyuantech.com>
2024-09-06 12:03:57 -05:00
Shen Xuyang 3cb1d5eb63 dts: bindings: Add dts binding of ist3931
Add dts binding for istech,ist3931

Signed-off-by: Shen Xuyang <shenxuyang@shlinyuantech.com>
2024-09-06 12:03:57 -05:00
Shen Xuyang 7cef5377c1 dts: bindings: add vendor prefix of istech
Add vendor prefix for Integrated Solutions Technology Inc.

Signed-off-by: Shen Xuyang <shenxuyang@shlinyuantech.com>
2024-09-06 12:03:57 -05:00
Emil Gydesen fc4b21b3e2 sys: atomic: Minor upates to atomic_test* function docs
Minor updates the atomic_test* functions to indicate
that only the get/clear/set part of the functions are
atomic, and not the test part. Also made the wording
and pattern of the functions more similar.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-06 10:46:22 -05:00
Pieter De Gendt 5a3c9c914a scripts: pylib: twister: Write version to testplan.json
The twister environment version is already set, write it to the
testplan.json file.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-06 11:31:57 -04:00