Commit graph

10761 commits

Author SHA1 Message Date
Gerard Marull-Paretas
c58243d6ba samples: boards: nrf: battery: fix board in sample commands
The board name used in the zephyr-app-commands directive was the old
name for the Thingy52 board.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-09-23 08:38:44 -04:00
Gerard Marull-Paretas
652f25e094 samples: boards: nrf: battery: fix usage without voltage divider
The nRF battery sample claims that it works without the need of a vbatt
node (voltage divider). However, this was currently not possible because
the sample code did have no means to extract the necessary ADC details
(instance and channel) from Devicetree unless vbatt was present. Similar
to other ADC samples, the zephyr,user node is used to define io-channels
property in this case. The sample README has been updated with an
example of how measurement without a voltage divider can be achieved.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-09-23 08:38:44 -04:00
Gerhard Jörges
67151b930a drivers: ieee802154: remove ieee802154_radio_handle_ack() stub
When using the IEEE802154 radio interface in CONFIG_IEEE802154_RAW_MODE,
there is no way to handle ack frames because of the dummy implementation
of ieee802154_radio_handle_ack() in the ieee802154_radio header file.
Removed the dummy implementation from the header so you can/need to
implement it in the application.

samples: added implementation of ieee802154_radio_handle_ack() to
         wpan_serial and wpanusb sample

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2021-09-21 18:28:25 -04:00
Stephanos Ioannidis
9d7c9ffefd samples: tflite-micro: hello_world: Enable standard C++ library
The TensorFlow Lite module makes use of the features provided by the
standard C++ library (e.g. `#include <functional>`), so the standard
C++ library config must be enabled for it.

This used to work without `CONFIG_LIB_CPLUSPLUS=y` due to the bug
described in the issue #36644.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-09-21 11:39:18 -04:00
Dominik Ermel
6272d303c4 samples/littlefs: Remove FIXME with PRIxPTR usage
With "Incompatible (u)intptr_t type and PRIxPTR definitions",
https://github.com/zephyrproject-rtos/zephyr/issues/37718,
issue resolved the FIXME code is no longer needed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-09-21 06:21:59 -04:00
Erwan Gouriou
123be4f13d samples/posix: eventfd: Prevent run in twister when SRAM below 32K
This test makes use of dynamic RAM allocation done on the leftover
SRAM. Similarly to test/posix/eventfd, limit this test execution on
platforms with at least 32K of RAM available.

Fixes #38601

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-09-20 19:48:34 -04:00
Gerson Fernando Budke
e5ef9ca7a5 samples: net: echo_server: Decrease buffer for atsamr21_xpro
From 2.4 to 2.7 the net samples pair echo-server/client increase the
SRAM requirements. This adjusts example features to free necessary SRAM
to run example.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-09-20 06:01:12 -04:00
Anas Nashif
aebb4b5ed6 samples: i2c: fram: use node label instead of alias
Add more coverage by not using aliases and directly use node label.

Fixes #38154

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-09-17 20:18:47 -04:00
Maciej Perkowski
efc3242140 bugfix: samples: display: Set ft800 sample to be build only
The sample from samples/drivers/misc/ft800/ causes twister to
timeout as it has no pass conditions defiend nor producess any
output that can be verified. What is more, it requires a shield
which is not reflected in the sample.yaml. This fix sets test harness
to display and adds an entry for the required fixture.

Fixes: #38536

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2021-09-16 06:59:27 -04:00
Carles Cufi
6de4747979 Bluetooth: Update terms in public API to spec v5.3
The Bluetooth Core Specification, version 5.3, has introduced multiple
changes to several widely-used terms in order to make them inclusive.
Update the public API to reflect this, excluding hci.h, which will be
done in a subsequent commit.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-15 14:02:50 +03:00
Yong Cong Sin
dfb55e5353 subsys/mgmt/hawkbit: Warning if image is unconfirmed
Add a warning if the image is unconfirmed. Add a delay before rebooting
so that the user knows what happened.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-09-14 12:28:40 -04:00
Yong Cong Sin
dc27d25c4d samples/subsys/mgmt/hawkbit: Update README
Update sample's README for better clarity.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-09-14 12:28:40 -04:00
Yong Cong Sin
8c51d39c9f samples/subsys/mgmt/hawkbit: Print build time
Print build time on boot to differentiate between update.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-09-14 12:28:40 -04:00
Maciej Perkowski
2b78e8b961 bugfix: sample: test: Add pass conditions to audio/dmic sample
Twister was failing for samples/drivers/audio/dmic with timeout
because there were no pass conditions defined. This patch sets
harness to console and adds regex entries to be checked.

Fixes: #38532

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2021-09-14 11:43:42 -04:00
Simon Guinot
d20466d525 samples: led_ws2812: fix dma property in nucleo_f070rb.overlay
Since commit 718c77a4cd ("dts: arm: stm32f0 soc serie has dma of type
V2bis"), the DMA DT cell of STM32F0 MCU has been fixed. It now has three
elements instead of five previously.

This patch fixes the dma property used in nucleo_f070rb.overlay
accordingly.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2021-09-13 11:55:51 -04:00
Daniel Leung
8580f63ad9 samples: philosophers: fix pointer type mismatch for stack fork
When using the stack fork type in the philosophers sample,
there were a few pointer type mismatch since the k_stack_*()
functions are using stack_data_t but the parameters are uint32_t.
So cast them to void pointer to suppress compiler warnings.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-09-09 19:06:38 -04:00
Carles Cufi
0552d329c8 samples: bluetooth: hci_uart: Fix command len calculation
Due to a historical error introduced during an hci_uart refactor, the
get_len() function was using the wrong HCI H4 packet identifier for
commands. Instead of using H4_CMD (0x01) it was trying to match
BT_BUF_CMD (0x00).

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-07 20:47:49 +02:00
Glauber Maroto Ferreira
2b7c0f4ad6 esp32s2: samples: counter: add alarm sample support
by adding esp32s2 board-specific config information.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-09-06 10:02:57 -04:00
Emil Gydesen
c17f28c3d6 Bluetooth: sample: Add ISO support to hci_uart
Add ISO support to the hci_uart sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-06 09:18:58 -04:00
Yuriy Vynnychek
d8f9cc6ffc samples: net: sockets: add tlsr9518adk80d board tests
Added tlsr9518adk80d board support to Echo Client/Server tests.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-09-03 09:58:52 -04:00
Yuriy Vynnychek
ead38a1b35 samples: openthread: fix build fail for tlsr9518adk80d board
- added missed UART1 dts configuration.
- added tlsr9518adk80d board to twister.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-09-03 09:58:52 -04:00
Mateusz Sierszulski
c09dfb3bf6 drivers: fpga controller: add shell support
This adds shell support for FPGA drivers.

Signed-off-by: Mateusz Sierszulski <msierszulski@internships.antmicro.com>
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2021-09-03 09:54:00 -04:00
Mateusz Sierszulski
a64ce1fc6b drivers: fpga controller: add eos_s3 fpga driver
This adds driver for EOS_S3 SoC FPGA.

Signed-off-by: Mateusz Sierszulski <msierszulski@internships.antmicro.com>
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2021-09-03 09:54:00 -04:00
Katsuhiro Suzuki
ffdd60675e samples: jesd216: Exclude hifive_unleashed and unmatched boards
The HiFive Unleashed and HiFive Unmatched boards do not enable the
SPI0 controller that the flash is connected to. This test will not
build on these platforms because SPI0 bus controller is missing.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2021-09-03 09:52:26 -04:00
Katsuhiro Suzuki
4f0c7141b3 samples: drivers: spi_flash: fix printf warning on 64bit environment
This patch fixes printf format specifier "%u" -> "%zu" for printing
an argument of size_t on 64bit environment.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2021-09-03 09:52:26 -04:00
Andrzej Głąbek
1518cc8337 samples: drivers: Add simple application showing how to use DMIC API
Add a very simple application intended to show how to use the Audio
DMIC API and also to be an aid in developing drivers to implement
this API.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-09-03 09:34:06 -04:00
Andy Ross
97fb8fa869 samples/net/sockets: Exclude intel_adsp boards
These are getting build failures due to some kind of devicetree
console definition missing.  These devices don't do networking, and
strictly don't even have a proper console device (logging is done via
a host mechanism).  Probably fixable.  Not worth the trouble.  Filter.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-09-03 07:19:34 -04:00
Nikolai Kondrashov
77ee1f02aa doc: Fix a few typos in docs/comments/messages
Fix two typos in documentation, one in a sample's comment, and one in a
sample's console message. Found while learning Zephyr and exploring the
sources.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-09-03 06:06:59 -04:00
Emil Gydesen
bebfdaf88b Bluetooth: samples: Improve disconnect handling iso_connected_benchmark
Improve the disconnect handling in the sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-02 19:37:28 -04:00
Emil Gydesen
84ac32e32d Bluetooth: samples: Improve disconnect handling in central_iso
Improve the disconnect handling in the sample, and
avoid creating a new cig for each connection.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-02 19:37:28 -04:00
Emil Gydesen
891d838140 Bluetooth: samples: Fix iso_connected_benchmark disconnect
The disconnect handling of ACL connects in the sample was done
incorrect, and caused a call to bt_conn_unref with a NULL
pointer.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-02 19:37:28 -04:00
Lingao Meng
34a1d676c9 samples: bluetooth: Fix scan filter
We should use no filter filter to process adv data
according to code comment above.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-09-02 19:35:26 -04:00
Christopher Friedt
650b111ba5 drivers: flash: Kconfig.sam: -depends on and +dfu sample exclude
The additional depends on SOC_FAMILY_SAM was redundant.

Add sam4l_ek to dfu sample exclude since it was failing on
arduino_due.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-09-02 13:23:47 -04:00
Bradley Bolen
bdc80ebe16 samples: tracing: Add a sample for tracing_user
The user tracing backend allows one to implement weak symbols to perform
user specific tracing, e.g gpio toggling or spi transactions.  This adds
a qemu sample that just does a simple printk for each of the traced
functions, but could be changed to do whatever function the user
desires.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2021-09-02 06:54:35 -04:00
Gerson Fernando Budke
3d85dd8cdc samples: drivers: adc: Add sam0 boards overlays
Add sam0 boards overlays to demostrate how to configure io-channels.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-09-02 06:45:35 -04:00
Mahesh Mahadevan
8b3e15523e samples: websocket_client: Run only when netif is enabled
Add depends_on: netif to prevent running on boards that
do not have netif enabled

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-09-01 14:39:03 -04:00
Emil Gydesen
93bfe7a2c9 Bluetooth: ISO: Update BIS index to start from 0x01
The HCI spec defines the BIS index range as starting from
index 0x01. We had previously implemented it such that it
starts from 0x00, and then simply adding 1 to the index
when sending over HCI. However, this may cause issue with
other HCI, or other SIG defined specification, commands
and events, and thus it is probably simpler if we just
use the HCI defined range.

This commit disallows BIT(0) (representing the BIS
index 0x00) to be set, and removes the addition
of 1 when sending over HCI.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-01 10:57:07 -04:00
Waqas Mazhar
33d4ac43e6 samples: basic: blinky_pwm: Add support for nucleo_wb55rg platform
Create a board overlay file in the application directory to add
pwm-led0 entry over default device tree. Also, include instruction
in the README file that connection of external LED at pin PA8 is
required for the demo to work.

Signed-off-by: Waqas Mazhar <waqas.mazhar@planetinnovation.com.au>
2021-08-31 19:56:22 -04:00
Yong Cong Sin
9d2f8a1124 drivers: modem: gsm_ppp: Use DTS
Convert the gsm_ppp driver to use DTS.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-08-31 17:33:34 -04:00
Gerson Fernando Budke
b6c2ae8048 samples: philosophers: Enable thread awareness
Enable thread awareness by default on philosophers sample.  It shows
gdb debugging output using the feature as reference.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-08-30 13:18:04 -04:00
Iuliana Prodan
a5fdf26ca0 samples/subsys/audio/sof: add configuration for imx board
Add support for i.MX8, which represents i.MX8QM board.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-08-28 23:27:02 -04:00
Andrzej Kaczmarek
f353202eb7 Bluetooth: Controller: Fix DF for per adv chains scanning
This updates DF to properly receive CTE in per adv chains scanning.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-08-27 11:46:31 -04:00
Emil Gydesen
8490508b59 Bluetooth: ISO: Make ISO/ACL bt_conn pointers clear in ISO API
Update the name of the bt_conn pointers to make it clear
whether the connection pointers are ACL or ISO connections.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-27 11:46:07 -04:00
Emil Gydesen
ed46180ab8 Bluetooth: samples: Update iso parameter check in iso_broadcast_benchmark
Update the iso parameter value checks from using literals to
the defined #defines.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-27 09:34:43 -04:00
Emil Gydesen
90eb48b111 Bluetooth: samples: Update iso parameter check in iso_connected_benchmark
Update the iso parameter value checks from using literals to
the defined #defines.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-27 09:34:43 -04:00
Carlo Caione
0c2dabb4b9 ipc: rpmsg_multi_instance: Rework instance tracking
This patch is the first step to make the rpmsg_multi_instance usable in
a multi-core scenario.

The current driver is using a local driver variable (instance) to track
the number of allocated instances. This counter is practically used to
allocate to the instance the correct portion of the shared memory.

This is fundamentally wrong because this is assuming that it does exist
only one single shared memory region to split amongs all the allocated
instances.  When the platform has more than one core this is obviously
not the case since each couple of cores are communicating using a
different memory region.

To solve this issue we introduce a new struct rpmsg_mi_ctx_shm_cfg that
is doing two things: (1) it's carrying the information about the shared
memory and (2) it's carrying an internal variable used to track the
instances allocated in that region. The same struct should be used every
time a new instance is allocated in the same shared memory region.

We also fix a problem with the current code where there is a race
between threads when accessing the instance variable, so this patch is
adding a serializing mutex.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-08-27 06:44:08 -04:00
Carlo Caione
66fb1bc2bc ipc: rpmsg_multi_instance: Use only rpsmg_mi_ctx_cfg for configuration
For the instance configuration the rpmsg_multi_instance code is
currently using a set of configuration info coming from two different
sources: the rpsmg_mi_ctx_cfg struct and Kconfig.

This is not only confusing but it's preventing to configure the
instances using information not coming from Kconfig (for example if we
want to configure the instance using DT).

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-08-27 06:44:08 -04:00
Daniel Leung
fa3267165c samples: prod_consumer: don't reuse main stack for app_b
With demand paging, the main stack is not user mode capable
and it would fail k_thread_user_mode_enter() under
app_b_entry(). So create another thread and stack for app_b
as this stack can be used in user mode.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-08-26 21:16:22 -04:00
Piotr Pryga
50a2cdd75a samples: Bluetooth: df: Enable TX of mutliple CTEs in a per adv event
Since periodic advertising chains are available there is
a possibility to send multiple PDUs including CTE in
a periodic advertising event.

This commit enables such functionality in direction finding
transmitter sample.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-26 18:25:35 -04:00
Piotr Mienkowski
437f7f9d45 samples: enable support for Atmel SAM DAC driver
Enable support for Atmel SAM DAC driver on the following boards:
- sam_e70_xplained
- sam_e70b_xplained
- sam_v71_xult
- sam_v71b_xult

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-08-26 16:46:16 -04:00