as NXP rtxxx series i2s driver using a ping-pong
buffer, which is not supported by this test, and
use the i2s_speed only to test on those platform
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Until now iterable sections APIs have been part of the toolchain
(common) headers. They are not strictly related to a toolchain, they
just rely on linker providing support for sections. Most files relied on
indirect includes to access the API, now, it is included as needed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
board:
- update device tree to use flexcomm devices to the chip design
- enable clocks (soc init file)
- setup connections for loopback test in system controller (board init
file)
tests:
- update board files (overlay, conf)
Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- replace device_get_binding() calls that were searching for no longer
existing I2S device labels with proper DEVICE_DT_GET_OR_NULL() calls
- move initialization of I2S devices that was previously performed
in the test cases that were executed as first (what is no longer
valid after moving to the new ztest API) to functions that are called
before running each test in a given test suite
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add DT aliases that specify I2S devices to be used in the test.
Add new overlays as in fdad738cff
and modify existing ones accordingly.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
... so that it is not needed to provide a .conf file for every board
based on an nRF SoC that features I2S.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Follow-up to commit 7f1f2385d2.
For consistency with the i2s_api test, use the default logging
settings.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
For nRF boards and lines that need to be connected with an external
loopback (SDOUT and SDIN), use the same pins as in other tests that
use the gpio_loopback fixture (like uart_async_api or regulator/fixed)
so that a common wiring can be used for all those cases.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This is a follow-up to commit 25d7a09aa5.
The arduino_serial/uart1 node should not be enabled by default because
even if an application does not use it, the default CONFIG_SERIAL=y
setting causes that it is anyway initialized, so the UARTE peripheral
acquires its assigned pins (and they cannot be used in other way) and
its enabled receiver causes increased current consumption (by ~500 uA)
when the CPU is sleeping. This affects e.g. the boards/nrf/system_off
sample.
Applications that actually need to use this UART or shields that use
the arduino_serial node should enable the node explicitly.
Keep this node disabled by default for the nrf52840dk_nrf52840 board
and also for boards whose definitions are mostly copies of the above:
nrf52833dk_nrf52833 and nrf21540dk_nrf52840.
Update also accordingly a few overlay files in tests/ that were
disabling this node because of the pins it undesirably acquired.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Since main was only registering the Test Suite, it made since
to combine the actual tests into one file instead of having
an empty file to initialize the test.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
The test was executing the expected functions
out of order. I have created a config functions
and explicitly declared them to be setup functions
for this ZTest framework.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
The I2S Speed test attempted to find a device
via the Label Property of the node. I have updated
the code to search for the nodelabel instead.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Adding overlay files that give an alias name to the
i2s node that is equivalent to the alias in the
i2s speed test.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.
The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.
NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Now that I2S drivers are enabled based on devicetree we can
remove any cases of them getting enabled by *.conf files.
Signed-off-by: Kumar Gala <galak@kernel.org>
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Readme instructions for connecting SAI4 as TX to SAI1 as RX on this
board. Also includes overlay and Kconfig settings to run this test
on the board.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
If platform supports non-cacheable region, place mem_slab's for I2S
driver buffers there. This enables drivers using DMA without cache
coherency issues.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
Move to CMake 3.20.0.
At the Toolchain WG it was decided to move to CMake 3.20.0.
The main reason for increasing CMake version is better toolchain
support.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This is a follow-up to commit 954dfa755b.
Apply adjustments made in the i2s_api test to the i2s_speed one so that
it can also be executed successfully on the nRF DK boards.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Provide configurations for the nRF52840 DK and nRF5340 DK boards.
Adjust the test to cover specifics of I2S peripherals on nRF SoCs
(need of starting RX and TX simultaneously, lack of internal loopback).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The NXP I2S driver queues 2 receive buffers to avoid receive overflows.
Allocate an extra block so we do not see test failures due to allocate
failures
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Use ZTEST_DMEM macro to place the buffers containing sample values
in the ztest memory partition that can be accessed from userspace.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
1. Update the way test_i2s_state_error_neg test handles
RX overflow.
2. Clean up after test_i2s_state_stopping_neg test in case the
receiving channel is stuck in the STOPPING State if the data
was received prior to calling the STOP trigger.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1. Allow loopback over different I2S ports
2. Add a config option to indicate if the ports
are separate
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1. Provide an option to loopback over separate I2S ports
2. Increase the buffer count in the loopback test to 4
3. Update test_i2s_transfer_rx_overrun test on how to
handle RX overrun failures
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.
A coccinelle rule is used for this:
@r_const_dev_1
disable optional_qualifier
@
@@
-struct device *
+const struct device *
@r_const_dev_2
disable optional_qualifier
@
@@
-struct device * const
+const struct device *
Fixes#27399
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
An old doxygen biolerplate was being copied all over the tests. The
defined groups are not being used anywhere and it does not follow how we
document tests for example in the kernel and other places.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
... because it is (required).
This makes a difference when building with CMake and forgetting
ZEPHYR_BASE or not registering Zephyr in the CMake package registry.
In this particular case, REQUIRED turns this harmless looking log
statement:
-- Could NOT find Zephyr (missing: Zephyr_DIR)
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- ...
-- ...
-- ...
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:8 (target_sources):
Cannot specify sources for target "app" which is not built by
this project.
... into this louder, clearer, faster and (last but not least) final
error:
CMake Error at CMakeLists.txt:5 (find_package):
Could not find a package configuration file provided by "Zephyr" with
any of the following names:
ZephyrConfig.cmake
zephyr-config.cmake
Add the installation prefix of "Zephyr" to CMAKE_PREFIX_PATH or set
"Zephyr_DIR" to a directory containing one of the above files. If
"Zephyr" provides a separate development package or SDK, be sure it
has been installed.
-- Configuring incomplete, errors occurred!
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fix compilation of the I2S API tests with the new timeout API.
Remove the defines for sleep periods and embed them directly into the
code to improve consistency.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Using find_package to locate Zephyr.
Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.
Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.
It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The seasonal overhaul of test identifiers aligning the terms being used
and creating a structure. This is hopefully the last time we do this,
plan is to document the identifiers and enforce syntax.
The end-goal is to be able to generate a testsuite description from the
existing tests and sync it frequently with the testsuite in Testrail.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Previous defconfig for dma is DMA_STM32F4X in this board, while the new
generic driver uses DMA_STM32 to enable DMA support, and also dma driver
of stm32 now needs HEAP_MEM_POOL_SIZE to be big enough to hold dma
stream instances.
Additional .conf files are added for also adding HEAP_MEM_POOL_SIZE
configuration to two test cases.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
move i2s.h to drivers/i2s.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier. Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.
By default all files without license information are under the default
license of Zephyr, which is Apache version 2.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Unlike CONFIG_HW_STACK_PROTECTION, which greatly helps
expose stack overflows in test code, activating
userspace without putting threads in user mode is of
very limited value.
Now CONFIG_TEST_USERSPACE is off by default. Any test
which puts threads in user mode will need to set
CONFIG_TEST_USERSPACE.
This should greatly increase sanitycheck build times
as there is non-trivial build time overhead to
enabling this feature. This also allows some tests
which failed the build on RAM-constrained platforms
to compile properly.
tests/drivers/build_all is a special case; it doesn't
put threads in user mode, but we want to ensure all
the syscall handlers compile properly.
Fixes: #15103 (and probably others)
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This lets us quickly filter tests that exercise userspace
when developing it.
Some tests had a whitelist with qemu_cortex_m3; change
this to mps2_an385, which is the QEMU target with an
MPU enabled.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>