Commit graph

192 commits

Author SHA1 Message Date
Francois Ramu d91bdc0f51 tests: drivers: dma test running on the nucleo_wl55 board
enable the dma and dmamux to the nucleo_wl55jc
so that dma testcases can run on that target

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-04 09:11:38 -06:00
Tom Burdick 0e96f59e83 dma: Add suspend resume implementation for edma
Implement the suspend and resume transfer api calls for NXP's eDMA.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-01-12 17:33:48 -05:00
Daniel DeGrasse ba462bbb74 boards: mimxrt1070_evk_cm7: Enable DMA controller on RT1170 EVK
DMA controller is enabled and tested for cortex M7 core. The M7 core was
tested on the loop and channel link transfer tests.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-12-08 08:40:06 -05:00
Daniel DeGrasse 4d4939c4e1 boards: mimxrt1060_evk_cm7: Enable DMA controller on RT1160 EVK
DMA controller is enabled and tested for cortex M7 core. The M7 core was
tested on the loop and channel link transfer tests.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-12-08 08:40:06 -05:00
Maureen Helm 4aec077d17 tests: drivers: Extend dma channel link test to mimxrt1064_evk board
Adds mimxrt1064_evk to the list of allowed platforms for the dma channel
link test.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-08-24 22:15:19 -04:00
Torsten Rasmussen 1cccc8a8fe cmake: increase minimal required version to 3.20.0
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>
2021-08-20 09:47:34 +02:00
Francois Ramu c47d573175 tests: drivers: dma testing on the stm32f103 nucleo board
This adds the configuration to pass the testcases
dma/loop_transfer and the dma/chan_blen_transfer
on the nucleo_f103rb board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-29 11:48:23 -04:00
Francois Ramu fba2d6de39 tests: drivers: dma testing on the stm32f207 nucleo board
This adds the configuration to pass tes testcases
dma/loop_transfer and the dma/chan_blen_transfer
on the nucleo_f207zg board.
The DMA2 instance supports mem2mem transfers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-29 11:48:23 -04:00
Francois Ramu a5cca19386 tests: drivers: dma testing on the stm32f429 nucleo board
This adds the configuration and set the DTS to pass
the dma/loop_transfer and the dma/chan_blen_transfer
on the nucleo_f429zi board.
The DMA2 instance supports mem2mem transfers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-29 11:48:23 -04:00
Francois Ramu 9ecf810832 tests: drivers: dma testing on the stm32l152 nucleo board
This adds the configuration to pass testcases
dma/loop_transfer and the dma/chan_blen_transfer
on the nucleo_l152re board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-29 11:48:23 -04:00
Francois Ramu 772c9c5cee tests: drivers: dma testing on the stm32f091 nucleo board
This adds the configuration to pass testscases
dma/loop_transfer and the dma/chan_blen_transfer
on the nucleo_f091rc board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-29 11:48:23 -04:00
Krishna Mohan Dani 71026462d8 tests/drivers: dma: sets DMA config in chan_blen_transfer on stm32f3_disco
This commit sets the below configuration when
tests/drivers/dma/chan_blen_transfer is executed on stm32f3_disco
platform.

CONFIG_DMA_TRANSFER_DRV_NAME="DMA_1"
CONFIG_DMA_TRANSFER_CHANNEL_NR_0=4
CONFIG_DMA_TRANSFER_CHANNEL_NR_1=2

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-29 11:01:40 -04:00
Krishna Mohan Dani a63bee82fd tests/drivers: dma: sets DMA config in loop_transfer on stm32f3_disco
This commit sets the below configuration when
tests/drivers/dma/loop_transfer is executed on stm32f3_disco
platform.

CONFIG_DMA_LOOP_TRANSFER_DRV_NAME="DMA_1"
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=4

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-29 11:01:40 -04:00
Krishna Mohan Dani cf39aec86a tests/drivers: nucleo_l552ze_q: Configures DMA to run loop_transfer test
This commit configures DMA to run tests/drivers/dma/loop_transfer
test on nucleo_l552ze_q platform.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-10 12:43:19 -04:00
Krishna Mohan Dani 299d432860 tests/drivers: nucleo_l552ze_q: Configures DMA for chan_blen_transfer test
This commit configures the DMA to run
tests/drivers/dma/chan_blen_transfer test on nucleo_l552ze_q platform.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-10 12:43:19 -04:00
Krishna Mohan Dani 2194b79804 tests/drivers: stm32l562e_dk: Configures DMA to run loop_transfer test.
This commit configures the required DMA parameters to run
tests/drivers/dma/loop_transfer test on stm32l562e_dk platform.
This has been tested and is working as expected.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-10 12:43:19 -04:00
Krishna Mohan Dani b59aad567c tests/drivers: stm32l562e_dk: Configures DMA for chan_blen_transfer test
This commit configures the required DMA parameters to run
tests/drivers/dma/chan_blen_transfer test on stm32l562e_dk platform.
This has been tested and is working as expected.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-10 12:43:19 -04:00
Hake Huang f6c338d600 test: dma: assign correct LPC dma engine channel for test
LPC dma channel 32/31 is for memory to memory.

Fixing: #34909

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-25 09:57:21 -05:00
Simon Guinot 54d3f136ec tests: drivers: dma: enable tests on nucleo_f070rb
This patch enables the DMA chan_blen_transfer and loop_transfer tests on
the nucleo_f070rb board.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2021-05-20 13:24:18 -05:00
Thomas Stranger a3967cefa4 tests: dma: add nucleog474re board
Add nucleo_g474re board to dma/chan_blen_transfer and dma/loop_transfer
tests.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-05-06 09:28:33 -05:00
Francois Ramu cb1ac9e925 tests: drivers: dma set correct type for the chan_id
The chan_id value returned by dma_request_channel
can be negative, changing the type of chan_id to int.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-05-04 10:12:11 -05:00
Thomas Stranger 2cf23469e5 tests: driver: dma: enable tests on stm32g0 boards
Enables dma test cases loop_transfer and chan_blen_transfer
on stm32g03116_disco, nucleo_g071rb and nucleo_g0b1re.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-04-26 14:16:03 -04:00
Hake Huang b609242903 dma: add request channel and release channel helper
add two dma api for dynamic channel reqest and release

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-04-23 14:58:40 +02:00
Shlomi Vaknin 703d396956 tests: dma: add stm32h7 to loop_transfer
Add nucleo h743zi board to loop_transfer test.

Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com>
2021-04-14 18:18:12 +02:00
Shlomi Vaknin cb1b231766 tests: dma: add stm32h7 to chan_blen_transfer
Add nucleo h743zi board to chan_blen_transfer test.

Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com>
2021-04-14 18:18:12 +02:00
Maureen Helm 5649ea6ccd tests: drivers: Fix dma channel link test
The Kconfig symbol CONFIG_DMA_0_NAME was recently removed. Update the
dma channel link transfer test to get the device name from an
application level Kconfig instead, similar to other dma driver tests.

This fixes a CI compliance failure that checks for references to
undefined Kconfig symbols.

Tested on the mimxrt1050_evk board.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-04-08 14:52:07 -04:00
Hake Huang 930893fc56 tests: add mcux edma channel link test
test minor/major link mode on frdm_k64f and mimxrt1060_evk

log as below:

Running test suite dma_m2m_link_test
===================================================================
START - test_dma_m2m_chan0_1_major_link
Preparing DMA Controller: Chan_ID=1, BURST_LEN=1
Starting the transfer
DMA transfer done ch 0
It is harder to be kind than to be wise........
It is harder to
 PASS - test_dma_m2m_chan0_1_major_link
===================================================================
START - test_dma_m2m_chan0_1_minor_link
Preparing DMA Controller: Chan_ID=1, BURST_LEN=1
Starting the transfer
DMA transfer done ch 0
It is harder to be kind than to be wise........
It is harder to be kind than to
 PASS - test_dma_m2m_chan0_1_minor_link
===================================================================
START - test_dma_m2m_chan0_1_minor_major_link
Preparing DMA Controller: Chan_ID=1, BURST_LEN=1
Starting the transfer
DMA transfer done ch 0
DMA transfer done ch 1
It is harder to be kind than to be wise........
It is harder to be kind than to be wise........
 PASS - test_dma_m2m_chan0_1_minor_major_link
===================================================================
Test suite dma_m2m_link_test succeeded
===================================================================
PROJECT EXECUTION SUCCESSFUL

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-04-08 16:38:49 +02:00
Henrik Brix Andersen 711347686e tests: drivers: dma: add twr_ke18f board configurations
Add NXP TWR-KE18F development board test configurations for the DMA
driver test suites.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-03-31 09:22:10 -05:00
Francois Ramu 7664171518 tests: drivers: dma: remove dead code in test_dma_loop.c
Fix the error of the [Coverity CID :219489] "Structurally
dead code in tests/drivers/dma/loop_transfer/src/test_dma_loop.c"

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-03-10 05:41:20 -05:00
Erwan Gouriou b389d1940e tests/drivers/dma: Enable tests on nucleo_f746zg and disco_l475_iot1
This will enable dma device testing on these platforms in ST CI.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-02-04 12:35:04 -05:00
Erwan Gouriou d74dae2eaf tests/drivers/dma: loop_transfer: Use ztest harness
loop_transfer test was not using ztest framework as test harness.
Fix it.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-02-04 07:41:55 -05:00
Hake Huang f02454f68a tests: update edma test pattern
align test pattern with testcase.yml

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-01-14 16:14:51 -06:00
Francois Ramu 64da50f45b tests: drivers: dma: adapt test applications on stm32l476 nucleo board
The dma test applications for MEM-to-MEM transfers are modified
to run on the stm32l476 with a DMA.
The CONFIG_DMA_LOOP_TRANSFER_DRV_NAME is either DMA_1 or DMA_2
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR from 1 to 7 for DMA_1
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR from 1 to 5 for DMA_2

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-12-27 18:16:47 +01:00
Francois Ramu 0a3437d4ca tests: drivers: dma: adapt test applications on stm32wb55 nucleo board
The dma test applications for MEM-to-MEM transfers are modified
to run on the stm32wb55 with a DMAMUX
loop_transfer on any CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR from 0 to 13
chan_blen_trasnfer on CONFIG_DMA_TRANSFER_CHANNEL_NR_0 from 0 to 13
and on CONFIG_DMA_TRANSFER_CHANNEL_NR_1 from 0 to 13

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-12-27 18:16:47 +01:00
Francois Ramu 445c8936e7 tests: drivers: dma adapt the dma tests applications for stm32 devices
It adds flexibility to test different dma channels
The chan_blen_transfer is modified
like the loop_transfer application to support stm32xx devices
with dma and/or dmamux.
On the stm32 devices, the first dma channel is 1.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-12-27 18:16:47 +01:00
Erwin Rol f3ca040e41 tests: dma: loop_transfer: add board configurations
Add configurations for Nucleo F207ZG, F767ZI, L053R8, and L496ZG.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2020-09-03 21:50:58 +02:00
Erwin Rol fc71836769 tests: dma: loop_transfer: allow configuration of device and channel
Add Kconfig with the following options:

- DMA_LOOP_TRANSFER_DRV_NAME to set the DMA device name, because
  some SOCs do not allow memory to memory DMA on all DMA devices
- DMA_LOOP_TRANSFER_CHANNEL_NR some SOCs start counting the DMA
  channels at 1 instead of 0.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2020-09-03 21:50:58 +02:00
Tomasz Bursztyka e18fcbba5a device: Const-ify all device driver instance pointers
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>
2020-09-02 13:48:13 +02:00
Tomasz Bursztyka d99c59ead1 tests: Align all drivers using user_data for callback
s/callback_arg/user_data

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-07-30 09:48:00 +02:00
Tomasz Bursztyka fe71673167 tests: Apply DMA callback change to relevant tests
Now the dma device instance is passed as parameter to the callback.

Fixes #26923

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-07-30 09:48:00 +02:00
Anas Nashif 0798b85d1c tests: remove obsolete doxygen boilerplate
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>
2020-07-28 08:14:23 -05:00
Hake Huang 30ce64d543 test: dma: avoid useing flash as dma source address
avoid to use the flash address as dma source,
to avoid flash cache issue
this is fix to issue #26812

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-07-20 18:01:04 -05:00
Hake Huang abce94bb98 dma: add EDMA test support for MCUX
for RT series CONFIG_NOCACHE_MEMORY need enabled
for Kinetis series CONFIG_DMA_TEST_SLOT_START for test
modify the target and dest alignment

frdmk64f need replace strlen to sizeof in irq callback
clean the unused receive buffer, so output is tidy

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-06-12 13:03:28 -05:00
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Marc Herbert debade9121 tests: make find_package(Zephyr...) REQUIRED
... 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>
2020-05-29 10:47:25 +02:00
Song Qiang b74cad5a5d test: dma: Fix k_sleep() parameter error
Sleeping milliseconds should use k_sleep(K_MSEC(x)) rather than
k_sleep(x).

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
2020-04-08 08:43:23 -04:00
Torsten Rasmussen 407b49b35c cmake: use find_package to locate Zephyr
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>
2020-03-27 16:23:46 +01:00
Anas Nashif 70758c4374 tests: fix test identifiers
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>
2019-12-09 15:53:44 -05:00
Peter Bigot 6e5db350b2 coccinelle: standardize k_sleep calls with integer timeouts
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>
2019-10-09 08:38:10 -04:00
Anas Nashif 5cde4ea245 drivers: dma: remove qmsi DMA driver
No users of this driver after dropping quark platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-18 11:06:18 -05:00
Anas Nashif 9ab2a56751 cleanup: include/: move misc/printk.h to sys/printk.h
move misc/printk.h to sys/printk.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>
2019-06-27 22:55:49 -04:00
Anas Nashif 46a5d1e5cb cleanup: include/: move dma.h to drivers/dma.h
move dma.h to drivers/dma.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>
2019-06-27 22:55:49 -04:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
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>
2019-04-07 08:45:22 -04:00
Anas Nashif 15cdeb9352 tests: fix various test identifiers
Fix various test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-29 17:44:11 -04:00
Patrik Flykt 24d71431e9 all: Add 'U' suffix when using unsigned variables
Add a 'U' suffix to values when computing and comparing against
unsigned variables.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Anas Nashif 5060ca6a30 cmake: increase minimal required version to 3.13.1
Move to latest cmake version with many bug fixes and enhancements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-03 11:51:29 -05:00
Patrik Flykt 440b535602 tests: Add 'U' to unsigned variable assignments
Add 'U' to a value when assigning it to an unsigned variable.
MISRA-C rule 7.2

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2018-12-04 22:51:56 -05:00
Jakub Rzeszutko b7a5874830 tests: shell: migrate tests to the new shell
Testing:
1. Shell built-in commands.
2. Wildcards module.
3. Static commands creation and execution.
4. Dynamic commands creation and execution.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-11-22 11:32:29 +01:00
Reto Schneider 7eabab2f5d samples, tests: Use semi-accurate project names
When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming every project "NONE"
defeats this functionality.

This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names in the samples (and again, in
the tests folder) folder, small manual adjustments have been done.

Signed-off-by: Reto Schneider <code@reto-schneider.ch>
2018-10-27 21:31:25 -04:00
Jun Li 2acbaf499e tests: dma: use generic callback arg for all dma_callbacks
Replace the first argument in dma_callback with
generic 'void * arg'.

Signed-off-by: Jun Li <jun.r.li@intel.com>
2018-10-16 16:58:19 -04:00
Anas Nashif 07ff2d580b drivers: dma: move to new logger
Move to new logger and adapt samples.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Flavio Ceolin da49f2e440 coccicnelle: Ignore return of memset
The return of memset is never checked. This patch explicitly ignore
the return to avoid MISRA-C violations.

The only directory excluded directory was ext/* since it contains
only imported code.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-14 16:55:37 -04:00
Sebastian Bøe 55ee53ce91 cmake: Prepend 'cmake_minimum_required()' into 'app' build scripts
Prepend the text 'cmake_minimum_required(VERSION 3.8.2)' into the
application and test build scripts.

Modern versions of CMake will spam users with a deprecation warning
when the toplevel CMakeLists.txt does not specify a CMake
version. This is documented in bug #8355.

To resolve this we include a cmake_minimum_required() line into the
toplevel build scripts. Additionally, cmake_minimum_required is
invoked from within boilerplate.cmake. The highest version will be
enforced.

This patch allows us to afterwards change CMake policy CMP000 from OLD
to NEW which in turn finally rids us of the verbose warning.

The extra boilerplate is considered more acceptable than the verbosity
of the CMP0000 policy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-08-15 04:06:50 -07:00
Anas Nashif 49bb83138c tests: classify periphera tests
Fix testcase naming and follow <component>.<subcomponent> where it makes
sense.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
Anas Nashif f3e8cb7e61 tests: add missing harness support
Add missing harness requirement for driver tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
Anas Nashif 829598be2b tests: add CONFIG_TEST for marking tests
Mark tests with CONFIG_TEST to allow for test specific setup and
configuration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-08 10:03:57 -05:00
Anas Nashif de4835902e tests: dma: use depends_on to whitelist platforms
Only build for those platforms that support DMA.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 23f81eeb42 tests/samples: fixed yaml syntax
Use a map directory, avoid the list which makes parsing a bit
cumbersome.

Fixes #5109

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-11 14:47:08 -05:00
Sebastian Bøe 0829ddfe9a kbuild: Removed KBuild
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Anas Nashif 0356590df5 tests: samples: fix yaml syntax
Fix indentation and syntax and make it pass yamllint tool.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-15 08:15:00 -04:00
Anas Nashif 2de59023dc tests: update min ram requirements and filters
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-14 13:28:42 -04:00
Johann Fischer afedfa95ee tests: dma: cleanup and add loglevel configuration
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-08-09 16:04:46 -05:00
Anas Nashif 3c50f7aa12 tests: samples: remove duplicate filtering
We have many testcases doing filtering both on the architecture level
and the platform level, which is redundant. Also many testcases are
running the same test twice on the same SoC for no good reason, cleanup
the tests and cleanup the filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-27 17:44:23 -04:00
Johann Fischer 6dbe738d0e tests: dma: fix chan_blen_transfer
Use sizeof instead of strlen to get the correct buffer
length and initialize rx buffer with zeros before the dma
transfer.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-06-23 15:56:08 -04:00
Anas Nashif 470c5f3189 tests: remove testcase.ini files
We now use yaml files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Anas Nashif cc24f4b03c tests: samples: convert testcase files to yaml
This will prepare test cases and samples with metadata and information
that will be consumed by the sanitycheck script which will be changed to
parse YAML files instead of ini.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
David B. Kinder ddbf1255a9 test: fix misspellings
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-17 22:34:45 -04:00
Anas Nashif ea1addbb3c tests: rename test directory test_loop_transfer -> loop_transfer
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-17 10:34:24 -04:00
Anas Nashif fcb1d175e6 tests: rename test directory test_chan_blen_transfer
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-17 10:34:24 -04:00
Kumar Gala eaaa175b92 tests: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I6c676bc6c5e850a8725785554cd535e32067f33e
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:53:49 -05:00
Kumar Gala c7bc909914 tests/ztest: rename assert macros to be zephyr specific
ztest has a number of assert style macros and used a baseline assert()
that varies from the system definition of assert() so lets rename
everything as zassert to be clear.

Change-Id: I7f176b3bae94d1045054d665be8b5bda947e5bb0
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-13 21:17:33 +00:00
Jon Medhurst a89ed6d7d5 tests: dma: Initialise callback enable flags
The test failed to initilise these to known states, so fix this by
asking for end of transfer and error callbacks.

Change-Id: I523168381329062ec0c17aa41cb4033b78d8ed99
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2017-04-05 17:18:23 +00:00
Baohong Liu 59b8af5395 tests: dma: update dma loop transfer app
Update the dma loop transfer sample app to use the new
dma api interfaces. This change is based on the api change
and the updated dma driver.

A RFC was posted recently on this.

Jira: ZEP-873

Change-Id: I289e2e08d4c775a833bf3d585d2706a903edd0bc
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-11 05:18:22 +00:00
Baohong Liu 00210386c6 tests: dma: update dma block transfer app
Update the dma block transfer sample app to use the new
dma api interfaces. This change is based on the api change
and the updated dma driver.

A RFC was posted recently on this.

Jira: ZEP-873

Change-Id: Icf3bec7260c2e499485b07a4a579956448a1a3fd
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-10 02:18:17 +00:00
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00
Anas Nashif 66cfcc26bc tests: introduce Makefile.test
To customise test builds and support test related features such as time
stamps and a boot banner, introduce a Makefile variant that is dedicated
to testing.

Initially we introduce a new config overlay that is used for all tests, in
this case we enable BOOT_BANNER and BUILD_TIMESTAMP. This will print the
current version and the date, useful when reporting bugs and also an
indicator that the system has booted before the test has started.

For example:

[QEMU] CPU: qemu32
***** BOOTING ZEPHYR OS v1.6.99 - BUILD: Dec 21 2016 19:57:13 *****
tc_start() - Test Nanokernel CPU and thread routines
Initializing nanokernel objects
...
..

Change-Id: I224318cdeb55a301964ea366dbc577e2e3a09175
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-03 17:48:44 +00:00
Anas Nashif 7297f5db88 shell: move shell to its own subsystem
This moves the shell component into its own subsys and groups all
related files and options into a single place.

Additionally, one Kconfig option will now be required to enable the
shell:

 CONFIG_CONSOLE_SHELL=y

The header files was also moved to include/shell/shell.h and can be now
referenced with

 #include <shell/shell.h>

instead of

 #include <misc/shell.h>

Updated documentation as well.

Change-Id: Iffbba4acfa05408055e9fd28dffa213451351f94
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-25 19:35:11 +00:00
Baohong Liu ab96d3648a tests: dma: update to unified kernel
Use k_sleep instead of nano timer.

Change-Id: Ic1cc68cefa23b2e291e3605f4795cbe21ad98fc0
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-11 00:47:59 +00:00
jing wang 2c311431fc tests: add a dma transfer test with different channel and burstlen
This TC cover dma transfer with different channel and burst length
It support 2 ways to execute
*) full-auto: by default, it run all sub test cases defined in array
   once flashing done and reset.
*) interactive: when CONFIG_CONFIG_CONSOLE_HANDLER_SHELL=y, it go into
   shell first, user can input test command one by one for debugging.

move original test under drivers/dma to test_loop_transfer/

Change-Id: I7e78b730592c80bf2c23b20c8b0eb65a9b353acd
Signed-off-by: jing wang <jing.j.wang@intel.com>
2016-11-09 02:38:57 +00:00
Anas Nashif d622b09bc0 samples: tests: remove obsolete KERNEL_TYPE and kernel variables
Remove those from Makefiles and testcase.ini, we now support unified kernel
only and sanitycheck script now knows how to deal with this.

Change-Id: I853ebcadfa7b56a4de5737d95f2ba096babb2e13
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-04 15:47:25 -04:00
Anas Nashif 36e1e2dbaf move tests from samples to tests/
Change-Id: Ib183936134d27ff84d9af57e8e2e2d9f0cc2670f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:13:36 +00:00