Commit graph

93050 commits

Author SHA1 Message Date
Alberto Escolar Piedras 1d231dda33 tests/bsim/bluetooth/host/gatt: Use common scripts
Use the common functions instead of replicating functionality

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras 42d97fdf99 tests/bsim/bluetooth/ll/conn: Use common scripts
Use the common functions instead of
replicating functionality and do a minor cleanup

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras ab3e4d4bbe tests/bsim/bluetooth/audio: Use common scripts
Use the common functions instead of
replicating functionality and do a minor cleanup

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras a7ea72cee0 tests/bsim bt host/id/settings: Test scripts cleanup
Use the common scripts to perform common functions
and do a cleanup.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras a7d381854e tests/bsim bt host/iso/*: Test scripts cleanup
Use the common scripts to perform common functions
and do a cleanup.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras 8002730b65 tests/bsim bt host/security/*: Test scripts cleanup
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.

Some of the _compile scripts were rotten => Fix them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras 06326dc8c2 tests/bsim bt host/privacy/*: Tests scripts cleanup
Ensure we call the common source script before using
the BOARD variable;
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.

And for the 2 parts of the peripheral rpa sharing
test, use different sim_ids, so the traces for each
part can be checked.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras e9c6f37daf tests/bsim bt host/misc: Tests scripts cleanup
Ensure we call the common source script before using
the BOARD variable;
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.

And return !=0 on error.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras 769910b3e9 tests/bsim bt host/l2cap: Tests scripts cleanup
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras f1aaff5115 tests/bsim bt gatt/settings: Use common scripts
Use the common scripts and do a minor cleanup

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras 48e813ed6e tests/bsim bt gatt/ccc_store: Minor cleanup
Ensure we call the common source script before using
the BOARD variable, and let's not set things
which are already set to the same by default

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras 39c9a995cb tests/bsim bt host/att: Test scripts cleanup
Use the common scripts so we have a consitent way of
running the tests, report failures in the same way,
can stop them with ctrl+C, properly wait for
all processes to exit..
Let's also place the test scripts in the test_scripts/
folder as it is convention.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>

(f) ests/bsim bt att:  Use common s
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras 5acc7c4815 tests/bsim bt host/adv: Tests scripts cleanup
Ensure we call the common source script before using
the BOARD variable;
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.

Also, remove all timeouts which were unnecessarily too short

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras 0053f03d59 tests/bsim/sh_common.source: Add function to guess test name
Some developers want to programmatically get the
test name instead of hardcoding it.
So let's have a common function for this.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras 61be043f26 tests/bsim/sh_common.source: Set a variable with the board target string
As now, with hwmv2, boards can have "/" in their name,
and the board name is not anymore the complete target
name, let's set a new variable with the
whole board target name, but converted into the format
which can be used in paths.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Alberto Escolar Piedras 3041f05d18 tests/bsim/bt l2cap/stress: Be more silent
This test was way too verbose (produced a log over 65000 lines
long).
Let's mute it a bit. If the test fails, developers
can raise the log level as needed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-25 16:17:13 +01:00
Jukka Rissanen af311c61ae net: pkt: Add prototype for net_pkt_get_reserve_data
The prototype for net_pkt_get_reserve_data() was missing in the
header file. Only a debug version of it was set in the net_pkt.h

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-25 16:17:02 +01:00
Aleksandr Khromykh c97a8131c1 Samples: Bluetooth: HCI: add missed callback pointer
USB initialization function mandates pointer to
callback. Seems this pointer was missed in hci_usb sample.
Commit fixes this.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-03-25 15:12:23 +01:00
Fabian Blatz 0a8ef12c3e manifest: update LVGL to v8.4.0
Related to zephyrproject-rtos/lvgl#51

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-03-25 06:52:35 -05:00
Mykola Kvach 5554fd17b6 soc: rcar_gen3: set correct NUM_IRQS for ARM64 R-Car Gen3 boards
Align number of interrupts for ARM64 R-Car Gen3 boards with
the documentation.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-03-25 10:06:20 +00:00
Daniel Leung 6ea749de52 arch: rename arch_start_cpu() to arch_cpu_start()
Rename arch_start_cpu() to arch_cpu_start() so it belongs to
the "cpu" namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-25 09:58:35 +00:00
Daniel Leung 3664ed64c3 arch: move arch_interface.h under zephyr/arch
arch_interface.h is for architecture and should not be
under sys/. So move it under include/zephyr/arch/.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-25 09:58:35 +00:00
Dawid Niedzwiecki f36570a357 ztest: define _POSIX_C_SOURCE macro
Add declaration of the _POSIX_C_SOURCE < 200809L for ztest library for
declaration of strtok_r and strdup functions.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-03-25 09:56:37 +00:00
Mahesh Mahadevan 4045975c80 drivers: timer: NXP OS Timer updated for low power modes
Add ability to set a wakeup counter in case OS Timer is
disabled in certain low power modes. Also add code to
compensate the tick value.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-25 09:35:51 +01:00
Mayank Mahajan 0e94934c4b Add: Support for pyocd runner for mr_canhubk3 board
Modifying board.cmake file of mr_canhubk3 for pyocd support.

Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com>
2024-03-25 09:35:12 +01:00
David Brown 9fd211a3f8 boards: arm: sparkfun_pro_micro_rp2040: Add RGB LED
The SparkFun Pro Micro RP2040 board has an WS2812-style RGB LED connected
to a GPIO pin.  Add this to the devicetree so that this device can be used.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-03-25 09:34:33 +01:00
Charles Dias a0d75923aa boards: shields: Add Seeed Studio XIAO Expansion Board
Add Seeed Studio XIAO Expansion Board:
- User button
- SSD1306 128x64 pixels
- MicroSD
- PFC8563 RTC

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-03-25 09:34:14 +01:00
Marcin Szkudlinski 3fde2c50c6 tracing: add intel ADSP memory window backend
This commits adds a tracing backend based on
Intel ADSP debug memory window

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2024-03-25 09:33:41 +01:00
Reto Schneider 9dd87a7194 net: buf: Support copying of user data
This functionality is useful on the following scenario:

1) The first buffer in a net_pkt contains user data which is relevant
   for the (whole) net_pkt.
2) When inserting a new buffer in front of the net_pkt, the (previously)
   first buffer (and its user data) are no longer accessible via
   net_pkt->buffer.
3) net_buf_user_data_copy() allows to simply copy the user data from the
   old to the new first  buffer.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-03-25 09:32:48 +01:00
Kevin ORourke 9bf0a24f2e drivers: clock_control: stm32: clock_control_on
Make clock_control_on for STM32 behave the same as the HAL,
delaying after enabling peripheral clocks. Otherwise it may return
before the clock is actually enabled, causing subsequent writes to
peripheral registers to be silently ignored.

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2024-03-25 09:31:54 +01:00
Peter Johanson a02da6f2dd input: Add absolute input code for multitouch slot
To support multitouch, input devices can report an absolute value
to identify the specific slot to which the subsequent data is linked.
Add a new code for `INPUT_ABS_MT_SLOT` for this purpose.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2024-03-25 09:29:30 +01:00
Pisit Sawangvonganan 5aa4ae6ed5 drivers: can: stm32: fdcan: refactor register bits remap
Optimize bit remapping in STM32 FDCAN driver by grouping consecutive bits.

Additionally, leverage shared bit mapping between MCAN_IR and MCAN_IE to
consolidate switch cases.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-03-24 20:56:10 +01:00
Chen Xingyu 7273f212e3 drivers: gpio: dw: Address warning of unused gpio_dw_isr
This commit conditionally masks out `gpio_dw_isr` to prevent a build
warning if none of the instances of this driver are connected to an IRQ.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-03-24 12:49:23 +01:00
Chen Xingyu b72e78f7ca tests: drivers: build_all: gpio: Build gpio_dw
This commit adds gpio_dw to the build_all CI test to ensure the driver is
always buildable.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-03-24 12:49:23 +01:00
Chen Xingyu a622407bd3 drivers: gpio: dw: Switch to DT_INST_IRQN_BY_IDX
Switch to using `DT_*IRQN` helpers for obtaining the IRQ number instead of
directly accessing the `irq` cell. This change ensures that the encoded
values for multi-level interrupts are correctly retrieved.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-03-24 12:49:23 +01:00
Jonathon Penix 3723493f60 tests: coredump: Disable optimizations to prevent unexpected failures
debug.coredump.logging_backend is currently failing for most of the targets
I have tried when building with clang. Depending on the target, func_3
invokes undefined behavior by dereferencing addr (which is NULL) which
can lead to the compiler optimizing out significant portions of the code,
resulting in unexpected/incorrect failures.

Here, clang seems to inline func_3 into main then marks the inlined
implementation as unreachable (due to the UB) and removes it and everything
after it in main. So, we fall through to whatever code lies past main,
resulting in a test failure (timeout) from what I've seen. GCC seems to do
similar things, but creates an invalid opcode instruction so the test still
succeeds.

clang is correct in both optimizing this behavior out and leaving
buggy code behind, so disable optimizations for func_3 to keep things under
control and prevent the incorrect failures.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-03-23 19:04:06 -04:00
Jonathon Penix a28d5df5c6 tests: coredump: Change additional boards to directly call k_panic()
The riscv_virtual, hifive_unleashed, and hifive_unmatched boards all
timeout on this test if they actually perform the null dereference when
they are simulated. Whether the null dereference happens seems to depend
on the compiler used as well as whether optimizations are enabled though.

To make this more consistent, handle these boards in the same way as others
which use Renode simulation and have them directly call k_panic().

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-03-23 19:04:06 -04:00
Reto Schneider 6c300c9c66 tests: net: buf: Improve testing coverage
Before this commit, cloning a buffer was tested only for a buffer
belonging to a reference counted pool.

By using a buffer from a pool that does not support reference counting,
the added test ensures that the non-ref-counting code path also works.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-03-22 21:01:26 -05:00
Jukka Rissanen 09abd850d9 net: shell: Do not print DHCPv4 info if IPv4 is not available
If the network interface does not enable IPv4, then it is pointless
to print DHCPv4 information when invoking "iface" shell command.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-22 21:00:37 -05:00
Flavio Ceolin 6b9d01f995 intel_adsp/ace: power: No pending transaction before power gate
Issue an upstream read transaction through uncached memory to flush
out all pending transactions before power down the host domain.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-03-22 21:29:33 -04:00
Reto Schneider 397b8465dc tests: kernel: interrupt: lto: Exclude builds with warning
Trying to enable LTO when CODE_DATA_RELOCATION is already enabled
produces a warning.

This commit prevents twister from building such combinations for
arch.shared_interrupt.lto.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-03-22 17:42:35 -04:00
Reto Schneider f4430827d8 tests: kernel: common: lto: Exclude builds with warning
Trying to enable LTO when CODE_DATA_RELOCATION is already enabled
produces a warning.

This commit prevents twister from building such combinations for
kernel.common.lto.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-03-22 17:42:35 -04:00
Reto Schneider 75a3805c8b kconfig: lto: Disable when data relocation is enabled
As per issue #69730, building arch.shared_interrupt.lto and
kernel.common.lto for mimxrt685_evk or mimxrt595_evk/mimxrt595s/cm33 is
currently broken due to their usage of CONFIG_CODE_DATA_RELOCATION.

This commit disables LTO when CODE_DATA_RELOCATION is enabled, allowing
PRs with changes in the kernel code to pass the CI check.

On the down side, builds affected by this change produce a new warning:

> warning: LTO (defined at Kconfig.zephyr:430) was assigned the value
> 'y' but got the value 'n'. Check these unsatisfied dependencies:
> (!CODE_DATA_RELOCATION) (=n)

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-03-22 17:42:35 -04:00
Daniel Leung d89e7f63fd xtensa: exiting simulator on fatal errors
There was old code to exit the simulator when there is a fatal
error. This updates the #ifdef and the function name so that
it can be used to exit both QEMU and simulator when a fatal
error occurs. This should help with twister runs as this will
fail immediately instead of having wait for timeout.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-22 16:17:41 -05:00
Daniel Leung 33f586f312 xtensa: mmu: no need to ignore array bound for SoC MMU ranges
The #pragma to ignore array bounds for xtensa_soc_mmu_ranges[]
was a remnant before code refactoring during review. Since
this array is no longer declared __weak and as a zero length
array, the #pragma to ignore array bounds is no longer needed.
So remove them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-22 16:17:22 -05:00
Daniel Leung 796d9162d1 x86: x86_64: fix tls setup in early boot
During early boot in assembly, the function parameter to
z_x86_early_tls_update_gdt() should be the pointer to
the interrupt stack. However, what was passed instead
was the pointer to the x86_cpuboot struct. So fix it to
actually pass the stack pointer (which is stashed inside
the x86_cpuboot struct).

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-22 16:15:12 -05:00
Declan Snyder 739573ee8e boards: rd_rw612_bga: Enable HWINFO
Enable some reset causes in PMU node and indicate
in the yaml support for hwinfo.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-22 15:58:03 -05:00
Declan Snyder 711375695e soc: nxp: rw: Support Reset cause setting
Support reset causes on RW SOC

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-22 15:58:03 -05:00
Declan Snyder 9607543496 drivers: hwinfo: Add RW hwinfo driver
Add RW hwinfo driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-22 15:58:03 -05:00
Declan Snyder c6b07ef8db dts: bindings: Add RW PMU binding
Add RW PMU binding.

PMU is what records and enables the reset causes.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-22 15:58:03 -05:00