Commit graph

402 commits

Author SHA1 Message Date
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