Commit graph

10761 commits

Author SHA1 Message Date
Czeslaw Makarski
12bc964c9b samples: 802154_rpmsg: Remove redundant kconfig
This commit removes the obsolete hardcoded kconfig in the
802154_rpmsg sample.

Signed-off-by: Czeslaw Makarski <Czeslaw.Makarski@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Flavio Ceolin
86a624e2a2 power: Remove PM_STATE_LOCK option
Simplify pm subsystem removing PM_STATE_LOCK option. Constraints API is
small and is a key component of power subsystem.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-15 08:08:36 -05:00
Flavio Ceolin
3f87c5a0f4 power: Rename constraint API
Replace pm_ctrl_* with pm_constraint.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-15 08:08:36 -05:00
Gerard Marull-Paretas
68344cd87c samples: boards: stm32: add backup SRAM sample
The sample illustrates how to define and use a variable in the backup
SRAM.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-02-15 08:04:24 -05:00
Ioannis Glaropoulos
2573f4b99c tests: remove nrf5340 PDK boards from test .yml files
Remove references to the nRF5340 PDK boards
from samples and tests .yml files.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-15 07:59:43 -05:00
Dominik Ermel
4d0fb2ca88 samples/subsys/mgmt/mcumgr/smp_svr: Limit logging from mcuboot_util
Fixes problem where UART DFU mage uploads via mcumgr get interrupted
by the mcuboot_util logs, causing uploads stuck and fail on time-out.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-02-14 18:38:37 -05:00
Jose Alberto Meza
d38d913452 samples: drivers: espi: Showcase OOB Rx asynchronous handling
Add example to handle OOB host responses asynchronously.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2021-02-14 18:22:47 -05:00
Jose Alberto Meza
9c6e81665b samples: drivers: espi: Remove magic number
Define macro for number of times the temperatures will
be retrieved.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2021-02-14 18:22:47 -05:00
Maciej Perkowski
3e1badaaac samples: tests: Fix sample.boards.nrf.nrfx test
The sample was failing twister test with a timeout because there was
no pass/fail criteria for it (nothing was tested). The fix adds
harness on consolse and some output that can be verified.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2021-02-11 13:58:25 -05:00
Maciej Perkowski
0fb58735f1 samples: tests: Fix usb.audio.headset test
The sample was failing twister test with a timeout because there was
no pass/fail criteria for it (nothing was tested). The fix adds
harness on consolse and some output that can be verified.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2021-02-11 13:57:31 -05:00
Maciej Perkowski
ce776f0c7e samples: tests: Fix usb.audio.headphones_microphone test
The sample was failing twister test with a timeout because there was
no pass/fail criteria for it (nothing was tested). The fix adds
harness on consolse and some output that can be verified.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2021-02-11 13:57:31 -05:00
Peter Bigot
7ab81edba9 samples: driver: watchdog: rework how callback support is handled
Nordic watchdog does support a callback, but it has a time limit that
is too tight for the way this sample uses it.  Add infrastructure to
bypass using the callback in this sample.

Also add more diagnostics explaining the status of callback use in the
sample.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-09 13:43:55 -05:00
Andrzej Puzdrowski
c7a626fc6c samples/subsys/usb/mass: Add fs_dir_t type variable initialization
The commit adds initialization of fs_dir_t variables in preparation
for fs_opendir function change that will require fs_dir_t object, passed
to the function, to be initialized before first usage.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-02-05 07:32:20 -05:00
Andrzej Puzdrowski
9111438db5 samples/subsys/fs: Add fs_dir_t type variable initializations
The commit adds initializations of fs_dir_t variables in preparation
for fs_opendir function change that will require fs_dir_t object, passed
to the function, to be initialized before first usage.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-02-05 07:32:20 -05:00
Ioannis Glaropoulos
b6a4db3766 samples: rpmsg_service: do not run test for nrf5340 in CI
We cannot automatically flash both master and remote images
to nRF5340 application and network core, this needs to be
done separately. We therefore, cannot execute the test on
nRF5340, so we switch to make the test build-only on this
platform. We also make nrf5340_cpuapp an integration
platform for the given sample.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-04 14:41:41 -05:00
Andrei Emeltchenko
89a253b052 edac: Use Device Tree values for BDF and PCI VID
Start using DTS values for PCI Vendor ID and PCI BDF. For the PCI
Device ID we do not use DTS since this would require changing overlay
for different SKU board.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-02-04 09:37:42 -05:00
Øyvind Rønningstad
b49292634f tfm_ipc: Fix regex in sample.yml
Remove missing printout, and add the last line of printout.

Note that it's not possible to run this on hardware using Twister as of
now, since west flash will not flash tfm_s.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-03 11:07:30 -05:00
Øyvind Rønningstad
25bc05e174 tfm_integration: Add tfm tag in sample.yml
To easily differentiate the samples.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-03 11:07:30 -05:00
Carles Cufi
1454730faa Bluetooth: samples: hci_uart: Add overlays for nRF5340
Add overlays for the current nRF5340 DK boards:

- nrf5340dk_nrf5340_cpuapp
- nrf5340dk_nrf5340_cpunet

Fixes #29440.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-02-03 10:22:18 -05:00
Johann Fischer
5b8d79fe9a sample: usb: exlude native_posix platform
Exlude native_posix platform from USB samples but
add build-only test case.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-03 08:37:38 -05:00
Johann Fischer
070ee4bf37 samples: cdc_acm_composite: fix format specifier
Use %zu format specifier for size_t.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2021-02-03 08:37:38 -05:00
Johann Fischer
806e3c7d3f samples: usb: remove unnecessary GPIO dependency
Remove unnecessary GPIO dependency.

Fixes: #29034

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2021-02-03 08:37:38 -05:00
Peter Bigot
fcaf14a6e4 samples: sht3xd: fix unchecked failure mode
Failure to configure the trigger should cause the application to fail.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-02 16:46:55 -05:00
Kumar Gala
6defabebad drivers: can: Fix building with socket_can_generic.h
socket_can_generic.h makes some assumptions that are not always valid
for various drivers with regards to numbering.  To clean this up we
add defines for SOCKET_CAN_NAME_0 and SOCKET_CAN_NAME_2 in addition to
SOCKET_CAN_NAME_1.

We also move struct socket_can_context into the drivers themselves
since they know best how many CAN interfaces are getting supported and
what naming/number convention they'd have.

Additionally, this also exposes a few other build issues with the
can_mcux_flexcan driver that get fixed.

Finally, we remove the platform_allow from samples/net/sockets/can
since it is no longer needed.

Fixes #31733

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-02 16:46:28 -05:00
Hubert Miś
77c68aa070 net: coap: clean up token usage in samples and tests
This patch replaces magic numbers with COAP_TOKEN_MAX_LEN value and
removes unnecessary castings of token buffer type.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-02-02 14:03:01 -05:00
Hubert Miś
22687c34e3 net: coap: define default CoAP version
RFC 7252 (CoAP) specifies value of the Version (Ver) field in the
protocol header to value 1. This patch defines value of the Version
field to make packet initialization easier. All samples and tests
are updated to use the new COAP_VERSION_1 field when initializing
a CoAP packet.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-02-02 14:03:01 -05:00
Joakim Andersson
dc1dcb74b1 Bluetooth: samples: Fix stack overflow in TX power control samples
Fix stack overflow in the TX power control sample.
Current stack usage with 0.11.1 zephyr toolchain was at 100% stack
usage of the DYN TX stack.

Fixes: #31433

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-02-02 08:18:28 -05:00
Erwan Gouriou
dda473e890 samples/drivers/watchdog: Update for stm32 window watchdog
Similarly to what was done for watchdog test,
update watchdog sample to be compatible with stm32 window watchdog
and enable testing by twister.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-02-02 08:15:51 -05:00
Guennadi Liakhovetski
3af94e7172 SOF: cAVS 1.5 needs reset-vector.S in the main image
APL ADSP doesn't boot with reset-vector.S in the bootloader,
move it over to the main application binary.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-02-01 14:47:31 -05:00
Detlev Zundel
8410a8cfa8 samples: display: lvgl: Fix README.rst
The commands still refer to the old directory name 'gui' instead of
'display'.

Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
2021-02-01 12:33:00 -05:00
Rubin Gerritsen
fc140d8616 samples: bluetooth: Remove useless default_conn
The connection object is not used.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-02-01 08:38:54 -05:00
Erwan Gouriou
95712bd498 samples/drivers/adc: Few fixes for use with twister
Add some changes to adc sample to enable valid verdict generation
using twister:
-Replace 'single_line' keyword with correct 'one_line'
-Remove parenthesis from the sample output to enable regex verdict
-Add timeout to save time in execution

Additionally, add support for disco_l475_iot1.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-01-29 16:57:04 -05:00
Joakim Andersson
a0d62f03a0 Bluetooth: host: Remove deprecated scan filter duplicate params
Remove the deprecated scan filter duplicate enum values and parameter.
This was deprecated for the 2.3.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00
Dominik Ermel
44ee6fd6b3 samples: fs: Extend littlefs sample to native_posix and qemu_x86
Adds native_posix and qemu_x86 the platform_allow list for the
littlefs sample application.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-01-29 08:04:51 -05:00
Dominik Ermel
f144dea3c7 samples: littlefs: Add fs_file_t type variable initializations
The commit adds initializations of fs_file_t variables in preparation
for fs_open function change that will require fs_file_t object, passed
to the function, to be initialized before first usage.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-01-29 08:04:51 -05:00
Vincent Wan
41a726dac8 samples: cc13x2_cc26x2: system_off: force soft off state
In the last step of the example, the system should go into soft off
state in order to match the original intent in the example to go
into the hardware's SHUTDOWN mode.

Fixes #31727

Signed-off-by: Vincent Wan <vanti.coder@gmail.com>
2021-01-28 08:15:55 -05:00
Peter Bigot
48e6358c6d samples: cmsis_rtos_v1: philosophers: skip qemu_leon3
SPARC systems take a huge penalty in stack usage due to register window
saves.  A recent patch reverted SPARC-specific increases to various
stack sizes, causing this test to fail.

Other platforms are excluded because of stack limits, so do that here
too.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-27 09:05:21 -05:00
Andrzej Puzdrowski
cb6e2a6a9f samples/subsys/mcumgr/smp_svr: disable log over shell
Mcumgr-cli application doesn't accept log on the communication
channel. Since #30370 was merged log messages are generated from
MCUBOOT_UTIL by default. That made `mcumgr image upload` failing.

Patch disables logging via shell which cure the issue.
It is not necessary if another application on the host intercepts
log messages (like picocom can).

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-01-27 08:06:36 -05:00
Katrin Gartenmeister
0bc3b9ddc4 doc: corrected Bluetooth sample documentation
Bluetooth Tx power must be given in dBm instead of dB.
Signed-off-by: Katrin Gartenmeister <katrin.gartenmeister@grandcentrix.net>
2021-01-26 19:16:28 +02:00
Eduardo Montoya
80c0f3fbb6 net: openthread: configure required masterkey
After the latest upmerge, OpenThread requires explicit configuration
of the Master Key. This commit adds a Kconfig symbol that can be
used to setup its value. By default no Master Key is configured and
OpenThread generates a random one.

The Sockets Echo samples are configured with a fixed key with this
commit.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2021-01-26 07:29:10 -05:00
Jukka Rissanen
6136965251 samples: net: syslog: Add info how to manually start net backend
If CONFIG_LOG_BACKEND_NET_AUTOSTART is disabled, then the syslog
network backend is not started automatically. This option is
enabled by default but it might be that application needs to
start the backend manually if the network is slow to start or
some special routes needs to be set by the application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-01-26 07:12:14 -05:00
Hubert Miś
759f7454d8 net: coap: define max token length
This patch introduces COAP_TOKEN_MAX_LEN definition in coap.h file.
This definition replaces magic number across CoAP protocol
implementation and CoAP samples.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-01-26 06:17:41 -05:00
Krzysztof Chruscinski
7f08061f0c logging: Revamp menuconfig
Clean up logging menuconfig by grouping configuration into
sections like: mode, processing configuration, backends.

Additionlly, removed LOG_ENABLE_FANCY_OUTPUT_FORMATTING which is no
longer in use.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-01-26 06:15:42 -05:00
Henrik Brix Andersen
7b9b3cfe5a samples: canbus: canopen: mass-erase flash prior to running sample
Mass-erase the flash prior to running the sample to ensure the storage
partition can be initialized correctly.

Fixes: #30477

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-24 21:22:25 -05:00
Martin Jäger
0520ec814b samples: drivers: adc: add ADC example
This sample shows how to use the ADC API. Depending on the support of
sequential reads in the driver, 1 or 2 channels are read and printed.

A devicetree overlay is necessary to specify the used ADC channel(s).

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-01-23 08:27:46 -05:00
Andrei Gansari
6055f25b13 samples: mpu_test: support for lpc flash driver
Adds support for legacy LPC IAP flash driver.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2021-01-23 08:01:00 -05:00
Maureen Helm
a8d3c8e142 samples: flash_shell: Run on boards without zephyr,flash-controller
The flash shell can now build when there isn't a chosen
zephyr,flash-controller available, so we can simplify the filter to
apply this sample to more boards.

Two STM32 H7 board configurations are excluded because the flash driver
isn't supported yet on the M4 core.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-01-22 11:11:54 -05:00
Maureen Helm
cce08a46c4 samples: fs: Extend littlefs sample to mimxrt1064_evk
Adds the mimxrt1064_evk board to the platform_allow list for the
littlefs sample application.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-01-22 11:11:54 -05:00
Flavio Ceolin
321ce7fb77 power: Use substate-id in pm subsystem
Change subsystem to use struct pm_state with substate-id instead of
using only the power state category.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-22 09:31:20 -05:00
Flavio Ceolin
d21808b0b1 power: Remove residency and states from Kconfig
Residency time and power states are defined using device tree now.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-22 09:31:20 -05:00