Use the common functions instead of
replicating functionality and do a minor cleanup
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common functions instead of
replicating functionality and do a minor cleanup
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>