Commit graph

10761 commits

Author SHA1 Message Date
Jacob Siverskog
046f29a8cb Bluetooth: ATT: Fix typo in defines
Fix typo in ATT first/last attribute defines.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2021-10-23 20:39:36 -04:00
Andrei Auchynnikau
822f2c3cb4 boards: add adc support to the mimxrt1050 board
add adc to board dts file,
update yaml files and documentation,
add adc 1 channel pins 1 and 15 to the pinmux file,
add overlay file to the board adc sample,
add board to the adc test file and

Signed-off-by: Andrei Auchynnikau <ovchinnikov@strim-tech.com>
2021-10-22 15:43:36 -05:00
Anas Nashif
75cb6e6498 tests: uefi: move uefi test out of hello world
Do not misuse the hello world sample for testing of features, keep it
simple. Create a new test for booting with uefi instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-10-22 06:36:51 -04:00
Abe Kohandel
190848177e bluetooth: ots: Enable testing with assert
Fix compilation and logic issues to allow testing OTS functionality with
assert enabled.

The compilation fixes are simple and do not require an explanation.

The assertion in bt_ots_dir_list_init was logically reversed. Its
purpose is to ensure the directory list is not already initialized
and as such should assert that the dir_list is not set (i.e. is NULL).

Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
2021-10-21 11:21:13 -04:00
Iuliana Prodan
dd1c96d123 samples/subsys/audio/sof: add configuration for imx8m board
Add support for SOF with Zephyr on i.MX8MP board.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Evgeniy Paltsev
efc9cee834 samples: shell_module: fix build on 64bit platforms
After the __printf_like validation was added to the shell_fprintf
functions we got warnings while building the
'samples/subsys/shell/shell_module' due to incorrect specifiers
while printing size_t variables. Fix that.

Fixes: #39386
Fixes: fe2075d140 "shell: Add __printf_like to shell_fprintf"

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-19 06:44:20 -04:00
Emil Gydesen
a56cbed603 Bluetooth: ISO: Split ISO broadcast config
Splitt he ISO broadcast config into broadcaster and
sync receiver. This will allow a device that only
wants to one of the roles to have a much more optimized
configuration.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-18 12:43:38 +02:00
Tom Burdick
f523c336ef pm: Use stats subsys for tracking system states
Uses the stats subsys to provide simple but useful debugging stats for
power management state changes and timing.

Removes the no longer needed PM_DEBUG config option

Replaces the use of PM_DEBUG for a test clock output pin for mec1501 and
adds in its place an SoC Kconfig option to enable it.

Adds a STATS_SET macro for assigning a value to a stat group field

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-10-17 10:56:21 -04:00
Filip Kokosinski
3fff2550d0 samples/subsys/shell/shell_module: add board name command
This commit adds a new subcommand to the `demo` command that prints out
the name of the used board.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2021-10-14 16:33:42 -04:00
Krzysztof Chruscinski
eb3375f47c shell: Add __printf_like to shell_fprintf
Add __printf_like modifier to validate strings used by shell.
Fixing warnings triggered by this change.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-10-14 16:32:19 -04:00
Tom Burdick
fc34338d77 stats: Add a stats shell command
Adds the stats shell command to list all stats and enable the command in
the shell sample app.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-10-14 06:32:57 -04:00
Pavlo Hamov
11dd83b02b samples: drivers: watchdog: remove accidential copy-paste
watchdog dts instance was already present for esp32 family

Signed-off-by: Pavlo Hamov <p.hamov@venstar.com>
2021-10-13 14:59:36 -04:00
Pavlo Hamov
8ed9f64064 samples: wdt: add esp32s2 support
Add support of esp32s2_soala board

Signed-off-by: Pavlo Hamov <p.hamov@venstar.com>
2021-10-13 10:14:35 -04:00
Robert Lubos
875c75c4f9 net: lwm2m: Replace float32_value_t with double
Replace the custom float32_value_t LwM2M type with native double, to
facilitate LwM2M API and improve floating point precission.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-10-13 10:13:32 -04:00
Guennadi Liakhovetski
5ec9738c9b boards: xtensa: intel_adsp_cavs15: force COMP_SRC_TINY
cAVS 1.5 has little RAM, force COMP_SRC_TINY to fix SOF build
failures under Zephyr with XCC.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-10-13 08:34:51 -04:00
Evgeniy Paltsev
eacabaf5ae tests: tracing.osawareness.openocd cleanup
Move all config options to prj.conf. No functional
changes intended.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-13 06:22:44 -04:00
Evgeniy Paltsev
8077907827 tests: fix tracing.osawareness.openocd when thread names disabled
tracing.osawareness.openocd relies on the CONFIG_THREAD_NAME is
enabled, however we don't enable it in test config.

Fix that.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-13 06:22:44 -04:00
Evgeniy Paltsev
2677e55b92 tests: fix tracing.osawareness.openocd for SMP platforms
The tracing.osawareness.openocd doesn't support executing
on multicore Zephyr. However we disable multiple CPUs
usage in two different ways for this test:
 - by setting CONFIG_MP_NUM_CPUS to 1
 - by setting CONFIG_SMP to n

It's not correct for all SMP platforms to disable SMP. As
it is also excessive (we can guarantee the execution on
single core by setting CONFIG_MP_NUM_CPUS=1) let's drop
SMP disabling.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-13 06:22:44 -04:00
Carlo Caione
6c00e980b2 ipc: ipc_service: Rework multi-instance backend.
Only one single IPC service backend is currently present: multi_instance
backend. This backend is heavily relying on the RPMsg multi_instance
code to instanciate and manage instances and endpoints. Samples exist
for both in the samples/subsys/ipc/ directory.

With this patch we are "unpacking" the RPMsg multi_service code to make
it more modular and reusable by different backends.

In particular we are re-organizing the code into two helper libraries:
an RPMsg library and a VRING / virtqueues static allocation library. At
the same time we rewrite the multi_instance backend to make fully use of
those new libraries and remove the old multi_instance sample.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-11 20:58:09 -04:00
Piotr Pryga
fba51111cf samples: Bluetooth: df: enable filtering of per adv by CTE type
Enable filtering of periodic advertisements to synchronize
with advertisenemts that include CTE.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
David Brown
26a630bf59 samples: tfm_integration: Fix PSA crypto APIs
Moving to Mbed TLS 3.0 changes some of the Mbed TLS to better match the
PSA spec.  Fix up the things where we are affected by these API changes.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-10-07 14:02:40 -05:00
Stephan Linz
ca1f3c32be samples: echo_server: Enable USB by the application
This commit allows let build echo_server sample with
overlay-netusb.conf.

USB subsystem must be enabled by the application.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2021-10-07 10:53:54 +02:00
Kumar Gala
bfcb32b755 samples/subsys/mgmt/osdp: Fix build issues
The samples/subsys/mgmt/osdp utilize GPIO so having it set in the
prj.conf is needed since not all platforms enable GPIO by default.

To address the 'No SOURCES given to Zephyr library: drivers__gpio'
add a 'depends on gpio' to the sample.yaml to only build this on
platforms that have GPIO driver support.

Fixes #39180

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-10-06 10:32:10 -04:00
Johann Fischer
fb454d09bb doc: usb: refactor USB device support documentation structure
Move related areas to their own files and order
documentation logically from lower to upper layer.
Fix gross errors and inconsistencies.

Co-authored-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Ryan Erickson
e706967d34 samples: lwm2m: update client stop API
Try to deregister client when closing connection.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2021-10-05 19:23:59 -04:00
Igor Knippenberg
e32c974336 samples: sensors: fdc2x1x: fixed bugs in pm_info()
Both ARG_UNUSED in pm_info(), cause errors when using PM_DEVICE=y.
Added a default case in pm_info(), to fix warnings.

Signed-off-by: Igor Knippenberg <igor.knippenberg@gmail.com>
2021-10-05 13:13:46 -04:00
Glauber Maroto Ferreira
774aef0cf8 wifi: esp32s2: add board wifi station sample
by adding esp32s2 configs and documentation.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-10-01 10:51:37 -04:00
Nick Ward
e0f18128bf task_wdt: fix silent init failures
The task_wdt_init() API can fail to install a timeout for the fallback
hardware WDT (hw_wdt) without returning an error code.  This patch
enables task_wdt_init() to return the hw_wdt install timeout error code
if the hw_wdt install timeout fails.

Signed-off-by: Nick Ward <nick.ward@setec.com.au>
2021-10-01 15:21:32 +02:00
Henrik Brix Andersen
7a525c1c24 samples: sensor: fxos8700: add mimxrt1024_evk board configuration
Add configuration for the mimxrt1024_evk board. This board does not have
any of the FXOS8700 interrupt pins connected by default, so triggers are
not available.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-09-29 10:07:41 -04:00
Emil Gydesen
8d20e8d5bc Bluetooth: ISO: Add iso accept info struct
Add a new struct that provides information to the upper
layer when accepting an connected isochronous stream.

The CIG ID and CIS ID makes it possible for the upper layer
to determine which ISO channels are "together" in a group.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-28 20:19:37 -04:00
Håkon Øye Amundsen
ede29d849d samples/mgmt/smp_svr: Increase main stack size
Some build variants will fail runtime for certain boards (e.g. nRF52832)
due to stack overflow. Avoid this by increasing the stack size.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2021-09-28 20:15:25 -04:00
Emil Gydesen
5a11a19713 Bluetooth: Iso: Add BT_ISO_SDU_BUF_SIZE macro
Add the BT_ISO_SDU_BUF_SIZE which can be used to declare
the TX buffers for ISO, similar to the BT_L2CAP_SDU_BUF_SIZE
macro for L2CAP.

This also updates the ISO samples to use this as well
updating the SDU check to use
CONFIG_BT_ISO_TX_MTU/CONFIG_BT_ISO_RX_MTU without
subtracting the BT_ISO_CHAN_SEND_RESERVE to make the
API more clear.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-28 20:07:32 -04:00
Marc Herbert
3e0bc8c231 samples/audio/sof: remove zephyr_interface_library_named(sof_lib)
As this makes no difference, it's misleading so let's remove it to stop
being misled. I don't know why initial commit efa794dbc5 added it but
the build directory is strictly identical with or without this line.

The SOF code is included in the build thanks to CONFIG_SOF in prj.conf,
not this.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-09-28 20:03:15 -04:00
Jakub Rzeszutko
2b5723d455 shell: add init backend configuration
Each backend can configure separately features like colors on/off, VT100
handling and so on. This can be very handy for planned MQTT backend.
Shell will not send VT100 commands when VT100 is not enabled globally or
for particular backend.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-09-28 20:02:01 -04:00
Jonathan Hahn
a133bf8821 samples: sensors: add sample for i3g4250d gyro
Adds a sample for the ST I3G4250D gyroscope.

Signed-off-by: Jonathan Hahn <Jonathan.Hahn@t-online.de>
2021-09-28 19:44:26 -04:00
Carlo Caione
8f53f319cd reserved-memory: Fix layering violation
Move memory.h out of the way in a more "private" space
(include/linker/devicetree_reserved.h) to prevent polluting the
devicetree space.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-09-28 14:01:36 -04:00
Torsten Rasmussen
d800b4a4d7 drivers: gpio: remove unused GPIO selection
Fixes: #38403

Removing unneeded `imply GPIO` and `CONFIG_GPIO=y` occurrences where no
files are added to the gpio zephyr library.

Also removed `CONFIG_GPIO=y` occurences where this is handled by
defconfigs for the soc or board.

Selection of GPIO without selecting any drivers results in the warning:

> No SOURCES given to Zephyr library: drivers__gpio
>
> Excluding target from build.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-09-28 12:13:23 +02:00
Torsten Rasmussen
8e64038559 drivers: net: adding NET_DRIVERS menuconfig
Fixes: #38403

Adding NET_DRIVERS menuconfig so that network drivers are grouped
together in its own menu entry under drivers, similar to most other
drivers.

This further has the advantages that `CONFIG_NET_DRIVERS` can be used
for testing to determine if network drivers has been selected.

This changed revealed a dependency loop where both `select` (for SLIP)
and `depends` (for PPP) which both depends on NET_DRIVERS` where in use
in the dependency tree for Qemu networking, especially NET_SLIP_TAP.

This is handled by defaulting `NET_DRIVERS` to `y` when building for a
Qemu target.
`SLIP` had a dependency to `!QEMU_TARGET || NET_QEMU_SLIP`. This is
changed so that SLIP prompt depends on `!QEMU_TARGET` which provides
full user control in hardware but makes the symbol promptless on Qemu
targets.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-09-28 12:13:23 +02:00
Fabio Baltieri
89df245b0d samples: modbus: update/fix samples.yaml configs
Update the sample.yaml files for the modbus samples:
- depends_on entries should just be space separated, drop the comma
- add the platform referenced in the documentation to platform_allow
- replace the deprecated dt_compat_enabled_with_alias with
  dt_enabled_alias_with_parent_compat

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-09-27 21:54:56 -04:00
Fabio Baltieri
64a2d97c03 samples: modbus: rtu_server: drop unused variable
This has been unreferenced since:

4ff616b647 modbus: rework interface configuration

This generates a compiler warning, but it went unnoticed because the
sample test is configured incorrectly and not running.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-09-27 21:54:56 -04:00
Fabio Baltieri
46ef9be075 samples: canopennode: fix the sample path
The sample code got moved in 613f1cde4a, update the old path to the
current one.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-09-27 21:54:56 -04:00
Iuliana Prodan
0b23984920 samples/subsys/audio/sof: add configuration for i.MX8QXP board
Add support for i.MX8X, which represents i.MX8QXP board.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-09-27 21:52:31 -04:00
Robert Lubos
eca98e37d4 samples: net: coap_server: Finetune sample parameters
Finetune coap_server sample parameters for better user experience.

Reduce the maximum retransmission count to release resources earilier in
case client is unreachable and no longer responds. Increase the maximum
number of pending retransmissions, along with the heap size (the buffers
for messages are allocated on a heap), to improve sample responsiveness,
in case multiple unreplied messages are pending retransmission.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-09-27 11:36:15 -04:00
Robert Lubos
15ba020343 samples: net: coap_server: Remove observer on notification timeout
In case no reply is received for notification message, remove the
corresponsding observer since it's no longer reachable, freeing slot for
another one.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-09-27 11:36:15 -04:00
Robert Lubos
33677ef383 samples: net: coap_server: Fix retransmission mechanism
The retransmission handler only increased the retransmission count, w/o
sending the actual message again. Additionally, the next retransmission
time calculation was broken - it did not take into consideration the
time that has already passed since before retransmission, and re-applied
the entire timeout value.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-09-27 11:36:15 -04:00
Jamie McCrae
2af4861014 samples: ipc: rpmsg_service: Add support for BL5340
Add support for BL5340 to rpmsg_service sample

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-09-23 13:13:51 -04:00
Jamie McCrae
d460536a1b samples: ipc: rpmsg_multi_instance: Add support for BL5340
Add support for BL5340 to rpmsg_multi_instance sample

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-09-23 13:13:51 -04:00
Jamie McCrae
e61009a2f5 samples: ipc: ipc_service: Add support for BL5340
Add support for BL5340 to ipc_service sample

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-09-23 13:13:51 -04:00
Andrzej Głąbek
4212e95763 samples: boards: nrfx: Fix setting up of (D)PPI channel endpoints
There is a copy-paste error in this sample code that results
in a function for input events being called for an output pin.
By chance, this has no influence on the behavior of the sample,
as the function returns a register offset that for events and
tasks is the same for a given channel, but obviously the code
is confusing.
This is fixed by replacing the relevant part with more suitable
function calls, to also simplify the code a little.

On the occasion, also a remark is added about no button debouncing
used in the sample, to prevent users from being surprised by its
possible behavior.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-09-23 13:13:30 -04:00
Erwan Gouriou
34a67cf2ff samples/board/stm32: PM blinky: Enable CONFIG_DEBUG in CI
Enable CONFIG_DEBUG when test is run in CI.
This will allow DGB access in stop modes (and specially flashing)
and avoid potential issues when test in run in a test suite.

Note that on some targets (stm32wb for instance) openocd is able
to do the same operation, and which allows to reflash the target
even if switch was not enabled, but this could not be the case
on all targets.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-09-23 12:54:03 -04:00