Commit graph

9345 commits

Author SHA1 Message Date
Francois Ramu 9e13290f8b boards: arm: stm32 boards has qspi nor flash node
Define the reg and size property for the stm32 boards with qspi inside
Refer to the dts/bindings/flash_controller/st,stm32-ospi-nor.yaml.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-02-02 13:48:18 +01:00
Jukka Rissanen 508a261286 log: net: Convert syslog network transmitter to use sockets
Convert the network log backend to use socket API instead of
net_context API. This allows the backend to be used also
with socket offloading network drivers.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-01 10:22:47 -06:00
Luis Ubieda 2745f6a885 samples: bluetooth: Added sample for Extended Advertisements
Both advertiser and scanner demonstrate the use of extended advertising
and scanning, and how to gracefully restart the extended advertisements
through the use of recycle() callback. In the sample, the advertiser
initiates a connectable advertisement set, which prompts the scanner to
connect. After the connection is established, the advertiser waits for
5 seconds to disconnect. After the connection is dropped, the advertiser
immediately restarts broadcasting, while the scanner cools-down for
5 seconds to restart its process.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-02-01 14:31:27 +00:00
Tomasz Moń f00f846fe3 samples: usb: add UAC2 explicit feedback sample
The sample illustrates how to calculate feedback value based on I2S
sample clock measurement or indirect I2S FRAMESTART and USBD SOF.
The sample is currently only supported on nrf5340dk_nrf5340_cpuapp
target because the feedback measurement uses target specific
peripherals.

While it should be possible to perform feedback value calculation
entirely in software (possibly with some additional filtering due
to software scheduling jitter), the I2S API does not provide necessary
timestamps.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-02-01 15:07:37 +01:00
Tomasz Moń c83ad53442 usb: device_next: new USB Audio 2 implementation
Introduce new USB Audio 2 implementation written from scratch. Main goal
behind new implementation was to perform entity configuration with
devicetree bindings, hiding the descriptor complexity from application.

Initial implementation is working at Full-Speed only. High-Speed support
will come later, but even at Full-Speed only this is viable replacement
for old stack USB Audio 1 class (USB Audio 1 is limited to Full-Speed by
specification, i.e. it is explicitly forbidden for USB Audio 1 device to
work at High-Speed).

Implemented is only absolute minimum set of features required for basic
implicit and explicit feedback samples. Only one sample frequency is
currently supported. Optional interrupt notifications are not supported.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-02-01 15:07:37 +01:00
Eve Redero 8aea0e75d2 fix: samples: lvgl: modules: add missing test case
Add missing test case for LVGL demo app "widgets".

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2024-02-01 13:29:30 +01:00
Christopher Friedt dd33a8152a samples: philosophers: remove redundant items in prj.conf
The normal and posix philosophers samples seemed to have
a number of redundant choices in prj.conf.

Let's reduce to the minimum required for the sample. The
CONFIG_DEBUG_THREAD_INFO option is part of the
documentation, so leave it as-is.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Christopher Friedt 842fdbdea6 samples: posix: philosophers: fix off-by-one error
The number of forks should match the number of philophers, and
that is encoded via NUM_PHIL.

Change the build assert to match.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Christopher Friedt 9122e8530f samples: posix: philosophers: minor spacing corrections
Fix spacing and wrapping in the README.rst file.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Christopher Friedt 52b619cd2b samples: philosophers correct misspelled introduction tag
The tag 'introduction' was misspelled 'inroduction'.

Correct it both the samples/philosophers and the
samples/posix/philosophers directories.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Christopher Friedt 855b8bc6ca posix: separate shell utilities and posix api implementation
Previously, the POSIX shell utilities were intermixed with the
POSIX API implementation.

The POSIX shell utilities only depend on the public POSIX API,
so it makes sense to keep them in a separate subdirectory.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Daniel DeGrasse b83d8b0707 samples: drivers: jesd216: support NXP FlexSPI NOR driver
Support NXP FlexSPI nor driver with jesd216 sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-01 10:57:35 +01:00
Fredrik Danebjer c948f831e0 Bluetooth samples: Add USB Audio to Broadcast Sink sample
Added USB Audio output for the Broadcast Sink sample. In addition
offloading of the LC3 codec was also made. The sample supports only
mono, and a KConfig option was added to configure which audio
location to sync to.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2024-02-01 10:55:24 +01:00
Lars Knudsen b77df76e98 samples: Add Broadcast Assistant sample
First version of Broadcast Assistant sample
with hard coded selection of sink and source.

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-02-01 10:54:56 +01:00
Emil Gydesen 01d0f1a566 Bluetooth: PBP: Fix parsing and return issue with bt_pbp_parse_announcement
bt_pbp_parse_announcement was defined as uint8_t return value function,
but returned errno values, so it was modified to return an int instead.
The return values are also now more granular and documented.

The function also triggered a coverity issue with the way that it
parsed the data->data, as it would be marked as tainted. This should
be fixed by using the net_buf_simple API, which also improves on
some other parts of the code.

Finally the meta argument for the function was changed from an
unknown sized buffer, where the caller somehow had to know the
size of the metadata before calling the parsing function, to
an output pointer. This also omits the requirement for the
caller to always copy the metadata, where now it just
gets a pointer to the metadata in the bt_data struct. The application
can now always decide whether to continue to parse the metadata or
to copy it, using the pointer and the return value of the function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-01-31 21:33:56 -05:00
Armando Visconti e26cd0ba91 sample/shield: x-nucleo-iks01a3: add support to lis2de12 on DIL24
The x-nucleo-iks01a3 shield is equipped with a DIL24 socket where
different compatible sensors may fit. This commit add support to
lis2de12 on DIL24 in such a way that, if sensor is not present, test
would just skip it and proceed. Other sensors may be added in future.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-01-31 15:39:45 +01:00
Magdalena Pastula 361a5a11aa samples: add overlay files for nRF54L15
Add nRF54L15 overlays to samples that needed them.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-01-30 21:00:44 +00:00
Andriy Gelman c7dab3df08 drivers: can: Add xmc4xxx CAN support
Adds CAN drivers for XMC4xxx SoCs.

XMC4xxx has multiple CAN nodes. The nodes share a common clock and
a message object pool.

The CAN nodes do not have a loopback mode. Instead there is an
internal bus which can be used to exchange messages between
nodes on the SoC. For this reason tests/samples which rely on the
loopback feature have been disabled.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-01-30 19:06:06 +01:00
Navinkumar Balabakthan 6a8d011c65 samples: drivers: Added Nand Test Application
Nand Test Application has added in sample/drivers folder.

Signed-off-by: Navinkumar Balabakthan <navinkumar.balabakthan@intel.com>
2024-01-30 18:01:31 +01:00
Guillaume Gautier 05712250ea samples: boards: stm32: pm: suspend_to_ram: add wba standby sample
Add a sample for STM32WBA standby power management.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-01-30 18:01:00 +01:00
Joel Guittet 017b01659f samples: subsys: display: lvgl: add wio_terminal board
Add Wio Terminal configuration to the LVGL sample with button and
keypad overlay.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2024-01-30 10:35:32 -06:00
Abderrahmane Jarmouni 43b2f00c84 samples: modules: lvgl: demos: add test case for stm32h747i_disco
Add a test case for stm32h747i_disco that comes with a display shield.
This will make it easier to catch LVGL regressions on this board.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-01-30 10:27:57 -06:00
Abderrahmane Jarmouni 47f9ee405d samples: subsys: display: lvgl: add test case for stm32h747i_disco
Add a test case for stm32h747i_disco that comes with a display shield.
This will make it easier to catch LVGL regressions on this board.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-01-30 10:27:57 -06:00
Abderrahmane Jarmouni b4191dd67e samples: drivers: display: add a general test case
Add a test case for boards that have a supported built-in display that is
enabled by default in DTS. This will make it easier to catch display
regressions on these boards in CI.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-01-30 10:27:57 -06:00
Martin Jäger 60c58fe918 samples: subsys: lorawan: class_a: add multicast support
This is mainly to make sure that the multicast code is built in CI.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-01-30 14:14:05 +00:00
Wilfried Chauveau e840c9af01 samples: subsys: rpmsg_service improve terminology
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Co-authored-by: Jamie <40387179+nordicjm@users.noreply.github.com>
2024-01-30 13:42:02 +01:00
Wilfried Chauveau f875cb6cc9 samples: subsys: ipc: switch rpmsg to sysbuild
rpmsg_service only loads the main application on the target. Switch to
sysbuild which is know to work as expected with the openamp sample.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-01-30 13:42:02 +01:00
Lars Knudsen a3c4d22e79 boards: bbc_microbit_v2: Add buzzer
Tie pwm1 to buzzer pin and adjust sample.

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
2024-01-30 13:08:03 +01:00
Emil Gydesen 515ef17915 Bluetooth: Audio: Change samples and shell to use sinf
Change the samples and shell to use sinf instead of sin,
as that return the expect float data type, instead of
a double.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-01-30 12:45:26 +01:00
Daniel DeGrasse 8596ee9337 samples: drivers: i2s: add output sample
Add simple I2S output sample. This sample is verified with the RT1060
EVKB, but can be ported to any board with I2S support. It simply
demonstrates how to write I2S output data using the I2S API. The output
can be verified using a signal analyzer, if the user desires.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-29 10:59:24 +00:00
Christopher Friedt 248324b67a samples: posix: implement philosphers using pthreads
This sample takes a POSIX-y spin on the existing
Dining Philosophers sample application. The objects
used in the POSIX version are pthread_mutex_t, and
the threads are pthread_t.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-28 13:01:36 -05:00
Attie Grande cf14d4f1fd samples: drivers: uart: Add a 'passthrough' example
This sample can be used as a "virtual wire", allowing direct access to
devices connected to the target processor - for example: GPS, Cellular,
etc...

This is also useful as a utility - no other connectivity options exist
for UART, where other interfaces like SPI and I2C have shell commands.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2024-01-27 15:33:29 +01:00
Seppo Takalo 53705c062e samples: lwm2m: Clarify DTLS settings
Clarify some documentation regarding DTLS settings.
Set default QUEUE uptime to 30s, which would be same as
most cellular networks use, and  nRF SDK use.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-01-26 12:00:51 -06:00
Seppo Takalo 2deb3d5b0c samples: lwm2m: Set default bootstrap URI
Don't rely on just port number to select a bootstrap server.
Use full URI.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-01-26 12:00:51 -06:00
Daniel DeGrasse 664e710b1c samples: net: zperf: relocate stack to RAM for iMX RT boards
Relocate network stack to RAM for iMX RT boards when running the zperf
sample. Relocating the network stack to ITCM greatly improves
performance on these platforms.

Also, remove overlays for the RT1050 and RT1060 setting the system timer
to systick. This is no longer required as this is the default timer for
these boards.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-26 12:57:02 +01:00
Daniel DeGrasse 68952095a5 samples: net: zperf: allow networking code to be relocated to RAM
Enable relocation of key networking stack functions to RAM when running
the zperf example. This will enable better performance on platforms with
fast code RAM.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-26 12:57:02 +01:00
Declan Snyder dcedb649ca drivers: nxp_enet: Fix build error with PTP on
Fix build errors in nxp enet driver during case where PTP on,
and add coverage to CI.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-01-25 19:32:02 -05:00
Armando Visconti 9f1c256e46 samples/shields: add samples to test x-nucleo-iks4a1 shield
Provide three basic examples to test the x-nucleo-iks4a1 shield:

    - Test shield in standard mode
        Acquire sensor data from shield with all MEMS sensors connected
        to micro-controller

    - Test shield in HUB1 mode
        Acquire sensor data from shield with lis2mdl and lps22df
        connected to LSM6DSV16X sensor hub

    - Test shield in HUB2 mode
        Acquire sensor data from shield with lis2mdl and lps22df
        connected to LSm6DSO16IS sensor hub

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-01-25 18:26:40 +00:00
Hang Fan b3d2891e16 Bluetooth: Classic: Add support for class of device
Add `CONFIG_BT_COD` for class of device.

< HCI Command: Write Class of Device (0x03|0x0024) plen 3
        Class: 0x200408
          Major class: Audio/Video (headset, speaker, stereo, video, vcr)
          Minor class: Hands-free Device
          Audio (Speaker, Microphone, Headset)
> HCI Event: Command Complete (0x0e) plen 4
      Write Class of Device (0x03|0x0024) ncmd 1
        Status: Success (0x00)

Signed-off-by: Hang Fan <fanhang8@gmail.com>
2024-01-25 15:09:01 +00:00
Christopher Friedt 2236e57e42 samples: thrift: update doc to include optional modules
Update the Thrift sample to include instructions on
fetching optional modules. Without this, user builds
will fail.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-24 19:35:33 -05:00
Luca Burelli 92a5e3ace7 llext: rework testcases to share common config
This patch reworks the YAML files for the llext samples and tests to
share a common restriction list. Also, using an arch-specific config
to disable the MPU for the ARM architecture only, there is no need
to duplicate the test cases per architecture.

Use this to enable the "writable" test case for the ARM architecture
and separate the "modules_enabled" case to test building as a module.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-01-24 10:44:48 +01:00
Tom Burdick e69ce68d40 sensing: Fix initializer compile-time constant
Initializers must be compile time constants (not expressions!) for clang
to be happy. Clang rightfully pointed out that the callback_list member
of sensing_connection was being initialized using an expression that was
not compile-time constant.

The macros passed along a pointer created by taking the address of a
global constant and then at initialization time attempting to
dereference it using the * operator. So in the end the compiler has
identifier its trying to first take the address of and then later
dereference in an initializer. Clang didn't appreciate this, though gcc
seemed to be just fine.

Actually clang 17 might work just fine with this as well, but clang 16
(the clang I tried) didn't like it at all.

Instead store the pointer to the callback list rather than copying the
struct. This could be done the other way and not passing a
pointer through the macros perhaps.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-01-24 10:32:10 +01:00
Zhang Lixu f5595b4b9c sensing: support multiple sensor types in one device
Many sensors have multiple functions, for example, icm42688 supports
accel, gyro and temperature, and the sensor streaming api always mixes
the multiple functions in one function call. So we need add a layer in
sensing subsystem to dispatch the result returned from sensor streaming
api for each function.
I changed the sensor-type(int) to sensor-types(array) in sensing sensor
device bindings, so that one device can map to multiple instances of
sensing sensor.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2024-01-24 10:32:10 +01:00
Zhang Lixu 91774cb0eb samples: sensing: add more sample code
1. add sensing_set_config/sensing_get_config in sample code
2. add hinge_angle sensor in sample code.

Build and test:
  west build -p -b native_sim samples/subsys/sensing/simple/ -t run

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2024-01-24 10:32:10 +01:00
Guangfu Hu b9b714c8bd sensing: refine sensing API
1) move variable shift behind struct sensing_sensor_value_header in
struct sensing_sensor_value_q31
2) add pointer checking for sensing API
3) add context sensing_callback_list and sensing_data_event_t
4) add macro SENSING_SENSITIVITY_INDEX_ALL
5) rename zephyr,sensing-phy-3d-sensor.yaml

Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
2024-01-24 10:32:10 +01:00
Christopher Friedt 8556ae5afe samples: posix: change Subsystem to API
The POSIX API in Zephyr is considered more of a library than a
Subsystem.

Adjust the samples doc to reflect that.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-23 10:03:13 +00:00
Christopher Friedt f6373d6918 samples: portability: link to posix samples
POSIX API Samples live in another directory, but they should
still be easy to find from Portability Samples.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-23 10:03:13 +00:00
Sean Madigan a9a3b808e8 samples: bluetooth: iso_receive: Allow syncing any subevent number
When using softdevice controller on iso_broadcast sample, the BIG
created uses more than 1 subevent. This means that when you try to
use the iso_receive sample to sync it does not work.

So update the sample to use mse=0 and allow any number of subevents,
making the sample more flexible and work with SDC without any changes.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-01-23 10:02:26 +01:00
Sylvio Alves ce1be0e121 boards: esp32xx: decrease Wi-Fi minimum heap size
Decrease total RAM usage when Wi-Fi is enabled, specially after
`config HEAP_MEM_POOL_ADD_SIZE_BOARD` was added. This allows application
to handle additional HEAP as required.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-01-22 12:59:23 +01:00
Tomas Galbicka e776051cad samples: mbox: Add mbox sample with data transfer
This commits add mbox sample which supports transfering of
4 bytes of data between cores.

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2024-01-22 09:48:09 +00:00
Henrik Brix Andersen 3436c93387 drivers: can: remove run-time RTR filtering, add build-time RTR filter
A growing number of CAN controllers do not have support for individual RX
hardware filters based on the Remote Transmission Request (RTR) bit. This
leads to various work-arounds on the driver level mixing hardware and
software filtering.

As the use of RTR frames is discouraged by CAN in Automation (CiA) - and
not even supported by newer standards, e.g. CAN FD - this often leads to
unnecessary overhead, added complexity, and worst-case to non-portable
behavior between various CAN controller drivers.

Instead, move to a simpler approach where the ability to accept/reject RTR
frames is globally configured via Kconfig. By default, all incoming RTR
frames are rejected at the driver level, a setting which can be supported
in hardware by most in-tree CAN controllers drivers.

Legacy applications or protocol implementations, where RTR reception is
required, can now select CONFIG_CAN_ACCEPT_RTR to accept incoming RTR
frames matching added CAN filters. These applications or protocols will
need to distinguish between RTR and data frames in their respective CAN RX
frame handling routines.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-21 11:00:31 +01:00
Doug Foster 9fe370ef36 samples: doc: Added/Updated README and Makefile for POSIX samples
Added README.rst for eventfd and uname samples. Updated README for
gettimeofday to align with other READMEs.Updated Makefile.host
file for samples to store output file in 'build' directory.

Signed-off-by: Doug Foster <dougwfost@gmail.com>
2024-01-19 10:32:23 +01:00
Jukka Rissanen 1dc8249fcd samples: net: zperf: Increase the polled fd count
We need more polled fd count so that socket services work ok.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-18 20:13:31 +01:00
Gerard Marull-Paretas 1d128f13b6 samples: modules: tflite-micro: remove incorrect check
sensor cannot be null because it is initialized with DEVICE_DT_GET_ONE,
which always resolves to a device. The deleted check triggered a
compiler warning ("warning: the address of '__device_dts_ord_23' will
never be NULL").

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-18 12:09:53 +00:00
Ian Wakely 715dc68b22 boards: Enabling neopixel on Adafruit Qt Py RP2040
Using the recently added WS2812 PIO driver, this enables the LED on the
QT PY to work with the built in RGB LED examples.

Signed-off-by: Ian Wakely <raveious.irw@gmail.com>
2024-01-18 10:54:55 +01:00
Yong Cong Sin 2cd0265f7e samples: posix: uname: add Makefile to compile on POSIX OS
Previously the sample was using some headers that aren't
available to the host, now we can add a `Makefile.host` to
compile the example on a POSIX OS like Linux:

```
# Go to the sample dir
cd ${ZEPHYR_BASE}/samples/posix/uname

# Compile the sample
make -f Makefile.host

# Run the binary
./build/uname

sysname[65]: Linux
nodename[65]: LAPTOP-YC
release[65]: 5.10.16.3-microsoft-standard-WSL2
version[65]: #1 SMP Fri Apr 2 22:23:49 UTC 2021
machine[65]: x86_64
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-18 10:54:32 +01:00
Yong Cong Sin 48c16f9052 posix: uname: move uname shell from sample
Relocate the `uname` shell implementation from uname sample, so
that it can be reused by other application and the uname sample
only uses POSIX APIs.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-18 10:54:32 +01:00
Yong Cong Sin cf13057c8d samples: posix: uname: convert to use printf
Convert to `printf` from `printk` to be more POSIX-y.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-18 10:54:32 +01:00
Joakim Andersson 3a830433be tfm: Provide properties for selected TF-M toolchain for NS application
Provide properties for selected TF-M toolchain so that the NS
application will use the same toolchain as TF-M.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky ad9cdf06c4 samples: tfm_psa_test: Adapt to TF-M split build
The sample now builds the psa-arch-tests itself and doesn't rely anymore
on the TF-M module CMakeFile.
Additionally it will not run the zephyr main.c anymore but therefore only
uses the tf-m non-secure application.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Joakim Andersson f48467a2a6 tfm: Update TF-M regression tests sample to build NS app
Update the TF-M regression tests sample to build the NS app
in the tf-m-tests repository as an external project.

The regression tests need to provide test configurations to both
TF-M an NS app.
Duplicate configuration done in the spe/CMakeLists.txt to configure
TF-M image for the regression tests.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Joakim Andersson f49cbf13ca tfm: Remove TFM_BUILD_NS and update TFM_USE_NS_APP for NS build folder
TF-M no longer builds the NS app, but exports build files to api_ns
folder and expects the user to build the rest themselves.
Remove the option to build the NS app, and update the TFM_USE_NS_APP
to look for an output hex file in the tfm_ns folder.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky e8eeecddcf sample: tfm_secure_partition: Change tfm_partition_defs to tfm_config
The target tfm_partition_defs got removed and  tfm_config gets used now so
updating it

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Joakim Andersson f5eecd500d tfm: nordic_nrf: Remove include of tfm_api.h, update install path
Update install path of tfm_ioctl_api.h, remove include of tfm_api.h

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky 11175c3ad3 tf-m: Change NS include path for TF-M 2.0.0
The place where TF-M places its non-secure api header files has changed
Therefore changing it for for all applications that use it.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Armando Visconti 06edc37521 samples: sensor: lps22hb: fix sample document
The LPS22HB is a pressure and temperature sensor, but
this sample document is wrongly mentioning "humidity".

Fix #66117

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-01-17 08:28:35 -06:00
Daniel DeGrasse ff4143acfb boards: arm: mimxrt595_evk_cm33: enable DMIC0 channels 0 and 1
Enable L/R channel pair for DMIC0 on the RT595 EVK. The RT595 EVK has a
pair of MEMS microphones wired to PDM channel 0 and 1, so these channels
are configured with appropriate gain and filter settings for the MEMS
microphones.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Co-authored-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-01-17 14:43:52 +01:00
Christopher Friedt 574e641297 samples: cpp: add a Hello, world! C++ app
Create a separate hello world C++ app for Zephyr.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-17 09:56:34 +01:00
Tomas Galbicka d161d05e33 samples: mbox: Add support for NXP RT boards
This commit adds mbox sample support for these NXP boards:
 - MIMXRT1160-EVK
 - MIMXRT1170-EVK
 - MIMXRT1170-EVKB

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2024-01-16 09:29:28 -06:00
Jukka Rissanen f4373709e7 samples: net: sockets: Add echo-service sample
The echo-service sample demostrates how to use the socket
service API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-16 10:00:45 +01:00
Joel Guittet 93b6a06bd1 samples: add Wio Terminal overlay to blinky pwm
Add overlay to the blinky pwm sample to run the application on the
Wio Terminal. The USER LED on PA15 is used to setup the PWM LED.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2024-01-15 13:56:51 -05:00
Krzysztof Chruściński f1ef55ec5a samples: shell: shell_module: Enable logging commands
Enabling commands for the sample. They were disabled by c0c8952739 but
should be enabled in the sample.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-15 09:57:54 +01:00
Krzysztof Chruściński 5062cef1f0 samples: logging: dictionary: Add support for runtime filtering
Extend sample with configuration which has shell on one UART and
UART dictionary based frontend on another. Shell commands can be used
to control runtime filtering of logging messages for the frontend and
shell backend.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-15 09:57:54 +01:00
Lucas Tamborrino 4a7ba2fa94 samples: drivers: ipm: esp32: Add ESP32S3 support
Add support for ESP32S3 in the IPM sample.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-01-13 00:22:24 +00:00
Lucas Tamborrino 9f77808678 boards: xtensa: esp32_app_cpu: change bin name
Change bin name to esp32_appcpu_firmware instead of
esp32_net_firmware to keep naming coherence.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-01-13 00:22:24 +00:00
Lucas Tamborrino 11fc182315 soc: esp32: refactor esp32_net
SOC_ESP32_NET is now SOC_ESP32_APPCPU, following espressif's
naming convention in the same manner as ESP32S3 app cpu.

SOC_ESP32_APPCU is now a subset of SOC_SERIES_ESP32.

This commit also changes the necessary files, samples and tests
for bisect purposes.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-01-13 00:22:24 +00:00
Stephan Linz 162a8f00c1 samples: drivers: display: support small displays
With extremely small displays (much smaller than 64x24), the
calculation of the blocks in the four corners fails. These
might then be too large and no longer fit into the available
area of the small displays.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-01-12 09:32:33 -06:00
Stephan Linz 2fdea6b2b9 samples: drivers: display: distinguish mono pixel format
In exceptional cases, monochrome displays can deviate from the
general interpretation (PIXEL_FORMAT_MONO01) of a logical 1 as
pixel on (white) and 0 as pixel off (black) and instead set the
capability to PIXEL_FORMAT_MONO10. This small but significant
difference has been ignored so far, resulting in an inverse
display for those displays. In order to be technically correct
here, the buffers for a "white" background should be set to 0
instead of 1 and for "black" to 1 instead of 0.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-01-12 09:32:33 -06:00
Stephan Linz e46265669f samples: drivers: display: fix mono buffer size
Rounding errors due to the division of non-integrally divisible
buffer sizes lead to the loss of one byte. This can be avoided
with the DIV_ROUND_UP() macro.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-01-12 09:32:33 -06:00
Wojciech Sipak 12f4f4dc86 samples: hello_world_user: fail in compilation if userspace is not enabled
The sample depends on CONFIG_USERSPACE.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2024-01-12 08:32:54 -05:00
TOKITA Hiroshi 665d216b6f samples: drivers: led_ws2812: add configure for adafruit_kb2040
Add configuration to use PIO driver for adafruit_kb2040.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-01-10 12:10:36 +01:00
Alberto Escolar Piedras 009fcd70e5 tests bsim bt: Add basic connection test with HCI UART async controllers
Add a basic connection test between two devices,
in which the controllers are in separate nrf52_bsim devices
connected over UART to the devices running the host+app.
The controllers are running the HCI UART async sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-10 10:01:37 +01:00
Andrzej Głąbek 6d67b95a18 samples: boards: nrfx: Remove redundant inclusions
This is a follow-up to commit c7e4d23c5d.

After all calls to `nrfx_dppi_*` and `nrfx_ppi_*` functions were
replaced with corresponding `nrfx_gppi_*` calls, it is no longer
needed to include the `nrfx_dppi.h` and `nrfx_ppi.h` headers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-01-09 12:06:51 +01:00
Andrzej Głąbek e8d3bf5ff6 samples: boards: nrfx: Do not require (d)ppi node to be enabled
The sample needs to check in Kconfig whether PPI or DPPI is present
on the target platform in order to enable the proper allocator in nrfx.
It should not use the `HAS_HW_NRF_*` symbols for this as those take
into account also the status of the corresponding DT node, not only
its presence.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-01-09 12:06:51 +01:00
Andrzej Głąbek 56b6e6eb58 samples: boards: nrfx: Use absolute pin numbers
This sample makes calls to the nrfx_gpiote driver functions that
require absolute pin numbers, not relative to a given GPIO port,
so instead of getting the numbers with the `DT_GPIO_PIN` macro,
it should use `NRF_DT_GPIOS_TO_PSEL`.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-01-09 12:06:51 +01:00
Henrik Brix Andersen d856ed73f4 samples: shields: lmp90100_evb: rtd: convert to devicetree configuration
Convert the sample for the lmp90100_evb shield to use devicetree for
configuring the ADC channel.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-09 10:04:18 +01:00
Jukka Rissanen b18442bc0d samples: net: dumb_http_server: Sleep after accept error
If accept() returns an error, it typically means that the
system is running out of resources. In this case sleep
some time in order the system to cool down a bit.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-09 10:03:08 +01:00
Jukka Rissanen cef8da0ecf samples: net: dumb_http_server_mt: Sleep after accept error
If accept() returns an error, it typically means that the
system is running out of resources. In this case sleep
some time in order the system to cool down a bit.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-09 10:03:08 +01:00
Andriy Gelman 2391ff7767 boards: xmc45_relax_kit: Add ethernet/mdio to the devicetree
Adds ethernet/mdio into to the devicetree.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-01-09 10:00:47 +01:00
Daniela Andreea Dumitrache 3bfb2e3ab2 Bluetooth: Audio: Add implementation for PBP and dedicated sample apps.
PBP API allows sources to create a Public Broadcast Announcement.
PBP API to parse a Public Broadcast Announcement.

public_broadcast_source application starts extended advertising and
includes a Public Broadcast Announcement. The advertised broadcast
audio stream quality will cycle between high and standard quality.

public_broadcast_sink application scans for broadcast sources and
synchronizes to the first found source which defines a Public Broadcast
Announcement including a High Quality Public Broadcast Audio Stream
configuration.

Add bsim tests for Public Broadcast Profile APIs.

Add shell implementation for Public Broadcast Profile APIs.

Signed-off-by: Daniela Andreea Dumitrache <danielaandreea.dumitrache@nxp.com>
2024-01-09 09:59:23 +01:00
Yong Cong Sin c7ce871a04 tests: exclude renode from tests requiring unsimulated peripherals
Physical boards work on these tests but some of the required
peripherals are not simulated by `renode`, executing the tests
with renode-simulated board in CI will fail.

Exclude `renode` simulation from these tests.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-08 16:17:43 +00:00
Piotr Pryga cb8d623506 samples: Bluetooth: periph_hr: add use of HRS nofitication changed cb
Add example usage of the HRS notification callback to peripheral_hr.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-01-08 15:34:20 +02:00
Jakub Zymelka ade49f081d modules: hal_nordic: nrfx: update API version to 3.2.0
Updated API version enables multi-instance GPIOTE driver.
Additionally obsolete symbol that was used to specify
API version in the past was removed.
Affected drivers have been adjusted and appropriate changes
in affected files have been made.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-01-08 11:19:37 +01:00
Marcin Jelinski 5752a8f3be samples: ipc: multi_endpoint: Fix synchronisation of data receiving
The incorrect semaphore was used for the ipc1 instance to synchronise
the data receiving.
This commit fixes it.

Signed-off-by: Marcin Jelinski <marcin.jelinski@nordicsemi.no>
2024-01-08 10:09:22 +01:00
Jamie McCrae 747991d528 samples: drivers: uart: native_tty: Remove superfluous cmake lines
Removes some lines that appear to have been used for debug that
are not needed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-01-06 14:09:44 +01:00
Rodrigo Peixoto 01981910ec samples: zbus: add priority boost sample to zbus
This sample illustrates how to properly use zbus priority boost feature.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-01-04 09:41:54 +01:00
Rodrigo Peixoto fb7515e27b samples: zbus: fix samples to work with priority boost
Adjust the sample to work with the priority boost. It illustrates zbus
being used inside an ISR instead of into the main function.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-01-04 09:41:54 +01:00
Andrei Emeltchenko c62e371b3c samples: bme280: Fix indentation for ADL-N overlay
Fix indentation in the intel_adl_crb board overlay file.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-12-27 16:06:19 +00:00
Andrei Emeltchenko 5d0ba230b8 tests: samples: watchdog: Add intel_rpl_p_crb overlay
Add overlay to enable watchdog for build test and sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-12-27 16:06:19 +00:00
Bindu S f806c04abe samples: sensor: Enable bme280 sensor using I2C driver for RPL-P
Added overlay to enable bme280 sensor
using i2c on intel_rpl_p_crb board.

Signed-off-by: Bindu S <bindu.s@intel.com>
2023-12-27 16:06:19 +00:00
Marc-Antoine Riou 8e1bc2b058 samples: ipc: Update openamp rsc table documentation
This change follow the recent commit that update openamp rsc table logs.
Add the logs for both samples sample client & TTY responder,
as well as for both sides Linux & Zephyr.
Remove the serial connection to Zephyr because it is board specific.

Signed-off-by: Marc-Antoine Riou <marc-antoine.riou@iot.bzh>
2023-12-21 17:17:36 +00:00
Marc-Antoine Riou 71138d4001 samples: ipc: Add logs in openamp rsc table loops
Add logs in both of the openamp rsc table loops to stick with
what is shown in Zephyr documentation. Prefix each message with the loop
name and unify logs with those from rpmsg_client_sample module.

Signed-off-by: Marc-Antoine Riou <marc-antoine.riou@iot.bzh>
2023-12-21 17:17:36 +00:00
Marc-Antoine Riou d470f464eb samples: ipc: Fix length of message to send in openamp rsc table sample
Sample openamp_rsc_table was sending too many characters to master.
It was displayed as unrecognised character when reading message on master.

Signed-off-by: Marc-Antoine Riou <marc-antoine.riou@iot.bzh>
2023-12-21 17:17:36 +00:00
Lars Knudsen 95f8c2666a samples: WebUSB: Fix MS OS 2.0 descriptor
The sample did not correctly select the WinUSB
driver for the WebUSB interface as required
on Windows when CDC ACM was included in the
build configuration (the case for e.g. nRF52840
Dongle).

Introduce correct function subset header in the
MS OS 2.0 descriptor.

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
2023-12-20 14:35:35 +00:00
Sylvio Alves ecda72079e esp32: overlays: remove unused dt-binding headers
All overlay headers are not necessary to be included.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-12-20 14:17:49 +00:00
Seppo Takalo 6161fbdf21 net: lwm2m: Transmission state indications
Allow engine to give hints about ongoing CoAP transmissions.
This information can be used to control various power saving
modes for network interfaces. For example cellular networks might
support release assist indicator.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-12-20 11:57:48 +00:00
Andrei-Edward Popa ea1cafbee7 drivers: clock_control: Added clock driver for Raspberry Pi Pico
Added clock driver for Raspberry Pi Pico platform

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
Murlidhar Roy 1ddb931fa8 samples: subsys: fs: fs_sample: adding support for fat_fs app
adding support for fat_fs application agilex5 platform

Signed-off-by: Murlidhar Roy <murlidhar.roy@intel.com>
2023-12-18 15:00:38 +01:00
Murlidhar Roy 3426eab29c samples: subsys: shell: shell_module: adding support for shell app
adding support for shell application for agilex5 platform

Signed-off-by: Murlidhar Roy <murlidhar.roy@intel.com>
2023-12-18 15:00:38 +01:00
Ryan Woodward 7ed7a8c272 mgmt/osdp: Update ReadMe.rst
Updated Link to the LibOSDP Library Respository in the ReadMe for mgmt/osdp
Signed-off-by: Ryan Woodward <ryanjwoodward@outlook.com>
2023-12-18 12:24:37 +01:00
Johann Fischer ad25668313 samples: usb shell: add DT overlay to support snps,dwc2 on nucleo_f413zh
Add DT overlay to be able to support and test UDC DWC2 driver
(snps,dwc2) on nucleo_f413zh board. This disables STM32 shim
driver described and configured on the SoC and board level.

Obviously,it should work with other STM32F4 boards as well and we
could have a mechanism to apply it generically using snippets.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-12-18 09:48:58 +01:00
Pieter De Gendt 4807ada01e net: lib: coap: Use coap_transmission_parameters in coap_server
Update coap_service_send and coap_resource_send to take an optional
pointer argument to the newly introduced coap_transmission_parameters.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-18 09:28:25 +01:00
Jonathan Rico b83b9bede3 Bluetooth: ATT: call-back on buffer destroy
This is just as arbitrary as what was before, but simpler.

Before this change, the callback were invoked upon receiving the num
complete packets event.
This did not necessarily work with all spec-compliant controllers.

Now the callback is invoked as soon as the lower layer destroys the
buffer. ATT shouldn't care whether L2CAP sends it over RFC1149 or
something else after that point.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-12-15 17:14:56 +02:00
Jonathan Rico a05a47573a Bluetooth: ATT: Internalize ATT PDU TX pool
Why?
- metadata is easier to manage as an array + index
  - less error-prone -> less memory-management bugs
- we can. because of the previous refactor
- PDU allocations are more predictable
- ATT buffer size can be optimized by app
- isolates ATT from the rest of the ACL users
  - decouples ATT PDU size from e.g. SMP w/ LESC

Drawbacks:
- higher memory usage
- kconfig change

The higher memory use is only temporary, as this will be followed-up
with more refactors that should bring it back down.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-12-15 17:14:56 +02:00
Patryk Koscik b22bb172f2 samples: blinky: add verbose printf output
Add console output to the sample, with the LED status upon a GPIO toggle.

Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
2023-12-15 11:20:03 +00:00
Flavio Ceolin 438e8a4cb0 samples: syscall_perf: Remove unused build option
This sample does not define any syscall. It does need to set
CONFIG_APPLICATION_DEFINE_SYSCALL.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-12-14 19:07:39 +00:00
Piotr Golyzniak 5ae567499b samples: pytest: add README
Add README.rst file with description of sample which shows how to use
pytest and Twister together.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-12-14 10:12:21 +01:00
Anas Nashif 044e2d6bff arch: make CONFIG_EXCEPTION_DEBUG cross arch config
Define CONFIG_EXCEPTION_DEBUG globally and remove architecture specific
definition of config.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-14 09:32:27 +01:00
Armando Visconti 3fe0ffb9dc sample: board: sensortile_box_pro: extend with lis2du12 accelerometer
Extend sensor sample reading also lis2du12 accelerometer data.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-12-14 09:28:52 +01:00
Johann Fischer 9566419300 samples: usb: use common sample USBD initialization
Use the common USBD sample initialization helper where new USB device
support has already been added.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-12-13 17:52:00 +01:00
Johann Fischer b00a998cf1 samples: usb: add common USB device instantiation and initialization
There is common code for the new USB device support in the samples to
instantiate USB device, descriptors, configuration and initialize USB
device. Add common code that can be used for the simple usecase with a
single USB device and single configuration.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-12-13 17:52:00 +01:00
Anders Storrø 25d44a828d Bluetooth: Mesh: Rename prov_dev->provisionee
Renames "prov device" references and options to
"provisionee" to align implementation with Mesh
Protocol specification v1.1, section 5.4.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-12-13 13:57:46 +01:00
Lucas Denefle b287db8fd3 samples: net: cellular_modem: polls cellular info
Adds an example of polling cellular info to the modem sample

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2023-12-12 19:09:33 +01:00
Ricardo Rivera-Matos d4ed6bacf0 drivers: charger: Adds charge_enable handler
Adds a charge_enable handler to facilitate enabling and disabling
a charge cycle. This deprecates enabling and disable the charge
cycle via the CHARGER_PROP_STATUS property.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-12-12 10:49:39 -06:00
Vinayak Kariappa Chettimada 5e26cd4fd2 samples: Bluetooth: Update buffer counts for Broadcast Audio Source
Updaye buffer counts and semaphore initial value so that the
Broadcast Audio Source can utilize any use of broadcast
pre-transmissions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-12-12 15:02:51 +01:00
Vinayak Kariappa Chettimada d8969904ce samples: Bluetooth: Broadcast audio source USB headset on nRF52 Series
Broadcast audio source USB headset on nRF52 Series with USB
support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-12-12 15:02:51 +01:00
Aleksandr Khromykh 7c87ff315e samples: Bluetooth: Mesh: remove nrf53_ns settings related workaround
The issue with non secure storage system has been fixed
in nrf53_ns platform: https://github.com/zephyrproject-rtos/zephyr/issues/59376
No need workarounds anymore.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-12-12 10:58:10 +00:00
Rodrigo Peixoto 2f230e8903 samples: zbus: benchmark: add msg subscriber to benchmark
The benchmark sample did not contemplate message subscribers. It adds
the msg subscribers and improves the organization of the project.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-12-12 10:54:26 +00:00
Andreas Sandberg 8ae5031aa5 samples: Add an SWO logger configuration fragment
The subsys/logging/logger example can be used to demonstrate how to
use SWO for logging. Add a configuration fragment that enables the
logger's SWO backend. The default SWO frequency in this example is set
to 2 MHz to ensure a well-defined output bit rate instead of the
highest possible.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-12-12 10:56:44 +01:00
Francois Ramu bf2b4675d0 samples: boards: stm32 low power blinky for stm32 boards
Set the prescaler for the stm32_lp_tick_source lptim node.
When the LPTIM is clocked by the LSE with a prescaler
of 16 (lptim freq at 2048Hz) expecting 2048 for the TICKS_PER_SEC.
When the LPTIM is clocked by the LSE with a prescaler
of 32 (lptim freq at 1024Hz) expecting 1024 for the TICKS_PER_SEC.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-12-12 09:52:30 +00:00
Anas Nashif 1813a33108 arch: arm: rename expection header
Rename exception header and use the same name as all architecture ports.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-11 18:22:40 -05:00
Marcio Ribeiro 7543386f83 samples: input: espressif boards added to input_dump
Added some board overlay files to permit input touch sensor testing:
- esp32_devkitc_wroom
- esp32_devkitc_wrover
- esp32s2_saola
- esp32s3_devkitm

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2023-12-11 18:31:38 +01:00
Joakim Andersson afe4cce831 samples: soc_flash_nrf: Make sure that the flash partition is valid
Make sure that the flash partition is valid.
With TF-M enabled the storage_partition can be used as memory that is
known to be configured as non-secure flash region.
The slot1_ns_partition partition is only correct when TF-M is built
with BL2 enabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:56:55 +01:00
Joakim Andersson 29fc537bfb samples: soc_flash_nrf: Print finished message
Print a finished message, so that it is clear that this in the end
of the sample. This makes it certain that we didn't crash without
output on the last test.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:56:55 +01:00
Joakim Andersson 3063c6ae46 samples: soc_flash_nrf: Stop erasing outside of test partition
Stop erasing outside of the test partition.
We shouldn't really on this being accesible memory.
This region may be consider as secure when application is non-secure.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:56:55 +01:00
Emil Gydesen e54902bdbe Samples: Bluetooth: Fix bug in is_substring for broadcast sink
The is_substring did not work for true substrings, as it
would always compare [0] to [0], so it would return false
for the substring "BC" being in "ABC".

Removed the tolower as it is not necessary and fixes the issue.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-12-11 09:53:36 +01:00
Declan Snyder 247f9e61ef samples: zperf: Add NXP driver test case
Test the experimental NXP ENET driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Aleksandr Khromykh d175ac0572 Bluetooth: Mesh: access tx msg randomizer
Commit adds implementation of the specification
recommendations regarding randomization of
responses on the access layer.
3.7.3.1 Transmitting an Access messages

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-12-11 09:50:18 +01:00
Adam Wojasinski 7b78393b07 samples: drivers: spi_flash: Extend requirements description
The patch updates README with detailed description of  the requirements
regarding target devicetree needed to correctly build the sample.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-12-08 20:21:07 +00:00
Adam Wojasinski 8fdb8004dd samples: drivers: spi_flash: Add nordic,qspi-nor to test filter
When commit 5b4f4253c1 introduced
"nordic,qspi-nor" dts binding the sample wasn't aligned to the change.
From that moment the sample started to be filtered out by the Twister.

The patch adds Nordic's compatible to the test filter.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-12-08 20:21:07 +00:00
Arkadiusz Wadowski b49fb0d289 mgmt/osdp: Add build-only tests for OSDP samples
Such tests will help to catch any compilation errors in future


Signed-off-by: Arkadiusz Wadowski <wadowski.arkadiusz@gmail.com>
2023-12-08 20:20:56 +00:00
Fabio Baltieri 72bb10dc84 samples: input_dump: enable shell commands by default
Enable INPUT_SHELL and INPUT_KBD_MATRIX_STATE by default if the sample
is compiled with CONFIG_SHELL=y. This makes it easier to use the shell
commands in the sample by just enabling the shell and let any help
command turn on automatically.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-08 20:16:39 +00:00
Fabian Blatz 917770952d samples: subsys: display: lvgl: Update README
Update the readme to better describe contents of the sample, which is now
used to showcase the various input device types that LVGL offers.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-12-08 10:26:24 +00:00
Hake Huang 27d519b260 samples: logging: disable usermode for rtt platfroms
Those platfroms using rtt as debug port,
are conflicted with usermode. same with
163e9ba9a3

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-12-07 21:11:01 +01:00
Robert Baruch 5e08f73f7d samples: net: wifi: boards: added missing files for xiao_esp32c3
The conf and overlay files to properly compile the wifi samples were
omitted for the Xiao_esp32c3 board. I've added those two files and
confirmed that the sample properly compiles and runs.

Signed-off-by: Robert Baruch <robertbaruch@mac.com>
2023-12-07 16:18:04 +00:00
Lingao Meng 786b9a0ad4 Bluetooth: Host: Add const prefix for UUID
Add const prefix for service uuid and char uuid.

Since Service UUID and Char UUID should not change in the service
definition, they are most reasonably defined as rodata, also for
save some ram footprint.

The field `attr->user_data` type is `void *`, as this PR change
all Service UUID to rodata, so there must add (void *) to avoid warning.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-12-07 16:16:43 +00:00
Pieter De Gendt 8b22c769a7 samples: net: sockets: coap_server: Add CoAP events example
Add an example handler for CoAP events triggered by net_mgmt.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-07 10:34:39 +00:00
Pieter De Gendt 527640b726 samples: net: sockets: coap_server: Remove observer events
In preparation of migrating to net_mgmt events, we need to remove
the observer event callback handler.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-07 10:34:39 +00:00
Keith Short 411cc38f76 samples: drivers: espi: Fix compile errors
The espi_saf.h header has a dependency on the eSPI driver supporing SAF.
Guard the include to fix builds of the Nuvoton eval boards.

Signed-off-by: Keith Short <keithshort@google.com>
2023-12-06 21:35:29 -05:00
Jonathan Rico ea04fd95f9 Bluetooth: ATT: remove BT_ATT_ENFORCE_FLOW
Enforcing the peer's behavior is not strictly necessary. All the host
should do is make sure it is resilient to a spec-violating peer.

Moreover, a growing number of platforms were disabling the check, as the
spec allows "batching" HCI num complete packets events, stalling ATT RX.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-12-06 17:53:54 +00:00
Emil Gydesen c9daed9712 Bluetooth: BAP: Refactor bt_bap_base
This removes the fixed size bt_bap_base, which provides
2 improvements:
1) The RAM usage of the broadcast sink has been reduced.
   For the Broadcast Sink sample it is a reduction of 120
   octets, but with much better scaling for supporting
   more or larger BASEs.
2) The functions to parse BASEs now support arbitrary sized
   BASEs, where they were previously restricted by our
   local Kconfig options. This allow us to parse any BASE
   from a remote device, without encounting memory issues.
   We are still memory restricted on the devices we
   actually want to sync to.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-12-06 17:51:47 +00:00
Henrik Brix Andersen 031c842ecb samples: userspace: hello_world_user: exclude qemu_xtensa_mmu
Exclude the qemu_xtensa_mmu platform from this sample until #66029 is
fixed.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-06 17:05:53 +01:00
Jamie McCrae 5dcc0d753a cmake: Remove support for deprecated prj_board.conf
Removes support for the deprecated features of having a prj file
which has the board name on the end of it. Board Kconfig fragments
should be used instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-12-06 10:28:12 -05:00
Fabian Blatz 02bf538d61 samples: subsys: display: lvgl: Add lvgl-keypad-input device
Adds a zephyr,lvgl-keypad-input compatible to the native_posix board
overlay and the required code to control an button matrix widget.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-12-06 09:15:50 +00:00
Seppo Takalo dc8f6da53c net: lwm2m: Implement fallback mechanism and support for diable
If server registration fails, allow fallback to secondary server,
or fallback to bootstrap.
Also allow fallback to different bootstrap server.

Add API to tell RD client when server have been disabled by
executable command.

Changes to RD state machine:
* All retry logic should be handled in NETWORK_ERROR state.
* New state SERVER_DISABLED.
* Internally disable servers that reject registration
* Temporary disable server on network error.
* Clean up all "disable timers" on start.
* Select server first, then find security object for it.
* State functions return void, error handling is done using states.
* DISCONNECT event will only come when client is requested to stop.
* NETWORK_ERROR will stop engine. This is generic error for all kinds
  of registration or network failures.
* BOOTSTRAP_REG_FAILURE also stops engine. This is fatal, and we cannot
  recover.

Refactoring:
* Server selection logic is inside server object.
* sm_handle_timeout_state() does not require msg parameter. Unused.
* When bootstrap fail, we should NOT back off to registration.
  This is a fatal error, and it stops the engine and informs application.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-12-05 16:40:06 -06:00
Manuel Argüelles 0b32004c09 tests: userspace: exclude ucans32k1sic due to lack of MPU regions
This board have an NXP MPU with 8 configurable regions, of which five
of them are already used by the static MPU configuration. Many of
these tests are failing due to lack of MPU regions or free partition
slots available, even when HW stack protection is disabled when
building with userspace support.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-05 16:20:10 -06:00
Marcio Ribeiro a8c8b46e23 samples: sensors: espressif board added to die_temp_polling
Added board overlay file to permit internal temperature sensor testing:
    - esp32s3_devkitm

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2023-12-04 14:32:09 +01:00
Alberto Escolar Piedras d2151aa114 samples/drivers/mbox: Reduce sysbuild boilerplate
Reduce the sysbuild boilerplate required for
the nrf5340bsim targets

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-02 07:53:11 -05:00
Alberto Escolar Piedras cbce3383d1 samples/boards/nrf/nrf53_sync_rtc: Reduce sysbuild boilerplate
Reduce the sysbuild boilerplate required for
the nrf5340bsim targets

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-02 07:53:11 -05:00
Alberto Escolar Piedras b02fc27464 samples/subsys/logging/multidomain: Reduce sysbuild boilerplate
Reduce the sysbuild boilerplate required for
the nrf5340bsim targets

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-02 07:53:11 -05:00
Alberto Escolar Piedras 8b70d98dcb samples/bluetooth: Reduce sysbuild boilerplate
Reduce the sysbuild boilerplate required for
the nrf5340bsim targets.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-02 07:53:11 -05:00
Jonas Remmert 7a2fcc419e drivers/sensor: add support to LPS28DFW pressure sensor
The LPS28DFW is an ultracompact, piezoresistive, absolute pressure sensor.
Compared to the LPS22DF, the LPS28DFW is waterproof and has a Dual FS
capability and does not have SPI. This commit extends the LPS22DF driver to
be compatible with the LPS28DFW device.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2023-12-01 12:19:05 -06:00
Guillaume Gautier 4ed761d8b4 samples: boards: stm32: pm: adc: add adc channel for stm32wba
Add ADC channel for STM32WBA power management sample

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-12-01 14:31:05 +01:00
Mia Koen 0bcad09392 bluetooth: mesh: Doc fix Bluetooth mesh to Mesh
SIG has changed Bluetooth mesh to Bluetooth Mesh
Updating zephyr docs accordingly
Leaving out old release notes

Signed-off-by: Mia Koen <mia.koen@nordicsemi.no>
2023-12-01 10:56:18 +00:00
Francois Ramu 64cac83b48 samples: sensor: hts221 no trigger on stm32u585 disco kit
The b_u585i_iot02a stm32 board has no HTS221 DRDY pin
to trig the HTS221 relative humidity and temperature sensor
So that sample.sensor.hts221.trigger is not applicable.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-29 10:09:23 +01:00
Hake Huang 163e9ba9a3 samples: disable usermode for ip_k66f
in ip_k66f platfrom, we using rtt as debug port,
which is conflicted with usermode. see below:

warning: LOG_PRINTK
 (defined at subsys/logging/Kconfig.processing:8)
 has direct dependencies !USERSPACE && !LOG_MODE_MINIMAL
 && LOG with value n, but is currently being y-selected
 by the following symbols:
 - LOG_BACKEND_RTT_FORCE_PRINTK
   (defined at subsys/logging/backends/Kconfig.rtt:103),
   with value y, direct dependencies LOG_BACKEND_RTT &&
   !LOG_FRONTEND_ONLY && !LOG_MODE_MINIMAL && LOG (value: y),
   and select condition LOG_BACKEND_RTT &&
   !LOG_FRONTEND_ONLY && !LOG_MODE_MINIMAL && LOG (value: y)

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-11-28 11:59:00 -06:00
Bartosz Bilas ce812c1b25 zbus: rework buffer allocation Kconfig options
Add a name for the Kconfig choice symbol
indicating the Zbus subscriber buffer allocation
and adjust the name of the existing choices.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2023-11-28 15:33:42 +01:00
Balsundar Ponnusamy 1e7b75d047 samples: drivers: watchdog: add sample application support
add agilex and agilex5 board support in watchdog sample application

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2023-11-27 20:00:29 +01:00
Andy Sinclair a757c26e50 samples: shields: npm1300_ek: Fix display of negative temperature
Update temperature printing to handle negative values.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-27 19:57:57 +01:00
Andy Sinclair f3447c0c1e samples: shields: npm1300_ek: Added missing shell configs
Sample readme states that shell inteface is supported
for evaluation.  Added missing GPIO_SHELL and SENSOR_SHELL
to Kconfig.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-27 19:57:57 +01:00
Andy Sinclair 39564cdf20 boards: shields: npm1300_ek: Settings moved to board overlay
The existing npm1300_ek shield overlay has several example
voltage and gpio settings.  For many use cases these are
invalid and need to be overridden, or removed with
delete-property.

These example configurations have been moved to a board
specific overlay.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-27 19:57:57 +01:00
Alberto Escolar Piedras 8f78b7148c samples/bluetooth: sysbuild: Add Kconfig setting for HCI IPC inclusion
Introduce NET_CORE_IMAGE_HCI_IPC Kconfig setting to control inclusion
of HCI IPC image when building through sysbuild.

This allows users with custom netcore applications to avoid inclusion
of the default HCI IPC image.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 12:19:56 +00:00
Juha Ylinen 637b4b62ee samples: lwm2m: Add support for Connection Manager
Using Connection Manager, it's easy to run lwm2m sample on
devices supporting different connectivity technologies
(for example, Wi-Fi and LTE).

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
2023-11-27 12:16:10 +00:00
Johan Hedberg f89c5ddd1a samples: chre: Fix format strings for size_t types
The correct printf format specifier for size_t is %zu. Without this
change the sample generates warnings like this:

warning: format '%u' expects argument of type 'unsigned int', but
argument 2 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-11-24 13:10:24 +02:00
Torsten Rasmussen 13f3c6d0bd sysbuild: introduce Kconfig setting for controlling HCI IPC inclusion
Follow-up: #64704

Introducing NET_CORE_IMAGE_HCI_IPC Kconfig setting to control inclusion
of HCI IPC image when building through sysbuild.

This allows users with custom netcore applications to avoid inclusion
of the default HCI IPC image.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-24 09:27:43 +01:00
Francois Ramu f442c03a20 samples: subsys: nvs on nucleo_g431 requires 6kB for storage partitions
Add the overlay for running the samples/subsys/nvs/ application
on the nucleo_g31rb. Define a 6kB storage_partition at the end
of the 128kB flash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-23 10:02:33 +01:00
ingram weeks 3f1024b93f doc: README.rst added to subsys/console/echo sample
README added to the console echo sample

Signed-off-by: ingram weeks <ingram.weeks@gmail.com>
2023-11-22 09:37:38 +00:00
Keith Packard bf6c2fcde8 samples/bluetooth/hci_ipc: Reduce printf size
When using picolibc before 1.8.5, the only way to get 'long long' support
was to use the full version, including floating point support. This is too
large for this testcase.

Reduce the size of the printf code by switching to the version without
64-bit integer support. This allows the test to pass when using older
picolibc versions, such as that included with SDK version 0.16.3.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-21 23:04:52 -05:00
Erwan Gouriou 7be1a8119b samples: stm32: serial_wakeup: b_u585i_iot02a support
Add a sample overlay for b_u585i_iot02a

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-21 16:41:40 +00:00
Erwan Gouriou c6bba39f4d dts: stm32wl: Configure LPUART wakeup line
Rather than configuring in serial_wakeup sample, define LPUART1 wakeup
line in wl.dtsi file.

Additionally make few cosmetic changes to nucleo_wl55rj overlay in
serial wakeup sample.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-21 14:22:22 +01:00
Erwan Gouriou 6a96ee88b3 samples: boards: stm32: serial_wakeup: Minor changes
Cleanup sample yaml file and code comments.

Enable PM_DEVICE_RUNTIME mode.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-21 14:22:22 +01:00
Erwan Gouriou b4fcbc4eb6 samples: boards: stm32: serial_wakeup: Fix nucloe_wb55rg configuration
On STM32WB55 series, wakeup in stop mode is not supported.
Disable this state in order to support this sample.

Add comments to other sections of the configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-21 14:22:22 +01:00
Jonathan Rico 934a09550d samples: Bluetooth: Make broadcaster_multiple run on other controllers
`CONFIG_BT_CTLR_ADV_DATA_CHAIN` is a Zephyr Controller exclusive.
Use the max length instead to decide if we should add more data.

The motivation for the change is that tests/bsim/bluetooth/host/adv/chain
does not pass with Nordic's Softdevice Controller because of this.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-11-21 09:56:02 +01:00
Andreas Sandberg b544855ba5 samples: usb-c: sink: Add support for WeAct STM32G431 core
Add support for the WeAct Studio STM32G431 Core board. Note that this
board does not support USB-C PD in its default configuration. See the
board documentation for the necessary hardware reconfiguration.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-11-21 09:54:02 +01:00
Dawid Niedzwiecki e6c7a4c968 tests: pm: add soc pm tests and sample for stm32f4x chip
Add soc power management test and blinky sample for the nucleo_f429zi
board.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-11-21 08:46:17 +00:00
Keith Packard 6c95f23d81 samples/code_relocation_nocopy: Increase fake flash size
When linking with the 0.16.3 SDK version of picolibc, using long long
cbprintf support pulls in the full floating point printf which is much
larger than the integer-only version. This ends up overflowing the memory
region available for it. Increase the size of that by bumping the start of
the fake region by 8kB.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-20 06:07:58 -05:00
Alberto Escolar Piedras 196341c18b samples: Switch integration_platforms from native_posix to native_sim
For all remaining samples which now set their integration platform
as native_posix(_64) switch them to native_sim(_64)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras 868489b98e samples: Enable any which runs in native_posix also in native_sim
Enable the remaining samples which run now in native_posix also
in native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras ab7682ea06 samples/kernel/metairq_dispatch: Correct comment
Clarify comment about why this samples is skipped in
posix arch based targets.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras 33a36df60b samples/subsys/settings: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform
Add conf and DT overlays for native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras cb270a7ecf samples canbus: Add native_sim to platform_allow
Add native_sim in these samples platform_allow filtering.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras 39bf042086 samples/subsys/pm/latency: Switch to native_sim
Switch from native_posix to native_sim as default
test platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras b2a84eaf12 samples bindesc: Add runtime test and change default to native_sim
* In the docs replace references to native_posix with native_sim
* Switch the default test platform to native_sim from native_posix
* Add a runtime check for this sample

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras 4a0dec6a5a subsys/bindesc: Fix kconfig dependency
BINDESC can be used with any POSIX arch based target,
not just native_posix.
Fix the kconfig filter and the sample yaml filter.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras 0ce4de8eec pytest sample & docs: Replace native_posix with native_sim
In the docs replace references to native_posix with native_sim
Switch the default test platform to native_sim from native_posix

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras c93cef0996 docs: Sample definition: Replace native_posix with native_sim
As native_posix is going to be deprecated soon.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras bf466da69f samples zbus: Swap native_posix with native_sim
In the docs replace references to native_posix with native_sim
Switch the default test platform to native_sim from native_posix

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Alberto Escolar Piedras 196ceaf2f4 samples/drivers/uart/native_tty: Swap native_posix and sim overlay
Refer to the native_sim overlay instead of the native_posix one,
as native_posix is going to be deprecated soon.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 12:02:48 +01:00
Lingao Meng 5f1c2f199b Bluetooth: Mesh: Make element as rodata
the reason is that the Mesh Profile clearly stipulates that Mesh nodes
cannot change their own element definitions.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-11-20 09:22:55 +01:00
Fabio Baltieri 9234088306 samples: kscan_touch: drop the kscan_touch sample
All in-tree touchscreen drivers have been migrated over to input, the
compatibility node has been removed from those boards as well, this
sample can be dropped now.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-20 09:22:03 +01:00
Henrik Brix Andersen c0c8952739 shell: do not enable subsystem/driver shell modules by default
Do not enable subsystem/driver shell modules by default and stop abusing
CONFIG_SHELL_MINIMAL, which is internal to the shell subsystem, to decide
when to enable a driver shell.

The list of shell modules has grown considerably through the
years. Enabling CONFIG_SHELL for doing e.g. an interactive debug session
leads to a large number of shell modules also being enabled unless
explicitly disabled, which again leads to non-negligible increases in
RAM/ROM usage.

This commit attempts to establish a policy of subsystem/driver shell
modules being disabled by default, requiring the user/application to
explicitly enable only those needed.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-20 09:21:40 +01:00
Ian Morris dfc747d53a samples: sensor: dht_polling: Add generic dht sample application
This simple application periodically prints the temperature and humidity
measured by one or more digital humidity/temperature sensors.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2023-11-17 10:33:02 -06:00
Jukka Rissanen 9246d98a6a samples: net: mdns_responder: Add VLAN support
Add virtual LAN support to the sample so that it is easier to
test the multiple mDNS listener feature implemented in previous
commit.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-11-17 12:40:33 +01:00
Anas Nashif f25e2201a4 tests: fix various test identifiers
Fix a few inconsistent test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-17 09:27:40 +01:00
Alberto Escolar Piedras 78eebda134 samples shell/devmem_load: Replace native_posix w native_sim
In the docs replace references to native_posix with native_sim
Switch the default test platform to native_sim from native_posix

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-17 09:23:48 +01:00
Alberto Escolar Piedras e2927426d1 samples shell_module: Replace native_posix w native_sim
Replace native_posix with native_sim as the
default integration platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-17 09:23:48 +01:00
Alberto Escolar Piedras 65fd7d4246 samples shell/fs docs: Enable for native_sim
Instead of always enabling fuse for native_posix,
let's give users instructions on how to enable it
while building.

In the documentation: replace the references to native_posix
with native_sim, improve the links, mention the flash
simulator, and provide a separate subsection for FUSE access.

Add a separate test for the sample with fuse access enabled
and be sure it is possible to run both this and the basic
one with native_sim (was filtered out before for native_posix)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-17 09:23:48 +01:00
Seppo Takalo 8cfede8f2e net: lwm2m: Support DTLS Connection Identifier
DTLS Connection Identifier support requires DTLS stack
that supports it. MbedTLS support in Zephyr is already
ported in, also some offloaded sockets support it.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-11-17 09:23:29 +01:00
Lingao Meng 2cd8d40b97 Bluetooth: Mesh: Split Model Structure
Split Model Variables to separate structue.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-11-16 16:52:14 +01:00
Lingao Meng ab08f34fd9 Bluetooth: Mesh: Make bt_mesh_model as rodata
Since model struct most of member should not change at run time,
so mark as const will be suitable and safely.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-11-16 16:52:14 +01:00
Alberto Escolar Piedras 063ce9caf5 samples/subsys/usb/hid: Enable for native_sim
Allow this sample in native_sim, and set it as default
integration platform instead of native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-16 09:37:59 +01:00
Alberto Escolar Piedras 5bf7109767 samples/subsys/usb/cdc_acm: Enable for native_sim
Allow this sample in native_sim, and set it as default
integration platform instead of native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-16 09:37:59 +01:00
Alberto Escolar Piedras 5776d74943 samples/subsys/usb/console: Remove platform_exclude
native_posix and native_sim are already excluded thru
the lack of required tags.
Let's remove the platform exclude instead of adding also
native_sim to it explicitly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-16 09:37:59 +01:00
Vilem Gottwald 1c7eb9ee72 samples: synchronization: add static thread
Replace one of the dynamic threads with a static thread to show the
all the possible ways of creating threads.

Signed-off-by: Vilem Gottwald <xvigo.dev@gmail.com>
2023-11-16 09:25:33 +01:00
Vilem Gottwald 5a4e0af54a samples: synchronization: fix comments & structure
This commit has no functional changes. It makes the comments up to date
with the code and changes the code structure to ensure consistency.

These inconsistencies were introduced when the static thread definition
was replaced with dynamic, but the comments remained unchanged.

 - Fixed outdated comments about the static approach that were
   not corresponding to the code.
 - Rearrange thread definitions, to obtain similar code structure
   for both threads.

Signed-off-by: Vilem Gottwald <xvigo.dev@gmail.com>
2023-11-16 09:25:33 +01:00
Anas Nashif d94bdafda6 tests: clock_control: cleanup test tags and unify them
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 093f9a9df2 tests: adc: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Alberto Escolar Piedras b32e57391b samples/net: Move from native_posix to native_sim
For several samples that today have native_sim
enabled, enable them also for native_sim.

And set native_sim as default integration_platform
instead of native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras eae281bb33 samples sntp_client: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Enable native_sim in the sample yaml

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras 1d6cfc0543 samples coap_server: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Enable native_sim in the sample yaml, and switch
  integration_platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras 3e4b393909 samples coap_server: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Provide overlays for native_sim
* Enable native_sim in the sample yaml
* Remove native_posix from the sample yaml platform_allow as it was
  filtered out by the host libC

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras 2cadcb3df4 samples/net/mqtt_sn_publisher: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Provide overlays for native_sim
* Enable native_sim in the test yaml

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras 01ae8079e5 samples/net/gptp: Move from native_posix to native_sim
* In the sample doc and shell script,
  replace native_posix references with native_sim
* Provide overlays for native_sim(_64)
* Enable native_sim in the test yaml

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras d0f554dd6a docs: networing: Replace references to native_posix w native_sim
Let's replace the references to native_posix with native_sim.

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras e44c43cc2c docs: Networking with native_posix: Rename
Rename
Networking with native_posix
to
Networking with native_sim
replace all links to this page accordingly
and replace its references to native_posix with native_sim.

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras f4a63aa7ae samples/net/tftp_client: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Provide an overlay for native_sim
* Enable native_sim in the test yaml

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras 51ce9c583c samples/net/lwm2m_client: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Provide an overlay for native_sim
* Enable native_sim in the test yaml

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Mariusz Skamra ba61420504 Bluetooth: audio: ascs: Retry ASE state notifications on error
This adds retry logic for ASE state notifications if failed due to
insufficient number of buffers to send ATT PDU. The state transition is
retried after connection interval delay.

Fixes: #64574
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-11-15 10:03:07 +01:00
Krzysztof Chruściński 6022a413d6 samples: drivers: uart: native_tty: Add dependency to UART runtime conf
Force enabling of the UART runtime configuration in the sample.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-11-15 10:02:18 +01:00
Alberto Escolar Piedras b4d0791d1a services/tracing doc & samples: Replace native_posix w native_sim
In the docs replace the references to native_posix with native_sim.
In the sample, add overlays for native_sim, and add native_sim to filter
and as default integration platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras 6e2deeebbc samples/modules/chre: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim.
And switch the default test platform to native_sim from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras 32000aafa1 samples/modules/lvgl: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim.
And switch the default test platform to native_sim from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras 374ecf706d samples drivers eeprom: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim.
Enable this test in natives_sim.
And switch the default test platform to native_sim from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras 388f82f6b3 samples/basic: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim.
And switch the default test platform to native_sim from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras d800634515 samples sensing: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim.
And switch the overlays and default test platform to native_sim
from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras bf02cbc51f samples display: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim
Enable native_sim in the tests, and replace native_posix as integration
platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras 2777461858 samples kernel: Replace references to native_posix w native_sim
Let's replace the references to native_posix with native_sim in
the documentation, and enable this tests by default in
native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras fd281f5ea2 samples native_tty docs: Replace references to native_posix w native_sim
Let's replace the references to native_posix with native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Andrei Emeltchenko a3ff8d5b90 tests: samples: Add up_squared_pro_7000 overlay
Add up_squared_pro_7000 overlay for watchdog test and sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-14 09:23:18 +01:00
Daniel DeGrasse d6d3f9f16a boards: shields: add support for low power on G1120B0MIPI using RT595
Add support for low power mode on the G1120B0MIPI using the RT595. This
configuration is tested via a testcase in samples/drivers/display, which
should validate that the display can be driven by the RT595 when
CONFIG_PM and CONFIG_PM_DEVICE are set.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-14 09:22:59 +01:00
Lars Knudsen 78714b193a samples: Add USB Audio to broadcast audio source
Adds support for using a connected host to
broadcast audio via USB Audio.

Offload LC3 encoding to separate thread.

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2023-11-14 09:22:28 +01:00
Benjamin Cabé fc4967e71f samples: lz4: reduce malloc arena size
PR #63332 introduced a change to the LZ4 sample that set the malloc
arena to an unnecessarily large size.
After testing on native_posix, qemu_m3, and esp32s3_devkitm_appcpu, it
would appear 24K is a much more reasonable (and sufficient) size.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-14 09:04:11 +01:00
Alberto Escolar Piedras d427169845 docs: bluetooth: Replace reference to native_posix w native_sim
Let's replace the references to native_posix with native_sim,

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 09:52:34 +02:00
Alberto Escolar Piedras 49bccb5839 samples/bluetooth/tmap*: Enable in native_sim
Let's enable these samples in the native_sim target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 09:52:34 +02:00
Alberto Escolar Piedras e444f49540 samples/bluetooth/hap_ha: Enable in native_sim
Enable this test in the native_sim target

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 09:52:34 +02:00
Charles Dias c9e6ac54d6 samples: maxim_ds3231: increase variable size in min_alarm_handler
Change the variable name from **us** to **ms** and increase its size
to **uint16_t** within the min_alarm_handler function. This update
allows the function to correctly handle the millisecond values in the
range of 0 to 999.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2023-11-13 12:19:17 -05:00
Jeppe Odgaard 171dbd0435 samples: sensors: add generic co2 sensor polling
Add polling sample for any CO2 sensor.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-11-13 12:14:08 -05:00
Maxin John 461cc8c136 samples: sensor: dht: add longan_nano overlay
Add an overlay to use DHT11 temperature/humidity sensor in Longan Nano.

Signed-off-by: Maxin John <maxin.john@gmail.com>
2023-11-13 12:13:12 -05:00
Armando Visconti 6dd2336a50 sample: board: sensortile_box_pro: extend with lps22df
Extend sensor sample reading also lps22df data.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-13 16:08:46 +00:00
Dominik Kilian 23254f2a16 samples: ipc: Modify icmsg_me sample allowing any multiendpoint backend
There are more ipc_service backends that supports multiple endpoint.
This sample can be used for any of those backends, so this commits
makes the sample more generic. The default backend it still icmsg_me,
but now, the sample has files and instructions for icmsg_with_buf
backend.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2023-11-13 11:11:43 +01:00
Marcin Niestroj 498888d764 samples: sockets: echo_client: assume connected without connmgr
When connection manager (CONFIG_NET_CONNECTION_MANAGER) is disabled,
application starts right away. Scenario that it covers is when static
networking is used, like with emulators (QEMU, Native Sim, ...).

Since 'connected' flag was not set in such scenario, the internal loop
inside start_client() has ended up early and stop_udp_and_tcp() was called
quickly after starting TCP and UDP clients.

Set 'connected = true', when connection manager is disabled, so that it is
assumed that connection is working for the whole duration of the
echo-client sample.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-11-13 09:52:12 +01:00
Dat Nguyen Duy 18a0660be0 samples/tests: skip samples/tests disable MPU for s32ze series
On SoC series s32ze, Zephyr application cannot run with MPU
disabled, skipping relevant samples/tests

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-11-13 09:48:43 +01:00
Daniel Istvan Nemeth e5dbb26c72 samples: drivers: led_ws2812: nRF5340DK support
New config files to support nrf5340-based boards

Signed-off-by: Daniel Istvan Nemeth <nemeth.daniel.istvan@hallgato.ppke.hu>
2023-11-13 09:45:49 +01:00
Declan Snyder 31eb944fcd samples: boards: mimxrt11xx_cm7: Magic addr sample
Add magic address sample to show how to use flexram
magic address using memc flexram driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-13 09:42:28 +01:00
Yuval Peress 94dc05b3f2 sensors: Add streaming APIs
Introduce a streaming API that uses the same data path as the async API.

This includes features to the decoder:
* Checking if triggers are present

Adding streaming features built ontop of existing triggers:
* Adding 3 operations to be done on a trigger
  * include - include the data with the trigger information
  * nop - do nothing
  * drop - drop the data (flush)
* Add a new sensor_stream() API to mirror sensor_read() but add an
optional handler to be able to cancel the stream.

Signed-off-by: Yuval Peress <peress@google.com>
topic#sensor_stream
2023-11-10 12:16:46 -06:00
Pieter De Gendt 1f63c32c03 samples: net: sockets: Add CoAP service example
Replaced the CoAP server example with CoAP services.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Manuel Argüelles db0ec23ba4 tests: samples: watchdog: add s32z270dc2_r52 rev.D
Twister treats board revisions as separate boards, so s32z270dc2_r52
revision D must be added to the filters.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-09 10:20:27 +00:00
Emil Obalski f93243b68f ipc: Remove nocopy feature from icmsg_me backend
Remove nocopy feature from icmsg_me backend.
The backend is not meant to be used to send big
data chunks thus no-copy feature is removed.
If one wants to use no-copy it is recommended
to use icmsg_me only for control messages while
allocator will shall be written seperately.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-11-09 10:18:37 +00:00
Aleksandr Khromykh 7a32e1d84b samples: Bluetooth: Mesh: add main stack for mesh provisioner
The current main stack size is not enough for any platform.
This commit stack size was checked for nrf52840 and nrf5340.
Everything works.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-11-08 15:09:50 +00:00
Aleksandr Khromykh c5ee143d77 Bluetooth: Mesh: no more tinycrypt in ble mesh tfm image
PR allows to get rid of tinycrypt objects from
the final binary of the ble mesh apps based on
PSA TFM crypto.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-11-08 15:09:50 +00:00
Nazar Palamar 4fd732a738 drivers: wifi: added Infineon AIROC WIFI driver
Added initial version of Infineon AIROC WIFI  driver

Added initial version of binding file for Infineon AIROC WIFI
driver

Rename CONFIG_ABSTRACTION_RTOS_COMPONENT_ZEPHYR to
CONFIG_USE_INFINEON_ABSTRACTION_RTOS

Exclude cy8cproto_062_4343w platform from
drivers.modem.esp_at.build test

Change revision hal_infineon to
69c883d3bd9fac8a18dd8384624b8c472a68d06f

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Murali Karicheri 2c5f5bfd0a samples: fs: fat_fs: support on stm32h747i-disco board
This patch allow demonstrating fat_fs sample application on
stm32h747i-disco  board with SD card.

Build fs_sample using following command

west build -p always -b stm32h747i_disco_m7 \
	samples/subsys/fs/fs_sample

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2023-11-08 10:08:19 +01:00
Tom Burdick 79c9f17320 samples: llext shell_loader reduced size
Reduce the heap and stack sizes needed for the shell loader sample app
so more devices may try it out.

Tried on a mimxrt1010_evk and noted the total ram usage was
approximately 44000 bytes. Prior to this change the mimxrt1010_evk was
unable to run the sample as the bss section overflowed the ram size.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-11-08 10:07:50 +01:00
Guillaume Gautier 2caf720c51 samples: board: stm32 pm: add adc power management sample
Add a sample for STM32 ADC power management

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-11-08 10:06:32 +01:00
Murali Karicheri ec031029f4 samples: fs: littlefs: sdmmc: remove fstab and fixed partition
For littleFS, the fstab entries in DTS are ignored currently.
So remove the overlay entries for the same. Also fixed-partitions
can't be used for sdmmc-disk. So remove the same. We just need to
have sdmmc node with zephyr,sdmmc-disk compatible string to have
littleFS working on disk.

build littleFS sample as follows:-

west build -p always -b stm32h747i_disco_m7 \
samples/subsys/fs/littlefs/ -- \
-DOVERLAY_CONFIG=boards/stm32h747i_disco_m7.conf \
-DCONF_FILE=prj_blk.conf

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2023-11-07 14:11:06 +01:00
Seppo Takalo 0a104185fe tests: lwm2m: Add Qemu X86 and fix Qemu Cortex-M3
* Add support for running interoperability tests with
  Qemu X86.
* Remove some debugging messages to allow binary to
  fix Qemu Cortex-M3 board.
* Tune buffer and stack sizes to fit all boards.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-11-07 09:47:00 +01:00
Alberto Escolar Piedras 3dce4c7ba3 samples/net/cloud/aws_iot_mqtt: Fix sample yaml
The sample yaml filter syntax was incorrect.
Fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 16:06:36 +01:00
Alberto Escolar Piedras b3447ec068 tests bsim: Add simple tests for broadcast audio source/sink samples
Add an initial test based on the broadcast audio source/sink samples
which runs them together and after waiting for a predefined
amount of time, checks how many audio packets has the
sink received, and if over a threshold, passes the test.

This test can be expanded after to cover more functionality from
these samples.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras 11fddf4a41 Bluetooth samples: broadcast audio: Improve documentation
With examples of how to build for several boards.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras c929ac5c23 Bluetooth samples: broadcast audio: Add support for more nrf targets
Add support for the simulated nrf5340 and nrf52 in these samples,
as well as explicit overlays for the nrf5340dk.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras 1aa6f85252 Bluetooth samples: broadcast audio sink: Fix overlay for nrf52
Fix controller configuration overlay used when
building the controller (for nrf52 targets),
so the sample can connect to the source and get
audio through.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras c9f09b1d66 Bluetooth samples: broadcast audio: Add more test Kconfig options
Instead of handling some of the configuation thru
board overlays let's handle it thru the sample Kconfig
file, which reduces the amount of duplicate lines.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras 631a6a765a Bluetooth samples: broadcast audio source: Add sysbuild support
So that for both the simulated nrf5340 and real HW nrf5340dk
we build both network and application core images.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras c4628a795f Bluetooth samples: broadcast audio sink: Add sysbuild support
So that for both the simulated nrf5340 and real HW nrf5340dk
we build both network and application core images.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Francois Ramu 0dcaa4c668 boards: arm: stm32f746 with all mpu regions when testing in userspace
Disable the  quadspi mpu region of the nucleo_f746zg
when testing the samples/userspace/shared_mem
or tests/kernel/mem_protect/userspace
The stm32f7 cortex M7 has 8 MPU regions and the one for quadspi prevents
the testcase to PASS.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-06 12:32:08 +01:00
Alberto Escolar Piedras c914c512a0 samples/tests: Remove REQUIRES_FULL_LIBC=y due to LIBLC3
As now this is handled by the LIBLC3 kconfig

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 10:10:27 +01:00
Francois Ramu 6b87eedee0 samples: drivers: jesd216 reading jedec IDs from stm32 boards
Add the stm32-ospi-nor or  stm32-qspi-nor compatible to run the sample
on stm32 boards without jedec,spi-nor compatible.
No more config file needed to get the jedec ID and SFDP info from the
external quad- or octo-SPI flash of the stm32 disco boards.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-03 11:46:58 +01:00
Anas Nashif 1a9de05767 syscall: rename Z_SYSCALL_DRIVER_ -> K_SYSCALL_DRIVER_
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif 9c4d881183 syscall: rename Z_SYSCALL_ to K_SYSCALL_
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif 9c1aeb5fd3 syscall: rename z_user_ to k_usermode_
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif 56fddd805a syscall: rename z_user_from_copy -> k_usermode_from_copy
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif 4e396174ce kernel: move syscall_handler.h to internal include directory
Move the syscall_handler.h header, used internally only to a dedicated
internal folder that should not be used outside of Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Armando Visconti 22295ee47a sample: board: add SensorTile.box Pro sample for testing sensors
Add sample to test SensorTile.box Pro sensors on board.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-03 11:46:22 +01:00
Murali Karicheri b235372546 samples: fs: littlefs: add sample on stm32h747i-disco board
This adds the required conf and dts overlays required for the
application on stm32h747i-disco board.

Also moved CONFIG_SDMMC_STM32_HWFC option from prj_blk.conf to
nucleo_h743zi_blk.conf as that is STM specific option.

Build the application as

west build -p always -b stm32h747i_disco_m7 \
samples/subsys/fs/littlefs/ -- \
-DOVERLAY_CONFIG=boards/stm32h747i_disco_m7.conf -DCONF_FILE=prj_blk.conf

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2023-11-03 11:45:47 +01:00
Ali Hozhabri 0584321ba2 samples: bluetooth: hci_usb: Test exclusion for stm32l562e_dk
STM32L562 Discovery kit is not compatible with Bluetooth over USB
application.

Add missing information related to the BLE capability of this board.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2023-11-03 11:45:38 +01:00
Michele Imbriani bd498178d3 bluetooth: audio: added support for 24kHz frequency to broadcast source
Added option to support 24kHz frequency for broadcast_sample_source
Signed-off-by: Michele Imbriani <mbim@demant.com>
2023-11-03 09:55:35 +01:00
Alberto Escolar Piedras 2ff4ae6a25 Bluetooth samples: unicast audio: Add nrf5340_audio_dk to sysbuild
Add support for the nrf5340_audio_dk to the sysbuild files

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras 1f2ef32ad8 Bluetooth samples: unicast audio: Change integration_target
Change the integration target to something more meaningfull,
i.e. something users are more likely want to try it on,
and therefore in which it is better to do more testing.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras ff064f6f59 Bluetooth samples: unicast audio: Remove useless test targets
Remove the qemu targets for the controller configuration.
As those do not support the controller, it is just meaningless.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras 942923edaf Bluetooth samples: unicast audio: Provide configuration for native_sim
Provide configuration for native_sim instead of native_posix
and enable it in the samples.yaml
native_posix is being deprecated in favour of native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras d561548863 Bluetooth samples: unicast audio: Improve documentation
With examples of how to build for several boards

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras a0ed29409b tests bsim: Add tests for unicast client/server samples
Add a test based on the unicase client/server samples
which runs them together and after waiting for a predefined
amount of time, checks how many audio packets has the
client received, and if over a threshold, passes the test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras 4368765e3c Bluetooth samples: unicast server: L2CAP configuration workaround
Due to this bug:
https://github.com/zephyrproject-rtos/zephyr/issues/64574
We need to increase the number of L2CAP Tx Buffers
so this sample can be used.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras 2ffe02b2d9 Bluetooth samples: unicast: Fix configuration for nrf5340
Provide a configuration for the sample we can use
by default with the ISO capable hci_rpmsg controller
sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras cbe1025bf9 Bluetooth samples: unicast audio server: Add sysbuild support
So that for both the simulated nrf5340 and real HW nrf5340dk
we build both network and application core images.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras ea8d18f742 Bluetooth samples: unicast audio client: Add sysbuild support
So that for both the simulated nrf5340 and real HW nrf5340dk
we build both network and application core images.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras 979f8ebead Bluetooth samples: unicast audio: Add support for simulated nrf5x
Add support for the simulated nrf5340 and nrf52 in these samples.
And enable building in twister both for these and for the
already supported nrf5340dk.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Anas Nashif 4c21090dcb samples: net: fix twister filter
Use not for negation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-02 13:19:56 -04:00
Daniel DeGrasse 7cbdbaf146 samples: ipc: openamp: fix build for IMXRT11xx
Fix build for IMXRT11xx SOCs. The ARM MPU header was missing for the CM4
board overlays, add the required header so the sample can build.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-02 09:45:29 +01:00
Carles Cufi 9cf07bbdb5 bluetooth: Rename rpmsg HCI driver and sample to ipc
The existing driver and sample:

- drivers/bluetooth/hci/rpmsg
- samples/bluetooth/hci_rpmsg

are no longer correctly named, since they now use the IPC subsystem to
send and receive data. The IPC subsystem can use RPMsg as a transport,
but that is one of several selectable backends.

I initially wanted to deprecated both the BT_RPMSG Kconfig option as
well as the zephyr,bt-hci-rpmsg-ipc chosen node in Devicetree. However,
this proved to be undoable in the case of the Kconfig option. This is
because it's a choice option, and those have special behavior. In
particular, the only practical way to deprecate would've been to keep
the old Kconfig option outside the choice (much like it's done in this
commit) but then also add a 'depends on !BT_RPMSG' on each of the
remaining choice symbols *except* on the new BT_HCI_IPC one. This, however,
only works correctly for .conf files. If a board instead sets the
default BT_HCI_BUS_TYPE in the Kconfig.defconfig file then the Kconfig
tree parsing would fail, because it'd try to set it to a value
(BT_RPMSG) that is no longer part of the choice.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-11-02 08:32:20 +02:00
Henrik Brix Andersen 5d5249d85b drivers: can: unify spelling of CAN Flexible Data-rate abbreviation
Unify spelling of CAN Flexible Data-rate abbreviation to "CAN FD" instead
of "CAN-FD". The former aligns with the CAN in Automation (CiA)
recommendation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-01 11:17:17 +00:00
ingram weeks ad813977c5 doc: README updated for lora driver send sample
README now cross-references the lora receive sample
so that both can be used together more easily.

Signed-off-by: ingram weeks <ingram.weeks@gmail.com>
2023-11-01 11:00:29 +00:00
ingram weeks 74ee677e40 doc: README added to lora driver receive sample
README added to lora driver receive sample.

Signed-off-by: ingram weeks <ingram.weeks@gmail.com>
2023-11-01 11:00:29 +00:00
Alberto Escolar Piedras f4ee15e939 Bluetooth samples: unicast audio client: Fix build warnings
In 85bb2624bc
init_lc3()'s prototype was changed to return an int,
but the code was not updated to return something !=0
on all errors, or 0 on error.

Fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-31 09:02:07 +01:00
Alberto Escolar Piedras 4d7c8790d7 Bluetooth samples: unicast audio server: Fix codec initialization
The lc3_enable code was refering to a variable that does not exist.
Fix it.

Issue was introduced in 9c47eb924f.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-31 09:02:07 +01:00
Bjarki Arge Andreasen b6a8424e95 samples: gnss: Add GNSS sample application
This commit adds a sample which configures a GNSS modem
to enable all available systems, registers callbacks to
the GNSS data and satellites callbacks, and prints the
GNSS data and satellites from the callbacks when invoked
using printk.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Benedikt Schmidt 6202459d9f samples: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Ping Wang f0728ce0aa samples: Bluetooth: Add LC3 to broadcast audio samples
The broadcast audio samples (broadcast_audio_sink
and broadcast_audio_source) are sending mock data,
the apps are improved by using the LC3 module as
the unicast audio samples do.

Signed-off-by: Ping Wang <pinw@demant.com>
2023-10-30 09:27:17 +01:00
Henrik Brix Andersen 49f0c9f221 samples: modules: canopennode: suggest using manifest.project-filter
Suggest users to use "west config manifest.project-filter +canopennode"
instead of "west config manifest.group-filter +optional" in the sample
documentation to avoid pulling in unrelated, optional modules.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-27 13:30:50 -05:00
Andriy Gelman d0961756a6 drivers: watchdog: Add xmc4xxx support
Adds watchdog support for Infineon xmc4xxx MCUs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-10-27 12:58:07 -05:00
Alberto Escolar Piedras e75e04d2d2 samples/bluetooth/hci_rpmsg: Allow building for simulated nrf5340
Allow building these samples for the simulted nrf5340 net core.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-27 10:52:10 +02:00
Alberto Escolar Piedras c6fab4ac77 samples logger multidomain: Add run test for simulated target
Add a runtest for the simulated target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-27 10:51:36 +02:00
Alberto Escolar Piedras b9023d3885 samples logger multidomain: Add support for nrf5340bsim
Add support for this sample on the simulated nrf5340

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-27 10:51:36 +02:00
Alberto Escolar Piedras ee7e6d47d1 samples logger multidomain: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-27 10:51:36 +02:00
Alberto Escolar Piedras 6196acf1d0 samples/drivers/mbox: Add run test for simulated target
Add a runtest for the simulated target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 12:32:53 -05:00
Alberto Escolar Piedras eab2d89f53 samples/drivers/mbox: Convert to sysbuild and add support for nrf5340bsim
Convert this sample application build to sysbuild,
and add support for the nrf5340bsim target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 12:32:53 -05:00
Alberto Escolar Piedras f871bf9a02 samples 802154_rpmsg: Enablel on simulated nrf5340
Enable building this sample on the simulated nrf5340 net
core.
Note that this sample does nothing on its own, as it
requires a companion application core sample to driver it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 12:31:08 -05:00
Anas Nashif 51f6c4269b soc: microchip_mec: do not enable PM in soc
PM should not be enabled by default at the soc level. This is an
application decision and not a platform decision whether to enable or
disable PM features.

Enabling PM by default will result in descripencies and test scope and
failures in tests that do not account for PM being enabled.

Fixes #60359

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-26 12:28:18 -05:00
Alberto Escolar Piedras 7f43b00e23 nrf53_bsim doc: Add paragraph about using sysbuild
And a link to an example sample and its sysbuild.cmake file

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 17:33:16 +02:00
Alberto Escolar Piedras 13c0657bdc samples: nrf53_sync_rtc: Add run test for simulated target
Add a runtest for the simulated target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 17:33:16 +02:00
Alberto Escolar Piedras 4b90dec91f samples: nrf53_sync_rtc: Convert to sysbuild
Convert this sample application build to sysbuild,
and update documentation.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 17:33:16 +02:00
Alberto Escolar Piedras 851e5cdbe2 samples: nrf53_sync_rtc: Add support in nrf5340bsim
Add support for this sample in the simulated nrf5340

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 17:33:16 +02:00
Erwan Gouriou 88de0d15a6 samples: stm32: pm_ble: Enable DEBUG when run with twister
Make sure DEBUG is enabled if this test is run in CI.

Also re-instantiate CONFIG_PM=y which was abusively removed in a previous
change.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-26 09:49:42 +02:00
Henrik Brix Andersen 7579eadaaf modules: canopennode: make the CANopenNode module optional
Make the CANopenNode module, which provides a CANopen protocol
implementation, optional.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-26 09:48:26 +02:00
Andreas Sandberg b41853127f samples: usb_c: Rename port1 to port0 for consistency
Aliases, including usbc_port0, start counting from zero. This meant
that the DT alias is inconsistent with the port numbering in the
samples. Change the numbering scheme to start from zero to make this
consistent.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-10-25 18:37:53 -07:00
Andreas Sandberg d36e42c975 usbc: Use a DT alias to identify USB-C port
Samples sometimes need to identify a default USB-C port. Instead of
hard-coding a node label, use the usbc-port0 alias to point to the
correct node.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-10-25 18:37:53 -07:00
Alberto Escolar Piedras adf9e4000f samples ipc static_vrings: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 17:31:27 +03:00
Alberto Escolar Piedras 19cc0fe099 samples ipc icmsg: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 17:31:27 +03:00
Alberto Escolar Piedras 433f47ee57 samples ipc icmsg_me: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 17:31:27 +03:00
Jamie McCrae f2b3a5ea3a samples: mgmt: mcumgr: smp_svr: Fix start if USB already init
Fixes an issue whereby the application init will stall if USB init
failed if it's already been setup, this is likely due to USB CDC
being enabled in which case the failure can be ignored

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-25 10:05:37 +02:00
ingram weeks 6b739a7684 doc: README added to lora send sample
README added to lora send sample

Signed-off-by: ingram weeks <ingram.weeks@gmail.com>
2023-10-25 10:05:17 +02:00
Alberto Escolar Piedras 7159522597 samples posix uname: Fix sample yaml filtering
The sample was at the same time filtered for the whole
posix architecture and had native_posix as its integration platform.
This is selfcontradictory.

In any case, this sample cannot run in native_posix but
can run in native_sim.
So let's fix the filtering.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 09:57:58 +02:00
Sylvio Alves c179f17836 samples: boards: esp32: add memory-mapped sample code
This sample shows how to use flash_mmap() call to enable custom flash
area to be mapped into data region.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-10-25 09:57:48 +02:00
Keith Packard 1e5c46df3d samples: Switch from NEWLIB_LIBC to REQUIRES_FULL_LIBC
Instead of forcing use of NEWLIB_LIBC, select any available complete C
library implementation. Add CONFIG_REQUIRES_FLOAT_PRINTF and adjust
CONFIG_LIBC_MALLOC_ARENA_SIZE as needed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-25 08:32:06 +02:00
Nikodem Kastelik c0ff691a3c samples: boards: nrf: nrfx_prs: align to new nrfx_uarte struct member
One of the nrfx_uarte event structure members was renamed,
so the sample code has to be aligned.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2023-10-24 11:13:53 +02:00
Pieter De Gendt ae26f1ef9d samples: modules: nanopb: Update requirements
Add installation instruction for adding nanopb to the west workspace.
This is required because it is optional and not installed by default.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-10-24 09:05:50 +02:00
Alberto Escolar Piedras 886d6a9f1f samples subsys logger: Exclude some subtests from posix arch
Two substests (userspace and rtt) cannot be run in the posix
architecture.
Today they are filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-24 09:05:29 +02:00
Alberto Escolar Piedras befc96f22e userspace tests/samples: Exclude in posix arch
These samples & tests cannot be run in this architecture
as it does not support userspace.
Today they are filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-24 09:05:29 +02:00
Fabian Blatz d72159d288 samples: modules: lvgl: demo: Add widgets entry to README
Adds a short description and build command for the widgets demo to the
README.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-10-24 09:05:12 +02:00
Flavio Ceolin 564adad952 treewide: Add CODE_UNREACHABLE after k_thread_abort(current)
Compiler can't tell that k_thread_abort() won't return and issues a
warning unless we tell it that control never gets this far.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 09:04:42 +02:00
Emil Gydesen 7ec0be76ae samples: Bluetooth: Add missing reset of sems in iso_receive
In the iso_receive sample, the semaphores were not reset in
each iteration.

This caused the ISO receiver to act incorrectly and cause
issues with some controllers.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-24 09:04:25 +02:00
Jukka Rissanen 8a4ef3e67a samples: net: sockets: echo: Convert to work both IPv6 and IPv4
The sample enables CONFIG_NET_IPV4_MAPPING_TO_IPV6 and then
turns off IPV6_V6ONLY option which allows it to support both
IPv6 and IPv4 using the same socket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-10-23 09:57:22 -05:00
Andries Kruithof 8b3b8cf2ad Bluetooth: ISO: extend API for setting SDU interval
The BT Core Spec v5.4 allows separate SDU_Interval to
be set on C_To_P and P_To_C directions,
but this is not possible with the existing interface.

This PR splits the interval parameter in the call to
bt_iso_sig_create into one for C_To_P
and one for P_To_C

It also splits the latency parameter into one for
C_To_P and one for P_To_C

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>

Bluetooth: ISO: update UI for extended API

The API for setting the SDU interval and latency have been updated.
This PR also updates the setting of these by the user in the shell
and the iso_connected_benchmark sample

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-10-23 15:22:10 +02:00
Alberto Escolar Piedras e1de306854 doc: samples nrf53_sync_rtc: Fix flash command
Fix the west flash command example using the new flash-args
option.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-23 12:54:31 +02:00
Alberto Escolar Piedras 201a48889c doc: samples net mqtt_sn_publisher fix west invokation
Fix the west invokation. "-t" is added automatically
to the run goal, otherwise we get a "-t -t" command.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-23 12:54:31 +02:00
Jamie McCrae a2b22cbe82 samples: mgmt: mcumgr: smp_svr: Select CRC for SMP over console
CRC support is needed for SMP over console support, therefore
enable it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-23 12:15:41 +02:00
Tomasz Moń afc034e294 samples: cdc_acm: Throttle RX when ringbuf is full
Prevent infinite loop inside interrupt handler when there is incoming
data available and ring buffer is full.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-10-23 12:04:15 +02:00
Maxin John acaaa9e2c5 boards: riscv: longan_nano: add adc support
Add ADC support for longan nano.

Tested using samples/drivers/adc. Also added longan_nano.overlay
and updated documentation.

Signed-off-by: Maxin John <maxin.john@gmail.com>
2023-10-20 15:10:20 +02:00
Seppo Takalo 2df58f65ce samples: lwm2m: Add docker test script
Add test script that uses same configuration that the
interoperability test.

This is only checking that unsecure client registers and
responds to a GET query.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-10-20 15:07:34 +02:00
Anas Nashif 719fee2bbc doc: ztest: adapt ztest docs
Remove remaining usage and documenation of dropped kconfig that is now
the default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Anas Nashif 345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Dmitrii Golovanov c8d6a62b9d samples: gdbstub: doc: Remove redundant sample
Remove gdbstub sample (samples/subsys/debug/gdbstub) as duplicated
by a test (tests/subsys/debug/gdbstub).

Update the GDB stub documentation.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-10-20 15:03:55 +02:00
Dmitrii Golovanov c9e651b12c tests: samples: gdbstub: make test out of the sample
Clone samples/subsys/debug/gdbstub to tests and convert it back
to a build-only sample aligned with documentation.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-10-20 15:03:55 +02:00
Daniel DeGrasse a9aad1de31 samples: modules: lvgl: enable widgets demo
Enable LVGL widgets demo within Zephyr. This demo requires additional
stack and heap space in order to execute correctly, so raise the stack
and heap size to enable it to run.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-10-20 15:03:37 +02:00
Michele Imbriani - Oticon a8f2dc21b5 bluetooth: audio: added broadcast source filtering
Added filtering the broadcast sources by CONFIG_BT_DEVICE_NAME.

Signed-off-by: Michele Imbriani - Oticon <mbim@demant.com>
2023-10-20 15:02:28 +02:00
Alberto Escolar Piedras a12dff48ac samples net/posix: Rename old Makefiles and clarify READMEs
The old Makefiles which can be used to build this samples
directly as Linux apps and the description in the READMEs
could be quite missleading.

Building this apps in this way has nothing to do with the
Zephyr native_posix/sim targets. This is about building
them as actual Linux applications without Zephyr or any
HW models.

So let's rename the Makefiles and change the description
in the docs to avoid confusion.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-20 15:01:42 +02:00
Jeppe Odgaard f1ae151ef6 samples: flash_shell: remove sample code and use FLASH_SHELL
The flash sample and flash shell have implementations that differ
providing similar features.
This commit removes all the code in main.c, only `main()` remains to
reduce redundancy.

Features or improved implementations has not been merged into the flash
shell in this commit.
It should be possible to do in future commits if desired.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-10-20 15:01:17 +02:00
Emil Gydesen 82552b8627 samples: Bluetooth: Add rx stats for BAP Broadcast Sink
Add additional RX stats for the BAP broadcast sink so that a
user can easily follow how well the RX is working, and
for several streams.

This also adds some additional logging to better see
what we are syncing to.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:00:49 +02:00
Jukka Rissanen 7b40014504 samples: net: Remove eth_native_posix sample app
This application is no longer needed as we have removed
the automatic startup support which was used by this sample.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-10-20 15:00:41 +02:00
Benjamin Cabé 17fad703c5 samples: lvgl: sensor: Add LVGL sample for real-time sensor data chart
This adds a new sample for LVGL that displays a real-time chart for
accelerometer data acquired from &accel0 sensor.

This also adds the appropriate overlays so that the sample can also run
on native POSIX and native sim using emulated BMI160.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-20 15:00:02 +02:00
Seppo Takalo 8ffb64d46f net: lwm2m: Allow configuring update period
Add new configuration value CONFIG_LWM2M_UPDATE_PERIOD
that allows calculating update period from last update,
instead of calculating it from the lifetime.

In runtime, server is allowed to change the lifetime of the
registration which causes update perdiod to be effected.

When fixed update period is preferred, UPDATE_PERIOD
config is then used.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-10-20 14:57:38 +02:00
Emil Gydesen 9c47eb924f Bluetooth: Audio: Refactor codec_cfg_get_frame_duration_us
Refactor the codec_cfg_get_frame_duration function to return the
assigned numbers value, instead of a converted value, but with
support for converting the value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 14:56:13 +02:00
Ricardo Rivera-Matos 2107c9109f samples: charger: Creates a generic sample application for chargers
Creates a generic sample application that executes a simple charging
task loop capable of completing a basic charge cycle.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-10-20 14:55:22 +02:00
Daniel DeGrasse 96d6d70f13 samples: drivers: memc: get AHB address dynamically
Use MEMC API to extract AHB address from FlexSPI when using it with the
MEMC sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-10-20 14:53:10 +02:00
Emil Gydesen 0521ffd5a3 Bluetooth: ISO: Rename BT_ISO_ADVANCED to BT_ISO_TEST_PARAMS
Rename the Kconfig option from BT_ISO_ADVANCED to
BT_ISO_TEST_PARAMS to more explicitly denote that it
enables support for using the ISO test parameters.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 14:50:48 +02:00
Andrei Emeltchenko d2c78faf75 doc: samples: smbus: Add console highlight to code block
Display Zephyr console as 'code-block:: console'.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-10-18 17:58:52 +03:00
Benjamin Cabé 9b8b7b36be doc: samples: edac: add syntax highlight to code blocks
display Zephyr shell snippets as "console" code blocks.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-18 15:51:22 +03:00
Tom Burdick c678f25bc1 llext: Fix a bug in section linking
When relocating section symbol addresses the value where the
relocation is to be written is an offset into the section to load.

Simply rewriting it with the section address is not enough, we need
to write the address of the section with the offset into it.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-10-13 16:47:02 +01:00
Andries Kruithof 125e65a976 samples: Bluetooth: remove dup pointer in broadcast_audio_sink
In the broadcast_audio_sink sample there are two pointers defined,
both referencing the same address. We reduce this to one pointer

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-10-11 18:29:34 +03:00
Flavio Ceolin e7bd10ae71 random: Rename random header
rand32.h does not make much sense, since the random subsystem
provides more APIs than just getting a random 32 bits value.

Rename it to random.h and get consistently with other
subsystems.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 14:23:50 +03:00
Erwan Gouriou 1a00636895 samples: tfm_regression_test: Provide a working partition for nucleo_l5
This partition is designed to work regression TFM configuration.

Fixes #59794

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-10 11:18:48 +02:00
Tom Burdick ee588bae7a llext: Update the sample readme with a board
The commands showing west build had -b None which isn't quite right. Add
a :board: property with the tdk_robokit1 as its what I tested on myself.
Also noted that llext isn't supported on every architecture but
intentionally left this a bit vague as updating this little comment
every time something is added seems like a recipe for doc rot.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-10-06 20:53:04 +01:00
Emil Gydesen 8db7be7a6f samples: Bluetooth: Fix seq_num in broadcast audio source
When using multiple streams the seq_num provided to the
controller would be incorrect as we used a single global
seq_num rather than a proper seq_num per stream.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-06 16:18:06 +03:00
Andries Kruithof e04c963d9c Test: Bluetooth: controller: add CI testing for advertising chaining
Update babblesim tests for testing chaining for advertising to ensure that
we spill over to the next PDU

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-10-06 16:04:11 +03:00
Andries Kruithof d00d44c925 Bluetooth: controller: fix failing EBQ advertising tests
Updates the chaining for advertising.
Instead of unconditionally adding a new PDU when new data
is added we now instead fill the last PDU in the chain with
the incoming data, only adding a new PDU when there is
not enough room.

This reduces the nr. of PDUs used for advertising, and also
fixes some qualification failures

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-10-06 16:04:11 +03:00
Benjamin Cabé fc13204937 sensors: mpu6050: samples: fix wrong channel fetch
The MPU6050 does not have SENSOR_CHAN_AMBIENT_TEMP. It should be
SENSOR_CHAN_DIE_TEMP.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-04 10:07:43 +02:00
Benjamin Cabé d24de87aed samples: tfm: wrap lines at 100 characters.
Run formatter to wrap lines at 100 characters.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-03 17:38:36 +02:00
Benjamin Cabé 496faf8677 samples: tfm: fix 404 link to tfm docs
Fix HTTP 404 in link to "Adding Secure Partition" external doc page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-03 17:38:36 +02:00
Johann Fischer 9dc12095a0 samples: usb: mass: update build instruction using RAM disk
Follow up on commit f67dd39bb2
("drivers: ramdisk: use devicetree to instantiate RAM disk").
Unfortunately, the additional argument must be passed for the default
build. Using app.overlay would not always help since the sample has few
board-specific overlays.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-10-03 14:41:49 +01:00
Johan Hedberg dee64613c2 samples: tracing: Reenable the percepio test case
Update to a fixed percepio tree, which allows the build to pass for valid
version numbers with 0 being one of the version number components.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-10-02 16:17:10 +03:00
Johan Hedberg 021003c5c0 samples: tracing: Skip broken percepio test case
The percepio build seems to have a bug and fail whenever the major, minor
or patchlevel numeric value is 0:

Invalid version specified: major: 3, minor: 5, patchlevel: 0

Disable the sample until a proper fix is available.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-10-01 20:29:10 +03:00
Anas Nashif a3eff88792 samples: tfm: depend on psa-arch-tests
Those samples/tests depend on psa-arch-tests module.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-01 09:21:50 +03:00
Anas Nashif 2ed4cf0fde samples: tflite-micro: depend on module
The sample depends on on the tflite-micro module.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-01 09:21:50 +03:00
Anas Nashif a0005188ce samples: compression: add dependency on lz4 module
This sample depends on lz4.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-01 09:21:50 +03:00
Tom Burdick 9c366973e4 llext: Shell loader sample
Adds a sample application that can be used for trying out llext
with the shell. The docs cover how to load a hello world ELF
on to the device, assuming its an arm v7 architecture.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-09-29 20:50:38 -04:00
Jukka Rissanen a59b67c521 samples: net: socket: echo_server: conn mgmt header file missing
The conn_mgr_monitor.h was not included so the compilation
gave warning for missing conn_mgr_ignore_iface() function.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-09-29 18:57:07 +03:00
Emil Gydesen f5dd62bbec Bluetooth: Audio: Update codec_cfg_get_chan_allocation
Update the function name from codec_cfg_get_chan_allocation_val
to just codec_cfg_get_chan_allocation, and add
codec_cfg_set_chan_allocation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-29 16:29:58 +02:00
Anisetti Avinash Krishna 0ed8d90444 samples: drivers: misc: Added sample application for timeaware-gpio
Added sample application for timeaware-gpio uasge.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-09-29 16:28:09 +02:00
Juha Heiskanen 647fb4dc8f net: lwm2m: RD client Deregister event indicate
Added a new event for LWM2M_RD_CLIENT_EVENT_DEREGISTER for
indicate LwM2M client dereistartion.

Updated unit test and sample for new event type

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2023-09-29 16:53:55 +03:00
Henrik Lindblom 1f65c9be87 samples: modbus: add user function code example
Demonstrate user function codes with a simple example with a user defined
fc that maps to a function that just increments a counter every time it's
read.

Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
2023-09-29 13:05:42 +02:00
Jeppe Odgaard a2f1e6222e samples: led_ws2812: adjustable led update delay
Add a Kconfig option to adjust update frequency of the LED strip.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-09-29 12:59:04 +02:00
Robert Lubos 815e7a1e34 samples: net: sockets: socketpair: Replace integration platform
mps2_an385 was excluded from networking tests, therefore can no longer
be used as an integration platform. Replace it with qemu_x86.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-28 17:29:00 -04:00
Benjamin Cabé 79674debcb samples: bindesc: doc: Describe sample using zephyr:code-sample
Describe the code sample using zephyr:code-sample directive to help
with making it easier to find from API reference.
Also cross-referenced main bindesc page from the sample.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-28 23:04:47 +03:00
Yonatan Schachter f4e2a669eb samples: hello_bindesc: Improved README.md
Improved the README.md of the hello_bindesc sample by adding a
note about non existing bin files and referencing the relevant
parts of the documentation.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-09-28 23:04:47 +03:00
Daniel Leung 0a50ff366e kernel: rename z_current_get() to k_sched_current_thread_query()
The original idea of z_current_get() was to be the counterpart
of k_current_get() when thread local variable for current has
not been initialized if TLS is enabled, otherwise they are
the same function. Now since z_current_get() is being used
outside of core kernel, rename it under kernel namespace so
other subsystem can conceptually use them too.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-28 16:15:46 +02:00
Emil Gydesen 85bb2624bc Bluetooth: Audio: Refactor codec_cfg_get_freq
Refactor the codec_cfg_get_freq function to return the assigned
numbers value, instead of a converted value, but with
support for converting the value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-28 14:05:18 +02:00
Yonatan Schachter fd5fe8fe10 samples: bindesc: Add hello_bindesc sample
Add the hello_bindesc sample which shows the basic usage of
binary descriptors.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-09-28 07:39:09 -04:00
Vinayak Kariappa Chettimada 28ed48cbac Bluetooth: Controller: Fix connected ISO dynamic tx power
Fix connected ISO dynamic tx power support compilation
error.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-09-28 13:31:40 +02:00
Emil Gydesen 34c9587539 samples: Bluetooth: Add broadcast sink data validation
Add validation of incoming ISO data for the broadcast sink
sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-28 13:18:07 +02:00
Aleksander Wasaznik 347ce7aa7f bluetooth: samples: Add hci_uart_async
This sample is an alternative implementation of hci_uart. The new sample
differs from the existing sample in that it uses the async UART API
instead of the interrupt driven API.

Included in this commit is a new test for HCI UART flow control. It's
enabled for hci_uart_async. The test can excercise also the existing
hci_uart sample (with some minimal changes to allow compiling in the
mock controller and test suite). The existing hci_uart sample currently
fails the flow control test.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-09-28 14:07:52 +03:00
Rodrigo Peixoto 94f98b6cf0 samples: zbus: add Message subscriber sample
This sample illustrates how to use message subscribers with ZBus.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-09-27 20:03:43 +03:00
Aaron Massey 12cbfcf397 fuel_gauge: Repl property struct w/ union
Based on review of the similar charger driver API, it's been demonstrated
from the community that embedding a per value property type when fetching
properties. Separating off the property types from the property values
themselves also allow an array of property types to declared as static
const.

Break up fuel_gauge_property struct into a fuel_gauge_prop_val union and a
fuel_gauge_prop_t property type as inputs into fuel gauge API functions.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Aaron Massey 329ecd1e12 fuel_gauge: Remove status from fuel gauge properties
Based on review of the similar charger driver API, it's been demonstrated
from the community that embedding a per value status code when fetching
multiple properties isn't particularly wanted or needed. It was largely
considered not worth the additional maintenance to have the extra per
property error information.

Remove the status field from the fuel_gauge property value structs.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Aaron Massey e294b16a2f fuel_gauge: Add fuel_guage_get_props()
The fuel_gauge_get_prop() function prototype declares a function that
retrieves multiple fuel gauge properties at once. The naming suggests it
ought to fetch a singular property at a time. Moreso, some clients may just
want to fetch properties one at a time and may feel uncomfortable using a
prototype for fetching multiple properties when wanting to fetch them one
at a time.

Modify fuel_gauge_get_prop() to fetch a single property and add
fuel_gauge_get_props() to support fetching multiple properties. Modify
existing tests/drivers/samples.

This is part of #61818 work.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Sylvio Alves 18eff4ea00 samples: ipc: update esp32 board reference
After esp32 board was split into several different models,
rpmsg sample code was missing the change. Make esp32_devkitc_wrover
the default option.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-09-27 12:07:21 +02:00
Sylvio Alves 41e615c7ac samples: ipc: add esp32s3_devkitm as supported board
Add IPC same code for esp32s3_devkitm enabling second core.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-09-27 12:07:21 +02:00
Fabian Blatz c7f8033f2b modules: lvgl: simplify sys_heap memory size configs
Changes the Kconfig symbols for the sys_heap based memory management option
and removes the notion of `BLOCKS` with a more concise single
`LV_Z_MEM_POOL_SIZE` option. Also adds `LV_MEM_CUSTOM` to the lv_conf.h,
since in any option the memory management is considered to be custom.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-27 09:54:08 +02:00
Robert Lubos bcea9f7c92 samples: net: sockets: big_http_download: Align documentation
Update the TLS part of the big_http_download sample to reference the
currently used server used for file download.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-27 09:53:58 +02:00
Robert Lubos 36dec835c4 samples: net: sockets: big_http_download: Update root certificate
The download server that the origin server redirects to seems now to
use different certificate (signed by a different root CA). Therefore
add the additional root CA to the certificate list and refactor the
sample code a bit to allow to easily extend/replace certificates in the
future.

Bump the mbed TLS heap size a bit to accommodate the extra registered
certificate.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-27 09:53:58 +02:00
Anas Nashif 31c22c9a77 samples: gdbstub: test using pytest
Test gdb stub using pytest.

Co-developed-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 09:53:23 +02:00
David Corbeil d732a8678b logging: runtime setting of syslog server ip address
Added functionality to change the syslog server's
ip address at runtime as well as sample for
syslog network backend

Signed-off-by: David Corbeil <david.corbeil@dynon.com>
2023-09-27 09:13:23 +02:00
Benjamin Cabé 14c92da96d doc: stm32: Update all st.com links to use HTTPS
While recent browsers seem to transparently try to use https for
http://www.st.com/... URLs, they are effectively not working anymore, so use
https://www.st.com/... URLs instead.

curl http://www.st.com/en/evaluation-tools/nucleo-g070rb.html -m 5 -v
*   Trying 104.89.117.48:80...
* Connected to www.st.com (104.89.117.48) port 80 (#0)
> GET /en/evaluation-tools/nucleo-g070rb.html HTTP/1.1
> Host: www.st.com
> User-Agent: curl/8.1.2
> Accept: */*
>
* Operation timed out after 5002 milliseconds with 0 bytes received
* Closing connection 0
curl: (28) Operation timed out after 5002 milliseconds with 0 bytes
received

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-26 16:55:08 +02:00
Iuliana Prodan 8148643881 ipm: imx: send firmware ready reply to check for fw boot completion
Send a fw ready reply message as soon as possible.
This is usually used on host side which is waiting
for this message in order to establish the
communication with the remote processor - see
imx_dsp_rproc driver from Linux.

This can be enabled by IPM_IMX_FW_READY_REPLY config,
which is by default N.

Set CONFIG_IPM_IMX_FW_READY_REPLY as Y for
openamp_rsc_table sample, running on nxp_adsp_imx8m.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-09-26 16:54:04 +02:00
Dominik Ermel 11ab88f10c samples/mcumgr/smp_svr: Build for DirectXIP with revert
Adds sample build for
 CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT=y

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-26 13:40:11 +02:00
Benjamin Cabé 2479af21f6 doc: samples: Fix incorrect maxdepth for some toctrees
The table of contents for the samples' catalog was showing too many
levels for some sections.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-26 12:02:54 +02:00
Benjamin Cabé 7a6f251edb doc: samples: tfm: remove extra title
Removed the redundant title heading from this page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-26 12:02:54 +02:00
Benjamin Cabé d0f27ac7ed doc: samples: Fix typos introduced by f6a4217a
Fixed typos in references to several doc pages introduced
with f6a4217a.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-26 08:38:42 +02:00
Lucas Dietrich 66b131928b lorawan: Set dev_nonce to 0 during join_cfg initialization
Ensure the LoRaWAN dev nonce is initialized with a known state in the
class_a sample.

Signed-off-by: Lucas Dietrich <lucas.dietrich@socomec.com>
2023-09-26 08:38:05 +02:00
Anas Nashif a833d20ffb boards: nucleo_g0b1re: add arduino_serial as supported
To make some tests requiring the dependency happy.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-25 18:42:05 -04:00
Anas Nashif 3e2ada7451 tests: tracing: TraceRecorderSource was renamed to percepio
Change module name in dependencies of test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-25 18:42:05 -04:00
Pavlo Havrylyuk 3a119979d6 samples: userspace: exclude cy8cproto boards from sample
Excluded cy8cproto_062_4343w and cy8cproto_063_ble from
samples/userspace/shared_mem sample due to a hardware
limitation with number of available MPU regions.
Sample throws warning:
`num_parts of 4 exceeds maximum allowable partitions (2)`
With the Cortex M4 on the boards only 2 mpu regions are left
and available to be used with the sample.

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-09-25 19:42:13 +02:00
Benjamin Cabé 32dcd2e523 samples: shields: Update Nucleo shields to new code-sample extension
Update all Nucleo shield samples and references to them so that they
use the new zephyr:code-sample extension.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-25 16:43:05 +02:00
Jamie McCrae c350c65be8 samples: mgmt: mcumgr: smp_svr: Add sysbuild file
Adds a sysbuild file which includes MCUboot, as the sample is
dependent upon it.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-25 12:47:22 +02:00
Nick Ward ead0c4f865 drivers: adc: use adc_read_dt api
Where struct adc_dt_spec is in use use adc_read_dt().

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-09-25 09:52:16 +02:00
Benjamin Cabé c702b03abd samples: webusb: Fix HTML validator issues
Running the HTML code through W3C Validator revealed several issues with
the markup that this commit fixes.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-25 09:48:01 +02:00
Andrei Emeltchenko 5942343a81 samples: webusb: Update README
Update webusb README with recent changes after index.html was moved to
sample from the external repository.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-25 09:48:01 +02:00
Andrei Emeltchenko 17fcf58a5e doc: samples: usb: Include only README to TOC
Include only README.rst to docs, skipping helpers included with :doc:
directive.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-25 09:48:01 +02:00
Benjamin Cabé 43c139a5f6 samples: webusb: Include demo.rst to documentation
Include demo.rst to the webusb sample documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-25 09:48:01 +02:00
Andrei Emeltchenko 0aaa5a9ac2 samples: webusb: Copy needed file from the external repository
Copy file index.html from the external repository
finikorg/webusb-sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-25 09:48:01 +02:00
Ryan McClelland 65a15e9299 samples: tflite-micro: update samples for latest tflite-micro
tflite-micro now uses MicroPrintf instead of MicroErrorReporter. Update
the samples to use this function instead. AllOpsResolver is now removed
from tflite-micro. AllOpsResolver was also removed in the latest
tflite-micro. Use MicroMutableOpResolver and only include the kernels
used instead.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-25 09:46:33 +02:00
YuLong Yao 0b1cc77aff samples: sensor: qdec: add esp32s3_luatos_core
add support for esp32s3_luatos_core

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao cf8ac53d0d samples: basic: blinky_pwm: add esp32s3_luatos_core
add support for esp32s3_luatos_core

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao e69616291b samples: drivers: counter: add esp32s3_luatos_core
add support for esp32s3_luatos_core

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao 24b35d0ddb samples: drivers: adc: add esp32s3_luatos_core
add support for esp32s3_luatos_core

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao 196ce41f63 samples: subsys: settings: add esp32s3_luatos_core
add support for esp32s3_luatos_core

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao 3ebb8953e4 samples: net: wifi: support esp32s3_luatos_core
add overlay and conf for esp32s3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
Fabian Blatz b94641697f samples/modules: Add LVGL demo sample
Adds a sample which allows to build the LVGL upstream demo applications
(music, benchmark, stress).

Resolves issue #62744.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-22 09:26:29 +02:00
Jaxson Han 5b8df16ef6 samples: arch: smp: pi: fix the stack overflow issue
The stack guard report this testcase has the stack overflow issue. To
fix the issue, slightly increse the stack size.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-09-22 09:25:12 +02:00
Emil Gydesen 2147eefa15 Bluetooth: PACS: Remove CONFIG_BT_PACS_{SNK,SRC}_CONTEXT
The Kconfig option was never used by the stack and should
thus be removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-22 09:21:53 +02:00
Benjamin Cabé f6a4217a88 doc: driver: samples: Update driver samples to use new Sphinx extension
Migrated existing driver samples to use the new code-sample directive
and role.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 09:21:43 +02:00
Benjamin Cabé 336941a1e5 samples: drivers: cleanup led_xec README
The README file for led_xec sample had several formatting issues
causing it to render very poorly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 09:21:43 +02:00
Saw Xu 8951bab7e7 samples: subsys: usb: audio: Add volume control case
Add sample code for getting volume to headset sample and
headphone_microphone sample

Signed-off-by: Saw Xu <Saw1993@126.com>
2023-09-21 15:04:14 +02:00
Erwan Gouriou 235319cfaa samples: boards: stm32: power_mgmt: Disable exclusive device PM
Disable exclusive PM run time handling as PM_DEVICE_RUNTIME is not
supported in all drivers.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-09-21 15:04:05 +02:00
Anas Nashif 42d8f7ff17 samples: pm: fix init priority after init level change
Moving from APPLICATION level to POST_KERNEL and keeping both parent and
child on the same level is causing problems, so fix this by putting them
on different priorities in POST_KERNEL.

Also, this sample runs fine in qemu, so make it the integration
platform.

Fixes #62772

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-21 13:59:46 +02:00
Benjamin Cabé 4f1cd0e428 doc: Migrate subsys/ code samples to new Sphinx extension
This migrates the subsys code samples to the new Sphinx code-sample
extension, making it easier to find relevant samples when browsing
API reference.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-21 09:28:31 +02:00
Vinayak Kariappa Chettimada e8fe144f3a Bluetooth: Controller: Fix missing PHY_CODED cond compile
Fix missing Coded PHY implementation conditional compile
causing compile error when disabling Coded PHY support in
SoCs that have radio that support Coded PHY.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-09-21 09:27:15 +02:00
Pavlo Havrylyuk 166d89c69e tests: drivers: Added overlays to tests for 063_ble
Fixed pinout in adc overlays to align with board
Allowed adc driver sample
Added overlay for gpio_basic_api test support
Added overlay for i2c_api test support

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-09-20 20:23:20 +01:00
Emil Gydesen f93caa3903 Bluetooth: Audio: BT_AUDIO_CODEC_LC3_ID -> BT_HCI_CODING_FORMAT_LC3
Replace the BT_AUDIO_CODEC_LC3_ID macro with the
BT_HCI_CODING_FORMAT_LC3 as there is no reason to
define and use the LC3 ID different than the other
allowed codec IDs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-20 20:19:50 +01:00
Steve Boylan 0341c6cbcf samples: sensor: bme280: Demonstrate RP2040 PIO
Demonstrate use of the Raspberry Pi Pico PIO SPI driver.
Added rpi_pico test cases to sample.yaml

Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
2023-09-20 20:18:54 +01:00
Emil Gydesen d327b1625c Bluetooth: BAP: Broadcast source reconfig with subgroups
Modify the bt_bap_broadcast_source_reconfig to use the same
parameter struct as bt_bap_broadcast_source_create so that
the two are more similar, since they both set the same values.

This allow for full control of which subgroups and stream
are updated.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-20 20:16:52 +01:00
Anas Nashif 78eda66eb5 samples: synchronization: build this sample on all platforms
Try to catch issues related to platforms and HAL changes using this
basic sample. We have the same flag for a kernel test, but this is
skipped if no kernel changes are present in the PR, so we were missing
some coverage of platform related changes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-20 10:05:14 -04:00
Benjamin Cabé 944f0d4875 samples: net: fix bad gsm-modem code-sample id
The GSM Modem sample is referred to as gsm-modem, not gsm-modem-sample.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-20 11:36:12 +01:00
Benjamin Cabé d65d3046a5 samples: usb: wpanusb: fix bad code-sample id
The WPAN USB sample is referred to as wpan-usb,
not _wpansub.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-20 11:36:12 +01:00
Benjamin Cabé a4cabee9d8 samples: net: doc: fix bad code-sample id
The Echo server simple sample is referred to as sockets-echo,
not socket-echo.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-20 11:36:12 +01:00
Pavlo Havrylyuk dfd3d6e6cb samples: sensor: die_temp_polling: add @ symbol to regex
Added @ symbol for when address of dietemp sensor is printed

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-09-19 15:23:52 +01:00
Benjamin Cabé 994558ef8e samples: net: doc: Use new Sphinx extension to document networking samples
Use the new code-sample directive and roles to document the networking
samples so that they show up as "Related samples" when browsing the
various relevant networking APIs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-19 15:22:59 +01:00
Benjamin Cabé b0f92e13b9 doc: video: samples: Use new Sphinx extension to document samples
Use the new code-sample directive and roles to document the video
capture samples so that they show up as "Related samples" when browsing
the API documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-19 15:22:37 +01:00
Emil Gydesen 3cb0d7ad6f samples: Bluetooth: TMAP Peripheral fix appearance
Use the defind value, BT_APPEARANCE_WEARABLE_AUDIO_DEVICE_EARBUD,
instead of the hard coded "magic numbers".

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-19 15:21:42 +01:00
Emil Gydesen 88fa4904ab samples: Bluetooth: TMAP peripheral context fixes
The sample did not properly include the source
context in the advertising data.

It also set different contexts for PACS and the advertising data

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-19 15:21:42 +01:00
Johann Fischer f67dd39bb2 drivers: ramdisk: use devicetree to instantiate RAM disk
Rework RAM disk driver to be configured using devicetree and
support multiple instances.

This patch also removes a copy of the RAM disk driver,
tests/subsys/fs/fat_fs_dual_drive/src/disk_access_test_drv.c,
that was there for testing multiple disk drivers support.

Bonus: one SYS_INIT() less and a memory region can be exported to the
host.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-09-18 17:36:50 +02:00
Flavio Ceolin efea1ad398 samples: userspace: Remove unnecessary build options
This sample is selecting many things that are not needed,
just remove them.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-18 10:44:04 +01:00
Alberto Escolar Piedras ff14d64086 samples zbus benchmark: Fix twister filter
For the posix arch, this sample only works for native_posix,
all others will get a build error:
https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/subsys/zbus/benchmark/src/benchmark.c#L20
So let's filter them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-18 10:43:17 +01:00
Aaron Massey a7b25d599b fuel_gauge: Join get/set prop structs
The fuel gauge API uses separate get/set property structs to indicate what
properties are readable or writable. This lead to duplication in property
names and potential confusion for new users of the API. See issue #61818.
In addition to above, drivers already determine at runtime if a property is
supported for read or write actions.

Join the get/set fuel gauge property structs as a single struct.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-18 10:38:59 +01:00
Manuel Argüelles c9cc03b6ef samples: tracing: exclude mr_canhubk3 board
The mr_canhubk3 board enables by default an off-chip watchdog that must
be serviced to avoid triggering a reset and cannot be disabled on a
per-test basis.

The amount of data printed on this test prevents to initialize the
on-board watchdog within the expected window, causing a board reset.
Hence do not run the test on mr_canhubk3 board.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-18 10:37:22 +01:00
Gerard Marull-Paretas 4dd7bc997f samples: pm: move to POST_KERNEL
There's no need to use APPLICATION level.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:04:19 +02:00
Gerard Marull-Paretas 4f80e50b55 bluetooth: controller: coex: convert to DT device
Convert the driver to a dt-based device. Also update Kconfig so that it
depends on the right compatible being enabled, initialize in POST_KERNEL
(APPLICATION should not be used for devices) and remove one redundant
include.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:04:19 +02:00
YuLong Yao 49e5394e1c samples: basic: blinkypwm: add esp32s3_luatos_core
add overlay and conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao 8092b8d96b samples: sensor: die temp: add esp32s3_luatos_core
add overlay and conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao 75778574da samples: drivers: adc: add esp32s3_luatos_core
add overlay and conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao 8876e9d733 samples: drivers: counter: add esp32s3_luatos_core
add overlay and conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao ff264dc03e samples: boards: deepsleep: add esp32s3_luatos_core
add overlay and conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao 8a29fb5fa5 samples: subsys: settings: add esp32s3_luatos_core
add conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao 10d66c4f63 samples: subsys: nvs: add esp32s3_luatos_core
add conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao 8704419126 Samples: net: wifi: add esp32c3_luatos_core board
add overlay and conf for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
Pieter De Gendt 0357b4d4f5 modules: nanopb: Add helper function to generate sources
Introduce a helper function zephyr_nanopb_sources to generate
source files and add these to a target.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-09-15 12:57:40 +02:00
Carlo Caione e4a125b6a4 dt: Make zephyr,memory-attr a capabilities bitmask
This is the final step in making the `zephyr,memory-attr` property
actually useful.

The problem with the current implementation is that `zephyr,memory-attr`
is an enum type, this is making very difficult to use that to actually
describe the memory capabilities. The solution proposed in this PR is to
use the `zephyr,memory-attr` property as an OR-ed bitmask of memory
attributes.

With the change proposed in this PR it is possible in the DeviceTree to
mark the memory regions with a bitmask of attributes by using the
`zephyr,memory-attr` property. This property and the related memory
region can then be retrieved at run-time by leveraging a provided helper
library or the usual DT helpers.

The set of general attributes that can be specified in the property are
defined and explained in
`include/zephyr/dt-bindings/memory-attr/memory-attr.h` (the list can be
extended when needed).

For example, to mark a memory region in the DeviceTree as volatile,
non-cacheable, out-of-order:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_VOLATILE |
			       DT_MEM_NON_CACHEABLE |
			       DT_MEM_OOO )>;
   };

The `zephyr,memory-attr` property can also be used to set
architecture-specific custom attributes that can be interpreted at run
time. This is leveraged, among other things, to create MPU regions out
of DeviceTree defined memory regions on ARM, for example:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-region = "NOCACHE_REGION";
       zephyr,memory-attr = <( DT_ARM_MPU(ATTR_MPU_RAM_NOCACHE) )>;
   };

See `include/zephyr/dt-bindings/memory-attr/memory-attr-mpu.h` to see
how an architecture can define its own special memory attributes (in
this case ARM MPU).

The property can also be used to set custom software-specific
attributes. For example we can think of marking a memory region as
available to be used for memory allocation (not yet implemented):

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_NON_CACHEABLE |
			       DT_MEM_SW_ALLOCATABLE )>;
   };

Or maybe we can leverage the property to specify some alignment
requirements for the region:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_CACHEABLE |
			       DT_MEM_SW_ALIGN(32) )>;
   };

The conventional and recommended way to deal and manage with memory
regions marked with attributes is by using the provided `mem-attr`
helper library by enabling `CONFIG_MEM_ATTR` (or by using the usual DT
helpers).

When this option is enabled the list of memory regions and their
attributes are compiled in a user-accessible array and a set of
functions is made available that can be used to query, probe and act on
regions and attributes, see `include/zephyr/mem_mgmt/mem_attr.h`

Note that the `zephyr,memory-attr` property is only a descriptive
property of the capabilities of the associated memory  region, but it
does not result in any actual setting for the memory to be set. The
user, code or subsystem willing to use this information to do some work
(for example creating an MPU region out of the property) must use either
the provided `mem-attr` library or the usual DeviceTree helpers to
perform the required work / setting.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-09-15 12:46:54 +02:00
Mahesh Rao dec80da4c0 samples: subsys: shell_module: Add support for intel_socfpga_agilex series
Add sip_svc shell support to intel_socfpga_agilex_socdk
and intel_socfpga_agilex5_socdk boards.

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2023-09-15 09:26:49 +02:00
Mahesh Rao 5a7552bce8 samples: sip_svc: Add support for intel_socfpga_agilex5_socdk
Add support for intel_socfpga_agilex5_socdk for
sip_svc sample application.

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2023-09-15 09:26:49 +02:00
Benjamin Cabé 30cd9a22cf doc: fs: samples: Use new Sphinx extension to document samples
Use the new code-sample directive and roles to document the filesystem
samples so that they show up as "Related samples" when browsing the API
documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-14 15:07:12 +02:00
Yicheng Li 6ead139b4b mbox: Add NXP MU as a MBOX device
Add a MBOX driver wrapper around the NXP MU, simular to
the existing wrapper around the NXP S32 MRU. This allows Zephyr IPC
to work based on the MU, on a number of NXP boards.

Also update the SHA of NXP HAL to enable the Kconfig for this driver.

Signed-off-by: Yicheng Li <yichengli@google.com>
2023-09-14 14:34:05 +02:00
Gerard Marull-Paretas 577fd949c2 samples: boards: nrf: system_off: update readme
- Remove obsolete information
- Remove redundant details, e.g. how to flash
- Adjust output

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas 2cbc452d1d samples: boards: nrf: system_off: suspend console
To achieve minimal power consumption, only the console (ie UART) needs
to be suspended. Note that this is a temporary workaround, UART driver
should be using device runtime PM so that this is not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas 1f40012c00 samples: boards: nrf: system_off: use standard GPIO API
Wake-up from pin is already supported when configuring GPIO interrupt as
GPIO_INT_LEVEL_ACTIVE, so there's no need to resort to HAL.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas aa1dd87313 samples: boards: nrf: system_off: add missing dependency
APP_RETENTION depends on having CRC enabled.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas 6b56c9d8e5 samples: boards: nrf: system_off: remove redundant prj.conf comment
Not needed, already mentioned in sample.yaml.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas 7fb662032d samples: boards: nrf: system_off: fix includes
Include only what is needed, also sort includes properly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas d8571ef2a9 samples: boards: nrf: system_off: s/printk/printf
Use printf instead of printk, samples should prefer standard C APIs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Grzegorz Chwierut f618522144 twister: pytest: Move fixtures to one file
Fixtures in pytest-twister-harness plugin are moved to one
file to simplify adding new fixtures in the future - no
need to add pytest_plugins entry and register asserts.
Moved also shell fixture from sample dir, because that
fixture can be reused in new tests.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-09-14 05:58:25 -04:00
Grant Ramsay 09912b74e9 samples: canbus: isotp: Add support for CAN-FD
Enable this sample to be used with CAN-FD

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-09-14 08:34:09 +02:00
Andrei Emeltchenko c709b3d97f samples: Using zephyr:code-samples for smbus and edac
Using zephyr:code-sample:: for SMBus and EDAC samples docs.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Andrei Emeltchenko 05afc13f5f samples: smbus: Update documentation
Update README.rst for smbus sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Andrei Emeltchenko ed61709405 samples: edac: Correct README
Correct build and run instructions.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Sylvio Alves a6756c36e9 samples: wifi: esp32s2_saola: reduce RAM usage
This modification frees up around ~10kB of RAM and make sample code
working again.

1) Reduced net packet size and count.
2) Increase Wi-Fi heap to avoid memory allocation failure.
3) Keep log as minimal.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-09-13 17:00:28 +02:00
Marko Sagadin 5f0bb1d277 samples: drivers: uart: native tty: Add native_sim overlay
Also include it in the twister tests.

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2023-09-13 16:36:43 +02:00
Daniel DeGrasse 11f6f2f7e8 samples: subsys: display: Add RK055HDMIPI4M shield testcase to LVGL
Add RK055HDMIPI4M specific testcase to LVGL. This allows LVGL to be
verified on the RT1170 and RT595 EVKs from NXP, which support LVGL using
this shield.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-13 16:36:10 +02:00
Andrzej Głąbek e3ee5c09f2 samples: code_relocation_nocopy: Make linker script more generic
Instead of depending on the nRF5340 DK, use a path specific to just
the nRF5340 SoC and get the size of the external flash in this case
from devicetree so that the sample could be easily run on other boards
based on the nRF5340 SoC (after just adding proper overlays).

On the occasion, correct the attributes of the EXTFLASH memory region.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-09-13 16:20:34 +02:00
Andrzej Głąbek 6bd6f4be65 samples: code_relocation_nocopy: Use nrf_qspi_nor driver to init XIP
Use the Nordic QSPI NOR flash driver instead of the specific code
for the nRF5340 DK to initialize the external flash chip for XIP.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-09-13 16:20:34 +02:00
TOKITA Hiroshi 10057d54d9 samples: drivers: counter: alarm: Add support for rpi_pico
Add the rpi_pico board to the supported boards for the counter
alarm sample

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
Stanley Huang 73a87d14df boards: arm: add raytac_mdbt53v_db_40_nrf5340
Adds new raytac_mdbt53_db_40_nrf5340 board.

Signed-off-by: Stanley Huang <stanley@raytac.com>
2023-09-13 12:06:48 +02:00
Fabian Blatz c64724e5db samples: subsys: display: lvgl: Add lvgl-encoder-input device
Adds a zephyr,lvgl-encoder-input compatible to the native_posix board
overlay and the required code to control an arc widget.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-13 11:35:04 +02:00
Huifeng Zhang 2c22e83dfb include: arch: arm: Remove aarch32 directory
This commit follows the parent commit work.

This commit introduces the following major changes.

  1. Move all directories and files in 'include/zephyr/arch/arm/aarch32'
    to the 'include/zephyr/arch/arm' directory.

  2. Change the path string which is influenced by the changement 1.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Huifeng Zhang df41deac1c arch: arm: Remove aarch32 directory
It doesn't make sense to keep the aarch32 directory in the
'arch/arm/core' directory as the aarch64 has been moved out.

This commit introduces the following major changes.

  1. Move all directories and files in 'arch/arm/core/aarch32' to
    'arch/arm/core' and remove the 'arch/arm/core/aarch32' directory.
  2. Move all directories and files in 'arch/include/aarch32' to
    'arch/include' and remove the 'arch/include/aarch32' directory.
  3. Remove the nested including in the 'arch/include/kernel_arch_func.h'
    and 'arch/include/offsets_short_arch.h' header files.
  4. Change the path string which is influenced by the changement 1
    and 2.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Benjamin Cabé 59e4c5aed0 samples: fully migrate basic samples to the new Sphinx extension
- Updated basic samples READMEs to use the new zephyr:code-sample::
  directive. Dropped "-sample" suffix that's not required anymore now
  that samples have their own namespace.
- Updated all references to the samples to use the :zephyr:code-sample:
  role. Checked and updated the wording of said references to account
  for the fact that samples should not have "... sample" in their name
  anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:15:34 +02:00
Benjamin Cabé 9d0deabba2 samples: stm32: move board-specific STM32 UART sample
The STM32 single-wire UART sample should live with board-specific
samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:14:06 +02:00
Anas Nashif fcf50ed6e7 kernel: move timeout_q.h to kernel/include
This is a private kernel header with private kernel APIs, it should not
be exposed in the public zephyr include directory.

Once sample remains to be fixed (metairq_dispatch), which currently uses
private APIs from that header, it should not be the case.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-12 12:55:36 -04:00
Miika Karanki 7ae9a0b55d net: mqtt: change cipher and sec_tag lists to const
cipher_list and sec_tag_list are used only with zsock_setsockopt
in MQTT. For that use, they can be const (and potentially kept
in flash memory).

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2023-09-12 16:30:28 +02:00
Manuel Argüelles 7ec624c3c4 samples: rtio: disable debug log level
Avoid to build with debug log level enabled and instead register the
test log modules with debug level.

mr_canhubk3 board will fail to initialize the on-board watchdog within
the expected window triggering a reset, due to the amount of log
messages being printed. Other boards may face similar issues.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-12 10:56:35 +02:00
Martin Kiepfer 147109adb0 boards: Add lvgl pointer support on m5stack_core2
Added lvgl-pointer definition in devicetree, to enable
touch-support in lvgl applications.
Kscan support has been removed from m5stack_core2 as this was just a
temporary thing.
Has been tested with lvgl hello world sample.

Signed-off-by: Martin Kiepfer <m.kiepfer@teleschirm.org>
2023-09-12 09:23:25 +02:00
Benjamin Cabé 7c4ff77bf3 doc: zbus: samples: Use new Sphinx extension to document samples
Use the new code-sample directive and roles to document the zbus samples
so that they show up as "Related samples" when browsing zbus API.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-11 19:56:57 +02:00
Martin Kiepfer 9339882fbb samples: lvgl: Extend hello world sample button functionality
This commit adds a callback to the button to reset the counter when the
button is pressed. The button is automatically created when lvgl
pointer or kscan support is enabled. The same reset functionality was
already available for possible gpio button.

Please make sure to define a zephyr input device in device
tree (e.g. "zephyr,lvgl-pointer-input").

Signed-off-by: Martin Kiepfer <m.kiepfer@teleschirm.org>
2023-09-11 19:56:37 +02:00
Albort Xue f5220bd5d1 samples: drivers: dac: Enable dac example on lpcxpresso55s36 board
Added overlay for lpcxpresso55s36, updated README.rst

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2023-09-11 19:55:26 +02:00
Marc Desvaux 15c733a36e samples: net: zperf: add Ethernet twister test
add Ethernet twister test for stm32h573i_dk

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-09-11 11:18:20 +02:00
Benjamin Cabé faa8bb5bb8 samples: remove leftovers from current_sensing sample
Remove leftovers of a code sample that was (only partially) deleted
with PR #35538

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-08 11:11:38 +02:00
Benjamin Cabé c26679be42 samples: net: cloud: drop Google Cloud IoT Core
Google Cloud IoT Core has been retired on August 16, 2023.
Removed the sample and the link to it in a previous release note.
Added a redirect to other IoT cloud samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-08 11:04:25 +02:00
Benjamin Cabé 2c8dbc4e8b esp32: samples: Use esp32_devkitc_wroom board instead of esp32
Following #58454, fixed a few remaining references to old "virtual"
esp32 board.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-07 20:18:41 +02:00
Fabio Baltieri 2c2124de76 samples: timer_synchronization: exclude qemu_arc_hs5x
Exclude qemu_arc_hs5x from the test, seems to fail since f0daf90. Other
ARC platform works so let's exclude this one while the issue is
investigated.

Link: https://github.com/zephyrproject-rtos/zephyr/issues/62405
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-07 16:22:59 +02:00
Maciej Perkowski c15ec57e6e Revert "samples: tfm: Fix test definition"
This reverts commit 811b0bd8fb.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-09-07 13:00:49 +02:00
Alberto Escolar Piedras 811b0bd8fb samples: tfm: Fix test definition
32a9d13d61
introduced a new required tag for this test
which the integration platform does not "support"
causing the testplan generation to error out.

Fix it by removing the offending tag from the test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-07 11:46:20 +02:00
Martin Jäger f13791d5ba canbus: isotp: use flags for configuration in isotp_msg_id
The previous design with dedicated bits in the structure required a
user to explicitly set each bit.

Using one flags variable allows to extend the features more easily
in the future and avoids breaking existing code.

This change is particularly useful for the FDF and BRS flags required
for CAN-FD support.

See also previous similar change for the CAN driver in
f8a88cdb27

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-07 09:43:56 +02:00
David Brown 7c80473e0a samples: tfm: Remove old 'tfm' tag
To avoid confusion having both a 'tfm' and a 'trusted-firmware-m' tag,
remove the old 'tfm' tag entirely.  Any external test frameworks that are
using the 'tfm' tag will need to be changed to account for this.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-07 09:43:43 +02:00
David Brown a5e70cd40d samples: tfm: Also test tfm when mcuboot changes
In addition to running the tfm tests when the trusted-firmware-m module
changes, most of the tests also use MCUboot, which comes from our module.
Add the mcuboot tag to each of these tests, except for the single test that
explicitly builds without using MCUboot.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-07 09:43:43 +02:00
David Brown 32a9d13d61 samples: tfm: Update tag to run tests on module change
A recent change #61718, adds support to the twister build to check for
manifest changes, and run tests using tags based on the modules that have
changed.  The tfm tests have an existing tag `tfm` to select these tests,
but the above patch uses a tag named after the module, trusted-firmware-m.
To make this work, add `trusted-firmware-m` in addition to the existing tag
`tfm` so that these tests will run whenever the tfm module is updated.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-07 09:43:43 +02:00
Fabio Baltieri 58b927eb70 samples: philosophers: fix wrong assert type
zephyrproject/zephyr/samples/philosophers/src/main.c: In function
'philosopher':

zephyrproject/zephyr/include/zephyr/sys/__assert.h:44:52: warning:
format '%u' expects argument of type 'unsigned int', but argument 2 has
type 'stack_data_t' {aka 'long unsigned int'} [-Wformat=]

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-06 21:56:03 +02:00
Benjamin Cabé 5832f6ed5f doc: Use new Sphinx extension for code samples
Use the new code-sample directive and roles in a few places
to demonstrate how it works.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-06 12:11:28 +02:00
Dat Nguyen Duy b92ad4b56a boards: mr_canhubk3: enable NXP S32 EMIOS PWM
In this board, there are eight PWM channels from
EMIOS 0 CH0 --> EMIOS 0 CH7 that can be used to
generate PWM pulse to outside of the board.

Moreover, there are three RGB leds that can use
PWM pins for blinking, faded leds

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-06 11:44:00 +02:00
Grzegorz Swiderski 6640c04df6 sysbuild: Remove IMAGES variable
This variable was originally provided for two indended purposes:

  * Let users manually add a new image in a desired order in the list.
  * Let users set build-only images, which are excluded from the list.

Given the recent additions of the `sysbuild_add_dependencies()` function
and the `BUILD_ONLY` parameter, `IMAGES` should be considered obsolete.

Furthermore, the list of images added to sysbuild should be updated
automatically when calling `ExternalZephyrProject_Add()`. This is now
possible by using a GLOBAL property internal to sysbuild.

With that, the `IMAGES` variable can be removed. Its existing usage for
image ordering is replaced with `sysbuild_add_dependencies()` treewide.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-05 15:27:04 +02:00
Fabian Blatz 10ca5216bb samples: subsys: display: lvgl: Remove lvgl-pointer-input in overlays
After adding the lvgl pointer device into the board dts the custom overlays
are not needed anymore.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-05 10:05:50 +02:00
Carles Cufi 8c748fd005 kernel: Modify the signature of k_mem_slab_free()
Modify the signature of the k_mem_slab_free() function with a new one,
replacing the old void **mem with void *mem as a parameter.

The following function:
void k_mem_slab_free(struct k_mem_slab *slab, void **mem);

has the wrong signature. mem is only used as a regular pointer, so there
is no need to use a double-pointer. The correct signature should be:
void k_mem_slab_free(struct k_mem_slab *slab, void *mem);

The issue with the current signature, although functional, is that it is
extremely confusing. I myself, a veteran Zephyr developer, was confused
by this parameter when looking at it recently.

All in-tree uses of the function have been adapted.

Fixes #61888.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-09-03 18:20:59 -04:00
Bindu S 18e986029e samples: sensor: Enable bme280 sensor using I2C driver for alder_lake
Added overlay and conf to enable bme280 sensor
using i2c on intel_adl_crb board.

Signed-off-by: Bindu S <bindu.s@intel.com>
2023-09-01 12:10:16 -05:00
Jonathan Rico 434ea2b2ff Bluetooth: hci_rpmsg: flush the logs before locking CPU
The logs were not visible when an assert fired on the controller and
`CONFIG_BT_HCI_VS_FATAL_ERROR` was not set.

Putting the logs in panic mode before entering the infinite loop fixes
that.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-09-01 13:23:17 +02:00
Daniel DeGrasse 299689716e samples: ipc: openamp: update build documentation
Update build documentation for openamp sample, to reflect that sysbuild
is required when building this sample. Sysbuild is needed to build both
core images in one step.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-01 09:54:38 +02:00
Witold Lukasik 2530b85932 samples: subsys: logging: logger: remove nRF MDK-based code
k_cycle_get_32() expands to RTC->COUNTER in nrf_rtc_counter_get(),
sys_clock_hw_cycles_per_sec() expands also properly.

Signed-off-by: Witold Lukasik <witold.lukasik@nordicsemi.no>
2023-08-31 20:18:45 +02:00
Gerard Marull-Paretas e788b8b45b samples: ipc: rpmsg_service: add missing init.h
Sample was using SYS_INIT without including init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-31 14:43:08 +02:00
Gerard Marull-Paretas d52c88d4c3 samples: boards: ti: cc13x2_cc26x2: system_off: use sys_poweroff()
Use the new sys_poweroff API to power off the board.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-31 14:42:26 +02:00
Jun Lin 6e785a4886 sample: driver: ps2: use aliases to select the ps2 instance
This sample uses the DEVICE_DT_GET_ONE(COMPAT) to select the ps2 device
for a specific chip. This commit changes it to use the aliases to
let more chips which support the ps2 driver can build this sample.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-08-31 10:19:52 +02:00
Gerard Marull-Paretas 825b0fb5d3 samples: boards: stm32: power_mgmt: stm32wb_ble: use sys_poweroff
Use sys_poweroff to power off the system.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-31 10:18:07 +02:00
Gerard Marull-Paretas 60da8d5303 samples: boards: stm32: power_mgmt: standby_shutdown: use sys_poweroff
Use the sys_poweroff() API to power off the board, also adjust messages
accordingly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-31 10:18:07 +02:00
Bjarki Arge Andreasen c0c9d6f7d6 samples/net: Add cellular modem sample
This commit adds a sample application which demonstrates how
to use the new driver and modules. The sample uses power
management to turn on the modem, uses network management
to wait for L4 connected, then uses DNS to get the IP
of the server running the python script found in the
server folder, which echoes back data recevied to it.
A packet containing psudo random data is then sent to
the server, which the echoes it back. To validate the
capability of the driver to restart the modem, the
modem is restarted, and the packet is sent again.

The server is hosted by linode, and uses the domain
name test-endpoint.com

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-08-30 13:48:51 +02:00
Piotr Golyzniak 63a9f774df samples: pytest: add conditional extra config
Config CONFIG_NATIVE_UART_0_ON_STDINOUT=y should be applied only for
posix architecture platforms.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-08-30 06:39:55 -04:00
Piotr Golyzniak ffbe257663 scripts: pytest: create helper class Shell
Create helper class Shell which can be used in tests which require
interaction with shell application.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-08-30 06:39:55 -04:00
Piotr Golyzniak a4a550888e scripts: pytest: add readlines_until
Add readlines_until method to DeviceAdapter class to simplify using
adapters in tests by give user possibility to read output from device
until following conditions:
- provided regex was found
- provided number of lines was already read
- timeout was occurred

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-08-30 06:39:55 -04:00
Piotr Golyzniak f22c2d6388 scripts: pytest: align adapters API
Select and place common code of three adapters (HardwareAdapter,
BinaryAdapterBase and QemuAdapter) into basic DeviceAdapter class.

Introduce new way of reading device output by run separate thread which
try to read device output and place it into internal python queue.
Thanks to this, now it is possible to create readline method for all
adapters, which can be unblock when timeout occur.

Collect all common steps which have to be done before setup device in
launch method. The same was done for teardown operations which were
placed into close method.

Additionally some protection mechanisms were introduced to prevent for
undesirable side-effects when user could try to launch to already
launched device or try to send some data to disconnected device.

iter_stdout method was replaced by two new methods: readline and
readlines. To make it possible to remove all read output from internal
buffer (queue), clear_buffer method was introduced.

Also unit tests were rewritten to work properly with current version
of adapters.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-08-30 06:39:55 -04:00
Piotr Golyzniak c54d55c2d8 scripts: pytest: rename DeviceAbstract
Change name of DeviceAbstract class to more meaningful like
DeviceAdapter.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-08-30 06:39:55 -04:00
Gerard Marull-Paretas 8a42903506 samples: usb_c: source: power_ctrl: add missing init.h
File was using SYS_INIT without including init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-30 11:52:24 +02:00
Nick Ward d4e1b186ee samples: usb_c: source: use ENODEV and remove \n use
ENOENT was the wrong return code to use.
Newlines not needed in logs.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-08-30 10:19:47 +02:00
Nick Ward 82e8b0e826 drivers: pwm: use pwm_is_ready_dt helper function
Update  `struct pwm_dt_spec` use with pwm_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-08-30 10:19:47 +02:00
Benjamin Lemouzy d2e420029b drivers: sensor: add NXP TEMPMON driver
Add driver for the NXP TEMPMON to retrieve on-die operational
temperature.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2023-08-30 10:18:27 +02:00
Gerard Marull-Paretas 22e4699967 samples: boards: nrf: dynamic_pinctrl: s/device.h/init.h
File was not using any device.h API, but init.h (SYS_INIT).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-30 10:15:39 +02:00
Gerard Marull-Paretas aef77099dc samples: boards: mimxrt595_evk_cm33: system_off: misc cleanups
- Remove unnecessary includes
- Remove redundant definitions (sample is not portable anyway)
- Use printf
- Check for device readiness
- Do not check for zero ticks (not possible for the given
  timeout/driver), also, driver should likely error for such case anyway
- Check for all error codes

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 16:39:49 +01:00
Georges Oates_Larsen b25ea4742e net: conn_mgr: Rename connectivity monitor
The connectivity monitoring subfeature of conn_mgr is currently also
named conn_mgr, which is confusing.

This commit renames it to conn_mgr_monitor, or conn_mgr_mon for short,
for clarity.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-08-29 16:13:37 +02:00
Emil Gydesen 71b1591337 Bluetooth: CAP: Remove qos from start_stream_param
Remove the qos field from
bt_cap_unicast_audio_start_stream_param as it was not used.

The QOS values are set when creating the unicast group,
and not when starting the streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-29 10:22:43 +02:00
Rodrigo Peixoto 4d80338132 samples: zbus: fix samples to work with iterable sections observers
Replace the `CONFIG_ZBUS_RUNTIME_OBSERVERS_POOL_SIZE` with the
`CONFIG_ZBUS_RUNTIME_OBSERVERS` and add the heap. Add user_data to hello
world sample iterator functions.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-08-29 10:18:55 +02:00
Fabian Blatz 6a0de9bb7c samples: subsys: display: lvgl: add lvgl-button-input to native_posix
Adds a lvgl-button-input pseudo device to the lvgl sample. Triggering the
SDL gpio (pressing 'b') on the keyboard should trigger a click event at the
center of the screen.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabian Blatz 116ec2c41c samples: subsys: display: lvgl: Use input-lvgl for touch input
Changes all board specific configurations to use the new
zephyr,lvgl-pointer-input compatible. The kscan_input node in the boards
remains to have downstream backwards compatibility.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Emil Gydesen 6ccd112c56 Bluetooth: Audio: Refactor bt_audio_codec_cfg to flat arrays
Refactor the bt_audio_codec_cfg to use flat arrays to store
metadata and codec specific configurations.

The purpose of this is to make it easier to copy the data
between layers, but also to support non-LTV data for non-LC3
codec configurations.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-28 15:56:53 +02:00
Nick Ward 2d65acca3a drivers: gpio: use gpio_is_ready_dt helper function
Update `struct gpio_dt_spec` use with gpio_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-08-28 08:48:35 -05:00
Nerijus Bendžiūnas c0c99227c5 doc: fix CCM sample path typo
Found by playing with CCM.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
2023-08-28 08:35:46 +01:00
Anas Nashif 7f201f4ccc samples/tests: littlefs: tag littlefs samples/tests
Tag with required module name to make the tests run when the module has
changed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-24 13:41:26 -04:00
Anas Nashif 7c8e4e7fe4 samples: display: tag lvgl sample with lvgl
This will allow the sample to be built when the lvgl module has changed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-24 13:41:26 -04:00
Ole Sæther a7df4e5175 samples: Fixed typos
Fixed typos in various files under samples.

Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
2023-08-24 15:44:33 +02:00
Alberto Escolar Piedras 9eeb78d86d COVERAGE: Fix COVERAGE_GCOV dependencies
CONFIG_COVERAGE has been incorrectly used to
change other kconfig options (stack sizes, etc)
code defaults, as well as some samples behaviour,
which should not have dependend on it.

Instead those should have depended on COVERAGE_GCOV,
which, being the one which adds special code and
temporary RAM storage for embedded targets,
require changes to many features.

When building for the native targets, all this was
unnecessary.

=> Fix the dependency.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-24 15:36:31 +02:00
Gerard Marull-Paretas 9c961571a2 modules: cmsis: move glue code to modules/cmsis
The CMSIS module glue code was part of arch/ directory. Move it to
modules/cmsis, and provide a single entry point for it: cmsis_core.h.
This entry header will include the right CMSIS header (M or A/R).

To make this change possible, CMSIS module Kconfig/CMake are declared as
external, allowing us to add a new Zephyr include directory.

All files including CMSIS have been updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-08-24 13:20:21 +02:00
Ryan McClelland 8023d59509 samples: logging: dictionary: fix double-promotion warning
Double promotion warnings are generated with the flag -Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-08-23 16:13:48 -04:00
Sachin D Kulkarni 5c399c2d17 net: wifi: Add scan extension for filtering SSIDs
Add scan extension to scan only for specific SSIDs.

Signed-off-by: Sachin D Kulkarni <sachin.kulkarni@nordicsemi.no>
2023-08-23 16:05:08 +01:00
Mariusz Skamra 2b27b4ebe0 Bluetooth: audio: tbs_client: Subscribe to all required notifications
This removes odd `subscribe` parameter from bt_tbs_client_discover
function parameters list. As the API user enables specific
CONFIG_BT_TBS_CLIENT_* option, the client implementation should
subscribe to the characteristic notifications so that the user receives
the value updates.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-23 15:44:07 +02:00
Florian La Roche 5727503489 style: move ALWAYS_INLINE to the beginning to resolve compiler warnings
With gcc from the zephyr sdk and -Wold-style-declaration is giving this
output:
zephyr/arch/arm/core/aarch32/cortex_a_r/fault.c:101:1: warning:
  'inline' is not at beginning of declaration [-Wold-style-declaration]
  101 | static void ALWAYS_INLINE
                    z_arm_fpu_caller_save(struct __fpu_sf *fpu)
      | ^~~~~~

I searched to all of the source code to find these further occurances
where inline is not at the beginning of a function declaration.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-08-23 14:44:23 +02:00
Florian La Roche 572a23f3d6 samples/net/dhcpv4_client: remove unused var "iface" from sample
The var "iface" is unused in this sample code, so remove from source.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-08-23 14:43:56 +02:00
Jeff Daly f868d391ec Samples: Fix XEC clock control sample code for MEC172x using new GPIOs.
The XEC clock control driver sample code uses enum indexes to offset to
the desired GPIO CTRL register of the package.  These enums are only
used in this example code and are being removed in favor of calculated
indexing into the specific GPIO register memory map.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2023-08-23 10:06:13 +02:00
romain pelletant 4a49b1d867 sample: net: add tftp client sample
Add simple TFTP client code using TFTP client library
Initiate connection (IPv4) with optional DNS resolution
Operate get operation then put operation in octet mode
Tested on native_posix
Issue/Discussion #60985

Signed-off-by: romain pelletant <romain.pelletant@fullfreqs.com>
2023-08-23 10:05:19 +02:00
Florian La Roche 88a3620ff9 samples/basic: print_sys_memory_stats() removed from hash_map, static
Remove print_sys_memory_stats() from hash_map example as it is not used
there at all. For sys_heap make this a static function.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-08-22 19:12:59 -04:00
Henrik Brix Andersen b9585ad96d samples: canbus: isotp: exit if RX thread creation failed, name threads
Exit the sample if creation of any of the RX threads failed. Name the
threads to aid in debugging and monitoring of this sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-22 18:07:43 +02:00
Henrik Brix Andersen 1f42e14635 samples: canbus: isotp: increase stack size and make it configurable
Increase the stack size of the two RX threads used in the ISO-TP sample
from 512 to 1024 bytes as the former is too small for some CAN
controller/SoC combinations.

Make both the RX thread stack size and priority configurable via Kconfig.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-22 18:07:43 +02:00
Daniel Leung dc0cec972d samples: usb: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung a52abe157b samples: sensors: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung 196b6959d7 samples: philosophers: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung 732fd2dd0d samples: net: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung b2f2f85ebd samples: lorawan: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung 8f756af1e1 samples: ipc: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung ff9ebcb946 samples: fs: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung cf23bac815 samples: drivers: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung f0e0c57ad2 samples: boards: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung 081d5a32f0 samples: arch: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Mariusz Skamra d28f180473 Bluetooth: audio: ascs: Move metadata validation to stack
As the metadata has to be validated anyway, let the initial vaidation of
metadata to be done in ASCS. The application can still reject the
metadata, but the length validation and supported type validation can be
performed by the stack.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-22 09:59:53 +02:00
Jaxson Han 2218e80bc2 samples: posix: uname: Set to 1cpu as shell_thread is not SMP-safe
The sample will leverage shell_thread function, which is not SMP-safe.
This will cause issues on some SMP platform. Set CONFIG_MP_MAX_NUM_CPUS
to 1 to fix the issue.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-08-21 13:27:07 +02:00
Andy Sinclair f9f246fd7e samples: shields: npm1300_ek: Event callbacks added
Added event callback configuration example to npm1300_ek
shield.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-08-21 10:04:03 +02:00
Grant Ramsay 47ca788185 samples: posix: eventfd: Use NET_TEST config
NET_TEST is the approprite config for networking tests that do not
require a network device. This has the same effect of disabling
NET_SLIP_TAP, but also disables other network devices. This is required
to disable e1000 Ethernet driver on the qemu_cortex_a53 board.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-08-18 10:13:12 +02:00
Grant Ramsay 3b7bcfa4ab samples: net: sockets: echo_server: Add QEMU A53 as a supported platform
Add qemu_cortex_a53 as a supported platform

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-08-18 10:13:12 +02:00
Jilay Pandya 7a9cda9199 samples: zbus: fix benchmark duration output
The benchmark duration is in nanoseconds, and it logs the duration to
the console in seconds. The conversion is wrong for scenarios where
the execution lasts less than 100 milliseconds. Fix that by adding
leading zeros while printing duration.

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2023-08-18 10:12:50 +02:00
Rodrigo Peixoto a658eeecd2 samples: zbus: add confirmed channel sample
This commit adds a new sample to zbus that shows how to implement a
confirmed channel. Developers commonly asked about similar features on
zbus discord channel and RFC (in the past). Adding this sample, we can
show developers how to solve their needs (confirmed channels) without
zbus changes.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-08-18 10:12:43 +02:00
Anas Nashif c8a9e445bb Bluetooth: BT_OTS_OACP_CHECKSUM_SUPPORT implies CRC support
BT_OTS_OACP_CHECKSUM_SUPPORT requires CRC to be enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-18 08:52:16 +03:00
Yong Cong Sin 96dee583c0 sample: tracing: update README for USER
Update the README.rst to include build instruction for
tracing_user.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-08-17 15:13:17 +02:00
Yong Cong Sin 8e27b2ea8b sample: tracing_user: check for lines from the implementation
Updated the sample to check for lines from the tracing user
implementation to make sure that the glue works.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-08-17 15:13:17 +02:00
Yong Cong Sin 3337c15707 tracing_user: let user implementation to do everything
Let's just let the user implementation to its things, like
checking, locking and stuff.
The tracing_user.c now just acts as a glue.

Moved previous implementation to its sample, and cleaned up
headers.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-08-17 15:13:17 +02:00
Ryan McClelland 57f49ca2d2 samples: bluetooth: fix double promotions
Double promotion warnings are generated with the flag -Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-08-17 13:07:10 +02:00
Daniel Leung eedc0bf0fa samples: bluetooth: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-17 13:00:09 +02:00
Gerard Marull-Paretas f623fcf398 samples: hello_world: use printf
Instead of printk. This change aligns the sample a bit more to the
canonical "hello world" sample in C. Also, samples should in general be
as portable as possible.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-17 10:38:26 +02:00
Johann Fischer 42ddc614b1 samples: hid-mouse: rework sample to use input subsys
Overall, this makes the sample code much simpler and smaller.
Whit the changes introduced in commit commit 57e0da4d80
("boards: add zephyr,code properties to the various gpio-keys nodes")'
this example will work out of the box with any board that has at least
zephyr,code = <INPUT_KEY_0>; in its devicetree.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-08-17 09:37:03 +01:00
Eric Holmberg ef2d7283b2 samples/drivers/adc: add esp32s3 sample support
Add single-shot sample mode support for ESP32-S3 and update documentation.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-17 10:36:20 +02:00
Gerard Marull-Paretas 2f18ee0664 samples: application_development: drop oot board/driver samples
Because there are more comprehensive examples in the Zephyr's
example-application repository. Application development samples page now
points to example-application as well.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-16 20:31:35 +02:00
Gerard Marull-Paretas f08a652fed samples: application_development: add link to example-application
Because example-application contains relevant sample code related to
application development.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-16 20:31:35 +02:00
Andrzej Głąbek 993cb30240 samples: blinky_pwm: Use nRF SW PWM driver on nRF DKs
The default nRF hardware PWM driver is not very suitable for this
sample as that driver does not allow setting a period longer than
~262 ms. Use the nRF SW PWM driver instead. This will also ensure
that the driver is built by CI for nRF52, nRF53, and nRF91 Series.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-08-16 16:33:03 +02:00
Andrzej Głąbek 88ab153ac4 drivers: pwm_nrf5_sw: Rename to pwm_nrf_sw
Since the driver can now be also used on nRF91 Series, its name need to
be updated to not cause confusion.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-08-16 16:33:03 +02:00
Diego Elio Pettenò 00dadc6c38 doc: use a linked reference rather than a GitHub reference.
Instead of sending the user out of the documentation site to GitHub
to read the testing instructions, link to the generated page for the
documentation.

Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
2023-08-16 14:58:20 +02:00
TOKITA Hiroshi cedcd2d94e samples: cfb: support MONO01 pixel format
When the pixel format fails to set to MONO10, try to set it to MONO01.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-08-16 14:47:59 +02:00
Lucas Tamborrino d45e992e58 samples: drivers: ipm: ipm esp32: add wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Lucas Tamborrino 7360c2e48b samples: drivers: dac: add esp32 wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Lucas Tamborrino ea1297d5c9 samples: drivers: adc: add esp32 wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Lucas Tamborrino 01fa21523f samples: boards: esp32: flash enc: add wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Balsundar Ponnusamy 5b533a1aa8 samples: subsys: shell: add timer support for shell
adding shell support for app dw timer

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2023-08-16 10:20:31 +02:00
Balsundar Ponnusamy dadbf281d0 samples: drivers: counter: adding support for alarm app
adding support for counter alarm application for ailex and agilex5
platform

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2023-08-16 10:20:31 +02:00
Gerard Marull-Paretas 34102e496e samples: boards: esp32: deep_sleep: use sys_poweroff
Use the new sys_poweroff API.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-15 10:15:38 -07:00
Johan Hedberg 03905f7e55 boards: x86: Add intel_ prefix to Elkhart Lake boards
This follows the same convention that has already been adopted by Intel
Alder Lake and Raptor Lake boards.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-08-15 11:24:35 +00:00
Julio Cesar 5e15e8cb48 boards: xtensa: Add support for YD-ESP32 board
Add `yd_esp32` board:

- Model name: YD-ESP32
- Manufacturer: VCC-GND® Studio
- Espressif module: ESP32-WROOM-32E

Signed-off-by: Julio Cesar <hi@jcsx.dev>
2023-08-15 11:15:39 +00:00
Emil Gydesen 53502cb417 Bluetooth: Audio: Make codec_cap const
There is no reason why the capabilities
should be modified by the stack after registration,
nor any reason why a the unicast client application
needs to modify the reported remote capabilities, so
all have been marked as const.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-15 11:14:29 +00:00
Emil Gydesen aa990ae6dc Bluetooth: Audio: Refactor bt_audio_codec_cap to flat arrays
Refactor the bt_audio_codec_cap to use flat arrays to store
metadata and codec specific capabilities.

The purpose of this is to make it easier to copy the data
between layers, but also to support non-LTV data for non-LC3
codec capabilities.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-15 11:14:29 +00:00
TOKITA Hiroshi 2c22e067d0 samples: subsystem: display: cfb: Improve to using more CFB functions
Move X position and set  kerning to demonstrate the line wrapping
behavior of characters.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-08-14 18:09:18 +00:00
Emil Gydesen 2c3ee66912 samples: Bluetooth: TMAP BMR: Update to use new sink API
The broadcast sink API has been modified so that all scanning, etc.
will be done by the application, rather than the stack. This commit
updates the sample to use this updated API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-14 13:34:26 +00:00
Emil Gydesen 171273d967 samples: Bluetooth: Broadcast Sink: Update to use new sink API
The broadcast sink API has been modified so that all scanning, etc.
will be done by the application, rather than the stack. This commit
updates the sample to use this updated API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-14 13:34:26 +00:00
Johan Hedberg 2b757f1eca boards: x86: Add intel_ prefix to Intel Raptor Lake boards
This is following the same convention that was recently introduced to Alder
Lake boards (intel_adl). Additionally, an "S" suffix is added to the
boards, since what's currently supported is in fact the Raptor Lake S
variant.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-08-11 19:48:32 +00:00
Benjamin Cabé fe8ced1e5a doc: lwm2m: samples: fix formatting issue
A sneaky whitespace was causing inconsistent rendering in the list of
available overlays.
Fixed by switching to a list table which is arguably now even easier to
read.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-08-11 19:48:08 +00:00
Nicolas Pitre deb20ef93b samples/basic/minimal: make it smaller
Add a config entry specifically for RISC-V runtime.
Memory usage is 7066 bytes.

Also adjust some library options. This make the ARC runtime binary
smaller as well:

before:

        FLASH:        8808 B
         SRAM:        3672 B

after:

        FLASH:        5596 B
         SRAM:        3672 B

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-08-11 19:47:47 +00:00
Iuliana Prodan 61de87bc50 samples: enable build only test for nxp_adsp_imx8m
Test openamp_rsc_table sample also for nxp_adsp_imx8m.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-08-11 12:01:58 +00:00
Andrei Emeltchenko e17b3e4a52 smbus: Remove unneeded board overlay configurations
Remove unneeded board configurations since those now selected with
selecting PCH SMBUS driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-08-10 13:59:15 +03:00
Andrei Emeltchenko b92e04e636 samples: tests: Add ehl_crb board overlay
Add board overlay to watchdog sample and test.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-08-10 12:57:39 +03:00
Sreeram Tatapudi fa471172b7 drivers: counter: cat1: Fix test_single_shot_alarm_notop
TC "test_single_shot_alarm_notop" is failing because there were 2 ISR
callbacks instead of one. this is because of invoking
ifx_cat1_counter_set_int_pending incorrectly. Updated
ifx_cat1_counter_set_alarm to fix this

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-08-10 08:13:11 +00:00
Alberto Escolar Piedras b40c052289 samples drivers led: Fix main return
Since 3a197934fc
main() should be int main(void) instead of void main(void)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-09 16:09:47 +00:00
Alberto Escolar Piedras 5d1eae6399 samples sensing simple: Fix main return
Since 3a197934fc
main() should be int main(void) instead of void main(void)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-09 16:09:47 +00:00
Johan Hedberg a88808fc9a samples: watchdog: Add overlay for Intel Alder Lake boards
Add watchdog overlays and necessary metadata to support Intel Alder Lake
boards.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-08-09 13:45:38 +00:00
Jeppe Odgaard e26d018253 samples: flash_shell: rework dump_buffer()
Add an optional compare buffer to check each byte. If the byte differ
the read value will be printed as an error.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-08-09 13:41:23 +00:00
Jeppe Odgaard 5ad65dfe36 samples: flash_shell: rework do_read()
Add an optional compare buffer to check if bytes read
match a provided buffer and print an error if they differ.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-08-09 13:41:23 +00:00
TOKITA Hiroshi b2b0901c0d samples: sensor: change to use the app.overlay file
The DTC_OVERLAY_FILE variable is specified on the command line.
It's not preferable to set it in CMakeLists.txt.
The app.overlay file is used as the default overlay file, so use it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-08-09 08:29:28 +00:00
Diego Elio Pettenò 762a1f8b42 ev11l78a: initial import of the UPD301C Basic Sink board.
This board is a relatively inexpensive development kit for USB-PD
controllers, using an UPD301C controller.

This Zephyr config includes support for:

 * UART (present on he debug header of the board), tested with the
   hello_world sample application;
 * the one standalone LED (CAP_MIS), tested with the blinky sample
   application;
 * the rotary encoder (PDO_SEL), via ADC, tested with the adc sample
   application;
 * the current sense amplifier (I_SENSE), currently untested;
 * the SPI bus, connected internally in the UPD301C to the UPD350;
 * the I2C bus, exposed on the debug header, currently untested.

Note that the drivers.uart.async_api.rtt has to be disabled, as it is
for other m0 boards with no dma or it fails to build.

Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
2023-08-08 19:02:15 +00:00
Keith Packard cbc5ee3683 samples/boards/google_twinkie_v2_pda: fix main return
switch to int

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-08-07 19:07:43 +00:00
Maciej Sobkowski 112e48eb28 samples: alarm: Add support for apollo4p_evb
Add support for apollo4p_evb to the counter alarm sample.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2023-08-07 16:12:58 +02:00
Fabio Baltieri 57e0da4d80 boards: add zephyr,code properties to the various gpio-keys nodes
Add gpio-keys codes for all boards. These are mostly INPUT_KEY_0 and so
on but I've used some more specific ones where it was obvious that
there's something else on the boards.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-07 11:26:26 +02:00
Marek Matej 1622210e75 samples: led_ws2812: ESP32 support
Add overlays for esp32s2, esp32s3, esp32c3 based boards, which
has RGB led assembled. Those boards are capable of driving the
RGB led using SPI. The default MOSI idle level is different
to how DI driver expect it to be.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-08-07 11:25:19 +02:00
Florian Grandel 781b6d7b0a samples/doc: segger: rtt: enhanced tracing/logging
Fixes a minor documentation issue and suggests/documents additional RTT
tracing and logging options.

Showcases logging via RTT UART which is now available w/o restrictions
due to the preceding change. This has been tested on CC13/26xx hardware.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-06 07:44:06 -04:00
Gerard Marull-Paretas a99a6756aa samples: boards: mimxrt595_evk_cm33: system_off: use sys_poweroff
Use the new sys_poweroff() API to power off the system.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-04 16:59:36 +02:00
Gerard Marull-Paretas 37b26f40a6 samples: boards: nrf: system_off: use sys_poweroff
Make use of the new sys_poweroff API to actually power off the system.
This lets us remove many hacks present in the sample.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-04 16:59:36 +02:00
Mathieu Anquetin 3f2a6ce86b samples: led_lp50xx: fix color mapping and channel test
Some boards may have less LED child nodes in the DT than the maximum
number of LEDs supported by the chipset. For these boards, the channel
test must skip the missing LEDs when preparing the color buffer and not
exit in error due to missing info.

Also, some boards may have a color mapping that is different from RGB
and this mapping should be used when providing the buffer to
led_set_color().

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-08-04 13:18:01 +02:00
Mathieu Anquetin 26f4fab391 drivers: led: lp503x: extend driver to all lp50xx devices
Add support for LP5009, LP5012, LP5018 and LP5024 devices which only
differ by the number of LEDs they can control.

Also, update application sample to run on all these new supported
devices.

Based on initial work from:
  - Marek Janus <marek.janus@grinn-global.com>
  - Rico Ganahl <rico.ganahl@bytesatwork.ch>

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-08-04 13:18:01 +02:00
Fabio Baltieri 693b19d0f2 input: add zephyr/ prefix to the event code sample and docs
The system still takes both prefixed and unprefixed dt-bindings files,
but let's use zephyr/ prefixed in the examples and documentation.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-04 10:41:57 +02:00
Johann Fischer ee43610b96 samples: usb: hid: remove SYS_INIT
There is no need to use SYS_INIT as the HID specific initialisation
can be done in the main before the usb_enable() call.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-08-04 10:41:38 +02:00
David Ullmann 7c76464c14 samples: blinky_pwm: mimxrt685_evk_cm33 use ctimer for pwm
add overlay for using ctimer pwm driver
Signed-off-by: David Ullmann <davidu@meta.com>
2023-08-03 12:39:06 -04:00
Franciszek Zdobylak 16183f665e samples: subsys: fs: create common fs sample
Sample for FAT fs is reworked to run also with Ext2 file system

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-08-03 12:22:01 -04:00
Evgeniy Paltsev 168de28b40 samples: add no-timers configuration which is runtime tested
Add no-timers configuration to sample.minimal to check that
it's actually working in runtime.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-08-03 07:32:03 -04:00
Manuel Argüelles 11b94f3155 boards: mr_canhubk3: enable EMAC
This board has a single instance of EMAC connected to a NXP TJA1103
Ethernet PHY. Currently, there is no driver for this PHY and its
pin strapping configuration allows to use it without software
configuration, so EMAC is configured as fixed link.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-03 10:28:20 +02:00
Wei-Tai Lee e6d6df579a samples: drivers: spi_flash: add adp_xc7k_ae350 surport
Add adp_xc7k_ae350 support in spi_flash driver sample

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2023-08-03 10:28:02 +02:00
Seppo Takalo 838ab80bca net: coap: Use 64bit timestamps
Use 64bit timestamps from k_uptime_get() so they don't
roll over during the expected device lifetime.

Fixes #60826

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-08-01 15:40:04 +02:00
Seppo Takalo 1dfa711167 net: lwm2m: Create socketpair that can wake up zsock_poll()
Allow socket-loop to wake up immediately, if there are changes,
instead of waiting for zsock_poll() to timeout.
This change makes engine more reactive and removes
hard coded timeout from zsock_poll().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-08-01 12:07:12 +02:00
Manuel Arguelles 42e8678d2a samples: task_wdt: add scenario without hw fallback
Add new sample scenario without using a hardware watchdog as fallback.
This is used for the moment only for the mr_canhubk3 board, but a
generic configuration is introduced that can be used by other boards if
needed.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-01 09:51:16 +02:00
Manuel Arguelles cb54a31b28 samples: watchdog: add support for NXP FS26 watchdog
This watchdog doesn't allow to stop on CPU halt by debugger.
It also requires a minimum window value different than zero
so that the watchdog is refreshed during the open window.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-01 09:51:16 +02:00
Emil Gydesen ef7c775fc2 samples: Bluetooth: ISO broadcash benchmark advanced ISO
Add (optional) advanced ISO support for the benchmark ISO
sample. The CONFIG_BT_ISO_ADVANCED Kconfig simply needs to
be enabled in order to support the advanced settings.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-31 09:04:52 +00:00
Emil Gydesen 2187f6b29c samples: Bluetooth: ISO connected benchmark advanced ISO
Add (optional) advanced ISO support for the benchmark ISO
sample. The CONFIG_BT_ISO_ADVANCED Kconfig simply needs to
be enabled in order to support the advanced settings.

This also reduces the number of default channels supported
to 1.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-31 09:04:52 +00:00
Francois Ramu 248cd36505 samples: subsys: nvs on nucleo_g474re requires 6kB for storage partition
Add the overlay for running the samples/subsys/nvs/ application
on the nucleo_g474re. Define a 6kB storage_partition at the end of the
512kB flash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-07-31 10:09:38 +02:00
Cong Nguyen Huu 19f33b8ecb samples: drivers: adc: enbale test for mr_canhubk3
Enable all channels that available connector on board.
ADC0 channel 6 on precision group with normal end chain
callback.
ADC1 channel 2 on precision group with normal end of
conversion callback.
ADC2 channels 3, 4, 5 on precision group with normal end
of conversion callback.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-28 08:55:38 -05:00
Gerard Marull-Paretas bc522affc7 samples: subsys: pm: latency: remove redundant PM_STATE_ACTIVE case
pm_state_set() will never be called with PM_STATE_ACTIVE.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-28 09:09:01 +00:00
Florian Grandel a4cd5cee40 drivers: ieee802154: consistent high res timestamps
The IEEE 802.15.4 API and networking subsystem were using several
inconsistent timestamp resolutions and types. This change defines all
timestamps with nanosecond resolution and reduces the number of
available types to represent timestamps to two:
* `struct net_ptp_time` for PTP timestamps
* `net_time_t` for all other high resolution timestamps

All timestamps (including PTP timestamps) are now referred to a
"virtual" local network subsystem clock source based on the well-defined
types above. It is the responsibility of network subsystem L2/driver
implementations (notably Ethernet and IEEE 802.15.4 L2 stacks) to ensure
consistency of all timestamps and radio timer values exposed by the
driver API to such a network subsystem uptime reference clock
independent of internal implementation details.

The "virtual" network clock source may be implemented based on arbitrary
hardware peripherals (e.g. a coarse low power RTC counter during sleep
time plus a high resolution/high precision radio timer while receiving
or sending). Such implementation details must be hidden from API
clients, as if the driver used a single high resolution clock source
instead.

For IEEE 802.15.4, whenever timestamps refer to packet send or receive
times, they are measured when the end of the IEEE 802.15.4 SFD (message
timestamp point) is present at the local antenna (reference plane).

Due to its limited range of ~290 years, net_time_t timestamps (and
therefore net_pkt timestamps and times) must not be used to represent
absolute points in time referred to an external epoch independent of
system uptime (e.g.  UTC, TAI, PTP, NTP, ...).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-28 09:06:35 +00:00
Marc Desvaux ae72fa7bf6 samples: net: zperf: add Ethernet twister test
add one Ethernet twister test for nucleo_h563zi,
nucleo_h743zi, nucleo_f429zi, nucleo_f746zg.
remove the common: harnesses: net  that are not supported
leave harnesses: net for all other test execpt the one we use

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-07-27 16:24:54 +00:00
Andriy Gelman d8f955e375 drivers: pwm: Add driver for xmc4xxx using ccu8 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 8 (CCU8)
module. There are two CCU8 nodes with each one having four slices.
Each slice has two output channels.

Unlike CCU4, this module can generate complementary high-side/low-side
signals for each output channel. A variable dead time can be added
during the off to on transitions to make sure that the
high-side/low-side signals are not on at the same time.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Andriy Gelman 23b6e4f507 drivers: pwm: Add driver for xmc4xxx using ccu4 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 4 (CCU4)
module. There are four CCU4 with each one having four channels
Thus it's possible to have up to 16 pwm output signals. The output of
each channel can only be connected to a specific port/pin. The possible
connection and gpio configurations are defined using pinctrl.

The CCU4 module also has a capture mode. Capture support will be added
in the future.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Gerard Marull-Paretas 7ef8911e8c samples: basic: hash_map: fix libc heap size setting
The malloc arena/heap size setting can be adjusted using different
Kconfig options, depending on the libc implementation. This means
prj.conf can't be used to set this value on projects that can be built
for multiple libcs without generating a Kconfig warning.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-26 14:53:51 +02:00
Johann Fischer 430818ecaa sample/tests: remove CONFIG_USB_COMPOSITE_DEVICE usage
This is no longer necessary, as this option is selected as a dependency
for class implementations where it is required.
Also remove redundant test cases.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-07-26 14:37:15 +02:00
Iuliana Prodan f4f261bce5 samples: openamp_rsc_table: increase stack size
While testing openamp_rsc_table sample for HiFi4 DSP from
i.MX8MP, realized the stack is not enough.
Increase the size based on Thread Analyzer measurements:

*** Booting Zephyr OS build zephyr-v3.4.0-971-g9415baf2c211 ***
Starting application threads!

OpenAMP[remote]  linux responder demo started

OpenAMP[remote] Linux sample client responder started

OpenAMP[remote] Linux tty responder started
[00:00:00.020,000] <dbg> openamp_rsc_table: mailbox_notify:
mailbox_notify: msg received

[00:00:00.024,000] <dbg> openamp_rsc_table: mailbox_notify:
mailbox_notify: msg received

Thread analyze:
 0x9240c5a0          : STACK: unused 240 usage 1296 / 1536 (84 %); CPU: 10%
      : Total CPU cycles used: 3388523
 0x9240c628          : STACK: unused 240 usage 784 / 1024 (76 %); CPU: 10%
      : Total CPU cycles used: 4086621
 0x9240c6b0          : STACK: unused 408 usage 616 / 1024 (60 %); CPU: 7%
      : Total CPU cycles used: 3553673
 0x9240c738          : STACK: unused 152 usage 872 / 1024 (85 %); CPU: 44%
      : Total CPU cycles used: 25529572
 0x9240c7c0          : STACK: unused 352 usage 672 / 1024 (65 %); CPU: 21%
      : Total CPU cycles used: 13742359
 0x9240c888          : STACK: unused 936 usage 88 / 1024 (8 %); CPU: 0%
      : Total CPU cycles used: 0
 ISR0                : STACK: unused 1536 usage 512 / 2048 (25 %)

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-07-26 14:33:36 +02:00
Iuliana Prodan 393a7e107d samples: add support for nxp_adsp_imx8m in openamp_rsc_table
Add the dts and config overlay for nxp_adsp_imx8m board
in order to have the openamp_rsc_table sample working on
HiFi4 DSP from i.MX 8M Plus.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-07-26 14:33:36 +02:00
Kevin Wang 7bfe096787 samples: drivers: mbox: Support the new board adp_xc7k_ae350
Modify the related source in mbox sample to support board adp_xc7k_ae350.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-07-26 10:51:41 +02:00
Manuel Argüelles 87e40d8b6d samples: enable flash samples for mr_canhubk3 board
Various samples enabled to use the on-board QSPI memory.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-26 09:44:14 +02:00
Pavlo Havrylyuk f4a1d40924 drivers: counter: Add Infineon CAT1 counter driver
Add initial version of Infineon CAT1 counter driver
Add initial version of binding file for Infineon
Add counters to psco6 dtsi
Add external trigger pin that runs counter

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-07-26 09:10:31 +02:00
Pieter De Gendt 8cbb6c8a0c samples: drivers: crypto: Add testcase for NXP MCUX DCP
Add a testcase for mimxrt1064_evk to be able to run the crypto
sample.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Pieter De Gendt e1e19732bc samples: drivers: crypto: Aligned AES key
Some drivers require the encryption key to be 4-byte aligned.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Pieter De Gendt 16f34e969b samples: drivers: crypto: Simplify configuration
Use a default prj.conf to be used for all samples and use
EXTRA_CONF_FILE for specifics.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Girisha Dengi ba40e9fded samples: subsys: shell: Custom configs for intel_socfpga_agilex* boards
The intent of this change is to add custom shell configurations for
intel_socfpga_agilex* based boards. As of now, configurations are
added for 'intel_socfpga_agilex5_socdk' board.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2023-07-25 16:58:01 +00:00
Marek Matej 6b57b3b786 soc: xtensa,riscv: esp32xx: refactor folder structure
Refactor the ESP32 target SOCs together with
all related boards. Most braking changes includes:

- changing the CONFIG_SOC_ESP32* to refer to
  the actual soc line (esp32,esp32s2,esp32s3,esp32c3)
- replacing CONFIG_SOC with the CONFIG_SOC_SERIES
- creating CONFIG_SOC_FAMILY_ESP32 to embrace all
  the ESP32 across all used architectures
- introducing CONFIG_SOC_PART_NUMBER_* to
  provide a SOC model config
- introducing the 'common' folder to hide all
  commonly used configs and files.
- updating west.yml to reflect previous changes in hal

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Marek Matej 3776402f40 boards: xtensa: esp32 board split
Remove virtual esp32 board and replace it with the
real word boards:

- esp32_devkitc_wroom
- esp32_devkitc_wrover (with PSRAM option)

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Robert Lubos 9866a5229d samples: net: dns_resolve: Improve DHCPv4 handling
There is some ambiguity with the DHCPv4 handling in the dns_resolve
sample. On one hand, the sample uses net_config library, which does
initiate the DHCPv4 on the interface (if enabled) and may block the
initialization until the address is assigned (in case there is no other
statically assigned IPv4 addresses.) On the other hand, the sample
registers for NET_EVENT_IPV4_ADDR_ADD in case DHCPv4 is in use, delaying
the DNS queries until address is assigned.

In case net_config delayed the initialization however, this will not
work, as the event handler will be registered only after DHCPv4 address
is assigned, so the callback will not get executed.

Fix this, by checking if DHCPv4 assigned address already exists on an
interface - if so, schedule DNS queries immediately. Otherwise (for
example in case when net_config was not configured to wait for address)
register an event callback, and schedule queries from there.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-25 14:18:54 +02:00
Carlo Caione 15e84cbfac dts: Move to 'zephyr,memory-attr'
Move to 'zephyr,memory-attr' and use the newly introduced helpers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
Daniel DeGrasse 3c23ff051d boards: arm: mimxrt1060_evk: enable PXP rotation for LVGL sample
Enable PXP rotation for LVGL sample. The PXP is configured to
rotate by 0 degrees, so the original image is left untouched.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:10:52 +02:00
Daniel DeGrasse d209c837b5 boards: arm: mimxrt1170_evk: enable PXP
Enable PXP engine with RT1170 EVK. The PXP is set to rotate by 0
degrees in the LVGL sample, for testing purposes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:10:52 +02:00
Jason Yuan ad555d08d8 samples: boards: firmware for Twinkie V2
sample firmware for Twinkie V2 that toggles the LED based on charging
status.

Signed-off-by: Jason Yuan <jasonyuan@google.com>
2023-07-25 09:08:19 +02:00
Hiroki Tada 33e0bca014 samples: Remove esp32_temp_sensor
- esp32_temp_sensor is removed as die_temp_polling is used instead of it.

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-07-24 13:22:03 +00:00
Hiroki Tada 7e3f0ef407 samples: Add esp32s2_saola overlay
- Add overlay for the esp32s2_saola board to die_temp_polling sample.
- Add aliases for the die_temp_polling sample to esp32s2 dtsi.

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-07-24 13:22:03 +00:00
Fabian Blatz a8b103e4ad samples: lvgl: Enable lvgl shell
Activate the lvgl shell with memory statistics and monkey testing support
for the lvgl sample.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-07-24 09:06:56 +00:00
Daniel DeGrasse 351cb4bafe samples: drivers: add led_is31fl3733 sample to demonstrate usage
Add sample to demonstrate usage of IS31FL3733 LED using the LED API.
This led matrix controller has several custom APIs to expose
functionality not available within the standard led API, such as
limiting LED current.

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-07-21 10:51:18 +00:00
Guillaume Gautier 276b5577cb samples: drivers: adc: boards: Add overlay for NUCLEO_WBA52CG
Add overlay for NUCLEO_WBA52CG

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-20 16:25:02 +02:00
Felipe Neves da3ae1af61 samples: drivers: ipm: added IPM over IVSHMEM sample
To demonstrate how to configure Zephyr to use the IPM
driver over the IVSHMEM subsystem. Since this driver
is intended to generate inter QEMU VM notifications
it was better to create a sample app using the shell
for quick demonstration for the users.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2023-07-20 10:44:57 +00:00
Gerard Marull-Paretas bddf2d9dc0 tests: pm: select HAS_PM
Some tests provide their own PM hooks, adapted for testing purposes. Add
a new option to select HAS_PM, so that CONFIG_PM can be enabled.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-20 10:33:00 +00:00
Michael Zimmermann 0da94225b0 arch/posix: make posix_fuzz_buf const
The original buffer is const as well and we're not allowed to modify it.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2023-07-18 19:19:53 +00:00
Michael Zimmermann 8de34fef19 arch/posix: use size_t for posix_fuzz_sz
That's the type of the original argument and we should use it internally as
well to prevent truncating the value.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2023-07-18 19:19:53 +00:00
Silviu Petria f3aaf33422 Bluetooth: Audio: Add TMAP broadcast samples
Add two TMAP broadcast sample applications.

tmap_bms implements the Broadcast Media Sender role. It uses CAP
Initiator broadcast APIs to broadcast an audio stream.

tmap_bmr implements the Broadcast Media Receiver role. It scans and
syncs to the PA having filtered the EA by the presence of TMAP role
information. It also instantiates the VCP.

Signed-off-by: Silviu Petria <silviu.petria@nxp.com>
2023-07-18 11:09:31 +00:00
Chaitanya Tata 631312334e samples: lwm2m: Fix default ID length check for DTLS
If the default which is set to CONFIG_BOARD is used, then the lwm2m
client fails to set the client identity as the default maximum length
allowed is only 16 and for some boards this exceeds.

So, increase the default length to accomodate almost all boards. Also
add a build assert for the length validation.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-07-18 11:08:23 +00:00
Mariusz Skamra c09c4181cf Bluetooth: audio: tbs_client: Minor Kconfig refactor
This intoduces dedicated Kconfig option to enable TBS client,
that makes the configuration more intuitive.
While configuring GTBS only, the user does not have to explicitly set
the BT_TBS_CLIENT_MAX_TBS_INSTANCES to 0 to disable the TBS client
functionality.
This adds also `tbs_only_client` test case to test the TBS only build
option.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-07-18 11:06:57 +00:00
Wojciech Sipak 6fe016984c boards: efm32pg_stk3402a: use gecko-adc
This adds a proper ADC node that uses the gecko-adc driver.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-18 11:05:39 +00:00
Robert Lubos 87ee12ae72 samples: net: echo_client: Fix build with UDP disabled
In case UDP is disabled, init_udp() is not compiled and the build
fails. Fix this, by providing dummy implementations for UDP functions,
in case UDP is disabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-17 17:21:33 -04:00
Robert Lubos 1f1f550ad6 samples: net: echo_client/server: Fix mbed TLS dependency
All application level TLS operations should be guarded with
"#if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS)" and not mbed TLS configs
only. Otherwise, in case mbed TLS is enabled, but the sample is not
configured to use TLS (hence TLS credential library is not available
for example), the build may fail or produce spurious warnings.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-17 17:21:33 -04:00
Nerijus Bendžiūnas 397ed142ad doc: fix :zephyr-app: paths
During testing I've found one bad path and looked if
there is more.

I've used this oneliner to find more:

```
rg :zephyr-app: | awk '{ print $3 }' | while read dir
do
    test -d $dir || echo $dir
done | grep '^samples' | grep -v '<' | sort | uniq

```

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
2023-07-17 16:51:16 -04:00
Ryan McClelland 9603c0ce75 samples: sensor: lsm6dso: fix double promotion warning
fix double promotion warning when compiling with
-Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-07-17 13:02:46 -05:00
Nick Ward 371f0f2503 drivers: adc: use adc_is_ready_dt helper function
Update  `struct adc_dt_spec` use with adc_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-07-17 10:16:22 +00:00
Chen Xingyu 18d60b9c5d samples: driver: auxdisplay: Add overlay for PT6314 on esp32c3_devkitm
This demo is done on a Futaba M202MD15FA module, wired as:

* STB   -> PIN5
* SCK   -> PIN6
* SI/SO -> PIN7

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2023-07-14 12:09:03 +02:00
Fabio Baltieri 04e0e458c8 input: convert gt911 from kscan
Convert the GT911 driver to the input subsystem, fix the existing boards
to work in the default config.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-13 14:24:50 +00:00
Loic Poulain df7749129f samples: cdc_acm: Add 96b_carbon to usbd-next board
This board can rely on udc_stm32 usbd-next driver.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2023-07-13 10:44:42 +02:00