Commit graph

9378 commits

Author SHA1 Message Date
1c7e50ce39 juju: DNS: tweak the MPU6050 sample to work on the ch32v003
Signed-off-by: Michael Hope <mlhx@google.com>
2024-07-21 14:03:23 +00:00
c586a12acd samples: adc_dt: add a ch32v003evt overlay that reads the built-in channels
Signed-off-by: Michael Hope <mlhx@google.com>
2024-07-21 14:03:23 +00:00
a43e97b557 samples: watchdog: add the ch32v003evt to the sample 2024-07-21 14:03:22 +00:00
9e966fc385 samples: blinky: mark as suitable for low flash, low RAM devices
Signed-off-by: Michael Hope <mlhx@google.com>
2024-07-21 14:03:22 +00:00
Benjamin Cabé
c25ee8bb38 doc: shields: make section IDs consistent with shield name
Convention is to name RST section the same as the shield

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-20 10:18:54 +02:00
Swift Tian
45d39f3b7c samples: drivers: mspi: Update readme doc
Update mspi samples readme to match with code and release doc.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-07-18 09:32:29 +02:00
Tom Burdick
9f85a70a04 doc: Revamp sensor docs
Docs now start at a high level, discussing sensors, attributes,
channels, and reading data from them.

Followed by more detailed usage guides in how to solve common problems
sensor users may run into.

Additionally renames the sensor_api sphinx tag to sensor

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-16 16:49:24 -04:00
Jordan Yates
46167e3234 samples: tfm: add build_config sample
Add a sample that can test various TF-M build options. For now we only
test `CONFIG_TFM_BL2=n` and `CONFIG_TFM_MCUBOOT_IMAGE_NUMBER=1`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-12 20:38:49 -04:00
Anas Nashif
ec71e04cdb samples: env_posix: fix regex in sample test
ALERT is empty, so do not try to match any content.

Fixes #72858

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-12 09:18:56 -04:00
Gerard Marull-Paretas
b5e5aa3335 samples: ipc: icmsg: fix unbalanced nRF53 cpunet enable calls
It looks like sample called nrf53_cpunet_enable(false) before any
nrf53_cpunet_enable(true), resulting in asserts due to unbalanced calls
(error propagated from onoff service).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 09:15:06 -04:00
Gerard Marull-Paretas
e41ab1ab14 samples: drivers: mbox: fix regex when using channels 0/1
The sample will print a ping-pong message indefinitely on both,
application (or main) core and remote core. When twister is run in
device testing mode, only one terminal is evaluated (application), so
the regex just needs to account for the application core output, not
remote.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-12 06:23:52 -04:00
Anas Nashif
47f327f081 tests: add openamp tags to openamp samples
tag samples with openamp.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-11 18:53:49 -04:00
Evgeniy Paltsev
67efbf3d57 samples: posix: env: fix failure in case of minimal libc is used
In case of minimal libc we have CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE = 0
by default. Let's set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE explicitly
so we can allocate memory for environment variables.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-07-11 13:24:02 -04:00
Jonathan Rico
4afe745a1d Bluetooth: host: Add lower bound for CONFIG_BT_BUF_ACL_RX_COUNT
See comment above assert for more.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-10 11:47:26 -04:00
Johann Fischer
c9c35fa59f samples: usb: fix API references
Remove references to new device APIs that are not supported by the
samples. Remove the reference to the UART API from the console sample
because it is not really used there, but add it to the CDC ACM sample.
Fix references in HID, MSC and UAC2 samples.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-10 14:36:46 +02:00
Natalia Pluta
c9f9c144e9 samples: net: cellular_modem: fix division by zero in sample_echo_packet
A hard fault occurs when the `sample_echo_packet` function attempts
to print the average time per successful echo and no packets have
been sent, resulting in a division by zero error. This fix adds a check
to ensure that `packets_sent` is greater than 0 before performing
the division. This prevents the system from halting due to a usage fault.

Signed-off-by: Natalia Pluta <pluta.natalia.m@gmail.com>
2024-07-10 11:37:44 +02:00
Jukka Rissanen
794d7cf3c5 net: sockets: Remove async service support
As found in PR #75525, we should not modify the polled fd array
in multiple places. Because of this fix, the async version of
the socket service could start to trigger while it is being handled
by the async handler. This basically means that the async version
cannot work as intended so remove its support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-10 11:36:59 +02:00
Rahul Goyal
74c86928b2 Samples: max17048: added units to output
present sample output does not contain units.
added units to sample output

Signed-off-by: Rahul Goyal <goyalrahul1516@gmail.com>
2024-07-10 11:36:28 +02:00
Thomas Stranger
48e235445b samples: sensor: ds18b20: clearly indicate any errors
Any errors are clearly indicated and program execution
ended.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Guy Morand
0c9858879c samples: logging: disable usermode for some platforms
Those platfroms use rtt as debug port that conflicts with usermode, as
in 27d519b260.

Fixes #75617

Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
2024-07-09 15:20:34 -04:00
Johann Fischer
67a31ef2d7 samples: hid-mouse: protect report buffer
Use the message queue to pass the new report from the input callback,
and use a semaphore to protect the report buffer until it is transferred
to the host.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-09 12:05:04 +02:00
Zhaoxiang Jin
599fddc867 tests: Add frdm_mcxn947 into regulator and adc test scope
Add frdm_mcxn947 into regulator and adc test scope

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-07-08 14:57:55 -04:00
Alberto Escolar Piedras
65fb6264cb samples/drivers/adc/adc_sequence: Build fix for sam_v71_xult
Fix build error due to cmake requiring a separate
overlay for each of this target's SOCs.

Error being fixed:
```
-- Board: sam_v71_xult, qualifiers: samv71q21
CMake Error at cmake/modules/extensions.cmake:2742 (message):
Board sam_v71_xult defines multiple SoCs.

Shortened file name (sam_v71_xult.overlay) not allowed, use
'<board>_<soc>.overlay' naming
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-08 14:55:15 -04:00
Johann Fischer
48dd5c9915 sample: usb: allow samples to be built on all platforms with 'usbd'
Replace platform_allow with integration_platforms, what allow CI to
build samples on all platforms with test feature 'usbd' but still limits
number of platforms when it is invoked with the --integration option.
Replace/add some platforms that already have test feature 'usbd'.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-08 12:13:54 -04:00
Jens Rehhoff Thomsen
efddc8723c Bluetooth samples: Broadcast code handling
The broadcast sink sample no longer treats the broadcast_code_received
semaphore as a boolean.

Fixes #75469

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-07-08 12:12:54 -04:00
Nazar Palamar
b55999d3de samples: bluetooth: exclude cyw920829m2evk_02 from build
exclude cyw920829m2evk_02 from build. For cyw920829m2evk_02
need `west bloobs fetch` (to get BT fw),  which does not
allowed in CI.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-07-08 15:51:21 +02:00
Mark Wang
0141bc0f40 sample: usb: mass: add next device sdcard test case
update the sample.yaml file.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-07-08 09:28:41 +02:00
Robert Lubos
e91c47d338 samples: net: zperf: Optimize configuration for better performance
Increase the number of network packets and buffers for better TCP
performance in the sample out-of-the-box.
Decrease the network buffer data size for better buffer management in
the sample (less buffer space wasted for L2 header). The only drawback
of this is reduced TCP TX performance, but less than 2 Mbps in my case.
Finally, enable speed optimizations for another small performance boost.

As the RAM requirements of the sample now increase considerably in the
default configuration, add a note in the readme file about it, and how
to make it fit into smaller boards.

Tested on nucleo_h723zg:
  Before (current defaults):
    UDP      TX          RX
         76.47 Mbps  93.48 Mbps
    TCP      TX          RX
         76.18 Mbps  67.75 Mbps

  After (new defaults):
    UDP      TX          RX
         76.08 Mbps  93.62 Mbps
    TCP      TX          RX
         74.19 Mbps  85.51 Mbps

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-06 17:03:01 +02:00
Emil Gydesen
08b9ca4356 samples: Bluetooth: central_iso: Remove K_FOREVER for buf alloc
Allocating a buffer in the system workqueue thread should never
be done wiht a K_FOREVER as that may block the thread forever.

Replace the K_FOREVER with a K_NO_WAIT and slightly modified
the function to handle this case.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-06 17:01:34 +02:00
Erwan Gouriou
e4b03b79e6 samples: stm32: i2c_timing: Fix README header
Move sample README header to the new format designed for cross reference.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-07-04 18:00:16 +02:00
Alberto Escolar Piedras
1a1032de48 samples/net/dhcpv4_client: Exclude native_posix due to EVENTFD
EVENTFD is not anymore compatible with these targets so let's
disable them with this sample to avoid a failure in twister
otherwise.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-04 17:59:34 +02:00
Henrik Brix Andersen
ec601b89df doc: update documentation to use the --shield west build command arg
Update zephyr-app-commands to generate "west build --shield ..." for west
invocations using shields while still generating "cmake .. -DSHIELD=..."
if the tool is set to "cmake".

Updated the various shield documentation pages to recommend using
"--shields" over "-DSHIELD" to match the results of the corresponding
zephyr-app-commands code snippets.

Add proper support to zephyr-app-commands for specifying multiple shields
(using a comma-separated list) and fix a few invocations to use this.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-04 13:25:00 +02:00
Jeppe Odgaard
7e22942078 samples: modules: canopennode: add bootloader argument
The README "Testing CANopen Program Download" section needs a sysbuild
MCUboot option. Otherwise only the application is built and the test will
fail.

This has probably been missing since commit
238d113185.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-07-03 15:22:01 +02:00
Robert Lubos
71f668d1f3 samples: net: dhcpv4_client: Enable DNS in the sample
The DHCP server can distribute DNS addresses, hence enable DNS resolver
in the sample to show this functionality.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-02 14:17:16 +02:00
Robert Lubos
28ed03afc4 samples: net: dhcpv4_client: Replace example DHCP server with kea
Currently used DHCP server in the sample, dhcpd, is no longer maintained
and reached EOL. Therefore, update the sample's readme file with a
sample configuration for its successor, kea.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-02 14:17:16 +02:00
Sreeram Tatapudi
28b03b86b7 samples: bluetooth: Update samples to support cyw920829m2evk_02
Update bluetooth projects to support cyw920829m2evk_02 platform

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Gerson Fernando Budke
768b8bbca3 scripts: west robot & simulation: Fix OOT
The current version of scipts do not consider OOT boards use cases and
the tests with robot now are strict to only one robot file, which is
not realistic for real environment. This address those issues and allow
multiple testsuits at command line and lists at tests entries. It add
another test parameter to allow configure robotframework options.

Fixes: #74563

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2024-07-01 16:10:35 -04:00
Jukka Rissanen
c95f61f688 samples: net: txtime: Do not run qemu_x86 with twister
The txtime can be run manually with qemu_x86 but it is enough
to have native_sim compiled with twister.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
ba88c50fb3 samples: net: txtime: Add e1000 overlay for qemu_x86
This allows user to run the sample in qemu_x86.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
d9703934f1 samples: net: txtime: Add support for native_sim board
native_sim needs to enable PTP clock support

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jukka Rissanen
d121e88390 samples: net: txtime: The option type should be int
When setting boolean options using setsockopt(), the option
type should be int as the size of the option type is checked
and only int is accepted.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-29 05:50:04 -04:00
Jamie McCrae
88f30f3f51 samples: Use DEFAULT_IMAGE for sysbuild
Uses the variable for the default image when adding sysbuild
dependencies so that they can be copied out-of-tree and still work

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-28 20:54:25 -04:00
Johann Fischer
88c2476136 samples: usb: mass: increase main stack size
"ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0" observed on a few
supported platforms when using SD card disk. Increase main stack size
for next USB device stack configuration to prevent stack overflow.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-28 20:54:01 -04:00
Sebastian Głąb
c6ef6941a3 samples: drivers: mbox: Extend mbox sample
Print on what board/core sample is executing.

Print how many bytes of data can be sent
in the mbox message (show use of mbox_mtu_get_dt()).

Print how many channels are available for incoming and/or
outgoing messages (show use of mbox_max_channels_get_dt()).

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-28 12:21:55 -04:00
Sebastian Głąb
92b0d6dda5 samples: drivers: mbox: Fix overlays for nrf54h20
Add sample configuration 'nrf54h20_app_ppr' where:
- cpuapp sends messages to cpuppr vevif channel 15,
- cpuppr sends messages to cpuapp bellboard channel 18.

Add sample configuration 'nrf54h20_rad_app' where:
- cpuapp sends messages to cpurad bellboard channel 12,
- cpurad sends messages to cpuapp bellboard channel 18.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-28 12:21:55 -04:00
Jordan Yates
08eab876d8 samples: tflite-micro: add REQUIRES_FLOAT_PRINTF
Add `CONFIG_REQUIRES_FLOAT_PRINTF=y` to tflite-micro samples as in the
past the module was using its own `printf` implementation, but now uses
our logging infrastructure.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
91f8c1aea9 everywhere: replace #if IS_ENABLED() as per docs
Replace `#if IS_ENABLED()` with `#if defined()` as recommended by the
documentation of `IS_ENABLED`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:20:32 -04:00
Jordan Yates
cf870e8350 bluetooth: correct bt_le_scan_param scan type
The `type` parameter of `struct bt_le_scan_param` is documented as
taking a `BT_LE_SCAN_TYPE_*` value, not a `BT_HCI_LE_SCAN_*` value.

In practice this makes no difference as the values are defined as the
same integer, but does result in `<zephyr/bluetooth/hci.h>` not needing
to be included.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 11:34:36 +02:00
Robert Lubos
125f1f593e samples: net: zperf: Fix sample performance issues
Sockets service thread need to be cooperative for best performance.

Enable CACHE_MANAGEMENT as some boards don't do it by default, it has
devastating impact on the performance as well.

Finally, increase FDS count, so that uploads still work when both TCP
and UDP receiver are enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-27 08:47:26 -04:00
Jordan Yates
243eb36b18 everywhere: reindent .overlay files with tabs
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-26 15:59:44 +02:00