Commit graph

4655 commits

Author SHA1 Message Date
Stephanos Ioannidis 6f91f97939 random: Clarify the semantics of TEST_RANDOM_GENERATOR
The `TEST_RANDOM_GENERATOR` Kconfig symbol indicates that a non-random
number generator (i.e. a random number generator that is not truly
random) is _allowed_ to be used for testing purposes, and not
necessarily that a non-random number generator is _selected_ -- that is
indicated by the `RNG_GENERATOR_CHOICE` choices that depend on
`TEST_RANDOM_GENERATOR` (i.e. only `TIMER_RANDOM_GENERATOR` as of now).

This commit updates the `TEST_RANDOM_GENERATOR` Kconfig symbol
description to reflect and clarify that.

It also removes the `TEST_RANDOM_GENERATOR`'s dependency on
`ENTROPY_HAS_DRIVER` because the act of _allowing_ a non-random number
generator to be used does not depend on the availability of an entropy
driver -- when an entropy driver is available, by default, the
`ENTROPY_DEVICE_RANDOM_GENERATOR` will be selected; otherwise,
`TIMER_RANDOM_GENERATOR`, a non-random generator, will be selected.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-12-15 22:35:31 +01:00
Martí Bolívar ec725b5cab doc: application development: fix DT overlay section
Commit f17630ba75
("doc: application: added description of WARN_EXPERIMENTAL setting")
introduced a new section in the Kconfig settings bit about
experimental features.

This broke the structure of the document, however, because it used the
wrong kind of section underline, resulting in a hierarchy that looks
like this:

   Application Configuration
   └── Kconfig Configuration
   Experimental Features
   └── Devicetree Overlays

when it should have looked like this:

   Application Configuration
   ├── Kconfig Configuration
   |   └── Experimental Features
   └── Devicetree Overlays

This falsely make it look like DT overlays are an experimental
feature!

Fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-12-15 10:43:21 +01:00
Marcin Niestroj 2d3365200c settings: file: drop CONFIG_SETTINGS_FILE_DIR
There is already CONFIG_SETTINGS_FILE_PATH, which is set to full file path,
while CONFIG_SETTINGS_FILE_DIR is required to be set to its parent
directory. This is redundant, as parent directory path can be easily found
out either during runtime or optionally during buildtime by CMake.

CONFIG_SETTINGS_FILE_DIR was actually introduced recently after Zephyr 3.2
release as a replacement of deprecated CONFIG_SETTINGS_FS_DIR. This means,
that there is no need to deprecate it for 3.3 release and dropping it
should be fine. Adjust 3.3 release notes accordingly, so that
CONFIG_SETTINGS_FILE_PATH will be used directly.

This patch stops using deprecated CONFIG_SETTINGS_FS_DIR. There is actually
no value in respecting it, as setting anything other than parent directory
of CONFIG_SETTINGS_FS_FILE makes no sense.

There is actually one use of CONFIG_SETTINGS_FILE_DIR in file backend
tests, to derive directory for files containing tested settings.
CONFIG_SETTINGS_FILE_PATH is not used there, so it makes little sense to
derive directory name from it. Instead, just use hardcoded "/settings"
subdirectory, as this was the default value of CONFIG_SETTINGS_FILE_DIR.

Deriving parent directory can be done either in runtime or in
buildtime (e.g. using some helper CMake function). Doing it in runtime
however allows to create directory recursively (which this patch actually
implements), e.g. for some more nested FS tree structure. Additionally it
will simplify migration of settings configuration from Kconfig to
device-tree (yet to be developed feature).

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-12-14 14:11:03 +01:00
Marcin Niestroj f386967b06 settings: do not panic on backend initialization errors
There is little reason to panic on settings backend initialization error.
Such behavior was introduced with initial settings subsystem support, which
was adapted from MyNewt. This is not the usual way how Zephyr handles
errors, so it is time to change that.

There is already handling of some errors by simply returning / propagating
them to caller. Rework all the paths that resulted in k_panic() to also
return error codes.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-12-14 14:10:55 +01:00
Dominik Ermel 5d482b5c0e doc/release: Add note on FAT driver update to 0.15
Added note on updating FAT driver to version 0.15 with patch1

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-13 10:44:01 -06:00
Carlo Caione c464a962e1 cache: Add documentation
To disambiguate the Kconfig options available to the user.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-12-13 16:31:42 +00:00
Gregers Gram Rygg d5987756e7 drivers: flash: spi_nor: release notes for fix flash busy during init
Add release notes for #51662.

Signed-off-by: Gregers Gram Rygg <gregers.gram.rygg@nordicsemi.no>
2022-12-12 15:00:37 +01:00
Dominik Ermel 1d5c9cf7fd doc/dfu: Add MCUboot API chapter to documentation
The DFU documentation has been extended with MCUboot API
chapter and API reference, from mcuboot_api Doxygen group.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-10 09:46:35 +01:00
Dominik Ermel 8873ad2b39 doc: Move Flash Img API under Device Management
The Flash img API is used for writting image application image
to flash and is rather part of DFU than storage.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-10 09:46:35 +01:00
Pavel Vasilyev 163c2bc316 Bluetooth: Mesh: Warn log mode incompatibility with friendship
Log modes other than the deferred may cause unintended delays during
processing of log messages. This in turns will affect scheduling of the
receive delay and receive window for both, Friend and LPN.

Adding a compilation warning instead of assert as a user may still want
to compile a code with friendship feature enabled without actually
establishing a friendship.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-12-09 11:18:18 +01:00
Bartosz Bilas acbe0d3264 drivers: spi: deprecate spi_is_ready function
Make `spi_is_ready` function deprecated in favor of `spi_is_ready_dt`.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-12-07 09:40:23 -06:00
Declan Snyder 62abf16530 doc: board porting: Add clarifications
Clarify:
- Board directory name does not need to match board name
- Give example of multi board directory

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-12-07 14:23:32 +00:00
Jamie McCrae 5ffbda342f doc: release: 3.3: Add os_mgmt info command
Adds details of a new os_mgmt command for getting OS/application
information.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-07 13:53:02 +00:00
Jamie McCrae 75c6f93ff6 doc: mgmt: smp group 0: Add OS info details
Adds details on the OS information mcumgr command.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-07 13:53:02 +00:00
Jamie McCrae 7c4095e1e4 doc: release: 3.3: Add change on MCUmgr img_mgmt hash
Adds that MCUmgr img_mgmt upload hashes must not comprise of a
full non-trucated sha256 hash.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-07 10:13:02 +00:00
Jamie McCrae cc6a52ebd0 doc: mgmt: mcumgr: Clarify sha256 hash details in img_mgmt
Clarifies that a full SHA256 hash is required for the hash
in img_mgmt.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-07 10:13:02 +00:00
Théo Battrel be799f2f78 Bluetooth: doc: Note on thread safety
Add a thread safety section.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-12-07 10:09:03 +00:00
Dominik Ermel 3fcc9c3171 doc/releases: Add note on removal of CONFIG_APP_LINK_WITH_MCUMGR
Release notes updated.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-05 17:22:51 +01:00
Franciszek Zdobylak dcbb0b4c55 doc: release-notes: add file systems notes
This commit adds file systems release notes for Zephyr v3.3.0.

Signed-off-by: Franciszek Zdobylak <fzdobylak@internships.antmicro.com>
2022-12-05 15:36:00 +01:00
Dominik Ermel c757c5e9df doc/release: Add note on addition of CONFIG_FS_FATFS_MIN_SS
Note on CONFIG_FS_FATFS_MIN_SS being provided for FAT FS driver
configuration.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-05 15:18:05 +01:00
Glauber Maroto Ferreira ea13fc6ef6 doc: services: pm: add reference to esp32 sample
Includes reference to esp32 deep sleep sample code
to system power management documentation,

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Yuval Peress b38445eaa0 math: Introduce a DSP basicmath subsystem with a cmsis backend
Introduce an API mirroring the CMSIS-DSP's basicmath. If CMSIS_DSP is
enabled, then it will by default be used as a backend. Developers may
opt into a custom backend by setting CONFIG_DSP_BACKEND_CMSIS=n. If
done, the application must provide `zdsp_backend/dsp.h` and optionally
implement the functions in its own .c files.

Signed-off-by: Yuval Peress <peress@google.com>
2022-12-02 20:15:55 +01:00
Johann Fischer 9fb62f6f0d doc: usb: add UDC driver API reference
Add UDC driver API reference.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-02 12:55:18 +01:00
Gerard Marull-Paretas e0c8de1e39 drivers: regulator: fixed: simplify implementation
Remove regulator-fixed-sync specialization, create a single driver that
is always synchronous. The asynchronous part is rarely/never used, so
let's keep things simple for now.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-30 15:49:30 +01:00
Krzysztof Chruscinski 3a6e769070 doc: logging: Add section about LOG_PRINTK option
Add section which describes coexistence of printk and logging
and the behavior of LOG_PRINTK with information that it is by
default enabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-11-29 10:46:26 +01:00
Emil Gydesen ce2b8f9fe1 Bluetooth: Audio: Rename VCS to VCP
Renames almost all occurences of VCS to VCP, as we want to
use the profile as the namespace for volume control.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen aaac86dada Bluetooth: Audio: Rename vcs.h to vcp.h as well as the Kconfig file
Rename vcs.h to vcp.h to better detail what the
file contains, as it is more than just VCS. This also
renames the Kconfig file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Théo Battrel e458f5aae6 Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log
The `bluetooth/common/log.h` and `bluetooth/common/log.c` files have been
removed. Files that were using them have been updated to use
`zephyr/logging/log.h` instead.

Those replacement have been done consequently:
- `/BT_DBG/LOG_DBG/`
- `/BT_ERR/LOG_ERR/`
- `/BT_WARN/LOG_WRN/`
- `/BT_INFO/LOG_INF/`
- `/BT_HEXDUMP_DBG/LOG_HEXDUMP_DBG/`
- `/BT_DBG_OBJ_ID/LOG_DBG_OBJ_ID/`

Also, some files were relying on the `common/log.h` include to include
`zephyr/bluetooth/hci.h`, in those cases the include of `hci.h` has
been added.

For files that were including `common/log.h` but not using any logs,
the include has been removed and not replaced.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2022-11-25 17:08:36 +01:00
Emil Gydesen 87f86cebe2 Bluetooth: Audio: Rename bt_csip to bt_csip_set_member
Renamed remaining structs and functions that are not
for the set coordinator to use the set member CSIP
role name.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 15:23:48 +01:00
Emil Gydesen 93b3944a51 Bluetooth: Audio: Rename CSIS to CSIP
Renamed the coordinated set implementation to use the
profile (CSIP) name instead of the service (CSIS) name, as
the former is more general.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 15:23:48 +01:00
Johan Hedberg 96f9632ffe pcie: Deprecate pcie_probe() and pcie_bdf_lookup()
These functions are no longer needed with the centralized framework for
scanning for available PCIe devices and discovering their BDF value
through it.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2022-11-24 15:23:28 +01:00
Torsten Rasmussen 7ea6031430 doc: clarify where relative devicetree files are found
Add description of how relative devicetree overlay files are picked up
from the application configuration directory.

Also add a link to detailed description of application configuration
directory.

This aligns the devicetree overlays with the description found for
Kconfig configuration files.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-11-24 15:22:21 +01:00
Stephanos Ioannidis d90eea51fb doc: Update to Zephyr SDK 0.15.2
Update the Getting Started Guide and the Zephyr SDK documentation to
point to the Zephyr SDK 0.15.2 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-11-24 07:35:13 -05:00
Marcin Niestroj daee6cb4a9 settings: file: change FS (or file system) wording to File
Currently there is inconsistency in repository file names, APIs, Kconfig
options and documentation around file / file-system backend for settings
storage, as both "file" and "FS (file system)" are used. As an example,
there is `CONFIG_SETTINGS_FS` Kconfig option, but the file that implements
this settings backend is called `settings_file.c`. Another example are
names of static functions that implement settings storage API:
`settings_file_load()`, `settings_file_save()` and
`settings_fs_storage_get()`.

This backend is actually storing all settings in a single file, so it makes
sense to use "File" as the name of backend, instead of a more general
"FS" (which would make sense if several files would be used to store
settings).

Fix inconsistency in used wording in the tree and unify it to "settings
file backend". This naming is more precise to how the implementation looks.
It will also make it easier to grep through the codebase and analyze
existing code.

Deprecate settings_mount_fs_backend() function and all Kconfig options
starting with `CONFIG_SETTINGS_FS`.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-11-24 09:36:31 +01:00
Gerard Marull-Paretas 59d2f1c785 doc: releas-notes: inform about pinctrl bindings changes
Inform about the changes in the pinctrl bindings files.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-24 09:36:20 +01:00
Gerard Marull-Paretas cfbff7896e dts: bindings: pinctrl: place pincfg-node props at root level
Since we can include other binding files at any level (child,
grand-child, etc.) it makes no sense to maintain two copies of pinctrl
props definitions (pincfg-node/pincfg-node-group). Instead,
pincfg-node.yaml defines props at root level, and it is included where
needed, either child-binding or grandchild-binding.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-24 09:36:20 +01:00
Emil Gydesen 1b2f57270a Bluetooth: Host: Add addr to bt_le_ext_adv_get_info
Add the local advertising address to bt_le_ext_adv_get_info.

This may help with debugging, but is also needed to
properly support something like the BAP Broadcast Assistant.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-23 16:12:52 +00:00
Torsten Rasmussen c8942afe6d doc: add commas in macro arguments to Kconfig tips
Kconfig uses commas to separate macro arguments.

Improve Kconfig documentation by describing to users how this can be
handled when using devicetree Kconfig macros when using devicetree names
which may have commas in them.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-11-22 14:55:10 -08:00
Johann Fischer 1c4011ff6e usb: remove usb_pid.Kconfig file
Remove Kconfig file samples/subsys/usb/usb_pid.Kconfig added in
the commit e5cbe6a9e7 ("usb: cdc: Add unique PIDs for each sample")
with the motivation to have a separate ID for each sample supposedly
to be recognizable by the host.

The new USB support does not use the options, VID/PID is set
directly in the application. As a note, it is not necessary to have
unique PID for each sample, especially for the well known USB classes.

Replace the individual Kconfig options in the documentation
by a table with the references to the samples and PIDs.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-11-22 11:09:21 +01:00
Gerard Marull-Paretas b38eb53e00 doc: extensions: kconfig: allow to copy link to results
This patch allows copying a URL to the current Kconfig search results.
For example, I can now share the search results for "CONFIG_TEST.*". A
new button is added to the search box that, when clicked, copies to the
clipboard the URL.

This feature is achieved by prepending query hashes with '!'. When '!'
is found, the content of the URL hash is left intact, whereas before it
was always enclosed within '^$' to produce an exact match.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-21 15:51:40 +01:00
Gerard Marull-Paretas d3c0e95f97 doc: extensions: kconfig: fix module prefix handling
If two modules started with the same prefix, e.g. nrf and nrfxlib, the
file name prefix was incorrectly set with the common prefix. Include
trailing "/" to the comparison, so that we match the full module name.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-21 15:51:40 +01:00
Daniel DeGrasse 6aa7194d48 scripts: kconfig: add dt_node_has_compat kconfig function
Add dt_node_has_compat kconfig function, to check if a node path has a
given compatible string while parsing kconfig files

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Daniel DeGrasse db9bcd90ce scripts: kconfig: add dt_node_parent kconfig function
Add dt_node_parent kconfig function, to get parent path for a given
devicetree path when parsing kconfig files

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Chris Friedt bf0612cae3 doc: build: dts: bindings: discourage use of redundant: false
Aside from base properties (maybe for documentation purposes),
`required: false` should not be encouraged.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-20 13:12:44 -05:00
Aaron Massey 5fa1abf1cb fuel_gauge: Add basic stub API doc.
Add a short stub doc as a placeholder for future documentation on the fuel
gauge API.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2022-11-19 17:56:05 -05:00
Robert Lubos daefce6943 doc: release_notes: 3.3: Add net_pkt stable API change
Document the stable API change in the net_pkt API along with the
expected action from the existing applications.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-11-19 07:39:32 -05:00
Carles Cufi 3fea29d7c5 readme: Add support for light/dark modes in the logo
Use the mechanism described here:
https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#specifying-the-theme-an-image-is-shown-to

to provide different logos for light and dark mode, so that the "Zephyr"
text is clearly visible in both.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-18 08:58:59 +01:00
Dominik Ermel a0380aabff doc/release/3.3: Notes on changes in MCUmgr subsystem tree
Added notes on changes in MCUmgr subsystem tree.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Dominik Ermel 7048383362 doc: Move SMP transport documentation under doc/services
The commit moves MCUmgr SMP transport documentation from
subsys/mgmt/mcumgr/lib to doc/services/device_mgmt.
Documentation have been rewritten for that purpose.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Gerard Marull-Paretas a76c1cf41b doc: build: dts: mention it is allowed to include at any level
This feature was not mentioned, even though it is supported.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-17 06:57:46 -06:00