Currently, with EATT enabled, when bt_gatt_read is called with multiple
handles first it'll try to use gatt_read_mult_vl, and if it fails
gatt_read_mult will be used to try again. Add option to skip
the gatt_read_mult_vl and use gatt_read_mult right away. This is needed
by tests that expect BT_ATT_OP_READ_MULT_REQ but support variable
lenght, thus don't return BT_ATT_ERR_NOT_SUPPORTED.
Removed fallback from read multiple vl to read multiple on
BT_ATT_ERR_NOT_SUPPORTED error.
This was affecting:
GATT/CL/GAR/BV-05-C, GATT/CL/GAR/BI-18-C, GATT/CL/GAR/BI-19-C,
GATT/CL/GAR/BI-20-C, GATT/CL/GAR/BI-21-C, GATT/CL/GAR/BI-22-C
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
This is the debugging tool of last resort for figuring out where a
devicetree macro went wrong, but it's very effective. Document how to
do it on GCC based toolchains.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit adds a high-level overview of Trusted Firmware-M,
describing the basic architecture and integration work with Zephyr.
Co-authored-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Introduce a new API to allow devices capable of wake up the system
register themselves was wake up sources. This permits applications to
select the most appropriate way to wake up the system when it is
suspended.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This is a stopgap release meant to backport bug fixes and new features
while v0.12.0 is blocked.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The setup() method is trying to find the zephyr repository by name,
but it's not passing allow_paths=False to the west method it uses to
search.
That may lead to unpredictable results depending on what the current
working directory is in the calling environment.
For robustness, disallow paths and make sure we are only searching for
the zephyr project by name.
Add some more comments to explain what is going on and clean up the
empty string handling while we're here.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Document the new DT_FOREACH_OKAY_INST_<compat> and
DT_FOREACH_OKAY_INST_VARGS_<compat> macros that are generated by
gen_defines.py and explain how they are used in devicetree.h.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This guideline seems to be missed during the Zephyr's code guideline
creation. That is a good guideline that aims to address some problems
like double free or freeing not allocated memory.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This guideline address three undefined behaviors listed in the C99
standard. Although Zephyr does not support/implement these functions,
they are part of the C library and could be implemented in the future.
Also this is mandatory rule in MISRA-C and if one day Zephyr decides to
claim compliance with MISRA-C this guideline has to be followed.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Deprecate the xoroshiro128+ PRNG algorithm in favour of xoshiro128++.
xoshiro128++ is a drop-in replacement which is invisible from the user
perspective.
xoroshiro128+ is unsuitable because it is explicitly a floating-point
PRNG, not a general-purpose PRNG. This means that the lower 4 bits of
the output are actually linear, not random (from the designers,
https://prng.di.unimi.it/). This means 1/8th of the generated data is
not random.
Additionally, xoroshiro128+ is not a 32bit algorithm, it operates on
64bit numbers. For the vast majority of Zephyr devices, this makes the
PRNG slower than it needs to be. The replacement (xoshiro128++) is
32bit, with no loss in state space (still 128 bit).
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
The verb tense for the suspended state was not consistent with other
states. The likely reason: state was being used as a command/action.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Linker APIs are defined in a "#ifdef _LINKER" block. Adding _LINKER to
the Doxygen PREDEFINED list so that they get picked up when generating
the documentation.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Use a comment syntax instead of a separator. This is a bit cleaner
and is prep work for moving the parsing code to a more generic place,
namely edtlib.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Explain device busy API name changes and provide an equivalence list to
ease migration.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Allow to override latexmk options via Makefile. Defaults match those in
the CMakeLists.txt.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Document that using west outside of a west workspace needs
ZEPHYR_BASE to be set. If this is not set, the instructions
on the "Application Development" page don't work.
Previously, "Getting Started Guide" and "Application Development"
pages told you to run `zephyr-env.sh/zephyr-env.cmd` which would
set ZEPHYR_BASE, but this was removed in Zephyr 2.3.0
Signed-off-by: Daniel Wong <drojfjord@gmail.com>
Includes a table to display compatibility between debug probes and host
tools.
Moves the J-Link External Debug Probe section up for consistency with
host tools listings and to clarify separation between sections.
Reformats Flash and debug with ST-Link section with tabs for different
host tool options for clarity and readability.
Signed-off-by: Julia Hathaway <julia.hathaway@nxp.com>
Reformats the three sections on flash configuration for devices with
different bootloader compatibility into tabs to streamline instructions
Signed-off-by: Julia Hathaway <julia.hathaway@nxp.com>
This patch improves the general look and feel of the LaTeX (PDF)
documentation build. Changes include:
- A custom title with relevant information has been created
- Some colors have been adjusted to match those in the web template
- Charter font family is used
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add missing eSPI driver interface under peripheral list.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Co-authored-by: Gerard Marull-Paretas <gerard@teslabs.com>
Logo was accidentally deleted as part of some docs cleanup. Add it back
with a new name making it more explicit that it belongs to the readme.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
ZEPHYR_BASE and ZEPHYR_BUILD directories were passed to Sphinx via
environment variables. However, these paths can be easily discovered by
the conf.py file itself. As a result, Sphinx is less dependent on CMake
to operate.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The LaTeX build succeeds without the fix_tex.py script, so remove it.
The file actually mentions ".tex file produced by doxygen", so it may
not be relevant for Sphinx after all.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Replace the dot diagram with its original source. This is possible
thanks to the Sphinx Graphviz extension. Note that some style attributes
have been removed as defaults are already provided by the extension.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Enable the built-in Sphinx Graphviz extension to allow creating Graphviz
diagrams natively on the source files. Some style defaults have been
enabled to make sure diagrams are consistent and have good quality in
both light and dark modes.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The global variables in the Minimal C library are now placed in
z_libc_partition, update the document accordingly.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Some Kconfig options are left marked as inline literals. But in
Zephyr document, we use the "kconfig" role provided by Sphinx.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Under the "OS Abstraction / POSIX Support" section in the "User and
Developer Guides", we somehow had rand() function already listed and
marked supported, but not srand(). Add srand() to the list.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Follow-up: #16817, commit af968c26942feef3628fc05293c1cb3584e719a4
The referred commit introduced app.overlay as a general application
devicetree overlay if no specific board overlay is found.
This commit document this behavior in the devicetree howto.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Mark the Controller Area Network (CAN) driver API as unstable. The CAN
API was introduced in Zephyr v1.14 and has since gained support for many
different hardware platforms.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The location of the documentation guide is inconsistent with other
documentation guides, so move it to the `guides` folder.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a small paragraph about Floating Point services
in Cortex-M, focusing on the important considerations
around footprint and runtime overhead.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add a small section about specific considerations
around chain loadable images.
Add a brief section about code relocation.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Memory protection features in Cortex-M applications
- user mode and system calls
- MPU based stack overflow detection
Add section about memory map and mpu programming.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
- add a paragraph about CMSIS
- add a note about maintenance status of Cortex-M
- add a paragraph about testing the Cortex-m porting
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add list of the available QEMU targets for Cortex-M
platforms in Zephyr along with the corresponding feature set.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Adding sections to describe
- isr handling principles
- different kinds of interrupts
- reserved interrupts and levels
- locking and unlocking interrupts
- zero latency interrupts
- dynamic direct interrupts
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Adding a small paragraph to describe the details around
thread stack alignment. Adding a detailed section to cover
the thread context-switch and the stack limit checking.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
ARM Cortex-M user guide. Initial commit including a table
for listing supported features in the different
Cortex-M variants.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The gen_devicetree_rest.py script is responsible for generating .rst
files that comprise the devicetree bindings index. As a first step, it
finds all the YAML files that might be bindings.
However, it's doing that incorrectly and ignoring files in nested
subdirectories. This affects bindings in places like
dts/bindings/net/wireless, which are not found.
Fix it by using recursive=True in the glob.glob() call.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
To be able to get a tokenize DT string without the quotes. Deprecate
also DT_ENUM_TOKEN and DT_ENUM_UPPER_TOKEN.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Add a link to best practices about copyright notices and when to and
when not to change them or add them.
Fixes#6777
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Most of the content in the default index is HTML only, so create an
index just for PDF and keep it clean.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add the symbol name on top and in the page title. This will enhance
search results and adds a missing page header that is needed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Right now the kconfig index is randomly placed in the guides. This is a
table similar to other indeces we have and should be considered as part
of an appendix rather than place it in the middle of the documentation.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is useful if the user wants to set specific latexmk options, e.g.
-quiet for CI.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Sphinx automatically generates a Makefile/make.bat that allows to build
the LaTeX output. This converts the CMake `pdf` target into a shim to
this Makefile, making the solution more future-proof if Sphinx decides
to change something.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The extension was not evaluating the GENERATE_HTML option correctly. The
get_doxygen_option returns a `List[str]`, not a `str`.
This effectively means that the Zephyr apidoc has not been updated for a
while as the extension was not moving the output to the final
destination folder.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
`_FOREACH_` macros do not allow the caller to pass additional arguments
to the `fn`. A series of `_VARGS` variants have been added that allow
the caller to pass arbitrary number of arguments to the `fn`:
```
DT_FOREACH_CHILD_VARGS
DT_FOREACH_CHILD_STATUS_OKAY_VARGS
DT_FOREACH_PROP_ELEM_VARGS
DT_INST_FOREACH_CHILD_VARGS
DT_INST_FOREACH_STATUS_OKAY_VARGS
DT_INST_FOREACH_PROP_ELEM_VARGS
```
Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
Indicate which files have to be cleaned for each target. This feature is
only supported for CMake >= 3.15 and is ignored on older CMake versions.
Build will still succeed, but the `clean` target will not clean the
additional build files.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Simplify the devicetree generation. Most of the extra options are not
used, so they have been removed to make things easier to maintain.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Refactor the Kconfig target. Mostly formatting in this case. The Kconfig
script is also added as a dependency of the CMake configuration step, so
that if it is changed, the Kconfig generation step will be re-run.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Refactor the pdf build targets. The Sphinx latex build is now invoked by
the 'latex' target. The 'pdf' target can be used to build the resulting
LaTeX files.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Refactor HTML targets. The 'html' target is kept as is, 'sphinx-html'
equivalent is now 'html-nodeps'.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Group dependencies all together. Some have been simplified, e.g. Sphinx
and others improved, e.g. LaTeX.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
west is currently optional, however, when not found its docs will not be
available and the zephyr_module CMake utility will not be able to find
modules (unless ZEPHYR_MODULES is used). Other Python dependencies, i.e.
the ones listed in the requirements file, are not checked, so do the
same for west.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The `pdftex` utility that is used for PDF documentation generation does
not support GIF images.
This fix replaces the animated `ReelBoard-Blinky.gif` with an animated
PNG (APNG) image `ReelBoard-Blinky.png`.
Note that APNGs are backwards compatible with "normal" PNGs. Modern
web browsers will display APNGs in the same way as animated GIFs, while
any application that can read PNG files can read APNG files
successfully.
Signed-off-by: Chris Pearson <ctpearson@gmail.com>
QUIET flag is now overriden according to the `doxyrunner_silent`
configuration value.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This change will process Doxygen output and will map it to the Sphinx
logger. Things like errors and warnings will be mapped to actual Sphinx
logger error and warnings. In practice this means that when Doxygen
throws a warning and Sphinx is run in "-W" (warning as error) mode, the
build will fail. It also has some other advantages such as the
possibility of filtering issues using the warnings_filter extension.
It is also expected that CI errors not being displayed issue is fixed
with this change.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Align the capitalization of the term "Bluetooth Mesh" to Bluetooth mesh"
in the documentation. This is done to to match the new updated naming
convention done in Bluetooth SIG. In the upcoming spec versions, it its
used "Bluetooth mesh" with the lower case convention.
Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
Updates CXX support documentation to reflect exception support
added in fixes for #32448 and #35772.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
The eager_only is currently breaking the usage of the `.. only``
directive, so remove it. Documentation seems to build fine without it,
so it has been removed for now.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Similar to Sphinx, @kconfig{} alias should be used in Doxygen docstring
in order to reference a Kconfig option. @option{} is still kept for
compatibility reasons.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a new extension to support the :kconfig: role and .. kconfig::
directive. This removes the need of using :option:.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The document build system has been complaining about use of
no longer existing Kconfig option.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Python is used by the west meta-tool as well as by many scripts invoked
by the build system. It is easy to run into package incompatibilities
when installing dependencies at a system or user level. This situation
can happen, for example, if working on multiple Zephyr versions at the
same time. For this reason, the getting started guide has been updated
to offer instructions for both, using Python virtual environments and
installing globally. Python virtual environments has been added as
another choice for the reasons just mentioned.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a paragraph to mention git bisect as a way to pre-analyze
regressions.
Aim is to reference this section from github issues when regressions
are reported and encourage users to do this first round of
pre-analyzis
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Adds a mention of the Kconfig hardening script hardenconfig to
the Kconfig documentation to promote awareness of its existence.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Sphinx provides a way to persist data across builds: the
BuildEnvironment. The build environment is automatically managed by
Sphinx, so there is no need to take care of loading/dumping cache files.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Use file hashes instead of paths and modification times. This method is
fits better on systems using cache mechanisms. Note that hash is
computed using content obtained in UTF-8 text mode for portability
reasons.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This API meets the requirements for marking an API stable:
- Test cases for the new API with 100% coverage: yes;
we have had coverage for every API macro since the beginning.
- Complete documentation in code. All public interfaces shall be
documented and available in online documentation.: yes, in the
reference documentation:
https://docs.zephyrproject.org/latest/reference/devicetree/api.html
- The API has been in-use and was available in at least 2 development
releases: yes; this API ws introduced in v2.3.
The basic design involving node identifiers and the macros that create
and operate on them has not changed since the API was introduced, and
it is in widespread use throughout the tree. As we head into a new
LTS, it's time to mark it stable.
This is more of an acknowledgement of reality than a big change, as I
don't see any backwards incompatible changes since the API was first
introduced in v2.3. (We have deprecated a lot of label related macros
that are no longer required now that we have DEVICE_DT_GET and
friends, but they're still there, and we're still testing them, just
as if this were a stable API.)
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Flag Sphinx tabs style properties as !important, it looks like the
default style used by the latest extension version take precedence.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Always source the Zephyr base soc and shield (board root) Kconfigs
directly from Kconfig instead of generated Kconfig files.
This has the benefit that it is no longer necessary to generate Kconfig
files to source SoC root and shield (board root) when no custom roots
are provided.
Also this cleans up the doc/CMakeLists.txt and ensures that the
doc/CMakeLists.txt is not getting out of sync with the Kconfig.cmake.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The current approach with storing RPL by timeout doesn't solve all
issues as the node may loss power before the timer is fired.
In addition to that this may wear out flash quickly if short timeout is
used.
This change adds an API to store the pending RPL entry upon user
request. Additional Kconfig option allows to completely disable timer
so that the whole storing relies on the user.
The mesh stack still stays responsible for outdating RPL entries in case
of IV Index update as this happens implicitly for the user.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Device management is more than just mcumgr, so put mcumgr under the
general section to allow for other tools and libraries to be documented
and added.
Moved DFU under the same section.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Distinguish between hardware debugging using probes and built-in debug
features such as tracing, post mortem analysis and thread debugging
using thread analyzer.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move the build and configuration systems under one chapter and reorg the
application developer guide to reflect that.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit allows an unprovisioned device to exchange its public key
using out-of-band techology (see MeshPRFv1.0.1, table 5.19 and section
5.4.2.3).
For in-band public key exchange, the mesh stack uses HCI commands to
generate public and private keys, and DH key. This, however, doesn't
work for OOB public key exchange since there is no command to generate
DH key with a private key provided by an application. Therefore, this
commit adds direct usage of TinyCrypto into the mesh stack for DH key
generation for OOB public key support.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Code snippet to demonstrate use of 'zephyr,user' binding
for gpio pin was missing a #define to easily get the code
compiling.
Fix this.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The usage of -W may lead to the loss of the Sphinx build environment
even for small typos. Remove this option from the defaults but still
enable it on CI, where the fail-fast behavior given by -W is desired.
Fixes#36033
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add `hwinfo_get_reset_cause` and `hwinfo_clear_reset_cause` to retrieve
and to clear cause of system reset on supported platforms.
Different platforms can provide different causes of reset, however
there is a great deal of overlap. `enum reset_cause` can be expanded in
the future to support additional reasons, as additional platforms are
supported.
Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
Update release notes for 2.6, and the vulnerabilities page to mention
CVE-2021-3581. This CVE is under embargo until Sept 4, 2021.
Signed-off-by: David Brown <david.brown@linaro.org>
Mention the example application as a major enhancement and provide a
link to its repository.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>