Commit Graph

5360 Commits

Author SHA1 Message Date
Andrei Gansari 42523a39e3 samples: tfm_integration: lpc55s69 documentation
Update sample documentations to reflect the new way to flash
lpcxpresso55s69 boards with TFM.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-12-04 15:06:56 +02:00
Ioannis Glaropoulos 3f3dbea454 samples: bluetooth: hci_rpmsg: change the allowed platform to nRF5340 DK
We have deprecated nRF5340 PDK so change the platform
to nrf5340 DK.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-12-04 10:21:00 +02:00
Vinayak Kariappa Chettimada bae2c58cc2 samples: Bluetooth: Add LED indications to PA Sync sample
Add LED blinking while scanning for Periodic Advertising,
and LED ON when Periodic Advertising Sync is established.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-12-03 13:54:25 -05:00
Vinayak Kariappa Chettimada 56d3ad6d49 samples: Bluetooth: How to test periodic advertising
Added documentation in per_adv and per_sync samples on how
to test Periodic Advertising and Periodic Advertising
Synchronization.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-12-03 13:54:25 -05:00
Vinayak Kariappa Chettimada dcabeccfbb samples: Bluetooth: Add BLE Periodic Advertising Sync sample
Add an application that initializes Bluetooth Subsystem,
starts scanning for Periodic Advertising, establishes
Periodic Advertising Sync and receives Periodic
Advertising Reports.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-12-03 13:54:25 -05:00
Vinayak Kariappa Chettimada ebdcdf3289 samples: Bluetooth: Add BLE Periodic Advertising sample
Add an application that initializes Bluetooth Subsystem,
creates an extended advertising set, and starts Periodic
Advertising functionality.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-12-03 13:54:25 -05:00
Henrik Brix Andersen 9121b24269 samples: drivers: flash_shell: do not enable CONFIG_SERIAL
Do not enable CONFIG_SERIAL explicitly in the flash_shell sample. Leave
it up to the board definition to enable a suitable shell backend if
CONFIG_SHELL is enabled.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-12-02 23:20:32 -05:00
Henrik Brix Andersen db25454e0e samples: flash_shell: skip boards without zephyr,flash-controller
Adjust the sanitycheck filter of the flash shell sample to also depend
on the board having a chosen zephyr,flash-controller devicetree node (as
this is what is referenced in flash_shell.c).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-12-02 23:20:32 -05:00
Erwan Gouriou 83ea7180cf samples/shields: x_nucleo_iks01a3: Add config for stm32mp157c_dk2
Shield x_nucleo_iks01a3 could be used with board stm32mp157c_dk2,
but it requires not using the irq-gpio pin.
Provide a specific configuration for this board that does not make
use of this pin, sot set all sensors' triggers mode to NONE.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-02 13:17:30 -06:00
Erwan Gouriou c7f26e99f1 samples/shields: x_nucleo_iks01a3/02a1: Default use of prj.conf
By default, prj.conf is the CONF_FILE file use by any application.
Use the file when it is not the case and remove the line that sets
it in CMakeLists.txt as this is not required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-02 13:17:30 -06:00
Evgeniy Didin 7371f97097 Samples: Add SMP pktqueue application
This sample application simulates a network router with several
interfaces which performs IP Header Validation(calculation
of CRC16 header checksum). Each interface is represented
by sender queue(initialized with packet headers) and receiver queue.
Every header first is fetched from sender queue, than the header
CRC16 is calculated, and finally if hashsum is correct
the header is stored in receiver queue.
Each interface is can be processed independently by multiple threads.

This application can be used for testing the correctness
of synchronization mechanisms on multi-core systems.

Signed-off-by: Evgeniy Didin <didin@synopsys.com>
2020-12-02 07:09:21 -05:00
Johann Fischer cec040503b samples: mass: rework disk and fs configuration
USB MSC sample has been expanded over time. Config overlays
for RAM disk and flash disks were added. Board specific overlays
followed. It was overlooked that they forced a specific
configuration for the nrf52840dk_nrf52840 board,
even if it was not explicitly desired
(for example RAM-disk). This also caused strange behaviour
during automatic MSC USB3CV tests (which explicit selects RAM-disk)
so that nrf5340dk_nrf5340_cpuapp board passed test
but nrf52840dk_nrf52840 failed.

Rework disk and file system configuration, and initialization
code, allow to use FAT file system on top of RAM disk.

This sample can be built with none or one of two supported
file systems, LittleFS or FATFS. Disk subsystem can be flash
or RAM based. LittleFS only works with flash disk.
There are four useful possibilities:
- RAM disk without any file system for testing (default)
- RAM disk with FAT file system
- flash disk with FAT file system
- flash disk with LittleFS
Flash disk configurations is only available (as before) for
nordic,qspi-nor compatible, but only need the device tree overlay
per platform without a config overlay.

This path also revises test cases.
Remove invalid "flash" tag from depends_on key.
Remove unnecessary gpio tag and exclude native platform.

Resolves: #26275

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2020-12-02 11:50:11 +01:00
Jukka Rissanen 9028ecbc56 samples: net: zperf: Allow DHCPv4 or manually set addresses
If user has enabled DHCPv4, then allow to use its address instead
of giving error if static address cannot be set. Similar fix for
IPv6, so allow user to manually set an IPv6 address.

Because DHCPv4 has already set the IPv4 address to the network
interface, then zperf might not be able to add the pre-configured
address to it. So instead of returning immediately, try to use the
IP address that is already in the network interface. This way we
avoid this error print.

  uart:~$ zperf udp download 5001

  Setting IP address 2001:db8::1
  Setting destination IP address 2001:db8::2
  Cannot set IPv4 address 192.0.2.1
  Unable to set IP
  Setting destination IP address 192.0.2.2

  Cannot set IPv4 address 192.0.2.1
  Unable to set IPv4
  Binding to 192.0.2.1
  Cannot bind IPv4 UDP port 5001 (-2)

In this example, the network interface already had a proper and working
IPv4 address 192.168.0.2 in it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-12-01 16:32:07 +02:00
Jukka Rissanen 77a74414d1 samples: net: zperf: Convert to use usec directly
Currently the code uses hw cycles and tries to convert them
to usec. I noticed some failures with this, for example the test
duration was sometimes missed meaning that instead of testing 5
seconds, we bailed out after 2 sec etc. After the kernel k_timeout_t
changes, which added APIs to support usec accuracy, we can use usec
and ticks here. This simplifies the code a bit.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-12-01 16:32:07 +02:00
Jakub Rzeszutko e2f8bfdc8d shell: example: prj_minimal config update
Deactivate all features that are not absolutely needed to run
the shell.

Used CONFIG_CBPRINTF_NANO library to save 1020B.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2020-11-30 16:03:01 -06:00
Dominik Ermel 25ac7e03a6 samples: mgmr: smp_svr: Extend sample sanity check configurations
Configurations for additional smp_svr sanity builds have been added
to limit possibility of getting not compilable smp_svr sample.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-11-30 15:48:59 +01:00
Peter Bigot f13eb90705 samples: nrf: battery: fix reference to ADC node
The sample referenced the ADC through an alias that either never
existed or (more likely) has since been removed.  Use the node label
instead.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-27 20:26:45 -05:00
Erwan Gouriou 82c614ac9d boards: Fix 2 liners copyright
Convert 2 lines copyright before this new format starts creating
the new in vogue style.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-11-26 13:51:04 +01:00
Trond Einar Snekvik 24f34b1913 Bluetooth: Mesh: Demo: Increase loopback buf count
Increases the loopback buffer count to 8 in the mesh demo to give it
enough room for buffering the configuration messages in the
initialization step. As these messages are sent in a non-blocking
manner, they'll all be queued up for execution before any of them is
processed.

Fixes #30207.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-11-26 13:04:22 +01:00
Jukka Rissanen 41b7e5da7b samples: net: zperf: Fix timeout value for native_posix
In native_posix, the code calls k_busy_wait() but with wrong
value (k_timeout_t instead of int).

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-25 18:27:40 +02:00
Gerson Fernando Budke bc4361db0d samples: net: cloud: tagoio_http_post: Fix sample name
The current name Socket TagoIO HTTP Client still refering to directory
samples/net/sockets.  Rename to TagoIO IoT Cloud HTTP Sample to reflect
better the application sample intention.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-11-24 23:41:25 -05:00
Gerson Fernando Budke 822070d8c6 samples: net: cloud: tagoio_http_post: Force pinmux config
There are some hardware combinations (board/shields) that report the
error undefined initialization levels used at link phase.  Add pinmux
Kconfig at project configuration to fix the issue.

Fixes #30029.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-11-24 23:41:25 -05:00
Jukka Rissanen 533aaed7a0 samples: net: echo-server: Print receive statistics periodically
Print receive statistics of how many KiB we receive / sec.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-24 15:02:45 +02:00
Alexander Kozhinov e35e8913f9 samples: net: civetweb: Refractor code structure
move all CivetWeb samples to one directory
add directory with CivetWeb common includes
update cmake files
move civetweb sample folder to samples/net

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-24 12:59:00 +02:00
Maureen Helm 17695ce9d9 samples: tracing: Extend the SystemView configuration to more platforms
Extends the Segger SystemView configuration for the tracing sample to
more platforms that support Segger RTT, not just nrf52840dk_nrf52840.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-20 12:54:09 -06:00
Maureen Helm ca6ed09e2b samples: tracing: Extract SystemView configuration into separate file
Extracts the Segger SystemView configuration for the tracing sample from
sample.yaml into a separate file. Increases the idle thread stack size
to fix overflows observed on i.MX RT boards. Removes
CONFIG_USE_SEGGER_RTT=y which is selected by CONFIG_SEGGER_SYSTEMVIEW.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-20 12:54:09 -06:00
Jukka Rissanen e8472f941a samples: net: dumb_http_server_mt: Fix the OK/FAIL status check
The test script http-get-file-test.sh will send a POST to inform
whether the test was ok or not. This is needed so that we can
test the TLS functionality properly, earlier use of netcat would
not do TLS handshakes.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 16:07:59 +02:00
Jukka Rissanen c5ac79c91b samples: net: coap-server: Use IPv4 instead of IPv6
The Docker tests expect IPv4 so use that only in the coap-server.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 16:07:59 +02:00
Jukka Rissanen 725a65afec samples: net: echo-client: Fix the return code in Docker tests
The pass/fail return code was not returned to the caller in
Docker based testing so the runner script did not know if the
sample test passed or not.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 16:07:59 +02:00
Jukka Rissanen b751740bfa samples: net: mqtt: Fix the return code in Docker tests
The pass/fail return code was not returned to the caller in
Docker based testing so the runner script did not know if the
sample test passed or not.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 16:07:59 +02:00
Jukka Rissanen d1901d6a2f net: scripts: Make test runner script fully generic
Move actual test cases from the run-sample-tests.sh script to
the network samples directory that are supported by Docker based
testing. Each network sample directory that supports Docker testing,
will contain docker-test.sh script that is sourced by the runner
script. The docker-test.sh script will run the test as needed and
then return return value to the runner script.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 16:07:59 +02:00
Jukka Rissanen 6e54f5462c samples: net: Adjust the thread priorities
If networking pre-emptive thread priorities are enabled,
then use the proper macro to enable them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-20 12:57:29 +02:00
Tomasz Wojno a43db40da3 Samples: Fix printf in MPU6050 example
Removed whitespaces in format specifiers.

Signed-off-by: Tomasz Wojno <tomek.wojno@gmail.com>
2020-11-19 12:37:30 -05:00
Shihao Shen 90f0a1d6af samples: drivers: add platform filtering for led pwm
The sanity check on this sample gives timeout failure
on reel board because of bad filtering. Because the
sample does not adopt ztest framework, sanitycheck in
our daily test will report this as failure, which lowers
our passrate but this is not a sample with errors.

Signed-off-by: Shihao Shen <shihao.shen@intel.com>
2020-11-19 12:36:03 +01:00
Markus Becker 638b5f389f net: openthread: OpenThread RCP mode integration into Zephyr
* Add RCP library.
* Conditionally remove non required libraries not required for RCP.
* Drop :option: marker for CONFIG_OPENTHREAD_NCP_SPINEL_ON_UART_ACM

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2020-11-19 12:34:14 +01:00
Yestin Sun f6b9edf85c samples: sensor: add sample application for lsm6dso
Add sample application for sensor lsm6dso. This sample has been
tested on stm32l562e_dk board, where lsm6dso is connect to I2C bus.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2020-11-18 14:33:52 -05:00
Martin Åberg a5fd0d5c0b samples: tracing: use TEST_EXTRA_STACKSIZE
Take TEST_EXTRA_STACKSIZE into account when sizing the stack for the
tracing sample tasks.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-18 10:31:26 +01:00
Henrik Brix Andersen b54677b289 samples: drivers: counter: alarm: add support for the Xilinx AXI Timer
Add support for the Xilinx AXI Timer IP to the counter alarm sample.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-11-17 19:30:20 -05:00
Maureen Helm 3452ecba57 samples: sensor: Enable fxos8700 magnetic vector magnitude function
Enables the magnetic vector magnitude function in the fxos8700 sensor
sample application to ensure it builds in CI.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-17 16:51:50 -05:00
Maureen Helm cb98e9aa11 drivers: sensor: Convert fxos8700 power mode Kconfigs to dts property
Converts fxos8700 power mode options (normal, low noise low power, high
resolution, low power) from Kconfigs to an optional device tree
property.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-17 16:51:50 -05:00
Gerson Fernando Budke bfd0f16e0c samples: drivers: at45: Refactor to allow any board
The sample is currently to tied to nrf9160dk_nrf9160 board.  Refact to
allow build with board and select between device power management on or
off.  Move nrf9160dk_nrf9160.overlay to proper boards directory and add
nrf9160dk_nrf9160.conf to set the correct device.  Device PM needs SYS
PM be implemented and is an specific configuration and for those boards
that have it implemented user can add overlay-pm.conf to enable the
feature.

Fixes #28094.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-11-17 16:44:03 -05:00
Martin Jäger 0d64d6668d samples: boards: pine64_pinetime: add sample.yaml
This adds the board to CI so that compile issues will be detected in
the future.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-11-17 16:37:28 -05:00
Martin Jäger 87caab43fc samples: boards: pine64_pinetime: Fix main.c
Constify device pointer and remove legacy int types to make it compile.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-11-17 16:37:28 -05:00
Peter Bigot 56048bb500 samples: add FP formatting to all samples that require it
Samples that include floating-point format specifications may need
cbprintf FP support.  Make sure it's available.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-17 14:44:59 -06:00
Martí Bolívar 8ea9941fe3 samples: led_ws2812: force SPIM on nRF52-DK
The WS2812 SPI driver needs the pixel data to be clocked out on time,
with no gaps between SPI frames. This makes the nordic,nrf-spi
compatible unsuitable for use, since the corresponding driver doesn't
use EasyDMA to clock out the tx buffers.

Force the arduino_spi node in the DT to SPIM mode by setting its
compatible to nordic,nrf-spim. On nRF52832, this driver is disabled by
default due to Product Anomaly Notice (PAN) 58.

We happen to not be affected by PAN 58 in this instance, because we
never read data over the SPIM, only write it. So it's safe to enable
the SPIM driver. This requires a board-specific Kconfig fragment for
nRF52-DK to enable CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58.

Fixes: #29877
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-11-17 10:24:33 -06:00
Øyvind Rønningstad a28da5118d tfm: Configure TFM via Kconfig instead of Cmake
Add Kconfig options that will be used by the module
to call the function with the desired parameters.
Refactor the tfm_integration samples and
the supported boards.

Update west.yml to bring in Cmake changes that use the new KConfigs.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-11-17 14:39:52 +02:00
Jukka Rissanen c75fc93f29 samples: net: dumb_http_server_mt: Add connection mgr support
Start the listeners after the "connected" event from connection
manager has been received.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-17 12:25:36 +02:00
Jukka Rissanen eaebfd9a91 samples: net: dumb_http_server_mt: Quit if client says so
If the client sends OK or FAIL, then it means that we are run
under a test system and we should stop running and exit so that
the test runner (scripts/net/run-sample-tests.sh) can report
success or failure.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-17 12:25:36 +02:00
Jukka Rissanen f0edf73809 samples: net: dumb_http_server_mt: Add support for large file
If user sets CONFIG_NET_SAMPLE_SERVE_LARGE_FILE then the sample
will return 100KB file. By default 2KB file is returned.
This is used by the Docker based testing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-17 12:25:36 +02:00
Jukka Rissanen b31f1e3dc7 samples: net: gptp: Add support for running the sample X seconds
This feature is used by scripts/net/run-sample-tests.sh script
which connects the Zephyr gPTP sample to Linux gPTP daemon running
on a Docker container.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-17 12:15:37 +02:00