Commit graph

2703 commits

Author SHA1 Message Date
Martí Bolívar 69dfbd354d doc: dts: update guides
Give the guides a once-over in preparation for the v2.3 release.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-26 22:32:34 +02:00
Martí Bolívar bbcb2e276e doc: dts: update diagrams
Update the diagrams. Doing this in a separate commit so the SVG diff
doesn't clutter up other patches.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-26 22:32:34 +02:00
Martí Bolívar 9d36b4f6e4 doc: some devicetree fixes and updates
Some updates to the reference page for the "core" APIs, and associated
follow-ups in the guides:

- centralize documentation of chosen zephyr nodes in a non-legacy
  file, provide a reference to them from the intro page in the guide
- review doxygen docstrings and correct errors for generic APIs
- add introductory text to each section in the API reference
- add missing hardware-specific pages

Documentation for layers built on top of these is mostly left to future
commits, but I do have a smattering of fixes in the guides that I
noticed while I was doing this.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-26 18:12:00 +02:00
Anas Nashif ed44f0575b doc: sanitycheck: fixture documentation
Add documentation about fixtures and how to use them in the hardware
map.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-24 20:25:51 +02:00
Martí Bolívar 3ea8293ef0 Revert "cmake: introduction of ZephyrExtension package"
This reverts commit ac898bc49e.

This commit was merged by mistake, but in a way that was against the
decision of the TSC on May 20, 2020, which was to wait a week to let
people digest befor merging.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-21 00:33:06 +02:00
Andrew Boie ffbc75f95d docs: fix user mode sidebar
The sidebar for User Mode wasn't set up correctly and
it wasn't obvious that there are linked sub-pages with
design details about memory domains, system calls, kernel
objects, and so forth.

Split the introductory material into its own overview
page and set up the table of contents properly.

The text of the threat model, high level policy details,
and constraints sections is unchanged.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-05-20 20:08:54 +02:00
Torsten Rasmussen ac898bc49e cmake: introduction of ZephyrExtension package
The ZephyrExtension package allow downstream users to extend the current
Zephyr package.
A ZephyrExtension package allows for setting of additional DTS_ROOT,
BOARD_ROOT, and similar variables without having to patch Zephyr repo.

The repository or folder containing the ZephyrExtension package must be
on toplevel in the Zephyr workspace.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-05-20 19:27:15 +02:00
Jukka Rissanen b97adfba59 doc: net: Add info how to run multiple Zephyr network instances
Give instructions how to run multiple Zephyr instances in QEMU
or native_posix, and connect them together.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-20 15:36:39 +02:00
Torsten Rasmussen 7d03f2f08f doc: Zephyr SDK CMake package support
This commit updates the documentation so that it no longer requires
ZEPHYR_SDK_INSTALL_DIR and ZEPHYR_TOOLCHAIN_VARIANT to be used when
using the Zephyr SDK.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2020-05-20 12:05:40 +02:00
Erwan Gouriou 7e7b9f3ed0 doc: probes: Add info on ST-Link fw update
Add section on ST-Link Firmware update.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-20 10:38:27 +02:00
Peter Bigot 81d84bc87c doc: drivers: update to match code
The device structure definition in the code has drifted from the
displayed version in the documentation.  Update the documentation to
match.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-05-20 10:34:48 +02:00
Peter Bigot 43bc2622e4 doc: reference: misc: highlight userspace restriction on sys_notify
The underlying structure is not suitable for use in API invoked from
user threads for the reasons explained in the edit.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-05-20 10:34:17 +02:00
Peter Bigot 45e2dd6366 doc: reference: drivers: provide more help on implementing extensions
Extend the provided template with annotated examples of API based on
whether the functions must be invokable from user mode threads, since
there are currently no in-tree examples of the specific techniques
required.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-05-20 10:34:17 +02:00
Emil Obalski 9ef4011d69 doc: release notes: Update USB notes for 2.3
Add information about USB subsystem for 2.3 release.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-05-19 17:27:29 +02:00
Jukka Rissanen 61192b8c68 doc: net: Add networking changes to 2.3 release note
Initial set of networking related changes in 2.3 release.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-19 14:45:09 +02:00
Ioannis Glaropoulos f95aed10cc doc: contribute: project roles: modify description of release team
We modify the content around the Release Team formation,
and maintenance, describing in detail how maintainers
may be added to the team. Add a comment about Release
Managers that stresses that they must be members of the
team. Add details on how the TSC shall ensure a functional
release team. Add details on how the release team will
be picking release managers (cadence and selection process).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-13 22:28:57 +02:00
Ioannis Glaropoulos 182f7f88e7 doc: contribute: project roles: add section about retirement
We add a section that clarifies how the project
roles may be removed. We stress that the rules
will apply to elected project roles that the TSC
may define in the future.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-13 22:28:57 +02:00
Ioannis Glaropoulos f554516801 doc: contribute: project roles: clarify how maintainers can be in TSC
We need to clarify how Maintainers may become voting
TSC member, and direct this to the Charter guidelines.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-13 22:28:57 +02:00
Ruslan Mstoi 81bca72676 doc: sanitycheck: typo fix
Fix "text execution coverage" as "test execution coverage"

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2020-05-13 21:24:03 +02:00
Kumar Gala bd97378870 devicetree: Add support for fixed-partitions
Add DT_NODE_BY_FIXED_PARTITION_LABEL that given a "label" in any
fixed-partitions map will return the node_id for that partition node.

Add DT_NODE_HAS_FIXED_PARTITION_LABEL that will test if a given
fixed-partitions "label" is valid.

Add DT_FIXED_PARTITION_ID that will return an unique ordinal value for
the partition give a node_id to the partition.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-13 21:22:53 +02:00
Martí Bolívar 6e8775ff84 devicetree: remove DT_HAS_NODE_STATUS_OKAY
Several reviewers agreed that DT_HAS_NODE_STATUS_OKAY(...) was an
undesirable API for the following reasons:

- it's inconsistent with the rest of the DT_NODE_HAS_FOO names
- DT_NODE_HAS_FOO_BAR_BAZ(node) was agreed upon as a shorthand
  for macros which are equivalent to
  DT_NODE_HAS_FOO(node) && DT_NODE_HAS_BAR(node) &&
- DT_NODE_HAS_BAZ(node), and DT_HAS_NODE_STATUS_OKAY is an odd duck
- DT_NODE_HAS_STATUS(..., okay) was viewed as more readable anyway
- it is seen as a somewhat aesthetically challenged name

Replace all users with DT_NODE_HAS_STATUS(..., okay), which is
semantically equivalent.

This is mostly done with sed, but a few remaining cases were done by
hand, along with whitespace, docs, and comment changes. These special
cases include the Nordic SOC static assert files.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 18:24:42 +02:00
David Brown ed2d263e0c doc: release notes: Update security notes for 2.3
Add information about security issues addressed in the v2.3.0 release.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-05-11 23:13:32 +02:00
David Brown 6fa228efac doc: vulnerabilities: Document public CVEs
Include documentation for CVE issues that are now out of embargo.  This
includes links to the CVE database, as well as referencing the PRs
within Zephyr that fix these issues.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-05-11 22:50:02 +02:00
Anas Nashif bb28035a82 sanitycheck: support exporting instances
Enable exporting tests per platform.

sanitycheck --export-tests out.txt  -p qemu_x86 -T tests/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-11 17:00:26 +02:00
Martí Bolívar 6f35d3bd16 doc: write documentation about DT-based device instantiation
Add more HOWTO information for the two current devicetree-based device
instantiation styles, and a bit more information on how to create
devices that depend on others.

Point to this from the Kconfig tips page, since it is meant as a
replacement for existing Kconfig practice.

Update macros.bnf.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-08 19:37:18 -05:00
Martí Bolívar 7e0eed9235 devicetree: allow access to all nodes
Usually, we want to operate only on "available" device
nodes ("available" means "status is okay and a matching binding is
found"), but that's not true in all cases.

Sometimes we want to operate on special nodes without matching
bindings, such as those describing memory.

To handle the distinction, change various additional devicetree APIs
making it clear that they operate only on available device nodes,
adjusting gen_defines and devicetree.h implementation details
accordingly:

- emit macros for all existing nodes in gen_defines.py, regardless
  of status or matching binding
- rename DT_NUM_INST to DT_NUM_INST_STATUS_OKAY
- rename DT_NODE_HAS_COMPAT to DT_NODE_HAS_COMPAT_STATUS_OKAY
- rename DT_INST_FOREACH to DT_INST_FOREACH_STATUS_OKAY
- rename DT_ANY_INST_ON_BUS to DT_ANY_INST_ON_BUS_STATUS_OKAY
- rewrite DT_HAS_NODE_STATUS_OKAY in terms of a new DT_NODE_HAS_STATUS
- resurrect DT_HAS_NODE in the form of DT_NODE_EXISTS
- remove DT_COMPAT_ON_BUS as a public API
- use the new default_prop_types edtlib parameter

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-08 19:37:18 -05:00
Tomasz Bursztyka 48135cdd34 usermode: Rework Z_SYSCALL_SPECIFIC_DRIVER to fit with device refactoring
init_fn is not anymore part of struct device, so let's test instead the
driver's API structure pointer which is also unique per device driver.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-05-08 23:07:44 +02:00
Tomasz Bursztyka 97326c0445 device: Fix structure attributes access
Since struct devconfig was merged earlier into struct device, let's fix
accessing config_info, name, ... attributes everywhere via:

grep -rlZ 'dev->config->' | xargs -0 sed -i 's/dev->config->/dev->/g'

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-05-08 23:07:44 +02:00
Ioannis Glaropoulos 3a843e1b0a doc: release notes: add note about FP Kconfig symbol name changes
We add a note in the Zephyr v2.3.0 release notes to highlight
a renaming in the Floating Point Services main Kconfig options,
which was done in the 2.3 release cycle.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-08 17:48:55 +02:00
Andrejs Cainikovs 02a5ca931d doc: gsg: add missing python3-dev dependency
Linux distro might not have a python3-dev package installed by default,
which will give an error during Python dependencies installation.

Closes #25128.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@gmail.com>
2020-05-08 17:30:19 +02:00
Stephanos Ioannidis aaf93205bb kconfig: Rename CONFIG_FP_SHARING to CONFIG_FPU_SHARING
This commit renames the Kconfig `FP_SHARING` symbol to `FPU_SHARING`,
since this symbol specifically refers to the hardware FPU sharing
support by means of FPU context preservation, and the "FP" prefix is
not fully descriptive of that; leaving room for ambiguity.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-08 10:58:33 +02:00
Bilal Wasim 54550c04eb net: qemu: Adding support for User Networking
Added support for Qemu User Networking and tested with
qemu_x86 model. The support is kept simple assuming that
the TAP interface will always be preferred for more
sophisticated / practical use cases.

QEMU User Networking is implemented using "slirp", which
provides a full TCP/IP stack within QEMU and uses that
stack to implement a virtual NAT'd network. As this
support is built into QEMU, it can be used with any model
and requires no admin privileges on the host machine,
unlike TAP.

Added documentation to facilitate the user.

Signed-off-by: Bilal Wasim <bilalwasim676@gmail.com>
2020-05-08 10:47:38 +02:00
Dominik Ermel ba8b74d801 devicetree: Add DT_FOREACH_CHILD macro
The macro iterates through the list of child nodes and invokes provided
macro for each node.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 21:42:58 -05:00
Andy Ross e20e6f4beb doc: Add k_heap/sys_heap docs
We have a new heap implementation replacing mem_pool.  Add docs on its
API and internals, and add a deprecation note to the mem_pool section.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-05-07 17:17:52 -07:00
Andy Ross c310be876b doc: Rewrite clocks and timing sections
The recent work with k_timeout_t has invalidated much of the existing
timing documentation.  Rewrite the section focusing on the new API,
adding details on the internals and driver-facing API.  Includes a
porting guide for legacy applications and subsystems.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-05-07 17:17:52 -07:00
Andy Ross 729f2037c4 doc: Add docs on data structures
Add some documentation and diagrams for OS library data structures:
dlist/slist, rbtree and ring buffer.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-05-07 17:17:52 -07:00
Joakim Andersson 6f0b8c1421 Bluetooth: host: Add application control of PHY change procedure
Add application control of initiating phy change procedure and it's
parameters.
The reasons for allowing the application control over the PHY:
 - Allow changing to Coded PHY.
 - Application may change PHY to react to changes in environment
   to balance throughput and range.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-07 20:12:29 +02:00
Joakim Andersson d9e228a4b0 Bluetooth: host: Add application control of data length procedure
Add application control of initiating data length procedure and it's
parameters.
The reasons for allowing the application control over the data length:
 - Bandwidth control adjusted based on number of active connections.
 - Changing data length before switching to coded phy.
 - Applying workarounds for interoperability problems.
 - Controlling order of ATT MTU and data length procedures.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-07 20:12:29 +02:00
Peter A. Bigot e444274e95 drivers: counter: add Maxim DS3231 support
The DS3231 is an I2C real-time clock with internal temperature
compensated oscillator, maintaining civil time to 1 s precision with
nominal 2 ppm accuracy from 0-40 Cel.

The basic functionality is exposed as a counter that is always running
at 1 Hz.  Much more functionality is exposed as driver-specific API,
including the ability to translate between the time scale of the DS3231
and the time scale of the Zephyr uptime clock.  This allows correlation
of events in the system clock to UTC, TAI, or whatever time scale is
used to maintain the DS3231.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-07 19:45:06 +02:00
Carles Cufi 6aa8f11c93 drivers: video: Remove legacy timeout use
Stop using the legacy timeout option in the video drivers.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-05-07 11:01:55 +02:00
Ruslan Mstoi b4d172dd84 doc: env_vars: Fix link to section env_vars_zephyrrc
Currently the doc says "above in env_vars_zephyrrc" without a link to
that section.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2020-05-06 17:22:07 -04:00
Martí Bolívar 908fe14e47 doc: gsg: unify 'get zephyr' steps
Various commands are getting put into their own sections when they are
really just steps along the way towards getting zephyr and installing
Python dependencies. Group them together in a section by that name,
moving the west install step there.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-06 17:25:49 +02:00
Martí Bolívar d5533765ff doc: gsg: simplifications and fixups
Strip out text that isn't needed to try to minimize the GSG's length.
Fix up some grammar nits.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-06 17:25:49 +02:00
Carles Cufi a5949e74f6 doc: feature tracking: Update with two new categories
Update the feature tracking page with a couple of new categories that
have been identified as missing during the Release Readiness meetings:

- Hardware support
- Meta

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-05-06 17:25:30 +02:00
Kumar Gala fdd85d5ad7 dts: Rename DT_HAS_NODE macro to DT_HAS_NODE_STATUS_OKAY
Rename DT_HAS_NODE to DT_HAS_NODE_STATUS_OKAY so the semantics are
clear.  As going forward DT_HAS_NODE will report if a NODE exists
regardless of its status.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-06 05:25:41 -05:00
Håkon Øye Amundsen a9676831cb storage: add stream flash library
This library supports stream writes to flash with
optinal progressive erase.

This module is a direct copy of the functionality found in
subsys/dfu/img_util/flash_img.c

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2020-05-06 11:14:00 +02:00
Martí Bolívar 2d9baf97f9 doc: fix 'ext' removal path
The removal of mentions of 'ext' from the documentation needs an
adjustment in the Eclipse debugging page, since 'modules' is not a
subdirectory of the zephyr base directory.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-05 22:06:00 -04:00
Anas Nashif c75fa7e578 doc: remove reference to ext/
we do not have ext/ in the tree anymore, so remove it from the
docmentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-04 18:29:18 -04:00
Torsten Rasmussen 92507405d7 doc: cmake: using common python.cmake code
Fixes: #24903

This commit now includes ${ZEPHYR_BASE}/cmake/python.cmake to locate
python3.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-05-04 08:39:36 -04:00
Anas Nashif fc828fde6f doc: can: use :c:macro for K_FOREVER
use :c:macro for K_FOREVER instead of a single tick.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-02 15:41:43 -04:00
Anas Nashif 262bf14c63 doc: kernel: add section about queues
We did not have any reference to queues and doxygen information were not
linked correctly. Add a placeholder and pull in doxygen data so whenever
someone adds a reference, a link is created.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-02 15:41:43 -04:00
David Brown 99374d7808 doc: security: Update vulnerability disclosure
Changes to the security vulnerability reflecting policy changes approved
by the board.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-05-02 11:37:43 -04:00
Carles Cufi 3d16bda27d doc: Bluetooth: Document issue with certain controllers
Certain Qualcomm controllers do not accept our settings for Host Buffer
Size:

< HCI Command: Host Buffer Size (0x03|0x0033) plen 7       #19 [hci0]
22.391048
        ACL MTU: 27   ACL max packet: 6
        SCO MTU: 0    SCO max packet: 0
> HCI Event: Command Complete (0x0e) plen 4                #20 [hci0]
22.391525
      Host Buffer Size (0x03|0x0033) ncmd 1
        Status: Invalid HCI Command Parameters (0x12)

Likely due to the fact that we do not reserve space for any SCO packets
in the Host.

Other Controllers (Realtek) seem to not transmit any data at all in the
Controller to Host direction if Controller to Host flow control is
enabled.

Document this fact in the User Guide so that users know what to do when
this happens.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-30 22:17:10 +03:00
Joakim Andersson 28e99b7efb Bluetooth: doc: Include gap.h and addr.h in documentation build
Add gap.h and addr.h to the Generic Access Profile part of the
documentation build.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-04-30 13:34:28 +02:00
Joakim Andersson 29b13d1270 Bluetooth: doc: Add struct members to documentation build
Struct members are not always documented in the zephyr online HTML
documentation. Enable it for all Bluetooth related documentation
groups.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-04-30 13:34:28 +02:00
Anas Nashif 85233419a8 doc: tracing: adapt to current implementation
Adapt docs to cover tracing support introduced in 2.2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-29 22:30:19 -04:00
David Brown b8dec4805a release: Update security section for 1.14.2
Add information on security vulnerabilities fixed in this release.
These CVEs are under embargo, and vulnerabilities page will be updated
when the embargo ends.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-04-29 09:01:44 -04:00
Anas Nashif 7ab8995932 release: v1.14.2 release notes
Release notes for 1.14.2 with a list of all fixed bugs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-29 09:01:44 -04:00
Joakim Andersson e0d38bf6a1 Bluetooth: samples: hci_uart: Add debug configuration using RTT
Add debug configuration to easily enable logging through RTT. Required
to use RTT since the UART is otherwise used for the h4 UART driver.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-04-28 09:11:13 -04:00
Joakim Andersson 27ef15b8f5 debug: thread_analyzer: Implement thread analyzer
Thread analyzer is simple module that helps in printing thread
information, like stacks usage statistics.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
Signed-off-by: Bartosz Gentkowski <bartosz.gentkowski@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-04-28 09:11:13 -04:00
Stephanos Ioannidis 0e6ede8929 kconfig: Rename CONFIG_FLOAT to CONFIG_FPU
This commit renames the Kconfig `FLOAT` symbol to `FPU`, since this
symbol only indicates that the hardware Floating Point Unit (FPU) is
used and does not imply and/or indicate the general availability of
toolchain-level floating point support (i.e. this symbol is not
selected when building for an FPU-less platform that supports floating
point operations through the toolchain-provided software floating point
library).

Moreover, given that the symbol that indicates the availability of FPU
is named `CPU_HAS_FPU`, it only makes sense to use "FPU" in the name of
the symbol that enables the FPU.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-27 19:03:44 +02:00
Jukka Rissanen 71951ca584 doc: net: Document API change for networking PM support
The NET_DEVICE_INIT(), NET_DEVICE_INIT_INSTANCE() and
ETH_NET_DEVICE_INIT() macros changed and take new device power
management function pointer parameter.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-04-27 19:01:22 +02:00
Andrew Boie 6627249dc1 doc: simplify docs on driver-specific APIs.
This documentation is well-intentioned but not good advice.

The reason why we have a vtable-like API abstraction at the
driver subsystem level is to introduce object orientation.
The subsystem defintions implement an abstract class that
specific driver implementations all implement, providing
a common interface for end users. Multiple drivers may be
written for a subsystem that are interchangeable to the end
user.

However, there is no point in introducing a vtable-like
abstraction for APIs which are specific to a single driver.
We are not trying to present an interface abstraction which
could support multiple implementations. There is just one.

Simply declare a function in a header, and implement it in
the driver's C file.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-04-26 20:29:01 -04:00
Anas Nashif 45a1d8aca9 kernel: rename initializers to be internal
Rename internal macros to use Z_ prefix instead of _K..

Those macros were missed when we did the global renaming activities.

Fixes #24645

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-24 22:27:08 +02:00
Martí Bolívar cd795c1b3b doc: release-notes-2.3: kernel deprecation fixups
Use :option: to generate a link and fix a typo.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-23 11:03:53 -05:00
Martí Bolívar 270dfffc8d devicetree: add CONFIG_LEGACY_DEVICETREE_MACROS
This default-y option allows continued use of the legacy devicetree
macros.

There are no functional changes yet, but when this is default n,
old-style DT code won't build. At that point, adding any of these will
be a fix to keep old-style code working:

- "CONFIG_LEGACY_DEVICETREE_MACROS=y" to prj.conf
- "-- -DCONFIG_LEGACY_DEVICETREE_MACROS=y" to the west build command
- "-DCONFIG_LEGACY_DEVICETREE_MACROS=y" to the cmake command

This option can be changed to default n in time for the Zephyr 2.3
release. That will provide users of Zephyr 2.2 with a smooth migration
path to the new devicetree.h API after 2.3 is released, which
nonetheless will alert them immediately that something is wrong due to
build errors.

Unfortunately, __DEPRECATED_MACRO is not sufficient in all cases as a
warning to users. This is because, at least in GCC, macros defined
using __DEPRECATED_MACRO cannot be used in preprocessor lines like
"#if DT_SOME_LEGACY_MACRO".

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-23 11:03:53 -05:00
Lingao Meng b7897d5aab doc: relnotes: Remove net_idx params in health_cli API
The net_idx parameter has been removed from the Health Client
model APIs since it can be derived (by the stack) from the
app_idx parameter

Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
2020-04-23 11:30:41 +03:00
Lingao Meng be33f913ac Bluetooth: Mesh: Remove net_idx params when with app key
According Mesh Profile 1.0.1. A application key shall
binding single network key. And Device key shall bind all
network key, and dev key only known by cfg_cli and node self,
only used by cfg_cli & cfg_srv.

Fixes: #21088

Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
2020-04-23 11:30:41 +03:00
Corey Wharton 58232d58e0 riscv: Add support for floating point
This change adds full shared floating point support for the RISCV
architecture with minimal impact on threads with floating point
support not enabled.

Signed-off-by: Corey Wharton <coreyw7@fb.com>
2020-04-22 16:39:48 -07:00
Peter Bigot 9f68178fe1 doc: reference: terminology: refine API attributes
The original description for isr-ok allowed the function to return an
error if called from an interrupt context, rather than doing its job.
This led to complex descriptions like "isr-ok but not sleep" to
indicate that the function could be called from thread or interrupt
context without visible behavior changes, including returning an
error based on calling context.

Remove the special terminology for cases where a function returns an
error (rather than causing undefined behavior) when invoked from an
interrupt or pre-kernel.  Redefine isr-ok to indicate that the call
does what it's supposed to do regardless of interrupt or thread
context, delegating the description of allowed behaviors to the API
documentation (which should explicitly note when it's allowed to fail
to perform in non-thread context).

This also makes more clear that isr-ok applies to functions regardless
of whether they can cause an invoking thread to context switch.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-22 17:39:56 +02:00
Peter Bigot 14e2ca4f16 sys: onoff: redesign to meet changed needs
The previous architecture proved unable to support user expectations,
so the API has been rebuilt from first principles.  Backward
compatibility cannot be maintained for this change.

Key changes include:

* Formerly the service-provided transition functions were allowed to
  sleep, and the manager took care to not invoke them from ISR
  context, instead returning an error if unable to initiate a
  transition.  In the new architecture transition functions are
  required to work regardless of calling context: it is the service's
  responsibility to guarantee the transition will proceed even if it
  needs to be transferred to a thread.  This eliminates state machine
  complexities related to calling context.
* Constants identifying the visible state of the manager are exposed
  to clients through both notification callbacks and a new monitor API
  that allows clients to be notified of all state changes.
* Formerly the release operation was async, and would be delayed for the
  last release to ensure a client would exist to be notified of any
  failures.  It is now synchronous.
* Formerly the cancel operation would fail on the last client associated
  with a transition.  The cancel operation is now synchronous.
* A helper function is provided to safely synchronously release a
  request regardless of whether it has completed or is in progress,
  satisfying the use case underlying #22974.
* The user-data parameter to asynchronous notification callbacks has
  been removed as user data can be retrieved from the CONTAINER_OF
  the client data.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-22 16:52:47 +02:00
Carles Cufi a9f48b9fbe doc: release notes: Document renamed boards
Document the nRF boards that have been renamed during the 2.3
development cycle.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-20 23:23:06 +02:00
Luiz Augusto von Dentz 634faf2b78 Bluetooth: hci: Add documentation for Read/Set USB Transport Mode
This adds documentation for Read/Set USB Transport Mode.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-04-20 21:59:47 +03:00
Luiz Augusto von Dentz 2534ab11c0 USB: Add driver and PID for Bluetooth H4
This adds USB_PID_BLE_HCI_H4_SAMPLE along with it driver which uses H4
over bulk endpoints.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-04-20 21:59:47 +03:00
Martin Jäger 33228f516b drivers: dac: Add API for DAC peripherals
DAC (digital to analog converter) peripheral driver with a generic API
suitable for most MCUs (only basic DAC features considered).

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-04-20 17:41:48 +02:00
Jukka Rissanen 4dcca7f640 doc: net: Add information about GSM 07.10 muxing support
Add description of options that needs to be enabled for GSM
muxing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-04-17 10:15:54 +03:00
Peter Bigot 97a5ec0d4f doc: gsg: provide a working link to the Zephyr SDK download page
The command-line is correct but specifies a particular release, which
may be out of date, and is not formatted as a URL that can be clicked.
Add a proper link.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-16 10:24:38 +02:00
Martí Bolívar 6e27343e7b devicetree: add DT_PARENT()
This macro takes a node identifier, and returns the parent node's
identifier.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-15 08:27:18 -05:00
Valerii Koval e7e30e90fe doc: Update PlatformIO guide
Rephrase it in neutral tone so it won't seem like an endorsement

Signed-off-by: Valerii Koval <valeros08@gmail.com>
2020-04-15 12:49:27 +02:00
Valerii Koval 5beab97aac doc: delete redundant parts from PlatformIO guideline
Delete wordy descriptions, unnecessary opinions, trailing whitespaces

Signed-off-by: Valerii Koval <valeros08@gmail.com>
2020-04-15 12:49:27 +02:00
Valerii Koval 27ce35b0d4 doc: Add new section about using Zephyr with PlatformIO
This adds a description of PlatformIO ecosystem, tutorials, examples

Signed-off-by: Valerii Koval <valeros08@gmail.com>
2020-04-15 12:49:27 +02:00
Joakim Andersson aae0f52509 doc: 2.3 relnotes: Update release notes for directed advertising
Update release notes for deprecation of the bt_conn_create_slave_le
API call, which has now been deprecated in favour of bt_le_adv_start
with peer address in advertising parameters instead.
Fix previously mistake about BT_LE_ADV_* deprecated macros,
application should use GAP defines, and not HCI defines.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-04-15 10:57:38 +03:00
Kumar Gala 4e2ad00496 scripts/dts: gen_defines: Generates _EXISTS for reg & irq macros
Add generation of the following macros:

DT_N_<node-id>_REG_IDX_<idx>_EXISTS 1
DT_N_<node-id>_IRQ_IDX_<idx>_EXISTS 1

This will allow us to use IS_ENABLED() in DT_REG_HAS_IDX and
DT_IRQ_HAS_IDX which matches behavior of other DT_*_HAS_* macros as
well as lets use these with COND_CODE_1.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-14 17:45:19 -05:00
Martí Bolívar ffd1abde66 include: devicetree.h: API for /chosen zephyr,foo
Add a devicetree/zephyr.h header, which is meant to contain
definitions for /chosen properties specific to Zephyr.

Currently, this just deals with zephyr,entropy.  We add a
DT_CHOSEN_ZEPHYR_ENTROPY_LABEL macro which expands to the label for the
node pointed to by zephyr,entropy.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-13 09:14:21 -05:00
Erwan Gouriou 6c8617a5ed scripts/dts: gen_defines: Generates _EXISTS for names and index macros
Add generation of the following macros:
DT_N_<node-id>_P_<prop-id>_NAME_<NAME>_EXISTS
DT_N_<node-id>_P_<prop-id>_IDX_<idx>_EXISTS
This will be useful to check availability of named or indexed
property like dmas/dma-names.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-13 07:37:11 -05:00
Anas Nashif 588684654a doc: document how we implement traceability
Change the documentation to cover new aliases and how we support
traceability using doxygen.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-13 14:11:01 +02:00
Anas Nashif 7c055c8cf5 doc: add traceability aliases to doxygen
Add aliases @verify and @satisfy to drive traceability using doxygen.

See https://stackoverflow.com/questions/537043/custom-tags-with-doxygen
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-13 14:11:01 +02:00
Anas Nashif b90fafd6a0 kernel: remove unused offload workqueue option
Those are used only in tests, so remove them from kernel Kconfig and set
them in the tests that use them directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-12 18:42:27 -04:00
Anas Nashif 0a58fe8d3b doc: provide a target to only generate doxygen
Sometimes you are only interested in doxygen, so need to wait 10 minutes
for everything to generate in this case. Now just do:

 make doxygen

and get only the doxygen output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-11 08:40:54 -04:00
Stephanos Ioannidis 071a986bb6 doc: remove licensing for moved ext/ components
ext/hal/cmsis was moved out of the ext folder and into external modules
so we should remove the licensing exceptions noted in this document.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-10 14:47:44 +02:00
Steven Slupsky c54f7ec1fc drivers: hwinfo: fix endianness for sam0 and nrf
HWINFO drivers should be responsible for ensuring that
the data structure is a sequence of bytes. That is not
what the current sam0 and nordic drivers do. The drivers
read the data as u32_t and then memcpy the data to a
buffer. This ensures the data has the endianness of the
underlying MCU, which in this case is Cortex M0 which
is little endian.

This commit fixes the endianness so the data can be
interpreted as a "left to right sequence of bytes".

This commit updates the API doc to provide clarification
of the data structure.
Add to 2.3 release notes.

Fixes #23444, #24103

Signed-off-by: Steven Slupsky <sslupsky@gmail.com>
2020-04-09 19:30:32 +02:00
Peter A. Bigot c790783c2e cmake: add support for user-defined board aliases
Zephyr board names must be globally unique which requires that they
encode all necessary information to identify a specific target.
Typing in these names can be inconvenient to developers working on
multiple targets within a single workspace.

Extend the cmake infrastructure to read an optional board aliases file
that will map custom aliases to the corresponding canonical Zephyr
board name.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-04-09 14:38:36 +02:00
Martí Bolívar 488294368f doc: west: link to modules page instead of source code
When this west doc page was written, we didn't have any documentation
for modules. We do now, so point to it instead of CMake.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-08 12:00:44 -05:00
Martí Bolívar 63d5529a0d devicetree: re-work DT_INST_FOREACH()
Due to the use of UTIL_EVAL*() macros, the UTIL_LISTIFY() macro used
by DT_INST_FOREACH(foo) can cause long build errors when there is a
build error in the expansion for "foo". More than a thousand lines of
build error output have been observed for an error in a single line of
faulty C.

To improve the situation, re-work the implementation details so the
errors are a bit shorter and easier to read. The use of COND_CODE_1
still makes the error messages quite long, due to GCC generating notes
for various intermediate expansions (__DEBRACKET,
__GET_ARG_2_DEBRACKET, __COND_CODE, Z_COND_CODE_1, COND_CODE1), but
it's better than the long list of UTIL_EVAL notes.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-08 09:00:38 -05:00
Carles Cufi 81c2f10c38 doc: redirects: Fix nRF board redirects
Fix the board redirects. The following boards existed before we moved to
a new style of URL for boards, and thus each have 2 entries (old style
old name to old style new name; new style old name to new style
new name):

- nrf51_pca10028
- nrf52810_pca10040
- nrf52840_pca10056
- nrf52840_pca10059
- nrf52_pca10040
- nrf52_pca20020

The following boards did not exist (or were not referenced) before we
moved to the new style of URL for boards, and thus only have one entry
(new style old name to new style new name):

- nrf51_pca10031
- nrf52811_pca10056
- nrf52833_pca10100
- nrf52840_pca10090
- nrf5340_dk_nrf5340
- nrf9160_pca10090

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-07 16:20:31 +02:00
Peter Bigot 8bd676ed38 sys: onoff: generalize and shorten API
The original API was misnamed, as the intent was to provide a manager
that decoupled state management from the service that needed to be
turned on or off.  Update all the names, shortening them where
appropriate removing unncessary internal components like _service.

Also remove some API that misled developers into believing that onoff
managers are normally expected to be exposed directly to consumers.
While this is a use case, in most situations there are service or
client-specific actions that need to be coupled to transition events.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-06 16:41:41 +02:00
Peter Bigot fadd98aad2 sys: add generic asynchronous notification infrastructure
k_poll() for a signal is often desired for notification of completion
of asynchronous operations, but there are APIs where it may be
necessary to invoke "asynchronous" operations from contexts where
sleep is disallowed, or before the kernel has been initialized.
Extract the general notification solution from the on-off service into
a utility that can be used for other APIs.

Also move documentation out to a resource management section.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-06 16:41:41 +02:00
Ioannis Glaropoulos 55ed0828f8 doc: allow redirect old url for nrf5340 DK documentation page
We are renaming the nrf5340 DK documentation page, and due to
re-organizing the doc directory we need to allow redirecting
the old URLs for nrf5340 DK board targets' documentation.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-04-06 15:21:45 +02:00
Carles Cufi 0f9b3626c1 boards: nrf52_pca20020: Rename to thingy52_nrf52832
The board name for the Thingy:52, so far known as nrf52_pca20020, is
renamed to thingy52_nrf52832.  Its documentation and all references to
its name in the tree are updated accordingly. Overlay and configuration
files specific to this board are also renamed, to match the new board
name.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-06 13:09:07 +02:00
Carles Cufi 233d6c87e6 boards: nrf52840_pca10059: Rename to nrf52840dongle_nrf52840
The board name for the nRF52840 Dongle, so far known as
nrf52840_pca10059, is renamed to nrf52840dongle_nrf52840. Its
documentation and all references to its name in the tree are updated
accordingly. Overlay and configuration files specific to this board are
also renamed, to match the new board name.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-06 13:09:07 +02:00
Carles Cufi 205cf1595e boards: nrf52810_pca10040: Rename to nrf52dk_nrf52810
The board target for emulation of nRF52810 on nRF5DK, so far
known as nrf52810_pca10040, is renamed to nrf52dk_nrf52810.
Its documentation and all references to its name in the tree are
updated accordingly. Overlay and configuration files specific to
this board are also renamed, to match the new board name.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-06 13:09:07 +02:00
Carles Cufi 6656214af2 boards: nrf52_pca10040: Rename to nrf52dk_nrf52832
The board name for the nRF52 DK, so far known as nrf52_pca10040, is
renamed to nrf52dk_nrf52832.  Its documentation and all references
to its name in the tree are updated accordingly. Overlay and
configuration files specific to this board are also renamed, to
match the new board name.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-06 13:09:07 +02:00
Carles Cufi fc5bf8ad41 doc: relnotes: Add a short comment about the timeout change
Briefly describe how the s32_t parameter has been "deprecated" in favor
of k_timemout_t.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-04-03 08:56:40 +02:00
Andrew Boie cc680a83dd doc: syscalls: expand docs on data copying
Show best practices when handling parameters passed to
system calls by reference.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-04-01 23:34:02 -04:00
Andrew Boie 68a2fe8262 doc: usermode: fix terminology
Handler functions are now referred to as verification functions,
update documentation to reflect this.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-04-01 23:34:02 -04:00
Martí Bolívar 8d5b998582 doc: west: add FAQ for requires_workspace issue #373
This is also a common problem.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-01 13:36:49 +02:00
Martí Bolívar 1c39ed8129 doc: west: add FAQ for missing extension command
"why can't I run west build" is a common enough question to add an FAQ
item for it in the troubleshooting page.

Even if people don't read it, we can still link to it on Slack etc.
when the question gets asked.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-01 13:36:49 +02:00
Martí Bolívar a3fae2f153 devicetree: add DT_COMPAT_ON_BUS()
And implement DT_ANY_INST_ON_BUS() in terms of it.

This makes some error messages quite a bit shorter by avoiding
UTIL_LISTIFY(), which has a nasty temper and tends to explode if not
treated gently.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-31 21:11:13 -05:00
Alexander Wachter f020780ee3 doc: API stability: Change HWINFO from unstable to stable
Change the API status of the HWINFO API from unstable to stable.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-03-31 16:17:08 +02:00
Ioannis Glaropoulos 8b5892588a doc: allow redirect old url for nrf9160 DK documentation page
We are renaming the nrf9160 DK documentation page, and due to
re-organizing the doc directory we need to allow redirecting
the old URLs for nrf916 DK board targets' documentation.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-03-31 15:16:08 +02:00
Oleg Zhurakivskyy c408fa88a3 toolchain: common: Merge build assert macros
In order to de-duplicate 2 macros with the same use,
merge BUILD_ASSERT(), BUILD_ASSERT_MSG() into one macro.

Make BUILD_ASSERT_MSG() deprecated.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-03-31 07:18:06 +02:00
Carles Cufi ecb85a7db1 doc: 2.3 relnotes: Add section for API changes, document AE ones
Add a section in the 2.3 release notes for the API changes, and document
the ones introduced by the Advertising Extensions support in the BLE
Host.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-30 00:38:23 +03:00
Martí Bolívar 413e16d7bf devicetree.h: sort sub-includes and API docs for them
Trivial cleanup: sort the devicetree/foo.h includes and the relevant
sections for them in the documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-29 09:10:04 -05:00
Torsten Rasmussen db0b4e15e9 doc: Update documentation to describe use of find_package(Zephyr)
This commit changes the current boilerplate include description and
instead describes the use of find_package(Zephyr)

It also add a section covering additional possibilities when using
find_package(Zephyr).

- Search order
- Zephyr repository application description
- Zephyr workspace application description
- Zephyr freestanding application description
- Environment ZEPHYR_BASE setting
- Multiple Zephyr and preference setting

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-03-27 16:23:46 +01:00
Torsten Rasmussen d7862cf776 cmake: using ${ZEPHYR_BASE} instead of $ENV{ZEPHYR_BASE}
With the introduction of ZephyrConfig.cmake all parts of CMake code
should rely on the CMake ZEPHYR_BASE variable instead of the environment
setting.

This ensures that after the first CMake invocation, then all subsequent
invocation in same build folder will use same zephyr base.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-03-27 16:23:46 +01:00
Andrzej Głąbek 4253eae005 boards: nrf52840_pca10056: Rename board to nrf52840dk_nrf52840
The nRF52840 DK board target, so far known as nrf52840_pca10056,
is renamed to nrf52840dk_nrf52840.
Its documentation and all references to its name in the tree are
updated accordingly. Overlay and configuration files specific to
this board are also renamed, to match the new board name.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-03-27 09:14:08 +01:00
Andrew Boie df2b1144da doc: clarify syscall Z_OOPS() policy
As described in #17735.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-26 09:47:48 -07:00
Ioannis Papamanoglou 03700763e6 doc: dts: update devicetree howto to use DT_INST_FOREACH
Updated howto "create struct devices in a driver" section to use
DT_INST_FOREACH instead of manual per-instance macros.

Signed-off-by: Ioannis Papamanoglou <iopapamanoglou@gmail.com>
2020-03-26 11:15:38 -05:00
Martí Bolívar fc40757441 doc: dts: property deletion example fix
Improve the text and delete an unnecessary comment.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-26 11:04:29 -05:00
Martí Bolívar e3e296084a doc: dts: add missing word
Trivial fix.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-26 03:29:01 -05:00
Martí Bolívar 06f609cd56 doc: dts: fix DT_PROP_LEN for reg / interrupts
The documentation was not updated following a change to the way
DT_PROP_LEN works which was made in review. Fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-26 03:29:01 -05:00
Martí Bolívar 0206feb6bc doc: west: add pointer to board porting guide for flash/debug
The board porting guide now has useful information on supporting
flash/debug commands. Link to it from the top of the page describing
these commands to hopefully make it easier to find.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-25 19:43:30 +01:00
Martí Bolívar 7d97bdd276 doc: release-notes-2.3: add devicetree changes
Mention the new devicetree.h API and link to relevant
resources.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-24 10:11:20 -05:00
Martí Bolívar 6e57b42758 doc: dts: revisit documentation
This is joint work with Kumar Gala (see signed-off-by).

Document the changes to the generated node macros in macros.bnf,
moving the old file to legacy-macros.bnf and putting it in its own
section.

The actual generated macros are now a low-level detail, so rewrite the
foregoing sections as examples in terms of the new <devicetree.h> APIs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-24 10:11:20 -05:00
Ioannis Glaropoulos f3807f19dc boards: arm: nrf51_pca10028: rename board to nrf51dk_nrf51422
We rename the nRF51 Dev Kit board target (nrf51_pca10028)
to nrf51dk_nrf51422. We update all associated references
in the supportive documentation and all nRF51-related
cofigurations and overlay files in the samples and tests
in the tree.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-03-24 11:45:27 +01:00
Martí Bolívar 4ba332aca8 doc: rename reference/stability to reference/overview
This page has a lot more information about APIs than just stability,
and I believe it's currently our only exhaustive list of APIs.

Rename it to API Overview.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-23 15:40:12 +01:00
Martí Bolívar 0095daefbc doc: enforce minimum python version
This was still set to 3.4, and does not include REQUIRED to fail the
build in case of an old version.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-21 14:26:20 -04:00
Ioannis Glaropoulos b61ba8df4a doc: reference: kernel: remove inconsistent comment for k_cpu_idle
k_cpu_idle() API does not need to be invoked with interrupts
unlocked; it is actually invoked with interrupts locked by
the kernel CPU idling mechanism. In most architectures, the
function is, actually, un-locking interrupts itself. We need
to remove this comment from the documentation of the CPU
idle API. We add a note about the un-locking of interrupts.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-03-20 11:53:14 +01:00
Carles Cufi cd38fb1610 Revert "toolchain: common: Merge build assert macros"
This reverts commit 974aa3add4.

Pull Request #23437 was merged by mistake with an invalid manifest.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-19 18:45:13 +01:00
Oleg Zhurakivskyy 974aa3add4 toolchain: common: Merge build assert macros
In order to de-duplicate 2 macros with the same use,
merge BUILD_ASSERT(), BUILD_ASSERT_MSG() into one macro.

Make BUILD_ASSERT_MSG() deprecated.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-03-19 15:47:53 +01:00
Carles Cufi b87629589e doc: api: Formulate a procedure to declare an API stable
Lay out the steps required to declare an API stable.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-19 10:03:10 +01:00
Carles Cufi b6ee5fca8e doc: api: Clean up and reorganize a bit
Move the section describing the requirements for a new API out of the
peripheral API header, clarify the requirements for upgrading an API to
experimental and unstable clearly in the corresponding sections. Add a
link to the API stability page.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-19 10:03:10 +01:00
Sebastian Bøe 55894dde58 doc: Kconfig: Document how whitespace is used in Kconfig sources
Document how whitespace is used in Kconfig sources. This serves as an
authoritative reference in code review.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2020-03-18 15:16:29 -05:00
Carles Cufi 39930ca298 doc: reference: Add API Stability page
Add a page documenting the stability of Zephyr APIs.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi 4ffeb79ecd doc: reference: Add disk access API
Add the disk access API to the doc reference.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi 68bfb5c3f2 doc: reference: Add clock control API
Add the clock control API to the documentation reference.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi 22854d39c0 doc: reference: Add the LED and LED Strip APIs
Add the LED (regular and strip) APIs to the doc.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi 46f108519d doc: reference: Add hwinfo API
Add the hwinfo API to the reference documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi 5690b1e69d doc: reference: Add pages for audio
Add reference pages for the following APIs:

- Audio Codec
- DMIC

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi ab03b538d4 doc: reference: Add GNA API entry
Add an entry for the GNA API.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi bf41dd943b doc: reference: Clean up and restructure a bit
Name all subsystem reference consistently with an '_api' postfix and
clean up naming and folder structure in some cases.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi bb01382c18 doc: reference: Move terminology to its own page
Move the terminology section to its own page in preparation for
additional sections to be addded later.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Andrew Boie 28be793cb6 kernel: delete separate logic for priv stacks
This never needed to be put in a separate gperf table.
Privilege mode stacks can be generated by the main
gen_kobject_list.py logic, which we do here.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-17 20:11:27 +02:00
Andrew Boie ae8acffaa6 doc: fix some missed renames
These were renamed to z_ prefix some time ago, but not updated
in these places.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-17 20:11:27 +02:00
Andrew Boie 2dc2ecfb60 kernel: rename struct _k_object
Private type, internal to the kernel, not directly associated
with any k_object_* APIs. Is the return value of z_object_find().
Rename to struct z_object.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-17 20:11:27 +02:00
Andrew Boie 4bad34e749 kernel: rename _k_thread_stack_element
Private data type, prefix with z_.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-17 20:11:27 +02:00
Andrew Boie f2734ab022 kernel: use a union for kobject data values
Rather than stuffing various values in a uintptr_t based on
type using casts, use a union for this instead.

No functional difference, but the semantics of the data member
are now much clearer to the casual observer since it is now
formally defined by this union.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-17 20:11:27 +02:00
Ioannis Glaropoulos 1ada829ca3 doc: contribute: link project roles documentation to index
Add a link and a note about the Project Roles' documentation in
contribute/index.rst.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-03-17 11:13:11 -04:00
Ioannis Glaropoulos b0b10594ae doc: contribute: adding supportive jpg image
Add the jpg image used in the documentation for
Project Roles.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-03-17 11:13:11 -04:00
Ioannis Glaropoulos 2d8649cecc doc: contribute: initial version of Project Roles
Add initial version of Project Roles documentation.
The initial version contains the content that has
already been approved by the TSC on Feb 5, 2020.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-03-17 11:13:11 -04:00