Commit graph

10761 commits

Author SHA1 Message Date
Seppo Takalo
8e3fc793d3 samples: net: lwm2m_client: Use Ethernet in QEMU Cortex-M3
By default, qemu_coxtex_m3 target selected SLIP driver as
a network backend. This requires some unstandard tool (tunslip6),
which are error prone and might not necessary work.
Ethernet backend work equally well as in native_posix so
use the same for both.

Change the default emulation platform from X86 to Cortex-M3
because it supports Ethernet by default.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-01-24 14:35:14 +00:00
Manuel Arguelles
df1d148abc samples: boards: nxp_s32: add sample for NETC
The sample application shows how to configure NXP S32 Network Controller
(NETC) for different use-cases.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-01-24 14:37:20 +01:00
Kumar Gala
8f04408725 tests: Add newlib filter for some testcases that dont have it
Not all toolchains support newlib so tests that require newlib need
to have a filter to we don't try and build those tests on those
testcases.  Some newer tests are missing:

	filter: TOOLCHAIN_HAS_NEWLIB == 1

so add that to testcases that needed.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-01-24 11:10:27 +00:00
Emil Gydesen
1af16d896c samples: Bluetooth: Broadcast audio source add packing field
Set the packing field when creating the broadcast source. This
is currently missing, and in uninitialized.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-24 09:44:09 +01:00
Quang Bui Trong
ad19019b29 samples: watchdog: board s32z270dc2_r52 only build and not running
Currently, the s32z270dc2_r52 board only supports running on RAM,
 so samples or tests watchdogs that perform SoC reset will not produce
 results. Set the build only for these samples and tests until the
 reset SoC function is supported.

Signed-off-by: Quang Bui Trong <quang.buitrong@nxp.com>
2023-01-23 11:46:43 -08:00
Francois Ramu
e9f77f1ecf samples: drivers: use stm32 dma driver binding macro to configure channel
Use the macro as defined by the
include/zephyr/dt-bindings/dma/stm32_dma.h to configure the
dma channel.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-23 09:15:21 -06:00
Gerson Fernando Budke
647c48c574 mgmt: updatehub: Add userspace syscalls
The current updatehub version forces user application to run in kernel
mode. This add necessary api syscalls to isolate userspace from kernel.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-23 10:24:07 +00:00
Gerson Fernando Budke
000257dad0 mgmt: updatehub: Move updatehub.h to header directory
This moves updatehub.h file from subsys to public header include
folder.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-23 10:24:07 +00:00
Martin Jäger
5dd50f9232 samples: subsys: lorawan: class_a: add clock sync option
Add an option to build the sample with application-layer clock sync
service running in the background.

This will also add a build-check for the clock sync service in CI.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-01-23 10:05:49 +00:00
Martin Jäger
5b4920c81b samples: subsys: lorawan: class_a: add documentation
Add a README for the LoRaWAN sample.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-01-23 10:05:49 +00:00
Andrzej Głąbek
8115fc2e9f samples: spi_bitbang: Use gpio_loopback pins for MOSI and MISO
Align pins that are required to be shorted for this sample on
nRF52840 DK with those used in e.g. uart driver tests.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-20 13:28:27 +01:00
Dominik Ermel
26d32bdd48 sampes/smp_svr: Bring back UART shell when using BT transport
Adding configuration options to bring old behaviour where
UART shell have been available when overlay-bt.conf has been
used for building sample.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-01-20 11:58:30 +01:00
Keith Packard
35e017a9ee subsys/cpp: Also run C++ tests with picolibc when possible
When the toolchain has picolibc support, run
samples/subsys/cpp/cpp_synchronization and tests/subsys/cpp/libcxx tests
using it.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-20 09:03:25 +01:00
Henrik Brix Andersen
03ac89d75b samples: canbus: isotp: add missing isotp tag
Add missing "isotp" tag to the CAN bus ISO-TP sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-19 16:49:10 -08:00
TOKITA Hiroshi
b70d399a34 samples: sensor: Add CPU temperature monitor sample
Add a polling sample for CPU temperature monitor.
This sample demonstrates how to data fetch and print to the console.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-19 15:32:41 -06:00
Ederson de Souza
7965fd2b4a samples/boards/intel_adsp: Make sample work with twister
sample.yaml was missing a tests section, making it unable to run with
twister. This patch adds the section.

While at that, fix an issue in the sample README.rst.

Fixes #53656.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2023-01-19 09:17:06 -08:00
Robert Lubos
340e7c9f79 samples: net: big_http_download: Fix POSIX compability
The sample documentation mentions that the sample can be built directly
on Linux, which was no longer the case. This commit fixes it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-19 11:17:38 +01:00
Robert Lubos
2a02f4f9a9 samples: net: big_http_download: Update URL for TLS download
The old link has expired, the file is no longer avaiable to download.

Update the download link, which now leads to a file in Ubuntu
repositories for the recent LTS release, hopefully making the link valid
for longer period.

As the server ceritficate is signed by a different root CA, update the
root CA as well.

Finally, cleanup how the URL is handled in the sample - for TLS variant
it'll always be provided with a Kconfig, hence no need to repeat it in
the sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-19 11:17:38 +01:00
Robert Lubos
1c911904d5 samples: net: big_http_download: Add minimal support for redirect
It's often the case with TLS file servers, that the download link does
not lead to downloaded file, but rather redirects to another server.
Therefore it makes sense to have a minimal support in the sample for
HTTP redirection, so that the file can still be downloaded.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-19 11:17:38 +01:00
Martin Jäger
aef8419e9e samples: basic: custom devicetree binding demo
This sample shows how to define a custom devicetree binding to use
GPIO pins for a specific purpose.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-01-19 10:16:34 +01:00
Jarno Lämsä
6dfe7e2458 samples: net: lwm2m_client: Replace deprecated calls
Replace calls to deprecated functions with new ones.

Signed-off-by: Jarno Lämsä <jarno.lamsa@nordicsemi.no>
2023-01-19 10:16:22 +01:00
Mariusz Skamra
18ab7ebf22 samples: unicast_audio_client: Fix enabling the streams
This fixes the application that was not waiting for QoS configuration of
all streams in the group. The QoS operation is done on group of streams,
while the status of each one of the streams is received separately.
Meaning that the application has to control which streams were already
configured before enabling them.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-01-18 09:56:52 +01:00
Mariusz Skamra
36058480e7 Bluetooth: audio: Improve stream coupling for CIS as the unicast client
Allow  the streams to be paired when creating unicast group. This will
allow to reuse the same ISO for the paired streams.

Fixes: #51796
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-01-18 09:56:52 +01:00
Daniel DeGrasse
47271ce8be treewide: update usage of zephyr_code_relocate
Update usage of zephyr_code_relocate to follow new API. The old method
of relocating a file was the following directive:

zephyr_code_relocate(file location)

The new API for zephyr_code_relocate uses the following directive:

zephyr_code_relocate(FILES file LOCATION location)

update in tree usage to follow this model. Also, update the NXP HAL SHA,
as NXP's HAL uses this macro as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-17 18:08:37 +01:00
Emil Gydesen
4db60883db samples: Bluetooth: Unicast audio server: Add missing supported contexts
Add missing calls to setting supported contexts.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-17 13:17:03 +01:00
Théo Battrel
4314480826 Bluetooth: Update Readme of large MTU sample
Update the Readme file of the large mtu sample because the orginal PR
(https://github.com/zephyrproject-rtos/zephyr/pull/53593) has been merged
before the last comment could be addressed.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-01-16 16:51:42 +01:00
Emil Gydesen
a1bb9c9d17 Samples: Bluetooth: hci_rpmsg add missing platform_allow
Add nrf5340_audio_dk_nrf5340_cpunet to the platform_allow
as having it only in integration_platforms causes issues
with the CI system.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-16 21:32:22 +09:00
Jamie McCrae
fa3c6fdc28 samples: mgmt: mcumgr: Select required symbols
Select required dependency symbolds for the various transports.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-16 10:04:45 +01:00
Théo Battrel
00a4a0720f Bluetooth: Update README of MTU update sample
Update the README to add more informations on MTUs. Also add a diagram of
the different MTU and Kconfig symbols in the Host.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-01-16 10:01:27 +01:00
Théo Battrel
7e23294bc5 Bluetooth: Add a sample to demonstrate MTU update
Add a new sample that demonstrate how to exchange MTU to allow larger
packet transmission.

The sample is split in two applications. One is the Central, it will
initiate the MTU exchange. The other one is the Peripheral and will try to
send a large notification. If the MTU exchange fail or the new size is not
big enough, the Peripheral will not be able to send the notification.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-01-16 10:01:27 +01:00
YuLong Yao
1dd0ffbe40 Revert "samples: jesd216: add support for gd32a503v_eval board"
This reverts commit 0f28a8d120.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-16 09:42:28 +01:00
Andrzej Głąbek
507f4b31d1 samples: drivers: w1: Enable arduino_i2c and arduino_serial explicitly
This sample uses the arduino_i2c and arduino_serial DT nodes, so it
should enable them explicitly, not assume they will be enabled by
default for a given board.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-16 09:26:10 +01:00
Andrzej Głąbek
569136a04b samples: net: openthread: coprocessor: Enable uart1 explicitly
This application uses the uart1 DT node, so it should enable it,
not assume that it will be enabled by default for a given board.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-16 09:26:10 +01:00
Stephanos Ioannidis
cf211aa7af treewide: Update deprecated CONFIG_LIB_CPLUSPLUS usages
This commit updates all deprecated `CONFIG_LIB_CPLUSPLUS` usages to:

* check if the Zephyr minimal C++ library is enabled using
  `CONFIG_MINIMAL_LIBCPP` instead of relying on the
  `CONFIG_LIB_CPLUSPLUS`-based inference.

* select `CONFIG_REQUIRES_FULL_LIBCPP` when there exists a component-
  level C++ standard library dependency. This allows a component to
  declare C++ standard library dependency without designating a
  specific libray implementation.

* select the correct type of C++ standard library implementation to use
  through one of the `CONFIG_LIBCPP_IMPLEMENTATION` choices.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Stephanos Ioannidis
4a64bfe351 treewide: Use CONFIG_CPP instead of CONFIG_CPLUSPLUS
This commit updates all in-tree code to use `CONFIG_CPP` instead of
`CONFIG_CPLUSPLUS`, which is now deprecated.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Stephanos Ioannidis
8c94410022 samples: cpp: Relocate samples/subsys/cpp to samples/cpp
This commit moves the C++ samples under `samples/subsys/cpp` to
`samples/cpp` because the C++ language and standard library support is
not a "subsystem" (aka. API) in conventional sense and the samples
demonstrating them should belong directly under the top samples
directory as does POSIX support.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Kristoffer Rist Skøien
f0c12dbb82 boards: Added nRF5340 Audio DK (PCA10121)
Copied from nRF Connect SDK and edited
Co-authored-by: Grzegorz Ferenc

Signed-off-by: Kristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
2023-01-13 16:14:35 +01:00
Henrik Brix Andersen
c0fb33ab8d samples: modules: canopennode: convert to sysbuild
Convert the CANopenNode sample to use sysbuild for generating MCUboot +
CANopenNode sample binaries instead of using manual instructions.

Rework the twister sample filtering to just list the known good boards.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-13 14:05:40 +01:00
Pascal Brogle
b6bc324a1d net: lwm2m: rename path size define
Rename max path constant to prevent string length vs data size confusion

Signed-off-by: Pascal Brogle <pascal.brogle@husqvarnagroup.com>
2023-01-13 12:02:07 +00:00
YuLong Yao
6a8a27ee78 samples: adc: add support for gd32a503v_eval board.
add support for gd32a503v_eval board.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao
0f28a8d120 samples: jesd216: add support for gd32a503v_eval board
add support for gd32a503v_eval board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao
272aa129fa samples: spi_flash: add support for gd32a503v_eval board
add support for gd32a503v_eval board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao
ba1af141c1 samples: drivers: dac: add support for gd32a50x
add support for gd32a50x

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
Gerson Fernando Budke
eb39f1f12e mgmt: updatehub: Clean-up mcuboot & system dependencies
Currently MCUboot and system reset are invoked directly in the sample
applicatiion. This introduce 2 new methods to isolate system from
application.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-12 12:11:31 +01:00
Siddharth Chandrasekaran
73809472f8 mgmt/osdp: Add support for event delivery and notifications
The CP app sends PD a "command" and the PD responds to it. Some times,
the PD has something that it wants to tell the PD which it does so in
response to POLL command. Both CP and PD apps need a way to exchange
these info over the OSDP bus. To archive this we will introduce what are
called "events" that allow the PD app to enqueue and CP app to get
notified.

This is analogous to the incumbent "commands" abstraction where, the CP
app enqueues a command and the PD app gets notified of it.

Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2023-01-12 12:04:11 +01:00
Sam Hurst
6984162e92 samples: subsys: usb_c: sink: Add USBC_CSM_SINK_ONLY Config to prj.conf
Add CONFIG_USBC_CSM_SINK_ONLY=y to Sink's sample prj.conf.
This selects the Sink only Connection state machine
for the Sink sample and it explicitly show the user
of the Sink sample how the connection state machines are
selected.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-01-11 18:32:43 +01:00
TOKITA Hiroshi
fed4e1857f boards: gd32f450i_eval: Enable DMA transfer for nor-flash
Enable DMA transfer via SPI bus for nor-flash.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-01-11 08:50:56 -08:00
Christopher Friedt
85b44f0ed7 samples: posix: gettimeofday: include time.h
Due to some previous time-related header issues, we included
`<sys/time.h>` without including `<time.h>`. The latter is
necessary for `time()` (specified by both ISO C and POSIX).

Fixes #53673

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-01-11 09:41:29 +01:00
Tom Burdick
36d8c1b7f7 samples: Remove platform filters for external_lib
Instead prefer to add the tag to ignored tags in the board yaml
where its clearer for both cavs25 and other cavs/ace boards what
to ignore even if duplicated.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Tom Burdick
c0435dbbb4 samples: Replace dmic tag with lower case
Replaces the capitalized DMIC tag with dmic as tags in Zephyr are by
convention lower case.

Was unexpectedly building this sample for intel boards while ignoring
dmic (lower case tag).

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00