Commit graph

2626 commits

Author SHA1 Message Date
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
Punit Vara 71948788eb tests: logger-hook: convert sample to ztest and move to test/
issue: #3302

Signed-off-by: Punit Vara <punit.vara@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-05 18:17:59 -05:00
Sebastian Bøe 47542598b6 cmake: Ninja: Fix the external_lib sample
This samples was failing to build with Ninja because Ninja detected
that libmylib.a was missing. Adding it as a BYPRODUCT in the
ExternalProject fixes the issue.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-03 13:19:59 -05:00
Sebastian Bøe 6f642a19fd cmake: Ported mbedTLS to use Zephyr interface libraries
mbedTLS include directories will now default to be in the 'app'
include path when mbedTLS has been enabled.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-02 22:09:01 -05:00
Ravi kumar Veeramally a0371ae92f net: tcp: Add initial support for TIMEWAIT timer
Right now in FIN_WAIT1 state, if we receive FIN+ACK message, then
tcp state changed to FIN_WAIT2 on ACK flag and immediately on FIN
flag state changed to TIME_WAIT. Then final ACK is prepared and sent
(in queue at-least) to peer. Again immediately state changed to
TCP_CLOSED, where context is freed. net_context_put frees context
and releases tcp connection. Final ACK packet which is in queue
is dropped.

As a side effect of freed ACK packet, peer device keep on sending
FIN+ACK messages (that's why we see a lot of "TCP spurious
retransimission" messages in wireshark). As a result
of context free (respective connection handler also removed), we see
lot of packets dropped at connection input handler and replying with
ICMP error messages (destination unreachable).

To fix this issue, timewait timer support is required. When tcp
connection state changed to TIMEWAIT state, it should wait until
TIMEWAIT_TIMETOUT before changing state to TCP_CLOSED. It's
appropriate to close the tcp connection after timewait timer expiry.

Note: Right now timeout value is constant (250ms). But it should
be 2 * MSL (Maximum segment lifetime).

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-12-31 11:58:27 -05:00
Anas Nashif eba1bbd705 samples: remove more build_only tags
Remove build_only and add harness type needed for the sample/test to
allow running with sanitycheck and on devices once we have harness
support.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif bca9c456d2 samples: remove build_only from various samples
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif c6d2ba996f samples: drivers: remove build_only flag
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 26ccc0bbcb samples: crypto: remove build_only and sample cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 0d841cf0f2 samples: entropy: filter based on HW capabilities
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif b5b8095749 samples: bluetooth and net samples need test setup
remove build_only and make them depend on test harness (bluetooth)

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 4599bbff67 samples: watchdog: fix dependencies and sample cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif d473d53da8 samples: rtc: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 6e7de15680 samples: TMP112: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 9f0e1b82f0 samples: TH02: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif c98513e6a5 samples: sx9500: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 31a23dca68 samples: mcp9808: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif a6119ee105 samples: max30101: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 482feb45e4 samples: bmi160: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 159e0a2167 samples: magn_polling: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 0448642b33 samples: hts221: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 42ac8abdc3 samples: fxos8700: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 1ac3cc9347 samples: fxas21002: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 21787c8d1a samples: bmi150: fix dependencies and test cleanup
Remove ARC unrelated configs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 200b2459cf samples: bmg160: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif da9a59e233 samples: bme280: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif e7c009eec9 samples: apds9960: fix dependencies
depend on i2c and gpio drivers being available.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00