Commit graph

350 commits

Author SHA1 Message Date
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
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
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
Benjamin Cabé 4d53ae8a42 doc: shell: fix incorrect use of :kbd: role
Key combinations described using the sphinx :kbd: role should not have
a white space around + sign
i.e. should be :kbd:`Ctrl+d` not :kbd:`Ctrl + d`

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 11:35:44 +02: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é 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
Jamie McCrae 2f05af891d doc: services: device_mgmt: smp: Add SMP version 2 details
Adds SMP version 2 error response details to the documentation.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-06 13:05:40 +02:00
Andrei Emeltchenko 8e0fc8095e doc: ivshmem: Simple syntax correction
Correct some trivial syntax issues in ivshmem.rst.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-08-31 10:00:06 -04:00
Rodrigo Peixoto 654aa9baa1 doc: zbus: adjust documentation to comply with iterable section observers
Add details of the new VDED sequence;
Change the function iterators documentation considering `user_data`;
Adjust the runtime observers' allocation information. Now it uses heap
instead of memory slabs;
Adjust the configuration list and details of it.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-08-29 10:18:55 +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
Jamie McCrae 09a2c7acaa doc: mgmt: mcumgr: Add settings management group documentation
Adds documentation for the new settings management MCUmgr group.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-08-25 10:54:06 +01:00
Andrej Butok 33c3052964 doc: tfm: Update TFM overview.rst
- Updated TFM v1.4 to v1.8
- Delete the TFM "Audit log" service, as it was removed from TFM.
- Delete not used secure service abbreviations.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-08-23 10:05:45 +02:00
Dawid Niedzwiecki 63af3c00e9 mgmt: ec_host_cmd: add SPI SMT32 backend
Add support for SPI host command backend for STM32 chips family.

Unfortunately, the current SPI API can't be used to handle the host
commands communication. The main issues are unknown command size sent
by the host(the SPI transaction sends/receives specific number of bytes)
and need to constant sending status byte(the SPI module is enabled and
disabled per transaction). Thus the SPI backend includes basic SPI STM32
driver adjusted to host command specification.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-08-21 15:11:21 +02:00
Jamie McCrae 5c88d45544 treewide: mgmt: mcumgr: Change "ret" to "err" for SMP version 2
This is a stable API treewide change changing the newly introduced
"ret" response to "err" as it was overlooked that the shell_mgmt
group already used "ret" to return the exit code of the command
and this created a collision. Since SMP version 2 was only recently
introduced, there should not be any public implementations of it
as of yet, but the original function has been kept and marked as
deprecated.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-08-21 10:18:50 +02:00
David Brown 73e69b4290 doc: services: tfm: Update version in overview
Update the mention of the "currently integrated" version of TFM to match
the latest upgrade.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-08-18 10:14:27 +02:00
Declan Snyder 6dd8601716 doc: disk: Mention eMMC support in disk subsystem
Include mention of MMC in disk/SD/SDHC doc pages.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-08-18 10:14:01 +02:00
Tom Burdick dae2f33e5e rtio: Remove references to simple executor
The simple executor was removed with the usage of the spsc queue but
some stray references remained. Remove those.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-08-16 20:41:18 +02:00
Jamie McCrae e9dd938821 doc: mgmt: mcumgr: groups: smp_group_0: Minor typo fixes
Fixes a couple of typos in the documentation.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-08-11 12:02:12 +00:00
Fabio Baltieri a534169ed4 input: rename callback define macro to INPUT_CALLBACK_DEFINE
Looking back at the current INPUT_LISTENER_CB_DEFINE api naming, it
feels like it's a bit overloaded. Rename it to a simpler
INPUT_CALLBACK_DEFINE.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-10 08:15:10 +00:00
Jamie McCrae 84e4ffcd56 doc: services: device_mgmt: smp_groups: Fix OP values
Fixes an issue with the wrong OP values in some parts of the
documentation

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-08-08 11:12:00 +00:00
Andreas Deininger 571f8591b9 documentation: Fix several typos
Correcting typos in various documentation files

Signed-off-by: Andreas Deininger <andreas@deininger.net>
2023-08-07 13:07:50 +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
Dmitry Lukyantsev 34a966f219 doc: Fix a typo
Fix a typo in the spelling of "current".
Add "current" to spelling.txt.

Signed-off-by: Dmitry Lukyantsev <dmitrylu@google.com>
2023-08-04 21:18:43 +00:00
Tom Burdick 0aaedf7205 docs: rtio: Show RTIO API Docs again
The RTIO API docs weren't being shown. I made a poor assumption thinking
I could simply include the top level doxygen group in index.rst which isn't
the case. Fix the groups, and remove a note about a poll function
that doesn't exist yet.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-08-04 12:30:05 -04:00
Gerard Marull-Paretas 90b247b90b lib: os: add support for system power off
Add a new API to perform an immediate system power off:
`sys_poweroff()`.

Until now, this functionality has been implemented via the system power
management module, but in a clunky fashion. The way system PM works is
by defining some idle states in devicetree, that, given some properties
(e.g. minimal residency, exit latency, etc.) are automatically selected
when system goes to idle based on the expected next wake-up. However,
system off is a power state that one typically wants to control manually
from the application because it implies state loss, and in most cases,
configuring some sort of wake-up source. So in general, it is not
desired to let the system enter this state automatically. This led to
the following stuff in-tree:

from `boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.dts`:

```c
/*
 * Deep power-down mode is supported in this SoC through
 *  'PM_STATE_SOFT_OFF' state. There is no entry for this in device tree,
 *  user can call pm_state_force to enter this state.
 */
```

That is, state not being defined in devicetree so that PM subsystem
doesn't pick it automatically, but still implemented in in the PM hooks:

from `soc/arm/nxp_imx/rt5xx/power.c`, `pm_state_set()`:
```c
case PM_STATE_SOFT_OFF:
	set_deepsleep_pin_config();
	POWER_EnterDeepPowerDown(EXCLUDE_FROM_DEEP_POWERDOWN);
	break;
```

And to actually make use of this state, users had to do this kind of
abominations:

```c
pm_state_force(0u, &(struct pm_state_info){ PM_STATE_SOFT_OFF, 0, 0 });

/* Now we need to go sleep. This will let the idle thread runs and
 * the pm subsystem will use the forced state. To confirm that the
 * forced state is used, lets set the same timeout used previously.
 */
k_sleep(K_SECONDS(SLEEP_S));

printk("ERROR: System off failed\n");
while (true) {
	/* spin to avoid fall-off behavior */
}
```

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-04 16:59:36 +02:00
Jamie McCrae 8a2e768ff7 doc: services: device_mgmt: smp_groups: Clarify img_mgmt upload
Clarifies the details in the upload section of img_mgmt for MCUmgr
to better describe when fields should be sent, including a note
when a server responds with offset of 0.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-31 10:43:40 +02:00
Yuval Peress 1f39e9e504 rtio: Update documentation
Revise the documentation around canceling pending SQEs.

Signed-off-by: Yuval Peress <peress@google.com>
2023-07-28 11:52:07 -04:00
Tom Burdick 34a24ec4cd docs: RTIO documentation updates
Updates docs to account for the large number of changes that have
occured since the initial documentation was written.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-07-20 12:00:50 -04:00
Nerijus Bendžiūnas 7c08a9b6ad doc: fix FIXED_PARITION_ID typo
It seems flash_map.rst is the only place for this typo.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
2023-07-20 11:49:28 -04:00
Jai Arora 7daaad454a docs: update posix docs with pthread_equal
add pthread_equal to supported api list

Signed-off-by: Jai Arora <infolinesoni@gmail.com>
2023-07-20 16:24:16 +02:00
Marcel Krüger f055110802 doc: Add hint for automatic power domain swiching
Add a hint that when a device is on a power domain
and the device and power domain have runtime PM,
the power domain will automatically resumed/susepended.

Signed-off-by: Marcel Krüger <marcel.krueger@ithinx.io>
2023-07-20 16:23:36 +02:00
Jamie McCrae d52b634610 doc: mgmt: mcumgr: Add details on making handlers
Adds a guide on how to make out-of-tree MCUmgr function handlers
and groups, with an example showing a test implementation.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-20 16:22:31 +02:00
Yong Cong Sin 335acf817d posix: signal: implement strsignal
Implementation and ztest for strsignal.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin ff4b81e5e5 posix: signal: implement sigismember
Implementation and ztest for sigismember.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin 88cd494430 posix: signal: implement sigdelset
Implementation and ztest for sigdelset.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin 8011449542 posix: signal: implement sigaddset
Implementation and ztest for sigaddset.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin b9720e27c0 posix: signal: implement sigfillset
Implementation and ztest for sigfillset.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Yong Cong Sin 6910eb4a9b posix: signal: implement sigemptyset
Implementation and ztest for sigemptyset.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-18 15:35:42 -04:00
Jamie McCrae c81f8d7721 doc: mgmt: mcumgr: Fix double maps
Fixes an issue where double maps were shown for some items,
and one whereby there was excess text.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-10 15:27:25 +02:00
Jamie McCrae 7fa4570d10 doc: mgmt: mcumgr: Fix date typo
Fixes an issue where data was used instead of date

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-10 12:05:14 +02:00
Yong Cong Sin 4580708f54 posix: implement uname
Add implementation for posix uname.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-09 16:57:16 -04:00
Jakub Duchniewicz adc36315b0 doc: Fix typos in zbus documentation
Fixes a few typos.

Signed-off-by: Jakub Duchniewicz <j.duchniewicz@gmail.com>
2023-07-09 19:58:59 +00:00
Harshil Bhatt 322cd468db docs: update posix docs with pthread_barrierattr
add pthread_barrierattr to supported api list

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
2023-07-09 10:40:57 -04:00
Christopher Friedt 1f8d2e492e doc: services: portability: posix: support for POSIX_SPIN_LOCKS
Ensure `POSIX_SPIN_LOCKS` are documented as part of the
mandatory option requirements according to IEEE Std 1003.1-2017.

Additionally, list the functions implemented according to the
standard.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-07-05 21:06:55 -04:00
Dawid Niedzwiecki c8c149dce8 mgmt: ec_host_cmd: add logging system
Add a native way to log Host Command communication.

Use Zephyr logging system to do it. Use debug and normal levels.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-06-26 16:13:42 +02:00
Christopher Friedt b416a90672 doc: services: posix: pthread_mutexattr_destroy init supported
The functions pthread_mutexattr_destroy()
and pthread_mutexattr_init() are implemented (they just do nothing).

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-25 02:47:47 -04:00
Christopher Friedt 64a477342d doc: services: posix: pthread_condattr_destroy and init supported
The functions pthread_condattr_destroy()
and pthread_condattr_init() are implemented (they just do nothing).

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-25 02:47:47 -04:00
Christopher Friedt 675a660727 doc: services: posix: _POSIX_THREAD_PRIO_INHERIT unsupported
_POSIX_THREAD_PRIO_INHERIT was mistakenly marked supported in
commit a07774eada presumably because we have prototypes for the
functions below.

pthread_mutexattr_getprotocol()
pthread_mutexattr_setprotocol()

However, the functions are not actually implemented in Zephyr.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-25 02:47:47 -04:00
Christopher Friedt 88dd32c38c doc: services: posix: fix setvbuf typo
Fix a typo in the spelling of `setvbuf()`.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-25 02:47:47 -04:00
Lucas Tamborrino 9ae80aabd9 doc: services: debug: coredump: add flash partition
Add flash partition guide to coredump documentation.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-21 16:06:06 -04:00
Anas Nashif 9fd9c9dd4f doc: sensing: fix structure and remove top doxygen reference
Move sections out of the Overview section and put API documentation in
one section without bullets, which was causing duplication in headers
and text.

This also fixes the issue with PDF generation which is currently
blocking publication of HTML pages on docs.zephyrproject.org.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-19 22:09:47 -04:00
Hebo Hu 703ad12188 doc: Add documents for Sensing Subsystem
Add documents for sensing subsystem.

Signed-off-by: Hebo Hu <hebo.hu@intel.com>
2023-06-17 07:43:25 -04:00
Johann Fischer b335c19bcb doc: move USB documentation to connectivity
Mostly moved and reorganised content to the Connectivity chapter,
separated API references. Fill in some gaps in the USB device
documentation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-06-15 05:53:44 -04:00
Jamie McCrae 3f8156d0a4 doc: mgmt: smp: Fix slot and image to be unsigned
Fixes the documentation to show image and slot number for get
state of image response being unsigned, not signed.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-06-14 13:47:08 -04:00
Jamie McCrae 6981e2e3cf doc: services: device_mgmt: mcumgr: Update callback documentation
Updates and fixes callback documentation to show functionality and
definitions that were recently updated.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-06-13 07:11:44 -04:00
Christopher Friedt efe9111b21 doc: services: posix: update c-lang support section
Several C language items have gained support in Zephyr over
time.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-11 05:08:35 -04:00
Christopher Friedt 533c1985dc doc: services: posix: update posix supported items
Several items needed to be updated in POSIX documentation.

* add `_POSIX_BARRIERS` top Option Requirements
* update `_POSIX_THREAD_ATTR_STACK*` in Option Requirements
* add `pthread_barrier_*()` to `POSIX_THREADS_BASE`
* update `pthread_cond_destroy()` and `pthread_setcancelstate()`

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-10 10:08:25 -04:00
Benjamin Cabé c77811500c doc: mcumgr: update link to mcumgr root folder
MCUmgr does not live in subsys/mgmt/mcumgr/lib anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé a76396fb7a doc: update stale links to MCUboot documentation
mcuboot.com/documentation --> docs.mcuboot.com

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé 23f2a2066f doc: update stale srecord links
Updated 404 links to point to valid locations.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Gerard Marull-Paretas 30946d46fd usb: create top-level usb Doxygen group
Create a USB Doxygen group, part of the top-level connectivity group.
Added some existing groups to the usb group, note that USB Doxygen needs
to be improved, though.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-05 20:21:09 -04:00
Flavio Ceolin 50e35fad8d doc: pm: Add a note about multicore behavior
Add a note to make it clear devices suspension order in
multicore systems.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-06-01 06:32:47 -04:00
Nick Ward b1b0a36ca8 doc: pm: power_domain: fix spelling of below
Fix spelling of below

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-05-29 05:21:10 -04:00
Rodrigo Peixoto 1cbcaecac3 doc: zbus: improve suggested uses
Developers may be uncertain about which observer type to use in zbus,
potentially resulting in improper subsystem use. Fix that by adding an
explicit differentiation between the observer's type in the `Suggested
uses` section.

Fixes #58004

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-05-26 14:56:28 -04:00
Jamie McCrae cfbcd45afb doc: service: device_mgmt: Tidy documentation
Tidies and corrects some minor documentation issues.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-26 10:22:17 +02:00
Gerard Marull-Paretas 5b049f35b5 doc: drop usage of numref
Usage of numfig=True option in conf.py significantly increases doc build
time. While it is a nice feature, it's not extensively used in Zephyr
documentation, so let's remove its usage in favor of faster doc builds.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-22 11:08:53 +02:00
Dawid Niedzwiecki 0a17aa8605 mgmt: ec_host_cmd: add autoinit config
Add a separate config to enable autoinitialization of the host command
subsystem, called by the chosen backend.

It allows setting the chosen backend without autoinit.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-05-18 09:46:37 +02:00
Fabio Baltieri 42d9cf1b9a doc: input: expand the kscan compatibility description
Add few details about the kscan compatibility driver, mention the
relevant Kconfig options and an example (which is also present in the
binding file).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-05-17 09:49:31 +02:00
Jamie McCrae 794f3df08e doc: services: device_mgmt: Add version field
Adds the SMP version field to the diagram and description.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-15 09:27:16 +02:00
Grant Ramsay 4ed404a27f drivers: virtualization: Add interface for ivshmem-v2
ivshmem-v2 is primarily used for IPC in the Jailhouse hypervisor

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-05-14 18:17:33 -04:00
Jamie McCrae bb0a85ae4b doc: services: device_mgmt: smp_groups: img_mgmt: Add sha has note
Adds a note on when the "sha" hash field can be provided or not
and what the difference in operation is.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-05-09 14:29:05 +02:00
Yasushi SHOJI 143dfda9d0 doc: services: storage: flash_map: Fix include references
We have moved all header files under include/zephyr/ for Zephyr 3.1.
Update the document accordingly.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2023-05-03 12:39:49 +02:00
Emil Obalski e1d7b0a0ca doc: ipc: Update the documentation
Update the doc for IPC service icmsg backend.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-04-29 12:24:17 +02:00
Nicolas VINCENT 84a7feab45 doc: flash_map: add const to code snippet
flash_area_open() uses an argument of type 'const struct flash_area **'
while the code snippet suggested 'struct flash_area **'
Update code snippet

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2023-04-24 13:35:07 +02:00
Jamie McCrae 9c6e394731 doc: Add documentation for retention subsystem
Adds documentation for the retention subsystem and boot mode
interface. Also marks the retention subsystem as experimental.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00
Dawid Niedzwiecki 7f7e48e66e mgmt: ec_host_cmd: create chosen string per backend
Create strings to set the chosen node per backend. It is done for
better clarity.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-04-21 16:29:59 +02:00
Dawid Niedzwiecki 1d62002bba mgmt: ec_host_cmd: update configs naming
Just use better namings for the buffer sizes configs.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-04-21 16:29:59 +02:00
Gerard Marull-Paretas 667eeb11fb shell: fix MISRA 5.7 violations on struct shell
MISRA Rule 5.7 requires uniqueness of tag identifiers. Shell is
frequently problematic because many code uses `const struct shell
*shell`. This causes CI noise every time one of these shell files is
edited, so let's update all of them with `const struct shell *sh`
instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-14 12:21:08 +02:00
Keith Packard 3a197934fc doc: Switch main return type from void to int.
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Maurits Fassaert 6bfb663167 shell: backends: add SHELL_BACKEND_RTT_BUFFER option
This new configuration option, SHELL_BACKEND_RTT_BUFFER, allows selecting
an alternative buffer for the Shell's RTT backend. By default buffer 0 is
used, which conflicts with the default logging subsystem RTT backend
buffer.
This option is the counterpart to the logger's LOG_BACKEND_RTT_BUFFER.

Signed-off-by: Maurits Fassaert <maurits.fassaert@sensorfy.ai>
2023-04-13 11:43:28 +02:00
Yuval Peress 06d4a8be26 rtio: add mempool documentation
Add documentation about the mempool feature along with a few examples

Signed-off-by: Yuval Peress <peress@google.com>
2023-04-12 13:29:11 -04:00
Jamie McCrae 16ada3e7a7 doc: services: device_mgmt: Fix doc issues
Fixes some issues with the documentation for MCUmgr.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-12 14:25:30 +02:00
Tomasz Bursztyka 31c8042e5b doc: Add NVMe documentation in storage service part
NVMe disks are supported, let's provide some documentation about the
driver and how to enable it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-04-07 13:28:47 +02:00
Dawid Niedzwiecki 4ef47888ef ec_host_cmd: add UART backend
Add a new backend for Host Commands that uses UART. The backend bases
asynchronous UART API.

The UART backend is mainly used by FPMCU.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-04-07 13:05:59 +02:00
Jamie McCrae 79d3eed9b8 doc: services: mcumgr: Fix Kconfig name
Fixes missing CONFIG_ prefixes from Kconfig options and fixes
wrong names.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-04 11:51:43 +02:00
Jamie McCrae 20417bfaeb doc: services: mcumgr: Add fs_mgmt updates and file close command
Adds information on updated fs_mgmt functionality and describes
the new optional file close command.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-04 11:51:43 +02:00
Jordan Yates 738b75171b doc: pm: device_runtime: document new devicetree flag
Document the new devicetree flag and provide an example of how to use
it.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-03-29 12:21:13 -04:00
Dominik Ermel cbacf4ce87 doc/device_mgmt/mcumgr/img: Correct note on "upgrade" parameter
The note previously mentioned that, when "upgrade" flag is present,
uploaded image version can not be lower than version of a running
application; this has been corrected as uploaded image should
have version higher than running, as "upgrade" only flag makes
no sense when same version is uploaded.
Additionally note that Zephyr does not support this feature has
been removed, as MCUmgr library within Zephyr does actually
perform the version check when "upgrade" flag is set.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-03-29 11:31:19 +02:00
Jamie McCrae f0e42234b3 doc: device_mgmt: smp_groups: smp_group_1: Add upload hash note
Adds a note that the upload response hash is partially
optionally from the point of view of MCUboot's serial recovery.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-29 11:30:36 +02:00
Fabio Baltieri f8468ee76e doc: input: add a reference to the kscan adapter driver
Add a reference to the kscan input adapter to the input documentation
page.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-28 20:57:53 -04:00
Fabio Baltieri fce6eee760 doc: input: add the initial input subsystem documentation
Add the initial documentation for the input subsystem.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 11:47:32 -08:00
Mathis Raemy e75b72234c doc: services: device_mgmt: smp_groups: Correct smp img upload request
The specification of que CBOR request 'image upload request' field
'sha' was decalred as type (str) but is (byte str).
Just replaced the field type after verified with code here:
/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c#L383

Signed-off-by: Mathis Raemy <mathis.raemy@gmail.com>
2023-03-02 21:14:11 +01:00
Dawid Niedzwiecki 2d0a784c41 subsys/mgmt/ec_host_cmd: rework Host Command support
Rework the Host Command support. It includes:
-change API to backend
-change a way of defining rx and tx buffers
-fix synchronization between the handler and backend layer
-simplify the HC handler

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-02-28 10:42:23 +01:00
Dean Sellers 0c9ca9aefa doc: services: device_mgmt: mcumgr: Fix issue with confirm
Instead of no hash being passed when using image confirm on a
test upgrade and empty hash should be passed, otherwise an error
is returned.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2023-02-23 14:35:16 +01:00
Siyuan Cheng b475e1fcbf zdsp: add ARC DSPLIB backend for zdsp
Introduce ARC DSPLIB backend zdsp library for ARC target.
Add agu and restrict attributes to map with ARC DSPLIB

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-02-21 15:06:06 +01:00
Caleb Perkinson 92da46ff01 doc: properly formatting table
the table was improperly formatted and wouldn't display in rows. This
should fix that.

Signed-off-by: Caleb Perkinson <calebperkinson@gmail.com>
2023-02-18 06:31:35 +09:00
Jason Yuan 57e6532b0a doc: update documentation for shell library change
The SHELL_SUBCMD_DICT_SET_CREATE macro was previous changed in PR #51231
to require a string comment as part of the macro but the documentation
was not updated to reflect that. This patch updates the documentation to
relect the change in the shell library.

Signed-off-by: Jason Yuan <jasonyuan@google.com>
2023-02-16 20:31:46 +09:00
Jakub Rzeszutko 44488f1cf6 shell: fix documentation link
Correcting the reference to the commands execution drawing.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2023-02-15 01:26:47 +09:00
Andrei Emeltchenko fedec33514 doc: usb: Correct include path uhc.h
Fixes broken link to the USB HC API header file.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-02-13 23:58:23 +09:00
Jakub Rzeszutko 45d5fb7492 shell: doc: adding information on command execution
Supplemental information on shell command execution. Added an
illustration and four examples showing how the shell will call
the handler and what it will pass as an argument.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2023-02-08 12:41:22 +01:00
Rodrigo Peixoto 8c0d3e1402 doc: zbus: Fix typos and apply general docs improvement
Add details for several unclear aspects of zbus. The explanation of VDED
was vague, and some developers needed clarification. So this commit adds
images and an illustration scenario to explain that in detail. Typos
corrected. More code was added in the claim/finish descriptions.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-02-08 12:12:04 +01:00
Jamie McCrae d87a3a75e8 doc: mgmt: img_mgmt: Add note on optional match field response
Adds a note on the new match field which will indicate if the
uploaded data's SHA256 hash matches the provided hash.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-02-06 22:36:57 +09:00
Jamie McCrae f7c4c64c63 doc: mgmt: mcumgr: Add note on issues with go tool
Adds a note that the MCUmgr go application has many faults and
is not recommended to be used in a production environment.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-02-06 10:11:02 +01:00
Peter Mitsis 04daf752b9 doc: tracing: Include events in the documentation
Updates the tracing documentation to include a mention about the
event tracking list.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-02-02 20:21:12 +09:00
Kevin Townsend c63fb21760 samples: tfm_integration: Remove psa_crypto
Removes the `psa_crypto` sample from the current release, due to
PSA API conflicts that can not be immediately resolved between Zephyr's
instance of MbedTLS in the NS environment, and the TF-M PSA APIs
included when building with TF-M support.

PSA API changes upstream in MbedTLS 3.2.1 (used by TF-M 1.7.0), and
MbedTLS 3.1 (used in TF-M 1.6.0) need to be be resolved in both
upstream projects before this sample can be reintroduced.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Veijo Pesonen e7324d1bf4 doc: settings: Fixes custom backend sample
Brings the example up to date with the implementation and fixes a typo.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2023-01-27 18:09:40 +09:00
Dominik Ermel 58b3e2d8b6 doc: mgmt: img_mgmt: Correct "hash" type in image status response
Fix incorrect value type.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-01-20 11:58:14 +01:00
Jamie McCrae 1d14e42e40 doc: mgmt: img_mgmt: Fix description of hash and sha
Fixes an issue with the documentation whereby the wrong hash/sha
sections were described, also adds a link to upstream MCUboot
documentation for further information.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-17 11:28:38 +01:00
Joakim Andersson cc8493c3ba doc: tfm: Document how to pass list arguments to the TF-M build system
Document how to pass list arguments to the TF-M build system.

fixes: #53556

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-01-11 03:05:53 +09:00
Jamie McCrae 1bd05df1a9 doc: mgmt: mcumgr: callback: Improve documentation
Improves the documentation when OR'ing multiple events of the same
group together to describe that this is only supported for events
that are part of the same group, giving example of correct and
incorrect usage.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-09 17:36:04 -08:00
Henrik Brix Andersen 11aa8454f0 Revert "random: Change testing random generator"
This reverts commit d6881de3b3.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-09 19:29:50 +09:00
Declan Snyder d6881de3b3 random: Change testing random generator
The old random timer test was not random-looking
enough on some platforms.

Replace with new test which is psuedo-xoshiro.

The generator is still deterministic
and does not depend on entropy at all,
but should look more random for testing.

Change name of generator tree-wide also.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-01-09 10:16:55 +01:00
Piotr Jasiński 742c812858 doc: add monitor mode debugging entry
Added documentation on monitor mode debugging usage.

Signed-off-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>
2022-12-28 12:00:46 +01:00
Jamie McCrae 29639624ea doc: mgmt: mcumgr: callbacks: Fix issues
Fixes some issues with code and formatting.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-24 16:57:57 +01:00
Dominik Ermel a5488d64d4 doc: MCUmgr replaced Kconfig options to new format
Documentation fixes following renaming of Kconfig options
to the new standardised form.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-22 12:36:34 +01:00
Rob Barnes 61b5566e74 logging: Add an option for a custom log header
There are scenarios when it is necessary to globally redefine
a log macro. The existing logging frontend is not sufficient since
it redirects at the function level.

One example is using pigweed_tokenzier. The pigweed tokenizer depends
on intercepting log strings at the macro level to function.

Introduce an option to include a custom application provided header
named "zephyr_custom_log.h" at the end of log.h. This allows an
application to extend the LOG_* macros globally.

This change includes a simple test that redefines the core LOG macros
to include a custom prefix.

Signed-off-by: Rob Barnes <robbarnes@google.com>
2022-12-22 11:09:59 +01:00
Jamie McCrae 235ab90230 doc: device_mgmt: smp: Update rc documentation
Updates documentation on when the rc response is returned.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-20 11:57:22 +01:00
Johann Fischer 0024038c91 include: drivers: add USB host controller (UHC) driver API header
Add USB host controller (UHC) driver API header.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-16 13:21:12 +01:00
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
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
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 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
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
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
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
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
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
Rodrigo Peixoto b8ecbfaa57 zbus: Add message bus subsystem to Zephyr
Add zbus message bus as a Zephyr subsystem. No message bus
or communication abstraction other than the usual (message queues,
mailboxes, etc.) enabled developers to implement event-driven systems in
Zephyr quickly. Zbus would fill that gap by providing the community with
a lightweight and flexible message bus. The implementation tries to be
closest as possible to the existing ones. We use the claim/finish
approach, and the API for publishing and reading channels are similar
in message queues. Zbus is about channels, messages, and observers.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Jamie McCrae d5693ed464 doc: device_mgmt: callbacks: Add initial documentation
Adds the initial documentation describing the mcumgr callback
system and how to use it, including API reference and samples.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 12:34:39 +01:00
Jamie McCrae 7f56c06ea8 doc: guides: device_mgmt: smp: fs: Add supported hash/checksum info
Adds information on the supported hash/checksum mcumgr command.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 11:10:03 +01:00
Elvar Tresnak 53666831d5 doc: POSIX arch: Add link to POSIX OS abstraction
In the note about the relationship between the POSIX arch
and the POSIX OS abstraction, add a link.

Signed-off-by: Elvar Tresnak <Elvar.Tresnak@gmail.com>
2022-11-05 08:41:24 +01:00
Emil Obalski 2e9992f3c8 doc: Add IPC service documentation
Adding IPC service documentation for ICMSg backend.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2022-11-04 11:51:54 +01:00
Tomasz Moń ba1fdcd15d doc: storage: add flashdisk to disk documentation
Include zephyr,flash-disk devicetree sample in disk documentation.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-28 12:45:58 +02:00
Jamie McCrae 21c7e3ba65 doc: mgmt: mcumgr: Add SMP groups to separate heading
This adds the SMP groups to a separate heading and makes them visible
in the contents list so that they can be selected without having to
go to a specific page to find them.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-26 15:11:11 +02:00
Dominik Ermel 7fccdd170b doc/storage/flash_map: Move to FIXED_PARTITION_ API
Rework of documentation that replaces nformation on
FLASH_AREA_ macro usage with information on FIXED_PARTITION_ macros.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-10-25 17:41:50 +02:00
Krzysztof Chruscinski 5cdbd95875 doc: reference: logging: Add multidomain section
Add documentation for multidomain logging.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Francesco Domenico Servidio <francesco.servidio@nordicsemi.no>
2022-10-17 10:16:53 +02:00
Krzysztof Chruscinski e322447109 logging: Initial multidomain support
Adding multidomain support by introducing log_link module which
acts as a receiver of log messages created by another domain.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-10-17 10:16:53 +02:00
Jamie McCrae 100e0cf92f doc: mcumgr: Remove deprecated Kconfig tip
Removes a tip about using an old removed Kconfig value.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-06 16:34:58 +02:00
Krzysztof Chruscinski 9a3d762ee2 doc: logging: Update section about log processing
'Controlling the logging' section was not clear enough. Updating it
to clarify that logging processing in deferred mode is by default
handled implicitly.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-29 08:26:54 -05:00
Stephanos Ioannidis e536541f4f doc: virtualization: Update outdated link to ivshmem
This commit updates the outdated link to the QEMU ivshmem
documentation.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Kamil Krzyżanowski acd847c527 doc: smf: Fix SMF state machine creation example
The example further down works, but the first examples
have invalid syntax for initializing the state array.

Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
2022-09-19 15:24:32 +02:00
Krzysztof Chruscinski 9a971de18c doc: logging: Update documentation about limitations
Add link to cbprintf limitations and recommendations.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 10:14:23 +00:00
Krzysztof Chruscinski f40c2b9550 doc: formatted_output: cbprintf: Align to new features
Align documentation with current set of supported features. Mainly,
it mentions a static packaging limitation and how to handle that.

Added section which summarizes limitations and recommendations.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 10:14:23 +00:00
Gerard Marull-Paretas 79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Jamie McCrae 5b96b3faac doc: device_mgmt: smp: Add slot number to erase command
A slot number can now be provided to the mcumgr erase command to erase
a specific slot instead of slot 1, this documents the change in the
SMP group 1 documentation page.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-02 10:56:58 +00:00
Jamie McCrae 4d0c07407d doc: mcumgr: group 9 (shell): Update shell command return code name
This updates the documentation to indicate that the shell response
code will now be returned in a variabled named ret instead of rc, and
that rc will contain the mcumgr result code only, if an mcumgr error
occurred

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-01 14:05:14 +02:00
Sam Hurst 6f9e8f459d doc: smf: Add Event Driven Example
Add an example that demonstrates how the State Machine Framework
can be event driven. See Issue #48534

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-08-26 10:23:39 -07:00
Gerard Marull-Paretas a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Benjamin Björnsson e172b1dbda debug: gdbstub: Move to DTS for uart device
Move from using Kconfig GDBSTUB_SERIAL_BACKEND_NAME to a devicetree
chosen property ("zephyr,gdbstub-uart"). This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-08-01 09:09:45 -07:00
Kumar Gala 2f49bec7b7 sdhc: dts: remove label property from SDHC nodes
Remove 'label' property from SDHC nodes.  We can use variants of
DEVICE_DT_GET to get access to a device pointer for use in an
application.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-15 16:04:12 -05:00
Christopher Friedt b391993d1b lib: posix: add perror() implementation
Add a trivial implementation of `perror()`.

Fixes #46100

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-07-04 22:53:36 +02:00
Flavio Ceolin 87745357ce docs: pm: Fix device pm documentation
Device power management introduction was mentioning an APIs
that no longer exists and also using a wrong nomenclature for
device runtime pm.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-01 22:09:50 +02:00
Flavio Ceolin b0f8142b1b doc: pm: Add reference for device runtime pm
Add a way to reference device runtime documentation from
other documents.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-01 22:09:50 +02:00
Flavio Ceolin 9471f9ee66 doc: pm: Add reference for power domains
Add a way to reference power domains documentation from
other documents.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-01 22:09:50 +02:00
Tom Burdick 3d2ead38cb rtio: Real-Time Input/Output Stream
A DMA friendly Stream API for zephyr. Based on ideas from io_uring
and iio, a queue based API for I/O operations.

Provides a pair of fixed length ringbuffer backed queues for submitting
I/O requests and recieving I/O completions. The requests may be chained
together to ensure the next operation does not start until the current
one is complete.

Requests target an abstract rtio_iodev which is expected to wrap all
the hardware particulars of how to perform the operation. For example
with a SPI bus device, a description of what a read, and write mean
can be decided by the iodev wrapping a particular device
hanging off of a SPI controller.

The queue pair are submitted to an executor which may be a simple
inplace looping executor done in the callers execution context
(thread/stack) but other executors are expected. A threadpool executor
might for example allow for concurrent request chains to execute in
parallel. A DMA executor, in conjunction with DMA aware iodevs
would allow for hardware offloading of operations going so far as to
schedule with priority using hardware arbitration.

Both the iodev and executor are definable by a particular
SoC, meaning they can work in conjuction to perform IO operations
using a particular DMA controller or methodology if desired.

The application decides entirely how large the queues are, where
the buffers to read/write come from (some executors
may have particular demands!), and which executor to submit
requests to.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-06-28 13:53:13 -04:00
Eugene Cohen 2656113190 tracing: add additional user tracing thread calls
Add additional user tracing calls for thread states, names
and priorities.

add the following user tracing calls:

sys_trace_thread_create_user
sys_trace_thread_abort_user
sys_trace_thread_suspend_user
sys_trace_thread_resume_user
sys_trace_thread_name_set_user
sys_trace_thread_info_user
sys_trace_thread_priority_set_user
sys_trace_thread_sched_ready_user
sys_trace_thread_pend_user

Signed-off-by: Eugene Cohen <quic_egmc@quicinc.com>
2022-06-28 13:52:21 -04:00
Lauren Murphy 318e6db239 debug: coredump: add xtensa intel adsp, support toolchains
Adds compatibility with Intel ADSP GDB from Zephyr SDK and
from Cadence toolchain to coredump_gdbserver.py.

Adds CAVS 15-25 (APL) register definitions. Implements
handle_register_single_read_packet to serve ADSP GDB
p packets.

Prevents BSA from changing between stack dump printout
and coredump by taking lock. Observed to be necessary for
accurate results on slower simulated platforms.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2022-06-23 15:44:45 -04:00
Dominik Ermel 492e2ed741 doc/guides/device_mgmt/smp: Extend reset command with force option
The commit documents OS reset command extension that allows to
force reset, when OS responds with busy "rc" code to reset
attempts.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-06-21 11:55:19 +02:00
Dominik Ermel 0a5525358c mgmt/mcumgr/lib: Add BUSY error code
The commit reserves adds MGMT_ERR_EBUSY (10) error code and adds
documentaiton for it.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-06-21 11:55:19 +02:00
Krzysztof Chruscinski c5f2cdef09 logging: Remove logging v1 from the logging
Remove v1 implementation from log_core and all references in the tree.
Remove modules used by v1: log_list and log_msg.
Remove Kconfig v1 specific options.
Remove Kconfig flags used for distinction between v1 and v2.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-16 10:51:15 -04:00
Krzysztof Chruscinski fd622650c3 doc: logging: Remove references to logging v1
Remove references to logging v1 from the logging documentation.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-15 09:14:05 +02:00
Kumar Gala a7af8ce6a7 drivers: disk: Remove use of unused devicetree "label" property
We should avoid use of the label property in devicetrees.  The
'zephyr,sdmmc-disk' compatible node has a 'label' property set
but there isn't any code utilizing this so removing the property
from any devicetrees that have it set (as well as example in docs).

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-10 09:46:46 +02:00
Mark Holden 44c388fb33 coredump: drivers: Add coredump device
Add a pseudo device diver with device tree bindings for coredump.
The device tree bindings exposes memory address/size values to be
included in any dump. And the driver exposes an API to add/remove
dump memory regions at runtime.

Signed-off-by: Mark Holden <mholden@fb.com>
2022-06-05 14:28:34 +02:00
Reto Schneider ea23b14f8f doc: settings: Fix typo
The 'a' is superfluous.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-05-18 10:54:59 +02:00
Martin Jäger 2554f04464 doc: services: storage: add flash_img API
Doxygen comments were existing, but they were not rendered anywhere in
the docs. The code is located under DFU, but I think it makes sense
to document it under storage, next to similar flash-related APIs.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-05-15 21:33:54 +02:00
Reto Schneider 3bd8355ca0 doc: Fix settings_handler_static::h_export example
Callback takes a const data pointer.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-05-15 21:33:22 +02:00
Jamie McCrae 9314259312 doc: guides: device_mgmt: smp: fs: Add fs hook details
Adds details about the file read/write request hook that applications
can use to allow or decline requests to files.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2022-05-11 17:10:55 +02:00
Reto Schneider 0063df2c54 doc: k_sleep does not take raw integers
Using k_msleep seems easier than k_sleep(K_MSEC(1000));

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-05-09 17:19:59 -04:00
Jordan Yates 37e78175e5 doc: pm: document system pm limitations
Document the limitations of system power management when it comes to
transitions that are run from the idle thread.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-05-06 11:33:10 +02:00
Daniel DeGrasse e74d8457c4 doc: storage: update storage documentation for SD subsystem
add section about SD subsystem to disk documentation, and document new
SDHC SPI bindings

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-29 14:21:36 -05:00
Aleksandar Markovic a07774eada doc: Fix the layout of POSIX-related tables
Several tables in the section on POSIX support have a column
"Supported" which is supposed to indicate whether a feature,
a function, or similar, is supported in Zephyr or not. This
indication is done by placing character "+" in relevant cells.

However, in restructuredText, "+" is a sign for an element of
a bulleted list (as is the case with "*" and several other
characters). This, in turn, causes very inefficient rendering of
all these cells with "+", since restructuredText adds spacing
before and after any bulleted list.

Fix this by replacing all "+" characters by a simple "yes".

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-25 14:07:42 -04:00
Aleksandar Markovic 9e4e858bee doc: Fix link to tests/subsys/pm/power_states_api/
tests/subsys/pm/power_state_api/ should be
tests/subsys/pm/power_states_api/.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-21 18:35:16 -04:00
Aleksandar Markovic 7af3b8cbb3 doc: Fix links to Zephyr include directory on Github
At some recent point, directory <zephyr-root>/include was moved to
<zephyr-root>/include/zephyr. However, links from documentation to
Zephyr source on Github were not updated. Update them now.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-21 18:35:16 -04:00
Yuval Peress 41e7f30d0f include: update documentation to use zephyr/ prefix
Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-21 07:40:54 -05:00
Aleksandar Markovic 8a32b05905 doc: Fix spelling errors in .rst files
Fix spelling errors in assorted .rst files. The errors were found
using a tool called 'codespell'.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-19 11:48:26 +02:00
Pavel Vasilyev 442e477116 doc: mcumgr: Update instruction for go version 1.18+
go get is deprecated starting from go tool version 1.18:
https://go.dev/doc/go-get-install-deprecation

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-04-15 11:52:44 -07:00
Jamie McCrae f0bdb53927 doc: guides: device_mgmt: smp: os: Add os reset hook details
Adds details about the os reset request hook that applications can use
to allow or decline the request or tidy up.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2022-04-13 14:05:57 -07:00
Jamie McCrae 51e3cecb31 doc: mcumgr: Fix reference formatting
Documentation build for 2.7 was failing due to using only a single
character instead of double for showing a module name.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2022-04-13 13:40:16 -07:00
Jamie McCrae 13c00fb96d doc: guides: device_mgmt: smp: fs: Add hash/checksum/status details
This adds documentation which explains fs mcumgr commands for the status
and hash/checksum commands.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2022-04-12 12:05:30 +02:00
Dominik Ermel aa53dfab02 doc/guides/device_mgmt: Add MCUMGR parameters command to OS grp
The commit add description of a new OS group command for MCUMGR
parameters retrieval.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-04-11 12:10:20 +02:00
Anas Nashif 0e727cf5a9 doc: get rid of reference section
Move last remaining items from reference section to the appropriate new
section in the new structure.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif 7ad2f76720 doc: remove guides and split content
Remove the old guides section and move all remaining items into new
sections.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif a084be3ba9 doc: move sections from guides
Move remaining items from guides into the appropriate locations using
the new structure.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif 6fe0a373fc doc: move misc services into OS Service section
Move remaining services from guides into OS services.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif c2a64b5b70 doc: move device mgmt under services
Device management is an OS service.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif a6c56ffebf doc: move smf section into os services
Move SMF frameowrk into OS Services.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif fb892e0fbf doc: move crypto/random sections into os services
Move this documentation to a new location under OS Services section.

See #33725

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif 0fe2c40ce4 doc: move file system into os services
Move this documentation to a new location under OS Services section.

See #33725

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif 34cdeabeb8 doc: move power management under os services
Move this documentation to a new location under OS Services section.

See #33725

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif 4b42e08783 doc: move formatted output under os services
Move this documentation to a new location under OS Services section.

See #33725

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif 9d46b7ab28 doc: move settings under os services
Move this documentation to a new location under OS Services section.

See #33725

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif 99eb324e81 doc: move shell under os services
Move this documentation to a new location under OS Services section.

See #33725

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif 2227d8b11b doc: move notification services under os services
Move this documentation to a new location under OS Services section.

See #33725

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif c629440259 doc: move resource management under services
Move this documentation to a new location under OS Services section.

See #33725

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif 16d84a5e96 doc: move debugging under os services
Move this documentation to a new location under OS Services section.

See #33725

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif e2b0b9c534 doc: move logging to os services
Move this documentation to a new location under OS Services section.

See #33725

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif 2cd03080ad doc: add os services
Add a new 'OS Services' section to contain all dedicated os services
from other sections of the doc (reference and guides).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00