Commit graph

2652 commits

Author SHA1 Message Date
Kamil Sroka 8dd852dc92 samples: net: Add config and enable CI for OpenThread on nRF52840
Add samples config for nRF52840 with OpenThread
for echo_client and echo_server.

Add OpenThread to CI for echo_client and echo_server on nRF52840

Signed-off-by: Kamil Sroka <kamil.sroka@nordicsemi.no>
2018-01-29 22:42:03 -05:00
Kumar Gala a394693d2f drivers: flash: NXP k6x/kw2xd: Convert to use device tree
Convert NXP k6x and kw2xd flash driver to use device tree to get the
flash controller name from device tree.  We introduce yaml bindings for
the "nxp,kinetis-ftfe" and "nxp,kinetis-ftfl" devices.

Fixes: #5788

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-29 16:34:49 -06:00
Anders Pitman dbba22397c samples: button: Fix button sample GPIO for nRF52
Applies to #4008 and #5159 for this board. Problem is that the
button interrupt callback was only firing once. Solution is to
set the pin pull up flag to GPIO_PUD_PULL_UP.

Signed-off-by: Anders Pitman <tapitman11@gmail.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-29 10:23:36 +01:00
Jukka Rissanen 37f54c11fa samples: net: perf: Add sample for throughput measurement
Add a simple UDP server application that will receive UDP data
and print various statistics like number of packets received and
dropped, amount of bytes received, and how many packets / sec
we were able to receive.

Currently the sample only provides a config file for FRDM-K64F board.
Note that this sample should not be run in QEMU as the performance
is very bad there because of SLIP link between Linux host and QEMU.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-01-29 01:57:41 +05:30
Michael Hope f9ebe62b3c samples: update the blinky sample to work with the Arduino Zero.
The GPIO unit on the SAM0 is called 'PORT' which conflicts with the
name used in this sample.  Rename to LED_PORT instead.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-01-29 01:41:41 +05:30
Kumar Gala dc98605f4a drivers: flash: stm32: Convert to use device tree
Convert STM32 flash drivers to use device tree to get the flash
controller name and base address.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-26 09:25:57 -06:00
Kumar Gala 26e4da52cf arm: nordic: flash: Use FLASH_DEV_NAME define
We want to move to use a common FLASH_DEV_NAME across the various flash
drivers. So samples, tests, or other code can be a bit more generic.  So
replace CONFIG_SOC_FLASH_NRF5_DEV_NAME with FLASH_DEV_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 15:23:00 -06:00
Anas Nashif 1a67aed51f samples: crypto: remove DEBUG/ASSERT from prj.conf
Those are added by sanitycheck, no need to have them enabled in the
project by default.

CONFIG_DEBUG is causing issues on qemu_nios2, see #5743.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 2eb443f2d8 samples: philosophers: test different configurations
The demo can be configured to use different object types for its
synchronization, so test all of them.

The demo can also be configured to work with static objects or dynamic
objects, byt default the demo uses dynamic objects, add a test for
static objects.

Also, the demo can be configured to work with threads of the same
priority or not, so enable both options for testing

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 6de0dfad51 samples: event_logger: match more lines during sanitycheck
Have the test run for long by matching more lines in the output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 3a0a592583 samples: hello_world: disbale asserts on single thread (REVERTME)
For some reason, single thread is stuck when asserts are enabled.

This is tracked in #5733.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 40188a8449 samples: exclude some platforms due to bug [REVERTME]
Do not build for some unsupported architecture and exclude ARM qemu
platform due to bug #5735.

STACK_ALIGN 0x8
MPU STACK GUARD Test
Canary Initial Value = 0xf0cacc1a threads 0x200010e0
Canary = 0x20000240    Test not passed.
***** BUS FAULT *****
  Executing thread ID (thread): 0x200010e0
  Faulting instruction address:  0x209c
  Imprecise data bus error
Fatal fault in thread 0x200010e0! Aborting.
***** HARD FAULT *****
  Fault escalation (see below)
***** BUS FAULT *****
  Executing thread ID (thread): 0x200010e0
  Faulting instruction address:  0x1f4
  Imprecise data bus error
Fatal fault in ISR! Spinning...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 04035d19bc tests: nfc_hello: remove filter and support harness
Evaluate console output of sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif a7a1e393ab tests: mem_domain_apis: remove filter and support harness
Evaluate console output of sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 9f6147395f tests: mpu_stack_guard: remove filter and support harness
Evaluate console output of sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif d2b7749428 samples: event_logger: remove filter and support harness
Evaluate output from sample and record success/failure.

Enable on other platforms, this should not be whitelisted.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 5d3a534807 samples: use console harness for some samples
The output of those samples can be parsed and verified by sanitycheck,
so lets use the console harness for this.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 5ba7eed255 samples: philosophers: test more scenarios
Enable 2 additional documented scenarios:
- preempt only
- coop only

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif d6cc2909b8 sample: kernel_event_logger: cleanup headers
Remove unused and duplicated header inclusion.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 1b1b7091ff sample: cpp_synchronization: support console harness
Evaluate console output of sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 5c8124f96b sample: philosophers: support console harness
Evaluate console output of sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 4843c69f06 sample: external_lib: support console harness
Evaluate console output of sample.

Enable on other platforms, this should not be whitelisted.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif a442987b02 sample: hello_world: support console harness
Evaluate console output of sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif dfbc0f5efb sample: synchronization: support console harness
Evaluate console output of sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Vincent Veron 8310c53200 sample: sensor: Add vl53l0x sample application
This sample application allows to test vl53l0x distance sensor.
By default it is built with disco_l475_iot1 board as it is
built-in.

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2018-01-23 10:14:49 -06:00
Paul Sokolovsky 6bab4998ba samples: net: zperf: Fix only IPv4/only IPv6 build, better messages
The code couldn't really build with only CONFIG_NET_IPV4 or
CONFIG_NET_IPV6 enabled, because some parts weren't covered
by #ifdef's. Regroup the code to get it covered.

Also, improve error/notice messages.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-01-22 10:15:27 +02:00
Andrzej Puzdrowski 9fdcab9b1b samples: drivers: soc_flash_nrf5 fix missing flash write access
By default CONFIG_MPU_ALLOW_FLASH_WRITE=n so the example must have been
falling on any write to flash.
This patch adds CONFIG_MPU_ALLOW_FLASH_WRITE=y to project configuration.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-01-19 11:47:43 -06:00
Anas Nashif ff0d690e79 samples: shell: add standalone version command
Combine modules with standalone commands.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-19 12:01:08 -05:00
Anas Nashif fa7f13ef00 shell: rename sample to be less generic
This sample implements a custom module, so rename it to allow for other
samples with specific features.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-19 12:01:08 -05:00
Anas Nashif dd013691b2 shell: add a shell banner
Give details about running version and add a line about usage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-19 12:01:08 -05:00
Carles Cufi 72046a8abc doc: getting_started: Support multi-OS instructions
In order to be able to document the build on Windows and UNIX
systems, slight variations are required on the app commands
that are used throughout the documentation system.

This includes getting rid of the prompt symbol and providing commands
for both UNIX and Windows operating systems.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-18 16:53:31 -05:00
Andrei Emeltchenko 314d182f79 samples: zperf: Add USB RNDIS configuration check
Add configuration for zperf sample allowing to build USB dongle with
zperf for testing.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-01-17 18:53:05 -05:00
Andrei Emeltchenko 7e80f41162 usb: Rename SYS_LOG_USB to SYS_LOG_USB_DEVICE
At the moment CONFIG_SYS_LOG_USB_LEVEL name does not specify that this
is log level for the Device Stack. Make it clear renaming to the
proper name.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-01-17 18:53:05 -05:00
Andrei Emeltchenko 6e17e71fb5 samples: Correct default SYS_LOG_USB and SYS_LOG_USB_DRIVER levels
Making configuration files useful.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-01-17 18:53:05 -05:00
Yannis Damigos 3d1115adea tests: Clear SPI_*_IRQ_PRI from tests and samples
Remove SPI_*_IRQ_PRI from tests and samples.
Using DT to get the *_IRQ_PRI, we can't
override it using Kconfig.

If needed, use a BOARD_NAME.overlay file to
override default values.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-17 11:51:48 -06:00
Erwan Gouriou 0a3d9933c2 sample: fix configuration for sensor HTS221 sample application
Since no GPIO trigger is configured in hts221 sample application,
update prj.conf to enable TIGGER_NONE flag


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-01-13 09:06:58 -08:00
Anas Nashif c3880c0db4 samples: crypto: increase min_ram for sample
This samples does not fit on platforms with 8k RAM, increase minimal
requirements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-13 10:48:36 -05:00
Yannis Damigos 4b7f3e75dd samples: bmi160: Add testcase filter for SPI_LEGACY_API
Don't run testcase if CONFIG_SPI_LEGACY_API is false.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Yannis Damigos d907ed309e samples: bme280: Add testcase filter for SPI_LEGACY_API
Don't run testcase if CONFIG_SPI_LEGACY_API is false.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-11 14:35:45 -06:00
Anas Nashif a2002e6069 samples: nfc: update README
Update README for usage with CMake.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 12:50:14 -05:00
Tomasz Bursztyka 5195ddf472 drivers/ieee802154: Cleanup Kconfig
A very old reference to former net stack was still lurking around.
Removing it.

Taking the opportunity to clear up dependencies.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-01-10 21:53:01 -05:00
Sebastian Bøe 4d9499cbeb cmake: external_lib: Specify that the library should be GLOBAL
Having a library being GLOBAL, although not default behaviour, or
necessary for the sample, is expected behaviour for a library. It is
expected that like normal libraries, the target name will be
accessible from outside of the CMakeLists.txt file that created it.

Since samples are used as reference code, we specify GLOBAL so that
libraries are created with this intuitive behaviour.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-09 11:44:40 -05:00
Anas Nashif 9512f0ddf3 samples: rpl: do not build when assert is enabled
Was failing due to increased size of binary.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-09 11:13:08 -05:00
Anas Nashif 4d2ad0a8a5 Bluetooth: remove unused BT_DEBUG_COLOR
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-09 10:59:41 -05:00
Anas Nashif 2735c15120 samples: fix amg88xx sample.yaml syntax
Was still using old synatx.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-08 14:45:38 -05:00
Sebastian Bøe 830b8bdc17 samples: threads: Rewrite misleading sample
The basic/threads sample is printing a log that looks like this:

Toggle USR0 LED: Counter = 0
Toggle USR1 LED: Counter = 0
Toggle USR0 LED: Counter = 1
Toggle USR0 LED: Counter = 2
Toggle USR0 LED: Counter = 3
Toggle USR0 LED: Counter = 4

From that log you would think that it was logging when leds were
blinking, but actually the led-threads might have crashed, and it
would just continue logging anyway. All it's doing is executing
printk's at roughly the same frequency as the LED's are blinking.

This patch rewrites the sample to use a FIFO so that the printk's only
trigger if the LEDs are actually blinking.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-08 14:25:11 -05:00
Anas Nashif 33592e8aa8 cmake: remove IS_TEST handling
Depending on a path inside the Zephyr tree to determine if we are a test
does not scale. Also some samples were marked as TEST while they are
not, just to get some options defined for tests.

Idenitfying a test will be addressed in another patch introducing
CONFIG_TEST.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-08 10:03:57 -05:00
Anas Nashif 94066e0f15 tests/samples: remove unknown option LOG_CBUFFER/LOGGER_BACKEND
Those options are not part of Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-08 08:08:45 -05:00
Anas Nashif c78296dab4 tests: remove obsolete CONFIG_MDEF
CONFIG_MDEF is no more..

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-08 08:08:45 -05:00
Johann Fischer 7817622b4b samples: sensor: add amg88xx sample
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-01-07 16:04:45 -05:00