Commit graph

6841 commits

Author SHA1 Message Date
Gerard Marull-Paretas
45eaa60fe4 doc: silent filtered warnings
The filtered warnings are warnings we can't fix due to Sphinx
limitations, so showing them just adds noise to the doc build process.
The extension already defaults to silent mode.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-22 16:02:56 -08:00
Martí Bolívar
7017678ffb doc: contribute: signed-off-by updates
Rework the contribution guide's Signed-off-by: language to be clearer
and reflect the TSC guidance that legal names are required. Also
clarify that existing s-o-b lines should be preserved.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-02-22 15:07:11 -08:00
Torsten Rasmussen
604f705fda cmake: doc: created a doc.cmake CMake module in Zephyr CMake modules dir
Creating a doc.cmake to the new Zephyr CMake modules dir.

This removes the need for `set(NO_BOILERPLATE TRUE)` before loading the
Zephyr CMake package.

It also removes the need within the doc/CMakeLists.txt file to manually
include individual parts of the Zephyr CMake files as this is now
controlled through a single Zephyr CMake doc module.

This aligns the way a Zephyr package is sourced with other places.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-02-22 10:02:39 -08:00
Krzysztof Chruscinski
ec963aa134 doc: logging: Add section about stack usage
Add information about logging stack usage.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-02-22 14:44:11 +01:00
Carlo Caione
d3203dc70d code_relocation: Add NOCOPY feature
* Use case of interest:

Some platforms are shipping in parallel to the internal FLASH some other
storage / external FLASH (usually a QSPI FLASH) that can be used to
execute (XIP) code from.

The content of this external FLASH can usually be written at flash time
using proper tools (see for example the case of the external FLASH on
the nRF5340DK that can be written at flash time using nrfjprog).

The external FLASH is a nice addition that is extremely useful when a
large application code doesn't entirely fit on the internal FLASH so
that we could want to move part of it in the auxiliary FLASH to XIP the
code from there.

* The problem:

Right now Zephyr doesn't have a formal and generic way to move at build
time part of the code to a different memory region.

* The current status:

Zephyr is indeed shipping a code_relocation feature but that doesn't
entirely match our needs.

When XIP is enabled, the code_relocation feature is used in Zephyr to
move the selected code (that is to copy text section, to initialize data
and zero bss) from FLASH to SRAM at run time and execute code from SRAM.

The relocation is done by a generated snippet of code that is
memcpy()-ing the right content to the destination region also using some
build-time generated portions of linker script to retrieve start and
destination addresses and regions.

* This patch:

This patch is leveraging the code_relocation code and adding a NOCOPY
feature. This feature is using the code_relocation feature to
dynamically build the linker script snippets but entirely skipping the
run-time code relocation so that the code can be XIP-ed from the
destination region.

* Example:

Let's say that we have a big file called `huge_file.c` that we want to
XIP from the external FLASH that is mapped in an EXTFLASH region.

In this case we should enable `CONFIG_XIP` and
`CONFIG_CODE_DATA_RELOCATION` and instruct cmake as follows:

  zephyr_code_relocate(src/huge_file.c EXTFLASH_TEXT NOCOPY)
  zephyr_code_relocate(src/huge_file.c SRAM_DATA)

this means that:

- The .text section of the `huge_file.c` must reside in the EXTFLASH
  memory region and we do not need to copy the section there because we
  are going to XIP it (and we assume that the file is going to be placed
  in the external FLASH at flash time).
- The .data section of the `huge_file.c` must still reside in the SRAM
  memory region.

* TODOs:

It's desirable to have the possibility to relocate libraries and
pre-build files instead of source code files.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 22:09:46 -05:00
Martí Bolívar
254ceb6b79 doc: application: tweak experimental features text
We use a specific experimental Kconfig option when describing the
behavior of CONFIG_WARN_EXPERIMENTAL.

However, this option may not be experimental forever. This therefore
may go stale. Rather than try to keep generic documentation about
experimental options up to date with whatever the bluetooth subsystem
happens to consider experimental or not, use a placeholder CONFIG_FOO
instead of a real option.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-02-21 22:07:12 -05:00
Chen Peng1
58dadb8d18 doc: twister: add usage for twister --fixture option.
Add introduction for usage of twister --fixture option.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2022-02-21 21:59:50 -05:00
Gerard Marull-Paretas
ea5560e6e1 doc: guides: docs: add details on DT_TURBO_MODE
Include DT_TURBO_MODE in the documentation build guide.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 20:47:10 -05:00
Gerard Marull-Paretas
5986d882bb doc: add support for DT_TURBO_MODE
Similar to Kconfig turbo mode, add a Devicetree bindings turbo mode. In
this mode, the Devicetree bindings pages are not generated. Instead, a
page with dummy symbols is created. This takes ~1K pages out of the
build, resulting in faster builds. This mode can be useful while in
development or CI PRs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 20:47:10 -05:00
Mike Szczys
e535cc76db doc: add OTA section to device management
Zephyr docs should mention OTA:
- Define Over-the-Air update
- Indicate OTA can be used with MCUboot
- Link examples of the OTA DFU process

Signed-off-by: Mike Szczys <mike@golioth.io>
2022-02-21 20:39:08 -05:00
Gerard Marull-Paretas
d5e0102772 doc: readme: make logo text gray
The logo did not display black text when using the Github light theme in
a system configured to prefer dark mode. An alternative solution: just
make text grayish (#4e4e4e) so that it looks "ok" in both light and dark
modes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 19:38:11 -05:00
Dan Kalowsky
306901c644 doc/releases: release-notes-3.0: fix typos
Fix some typos in the release note additions.

Signed-off-by: Dan Kalowsky <dank@deadmime.org>
2022-02-21 14:39:23 -08:00
Dan Kalowsky
a05cfe2c9d doc/releases: release-notes-3.0: 100 character max line
Fix release notes that extended over 100 characters.  This was not
applied to the issue list.

Signed-off-by: Dan Kalowsky <dank@deadmime.org>
2022-02-21 14:39:23 -08:00
Dan Kalowsky
835164ccea doc/releases: release-notes-3.0: remove empty sections
Remove the empty sections.

Signed-off-by: Dan Kalowsky <dank@deadmime.org>
2022-02-21 14:39:23 -08:00
Dan Kalowsky
7075a9ac65 doc/release: release-note-3.0 remove 1.14 backport notes
Remove issues related to the backporting of fixes to the 1.14 branch as
they are not related to the 3.0 release.

Signed-off-by: Dan Kalowsky <dank@deadmime.org>
2022-02-21 14:39:23 -08:00
Dan Kalowsky
18dda9e2a6 doc/release: release-note-3.0 remove 2.7 backport notes
Remove the notes for the backport to the 2.7 branch as those issues are
not related to 3.0 release.

Signed-off-by: Dan Kalowsky <dank@deadmime.org>
2022-02-21 14:39:23 -08:00
Dan Kalowsky
26bb3007fb doc/release: release-note-3.0 remove stray backtick
Remove a stray back tick that got merged in.

Signed-off-by: Dan Kalowsky <dank@deadmime.org>
2022-02-21 14:39:23 -08:00
Dan Kalowsky
3e084ac5c4 doc/conf.py: add release version 3.0.0
Add release version 3.0.0 to the documentation selection.

Signed-off-by: Dan Kalowsky <dank@deadmime.org>
2022-02-21 14:39:23 -08:00
Dan Kalowsky
2a8fa6f094 doc/conf.py: update copyright to 2022
Update copyright time frame.

Signed-off-by: Dan Kalowsky <dank@deadmime.org>
2022-02-21 14:39:23 -08:00
Gerard Marull-Paretas
8239aea29c doc: release: fix github role formatting
The syntax is :github:`N`, not :github:'N'.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 12:39:55 -08:00
Anas Nashif
f9ef7aa5fd release notes: Add kernel notes
Add notes about new features in the kernel.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-02-21 10:16:32 -05:00
Anas Nashif
d3a3061df3 release: add list of fixed issues in 3.0
Add list of issues fixed since the last release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-02-21 10:16:32 -05:00
Carlo Caione
cb4f92ae0e release-notes: Add release notes for ARM64, IPC and MBOX
Release notes for ARM64, IPC and MBOX

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 08:57:36 -05:00
Martí Bolívar
d353e55160 doc: release-notes-3.0: devicetree
Additional API changes not already covered.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-02-20 16:05:09 -08:00
Peter Johanson
80a2340f24 doc: release-notes: add rp2040/pico details
Add new RP2040 SoC and Pico board details.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2022-02-20 16:04:39 -08:00
Dan Kalowsky
70bbff1662 doc: release-notes: add arch/arm details
Add details to the release note about Cortex-R behavioral changes and
the general arm MPU use of CMSIS versus the older inline assembler.

Signed-off-by: Dan Kalowsky <dank@deadmime.org>
2022-02-18 11:09:08 -08:00
Dan Kalowsky
6f96decb67 doc: release-notes: add Kernel details
Add release notes for the Kernel section based on the git log since 2.7

Signed-off-by: Dan Kalowsky <dank@deadmime.org>
2022-02-18 11:09:08 -08:00
Xabier Marquiegui
9311e41d4d doc: release notes: gptp clock sync ratio change
Mention that the gptp clock sync ratio is now a double instead of a
float.

Signed-off-by: Xabier Marquiegui <xmarquiegui@ainguraiiot.com>
2022-02-18 08:11:20 -08:00
Daniel Leung
ec409f61ca doc: formatted_output: update header field descriptions
The second and third bytes of the packaged string headers
have new meanings after support for fully self-contained
(fsc) packaged string was added in commit
5d80cbae59. So update
the document to reflect this.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-18 08:31:47 -05:00
Flavio Ceolin
22c0843485 doc: releases: 3.0: Update security notes
A CVE just left the embargo period before the release.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-17 19:05:08 -05:00
Flavio Ceolin
e14d07a869 security: docs: Add CVE-2021-3966
Add information about CVE-2021-3966

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-17 19:05:08 -05:00
Carles Cufi
6669629d0b doc: relnotes: Add a note about CONFIG_LOG_MINIMAL
Add a note about this removed Kconfig option.

See #42850.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-02-16 16:35:28 +01:00
Carles Cufi
2241d7ae94 doc: relnotes: Fix typos in Bluetooth release notes
Fix a typos and formatting in the Bluetooth DF notes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-02-16 16:35:28 +01:00
Gerard Marull-Paretas
5838c4d9b9 readme: make README logo dark-mode aware
Use an SVG based logo with embedded style that toggles title color using
media queries. The SVG logo is not exactly the same as the previous one
as I only had this version in SVG (taken from docs actually).

Note that we cannot use the method described in
https://github.blog/changelog/
2021-11-24-specify-theme-context-for-images-in-markdown/ because the
README is written in rst, not Markdown.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-15 19:47:48 +01:00
Carles Cufi
2b066cb492 doc: releases: Add 3.0.0 Bluetooth release notes
As usual, update the release notes with a Bluetooth section, this time
for Zephyr 3.0.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-02-15 11:23:12 -05:00
Flavio Ceolin
655b0d2127 doc: release-notes: Add PM release notes
Additional information about PM changes done for this release.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-11 17:04:38 -05:00
Gerard Marull-Paretas
81d2768016 doc: remove reference to deleted Kconfig option
CONFIG_LOG_IMMEDIATE has been removed, replace reference with literal.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-08 07:02:47 -05:00
Gerard Marull-Paretas
d7c48d0dfb doc: guides: pm: fix incorrect Kconfig reference
Kconfig options need CONFIG_ prefix when referenced.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-08 07:02:47 -05:00
Flavio Ceolin
b64b4a49aa doc: releases: 3.0: Add security notes
Add information about vulnerabilities fixed in this release.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-08 07:02:36 -05:00
Flavio Ceolin
ead018cb12 security: docs: Add CVE-2021-3861
Add information about CVE-2021-3861

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-08 07:02:36 -05:00
Flavio Ceolin
2a0ae5edac security: docs: Add CVE-2021-3835
Add information about CVE 2021-3835

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-08 07:02:36 -05:00
Aleksander Wasaznik
d54ae955a2 Bluetooth: ATT: Fix conn parameter to req cb in att_reset
The conn pointer is still valid / not reused at this time and can be
used further up the stack as an identifer. This simplifies the API of
ATT, and fixes callbacks in GATT that pass on this value directly since
their API does not allow conn to be NULL.

Fixes #41794

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-02-07 17:00:51 +01:00
Gerard Marull-Paretas
956d49ad66 doc: extensions: doxyrunner: do not modify extension config
After the introduction of #41688, doxyrunner extension modifies the
fmt_vars content (from a variable defined in `conf.py`) when the output
directory variable is defined. This means that Sphinx will always get an
outdated environment and so will always perform a full build instead of
an incremental build. This patch makes a copy first to prevent this
situation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-05 06:24:26 -05:00
Henrik Brix Andersen
8de57819e9 doc: releases: 3.0: add CAN related release notes
Add CAN related release notes for Zephyr v3.0.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-02-05 06:18:07 -05:00
Carles Cufi
7f6524949a lib: os: crc: Rework the crc16() implementation
As described in #42403, there was an issue with the existing crc16_ansi()
implementation, since it was not calculating the CRC-16-ANSI (aka
CRC-16-MODBUS). This is because the  existing crc16() function only
supported non-reflected input and output (and the CRC-16-ANSI requires
reflection on both) and also it did not seem to support correctly inial
seeds different from 0x0000 (and, again, the CRC-16-ANSI requires 0xffff
as an initial seed).

This commit replaces the existing crc16() with a functional pair,
crc16() and crc16_reflect(), that also work with any poly, any initial seed
and allow to select whether reflection is performed.
It also adapts crc16_ansi() so that it actually returns the correct CRC.

Fixes #42403.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-02-04 12:33:22 -05:00
Aymeric Aillet
b2aa94850b doc: release: 3.0: Add new I2C switch support
Modified TCA9546a driver to support more switch references.
Added support for TCA9548A.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2022-02-04 08:57:09 -06:00
Aymeric Aillet
34207ad7e3 doc: release: 3.0: Add new R-Car platform drivers
Added I2C driver.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2022-02-04 08:57:09 -06:00
David Leach
cbdc8652ff doc: release: Update 3.0 release notes with NXP changes
Capture SOC and board additions plus any support updates.

Signed-off-by: David Leach <david.leach@nxp.com>
2022-02-04 11:18:26 +01:00
Henrik Brix Andersen
127c621275 doc: releases: 3.0: add EEPROM related release notes
Add EEPROM related release notes for Zephyr v3.0.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-02-03 14:08:46 -06:00
Jonathan Hahn
623bee2e68 doc: devicetree: fix broken link in api.rst
The devicetree binding link for fixed-partitions was
broken.

Signed-off-by: Jonathan Hahn <Jonathan.Hahn@t-online.de>
2022-02-03 14:01:25 -06:00
Kevin Townsend
43a97c84bd doc: releases: 3.0: add TF-M release notes
Mention update to TF-M 1.5.0 in Zephyr 3.0.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-02-03 13:59:51 -06:00
Carles Cufi
7107f7a00d doc: guides: Building the documentation
Add a couple of missing Arch packages for the .pdf build.

Fixes #41887.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-02-03 07:32:43 -05:00
Daniel Leung
6964f2b130 doc: toolchain: add a few words about XCC
This adds a few words about setting up XCC.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-02 18:39:24 -05:00
Christopher Friedt
f2d675b7c5 doc: spinlock: ensure spinlock api is added to doxygen
Previously, `k_spin_lock()` and friends had broken links
in html docs.

Fixes #42373

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2022-02-02 08:57:14 -05:00
Tom Burdick
8236cdb30b doc: release_notes: Note all my changes
Changes made to i2c, dma, and tracing for improved debugability
and hardware support. Adding driver level stats, dma api improvements,
and syscall tracing.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-02-01 12:30:14 -05:00
Gerson Fernando Budke
7d108d54f5 doc: release: 3.0: Add notes related to Atmel
Add 3.0.0 release notes for Atmel SoCs, drivers and boards.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-02-01 12:10:44 -05:00
Gerard Marull-Paretas
84fd7f35d5 doc: release-notes: add GigaDevice changes
Initial support for GigaDevice is now available upstream. This patch
lists relevant additions such as supported boards, drivers, etc.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-02-01 08:18:46 -05:00
Gerard Marull-Paretas
341b042a84 doc: release-notes: add pin control
Add a new section for pin control, mentioning the new API, link to the
guide and platforms already supporting the API.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-01 08:18:28 -05:00
Gerard Marull-Paretas
6f0fab162c doc: release-notes: add documentation highlights
Mention new Doxygen theme.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-01 08:18:28 -05:00
Gerard Marull-Paretas
e2c514f9d9 doc: release-notes: add new Devicetree macros
Add list of new Devicetree macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-01 08:18:28 -05:00
Gerard Marull-Paretas
91198b762a doc: release-notes: add deprecated device API macros/functions
Add list of deprecated device API macros and functions.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-01 08:18:28 -05:00
Gerard Marull-Paretas
0e668396bd doc: release-notes: add power management release notes
Add relevant changes to the PM subsystem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-01 08:18:28 -05:00
Andrzej Puzdrowski
48c0faba1f release-note: Record on removal of the flash write protection API
Added API removal record and ite_8xxx2 rework record.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-02-01 10:46:28 +01:00
Maureen Helm
20c1e1a800 doc: release: Add sensor release notes for v3.0.0
Documents significant changes to sensor drivers in the v3.0.0 release,
including new drivers added and existing drivers modified.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-01-31 19:04:26 -05:00
Gerard Marull-Paretas
81d43510a4 doc: getting_started: linux: reference to the 3rd party compilers page
The documentation was talking about not using Zephyr's SDK, but
referenced back to the GSG where only Zephyr SDK is covered in detail.
Refer to the 3rd party compilers page, where relevant information can be
found.

Fixes #42272

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-31 18:40:26 -05:00
Erwan Gouriou
a053063178 doc/release-notes: V3.0: STM32 add-on
Update V3.0.0 release note with STM32 additions.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-28 19:15:31 -05:00
Daniel Leung
14ac190765 doc: release: 3.0: mention new UART API
This adds a brief mentioning of new UART API to support
datum wider than 8-bit.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-27 05:23:57 -05:00
Daniel Leung
ce238f7acf doc: release: 3.0: add info for Xtensa
This adds a few bullet points in the 3.0 release note
for Xtensa.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-27 05:23:57 -05:00
Daniel Leung
6f3f752607 doc: release: 3.0: make API changes sub-headers visible
() There are two "Changes in this release" so combine them.
() Make "Removed" and "Deprecated" into headers so they appera
   in the TOC on the left.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-27 05:23:57 -05:00
Emil Gydesen
9140a8ac46 Bluetooth: shell: Add LE Audio shell commands
Adds audio.c which covers all the LE Audio shell commands.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-27 12:01:34 +02:00
Antony Pavlov
ac0c1e4192 doc: mention MIPS architecture support
MIPS architecture support was introduced
in 0369998e61 ('arch: add MIPS architecture support').

Also sort supported architectures list alphabetically.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2022-01-24 17:11:42 -05:00
Maureen Helm
1a7bc06086 debug: Remove deprecated CONFIG_OPENOCD_SUPPORT
CONFIG_OPENOCD_SUPPORT was deprecated in favor of
CONFIG_DEBUG_THREAD_INFO in Zephyr v2.6.0 and can now be removed.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-01-24 10:23:20 -05:00
Wealian Liao
7467dc4c12 tracing_user: Add ISR nest level parameter
For tracing_user, the sys_trace_isr_enter() & sys_trace_isr_exit()
block any nest interrupts & most SMP interrupts for the user. It is
hard to analyze the IRQ preemption(e.g., each IRQ counter and execution
time). This commit adds ISR nest level for each CPU to the user instead
of blocking user call back when nest interrupts.

Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
2022-01-21 14:38:35 -05:00
Jordan Yates
afa700d182 doc: guides: index: document Doxygen linking
Document the existance of `zephyr.tag` by providing a link on the main
documentation guide page. Also include an example of how to use this
file in an external project.

Implements #41529.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-01-21 14:26:14 -05:00
Jordan Yates
b527915738 doc: generate Doxygen tag file
Generate the Doxygen tag file to static html sources directory so that
external documentation can use it as a source for linking. See:
    https://www.doxygen.nl/manual/external.html

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-01-21 14:26:14 -05:00
Anas Nashif
76ac2dc478 doc: update list of supported architectures
- Add MIPS to the list.
- Update ARC entry with ARCv3 support.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-01-21 07:27:07 -05:00
Andy Ross
aa825d77b0 doc: Clarify k_poll() behavior with respect to signal synchronization
Bug #40189 tripped over an interesting synchronization scenario that
wasn't called out in the docs.  Poll signals are level triggered, and
if you're adjusting the level from a racing context (e.g. resetting it
before the next "event" from an ISR or another thread) the polling
thread might wake up but then miss the event.  Mention this case
explicitly in documentation.

Fixes #40189

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-01-20 10:57:31 -05:00
Flavio Ceolin
2b9d2f6f6c docs: pm: Add power domain information
Document power domains on Zephyr.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-01-19 13:35:32 -05:00
Dominik Ermel
b36f29243e doc/guides/mgmt: Mcumgr fixes backporting process
The commit adds guide on backporting mcumgr fixes to Zephyr 2.7.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Co-Authored-By: Francesco Servidio <francesco.servidio@nordicsemi.no>
2022-01-18 13:15:38 -05:00
Gerard Marull-Paretas
ab64a67008 doc: conf: specify which variable is used for output directory
This is needed so that it can be re-used by other Doxygen configuration
entries.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-18 13:14:05 -05:00
Gerard Marull-Paretas
7e88a29a7e doc: extensions: doxyrunner: add doxyrunner_outdir_var option
The doxyrunner_outdir_var option allows to specify which variable (if
any) is used to represent the output directory (as used by
OUTPUT_DIRECTORY). This makes sure that other options referencing it are
processed correctly, since the output directory is not passed as a
variable.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-18 13:14:05 -05:00
Erwan Gouriou
26cde3ab23 boards: b_u585i_iot02a: Add a non-secure target
Provide a _ns target for b_u585i_iot02a board.
Flash partition is given as default for most applications,
with the following sizes:
MCUBoot: 208K
Secure: 256K
Non secure: 512K

Tested using tfm_ipc sample.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-18 10:42:45 -05:00
Jian Kang
b89a0f5d24 Fix: Add the doxygen group of heap listener
Add the doxygen contents of heap listener which is missed.
We already have some apis of heap listener, but cannot be display
in our documents. So add the group to show in the doc.

Signed-off-by: Jian Kang <jianx.kang@intel.com>
2022-01-18 10:39:01 -05:00
Krzysztof Chruscinski
aff9cfc65a logging: Add assert when wrong backend is used
Add assert when logging v2 is enabled but backend doesn't support it.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-17 15:49:10 -05:00
Krzysztof Chruscinski
262cc55609 logging: Deprecate v1, default to v2
Reduced logging mode selection to deferred, immediate, minimal and
frontend. Decoupled logging version from mode and created CONFIG_LOG1
which can be used to explicitly select deprecated version.

From now on, chosing CONFIG_LOG_MODE_{IMMEDIATE,DEFERRED} will result
in version2.

Deprecated CONFIG_LOG2_MODE_{IMMEDIATE,DEFERRED} with cmake warning.

Codebase adapted to those changes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-17 15:49:10 -05:00
Krzysztof Chruscinski
dd4035c624 doc: logging: Add note about v1 deprecation
Added note about v1 deprecation.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-17 15:49:10 -05:00
Gerard Marull-Paretas
d2538475c6 doc: fix PDF build issue due to extlink references
LaTeX code generated by Sphinx causes problems when using extlinks in
references. Mitigate the problem by just using the extlink role
directly.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-17 12:48:43 -05:00
Henrik Brix Andersen
2c0e0a74af doc: use extlink for github issue links
Use extlink for GitHub issue links in documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-17 12:48:43 -05:00
Gerard Marull-Paretas
36515919b5 doc: fix kconfig usage issues
- Fix some syntax errors, e.g. :c:kconfig:`...`
- Remove references to missing symbols (replaced with literals)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-17 11:42:53 -05:00
Flavio Ceolin
449c37808a doc: security: Fix one vulnerability report
The issue was properly fixed but this document was not updated.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-01-13 18:34:15 -05:00
Daniel Leung
2e629b85f2 doc: remove @return doc for void functions in sample code
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-12 16:02:16 -05:00
Grzegorz Ferenc
feb8d96b59 doc: mcumgr: add -w 1 parameter
Added -w 1 parameter to image upload mcumgr command.

Signed-off-by: Grzegorz Ferenc <Grzegorz.Ferenc@nordicsemi.no>
2022-01-12 15:42:01 +01:00
Daniel Leung
a5d55ddcf2 doc: add a page for the new memory blocks allocator
This adds a page for the new memory blocks allocator,
describing what it is and how to use it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-11 16:10:53 -05:00
Peter Mitsis
3b235e37e1 doc: Document pipe flush routines
Adds documentation for the two new flush routines:
   k_pipe_buffer_flush()
   k_pipe_flush()

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2022-01-10 12:17:14 -05:00
Peter Mitsis
452f57a55d doc: Remove references to async pipe messages
Updates the documentation to remove references to asynchronous
pipe messages as they are no longer supported.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2022-01-10 12:17:14 -05:00
Henrik Brix Andersen
8af4bb722d drivers: can: rename API functions for better consistency
Rename a few CAN API functions for clarity and consistency with other
Zephyr RTOS APIs.

CAN_DEFINE_MSGQ() becomes CAN_MSGQ_DEFINE() to match K_MSGQ_DEFINE().

can_attach_isr() becomes can_add_rx_filter() since a filter callback
function is not an interrupt service routine (although it is called in
isr context). The word "attach" is replaced with "add" since filters are
added, not attached. This matches the terminology used is other Zephyr
APIs better.

can_detach() becomes can_remove_rx_filter() to pair with
can_add_rx_filter().

can_attach_msgq() becomes can_add_rx_filter_msgq() and documentation is
updated to mention its relationship with can_add_rx_filter().

can_register_state_change_isr() becomes can_set_state_change_callback()
since a state change callback function is not an interrupt service
routine (although it is called in isr context). The word "register" is
replaced with "set" since only one state change callback can be in
place.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-10 10:44:37 +01:00
Martin Jäger
1dbbdf210e docs: api: uart: Restructure and provide introduction
The document is now structured into the three different APIs. In
addition to that, a section for relevant Kconfig options is added.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-01-07 14:01:12 -05:00
Jakub Rzeszutko
10210bd101 doc: shell getopt support
Documentations has been updated acorcing to changes in the getopt
library.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2022-01-06 21:26:59 +01:00
Gerard Marull-Paretas
f08279901d doc: css: update code documentation directives style
New Sphinx version (or docutils) has slightly changed the output format
for code documentation directives. These changes try to mimic previous
behavior, even though it does not achieve 100% equal result. In some
cases the new default style does not require further tweaks, and in some
others styling as before is not possible.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-05 14:38:24 +01:00
Henrik Brix Andersen
99a310b29b drivers: can: loopback: convert the CAN loopback driver to dts
Convert the CAN loopback driver from being configured via Kconfig to
multi-instance configured via devicetree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-04 15:13:40 -06:00
Sebastian Bøe
22365b4dea mcumgr: kconfig: Have OS_MGMT_TASKSTAT default to n
OS_MGMT_TASKSTAT depends on THREAD_MONITOR, so when it defaults to y
and THREAD_MONITOR is disabled we get a build error.

Add a depends on to enforce a correct configuration.

Remove default y, as features should be default n.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2022-01-04 11:54:28 +01:00
Henrik Brix Andersen
7f5eb921dc doc: reference: api: overview: note that the CAN API was changed in v3.0
Update the API overview documentation to note that the CAN API was
changed in the upcoming Zephyr v3.0 release.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-01 07:40:41 -05:00
Henrik Brix Andersen
b1b77c1774 drivers: can: change can_tx_callback_t function signature
Change the can_tx_callback_t function signature to use an "int" (not an
uint32_t) for representing transmission errors.

The "error" callback function parameter is functionally equivalent to
the return value from can_send() and thus needs to use the same data
type and needs to be able to hold negative errno values.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-01 07:40:29 -05:00
Gerard Marull-Paretas
c0fff657c5 pinctrl: use groupN instead of pinsN for groups
The pinsN group name can be a confusing in some circumstances, so change
it to groupN. Some platforms (e.g. nrf or gd32) are already using
groupN. Documentation and API tests have been updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-01 07:39:08 -05:00
Gerard Marull-Paretas
5dc6ed3ce3 pinctrl: require ; after PINCTRL_DT_(INST_)DEFINE macros
The PINCTRL_DT_(INST_)DEFINE macros already defined the trailing ;,
making its usage inconsistent with other macros such as
DEVICE_DT_DEFINE.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-01 07:39:08 -05:00
Krzysztof Chruscinski
16bd0df2fd testsuite: ztest: Add framework for stress testing
Added framework for concurrency testing. Framework setup multiple
priority contexts and executes user handlers in that context. Test
terminates after certain number of repetitions or preemptions or
when timeout occurs. It can also be aborted by the user.

Framework can be used for testing resiliency to preemptions.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-01 07:37:22 -05:00
Gerard Marull-Paretas
770732fe92 doc: reference: drivers: update system drivers section
Update the system drivers section: remove references to
SYS_DEVICE_DEFINE, add references to the SYS_INIT() macro.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-24 20:59:10 -05:00
Andrzej Puzdrowski
8c6998c3a1 doc: note on the settings for the secure-domain
Added note for clarification on setting limitation
for secure/non-secure domains isolation.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-12-23 12:39:20 +01:00
Henrik Brix Andersen
f92542ecf3 drivers: can: deprecate the can_attach_workq() API call
Deprecate the can_attach_workq() API call.

This API is limited in its functionality (it does not work with
userspace, it uses one common buffer size for all work queue instances).

Similar functionality can easily be implemented using the
can_attach_msgq() API along with the generic triggered work API
(e.g. using k_work_poll_submit()).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-22 18:04:02 +01:00
Kevin Townsend
8dbf0f31f2 doc: guides: tfm: Add pages on test suites
Adds notes on how to run the two main test suites for TF-M using
the supplied sample applications.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2021-12-21 17:07:58 +01:00
Nicolas Pitre
faa0b2a848 net: introduce a network packet filter framework
This provides the infrastructure to create network packet filter rules
and to apply them to the RX and TX packet paths. Rules are made of
simple condition tests that can be linked together, creating a facility
similarly to the Linux iptables functionality.

A couple of generic and Ethernet-specific condition tests are also
provided.

Additional tests can be easily created on top of this.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-12-21 17:06:35 +01:00
Martí Bolívar
458ac71fe8 doc: development_process: splitting up commits is justified
Asking that a pull request restructure its commits is not
automatically an unjustified structural change. Remove it from the
list of unjustified changes. Commit structure is important for
maintaining bisectability.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-12-18 10:42:49 +01:00
Gerard Marull-Paretas
91b8abfb4d pm: device_runtime: suspend device on enable
The pm_device_runtime_enable did not suspend devices, so it assumed that
the device was in a physically suspended state. This change makes sure
that device is left in a suspended state if the device is initially
active.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-16 10:41:04 +01:00
Tom Burdick
0513b242d4 docs: Adds syscall tracing to tracing docs
Tracing guide in the docs was missing references to the added tracing
syscall macro hooks. This adds those.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-12-15 16:51:31 -05:00
Henrik Brix Andersen
d8dba3dafe doc: reference: include two levels of titles in the toc
The Zephyr API grouping can be a bit difficult to maneuver. Ease this up
a bit by expanding the table of contents to contain two levels of
titles.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-15 14:59:21 -05:00
Henrik Brix Andersen
cb296faa7d doc: reference: reword a few titles
Reword a few of the reference documentation titles to better fit in with
the rest.

Do not use all-caps MODBUS for title.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-15 14:59:21 -05:00
Anas Nashif
c5070dd06c twister: fix documentation of baud setting
Baud setting in the hardware map should not be enclosed by quotes.

Fixes #40450

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-12-15 14:09:49 -05:00
Flavio Ceolin
18b932f10d pm: device_runtime: Return possible error on enable
Change the function pm_device_runtime_enable() to return 0 on
success or an error code in case of error.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-12-14 19:23:05 -05:00
Bartosz Bilas
f8cd20fa3e doc: releases: add a note about ina23x driver changes
Let the people know that the property names have been changed
so compatibility will be broken in the v3.0 release.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2021-12-14 13:48:54 -06:00
Ederson de Souza
bdaac354f4 kernel: Bring back object tracking
When CONFIG_TRACING_OBJECT_TRACKING is enabled, the kernel will keep
lists of some objects (detailed below), so that debuggers or other tools
can keep track of them.

The lists of objects are:

struct k_timer *_track_list_k_timer;
struct k_mem_slab *_track_list_k_mem_slab;
struct k_sem *_track_list_k_sem;
struct k_mutex *_track_list_k_mutex;
struct k_stack *_track_list_k_stack;
struct k_msgq *_track_list_k_msgq;
struct k_mbox *_track_list_k_mbox;
struct k_pipe *_track_list_k_pipe;
struct k_queue *_track_list_k_queue;

Note that while CONFIG_TRACING is needed, one can always use
CONFIG_TRACE_NONE=y. Also, tracking will only be done for objects that
are also being traced (so, to prevent tracking of some type of object,
such as k_timer, just make CONFIG_TRACING_TIMER=n).

Some simple "sanity checking" tests are also added in this patch.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2021-12-14 07:42:31 -05:00
Lauren Murphy
c1711997bc debug: coredump: add xtensa coredump
Adds Xtensa as supported architecture for coredump. Fixes
a few typos in documentation, Kconfig and a C file. Dumps
minimal set of registers shown by 'info registers' in GDB
for the sample_controller and ESP32 SOCs. Updates tests.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-12-14 07:40:55 -05:00
Martí Bolívar
71f17bcbc2 doc: restore environment variables page
This was moved into the application development guide in commit
bf9ceac ("doc: move env_vars into application development").

That commit claimed the following rationale:

  No reason why we are duplicating this information in a standalone
  guide when we already talk about env variables in the application
  developer guide.

A github comment later says the duplication was in "Important build
system variables":

https://github.com/zephyrproject-rtos/zephyr/pull/34364#discussion_r616646517

This is incorrect and a misreading of the application development
guide.

The application development guide is talking about **cmake**
variables. These are not the same thing at all as **environment**
variables; treating them as if they are the same is simply wrong and
misleading, especially the "option 4" part that is really about
CMake variables, not environment variables.

In fact, the separate environment variables page was created for a
reason, which was to have a single place to explain to people unused
to managing their environment how things work, without cluttering
things up for people who already understand this.

There is nothing wrong with small, self-contained guides and in fact I
would argue they are a good thing.

Fix this confusing situation by restoring the original, separate page
and extricating the portions of it that are not related to environment
variables.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-12-14 13:28:20 +01:00
Alex Sergeev
6db75edc52 doc: gptp: Add nucleo_f767zi and nucleo_h745zi_q as supported boards
Add nucleo_f767zi and nucleo_h745zi_q as supported boards in
documentation.

Signed-off-by: Alex Sergeev <asergeev@carbonrobotics.com>
2021-12-13 22:19:25 -05:00
Andrzej Puzdrowski
15a9be674a release-note: mcuboot changes since v2.7.0
Sumary of main mcuboot's changes since v2.7.0

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-12-13 20:33:31 -05:00
Marek Pieta
32580c2b06 Bluetooth: host: Enable CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE
Storing CCC right after it's written reduces risk of inconsistency
of CCC values between bonded peers. The option should be enabled by
default. The developer could explicitly disable it to reduce memory
usage. After disabling the option explicitly, the developer is
aware of related potential issues.

Fixes: #40758

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2021-12-13 20:30:52 -05:00
Henrik Brix Andersen
33121983e9 doc: reference: promote the canbus subsystem documentation
Promote the Controller Area Network (CAN) subsystem reference
documentation from being part of the networking subsystem documentation
to having its own section.

The networking subsystem primarily deals with IP-based networking,
whereas CAN is a subsystem of its own.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-13 17:19:26 -05:00
Gerard Marull-Paretas
aceed99e2d doc: extensions: link-roles: hide stderr for git describe
Redirect stderr to DEVNULL when running `git describe --exact-match`.
This prevents messages like "fatal: No names found, cannot describe
anything." to be shown.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-10 16:48:43 -05:00
Gerard Marull-Paretas
204860857e doc: do not use any as default role
References should be maded using the appropriate role, e.g. :ref:,
:c:func:, :kconfig:, etc.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-10 16:43:34 -05:00
Gerard Marull-Paretas
459c3f918f doc: drop single quote references
Many documents relied on single quotes to create references, e.g.
`my_reference`. This is possible because `default_role = "any"` is
enabled in Sphinx conf.py. However, this method comes with its problems:

- It mixes all domains together, so it's not clear to what are you
  referencing: a document? a Kconfig option? a C function?...
- It creates inconsistencies: in some places explicit roles are used
  (e.g. :ref:`my_page`) while in some others not.
- _Conflictis_ with markdown. Single quotes are used for literals in
  Markdown, so people tend to use the same syntax in Sphinx, even though
  it has a different purpose.

Usages have been found using `git grep ' `[^`]*` ' -- **/*.rst`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-10 16:43:34 -05:00
Johann Fischer
b1356e969d include: usb: add iterable section in ram for usb_cfg_data
Add iterable section in ram for struct usb_cfg_data and
new makro USBD_DEFINE_CFG_DATA which should be used to
define usb_cfg_date structures.

Deprecate makro USBD_CFG_DATA_DEFINE.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 07:22:15 -06:00
Johann Fischer
5e07fabe0c doc: devicetree: add "zephyr,display" to chosen nodes table
Add "zephyr,display" to Zephyr-specific chosen nodes table.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Henrik Brix Andersen
f499559434 drivers: can: deprecate the use of CAN-specific error return values
Deprecate the use of CAN-specific error return values and replace them
with standard errno values.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-09 12:37:40 -05:00
Emil Gydesen
28d9b5428b doc: Fix typo for links to MAINTAINERS.yml
The file was referenced as MAINTAINERS.yaml instead of
MAINTAINERS.yml given invalid links.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-12-09 11:21:56 -06:00
Henrik Brix Andersen
e1ad3b2ab3 doc: guides: tfm: fix documentation build
Fix the TF-M requirements documentation build.

Fixes: ee001fa4bb

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-08 13:25:38 -06:00
Maksim Masalski
843ea97eac doc: add parasoft tool section to the coding guidelines page
Recently we started to use Parasoft Codescan Static Analysis tool
to fix MISRA violations and align code to follow our Coding Guidelines.
I started fixing violations, and adding suppression tages to fix
false-positive findings. Developers started to ask me, what I'm doing
here and where is the documentation page about that.

Add a new section describing violations fixing process using Parasoft
tool.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2021-12-07 19:45:33 -05:00
Martí Bolívar
fa41f4bb8f doc: update devicetree sections
Reflect the removal of BOARD.dts.pre.tmp in favor of zephyr.dts.pre in
SVG diagrams. Clean up adjacent text.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-12-07 13:39:37 -05:00
Jimmy Brisson
ee001fa4bb boards: Add mps3-an547-ns target; build mps3-an547 with TFM in secure mode
This includes a new device tree, new target yaml and new target
defconfig

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2021-12-07 10:44:23 -06:00
Daniel Leung
38c42f69d2 doc: gdbstub: add a simple example
Adds a simple example to demonstrate how to use GDB stub.

Fixes #39415

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-12-06 20:55:32 -05:00
Martí Bolívar
4d58ffe846 doc: release-notes: mention new cmake DT extensions
Mention some new devicetree helpers and changes to existing ones.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-12-06 08:01:48 -05:00
Gerard Marull-Paretas
05284cfe17 doc: style admonitions
Only certain type of admonitions were styled (e.g. notes, warnings,
etc.). This change also styles generic admonitions such as:

```rst
... admonition:: Rationale

    ...
```

Fixes #40622

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-03 13:20:27 +01:00
Henrik Brix Andersen
abbc89f026 boards: add support for integer board revisions
Add support for simple integer board revisions (1, 2, 3, ...).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-01 13:53:30 -06:00
Flavio Ceolin
31a911ecc2 doc: security: Remove unused image
zephyr-workflow is no longer used.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-12-01 05:03:59 -05:00
Flavio Ceolin
d21bfcae2e docs: security: s/JIRA/GitHub
Update vulnerability report / tracking information. Zephyr is no
longer using JIRA.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-12-01 05:03:59 -05:00
Daniel Leung
bdc812c15a doc: debug: expand documentation on gdbstub
This expands the documentation on GDB stub, and adding
hints on porting to new architectures.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-11-30 15:24:00 -05:00
Dominik Ermel
2a232bdee3 doc: releases: Note on MCUMGR SMP packet length calculation
The commit adds note on MCUMGR SMP over serial update that corrects
problem where CRC16 length was not added to a packet length.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-30 11:44:26 +01:00
Neil Armstrong
4a4272cefc doc: devicetree: add PCIe controller chosen property
Add a new chosen property to indentify the main PCIe Controller
node of the system.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-11-25 18:37:15 +01:00
Stephanos Ioannidis
f38a6dc43b doc: Update for Zephyr SDK 0.13.2
Update the Getting Started Guide to point to the Zephyr SDK 0.13.2
release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-11-25 06:58:45 -05:00
Anas Nashif
ca10f8b0a0 doc: replace buildkite with github actions
Update CI docs and the badge with links pointing to GH actions rather
than buildkite.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-11-24 12:37:30 -05:00
Lingao Meng
d6dbeaa560 doc: bluetooth/mesh: Add app_key_upd document
Add app_key_upd command documentation.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-11-23 13:08:45 +02:00
Lingao Meng
f37bc3c714 doc: bluetooth/mesh: Add net_key_upd document
Add net_key_upd command documentation.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-11-23 13:08:45 +02:00
Lingao Meng
2452c1e5ab doc: bluetooth/mesh: Add node_id document
Add node_id command documentation.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-11-23 13:08:45 +02:00
Lingao Meng
14fcacf2b8 doc: bluetooth/mesh: Add krp document
Add krp command documentation.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-11-23 13:08:45 +02:00
Lingao Meng
a02998912e doc: bluetooth/mesh: Add polltimeout_get document
Add polltimeout_get command documentation.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-11-23 13:08:45 +02:00
Lingao Meng
7db4b0a935 doc: bluetooth/mesh: Add mod_sub_del_all document
Add mod_sub_del_all command documentation.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-11-23 13:08:45 +02:00
Lingao Meng
2c824ba69a doc: bluetooth/mesh: Add mod_sub_ow_va document
Add mod_sub_ow_va command documentation.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-11-23 13:08:45 +02:00
Lingao Meng
c3fbcb5e6d doc: bluetooth/mesh: Add mod_sub_ow document
Add mod_sub_ow command documentation.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-11-23 13:08:45 +02:00
Lingao Meng
5e37f1ac9b doc: bluetooth/mesh: Add mod_pub_va document
Add mod_pub_va command documentation.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-11-23 13:08:45 +02:00
Bartosz Bilas
554296c1e1 doc: west: build-flash-debug: fix cmake arg example
The shorter version of --cmake argument should contain one dash only.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2021-11-22 23:04:30 -05:00
Øyvind Rønningstad
449cb60815 samples: Add TF-M sample for custom secure partitions
The sample implements a dummy ARoT (Application Root of Trust) partition
in TF-M and calls it from the app.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-22 22:19:41 -05:00
Dominik Ermel
e05c3d7a57 doc/guides/doc: Correct missed htmldocs
Correct missed htmldocs to html.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-11-22 11:19:38 -05:00
Pavel Vasilyev
70b0734b5e Bluetooth: Mesh: Add option to call update cb on every retransmission
A user may want to control message parameters (for example, delay
parameter) on every retransmission of a published message (for example,
see section 1.4.1 of the mesh model specification). This is essential
for lighting messages as time gap between messages retransmitted via
the publish-retransmit mechanism introduces unwanted jitter/pop-corn
when such retransmissions are received by a large 'group' of lights.

This commit adds an option to `struct bt_mesh_model_pub` to make the
access layer call `bt_mesh_model_pub.update` callback on every
retransmission. This also addes few macros and functions that can be
used for further calculations.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-11-22 11:52:56 +02:00
Michał Barnaś
d692062577 doc: remove incorrect info about sensor_value
After removing the "type" and "dval" members, the documenation still
referred to these fields. This commit removes the paragraph
about checking the type of values returned from sensor.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2021-11-19 20:08:12 -05:00
Tomasz Bursztyka
dd66bdadfa include/spi: Clarify spi_release() function behavior
It will unlock and unhold the CS line. Note that the lock and the CS
being hold on are 2 separate config bits, so if only one is selected
spi_release() will only apply on this configuration.

Note: this has been already the case in the controller drivers, where
there implementation of spi_release() calls
spi_context_unlock_unconditionally(). And that function always forces
the CS line to an inactive state.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-11-19 19:17:19 -05:00
Johann Fischer
fdcc104455 usb: remove Kconfig option USB_UART_CONSOLE
Since there are no more users and dependencies of
Kconfig option USB_UART_CONSOLE in the tree,
remove the remains and the option USB_UART_CONSOLE.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-11-18 14:29:18 +01:00
Martí Bolívar
46de74b8de doc: dts: clear up DTC_OVERLAY_FILE
Make it clearer that you can set it explicitly or the build system
will try to set it for you, and try to make it clearer what the build
system is doing when it tries to set it on your behalf.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-17 11:14:11 -05:00
Torsten Rasmussen
1594cd38b2 doc: zephyr build process description
Updated the Zephyr build process description to include description of
all Zephyr link stages.

It extends the guide with description of the intermediate binaries as
well as the post-processing of those binaries.
- Unfixed size binary
- Fixed size binary

Post-processing
- Partition alignment
- ISR table generation

Build stages images has been updated and new images showing the
post-processing stages of the intermediate binaries has been added.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-11-16 10:41:59 +01:00
Gerard Marull-Paretas
ffebac6578 tracing: improve Doxygen structure
- Add tracing to the subsys group
- Use `subsys_tracing` "namespace"
- Some minor header style improvements

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-15 10:12:56 -05:00
Christopher Friedt
80f73a053f doc kernel: atomics: support for 64-bit atomic operations
By redefining `atomic_t` as `long`, the type is 32-bit on
32-bit architectures and 64-bit on 64-bit architectures.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-11-15 09:59:01 -05:00
Gerard Marull-Paretas
392a0bee31 doc: guides: pm: system: improve some sentences
Improve some sentences to make them easier to understand.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
f51f5276b5 doc: reference: drivers: remove incorrect reference
The PM documentation does not provide any details on usage of
SYS_DEVICE_DEFINE, so remove the reference.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
a4d257f19b doc: guides: pm: device_runtime: new guide
Add a new and more extensive guide that describes the device runtime
API. It contains a brief introduction, API design principles and goals,
some example sequence diagrams and usage guidelines.

While the API still needs important additions, such a guide will
hopefully guide developers when trying to deal with device PM in Zephyr.

Note: sequence diagrams have been created using PlantUML (2021 version).
The rendered SVG diagrams embed the original code if they have to be
edited and re-rendered.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
40a94743a3 doc: guides: pm: device_runtime: remove outdated statement
The device runtime API does no longer use pm_device_state_set().

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
f28b57ff8d doc: guides: pm: system: fix DT bindings references
Use the :dtcompatible: role to refer to DT bindings.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
68db978fb2 doc: guides: pm: device_runtime: remove API definitions
The API is already rendered automatically by breathe, so do not manually
add definitions again.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
d1cb73a29c doc: guides: pm: device: remove API definitions
The API is already rendered automatically by breathe, so do not
duplicate it manually.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
51dfd38baa doc: guides: pm: system: simplify C references
- Remove duplicated information (e.g. enum list, available in the API
  docs)
- Use C domain to reference

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
f64a9c1aba doc: reference: pm: include all API and move to pm
Include all API groups (some where missing) and move to pm folder
instead of power_management for consistency.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
cfa56f2ecb doc: reference: pm: remove Kconfig list
Kconfig options will be listed as needed in the guidelines.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
4d6803383d doc: pm: split sections and move to guides
Splitted the PM reference document into smaller chunks (overview,
system, device and device_runtime). Moved this content to the guides
section, since the documentation intent is to provide general PM subsys
information and usage guidelines.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Gerard Marull-Paretas
11cf06f5d5 doc: reference: pm: move terms to glossary
Glossary is a place where all terms can be defined, so move them there.
Some terms have been slightly adjusted and SOC interface remove since it
was not much relevant.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-13 07:59:51 -05:00
Yasushi SHOJI
b48276e995 doc/application: Use tabs for Setting Variables
Setting variables for console is platform dependent.  Having
uninterested platform mixed in is too noisy and hard to read.  Follow
"Getting Started Guide" pattern to use tabs to group things.

Getting Started Guide uses "Ubuntu" to reference Linux based platform
but Application Development uses "Linux".  This commit doesn't change
the choice of words and sticks to "Linux".

The order of the platfroms is, OTOH, unified to "Linux/macOS" from
"macOS/Linux".

This commit only changes formatting, no wording change.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2021-11-12 21:34:29 -05:00
Filip Kokosinski
5980f89e54 doc/application: add a note about choosing emulator platform
New targets have been added that allow the user to choose a specific
emulator platform. Inform about this in the docs.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2021-11-12 21:33:42 -05:00
Joakim Andersson
ba85663a42 doc: Update TF-M documentation to match current TF-M version
Update TF-M documentation to match the current integrated TF-M version.
Include mention of the Platform secure partition that can be enabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-12 14:51:22 +01:00
Martí Bolívar
e3a008fb67 doc: release notes: BT FEM Kconfig removal
Document what happened to the FEM-related Bluetooth controller Kconfig
options.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-11 21:52:24 +01:00
Martí Bolívar
16eee907f4 doc: release notes: fix format
This file has some formatting issues, maybe due to some errors after
copy/pasting from the previous release. Fix them.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-11 21:52:24 +01:00
Gerard Marull-Paretas
2c3e12b597 doc: guides: smf: use graphviz extension
Diagrams were pre-rendered and code included at the end, however, it is
possible to use the Graphviz extension to render them directly. The
advantage is that diagrams follow pre-defined defaults, making them
consistent with the documentation style.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-10 13:54:46 -05:00
Torsten Rasmussen
1198087440 cmake: APPLICATION_CONFIG_DIR support implemented
With this commit a dedicated APPLICATION_CONFIG_DIR is added to the
Zephyr build system.

Currently, the APPLICATION_SOURCE_DIR is identical also the base
location of configuration files.

This is very practical for simple samples, but also has it limitations
for more complex setups.

Introducing a dedicated APPLICATION_CONFIG_DIR allows users more
customization options in Zephyr build system.
Especially in terms of custom build configuration files unknown to
Zephyr itself.

For example, instead of all configuration files being located directly
in the application source folder, a project might prefer to organize
their configuration files on a per board basis, for example:
<app>/boards/custom_board_A/prj.conf
<app>/boards/custom_board_A/app.overlay
<app>/boards/custom_board_A/custom_file.mine
<app>/boards/custom_board_B/prj.conf
<app>/boards/custom_board_B/app.overlay
<app>/boards/custom_board_B/custom_file.mine
...

instead of n-files located in the root of the sample.

If the user / sample specifies APPLICATION_CONFIG_DIR, then this folder
will always be used instead of the default configuration folder.

As part of this extension the behaviour of
`-DCONF_FILE=<relative-path>/prj_<build>.conf` and additional Kconfig
fragments automatic sourcing has been aligned with the default behavior
of `prj.conf`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-11-10 08:25:36 -05:00
Neil Armstrong
da512fd4d4 devicetree: add DT ranges public API
This adds the macro public API to handle the DT ranges properties.

This also updates the devicetree/api.rst documentation.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-11-10 08:23:00 -05:00
Neil Armstrong
053e54c2de devicetree: update DT_PROP_LEN documentation about ranges and dma-ranges
Like reg and interrupts, using DT_PROP_LEN doesn't make sense since
the ranges & dma-ranges block lengths and values depends on the DT
node #address-cells, #size-cells and parents #address-cells value.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-11-10 08:23:00 -05:00
Neil Armstrong
1fb263c9ba doc: document ranges generated macros in macros.bnf
This adds the DT ranges generated macros in the ABNF grammar file.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-11-10 08:23:00 -05:00
Johan Hedberg
50adc4b903 doc: Add __must_check to PREDEFINED
This helps avoid unnecessary warning from function and function pointer
declarations.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-11-09 22:21:23 +02:00
Emil Obalski
75c0f52cca usb: Add API for getting status of remote wakeup
This change adds a posibility to check the status of
remote wakeup feature.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2021-11-09 13:50:03 +01:00
Gerard Marull-Paretas
6d269fcedc doc: reference: api: overview: fix reference to pinctrl
A space between :ref: and the actual reference prevented the reference
to be rendered correctly.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-09 11:05:51 +01:00
Gerard Marull-Paretas
f6bff715a9 doc: guides: pinctrl: fix DT sample code
Pre-defined nodes need to be children of the pin controller device.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-09 11:05:51 +01:00
Christopher Friedt
918a574c88 clock: add k_cycle_get_64
This change adds `k_cycle_get_64()` on platforms that
support a 64-bit cycle counter.

The interface functions `arch_k_cycle_get_64()` and
`sys_clock_cycle_get_64()` are also introduced.

Fixes #39934

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-11-08 13:41:53 -05:00
Ingar Kulbrandstad
59d5ef1e24 Bluetooth: Mesh: Moved composition data out of mesh shell
The mesh shell module owns the composition data for the shell
application, which makes it impossible to use it outside of the
application itself. To support the shell as a generic debugging
component that can be added to any application, we have moved the
composition data out of shell.c, and into the application.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2021-11-08 11:07:11 -05:00
Gerard Marull-Paretas
9bea59a8c4 doc: doxygen: adjust titles
Adjust the project title and the home page to make the sidebar tree more
usable.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-08 11:17:37 +01:00
Gerard Marull-Paretas
96b2b931fe doc: doxygen: adjust Doxygen theme to match Sphinx better
Adjust the Doxygen theme (based on doxygen-awesome) to match the Sphinx
theme. While not perfect, the experience should now be more consistent.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-08 11:17:37 +01:00
Nikolai Kondrashov
194aa431c2 doc: bluetooth: Clarify BLE HW reqs are for Nordic
Make it clearer that the listed BLE controller hardware/peripheral
requirements concern the Nordic Semiconductor implementation only,
in the Bluetooth guide.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-08 10:41:26 +01:00
Henrik Brix Andersen
c817a09b0a canbus: rename zephyr,can-primary chosen property to zephyr,canbus
Rename the Zephyr chosen property for specifying the default CAN bus
controller from "zephyr,can-primary" to "zephyr,canbus".

The "zephyr,can-primary" property name was selected in antipation of
adding support for redundant CAN networks, which we have yet to
add. Meanwhile, the "primary" term causes confusion for non-redundant
CAN bus configurations (and the "can" term doesn't match the name of the
Zephyr CAN bus subsystem).

The CAN in Automation (CiA) 302-6, which deals with CANopen network
redundancy, uses the terms "default interface" and "redundant
interface". If/when we add support for redundant CAN networks, the
"zephyr,canbus" chosen property can be supplemented with a
"zephyr,canbus-redundant" chosen property.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-11-07 09:05:39 -05:00
Pavel Hübner
104714394f kernel: Introduce K_MEM_SLAB_DEFINE_STATIC
As the already existing macro K_MEM_SLAB_DEFINE results in
two variable definitions, the preceding static modifier leads to
a seemingly working solution, though linkage conflicts will occur
when the same memory slab name is used across multiple modules.

The new K_MEM_SLAB_DEFINE_STATIC macro duplicates the functionality of
K_MEM_SLAB_DEFINE with the difference that the static keywords are
internally prepended before both variable definitions.

The implementation has been tested on my Zephyr project (the build
issue faded out). The documentation has been updated altogether
with all incorrect occurences of static K_MEM_SLAB_DEFINE.

Signed-off-by: Pavel Hübner <pavel.hubner@hardwario.com>
2021-11-07 05:36:48 -05:00
Martí Bolívar
1ca60ab35f doc: dts: document multi-line property description policy
Document our policy regarding multi-line strings in devicetree
bindings which has been enforced starting with this PR:

https://github.com/zephyrproject-rtos/zephyr/pull/36189

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-07 05:35:21 -05:00
Sylvio Alves
1bd54d6f11 docs: remove deprecated I2C references
As from this PR, Zephyr has no I2C_X references
and this notes presented in the documentation
can be removed.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-05 14:07:09 -04:00
Martí Bolívar
612409d39d doc: west 0.12 docs
Update the documentation for this release.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-04 19:30:42 -04:00
Gerard Marull-Paretas
3b4515a6e9 doc: doxyfile: remove redundant predefinitions
PM related pre-definitions are not required, so remove them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 16:49:08 +01:00
Gerard Marull-Paretas
4daf285c8c pm: cleanup Doxygen groups and inclusion
- Add a new `subsys_pm` group, part of `subsys`
- Improve group naming
- Include conditional code using __DOXYGEN__, it allows to have better
  control of inclusion.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 16:49:08 +01:00
Gerard Marull-Paretas
c8814f639e doc: doxygen: add group definition file
Add an external group definition file. It can be used to create high
level group for things like subsystems, as there is no header such as
"subsys.h" where these type of logical groups can be defined.

This approach is followed by projects such as pipewire to organize
Doxygen modules.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 16:49:08 +01:00
Martí Bolívar
ffa0c52552 doc: cmake package: remove stale cmake version lines
This page is meant to document the behavior of the Zephyr cmake
package. However, its example CMake snippets contain some stale
references to a minimum version (3.13.1, now 3.20).

These lines are a bit of a distraction anyway, so just remove them.
They matter in general, but they don't matter where the Zephyr cmake
package is concerned.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-04 12:09:58 +01:00
Gerard Marull-Paretas
03b470c74e doc: doxyfile: update to 1.9.2
File updated automatically by running `doxygen -u zephyr.doxyfile.in`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 09:57:01 +01:00
Gerard Marull-Paretas
b1a12cc454 doc: doxygen: update to doxygen-awesome 1.6.1
The new template fixes issues when using latest Doxygen version (1.9.2).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 09:57:01 +01:00
Gerard Marull-Paretas
ede1d5f4f6 doc: reference: power_management: adjust PM callback docs
Documentation was not up-to-date, still referencing pm_control.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 20:27:18 -04:00
Gerard Marull-Paretas
1cee284a46 pm: device: runtime: use pm_device_runtime* namespace
Move all PM device runtime API calls from pm_device* to the
pm_device_runtime* namespace.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Gerard Marull-Paretas
e3fece5241 pm: device: runtime: remove pm_device_wait
After the removal of pm_device_get_async, the pm_device_wait API has
become redundant. Its usage after pm_device_put_async should not be
considered a valid usecase, since after that call what will happen is a
pm_device_get (which is blocking).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Gerard Marull-Paretas
30d217aa28 pm: device: runtime: remove pm_device_get_async
As of today there is no clear usage of asynchronous gets, since in
general, a resume operation should be synchronous (we are about to use
the device immediately after resuming it). Removing this API simplifies
the runtime implementation in a significant way (refer to future
commits).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Yasushi SHOJI
27c79d2fd6 doc: application: Explain Zephyr application CMakeLists.txt
Add descriptions for each line in application's CMakeLists.txt.  Since
this is the first time a new user is exposed to Zephyr applications
CMakeLists.txt, it's a good time to explain why each line exists.

The descriptions must be for both new Zephyr developers with or
without CMake knowledge.

This commit also moves the comment lines from CMakeLists.txt to the
descriptions to make the file simpler.

ref. #39014

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Co-authored-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-11-03 15:06:11 +01:00
Gerard Marull-Paretas
b4f968cf9d doc: add a toctree with reference material
Add a new toctree with reference material, including:

- API docs (Doxygen)
- Kconfig options
- Devicetree bindings

Note that the toctree is rendered manually due to the limitations Sphinx
has when it comes to including relative URLs. Hardcoding absolute URLs
in toctrees is possible, but that means we'd need to update the toctree
on every release (to point to /version/ URL), and downstream users of
the documentation would have to manually patch the toctree with their
own URL. In order to make local builds work, version prefix is only
added if publish tag is provided.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-02 13:24:40 +01:00
Nikolai Kondrashov
6d6c441069 doc: bluetooth: List BLE controller HW reqs
Add a list of hardware/peripheral requirements of the BLE controller.

Co-authored-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-02 10:46:00 +01:00
Nikolai Kondrashov
1b4e364977 doc: bluetooth: Spell out BLE per Bluetooth SIG
Spell out BLE fully in the Bluetooth Architecture guide, since Bluetooth
SIG does not use the abbreviation.

Co-authored-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-02 10:46:00 +01:00
Nikolai Kondrashov
6609a75f78 doc: bluetooth: Hyphenate adjectives before nouns
Hyphenate multi-word adjectives (compound modifiers) before nouns on the
Bluetooth Architecture guide page. This makes the sentence a little
easier to read.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-02 10:46:00 +01:00
Nikolai Kondrashov
6d8fd96a2f doc: threads: Use plural for SSE registers
Use plural when referring to SSE registers (as in previous sentence) in
documentation of K_SSE_REGS thread option.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-02 10:46:00 +01:00
Joakim Andersson
dda3a5ad0d modules: tfm: Split trusted-firmware-m repository
Split the zephyr project maintained repository trusted-firmware-m into
forks of the individual upstream repositories.

https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
Upstream: TF-Mv1.4.1
Additions:
zephyr: module: Add zephyr module file
trusted-firmware-m: platform: lpcxpresso55s69: Update SDK

https://git.trustedfirmware.org/TF-M/tf-m-tests.git
Upstream: 51ff2bdfae043f6dd0813b000d928c4bda172660
Additions:
zephyr: module: Add module file for tf-m-tests

https://github.com/ARM-software/psa-arch-tests.git
Upstream: 60faad2ead1b967ec8e73accd793d3ed0e5c56bd
Additions:
zephyr: module: Add module file for psa-arch-tests
psa-arch-tests: Allow overriding of toolchain file

The organization of folders remain the same with the following
exceptions:
Moved:
root folder moved from modules/tee/tfm to modules/tee/tf-m to avoid
problems with west update.
zephyr/module.yml to trusted-firmware-m/zephyr/module.yml and
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR} points to what was previously
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/trusted-firmware-m.
Added:
psa-arch-tests/zephyr/module.yml and ${ZEPHYR_PSA_ARCH_TESTS_MODULE_DIR}
tf-m-tests/zephyr/module/ and ${ZEPHYR_TF_M_TESTS_MODULE_DIR}
Removed:
init-git.sh
README.rst

Fixes: #39353

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-01 11:20:06 -04:00
Joakim Andersson
8c09cd374f modules: trusted-firmware-m: Use module location variable for .pem keys
Use the zephyr module dir variable for the trusted-firmware-m root
folder. Update documentation to TF-M documentation in
tfm-secure-boot.rst.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-01 11:20:06 -04:00
Gerard Marull-Paretas
33380d7cc6 doc: guides: test: ztest: fix Sphinx usage
Sphinx was not used properly in a few places:

- Usage of single ` for literals
- Incomplete C domain references (missing :c:)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-29 10:11:35 -04:00
Yuval Peress
5a39a73c4e doc: ztest: Update documentation for register
Add documentation that details the ability to register test suites and
execute them based on a pragma function. Also the auto-generated
test_main() function.

Signed-off-by: Yuval Peress <peress@chromium.org>
2021-10-28 16:57:51 -04:00
Gerard Marull-Paretas
92b338e239 pm: remove deprecated Kconfig options
SYS_POWER_MANAGEMENT and DEVICE_POWER_MANAGEMENT were deprecated in
2.5.0, remove them now.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-28 13:00:13 +02:00
Carlo Caione
1976f33e87 drivers: mbox: Introduce MBOX driver class
One limitation of the current IPM API is that it is assuming that the
hardware is only exporting one single channel through which the data can
be sent or signalling can happen.

If the hardware supports multiple channels, the IPM device must be
instantiated (possibly in the DT) several times, one for each channel to
be able to send data through multiple channels using the same hw
peripheral. Also in the current IPM API only one callback can be
registered, that means that only one driver is controlling all the
signalling happening on all the channels.

This patch is introducing a new MBOX API that is supporting
multi-channel signalling and data exachange leveraging and extending the
previous (and outdated) IPM API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-27 18:27:21 +02:00
Gerard Marull-Paretas
569b794d4b doc: extensions: vcs_link: only run for HTML builder
The vcs_link should only run for the HTML builder, since it is the only
target of this extension. The other builders do not have the templates
instance, making them fail.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-26 18:01:32 -04:00
Flavio Ceolin
9239fd4a90 pm: device: Simplify device pm states
As discussed in issues/38619, this commit aims to simplify device
power management. It was removed PM_DEVICE_SATE_LOW_POWER.
The power subsystem now doesn't need to figure out which device state to
use of a given system power state. It just suspend and resume devices.

Devices now just need to respond to ACTIVE and SUSPEND and OFF actions
and they are free to use any particular substate they have when the
subsystem asks to suspend. They also don't need to worry about states
transitions (unless they have multiple substates) because the system
will just request them to suspend if they are active and vice-versa.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

rebase
2021-10-26 15:02:15 -05:00
Gerard Marull-Paretas
fe7529f917 doc: enable vcs_link extension
Enable the vcs_link extension so that pages contain "Open on Github"
link at the top.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-26 17:00:56 +02:00
Gerard Marull-Paretas
1e79096d9a doc: extensions: add vcs_link
Add vcs_link extension. The extension can be used to obtain VCS (Git)
URLs for given Sphinx documents.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-26 17:00:56 +02:00
Gerard Marull-Paretas
8b3f23eddc doc: fix dark-mode-toggle style
- Use designated CSS parts to style the toggle properly
- Use breadcrumbs_aside block to render dark mode toggle

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-26 17:00:56 +02:00
Gerard Marull-Paretas
838380bb63 doc: fix C domain reference usage
THis patch fixes multiple issues when referencing to the C domain. In
some cases there were typos (e.g. missing :), in some others no domain
syntax was used for referencing, etc.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-26 10:57:45 +02:00
Gerard Marull-Paretas
3486fd831e doc: guides: add pinctrl guide
Add a user guide that provides general concepts on pin control, details
on Zephyr model, implementation guidelines, etc.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-25 15:26:47 -05:00
Gerard Marull-Paretas
4516117e9f doc: enable figures enumeration
Enable figures enumeration. This option allows to use :numref: in order
to reference figures, thus allowing more precise references other than
"the figure below" or similar.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-25 15:26:47 -05:00
Gerard Marull-Paretas
ea1f7b7184 doc: reference: add pinctrl API
Add pinctrl API documentation to the reference guides.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-25 15:26:47 -05:00
Gerard Marull-Paretas
5c616910d5 doc: doxygen: add Doxygen predefined macro
A pre-defined Doxygen macro allows for better control of what is
included in the final documentation than maintaining a long list of
CONFIG_* entries.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-25 15:26:47 -05:00
Torsten Rasmussen
f17630ba75 doc: application: added description of WARN_EXPERIMENTAL setting
This commit adds description of the `WARN_EXPERIMENTAL` Kconfig setting
to the application development guide.

It describes the use of `CONFIG_WARN_EXPERIMENTAL` along with an
example of the warning output when experimental features are enabled.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-10-22 13:59:21 +02:00
Peter Mitsis
1d8c1162c7 doc: Fix K_EVENT_DEFINE macro code-block example
Fixes the code-block example for K_EVENT_DEFINE() documentation
to show that it only takes one argument instead of three.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-20 17:44:12 -04:00
Martí Bolívar
8882467b53 dts: rules for bindings
Capture some general rules for writing bindings that we've been
enforcing in review but could use better documentation for.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-20 07:21:39 -04:00
Gerard Marull-Paretas
d7b7bb1e75 doc: drop 2.2.0 version
Drop the 2.2.0 version entry so that its link is removed from the docs
drop-down list.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-19 12:08:04 -04:00
Gerard Marull-Paretas
9130455677 doc: add 2.7.0 release to versions list
Add 2.7.0 to the version list so that a link to it is created on the
documentation drop-down list.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-19 12:08:04 -04:00
Christopher Friedt
89e701db97 doc: release: 2.7: add list of closed issues
This change adds the list of closed issue as per the release
process.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-18 09:34:19 -04:00
Christopher Friedt
b706316491 doc: release: 2.7: summarize major enhancements
This change adds a summary of major enhancements introduced
in v2.7.0 . There were so many it was difficult to narrow
them down!

Great work everyone!

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-16 06:33:17 -04:00
Peter Mitsis
3ff549d1a2 doc: events: Add events documention
Adds documentation for event objects. Events are posted to event
objects. Threads may wait on an event object for a specified set
of events.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-16 06:27:10 -04:00
Alexander Wachter
0d97caffe6 doc: release-notes-2.7: Added CAN release notes
This commit adds the CAN specific release-notes for the 2.7
release.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-10-15 09:20:33 -04:00
Christopher Friedt
1ba74c8acc doc: release: 2.7: dns-sd service type enumeration
Added release note for DNS-SD Services Type Enumeration

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-15 09:15:07 -04:00
Christopher Friedt
c4b457ba2a doc: release: 2.7: remove duplicate IPM entry
Remove duplicate IPM entry.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-15 09:15:07 -04:00
Christopher Friedt
3f76fbdda2 Revert "doc: release: 2.7: remove duplicate IPM entry"
This reverts commit fd5328d33a.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-15 09:15:07 -04:00
Christopher Friedt
2b9c484411 Revert "doc: release: 2.7: dns-sd service type enumeration"
This reverts commit 7fc77d906d.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-15 09:15:07 -04:00
Dennis Ruffer
c714c78743 twister: Allow baud rates other than 115200
Fixes #38046
Document the changes in twister.rst
Add baud rate to debug message in twister
Add baud parameter to twister's add_device function
Set the twister baud rate from input parameters
Use 115200 as the default baud rate if not specified
Add baud to the hwmap-schema.yaml file
Add --device-serial-baud to twister arguments
Fix compliance issues
Fix mistake in parameter name from device-baud to device-serial-baud
Refactoring of the code in orded to simplify the logic
   and clear multiple definitions of the default baud rate.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Signed-off-by: Dennis Ruffer <daruffer@gmail.com>
2021-10-14 16:35:48 -04:00
Christopher Friedt
7fc77d906d doc: release: 2.7: dns-sd service type enumeration
Added release note for DNS-SD Services Type Enumeration

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-14 11:11:16 -04:00
Christopher Friedt
fd5328d33a doc: release: 2.7: remove duplicate IPM entry
Remove duplicate IPM entry.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-14 11:11:16 -04:00
Torsten Rasmussen
64442501f6 doc: updated occurrences of GNU ARM Embedded to GNU Arm Embedded
Updated the doc to use GNU Arm Embedded which is the correct term
according to the official Arm documentation at the time of this commit.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-10-14 12:56:35 +02:00
Torsten Rasmussen
9bc9ae9905 doc: Arm Compiler 6 description added to the 3rd party toolchain page
This commit adds description on how to use the Arm Compiler 6 / armclang
toolchain with Zephyr.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-10-14 12:56:35 +02:00
Carlo Caione
42105ed882 dts: Add support for specifier-space property.
Currently all the *-names and *-cells properties are derived from the
name of the base <name>s property. This is a limitation because:

- It forces the base property name to be plural ending in -s
- It doesn't allow the english exception of plural words ending in -es

With this patch we add one additional property 'specifier-space' that
can be used to explicitly specify the base property name.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Suggested-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-13 09:56:46 -05:00
Robert Lubos
875c75c4f9 net: lwm2m: Replace float32_value_t with double
Replace the custom float32_value_t LwM2M type with native double, to
facilitate LwM2M API and improve floating point precission.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-10-13 10:13:32 -04:00
Keith Short
fbf39f2d7e templates: Create GitHub nomination template
Create a template for nominating GitHub users for an elevated
permission levels. Update the TSC Project Roles page to reference the
nomination template and add clarity to the GitHub permissions allowed at
each level.

Signed-off-by: Keith Short <keithshort@google.com>
2021-10-13 07:15:28 -04:00
Martí Bolívar
397edd1e01 doc: autopts-linux: fix GSG reference
Commit 3f6737f688
("doc: autopts: Remove duplication of getting started guide") removed
duplicated text by linking to the getting started guide.

However, the link format is not correct. It is using a link to the
latest upstream Zephyr getting started guide. This has two problems:

  1. It will link to the wrong document when the autopts guide
     is part of an official release documentation. For example,
     the Zephyr 3.0 release documentation HTML page for these
     docs will be linking to the main branch GSG, not the v3.0
     getting started guide. This combination will not be correct
     in general because dependencies change.

  2. It breaks downstream distributions which bundle their own
     versions of the Zephyr documentation as well, for similar
     reasons.

The two documents are part of the same Sphinx docset, so the right way
to do this is with :ref. Fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-13 06:16:24 -04:00
Bradley Bolen
bbba0a1ded doc: release: 2.7: Add release note for aarch32
Mention the addition of MPU support for Cortex-R.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2021-10-12 09:00:58 -04:00
David Leach
c843752eba doc: release: 2.7: Add NXP SoC changes
Documents significant changes to NXP SoC platforms in the
2.7.0 release.

Signed-off-by: David Leach <david.leach@nxp.com>
2021-10-12 08:59:44 -04:00
Carlo Caione
43cb00df08 multi_heap: Introduce shared multi-heap memory pool manager
The shared multi-heap memory pool manager uses the multi-heap allocator
to manage a set of reserved memory regions with different capabilities /
attributes (cacheable, non-cacheable, etc...) defined in the DT.

The user can request allocation from the shared pool specifying the
capability / attribute of interest for the memory (cacheable /
non-cacheable memory, etc...)

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-12 07:44:46 -04:00
Krzysztof Chruscinski
863600cd0e doc: releases: Add note about UART Asynchronous API change
Added note to release notes about timeout units used in
uart_tx and uart_rx_enable.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-10-12 12:26:56 +02:00
Andrzej Głąbek
c6e55d46de doc: release: Add release notes for ADC, DMIC, I2S, and PWM drivers
Update v2.7 release notes with entries for added ADC, DMIC, I2S,
and PWM drivers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-10-11 15:37:49 -05:00
Flavio Ceolin
76702e8ff3 doc: release: 2.7: add release notes for PM
Update V2.7.0 release notes document with noticeable changes
related to power management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-07 17:35:56 -04:00
Krzysztof Chruscinski
3f6f3325a8 doc: add draft for 3.0 release notes
Add draft for the Zephyr v3.0.0 release notes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-10-07 15:44:00 -04:00
Magdalena Kasenberg
3f6737f688 doc: autopts: Remove duplication of getting started guide
and highlight only the differences in setup instead.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2021-10-07 15:43:03 -04:00
Gerard Marull-Paretas
a42ee8bd04 doc: doxygen: add version and shorten brief
Render Zephyr version in both, standalone Doxygen build and Sphinx
controlled build. In standalone mode, the package version given by
find_package(Zephyr...) is used, while in Sphinx build the conf.py
version is used.

The project brief has been shortened to make project title more compact
while still containing relevant information.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-07 11:54:23 -04:00
Gerard Marull-Paretas
77fc2458a0 doc: doxygen: use Zephyr branding colors
Use Zephyr branding colors for the doxygen-awesome theme.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-07 11:54:23 -04:00
Gerard Marull-Paretas
c78dda8d7b doc: doxygen: use doxygen-awesome theme
Use the doxygen-awesome theme to improve the look and feel of the
Doxygen API documentation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-07 11:54:23 -04:00
Gerard Marull-Paretas
5c5f7bb7d2 doc: doxyfile: upgrade to 1.9.1
Doxyfile has been upgraded using `doxygen -u doc/zephyr.doxyfile.in`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-07 11:54:23 -04:00
Martí Bolívar
650f8fc743 doc: document new submanifests folder
Add a reference to the README and the folder itself from the modules
page. This is a more permanent alternative to using
ZEPHYR_EXTRA_MODULES for west users, so it logically belongs here.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-07 13:45:42 +02:00
Maureen Helm
1453f25a5f doc: release: Add sensor release notes for v2.7.0
Documents significant changes to sensor drivers in the v2.7.0 release,
including new drivers added and existing drivers modified.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-07 07:00:21 -04:00
Flavio Ceolin
045c4bbf72 doc: release: 2.7: add release notes for security
Update V2.7.0 release notes document with vulnerabilities fixes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
Flavio Ceolin
f7b320a7c3 doc: security: Update information about CVE-2021-3436
Update old CVE the proper information.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
Flavio Ceolin
6c488c8556 doc: security: Update information about CVE-2021-3510
Update old CVE the proper information.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
Flavio Ceolin
613b38c24b doc: security: Update information about CVE-2021-3625
Update CVE that left embargo with the proper information.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
Flavio Ceolin
879438a424 doc: security: Update information about CVE-2021-3319
Update old CVE the proper information.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
Flavio Ceolin
bb5b5fe544 doc: security: Update information about CVE-2021-3581
Update CVE that left embargo with the proper information.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
Benedikt Schmidt
6e7f93a5a3 docs: Improve documentation of bootloader usage
Describes the necessity to specify the code partition as the chosen one.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2021-10-06 09:28:28 -04:00
Evgeniy Paltsev
e709c492b5 doc: release notes: ARC
2.7 release notes for ARC related changes

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-06 09:26:57 -04:00
Evgeniy Paltsev
b465a72244 DOC: ARC: update arc status page
We support ARCv3 HS6x SMP systems now - let's update the
status in the documentation.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-06 09:26:57 -04:00
Johann Fischer
02f095eb9b doc: release-notes-2.7: add release notes for MODBUS
Add release notes for MODBUS.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:29 +02:00
Johann Fischer
7042e0635c doc: release-notes-2.7: update release notes for disk drivers
Update release notes for disk drivers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:29 +02:00
Johann Fischer
a09c84c2a1 doc: release-notes-2.7: add release notes for USB
Add release notes for USB.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Johann Fischer
a9442e5e20 doc: usb: add CDC ACM device support documentation
Add CDC ACM device support documentation.

Co-authored-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Johann Fischer
fb454d09bb doc: usb: refactor USB device support documentation structure
Move related areas to their own files and order
documentation logically from lower to upper layer.
Fix gross errors and inconsistencies.

Co-authored-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Carles Cufi
a35cc75c14 doc: release notes: Add Bluetooth relnotes for 2.7.0
I have excluded most fixes from this release notes, since it is
difficult to identify those that are worth documenting. Intead I have
focused on new features and major refactoring.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-10-05 19:11:48 -04:00
Sam Hurst
cb4785542e lib: smf: Add State Machine Framework
Add an application agnostic State Machine Framework library to
Zephyr that provides an easy way for developers to integrate
state machines into their application.

Twister passed:
twister -T tests/lib/smf/

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2021-10-04 20:33:11 -04:00
Lauren Murphy
a6dcf333a1 doc: misc fixes
Makes miscellaneous fixes to kernel and usermode documentation,
such as fixing broken links and adding clarifying wording.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-10-04 16:42:08 -04:00
Martí Bolívar
12351cb391 doc: devicetree release notes for 2.7
There's enough meat here to split the content up into areas:
devicetree.h itself, Python tooling changes, and bindings changes.

I also reworked the section describing vendor prefix fixes to use a
table, which I find more readable on a second pass through it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-02 20:00:28 -04:00
Andy Ross
a8f02ed5ee doc: lib/os: Add overview docs for sys_multi_heap
Add a short section to the "heap" page detailing the new
sys_multi_heap utility.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-10-01 20:38:35 -04:00
Torsten Rasmussen
0455d268df devicetree: remove support for DTC_OVERLAY_FILE in environment
Setting of DTC_OVERLAY_FILE as an environment setting was deprecated
before Zephyr 1.14 LTS.

This commit remove the support for this possibility and thus cleans up
the build system.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-10-01 14:42:42 -04:00
Erwan Gouriou
ed1d1966e7 doc: release notes: Shields updates for v2.7.0
Update V2.7.0 release notes document with noticeable changes
related to shields.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-01 11:07:33 -04:00
Erwan Gouriou
5a57bd02f7 doc: release notes: STM32 updates for v2.7.0
Update V2.7.0 release notes document with noticeable changes
related to STM32.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-01 11:07:33 -04:00
Daniel Leung
acc10fab60 doc: release: 2.7: add release notes for IPM
Add release notes for IPM drivers based on commit history.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-10-01 10:33:46 -04:00
Daniel Leung
fe263f9f9e doc: release: 2.7: add release notes for PCI/PCIe
Add release notes for PCI/PCIe based on commit history.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-10-01 10:33:31 -04:00
Daniel Leung
3eb85f5cf2 doc: release: 2.7: add release notes for serial
Add release notes for serial/UART drivers based on commit
history.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-10-01 10:33:08 -04:00
Peter Mitsis
0153b7dc50 doc: Add deadline scheduling information
Adds information to the kernel scheduling documentation explaining
how a thread's deadline is used to determine the thread's relative
priority.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-09-30 17:01:09 -04:00
Robert Lubos
4a2665c284 doc: release: 2.7: Add release notes for networking
Add networking relase notes based on commit history, for commits
including "net" phrase in the title.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-09-29 08:16:02 -04:00
Markus Fuchs
643242423b doc: release: Add note about multicast monitor's new IPv4 support
Add release note about multicast group join/leave monitor API change.

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2021-09-28 20:04:49 -04:00
Robert Lubos
7abc68d432 doc: net: Remove obsolete note about sockets thread-safety status
The socket API was updated with mutex protection, however this
was not reflected in the documentation. Remove the obsolete note on the
thread-safety status of the socket API, to prevent confusion.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-09-27 10:25:59 -04:00
Gerard Marull-Paretas
b4b1212c21 doc: release notes: add details on device PM changes
Add some details on the changes made in the device power management area
(callback simplification).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-09-27 10:07:26 -04:00
Gerson Fernando Budke
a60ce93042 doc: release: 2.7: Add note about risc-v
Add risc-v general notes related to cpu bindings and ITCM/DTCM cache
linker support.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-09-26 21:46:28 -04:00
Gerson Fernando Budke
607e2cbae4 doc: release: 2.7: Add note about modem
Added modem gsm_ppp changes.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-09-26 21:46:28 -04:00
Gerson Fernando Budke
e142f4d908 doc: release: 2.7: Add note about west openocd runner
Added OpenOCD note related to zephyr thread awareness.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-09-26 21:46:28 -04:00
Gerson Fernando Budke
cda4eebdf0 doc: release: 2.7: Add notes about Atmel related changes
Add 2.7.0 release notes for Atmel SoCs, drivers and boards.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-09-26 21:46:28 -04:00
Gerson Fernando Budke
b54e7bfe0d doc: release: 2.7: Add notes about Cypress related changes
Add 2.7.0 release notes for Cypress SoCs and board.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-09-26 21:46:28 -04:00
Lauren Murphy
7ab16c457b doc: update coding guidelines compliance stages
Updates wording in Coding Guidelines page to remove outdated timelines
and correct the criteria for each stage. Changes reflect that we are
in stage 1 and will not reach stage 2 until the CI for enforcing
coding guidelines has been established.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-09-24 17:14:48 -04:00
Carles Cufi
611284021c doc: relnotes: Add a comment to the Bluetooth 2.6 release notes
The Zephyr 2.6 release notes, in the Bluetooth section, refers the user
to a commit message which had a couple of typos in it. Clarify this in
the very release notes.

Fixes #36692.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-23 13:26:19 -04:00
Kumar Gala
7db3dfd414 docs: Update for SDK 0.13.1
Update docs to reference SDK 0.13.1.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-09-21 13:03:02 -04:00
Carles Cufi
947b38ac0a Bluetooth: controller: Replace slave with peripheral
Replace the old slave term with the new peripheral
one from the Bluetooth spec v5.3.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-21 13:01:29 +02:00
Carles Cufi
b8770acc28 Bluetooth: host: Align with terms in v5.3 spec
Align with the new inclusive naming terms in the v5.3 spec in the
Bluetooth Host implementation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-20 20:01:32 +02:00
Carles Cufi
1325edff48 Bluetooth: hci: Align terms with the Bluetooth v5.3 spec
The new inclusive naming terminology changes in v5.3 of the Bluetooth
specification affect the HCI layer, so apply all relevant changes to
align with it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-17 16:05:01 +02:00
Carles Cufi
9454b871c4 doc: release notes: Fix typo in 2.7 release notes
It's "PERIPHERAL" not "PERIPHAL".

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-17 16:05:01 +02:00
Carles Cufi
6de4747979 Bluetooth: Update terms in public API to spec v5.3
The Bluetooth Core Specification, version 5.3, has introduced multiple
changes to several widely-used terms in order to make them inclusive.
Update the public API to reflect this, excluding hci.h, which will be
done in a subsequent commit.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-15 14:02:50 +03:00
Aleksander Wasaznik
fbe7699c82 Bluetooth: Host: Doc fixup for rename of BT_SECURITY_L*
BT_SECURITY_LOW and etc. were previously renamed and are no longer
valid.

The original rename is in the following commits:
1c48757d94 (New names, deprecate old)
5f2a9ba8e4 (Remove deprecated names)

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemiconductor.no>
2021-09-13 11:56:21 -04:00
Anas Nashif
4ffb90f202 doc: pm: rework main documentation
Minor edits and remove old terminology of central and distributed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-09-09 08:06:36 -04:00
Anas Nashif
f4cf104e59 doc: power management: remove mention of tickless-idle
Tickless Idle was removed, so remove this last mention of it in the
docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-09-09 08:06:36 -04:00
Christian Taedcke
7c564c466e doc: mcumgr: Mention udp in the transport overview
The overview at the top of the page only listed ble and serial as
available transports. This commit adds udp to this list.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2021-09-08 17:57:56 -05:00
Magdalena Kasenberg
35d5443387 doc: Bluetooth: Update ICSes to 8.0.3
This patch updates the ICSes to PTS 8.0.3

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2021-09-07 14:52:23 +02:00
Carles Cufi
6310a5de1c doc: Document the switch from Slack to Discord
After the Technical Steering Committee decided to approve the transition
from Slack to Discord, it is necessary to update all the documentation
to reflect this change.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-03 08:11:15 -04:00
Nikolai Kondrashov
77ee1f02aa doc: Fix a few typos in docs/comments/messages
Fix two typos in documentation, one in a sample's comment, and one in a
sample's console message. Found while learning Zephyr and exploring the
sources.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-09-03 06:06:59 -04:00
Nicholas Lowell
cc8ab95760 tracing: Add user-definable tracing interface
Create a new tracing option TRACING_USER that allows
the user to define certain user_sys_trace_... functions
to perform whatever work desired for tracing when
tasks are swiched in/out, during isr enter/exit, and when
cpu is idle.

This infrastructure can be useful for plugging into
locally defined tracing tools or any user-specific
debugging environment.

Signed-off-by: Nicholas Lowell <nlowell@lexmark.com>
2021-09-02 06:54:35 -04:00
Torsten Rasmussen
36bb00d1f5 armclang: ARM Compiler C library support
Support for ARM Compiler C library.

This commit add support for the ARM Compiler C libary in:
- Kconfig
- libc/armstdc

A new Kconfig symbol is added to allow a toolchain to specify if they
support linking with the minimal C library.
Also the CMake variable `TOOLCHAIN_HAS_NEWLIB` is exported to Kconfig
so that CONFIG_NEWLIB_LIBS can only be enabled if the toolchain has
newlib.

The armclang toolchain selects the CMake scatter file generator and
disables support for the LD linker template which is not supported by
armlink.

For the ARM Compiler C library, a corresponding lib/libc/armstc/ folder
with a minimal implementation to work with the ARM Compiler C library
is added.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-30 08:54:23 -04:00
Flavio Ceolin
d9d5c41294 pm: device: Remove transitional states
PM_DEVICE_STATE_RESUMING and PM_DEVICE_STATE_SUSPENDING
are transitional states and are only used in device runtime. Remove it
and use device flag to keep track of a transition.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-27 17:47:10 -04:00
Arvin Farahmand
419b103dd6 drivers: Add mdio API
This commit adds support for MDIO bus. The bus is used by Ethernet
MACs to communicate with PHYs.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-08-27 11:43:48 -04:00
Danny Oerndrup
e3ab68ff1a toolchain: doc: Custom toolchain doc updated for other.h requirement
Added missing toolchain name to path for generic.cmake and target.cmake.

Added section explaining the need for, and the use of, the
toolchain/other.h header file.

Signed-off-by: Danny Oerndrup <daor@demant.com>
2021-08-26 09:28:19 -04:00
Torsten Rasmussen
892310863d doc: modules guide updated with Zephyr CMake lists description
This commit extends the `Build system integration` section in the Zephyr
modules guide with a description on how a module may append additional
values to Zephyr CMake lists.

This is useful for modules that might need to append values to the
`SYSCALL_INCLUDE_DIRS` list.

This commit is followup to the discussion found in:
https://github.com/zephyrproject-rtos/zephyr/pull/33756

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2021-08-25 22:07:34 -04:00
Flavio Ceolin
c42cde5b69 kernel: work_q: Fix k_work_queue_start documentation
Inform that the queue has to be initialized in zeroed memory or with
the k_work_queue_init before use.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-25 22:07:04 -04:00
Martí Bolívar
e0b41a8f51 doc: document devicetree/pinctrl.h macros
Add a new section in the API reference for the newly added
devicetree/pinctrl.h macros.

Amend macros.bnf in the guide to reflect the new generated macros for
getting at pinctrl information by name.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-25 18:09:00 -04:00
Stephanos Ioannidis
8676ff01ec doc: getting_started: Fix incorrect literal block usage
The newly added CMake installation instruction incorrectly specified
*double* colon (literal block) instead of *single* colon after its list
item.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-08-25 18:07:17 -04:00
Johann Fischer
9ad610d1a7 bluetooth: remove Kconfig options CONFIG_BT_*_ON_DEV_NAME
Follow up on commit bfd45e5b8c
("drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME")
Remove Kconfig options
CONFIG_BT_UART_ON_DEV_NAME and CONFIG_BT_MONITOR_ON_DEV_NAME
since all UART drivers are converted to devicetree and we can just use
DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_uart)) and
DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_mon_uart)).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-25 18:05:17 -04:00
Stephanos Ioannidis
a61517b58e doc: release-notes: Mention CMSIS version update
Mention that the CMSIS version has been updated to 5.8.0 in the Zephyr
2.7 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-08-25 18:02:54 -04:00
Flavio Ceolin
93e674e373 docs: pm: Fix system pm diagram
The device pm actions (low_power or suspend) were switched. Also,
added SOFT_OFF to the suspend action.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-24 22:29:34 -04:00
Johann Fischer
741ae93ce2 shell: remove Kconfig option CONFIG_UART_SHELL_ON_DEV_NAME
Follow up on commit bfd45e5b8c
("drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME")
Now we can also remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME
since all UART drivers are converted to devicetree and we can just use
DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart)).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-24 17:15:58 -04:00
Martí Bolívar
cd0abb34ca doc: twister: add units to min_ram, min_rom
The units for these testcase YAML fields are missing, making it
unclear how to use them. Fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-24 15:40:06 -04:00
Maksim Masalski
fa97ed2771 docs: getting started guide 3rd party toolchains fixes
Using 3rd Party Toolchains page find out that warning message
can be moved to the top of the page.
Add Windows example in OneAPI.
Style fixing.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2021-08-24 15:38:47 -04:00
Anas Nashif
eef51a8958 doc: kernel: move meta-irq doc to threads
Move this to where priorities are being discussed to keep things in
context and to have all priority types documented in 1 place.

Fixes #21648

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-08-24 06:59:13 -04:00
Michał Barnaś
5a1fcb609c doc: replace courge with corge
Grault and corge are both syntactical variables used globally.
Courge is misspelling of corge.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2021-08-23 18:54:27 -04:00
Michał Barnaś
1b06477832 doc: change functions arguments in drivers documentation
Fix functions arguments in documentation to match
order of their real declarations

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2021-08-23 18:54:27 -04:00
Johann Fischer
bfd45e5b8c drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME
Remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-23 18:53:47 -04:00
Johann Fischer
c179d83e72 drivers: uart_mcumgr: remove CONFIG_UART_MCUMGR_ON_DEV_NAME
Remove CONFIG_UART_MCUMGR_ON_DEV_NAME and use
DEVICE_DT_GET(DT_CHOSEN(zephyr_uart_mcumgr)).
Add usb.overlay, which contains chosen node and cdc-acm-uart node,
to smp_svr sample.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-23 18:53:47 -04:00
Johann Fischer
f460848002 net: ot: rework NCP interface configuration
Rework NCP interface configuration and NCP sample. Remove
CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_DEV_NAME and
CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_ACM Kconfig
options in favor of chosen node zephyr,ot-uart usage.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-23 18:53:47 -04:00
Manuel Argüelles
025140d05e doc: gsg: re-add missing dtc-msys2
It was lost in d5533765ff

Signed-off-by: Manuel Argüelles <manuel.arguelles@coredumplabs.com>
2021-08-23 08:18:52 -04:00
Martí Bolívar
73205d1ffb doc: dts: bindings: document what a "yaml file" is
Make it clear what files the build system considers possible bindings.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-20 18:57:30 -04:00
Martí Bolívar
f442266d09 doc: west release 0.11.1 follow-ups
Use 0.11.1 to build the docs. The docstrings are the same as 0.11.1a1,
so it doesn't make a difference in the output, but let's keep things
clean now that the final release is up.

Fix typos in the release notes.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-20 06:23:49 -04:00
Torsten Rasmussen
1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
Torsten Rasmussen
8dd1d7a524 docs: Update docs for CMake 3.20.0 minimal version
Update docs to reference CMake 3.20.0 as minimum required version.

Added Kitware APT repository to the getting started page.

Updated installation Linux download descriptions from CMake 3.15.3 to
CMake 3.21.1 as that is the version currently being installed when
using the Kitware APT repository.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
Jordan Yates
e444a9a07e doc: add LoRa behaviour change to release notes
Document the change in behaviour for `lora_send` and how to get back
the original behaviour.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-08-18 05:16:46 -04:00
Martí Bolívar
1f3ca82126 doc: release-notes: mention DT compatible changes
Document devicetree compatibles which have changed recently and that
have drivers, along with how to handle them.

Recent changes to things like / and CPU nodes aren't worth mentioning
since there are no drivers for such things. I'm similarly not going to
document the vexriscv change since it seems likely that users are
getting this compatible via the DTSI file.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Emil Obalski
6f4f1dc230 logging: Add configurable logging thread delay
This patch adds confiugurable delay when starting log processing
thread.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2021-08-13 11:19:27 -04:00
Fabio Baltieri
f6d7c38adb doc: iterable_sections: add an API example
Expand the iterable sections documentation by adding a usage example.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2021-08-12 17:47:04 -04:00
Krzysztof Kopyściński
00bfac00ae Bluetooth: gatt: Add option to read multiple without variable length
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>
2021-08-12 11:07:08 -04:00
Martí Bolívar
185545e9f4 doc: dts: explain how to view preprocessor output
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>
2021-08-12 11:04:16 -04:00
Kevin Townsend
1740aaeb9b doc: guides: Add a TF-M guide
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>
2021-08-12 10:03:57 -05:00
Flavio Ceolin
1c6507afa8 doc: pm: Add wakeup information
Add documentation for wakeup sources.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-11 19:39:13 -04:00
Flavio Ceolin
8eceeee798 pm: device: Add wakeup source API
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>
2021-08-11 19:39:13 -04:00
Lingao Meng
23a9594944 Bluetooth: Add connect event structure to zsector
Add an optional version for connection events
to save some memory.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-08-11 13:42:28 +02:00
Martí Bolívar
8807d0c2bb doc: west v0.11.1 notes
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>
2021-08-09 13:29:57 -04:00
Martí Bolívar
8eeac3e259 doc: link-roles: clean up setup() method
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>
2021-08-09 13:29:57 -04:00
Martí Bolívar
fd73eb8b60 doc: dts: macros.bnf: add docs for new for-each macros
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>
2021-08-06 12:24:57 -05:00
Martí Bolívar
9bd8534040 doc: dts: macros.bnf: fix a comment
This is referring to the wrong macro.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-06 12:24:57 -05:00
Flavio Ceolin
14899616a3 doc: coding_guideline: Add a MISRA-C mandatory rule to Zephyr
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>
2021-08-05 11:46:59 +02:00
Flavio Ceolin
70cd67579d doc: coding_guidelines: Add a MISRA-C mandatory rule to Zephyr
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>
2021-08-05 11:46:59 +02:00
Jordan Yates
6745c9a5d0 doc: release-notes-2.7: xoroshiro128+ deprecation
Add release notes for xoroshiro128+ deprecation in random library.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-08-05 11:24:44 +02:00
Jordan Yates
fdeaa9103e random: deprecate XOROSHIRO_RANDOM_GENERATOR
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>
2021-08-05 11:24:44 +02:00
Gerard Marull-Paretas
d41dadc569 pm: rename PM_DEVICE_STATE_SUSPEND to PM_DEVICE_STATE_SUSPENDED
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>
2021-08-04 08:23:01 -04:00
Gerard Marull-Paretas
59f0e73522 doc: pm: update documentation
Update documentation so that latest changes are reflected.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-08-04 08:23:01 -04:00
Kumar Gala
8bac519604 docs: Update for SDK 0.13.0
Update docs to reference SDK 0.13.0.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-08-03 22:57:57 -04:00
Fabio Baltieri
94711f1ced doc: reference: add a page for iterable sections
Group together the iterable section functions and add a corresponding
documentation page.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2021-08-03 19:02:43 -04:00
Fabio Baltieri
4dfe7d24fe doc: doxygen: predefine _LINKER
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>
2021-08-03 19:02:43 -04:00
Johann Fischer
eb8fc7a727 doc: release-notes-2.7: add note about the removal of USB option
Add release note about removal of Kconfig USB option.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-03 19:00:12 -04:00
Martí Bolívar
7b60fa3a15 edtlib: move vendor-prefixes.txt parsing in here
Take this helper from the doc tooling and expose it as API.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-03 12:21:45 -05:00
Martí Bolívar
57c4a4dec6 dts: tweak vendor-prefixes.txt format
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>
2021-08-03 12:21:45 -05:00
Martí Bolívar
fde24ac1f2 doc: west build: examples for -o and how to use -jN
Document the -o option and use that to explain how to control build
system parallelism.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-07-31 14:57:43 -04:00
Gerard Marull-Paretas
6354b8e723 doc: release: add details on device busy check API changes
Explain device busy API name changes and provide an equivalence list to
ease migration.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-30 09:28:42 -04:00
Gerard Marull-Paretas
775cf55d92 doc: add link to download PDF file
Add a new downloads section with a link to the Zephyr PDF docs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-30 08:21:02 -04:00
Gerard Marull-Paretas
da34ee9c31 doc: makefile: add support for latexmk options
Allow to override latexmk options via Makefile. Defaults match those in
the CMakeLists.txt.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-30 08:21:02 -04:00
Flavio Ceolin
1c97af9a44 release: v1.14.3 release notes
Release notes for 1.14.3 with list of fixed bugs.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-07-29 14:45:47 -04:00
Magdalena Kasenberg
127ddd846c doc: bluetooth: Add troubleshooting section for Windows
and solution for pywintypes error.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2021-07-29 10:58:17 -04:00
Daniel Wong
14f09a3b00 doc: application: Document west outside workspace
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>
2021-07-26 12:31:19 -04:00
Guennadi Liakhovetski
cf92031b9b doc: add a missing ':c:func:' prefix
Fix one instance of a missing C function prefix in an RST document.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-07-23 16:06:54 -04:00
Julia Hathaway
7292cea0a3 doc/probes: Add debug probe and host tools table and ST-Link tabs
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>
2021-07-22 17:33:43 -04:00
Julia Hathaway
97086105a4 doc/host-tools: Add tabs to SAM-BA section to improve readability
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>
2021-07-22 17:33:43 -04:00
Gerard Marull-Paretas
2f5a9d033d doc: improve latex look and feel
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>
2021-07-22 19:37:03 +03:00
Jose Alberto Meza
28e214b315 doc: reference: peripherals: Add eSPI interface to peripherals list
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>
2021-07-21 18:21:29 -04:00
Flavio Ceolin
f5b42d0aa3 doc: code_guidelines: Sort guidelines
Guidelines between rules 21.x and 22.x where not properly sorted.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-07-21 17:32:31 -04:00
Gerard Marull-Paretas
049b444752 readme: add missing logo
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>
2021-07-21 10:37:37 -05:00
Anas Nashif
157509b37a doc: update slack invite
update second link to the slack invite.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-07-21 16:52:17 +03:00
Gerard Marull-Paretas
1829dc8875 doc: do not use env vars to discover paths
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>
2021-07-21 07:28:18 -04:00
Jian Kang
a3ec9b0ebd Fix: document: Fix there is no API Reference in clock
Add the doxygen group in clock rst file to add the API Reference
chapter. Fix: #37032

Signed-off-by: Jian Kang <jianx.kang@intel.com>
2021-07-21 05:33:25 -04:00
Gerard Marull-Paretas
e46f3de447 doc: remove fix_tex script
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>
2021-07-21 10:25:39 +03:00
Gerard Marull-Paretas
fece496626 doc: guides: docs: replace diagram image with dot source
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>
2021-07-20 19:54:52 -04:00
Gerard Marull-Paretas
4127138475 doc: enable graphviz extension
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>
2021-07-20 19:54:52 -04:00
Yasushi SHOJI
ab7f07dc4a doc: reference: memory_domain: Update minimal libc
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>
2021-07-20 13:32:36 -04:00
Yasushi SHOJI
cc19558f57 doc: reference: memory_domain: Markup variables in sentences
Mark variables up if used in plain sentences for easier reading.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2021-07-20 13:32:36 -04:00
Yasushi SHOJI
49d003a925 doc: Markup kconfig options with :kconfig: role
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>
2021-07-20 13:32:36 -04:00
Yasushi SHOJI
4b17fce442 doc: guides: Add srand()
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>
2021-07-20 13:32:36 -04:00
Gerard Marull-Paretas
488735aaea doc: remove unused images
Some Zephyr logo images were not used, so remove them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-19 20:06:00 -04:00
Gerard Marull-Paretas
d625db0aa5 doc: doxygen: move logo to Doxygen assets folder
Move the logo used by Doxygen into the Doxygen assets folder.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-19 20:06:00 -04:00
Gerard Marull-Paretas
1cecfe7348 doc: move favicon to static folder
Similar to other assets, e.g. logo, move favicon to the static folder.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-19 20:06:00 -04:00
Gerard Marull-Paretas
57026639a4 doc: doxygen: delete unused custom footer template
The footer template is not used, so remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-19 20:06:00 -04:00
Gerard Marull-Paretas
24f3170976 doc: doxygen: prefix Doxygen utils dir with underscore
The same convention is used for Sphinx files.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-19 20:06:00 -04:00
Gerard Marull-Paretas
6527bda033 doc: extensions: delete unused local_util
The local_util utilities are no longer used, so remove them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-19 20:06:00 -04:00
Gerard Marull-Paretas
280b5f3256 doc: extensions: link-roles: remove usage of local_util
local_util module is no longer used by other extensions, so remove its
usage.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-19 20:06:00 -04:00
Torsten Rasmussen
3e86dc327e doc: application specific devicetree overlay file described, app.overlay
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>
2021-07-19 20:03:14 -04:00
Henrik Brix Andersen
946ad14073 drivers: can: mark the CAN API as unstable
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>
2021-07-17 10:47:53 -04:00
Gerard Marull-Paretas
ac1b9d9654 doc: guides: move doc README to the guides folder
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>
2021-07-16 21:11:41 -04:00
Ioannis Glaropoulos
334e596518 doc: guides: arm: add a brief section for cortex-M linker
A small paragraph about linking Cortex-M
applications using GCC.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos
e0abb2da4a doc: guides: arm: add a brief section about FP Services
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>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos
cf4faeae41 doc: guide: arm: add misc sections
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>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos
2596db90f6 arm: guide: add section about memory protection features
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>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos
a17c7ba19d doc: guide: arm: misc sections about testing and maintenance
- 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>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos
1a6f30961d arm: guide: add list of QEMU targets and their feature set
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>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos
798378ae01 doc: guides: arm: add section for CPU idling
Adding a small section to describe the CPU idle
functionality in Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos
59cb4ac5f7 doc: guides: arm: add a paragraph for Cortex-M ISR handling
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>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos
491746624b doc: guides: arm: add a paragraph for thread operations
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>
2021-07-16 18:55:40 -04:00
Ioannis Glaropoulos
ccfca8070f doc: guides: introduce ARM user guide (initial commit)
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>
2021-07-16 18:55:40 -04:00
Martí Bolívar
7baf5e6176 doc: fix gen_devicetree_rest.py bindings search
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>
2021-07-16 16:31:30 -05:00
Carlo Caione
f4db14f349 dts: Introduce DT_STRING_TOKEN and DT_STRING_UPPER_TOKEN
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>
2021-07-15 18:12:51 -05:00
Anas Nashif
c995b11c4c doc: add a comment about copyright notices
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>
2021-07-15 07:07:21 -04:00
Anas Nashif
cadd062ce4 doc: create an index for PDF files
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>
2021-07-15 07:07:21 -04:00
Anas Nashif
863c1708d3 doc: print tilte of Kconfig on top
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>
2021-07-15 07:07:21 -04:00
Anas Nashif
9960dac090 doc: move kconfig to indices and table
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>
2021-07-15 07:07:21 -04:00
Anas Nashif
bfe1cf823f doc: cleanup for PDF
Cleanup docs for PDFs hiding text that is relevant only for online docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-07-15 07:07:21 -04:00
Gerard Marull-Paretas
3db8d2be23 doc: cmake: allow to override LATEXMKOPTS
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>
2021-07-15 06:59:38 -04:00
Gerard Marull-Paretas
9cb8413445 doc: cmake: use Sphinx generated make files for PDF build
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>
2021-07-15 06:59:38 -04:00
Gerard Marull-Paretas
5e82764cb3 doc: extensions: doxyrunner: fix HTML output handling
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>
2021-07-15 06:57:02 -04:00
Michał Narajowski
78c222e56f doc: release-notes-2.7: Return value for opcode callback
Add release notes for Stable API Change in Mesh.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-07-15 11:34:52 +02:00
Arvin Farahmand
d0b9c03154 devicetree: Add _VARGS variants to _FOREACH_ marcos
`_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>
2021-07-14 19:50:39 -04:00
Gerard Marull-Paretas
53b9018367 doc: cmake: add target comments
Add target comments to make build process more user friendly.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
da48d63c51 doc: update build instructions
Update build instructions according to latest changed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
0d0b0ce10e doc: make: adjust Makefile
Adjust Makefile according to latest CMake changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
5fe1694ec9 doc: cmake: move pristine to a separate section
Move 'pristine' target to 'others' section.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
0db41264f1 doc: cmake: add support for clean target
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>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
5ec8980fee doc: cmake: refactor devicetree
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>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
21c4cc829f doc: cmake: refactor kconfig
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>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
f865ca33c5 doc: cmake: remove RST_OUT redundant variable
DOCS_SRC_DIR is used instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
cd555711a8 doc: cmake: remove unused version include
version.cmake is not being used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
35f44788ca doc: cmake: move environment, paths and functions
Move environment, paths and functions before they are used. Helps on
readability.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
dc3a290ca9 doc: cmake: refactor pdf build
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>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
8a8b58cf33 doc: cmake: cleanup doxygen section
Cleanup doxygen section and simplify target.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
2f1932c5bb doc: cmake: refactor html targets
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>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
a240b57405 doc: cmake: remove unused variables
Remove some unused variables.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
e06ebed457 doc: cmake: group options
Group options all together and make them part of cache.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
e5b7d3f49a doc: cmake: improve dependencies section
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>
2021-07-14 15:47:11 +02:00
Gerard Marull-Paretas
3ea64ce7f7 doc: cmake: remove west check
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>
2021-07-14 15:47:11 +02:00
Chris Pearson
496042740e Doc: Getting Started: Image fix for PDF generation
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>
2021-07-14 10:49:22 +03:00
Gerard Marull-Paretas
4fcec51c2a doc: extensions: doxyrunner: handle quiet mode
QUIET flag is now overriden according to the `doxyrunner_silent`
configuration value.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-13 17:36:15 +02:00
Gerard Marull-Paretas
85a0e1325c doc: extensions: doxyrunner: process Doxygen output
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>
2021-07-13 17:36:15 +02:00
Ingar Kulbrandstad
3ec6411c7f Bluetooth: Mesh: Align capitalization for BT mesh
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>
2021-07-13 11:23:54 -04:00
Lingao Meng
e5ec013b88 docs: Added documentation for native posix mode
Added documentation for native posix mode.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>

iii

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-07-13 17:21:49 +02:00
Lauren Murphy
ab2ede428a doc, cpp: Update CXX support to show exception support
Updates CXX support documentation to reflect exception support
added in fixes for #32448 and #35772.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-07-12 23:35:45 +03:00
Gerard Marull-Paretas
a9b1c42f40 doc: extensions: remove eager_only
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>
2021-06-30 08:29:01 -04:00
Gerard Marull-Paretas
5af12d8abd doc: release: add kconfig Sphinx and Doxygen changes
Add notes on Sphinx and Doxygen changes related to Kconfig referencing.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-29 10:26:28 -04:00
Gerard Marull-Paretas
72ab6b29bf doc: doxygen: replace option alias with kconfig
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>
2021-06-29 10:26:28 -04:00
Gerard Marull-Paretas
9dfbdf1997 doc: use kconfig role and directive
Stop using :option: for Kconfig options.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-29 10:26:28 -04:00
Gerard Marull-Paretas
21d01ad7d1 doc: extensions: add kconfig directive and role support
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>
2021-06-29 10:26:28 -04:00
Magdalena Kasenberg
8b0e79e3b9 doc: bluetooth: Add AutoPTS setup tutorial
for Windows 10 and Linux with nRF52 board.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2021-06-23 19:55:02 +03:00
Dominik Ermel
ebeb8fbeed release: Fix LittleFS entry in 2.5 release notes
The document build system has been complaining about use of
no longer existing Kconfig option.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-06-23 10:03:14 -05:00
Flavio Ceolin
6cc84412df security: Update vulnerabilities document
Add information about recent published vulnerabilities.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-06-23 06:18:59 -04:00
Mihail Marinov
d1beff0d8c doc: dfu: fix MCUboot broken link
"MCUboot with Zephyr" now links to the correct website
 and no longer gives 404.

Signed-off-by: Mihail Marinov <genderlik@gmail.com>
2021-06-22 08:05:49 -05:00
Ioannis Glaropoulos
f8fcd3b91a doc: release notes entry for FPU support in QEMU
A release note for adding FPU support in QEMU for
ARM Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-22 08:45:41 -04:00
Gerard Marull-Paretas
45cce736e2 doc: fix notfound prefix for latest docs
The notfound extension prefix was incorrect for 'latest' docs version.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-22 06:34:51 -04:00
Gerard Marull-Paretas
c2068e5d6e doc: getting_started: add Python virtual environment option
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>
2021-06-21 21:39:34 -04:00
Erwan Gouriou
4af0069ec7 doc: Encourage users to pre-analyze regressions
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>
2021-06-21 18:46:08 -04:00
Lauren Murphy
824f9645f0 docs: mention hardenconfig in kconfig
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>
2021-06-18 00:36:17 -04:00
Gerard Marull-Paretas
da62a3b6c0 doc: extensions: doxyrunner: store cache in Sphinx environment
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>
2021-06-17 10:28:59 +02:00
Gerard Marull-Paretas
b0ca352dfe doc: extensions: doxyrunner: use file hashes for cache
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>
2021-06-17 10:28:59 +02:00
Yaël Boutreux
408feeb1ad doc: guides: board porting: Fix mispelled board name
Fix mispelled "stm32h747i_disco" board name in board_porting.rst.

Signed-off-by: Yaël Boutreux <yael.boutreux@gmail.com>
2021-06-16 16:17:15 -04:00
Mihail Marinov
8aeac35c5d doc: dfu: Fix MCUboot broken link
The link to MCUboot's readme for no longer gives 404.

Signed-off-by: Mihail Marinov <genderlik@gmail.com>
2021-06-15 13:30:10 +02:00
Martí Bolívar
2b2f2c94a7 api: devicetree.h is stable
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>
2021-06-14 15:18:11 +02:00
Gerard Marull-Paretas
ab0eebca13 doc: css: fix sphinx tabs style issues
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>
2021-06-14 06:55:02 -04:00
Martí Bolívar
73443088ba doc: api: fix devicetree modification version
This was modified in 2.6.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-11 17:59:35 -04:00
Kumar Gala
3f149f0828 bluetooth: Removed deprecated bt_set_id_addr function
The function have been deprecated for 2 releases so remove the code
associated with it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-11 16:35:19 -05:00
Kumar Gala
6e665ccd13 sys: util: remove deprecated GET_ARG{1,2} and GET_ARGS_LESS_1 macros
The macros have been deprecated for 2 releases so remove the code
associated with them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-11 16:35:19 -05:00
Kumar Gala
6d51863e0d toolchain: remove deprecated BUILD_ASSERT_MSG macro
The macros have been deprecated for 2 releases so remove the code
associated with them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-11 16:35:19 -05:00
Torsten Rasmussen
6be1b2af9b kconfig: soc and shield cleanup
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>
2021-06-11 16:13:22 +02:00
Pavel Vasilyev
65f798a00a Bluetooth: Mesh: Add API to manually store pending RPL entries
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>
2021-06-11 15:47:09 +02:00
Kumar Gala
e021ac7673 device: remove deprecated DEVICE_INIT/DEVICE_AND_API_INIT macros
The macros have been deprecated for 2 releases so remove the code
associated with them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-11 08:37:08 -05:00
Anas Nashif
00945beccf doc: guides: rearrange device management
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>
2021-06-11 08:50:39 -04:00
Anas Nashif
b557ddca6f doc: reorg debugging sections
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>
2021-06-11 08:50:39 -04:00
Anas Nashif
86f08d898d doc: guides: rename Emulators page
Rename to 'Peripheral and Hardware Emulation' to distinguish from Qemu
and other emulators we have.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-11 08:50:39 -04:00
Anas Nashif
8b34495bd0 doc: move TLS to the kernel section
Move TLS docs into the 'Others' section of the kernel chapter.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-11 08:50:39 -04:00
Anas Nashif
5342bc64dd doc: build and configuration systems
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>
2021-06-11 08:50:39 -04:00
Anas Nashif
20aa90d26c doc: move documentation guidelines
Move documentation guidelines under contribution guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-11 08:50:39 -04:00
Anas Nashif
dd41aca3d3 doc: move coding guidelines under contribute/
Move coding guideline under contribution guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-11 08:50:39 -04:00
Anas Nashif
a7a4a2ef2c doc: move coverage docs into test section
Coverage reports and genrally part of testing, so move it under this
existing section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-11 08:50:39 -04:00
Ioannis Glaropoulos
45bdb186bb doc: release notes: add some entries for TF-M
Add entries for TF-M in the 2.7.0 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-10 18:38:03 -05:00
Pavel Vasilyev
0335d5fb01 Bluetooth: Mesh: Add OOB Public Key support for provisionee role
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>
2021-06-10 17:14:03 -04:00
Henrik Brix Andersen
650c760e27 doc: guides: flash_debug: coredump: remove extraneous backtick
Remove extraneous backtick from coredump documentation.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-06-10 13:17:45 -05:00
Erwan Gouriou
2ef3ebed9c doc/guides/dts: bindings: Fix code snippet for 'signal-gpios'
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>
2021-06-08 15:32:23 -05:00
Gerard Marull-Paretas
a140a249b3 doc: only enable -W option on CI
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>
2021-06-08 09:58:32 -05:00
Arvin Farahmand
98a0ccd5c5 drivers: hwinfo: Add reset cause support
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>
2021-06-08 10:16:17 +02:00
Ioannis Glaropoulos
efccfcbfc9 doc: add draft for 2.7 release notes
Add draft for the Zephyr v2.7.0 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-07 16:18:28 -05:00
Kumar Gala
79a6c07536 release: Updates for v2.6.0
VERSION and conf.py updates for v2.6.0 release

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-04 16:07:47 -05:00
Kumar Gala
93ccb58997 doc/releases: v2.6.0: Updates for release
* Fix header for release
* Update issues before release

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-04 16:07:47 -05:00
Kumar Gala
36a24329f8 doc/ref/api: Update API Version Modified
Update API Version Modified field for things that changed
for the 2.6.0 release.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-04 15:04:53 -05:00
David Brown
f6b22ecc74 doc: security: Add CVE-2021-3581 to docs
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>
2021-06-04 13:57:40 -05:00
Gerard Marull-Paretas
b1aefca2d3 doc: add example application to the release notes
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>
2021-06-04 12:50:41 -05:00
Gerard Marull-Paretas
c1a97ac5c6 doc: application: add details on example-application
Mention example-application as a reference application.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-04 12:50:41 -05:00
Torsten Rasmussen
e08a7f5845 doc: Zephyr build configuration CMake package freestanding
Update to the Zephyr build configuration CMake package documentation
with description on how a Zephyr build configuration CMake package can
be located outside a Zephyr workspace.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-06-04 12:50:28 -05:00
Kumar Gala
fac1a5e09e doc/releases: v2.6.0: minor updates
* Added a bullet about new storage subsystem feature
* Moved disk subsystem changes into disk section

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-04 12:33:56 -05:00
Flavio Ceolin
b06d084488 docs: pm: System power management diagram
Add a diagram for system power management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-06-03 14:12:52 -05:00
Kumar Gala
af75587e39 doc/releases: v2.6.0: add resolved issues
Add list of all resolved issues since 2.5.0.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-03 12:15:21 -05:00
Maureen Helm
0aeb6788b6 doc: release: Add NXP-related changes to v2.6.0 release notes
Adds v2.6.0 release notes for NXP boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-06-03 10:09:35 -05:00
Maureen Helm
4f3a76a329 doc: release: Add sensor changes to v2.6.0 release notes
Fills in the sensor drivers section of the v2.6.0 release notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-06-03 10:09:35 -05:00
Johann Fischer
92afba6278 doc: release-notes-2.6: add release notes for USB
Add release notes for USB.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-06-03 08:43:06 -05:00
Johann Fischer
d7707b482c doc: release-notes-2.6: add release notes for disk drivers
Add release notes for disk drivers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-06-03 08:43:06 -05:00
Carles Cufi
cb8c90e62b doc: gs: Clearly state the main dependencies min version
Introduce a table with the minimum version required for the three main
dependencies (CMake, Python and DTC). At the same time remove the CMake
help code from the GSG, since it's just a duplicate of the instructions
that Kitware provides.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Co-authored-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2021-06-03 13:40:14 +02:00
Carles Cufi
3260ed187f doc: intro: Add a reference to ARMv8-R
Specify that 64-bit Cortex-R, ARMv8-R, is now supported in Zephyr.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-06-03 13:40:14 +02:00
Kumar Gala
733eaa29b9 doc/releases: v2.6.0: Updates
* Removed ARCH POSIX, driver/pinmux, updatehub, settings, random, POSIX
  subsystem, and LGVL sections as no significant changes this release
* Add new drivers for eeprom, timer and watchdog sections
* Added bullet item about shared interrupt support being devicetree
  based
* Added bullet about moving of CMSIS portability headers

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-02 16:46:22 -05:00
Gerard Marull-Paretas
328e842043 doc: scripts: gen_devicetree_rest: add workaround for page width
Since Zephyr docs switched to fixed-width, the binding pages are not
displayed correctly. We should move to another data representation
format that works better for fixed-width documents. Until this decision
is made, add a workaround that forces the template to expand page width
to the maximum on binding pages.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-02 12:13:13 -05:00
Dominik Ermel
ed4072838b doc/releases: v2.6.0: Update to MCUmgr and Shell section
Short update to list of changes to MCUmgr that impact Zephyr.
Note to Shell on changes that affect mcumgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-06-02 08:50:11 -05:00
Kumar Gala
e35e7e1d59 doc/releases: v2.6.0: Updates and cleanups
* Add high level bullets about tracing & power mgmt
* Removed duplicated bluetooth section
* Remvoed RISC-V section, to changes of note for this release

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-02 08:15:02 -05:00
Aymeric Aillet
d37ecbddbb doc/releases: v2.6.0 Add new R-Car platform drivers
Add to the v2.6 release note all Renesas R-Car drivers
that have been merged during this period.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-06-02 06:40:15 -05:00
Flavio Ceolin
4889f4f5cc docs: release notes: Simple tags fixes
Fix some wrong tags usage.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-06-01 15:41:08 -05:00
Flavio Ceolin
bfa581dcb5 docs: release notes: PM release notes
Add notes about PM changes during this release cycle.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-06-01 15:41:08 -05:00
Flavio Ceolin
d5cdbcbc63 docs: release notes: PM API changes
Add information about API changes in device runtime PM.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-06-01 15:41:08 -05:00
Anas Nashif
22941f38e1 release notes: document removed x86 boards
Document removed boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-01 14:06:56 -05:00
Anas Nashif
11b8dd85b9 boards: minnowboard: remove untested and old board
Remove minnowboard configuration which is very basic and can be brought
back by just taking another X86 configuration. We have not tested this
board for a while and it is not being used actively, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-01 14:06:56 -05:00
Anas Nashif
86209aced7 boards: qemu_x86_coverage: remove board testing coverage
This board was added to test coverage feature when coverage was
introduced. This is now being testing with other boards and
configurations on a regular basis, so no need for this extra overhead in
CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-01 14:06:56 -05:00
Martí Bolívar
1b4fcc44df doc: release-notes-2.6: west extensions
Just the extensions changes for Zephyr 2.6, since west has its own
release notes page as it's developed on its own pace.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-01 07:26:33 -05:00
Martí Bolívar
91f0212399 doc: add docs for west spdx
These are based on the commit log in
fd31b9b4ac.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-01 07:26:33 -05:00
Krzysztof Chruscinski
f0b4376592 doc/releases: v2.6.0: Update for logging subsystem
Update release notes with logging v2 info.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-06-01 07:25:47 -05:00
Ioannis Glaropoulos
c9656cfadc doc: release notes: remove blank lines
Remove blank lines between bullet points.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-28 12:20:07 -05:00
Ioannis Glaropoulos
bcbb7840a5 doc: release: release notes for Cortex-R
v2.6.0 release notes for Cortex-R.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-28 12:20:07 -05:00
Ioannis Glaropoulos
4011c332bd doc: release: final release notes for cortex-m
Finalize v2.6.0 release notes for ARM Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-28 12:20:07 -05:00
Anas Nashif
f28d891c21 doc: release notes: update tracing section
Update tracing section for the v2.6 release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-28 11:33:57 -05:00
Mulin Chao
333266250c doc: release: v2.6: add note for UART console input expired options
Add note for UART console input expired mechanism Kconfig options.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-05-28 11:33:46 -05:00
Torsten Rasmussen
9bfae0d1c0 doc: release notes: added oneApi toolchain to release notes
Adding Intel oneApi as new toolchain supported in Zephyr.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-28 11:31:57 -05:00
Enjia Mai
feaf46ed86 doc: release-notes-2.6: Added and refined some testcases of kernel
1.Added or refined some testcases, most of them are neagtive tests, to
  improve the test code coverage.

2.Provide test excution time per ztest testcase.

3.Add a feature which handles pytest script in twister and provide an
  example.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-05-28 11:00:43 -05:00
Torsten Rasmussen
9bfa0ae1e8 doc: toolchains: move description of alternative install method on mac
On macOS there exists an alternative install method for gnuarmemb.

Unfortunately this information was located with the Intel oneApi
toolchain description and not the GNU arm Embedded toolchain.

Move the description to its correct location.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-28 10:59:18 -05:00
Gerard Marull-Paretas
e253bbdc1f doc: release: add documentation changes
Add a list of most relevant documentation changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-28 10:58:33 -05:00
Kumar Gala
3c04f0c433 docs: Change a number of 'master' branch refers to 'main'
Now that we use 'main' for git development, update the docs to reflect
or point there instead of 'master'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-28 10:45:17 -05:00
Carles Cufi
979926b74e doc: release: Add Bluetooth release notes for 2.6
Document the most important changes in the Bluetooth subsystem for the
2.6 release.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-05-28 10:41:09 -05:00
Daniel Leung
b2b4a010a0 doc: add some bits about demand paging
This adds some information about demand paging in Zephyr.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-28 11:33:22 -04:00
David Brown
0b2798fdfe doc: security: Change 'master' to 'main'
Fix up a handful of references to 'master' in the security documentation
to refer to the new 'main' branch.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-05-28 10:13:39 -05:00
Kumar Gala
106ca70997 doc/releases: v2.6.0: Updated Major enhancements section
Added bullets for ARC64, ARM32/64 split, TCP legacy removal, and
ARM v8.1-m support.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-28 09:30:00 -05:00
Martí Bolívar
9464798068 doc: external_content: fix for Unix
Path.rename() uses os.rename() internally. Per the Python docs:

     The operation may fail on some Unix flavors if src and dst are on
     different filesystems.

Since 'src_adjusted' is in a temporary directory, on my flavor of
Unix, that's in /tmp, which is indeed on a different filesystem than
'dst', a destination in the doc build directory on my root filesystem.

This is causing the following error when I build the docs:

Handler <function sync_contents at 0x7f9b8fca9c10> for event
'builder-inited' threw an exception (exception: [Errno 18] Invalid
cross-device link: '/tmp/tmpfscfo20o/index.rst' ->
'/home/mbolivar/zp/zephyr/doc/_build/src/reference/drivers/index.rst')

Fix this by using shutil.move() instead of Path.rename(). The shutil
function handles cross-filesystem moves correctly. It did not take a
path-like object for both its src and dst arguments until Python 3.9,
though, so we need to convert to strings for portability on earlier
but still supported versions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-28 07:00:52 -05:00
Martí Bolívar
f64346963a doc: mainpage.md: fix for new doxygen
I'm getting the following error on doxygen 1.9.1:

.../zephyr/doc/custom-doxygen/mainpage.md:1:
error: multiple use of section label 'index' for main page,
(first occurrence:
.../zephyr/doc/custom-doxygen/mainpage.md, line 1)
(warning treated as error, aborting now)

Extension error (zephyr.doxyrunner):
Handler <function doxygen_build at 0x7f1abf9e30d0>
for event 'builder-inited' threw an exception
(exception: Doxygen process returned non-zero (1))

This fixes it for me without breaking anything in
_build/doxygen/html/index.html that I can see.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-28 07:00:52 -05:00
Martí Bolívar
69ce55a78d doc: zephyr.doxyfile.in: remove obsolete variable
From Doxygen 1.9.1 when running 'make htmldocs':

warning: Tag 'COLS_IN_ALPHA_INDEX' at line 1028 of file
'/tmp/tmpkbj62jo0' has become obsolete.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-28 07:00:52 -05:00
Andrzej Głąbek
38e1063a25 doc: release-notes-2.6: Add entries for ADC and PWM drivers
Add release notes related to ADC and PWM.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-05-27 14:38:52 -05:00
Ruth Fuchss
b07356dbce doc: improve doc processor installation
A few language fixes to the "Installing the documentation
processors" section.
Also adding comments to be able to include this section in
other locations.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2021-05-27 11:47:58 -05:00
Ruth Fuchss
268247c069 doc: improve installing dependencies
A few language fixes to the install dependencies section.
Also adding IDs to be able to link directly.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2021-05-27 11:47:58 -05:00
Kumar Gala
921d892721 doc/releases: v2.6.0: Update drivers section
* Remove driver categories that didn't have any major updates
* Add a first pass on new drivers that got added

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-27 07:06:12 -05:00
Kumar Gala
6e11ccb678 doc/releases: v2.6.0: Update for SoCs and ARM boards
Add list of new SoCs and ARM boards added in this release.  (Folded the
STM32 board section into the ARM board section).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-26 19:09:27 -05:00
Martí Bolívar
7e7f4201df doc: guides: dts improvements
People seem to miss the troubleshooting page a lot, since nobody ever
mentions that they tried its steps and they didn't work. Promote it to
a top level page to make it easier to see. Add cross-references
between the two to keep them well linked together.

Add a couple of extra links to the bindings related HOWTO while we are
here, now that the bindings docs are a bit better off than they were
when this content was originally written.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-26 11:01:24 -05:00
Martin Jäger
574746e7dc doc: release notes 2.6: Add notes for CAN bus
New CAN-FD driver based on M_CAN IP and some updates to ISO-TP.

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-05-26 11:00:56 -05:00
Martin Jäger
c55a76c713 doc: release notes 2.6: Add notes for Task Watchdog
This new subsystem was introduced in 2.6 for the first time.

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-05-26 11:00:56 -05:00
Erwan Gouriou
6c69ecebb2 doc/releases: v2.6.0: Update for shields impacts
Update v2.6.0 release note with shields addition.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-26 10:55:32 -05:00
Erwan Gouriou
302f3242b8 doc/releases: v2.6.0: Update for STM32 impacts
Update v2.6.0 release note with STM32 related changes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-26 10:55:32 -05:00
Omkar Kulkarni
d6db9abd9d Bluetooth: Mesh: Add information about secure provisioning
This clarification helps implementers to choose provisioning process
parameters.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2021-05-26 10:55:07 -05:00
Flavio Ceolin
d67a5786bc pm: device_runtime: Change API behavior s/_sync/_async
Most APIs have the default synchronous and an asynchronous version
with the sufix _async because that is the most common use.

All devices in tree right now are using the synchronous version, so
just change it to be consistent with the rest of the system.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
452890628a docs: pm: Add samples and tests links
Add some applications samples to the documentation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
7c5ce5ba51 docs: pm: Improve residency policy documentation
Add information about exit latency time.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
eba2dc7e9b docs: pm: Add link to application defined policy
Add a link for the sample that defines its own policy manager.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
7f667680f4 docs: pm: Fix device busy information
Remove invalid information about device busy API.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
ffcba96b1a docs: pm: Add missing device states
Adding documentation about two new device states, SUSPENDING and
RESUMING.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
62e2952a5a docs: pm: Device pm fixes and enhancements
- idle/runtime
- Information about asynchronous calls and how to use the condition
  variable
- More details about usage count

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
90be4b67cf docs: pm: Fix invalid API reference
s/device_set_power_state/pm_device_state_set/g

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
659c1371fc docs: pm: Fix doxygen tag
Uses tag "option" for CONFIG_PM_DEVICE_RUNTIME to make it
linkable. Just like is done for all others build options.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
4b628341e5 docs: pm: Fix typo
s/Enbles/Enables/g

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
1d364c1701 docs: pm: Add device runtime definition
Add a brief definition about device runtime.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Henrik Brix Andersen
27a738853e doc: reference: drivers: fix struct member names in svg
Fix the names of struct device members shown in the device driver model
example SVG.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-05-25 22:37:57 -04:00
Gerard Marull-Paretas
de3c086429 doc: extensions: external_content: only ignore absolute paths
When including other rst files (via .. include::) the existence of the
included file may depend on when the _adjust routine is called, so only
ignore absolute paths.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-25 16:14:31 -05:00
Gerard Marull-Paretas
f341466681 doc: extensions: doxyrunner: use string paths on pickle file
PosixPath or WindowsPaths are not portable, so using them on pickle
files, which can potentially be re-used is not safe. Changed to use the
posix path as a string.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-25 16:14:18 -05:00
Evgeniy Paltsev
82bbbac66c doc: release notes: ARC
2.6 release notes for ARC related changes

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-05-25 14:31:36 -05:00
Gerard Marull-Paretas
fa0f53d6cb doc: scripts: remove extract_content
Remove unused extract_content script.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-25 19:38:11 +02:00
Gerard Marull-Paretas
4dd15539a9 doc: use external_content
Use external_content Sphinx extensions to gather documentation sources.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-25 19:38:11 +02:00
Gerard Marull-Paretas
cc2f29a656 doc: extensions: initial version of external_content
external_content extension allows to gather content from arbitrary
locations.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-25 19:38:11 +02:00
Gerard Marull-Paretas
402ebf52c7 doc: makefile: adjust default Sphinx options
Adjust default options to match the ones in CMake. Quote options when
invoking CMake.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-25 19:38:11 +02:00
Gerard Marull-Paretas
bf5065d742 doc: improve Sphinx defaults
Make default Sphinx options more user-friendly, i.e. colored output so
that one can easily follow build progress.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-25 19:38:11 +02:00
Anas Nashif
fd3a3be95a doc: tracing: add missing doxygen references
Add missing doxygen references with all new hooks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-25 07:36:38 -05:00
Anas Nashif
73d6ead9ba doc: tracing: document how to use systemview description file
Document how to use the most recent description file for Zephyr with
systemview.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-25 07:36:38 -05:00
Evgeniy Paltsev
4b0eb7684a ARC: doc: update ARC HW & tools support status
List of the changes:
 * update info about ARCv3 HS6x which support has been upstreamed
   recently
 * mark HS3x userspace support as Y

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-05-25 07:35:57 -05:00
Anas Nashif
ae4fb20f67 doc: kernel: add documentation for queues
Add missing introduction to queues which are basically FIFOs and in
zephyr are used to implement both FIFO and LIFO objects.

Fixes #35199

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-24 14:20:01 -04:00
Martí Bolívar
095c9a3e92 doc: link-roles: fix :zephyr_file: default revision
This needs to use 'main' for its default now.

Without this patch, GitHub redirects to main, but displays a banner
that says 'Branch not found, redirected to default branch' at the top.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-21 18:10:13 -04:00
Gerson Fernando Budke
f3a7f041bf scripts: runners: bossac: Add legacy mode
Add compatibility mode with old sam-ba flash bootloaders that don't have
offset capabilities.  These bootloaders flash to a pre-defined flash
region.  At end, bossac will suppress --offset parameter.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-05-21 21:20:58 +02:00
Gerard Marull-Paretas
5e06397269 doc: doxygen: treat warnings as errors
Treat warnings as errors. Since we already disable warnings for
undocumented members (the major source of warnings), reported warnings
are in all cases real problems that should be fixed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-21 12:17:04 -04:00
Kevin Hilman
d7f47296c9 doc: porting guide: minor grammar fixups
Fix some minor grammar issues for readability.

Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2021-05-21 07:25:27 -04:00
Gerard Marull-Paretas
baf11138c5 doc: css: fix versions menu style
Versions menu dl > dt background color was not correct.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-21 06:22:24 -05:00
Gerard Marull-Paretas
ad7e3e1281 doc: css: remove images black border
Remove the black border present on images.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-21 06:22:24 -05:00
Kumar Gala
58d3760533 boards: arm: lpcxpresso55s28: Remove NS board config
There is no known TFM/secure side solution for the lpcxpresso55s28.
The '_ns' board config variant was added as a copy/pasted based on
how some other boards did things.  If/when TFM supports the board
we can revert this to support it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-20 23:44:13 -05:00
Gerard Marull-Paretas
381180c46f doc: scripts: gen_kconfig_rest: fix rendering issues
As of today we assume that the help text contained in the Kconfig help
field will be properly formatted RST. However, there is no guarantee
that this will happen. This patch tries to address this problem by:

- Escaping inline RST characters for text that needs to be rendered as
  "normal text" (i.e. prompt)
- Use code-blocks to render help content. This way help is rendered as
  literal text and so it does not get processed by the RST parser.

A secondary change: the index table now contains the prompt information
only. The page was taking a long time to render because of the large
amount of content. Using a table doesn't help either. Note that adding
code-block to include help as a literal increases build time even more,
so it is not an option.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-20 13:18:05 -05:00
Kevin Townsend
7f89f9dbd8 doc: release-notes-2.6: Add issue with mbedtls PSA API and TF-M
Adds a note on a known config conflict with mbedtls 2.26.0 and TF-M
where the mbedtls PSA APIs can no be enabled at the same time as TF-M.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2021-05-20 13:17:02 -05:00
Gerard Marull-Paretas
8c4b757fd4 doc: remove redundant breathe project
The default breathe project is `Zephyr`, so there is no need to specify
it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-20 20:04:51 +02:00
Gerard Marull-Paretas
830de4c905 doc: conf: remove unused breathe project
the `doc-examples` project is not used and, in fact, is a duplicate of
the Zephyr project.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-20 20:04:51 +02:00
Gerard Marull-Paretas
2d06ad7ee4 doc: make some Sphinx config path absolute
Make all paths absolute.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-20 20:04:51 +02:00
Gerard Marull-Paretas
07a5cd5322 doc: extensions: doxyrunner: make html output optional
Make HTML output optional. The extension checks the `GENERATE_HTML`
option to check if active.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-20 19:57:20 +02:00
Gerard Marull-Paretas
5738114df2 doc: scripts: gen_devicetree_rest: use utf-8 encoding
Use utf-8 encoding when opening vendor prefix files.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-20 03:07:44 -05:00
Martí Bolívar
b6fbc20de4 dts: add 'linaro,' prefix to 96b-lscon-1v8, 96b-lscon-3v3
These compatibles don't match the dt-schema regular expression for
compatible properties that we'd like to support in Zephyr because they
do not begin with a letter.

Use linaro, as a vendor prefix to make them compliant. Update the
release notes since out of tree users will need to keep up.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-19 22:18:25 -05:00
Gerard Marull-Paretas
95d8d2cc58 doc: fix 404 page
Sphinx handling of 404 page is not that easy when using theme
customizations. Enabled the `sphinx-notfound-page` extension (maintained
by readthedocs) to fix its displaying.

Also adjusted Zephyr logo (was causing some Sphinx processing errors
when trying to scale it).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 16:48:39 -04:00
Gerard Marull-Paretas
3cddd87522 doc: css: add auto overflow on admonitions
Setting overflow:auto adds a scrollbar to admonitions if the content
overflows. Some adminitions overflow specially on mobile devices.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 16:48:39 -04:00
Gerard Marull-Paretas
45e48f4b45 doc: scripts: gen_kconfig_rest: add workaround for page width
Since Zephyr docs switched to fixed-width, the list of Kconfig options
is not displayed correctly. We should move to another data
representation format, e.g. definition lists. Until this decision is
made, add a workaround that forces the template to expand page width to
the maximum on Kconfig list pages.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 16:48:39 -04:00
Gerard Marull-Paretas
6938d2c548 doc: remove home link
Logo is the common place used to go home, so remove redundant entry in
toctree.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 16:48:39 -04:00
Gerard Marull-Paretas
7040aa86bb doc: css: improve C constructs spacing
With current CSS construct like void f() are rendered together, i.e.
voidf(). Add some spacing to make it more like "void f()".

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 16:48:39 -04:00
Gerard Marull-Paretas
073c8cf849 doc: remove scrolling customizations
The scrolling customizations were used to hide the logo when scrolling
down. With this change, logo is always displayed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 16:48:39 -04:00
Gerard Marull-Paretas
f0d3db29ed doc: show logo only
Since logo already brings to home page, remove the link displayed above.
It saves some vertical pixels while making docs nicer. Also adjusted
wy-menu-vertical max-height to account for the new height (note: was
wrong before).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 16:48:39 -04:00
Gerard Marull-Paretas
1100326f0f doc: doxygen: make relative paths absolute
Some paths in the Doxyfile were relative, make them absolute.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 08:10:52 -05:00
Henrik Brix Andersen
81c10c7e34 doc: releases: 2.6: document the renaming of lpcxpresso55s16_ns
Mention the renaming of the lpcxpresso55s16_ns board definition to
lpcxpresso55s16.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-05-19 08:02:54 -05:00
Gerard Marull-Paretas
db4359cfd2 doc: remove redundant usage of :members: in breathe directives
:members: is now enabled by default.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 06:21:53 -04:00
Gerard Marull-Paretas
0e503418ad doc: enable members option by default when using breathe
Enable the :members: option by default when using breathe directives.
This exposes automatically stuff like structure fields.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 06:21:53 -04:00
Gerard Marull-Paretas
775174621d doc: warnings: make expressions more generic
When duplicates exist the problem may come from two or more distinct
constructs. When running parallel builds there is no guarantee on which
one will come first (or if all), so allow any C construct.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 06:21:53 -04:00
Gerard Marull-Paretas
aad84e702a doc: doxygen: do not use separate member pages
When this option is enabled some data structures have missing pages. Use
the default setting (NO).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 06:21:53 -04:00
Martí Bolívar
6100691d2f doc: move 'asking for help' to GSG
The current location makes no sense because this is for users, not
contributors. Put it in the GSG since a previous attempt to restore
its location under the user guides was rejected in favor of this
location.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-18 18:02:30 -04:00
Flavio Ceolin
2b3e6166d9 doc: security: Publish CVE-2020-3323 info
CVE was previously under embargo.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-18 14:55:38 -04:00
Flavio Ceolin
a4b04996aa doc: security: Publish CVE 2021-3321
Publish CVE that left embargo period.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-18 14:55:38 -04:00
Flavio Ceolin
66029cf211 doc: security: Publish CVE under embargo
Publish CVE-2021-3320.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-18 14:55:38 -04:00
Flavio Ceolin
4ea9ddb627 doc: security: Add CVE-2020-10065 info
Add information about 2020-10065 CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-18 14:55:38 -04:00
Flavio Ceolin
fa84e13993 doc: security: Add backport info for old issues
Several issues were missing information about backports.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-18 14:55:38 -04:00
Flavio Ceolin
13f11b422d doc: security: Add CVE-2020-13603 info
This CVE is already published on github.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-18 14:55:38 -04:00
Mark-PK Tsai
fa836cc00d doc: reference: fix typo
Fix typo.

Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
2021-05-18 10:59:37 -04:00
Martí Bolívar
2a47142b0a requirements: bump west to >=0.10.1
We are in the process of changing the HEAD branch in the zephyr
repository from 'master' to 'main'. Users will need west version at
least 0.10.1 for the plain 'west init' line in the getting started
guide to still work after that change.

To avoid problems:

- add -U to the macOS and Windows lines for installing west (this
  option is already there for Ubuntu). Upgrading west will make
  the guide 'just work' for users who have an old version.

- bump the minimum version in the relevant requirements file,
  in case anybody is doing something like basing a CI setup
  on those versions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-18 09:52:12 -05:00
Anas Nashif
9440a1c2b8 doc: kernel: thread stack is not the same as stack object
Fix mixup of stack objects and thread stacks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-17 17:32:12 -04:00
Jukka Rissanen
e96c408dd8 doc: net: Add networking changes to 2.6 release note
Initial set of networking related changes in 2.6 release.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-05-17 15:43:45 -04:00
Anas Nashif
be613ec556 doc: remove tickless idle
Zephyr's kernel is tickless by default, this option (TICKLESS_IDLE) was
removed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-17 11:52:37 -04:00
Anas Nashif
0e64b877da twister: fix hardware map generation
when generating a new map, set the status of the device and whether it
is connected or now. The available key is runtime only and is not part
of the map anymore.
Adapt documentation and remove available as a key in the generated map.

Fixes #35341

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-17 11:47:50 -04:00
Carles Cufi
04325086ef doc: reference: Add a section for the C standard library
In order to document the error codes, introduce a new reference section
describing the C standard library options available in Zephyr, along
with the definitions of the error codes.

At the same time move (most of) the content from the existing user guide
to the new API reference section, removing the need for a separate user
guide for it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-05-17 09:11:15 -04:00
Gerson Fernando Budke
f717ccd092 doc: release: 2.6: Add note about west bossac runner
Add release note about improvements in west bossac runner.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-05-13 07:27:36 -05:00
Gerson Fernando Budke
5576570a80 doc: release: 2.6: Add notes about rf2xx driver changes
Add 2.6.0 release notes for enhancements on Atmel at86rf2xx driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-05-13 07:27:36 -05:00
Gerson Fernando Budke
f0d64dde4a doc: release: 2.6: Add notes about Cypress related changes
Add 2.6.0 release notes for Cypress SoCs, boards, and drivers.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-05-13 07:27:36 -05:00
Carlo Caione
fd20ad28ce ARM64: Release notes for 2.6
Release notes for 2.6 release.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-05-12 08:38:09 -05:00
Daniel Leung
b9a782b330 doc: release-notes-2.6: on k_mem_unmap and demand paging stats
This mentions the new k_mem_unmap() and the ability to gather more
statistics for demand paging.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-12 08:32:35 -05:00
Daniel Leung
678564e54a doc: release-notes-2.6: major x86 changes
Added some major x86 changes into the release notes.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-12 08:32:11 -05:00
Lauren Murphy
eca366b3b4 doc, coding guidelines: fix cert-c links in coding guidelines
Fixes broken links to CERT-C in Coding Guidelines.

Fixes #35195

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-05-12 08:31:44 -05:00
Anas Nashif
cc0cb3d0f9 doc: clock: link macros and struct to doxygen
link some function, macros and structs to doxygen docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-11 12:59:15 -05:00
Peter Bigot
09a31ce18c kernel: deprecate old k_work API
Several functions and macros have been replaced with new ones that
conform to current naming conventions, or provide more functionality,
mostly through using new representations for delayable work.  Mark
these functions deprecated.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-05-07 18:12:06 -05:00
Flavio Ceolin
0c607adb63 pm: device: Align state names with system states
Change device pm states to the same pattern used by system power
management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-07 18:35:12 -04:00
Piotr Mienkowski
3632815e2e api: gpio: do not support INT flags in gpio_pin_configure
To keep compatibility between the old GPIO API implementation and a new
one introduced in the Zephyr 2.2.0 release the gpio_pin_configure()
function was accepting interrupt flags. In the new API implementation
interrupt flags are only accepted by gpio_pin_interrupt_configure()
function.

This temporary support for INT flags in gpio_pin_configure should have
been removed in the Zephyr 2.4.0 release.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-05-07 12:42:08 -05:00
Peter Bigot
c42eb823ce doc: kernel: interrupts: correct description of irq lock behavior
Contrary to the documentation giving a semaphore while an IRQ lock is
held does not release the lock and give control to another thread.
The release-lock behavior is observed only if the lock-holding thread
sleeps.

However the opportunity to reschedule will have been lost so it may be
necessary to explicitly yield to allow the higher-priority thread to
be serviced.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-05-07 09:28:13 -04:00
Ioannis Glaropoulos
afb73942c1 doc: release: add note for new TF-M boards in v.2.6.0
Add a release note entry for the new Zephyr boards
supported in TF-M in Zephyr v.2.6.0.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-07 13:33:43 +02:00
Ioannis Glaropoulos
cc9431c41c doc: release notes: add Zephyr v2.6.0 release notes for TF-M
Add release note entries for TF-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-07 13:33:43 +02:00
Johann Fischer
85a9e04aa2 doc: release-notes-2.6: add note about USB HID class API change
Add release note about USB HID class API change.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-05-07 13:14:47 +02:00
Gerard Marull-Paretas
457f3a46d6 doc: use doxyrunner
doxyrunner plugin replaces a series of CMake+Python hacks. These include
input changes tracking and incremental build output simulation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-06 13:19:19 +02:00
Gerard Marull-Paretas
bff24fa732 doc: extensions: add doxyrunner
zephyr.doxyrunner Sphinx extension is meant to replace multiple Python
and CMake scripts into a single Sphinx extension.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-06 13:19:19 +02:00
Gerard Marull-Paretas
2207c4c8e5 doc: replace restore doxygen times script
Replace the restore modification times with a new script that is more
specific to the Doxygen+Sphinx needs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-06 13:19:19 +02:00
Daniel Leung
37672958ac x86: mmu: relax KERNEL_VM_OFFSET == SRAM_OFFSET
There was a restriction that KERNEL_VM_OFFSET must equal to
SRAM_OFFSET so that page directory pointer (PDP) or page
directory (PD) can be reused. This is not very practical in
real world due to various hardware designs, especially those
where SRAM is not aligned to PDP or PD. So rework those bits.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-05 19:42:25 -04:00
Anas Nashif
52398df7b6 doc: integrate dict logging into main logging section
This belong alongside other logging related documentation. No for this
to exist on its own.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-05 19:07:24 -04:00
Gerard Marull-Paretas
5bdcf710eb doc: release: document device PM changes
Add some explanation and details on the device PM changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas
56f1a8ce98 pm: rename PM_DEVICE_GET/SET_POWER_STATE to PM_DEVICE_STATE_GET/SET
Adjust name to be consistent with device PM naming conventions.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas
7988ab4a26 pm: rename device_set/get_power_state to pm_device_set/get
Make name consistent with other device PM APIs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas
dbf46b3815 pm: rename device_pm_cb to pm_device_cb
Prefix all device PM functions/data structures with pm.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas
7bfd3a11f3 device: rename device_pm_control to pm_control
Remove device_ prefix since it is redundant.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas
2c7b763e47 pm: replace DEVICE_PM_* states with PM_DEVICE_*
Prefix device PM states with PM.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas
a23de40f15 doc: pm: update runtime API names
Replace with pm_device_* API.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas
f69759d34a pm: rename CONFIG_PM_DEVICE_IDLE to CONFIG_PM_DEVICE_RUNTIME
Make naming clear on the purpose of this option.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Martí Bolívar
58617fbec7 doc: dts: bindings: add dt-zephyr-user target
Just a bit of future-proofing so we can continue to link to the right
place in case we ever want to move the /zephyr,user docs out of the
'inferred bindings' section in the DT guide.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-05 20:46:43 +02:00
Martí Bolívar
60ab0af5db drivers: gpio: add GPIO_DT_SPEC_GET_OR and friends
These helper macros avoid boilerplate when constructing a gpio_dt_spec
structure from optional devicetree properties.

Update the release notes while we're here.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-05 20:46:43 +02:00
Magdalena Kasenberg
d0e0af74da Bluetooth: Add option to log btsnoops over RTT
There is a choice to log btmon logs over UART or RTT.
You can choose number of RTT buffer, set its name and size.

Replaced CONFIG_BT_DEBUG_MONITOR with CONFIG_BT_DEBUG_MONITOR_UART
for UART usage and CONFIG_BT_DEBUG_MONITOR_RTT for RTT.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2021-05-05 16:03:38 +02:00
Ioannis Glaropoulos
a1c6fbbfec doc: release notes: release notes entry for non-blocking secure calls
Add an entry in the release notes regarding the
support for non-blocking secure calls in Zephyr.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-05 13:00:31 +02:00
Gerard Marull-Paretas
ebfe9be01f doc: fix devicetree lexer warnings
Some warnings for invalid DT syntax have been fixed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-04 22:42:15 -04:00
Gerard Marull-Paretas
091824369f doc: remove dts lexer
This lexer is no longer used as Pygments already supports devicetree
syntax.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-04 22:42:15 -04:00
Gerard Marull-Paretas
aa0b02bf75 doc: use pygments devicetree language support
Since Pygments 2.7.0 devicetree syntax is supported, so there is no need
to use a custom lexer. Version 2.9.0 introduces a fix that is required
for some devicetree snippets.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-04 22:42:15 -04:00
YouhuaX Zhu
965c8b9888 sanitycheck: Add a feature which can handle pytest script.
1. Add a class of Pytest(Harness) which can handle pytest script
in harness.py
2. Use running_dir to store current test directory which be
used in pytest scrpt.
3. Add usage of this feature into zephyr doc.

Signed-off-by: YouhuaX Zhu <youhuax.zhu@intel.com>
2021-05-04 19:08:18 -04:00
Martí Bolívar
faf68fb213 doc: west: add 0.11.0 docs
This is mainly a feature release which includes a few ways to speed up
'west update', along with a couple of fixes and other changes.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-04 15:29:36 -05:00
Tommie Skriver
7fac6a1bfd kernel: atomic: possibility of arch specific implementation
For non-specified archs, including those out-of-tree, the possibility to
use a specific implementation has been reintroduced.

CONFIG_ATOMIC_OPERATIONS_ARCH must be selected to utilize this.

Signed-off-by: Tommie Skriver <tosk@demant.com>
2021-05-03 11:57:46 +02:00
Nicolas Pitre
f1f63dda17 arm64: FPU context switching support
This adds FPU sharing support with a lazy context switching algorithm.

Every thread is allowed to use FPU/SIMD registers. In fact, the compiler
may insert FPU reg accesses in anycontext to optimize even non-FP code
unless the -mgeneral-regs-only compiler flag is used, but Zephyr
currently doesn't support such a build.

It is therefore possible to do FP access in IRS as well with this patch
although IRQs are then disabled to prevent nested IRQs in such cases.

Because the thread object grows in size, some tests have to be adjusted.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-05-03 11:56:50 +02:00
Ningx Zhao
9136c40833 tests: poll: revised document error
Some description about poll are not right,
adding some new description to revise it.

Fixes #33712

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2021-05-03 11:56:22 +02:00
Anas Nashif
6df4405cca doc: fix typos
Fix various typos in the docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-30 16:03:08 -04:00
Didrik Rokhaug
5045f5772c doc: fix typo in driver documentation
'whice' is replaced with 'which', which makes more sense in the
given context.

Signed-off-by: Didrik Rokhaug <didrik.rokhaug@gmail.com>
2021-04-30 11:23:48 -04:00
Andrzej Puzdrowski
29c838ed1d fs/nvs: document flash wbs migration capability
Document the fact than NVS image of different wbs
are compatible each other if psychical ATE size
is kept.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2021-04-30 12:27:27 +02:00
Daniel Leung
54283efcce x86: mmu: allow page table extra mappings to have cache disabled
This adds the bits to the gen_mmu.py script so that extra mappings
can be added with caching disabled. This is useful for mapping
MMIO regions where caching is not desired.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-29 21:17:24 -04:00
Robert Lubos
0d1577f7fe net: lwm2m: Add API function to delete object instance
Since the API already has a function to create an LwM2M object instance,
it makes sense to add a corresponding delete funtion, allowing the
application to delete created objects.

Additionally, for the remote delete set the Registration Update trigger
only when not in bootstrap mode.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-04-29 09:51:54 -04:00
Peter Bigot
b417442575 doc: kernel: document general policy for Zephyr without threads
This provides the documentation of scope required as a stage towards
removing deprecation for CONFIG_MULTITHREADING=n.  The specific lists
of what does work will follow as the code base is inspected and
updated.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-29 14:50:35 +02:00
Gerard Marull-Paretas
e6248db31d doc: releases: add notes on device_pm_control_nop removal
Add details on the removal of device_pm_control_nop.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas
70fc2dc8f8 doc: remove references to device_pm_control_nop
Remove it from examples and from PM reference.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:40:00 -04:00
Gerard Marull-Paretas
2ec53e99e3 doc: releases: add notes on reboot header location change
Inform about the reboot header location changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:34:00 -04:00
Gerard Marull-Paretas
f163bdb280 power: move reboot functionality to os lib
Reboot functionality has nothing to do with PM, so move it out to the
subsys/os folder.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 20:34:00 -04:00
Daniel Leung
e1fc809419 doc: add documentation for dictionary-based logging
This adds new documentation for dictionary-based logging on
usage and low-level information.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-28 22:25:42 +02:00
Gerard Marull-Paretas
446432a9ac doc: doxygen: add support for function properties
Add aliases for setting function properties. A function may have 0, one
or more function properties. Example usage:

@funcprops \isr_ok, \async

These aliases will translate to API Terminology references when Doxygen
is rendered on Sphinx. On the Doxygen side they will just translate to
plain text.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 14:32:39 -04:00
Anas Nashif
d48627b994 doc: process: Fix heading levels
Fix and balance levels and move sub-sections to appropriate sections.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-28 12:58:36 -04:00
Anas Nashif
db1d7a78f4 doc: consolidate process documents
We have been adding process related docs in different places.
Consolidate them under one section in the docs and rename the top level
section to reflect that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-28 12:58:36 -04:00
Hou Zhiqiang
0700a24276 devicetree: Add DT_FOREACH_CHILD_STATUS_OKAY macro
The macro only iterates the enabled child nodes and invokes
provided macro for each node.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2021-04-27 13:32:55 -04:00
Peter Bigot
d8cf822d66 doc: kernel: workqueue: add section on best practices
Refactor best practices from the API refactoring issue and integrate
them into the existing documentation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-27 13:29:08 -04:00
Peter Bigot
add4c1d8ef doc: kernel: workqueue: miscellaneous cleanup
Minor terminology misuse, style changes, or clarifications.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-27 13:29:08 -04:00
Peter Bigot
0ef268f025 doc: kernel: workqueue: improve documentation on context retrieval
Reference the helper macro used to obtain the containing context
structure from a work item pointer within a work handler.  Also
document the proper way to do this for delayable work items.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-27 13:29:08 -04:00
Peter Bigot
1f0082249e doc: kernel: workqueue: explicitly mention K_WORK_DEFINE
Point out that this macro can be used to avoid the need to initialize
a work item.  This is still of limited use since it can't statically
initialize a work item within another structure.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-27 13:29:08 -04:00
Peter Bigot
537f966997 doc: kernel: workqueue: correct terminology misuse
Use queued uniformly when referring to items that are in a work queue,
rather than "pending" which includes items that are scheduled or
running.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-27 13:29:08 -04:00
Jukka Rissanen
9f2fa87e05 net: Remove support for CONFIG_NET_CONTEXT_TIMESTAMP option
This option was only able to collect statistics of transmitted
data. The same functionality is available if one sets the
CONFIG_NET_PKT_RXTIME_STATS and/or CONFIG_NET_PKT_TXTIME_STATS
options.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-26 10:46:43 +03:00
Jonathan Nilsen
0e6ac008a0 storage/stream: Add persistent write progress to stream_flash
Add additional API to stream_flash that can be used to make
stream write progress persistent using the settings subsystem.
This functionality makes it possible to resume a write operation
after it was interrupted, e.g. by power loss.

Signed-off-by: Jonathan Nilsen <Jonathan.Nilsen@nordicsemi.no>
2021-04-23 15:01:32 -05:00
Martí Bolívar
4c2886c1b7 doc: devicetree: overhaul bindings guide
The binding-template.yaml file has grown organically into something
that's out of control.

It makes too many 'see above' and 'see below' references to be read
comfortably, and we can't cross reference from YAML.

There are also many example DTS and YAML fragments scattered about in
comments, which cannot be syntax highlighted properly.

Fix that by overhauling the documentation into bindings.rst in the DT
guide. This will let us link to individual sections when answering
questions, allows us to cross-reference and use '.. code-block::',
etc.

A couple of things need to go to other pages.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-04-22 15:32:10 +02:00
Martí Bolívar
43086d3535 doc: devicetree: improve 'writing property values'
Break it down in a table based on each supported type in the bindings
language and add cross-references.

Move the section higher up, to make it easier to find.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-04-22 15:32:10 +02:00
Martí Bolívar
72c64d0b27 doc: devicetree: inferred bindings improvements
Improve the existing documentation by showing explicitly how to access
all of the properties in the example /zephyr,user node. This makes
use of the new DT_FOREACH_PROP_ELEM() macro in particular.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-04-22 15:32:10 +02:00
Anas Nashif
53da211c39 doc: more LTS details
More details on LTS.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-22 07:22:52 -04:00
Anas Nashif
12e17edd74 doc: master -> main branch
Some fixes and moving from master terminology to main.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-22 07:22:52 -04:00
Anas Nashif
690e4e2a24 doc: LTS release docs
Update LTS related docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-22 07:22:52 -04:00
Gerard Marull-Paretas
9553e25844 doc: adjust scrolling settings
Some users reported issues on Windows regarding navigation bar title
location. Scroll values have been adjusted to fix the problem. Tested on
both Linux and Windows (Chromium/Firefox).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-21 14:47:16 -04:00
Zach Hudson
fe270547d0 doc: gsg: add python38 to Fedora
This should solve the library problem for Fedora as well.

Signed-off-by: Zach Hudson <zhudson@phytec.com>
2021-04-21 08:24:40 -05:00
Zach Hudson
b747152cdb doc: gsg: add libpython3.8-dev
not all distributions install python3.8 libraries as a part of the
python3 package. Specifying the python3.8 library solves this problem.

Signed-off-by: Zach Hudson <zhudson@phytec.com>
2021-04-21 08:24:40 -05:00
Luiz Augusto von Dentz
7309119f2f doc: release: Add note about send changes
This adds a note about the changes made to align the error handling of
the likes of bt_l2cap_chan_send and bt_iso_chan_send.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2021-04-20 18:20:04 -04:00
Gerard Marull-Paretas
89aa9c83cb doc: add caption to main toctree
toctree captions appear on the navigation tree. They are specially
useful if documentation is split amongst multiple toctrees.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-04-20 19:17:15 +02:00
Gerard Marull-Paretas
a6d8c232e0 doc: new look and feel
A new look and feel for the Zephyr documentation. It is largerly based
on the work done by Godot Engine docs, but with some Zephyr specific
customizations.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-04-20 19:17:15 +02:00
Anas Nashif
05ccdd7c40 doc: move 'getting help' to contrib guidelines
Move this standalone page into the contribution guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-20 14:53:52 +02:00
Anas Nashif
541b261ca1 doc: reorder sections in contribution guidelines
Minor changes to order of sections in contribution guideline grouping
section based on content.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-20 14:53:52 +02:00
Anas Nashif
bf9ceac2ef doc: move env_vars into application development
No reason why we are duplicating this information in a standalone guide
when we already talk about env variables in the application developer
guide.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-20 14:53:52 +02:00
Anas Nashif
3b3e858c50 portability: move cmsis api headers
Move cmsis OS api headers under include/portability. Those are not
libraries and only serve to provide a level of abstraction using the
CMSIS OS APIs to existing Zephyr interfaces.

Removed one level and put them directly under include/portability.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-20 08:45:05 -04:00
Anas Nashif
077447a52b doc: consolidate api status and guidelines
Move all docs related to APIs and the guidelines around them into one
page.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-20 14:38:16 +02:00
Krzysztof Chruscinski
247078e0d8 doc: logging: Add documentation for logging v2
Extended and refactored logging documentation. Added details about
logging v2 and comparison with v1.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-19 10:59:23 -04:00
Krzysztof Chruscinski
9c6b159d68 doc: misc: Add documentation for MPSC Packet Buffer
Add documentation for Multi Producer Single Consumer Packet Buffer.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-19 10:59:23 -04:00
Krzysztof Chruscinski
fb4d945b82 doc: misc: formatted_output: Add section for cbprintf packaging
Add documentation for cbprintf packaging.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-19 10:59:23 -04:00
Maximilian Bachmann
f23a334f6d doc: fix spelling mistake
Fix small spelling mistake

Signed-off-by: Maximilian Bachmann <m.bachmann@acontis.com>
2021-04-19 10:48:50 -04:00
Giulio De Donato
e3a25b3b3a doc: on mac suggesting an alternative procedure for cmake
brew install

Signed-off-by: Giulio De Donato <liuggio@gmail.com>
2021-04-19 14:07:42 +02:00
Anas Nashif
bc747e7167 tracing: remove cpu_stats in favor of thread runtime stats
Removing CONFIG_TRACING_CPU_STATS in favor of
CONFIG_THREAD_RUNTIME_STATS which provides per thread stats. The same
functionality is also available when Thread analyzer is enabled with the
runtime stats enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-16 15:31:24 -04:00
Anas Nashif
fe3fcede10 doc: smp: use doxygen references
Use :c:func:`..`` where possible to reference documented APIs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-15 14:04:05 -04:00
Anas Nashif
77ee832f2e doc: rename Random -> RNG
Random alone in the TOC is misleading and confusing, so be more
specific.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-15 14:04:05 -04:00
Anas Nashif
193c5913a6 doc: modbus: remove extra level in the docs
We had one extra level in the docs, reduce and show modbus details
directly instead of the extra step.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-15 14:04:05 -04:00
Anas Nashif
e616a54d08 doc: enable doxygen for CONFIG_TIMING_FUNCTIONS
This was missed and APIs were not showing in final docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-15 14:04:05 -04:00
Anas Nashif
d31d6ce0be doc: strcutures: use doxygen to reference functions
Use :c:func:`..` possible to reference and link doxygen documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-15 14:04:05 -04:00
Anas Nashif
e9662c8cf4 docs: structures: move ring buffer
We had duplicate entries for ring buffer, merge them into one document.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-15 14:04:05 -04:00
Anas Nashif
a7f570692f doc: group data structure docs and add doxygen linkage
Move out of misc/ and put in own folder and add the grouping to doxygen
to be able to reference the doxygen docs into RST.
Move each item into their own file to reduce clutter and to make it
less crowded in one single page.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-15 14:04:05 -04:00
Anas Nashif
c355b7e7a5 kernel: move workqueue API reference
Move workqueue doxygen docs to its own group and reference that in RST
under the workqueue section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-15 14:04:05 -04:00
Nicolas Pitre
0dc7b9ee46 k_current_get(): make it a "const" function
This function always returns the same value for a given thread.
Add the const attribute to it so the compiler won't call it over and
over needlessly each time _current is referenced, making for far more
efficient code.

The __attribute_const__ symbol is used to mimic the Linux equivalent.
We want to make it clear that this is distinct from the const keyword.

Fix the test_x86_cpu_scrubs_regs where the compiler wasn't told that a
bunch of registers are being clobbered as highlighted by this change.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-04-14 20:32:05 -04:00
Ioannis Glaropoulos
a9257bf8c9 doc: releases: add release note entry for TF-M update
Add an entry in the release notes for 2.6, indicating
that TF-M is updated to v1.3.0 release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-13 13:01:21 -04:00
Jukka Rissanen
aaaef987a7 net: doc: Add info about net-capture.py script
Added net-capture.py script to net-tools project. The script
can be used to view and save the captured network traffic to
pcap file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-12 22:15:02 -04:00
Ievgenii Meshcheriakov
74a5ed7a23 doc: guides: porting: shields: fix Arduino header name
``arduino-header-r3`` was incorrectly referred to as
``arduino-r3-header``.

Signed-off-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@nordicsemi.no>
2021-04-12 11:46:33 -04:00
Maciej Perkowski
22a82bc054 docs: twister: Add section about quarantine feature
Add section about quarantine feature

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2021-04-12 08:42:29 -04:00
Pavel Vasilyev
a94c7e3a23 Bluetooth: Mesh: Introduce acknowledged message API
The implementation of blocking calls is common for all the client
models.

This change reduces the code duplication by introducing new API that
helps to manage acknowledged messages.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-04-08 13:44:24 +02:00
Anas Nashif
39c4b7c8db doc: clarify ENOSYS and ENOTSUP
Clarify usage of ENOSYS vs ENOTSUP and add comment in the release notes
about the recent changes to the APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-07 16:06:48 -04:00
Jukka Rissanen
103fc5e43a net: doc: Add net_capture API documentation
The net_capture API documentation was not referenced by
network documentation so the API reference documentation
was not generated for it. This commit adds links to the
net_capture API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-07 12:12:30 -04:00
Emil Gydesen
026da2df03 Bluetooth: host: Add ISO disconnect reason
Adds a disconnect reason in the ISO disconnect callback.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-04-07 14:16:54 +02:00
Gerard Marull-Paretas
96c7d10a15 doc: use warnings_filter
Replace current filter setup with the warnings_filter Sphinx extension.
Note that current regexes have been simplified to make them more
readable while keeping the most relevant information.

Sphinx warnings are now treated as errors (-W).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-07 14:15:29 +02:00
Gerard Marull-Paretas
74783c1976 doc: extensions: add warnings_filter
warnings_filter is an extension that allows to filter out Sphinx
warnings.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-07 14:15:29 +02:00
Gerard Marull-Paretas
fad358c18e doc: predefine ATOMIC_DEFINE
Predefine ATOMIC_DEFINE in the Doxyfile so that documentation output is
generated correctly. In order to simplify the predefinition
ATOMIC_BITMAP_SIZE has been introduced.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-07 14:15:29 +02:00
Gerard Marull-Paretas
faa74e68c2 doc: disable INLINE_SIMPLE_STRUCTS Doxygen option
This option prevents some structures to have missing pages on the
Doxygen HTML output.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-07 14:15:29 +02:00
Kumar Gala
52b03a2350 doc: Update for SDK 0.12.4
Update docs to reference SDK 0.12.4 that is needed for the recent arm64
split.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-07 07:30:41 -04:00
Martí Bolívar
ecac194448 doc: west: fix submodule update info
Add missing dashes.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-04-06 17:28:39 -04:00
Ioannis Glaropoulos
5bba6b4c05 doc: releases: add note about non-secure cortex-m QEMU runs in CI
Add a note in the 2.6 release notes about configuring QEMU
to run in CI on mps2_an521_nonsecure with TF-M as the secure
firmware component.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-06 15:33:23 +02:00
Martí Bolívar
5332847644 dts: separate DT libraries from gen_defines.py
We are now in the process of extracting edtlib and dtlib into a
standalone source code library that we intend to share with other
projects.

Links related to the work making this standalone:

    https://pypi.org/project/devicetree/
    https://python-devicetree.readthedocs.io/en/latest/
    https://github.com/zephyrproject-rtos/python-devicetree

This standalone repo includes the same features as what we have in
Zephyr, but in its own 'devicetree' python package with PyPI
integration, etc.

To avoid making this a hard fork, move the code that's being made
standalone around in Zephyr into a new scripts/dts/python-devicetree
subdirectory, and handle the package and sys.path changes in the
various places in the tree that use it.

From now on, it will be possible to update the standalone repository
by just recursively copying scripts/dts/python-devicetree's contents
into it and committing the results.

This is an interim step; do NOT 'pip install devicetree' yet.
The code in the zephyr repository is still the canonical location.

(In the long term, people will get the devicetree package from PyPI
just like they do the 'yaml' package today, but that won't happen for
the foreseeable future.)

This commit is purely intended to avoid a hard fork for the standalone
code, and no functional changes besides the package structure and
location of the code itself are expected.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-04-02 08:28:12 -05:00
Jukka Rissanen
e23aca14aa net: doc: Add network monitoring documentation
Add information to documentation how to monitor and capture
received and sent network traffic.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-02 07:24:06 -04:00
Gerard Marull-Paretas
6bf3363089 doc: add comment to empty Python files
Explicitely mention that these files are intentionally empty. These
changes should make compliance checks pass.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
f4edff068f doc: format configuration file
Format the configuration file so that it is more consistent (e.g.
uniform usage of single/double quotes).

Some minor cleanup performed too: removed some comments and a default
setting.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
4b09faf4b9 doc: use pathlib for paths in configuration file
Switch to pathlib to make configuration more readable. sys.exit has been
replaced with an exception so that in case of failure error is displayed
(error details were hidden).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
7abf838394 doc: use regex to parse Zephyr version
Simplify the logic of version extraction by using regexes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
d45079aca1 doc: remove unicode prefix from strings
This is not needed on Python 3.x as it's the default.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
603e875ab8 doc: organize configuration sections better
Organize configuration sections per group (project, general, HTML,
plugin options...).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
0312b0ba7f doc: move imports to the top of the file
Some are not really at the top because of path inserts, but are as up as
possible.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
4114d6e16b doc: simplify some html_context logic
Simplify is_release and docs_title logic and move it closer to where it
is used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
2b9b16360e doc: add configuration reference and remove parameter details
It is easy to have out-of-date comments since Sphinx settings evolve
(defaults, behavior...). A reference to the official documentation is
provided at the top of the file instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
c166f93442 doc: remove settings for unused builders
manpage, texinfo and htmlhelp builders are not used, so remove their
settings as they are redundant.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
b2469e1dec doc: move redirects to a utility module
Isolate the list of redirects in order to improve conf.py readability.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
4d624c0a6e doc: remove Sphinx defaults
Remove settings that are Sphinx defaults in order to simplify
configuration.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
cbe7a78635 doc: remove commented options from config
Remove options that are commented out from conf.py. It improves
readability of the file.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
a4ea28236c doc: move all css files to _static/css
Move all CSS files to the _static/css subfolder.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
bbab8152ce doc: move all js files to _static/js
Move all Javascript files to the _static/js subfolder.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
38b1f7a15e doc: move extensions to _extensions
Move all Sphinx related content to folders prefixed with an underscore.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
3282cf8ef2 doc: move scripts to _scripts
Move Sphinx related content to folders with underscore prefix.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
6b1a7faf92 doc: move static folder to _static
Move static content to _static. It is better to prefix all Sphinx
related folders with an underscore to emphasize that the folder does not
contain actual documentation. Static content gets copied into _static
folder when documentation is built, so it also makes things more
consistent.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Gerard Marull-Paretas
87659aa71b doc: board_porting: fix code block language
Language of the sample dts was not specified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-29 15:40:57 -04:00
Andrzej Puzdrowski
4edce6b7f7 release-note: flash_api_write_protection() deprecation record
Added note on deprecation of the API and description of flash
drivers changes.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-03-29 13:43:55 -04:00
Gerard Marull-Paretas
32b71cbcdc doc: move Makefile to doc folder
Move the top-level Makefile to the documentation folder as it is only
used for documentation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-29 10:59:28 -04:00
Gerard Marull-Paretas
b44fc8a89c doc: enable automatic parallelization
Sphinx supports parallelized build (-j) option. Setting it to `auto`
makes use of all available cores. This option seems to speed up the
build significantly on multi-core machines.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-29 10:59:28 -04:00
Martí Bolívar
c3d3b3dbc8 Bluetooth: remove CONFIG_BT_CTLR_TO_HOST_UART_DEV_NAME
This is now unused.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-29 16:33:51 +02:00
Martí Bolívar
e4c0783bfd doc: add new :dtcompatible: role / directive
This allows RST documentation to do something like this:

   See :dtcompatible:`vnd,foo` for more information.

This is transformed into a link to documentation for the "vnd,foo"
compatible.

Some devicetree compatibles may be handled by multiple bindings.
This can happen when the binding file is bus-dependent. Therefore, to
make this work, we need to change the way gen_devicetree_rest.py works
to ensure we have a good source of information for this compatible
regardless of how many bindings are associated with as follows:

- When only a single binding is associated with a compatible, the
  :dtcompatible: link goes directly to the per-binding HTML page.

- When multiple bindings are associated with a compatible, this goes
  to a new generated "disambiguation" page which links to all the
  per-binding pages.

To avoid clashes, we stick the disambiguation pages into a
compatibles/ subdirectory of the generated bindings index root
directory.

Also reorganize the generated bindings output directory into
.../bindings/subdir/binding.rst files. For example,
dts/bindings/arm/arm,dtcm.yaml now gets its generated content in
.../bindings/arm/arm,dtcm.rst.

This brings the 'category' of binding (like 'sensor', 'i2c', etc.)
into the URL, which is a useful hint.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-29 16:33:51 +02:00
Martí Bolívar
12eece0b22 devicetree: add DT_COMPAT_GET_ANY_STATUS_OKAY()
This is a helper which allows you to skip the intricacies of instance
numbers to express the intent of "give me a random enabled node with
this compatible; I don't care which one".

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-29 16:33:51 +02:00
Daniel Leung
7ce8c77650 doc: guides: x86: how to specify extra page mappings
This adds to page on the x86 virtual memory about how to specify
extra page table mappings during build.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-03-28 08:30:06 -04:00
Carles Cufi
f938cc427e doc: contribute: Rework the process for external code inclusion
As per the agreements in the Process Group Meeting, rework the procedure
to include external code so that it reflects the reality of Zehyr today
with the choice between modules and integration into the main tree, and
decouple the non-Apache v2.0 license side of the question from the
process from importing 3rd-party code.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-03-26 14:48:48 +01:00
Anas Nashif
8fc9dedf4c doc: add oneApi toolchain
Document how to use oneApi toolkit with Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-25 08:54:10 -04:00
Kumar Gala
9f67d1c741 doc: board_porting: Remove unneeded zephyr_include_directories
Remove zephyr_include_directories from example in docs as its not
needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-25 07:23:36 -04:00
Pete Skeggs
7981d2344a doc: shell update with obscured input
Update the shell documentation with the obscured
input feature.

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
2021-03-24 05:44:14 -04:00
Kumar Gala
49858fbd6a doc: release-notes-2.6: Updated for Arm-v8.1m/MPS3-AN547 support
Add note about addition of Arm-v8.1m, Cortex-M55, and MPS3-AN547
support being added.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-23 13:13:32 -05:00
Johann Fischer
e5023b045d doc: release-notes-2.6: add note about disk drivers rework
Add note about disk drivers rework.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
5c7787c912 doc: update disk access docu regarding SD card support
This patch removes sdhc_api references since such API
does not actually exist. SD card controller drivers
use disc driver interface. Accordingly, the SDHC documentation,
which actually describes how to connect a SD card via SPI
and has little to do with SD host controller (SDHC),
is also moved to disk access page and adapted.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Johann Fischer
5678189c27 doc: update disk API documentation
Fix disk access interface description and
update disk API documentation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-23 12:16:01 +01:00
Anas Nashif
a86505b450 doc: device: follow coding guidelines
Do not reuse tag name (misra rule 5.7).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-22 19:48:14 -04:00
Flavio Ceolin
a6183cff87 pm: docs: sys_suspend -> pm_system_suspend
Change references to an old function name.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-03-22 12:42:30 -04:00
Flavio Ceolin
7e3e2093c0 doc: power: General improvements
Add information about power state constraints and more information
about power management policy.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-03-22 12:42:30 -04:00
Kumar Gala
a56bdc4c6c device: remove deprecated device_list_get
device_list_get has been deprecated for 2 releases so remove the code
associated with it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-22 10:15:26 -05:00
Josh Gao
16d2ab790c usb: dfu: give wait_for_usb_dfu an argument
Allow callers to wait for an arbitrary amount of time, instead of always
waiting for a compile-time fixed period.

Signed-off-by: Josh Gao <josh@jmgao.dev>
2021-03-22 12:55:56 +01:00
Mikkel Jakobsen
4cd0199406 doc: update doc footer copyright year
Update the documentation footer copyright year.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
2021-03-19 19:17:20 +01:00
Anas Nashif
c076d94eec kernel: remove tickless idle
This feature predated the tickless kernel and has been in legacy mode
for a while. We now have no drivers or systems that do not support
tickless, so remove this option and cleanup the code to only use
tickless.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-19 11:22:17 -04:00
Anas Nashif
a518f48796 clock: renmae z_timeout_end_calc -> sys_clock_timeout_end_calc
Do not use z_ for internal APIs, z_ is for private APIs within one
subsystem only.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-19 11:22:17 -04:00
Anas Nashif
11779e3faf doc: clocks: link clock APIs from doxygen
Use :c:func: where clock APIs are being used and link the group into
RST.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-19 11:22:17 -04:00
Anas Nashif
9c1efe6b4b clock: remove z_ from semi-public APIs
The clock/timer APIs are not application facing APIs, however, similar
to arch_ and a few other APIs they are available to implement drivers
and add support for new hardware and are documented and available to be
used outside of the clock/kernel subsystems.

Remove the leading z_ and provide them as clock_* APIs for someone
writing a new timer driver to use.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-19 11:22:17 -04:00
Johann Fischer
b5c761373f doc: modbus: update description and add TCP sample references
Update description and add TCP sample references.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-19 15:50:21 +01:00
Johann Fischer
92b11e2645 doc: add Modbus RTU documentation
Add Modbus RTU documentation.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2021-03-19 15:50:21 +01:00
Johann Fischer
91ddb8c9fe usb: hid: allow boot interface Protocol Code to be set per device
Kconfig option USB_HID_PROTOCOL_CODE does not allow to set
boot interface protocol code for specific HID device but
only to set the same value for all device.
Add new API function to allow the application to set
Protocol Code per device. Deprecate USB_HID_PROTOCOL_CODE option.

Fixes: #32778

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-19 09:51:21 -04:00
Kumar Gala
607469616d counters: Remove deprecated APIs
Remove support for counter_read and counter_get_max_relative_alarm as
they have been deprecated for at least 2 releases.  As part of the
removal of counter_get_max_relative_alarm remove the code in all
counter drivers that implemented the API.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-18 19:35:14 -04:00
Kumar Gala
7d35a8c93d kernel: remove arch_mem_domain_destroy
The only user of arch_mem_domain_destroy was the deprecated
k_mem_domain_destroy function which has now been removed.  So remove
arch_mem_domain_destroy as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-18 16:30:47 +01:00
Kumar Gala
b81361609a devicetree: deprecate DT_DMAS_LABEL APIs
Mark all variants of the DT_DMAS_LABEL APIs:
* DT_DMAS_LABEL_BY_IDX
* DT_DMAS_LABEL_BY_NAME
* DT_INST_DMAS_LABEL_BY_IDX
* DT_INST_DMAS_LABEL_BY_NAME

As deprecated in favor of utilizing:

* DT_DMAS_CTLR_BY_IDX
* DT_DMAS_CTLR_BY_NAME
* DT_DMAS_CTLR
* DT_INST_DMAS_CTLR_BY_IDX
* DT_INST_DMAS_CTLR_BY_NAME
* DT_INST_DMAS_CTLR

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-18 06:20:27 -05:00
David Brown
a1533cacdf doc: security: Fix broken link to moved doc
Now that the security process has been moved to its own page, fix a
broken link that was to the current page.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-03-17 17:47:26 -04:00
David Brown
9cf59acf73 doc: security: Move vulnerability reporting to new page
Create a new page containing just the information on reporting security
vulnerabilities, leaving a link behind in the old section.  This will
make it easier to reference this document, rather than it being in the
midst of a larger document.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-03-17 17:47:26 -04:00
Carles Cufi
d2465d6268 debug: Move away from openocd and make it generic
The exported structures that were originally introduced for OpenOCD have
since then been reused for other debugger plugins, including PyOCD and
Segger J-Link.

Rename the Kconfig option and the implementation from openocd to debug
thread info, so that it reflects the fact that this is no longer
specifically tied to OpenOCD.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-03-17 14:43:01 -05:00
Kumar Gala
3a6598054a kernel: remove deprecated mem domain APIs
Remove k_mem_domain_destroy and k_mem_domain_remove_thread as they've
been deprecated for at least 2 releases now.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-17 13:49:36 -05:00
Martí Bolívar
6479073853 doc: west: west init --mr changes for v0.10.1
See release notes for details.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-17 12:50:33 -05:00
Martí Bolívar
696e0da1a5 doc: west: remove some unnecessary 'master' usages
Although a project's default revision is still "master", we can change
some examples around to refer to "main" branches instead, in keeping
with the changes we're making for Zephyr more generally.

We cannot change the default project revision away from "master" in
west v0.10.x, because that would be a schema change. That will have to
wait for v0.11.0.

However, in the meantime, we are making some inclusive language
changes related to 'west init', because the --mr option is not
governed by a schema. These will be documented in the next commit.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-17 12:50:33 -05:00
Daniel Leung
f0a4b5beb2 doc: guides: virtual memory on x86
This adds a new page as a developer guide about virtual memory
on x86.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-03-16 15:03:44 -04:00
Martin Jäger
1aaf508bde task_wdt: add task-level watchdog subsystem
This new subsystem can be used to supervise individual threads. It
is based on a regularly updated kernel timer, whose ISR is never
actually called in regular system operation.

An existing hardware watchdog can be used as an optional fallback if
the task watchdog itself gets stuck.

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-03-15 12:24:54 +01:00
Dominik Ermel
9a64eec848 doc: fs: Add information on samples that utilize VFS
There are several interesting use caseis of VFS scattered around
in samples, for example usage of FAT in RAM in USB mass storage
that are worth mentioning in VFS reference documentation.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-03-12 11:27:04 -05:00
Martí Bolívar
85b6a28f7d doc: coding_guidelines: replace a whitelist replacement
Nothing in the tree is using the "passlist" term in the "blocklist /
passlist" pair. However, west is using "blocklist / allowlist" already
in a released version.

Recommend blocklist/allowlist instead of blocklist/passlist to avoid
having to add yet another possible replacement, since nothing is using
passlist right now.

Note that blocklist/allowlist is in widespread use throughout many
projects, including Chrome.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-12 09:23:54 -05:00
Yasushi SHOJI
a3e0f8c316 doc: Replace *_thread_resource_pool_assign with k_thread_heap_assign
Replace *_thread_resource_pool_assign() in the reference with the new
k_thread_heap_assign() since both k_thread_resource_pool_assign() and
z_thread_resource_pool_assign() has been removed prio to v2.5 (by the
commit c770cab1a3 and 3c2c1d85b0 respectively) along with the
k_mem_pool API removal.

For the resource pool inheritance test, the variables with "res_pool"
string has been replaced by "heap_mem" to align with the documentation
fix.  No functionality has been changed.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2021-03-11 18:22:12 -05:00
Martí Bolívar
d494ee4fb2 doc: west: 0.10.0 and 0.9.1 release notes
Combining these since they are related.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-11 11:08:25 +01:00
Martí Bolívar
287ff22106 doc: west: bump 'manifest: version:' docs
Adjust these for 0.10. This version parses differently as a string vs.
as a float. Document that quoting the value avoids the issue. Make
some other adjustments and improvements for clarity.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-11 11:08:25 +01:00
Marc Herbert
0d8a2bc820 doc: west: submodule 'name' is optional after west 0.9.0
See west commit 02444d058335

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-03-11 11:08:25 +01:00
Martí Bolívar
11f62ec49d doc: west: touch up remotes documentation
Try to make it a bit clearer.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-11 11:08:25 +01:00
Martí Bolívar
86990a7d9e doc: west: projects list is optional in v0.10
Document this fact.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-11 11:08:25 +01:00
Martí Bolívar
1f813bc7a3 doc: west: document west 0.10 group-filter + import behavior
The west 0.9 documentation for group-filter states:

    Only the top level manifest file’s manifest: group-filter:
    value has any effect. The manifest: group-filter: values in any
    imported manifests are ignored.

This turns out to have been a mistake, because all users who import a
manifest which makes some projects inactive will have to also manually
disable the same groups just to get the same default list of projects.

Example manifest fragments showing the issue:

   # my/west.yml
   manifest:
     projects:
       - name: upstream
         import: true

and:

   # upstream/west.yml
   manifest:
     group-filter: [-disabled-group]
     projects:
       - name: i-want-this
       - name: i-do-not-want-this
         groups:
         - disabled-group

As written, my/west.yml will include 'i-do-not-want-this' as an
active project.

This kind of leaky faucet has proven to be an unintuitive and poor
user experience. Users expect to get the default projects without
having to copy the group-filter for everything they import.

We can't reverse this behavior without pushing out a new schema
version, however: manifest schema 0.9, and therefore west 0.9.x, is
doomed to this bad behavior.

What we'll do to move past this is create a new schema version 0.10
that does the right thing, document the 0.10 behavior, and discourage
combining these two features in west 0.9.x.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-11 11:08:25 +01:00
Martí Bolívar
42df0ad925 doc: west: clean up manifest import details
Move the content related to handling imports that refer to multiple
files handled to right after the ordered list which defines the order
that manifests are imported. The current placement at the end of this
docs section was poorly chosen.

Create subsections for how projects and extensions are decided in the
final resolved manifest.

The project revisions in the top level example manifest fragment are
not important here. Remove them for clarity.

The top level manifest file need not be named west.yml now; adjust
accordingly.

This is prep work for adding a new subsection for group-filter.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-11 11:08:25 +01:00
Martí Bolívar
87c9c0cb2c doc: west: fix incorrect docs related to imports
The documentation suggests that 'west update PROJECT' can be done if
PROJECT is defined from some imported manifest. That's actually not
true. Fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-11 11:08:25 +01:00
Martí Bolívar
5f8de51aed doc: west: move 'manifest imports' to bottom of manifest.rst
This diff is deceptively complicated. No text is being added or
removed; the only thing that's being done is that the entire 'Manifest
Imports' section is being moved down below the groups and submodules
sections.

This is prep work for a later commit which will document revised
semantics for mixing 'import' with 'group-filter'. This will make
'group-filter' values compose across imports, so it will be useful to
have documentation for group and group-filter before documentation for
imports. That will let us document the way they work together within
the 'Manifest Imports' section without using concepts that haven't yet
been defined.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-11 11:08:25 +01:00
Martí Bolívar
963b1666f3 doc: release-notes-2.6: document deprecated twister filter
Document dt_compat_enabled_with_alias's replacement,
dt_enabled_alias_with_parent_compat().

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-10 15:09:09 -05:00
Anas Nashif
cd1c2ab6ba samples: move testing -> subsys/testsuite
Move testsuite related items under subsys/testsuite.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-09 17:48:18 -05:00
Kumar Gala
b9ed2d33fd drivers: spi: Remove unused Kconfig symbols
Remove SPI_[0-8] and SPI_[0-8]_OP_MODES Kconfig symbols as no driver
uses them anymore.  We also cleanup board and sample code to remove
use of these symbols.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-09 04:53:46 -05:00
Andy Ross
820c94e5dd arch/xtensa: Inline atomics
The xtensa atomics layer was written with hand-coded assembly that had
to be called as functions.  That's needlessly slow, given that the low
level primitives are a two-instruction sequence.  Ideally the compiler
should see this as an inline to permit it to better optimize around
the needed barriers.

There was also a bug with the atomic_cas function, which had a loop
internally instead of returning the old value synchronously on a
failed swap.  That's benign right now because our existing spin lock
does nothing but retry it in a tight loop anyway, but it's incorrect
per spec and would have caused a contention hang with more elaborate
algorithms (for example a spinlock with backoff semantics).

Remove the old implementation and replace with a much smaller inline C
one based on just two assembly primitives.

This patch also contains a little bit of refactoring to address the
scheme has been split out into a separate header for each, and the
ATOMIC_OPERATIONS_CUSTOM kconfig has been renamed to
ATOMIC_OPERATIONS_ARCH to better capture what it means.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-03-08 11:14:27 -05:00
Gerard Marull-Paretas
e58c151c26 doc: readme: remove list of Python dependencies
Instead of listing Python dependencies in the docs, refer to the
requirements file. This way docs are never out of sync.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-06 09:34:09 -05:00
Gerard Marull-Paretas
1e1a3e3883 doc: readme: group requirements using one tab per platform
It is easier to follow the user guide if each platform has its own tab
for requirements.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-06 09:34:09 -05:00
Julien Massot
3be1c120ad doc: tracing: add ram backend
This add documentation on how to use the tracing ram backend.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-03-06 07:33:59 -05:00
Kumar Gala
19e5a9c061 zephyr: Remove support for deprecated int types
Its been 2 releases since we deprecated the old zephyr integer types.
We can now remove support for the Kconfig option, code, and, test to
allow the old int types to be supported.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-05 04:56:13 -06:00
Anas Nashif
bad2ee780e doc: remove references to shippable
We now use buildkite and GH actions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-04 07:14:11 -06:00
Torsten Rasmussen
3a58b45ced cmake: board_check_revision() also accepts a list of valid revisions
To remove the need of empty config files, the `board_check_revision()`
now accepts a list of valid revisions.

As example:
```
board_check_revision(
  FORMAT MAJOR.MINOR.PATCH
  VALID_REVISIONS 0.1.0 0.5.0 0.10.0
)
```

The code is still compatible with the `<board>_<revision>.conf` changes
so that if different revisions of a board has Kconfig differences, then
there is no need to also specify the list of valid revisions.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-03-04 12:58:43 +01:00
Peter Bigot
b706a5e999 kernel: remove old work queue implementation
Now that the old API has been reimplemented with the new API remove
the old implementation and its tests.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-03-03 20:06:00 -05:00
Peter Bigot
d1affd9118 kernel: default to new work API implementation
Switch the default and clean up some test workarounds.  This will enable
final conversions necessary to transition to the new API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-03-03 20:06:00 -05:00
Peter Bigot
c064239c84 doc: kernel: workqueue: update for new workqueue API
Revise the description of queues, work items, and delayable work items
to reflect the terminology and API provided by the new implementation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-03-03 20:06:00 -05:00
Peter Bigot
44539ed645 kernel: select work queue implementation
Attempts to reimplement the existing work API using a new work
implementation failed, primarily due to heavy use of whitebox testing
in validating the original API.  Add a temporary Kconfig that will
select between the two implementations so we can use the same
identifiers but select which implementation they reference.

This commit just adds the selection infrastructure and uses it to
conditionalize the existing implementation in anticipation of the new
one in the next commit.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-03-03 20:06:00 -05:00
Martí Bolívar
e54ac1d9fe doc: devicetree: bindings: fix outdated info
Inferred bindings (already mentioned above) make some text lower down
a bit inaccurate. Fix it up.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-03 08:18:10 -06:00
Ioannis Glaropoulos
4b2d5d2177 doc: mention the null pointer detection support in the release notes
Added an entry in the release notes for v2.6.0 release,
mentioning the support for null pointer dereferencing
detection.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-03 10:38:29 +01:00
Kumar Gala
72ffe59ef9 devicetree: deprecate DT_IO_CHANNELS_LABEL APIs
Mark all variants of the DT_IO_CHANNELS_LABEL APIs:
* DT_IO_CHANNELS_LABEL_BY_IDX
* DT_IO_CHANNELS_LABEL_BY_NAME
* DT_IO_CHANNELS_LABEL
* DT_INST_IO_CHANNELS_LABEL_BY_IDX
* DT_INST_IO_CHANNELS_LABEL_BY_NAME
* DT_INST_IO_CHANNELS_LABEL

As deprecated in favor of utilizing:

* DT_IO_CHANNELS_CTLR_BY_IDX
* DT_IO_CHANNELS_CTLR_BY_NAME
* DT_IO_CHANNELS_CTLR
* DT_INST_IO_CHANNELS_CTLR_BY_IDX
* DT_INST_IO_CHANNELS_CTLR_BY_NAME
* DT_INST_IO_CHANNELS_CTLR

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-02 11:28:30 -06:00
Jakub Rzeszutko
6675f476a4 doc: shell update with getopt
Update of the shell documentation with getopt feature.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2021-03-01 09:50:32 -05:00
Johann Fischer
7cd92dd40a doc: release-notes-2.6: add note about USB HID macros deprecation
Add note about USB HID macros deprecation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-02-28 16:50:24 -05:00
Johann Fischer
c186e8f3f6 doc: usb: add initial USB HID documentation
Add initial USB HID documentation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-02-28 16:50:24 -05:00
Johann Fischer
374978cba1 doc: usb: move API description to related chapters
Move API description to related chapters.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-02-28 16:50:24 -05:00
Jack Rosenthal
ea9866dc86 shell: add an option for minimal default configuration
The default shell configuration has heavy flash and memory requirements,
requiring project maintainers to set many configuration options to "n"
to keep flash and memory requirements within reason.

This adds a new configuration option, CONFIG_SHELL_MINIMAL, which will
disable flash and memory heavy options by default, and allow project
maintainers to select/imply only the options they want.

On a quick test from an ARM board I'm working on, enabling this option
cut flash space requirements by ~8 KB, and memory requirements by ~1 KB.

Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
2021-02-27 10:26:33 +01:00
Kumar Gala
4aac908973 devicetree: add DT_NODE_FULL_NAME()
This macro returns a node's name with unit-adddress, given its node
identifier.

The node name is useful information for the user to utilize for debug
information, similar to DT_NODE_PATH, or DT_LABEL.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-25 19:24:08 -06:00
Kumar Gala
7b2185bf17 devicetree: deprecate DT_PWMS_LABEL APIs
Mark all variants of the DT_PWMS_LABEL APIs:
* DT_PWMS_LABEL_BY_IDX
* DT_PWMS_LABEL_BY_NAME
* DT_PWMS_LABEL
* DT_INST_PWMS_LABEL_BY_IDX
* DT_INST_PWMS_LABEL_BY_NAME
* DT_INST_PWMS_LABEL

As deprecated in favor of utilizing:

* DT_PWMS_CTLR_BY_IDX
* DT_PWMS_CTLR_BY_NAME
* DT_PWMS_CTLR
* DT_INST_PWMS_CTLR_BY_IDX
* DT_INST_PWMS_CTLR_BY_NAME
* DT_INST_PWMS_CTLR

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-24 13:45:46 -06:00
Spoorthy Priya Yerabolu
0103c5e98f doc: broken link for RFC template
RFC template mentioned in the doc is broken.
Fixing it to direct to the correct one.

Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
2021-02-24 18:08:19 +01:00
Andreas Düring
1ff7a8435b doc: Add Zephyr update instructions to beyond-gsg
Add explicit instructions on how to update the Zephyr
source code. For a beginner, it might not be obvious
how to do that. "west update" sounds like it'd do that,
which is not the case, however.

Signed-off-by: Andreas Düring <gh@duering-andreas.de>
2021-02-23 11:30:51 +01:00
Martí Bolívar
ae2836e867 doc: west: make it clearer how to override the default runner
Though BOARD_FLASH_RUNNER and BOARD_DEBUG_RUNNER are documented in the
debug host tools page, these variables are important enough to deserve
mention in the section dedicated to choosing a runner. Make it so.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-23 10:24:01 +01:00
Kumar Gala
f9c6ee77cc devicetree: deprecate DT_CLOCKS_LABEL APIs
Mark all variants of the DT_CLOCKS_LABEL APIs:
* DT_CLOCKS_LABEL_BY_IDX
* DT_CLOCKS_LABEL_BY_NAME
* DT_CLOCKS_LABEL
* DT_INST_CLOCKS_LABEL_BY_IDX
* DT_INST_CLOCKS_LABEL_BY_NAME
* DT_INST_CLOCKS_LABEL

As deprecated in favor of utilizing:

* DT_CLOCKS_CTLR_BY_IDX
* DT_CLOCKS_CTLR_BY_NAME
* DT_CLOCKS_CTLR
* DT_INST_CLOCKS_CTLR_BY_IDX
* DT_INST_CLOCKS_CTLR_BY_NAME
* DT_INST_CLOCKS_CTLR

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-22 12:20:33 -06:00
Peter Bigot
d554d34137 device: add post-process of elf file to manage device handles
Following the idiom used for system calls, add script support to read
the initial application binary to identify which devices are defined,
and to use their offset in the device array as their unique handle
rather than the externally-defined ordinal from devicetree.  The
device dependency arrays are updated to use these handles.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 15:46:16 -05:00
Kumar Gala
2dd696f544 sdk: Move to SDK 0.12.3
Update ci and docs to reference SDK 0.12.3.  Update to SDK 0.12.3 as
it includes fixes for support ARM Cortex-M55.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-18 11:52:48 -05:00
Ioannis Glaropoulos
3e0251297e doc: release notes: add notes for board/SoC removals
Add entries in the release notes for ARM Musca-A
and nRF5340 PDK board and SoC removals.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-16 08:33:12 -05:00
Anas Nashif
acf42a22fd doc: add draft for 2.6 release notes
Add draft for the 2.6 release notes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-15 16:46:04 -06:00
Daniel Leung
ce44048d46 x86: rename CONFIG_SSE* to CONFIG_X86_SSE*
This adds X86 keyword to the kconfigs to indicate these are
for x86. The old options are still there marked as
deprecated.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-15 08:21:15 -05:00
Ioannis Glaropoulos
2573f4b99c tests: remove nrf5340 PDK boards from test .yml files
Remove references to the nRF5340 PDK boards
from samples and tests .yml files.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-15 07:59:43 -05:00
Anas Nashif
39d7d34710 release: add more fixes issues to notes
Add more resolved issues to notes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-14 09:58:55 -05:00
Anas Nashif
554fca0e5c release: make release notes final
Remove "Working Draft" from title.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-14 09:58:55 -05:00
Anas Nashif
ccc185be63 doc: add 2.5.0 to pick list
Add 2.5 to release list to be shown on documentation side bar.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-14 09:58:55 -05:00
Andrzej Głąbek
c2b5e68953 doc: release-notes-2.5: Add notes for ADC and PWM
Plus one note about the nrf_qspi_nor driver.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-02-12 11:06:40 -05:00
Jennifer Williams
af81648a18 doc: releases: 2.5: add misc x86 to boards and socs
Add misc changes still needed in release notes for
x86 Boards and SoCs after checking their history:
- zefi.py: Use cross compiler while building zephyr
- boards: x86: ehl_crb: Add board variant for Slim Bootloader
- tests: enable the code coverage report for qemu_x86_64
- drivers/timer: Remove legacy APIC driver
- x86: add common memory.ld
- x86: reserve the first megabyte

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-02-11 16:57:12 -05:00
Jennifer Williams
54b7439cae doc: releases: fix format issue in Boards & SoCs
Remove extra space character which is causing wrong format for
the bulleted list.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-02-11 14:38:48 -05:00
Anas Nashif
e8317920b1 release notes: add top level bullets, misc. changes
Add top level bullets and misc. changes to other areas.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-11 12:55:18 -05:00
Anas Nashif
5a605778f8 release: add resolved issues
Add list of all resolved issues since 2.4.0.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-11 12:55:18 -05:00
Johann Fischer
902dd26908 doc: release-notes-2.5: add release notes for USB
Add release notes for USB.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-02-11 08:53:00 -05:00
Anas Nashif
5d1c535fc8 license: add missing SPDX headers
Add SPDX header to files with existing license.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-11 08:05:16 -05:00
Lauren Murphy
2620cefc8e doc: fix typo in modules
Fixes typo in modules documentation.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-02-10 20:34:23 -05:00
Alex Martens
f183d6492f doc: fix typo in condvar documentation
Fixes a typo in the condition variable documentation.
Also fixes two numbered lists not rendering correctly.

Signed-off-by: Alex Martens <alexander.martens@intel.com>
2021-02-10 11:57:59 -05:00
Martí Bolívar
b9ae1f6718 doc: west: improve troubleshooting for west update
Recommend curl -v or ssh -v.

Suggested-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-10 08:53:39 -05:00
Martí Bolívar
1803ddf54e doc: west: clean up example workspace
Suggested-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-10 08:53:39 -05:00
Martí Bolívar
0d0e472b8f doc: improve docs on building without west
Make it more obvious what needs to happen by spelling out the
commands.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-10 08:53:39 -05:00
Martí Bolívar
2f6c315f4f doc: improve manifest key docs
Create tables and Sphinx sections for the sub-keys of a manifest.

List the subsections in the same order they are documented.

This makes it easier to jump around in the document from the table of
contents and see what's in each subkey.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-10 08:53:39 -05:00
Martí Bolívar
f6958322cc doc: add missing docs for 'west zephyr-export'
Something should have been added to zephyr-cmds.rst when this
extension was added.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-10 08:53:39 -05:00
Martí Bolívar
e795a2bcaf doc: update west's workspaces.rst for 2.5
We haven't updated the example revisions in the alternate topologies
sections in a while. Update these for the upcoming 2.5 release.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-10 08:53:39 -05:00
Martí Bolívar
353efd04b1 doc: west: move advanced content out of 'basics'
With the documentation for west 0.9, the 'basics' page is completely
out of control. Reorganize it so it fits in a few pages, moving many
details out into other pages for the truly curious.

As part of this, create new pages for built-in commands (built-in.rst)
and esoteric details about workspaces (workspaces.rst).

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-10 08:53:39 -05:00
Martí Bolívar
fbcdc82067 doc: glossary: update west terms
We've got some obsolete 'west installation' usages kicking around
still.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-10 08:53:39 -05:00
Martí Bolívar
673474b020 doc: clean up west index
Rename the 'basics' page to basics.rst, adding a redirect for the old
title.

Rearrange some other index pages to improve the flow:

- Put relatively stale content in moving-to-west.rst to the bottom. I
  expect pepole have either moved west or are choosing not to.

- Promote the release notes page higher up, since that seems more
  important.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-10 08:53:39 -05:00
Martí Bolívar
e36fc11100 doc: sort redirects
Just to keep things easier to find.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-10 08:53:39 -05:00
Andrzej Puzdrowski
c7f1f2c269 doc: releasenotes 2.5: Add notes on addition fs_dir_t_init
The commit adds notes on addition on fs_dir_t_init function and its
impact on File system API.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-02-10 08:53:17 -05:00
Flavio Ceolin
f270e17b32 doc: security: Update vulnerabilities information
Update CVEs information

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-10 07:14:53 -05:00
Flavio Ceolin
81315757cf doc: release-notes-2.5: crypto libraries
Add information about mbedTLS.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-10 07:14:53 -05:00
Flavio Ceolin
9d7457a586 doc: release-notes-2.5: Vulnerabilities addressed
Add information about vulnerabilities addressed during this release
cycle.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-10 07:14:53 -05:00
Peter Bigot
a31b3c410e doc: drivers: i2c: provide more information on I2C APIs
Although the master API is stable, the slave API has never been
documented and has only two in-tree implementations with no uses
outside of a single test application.  It is marked experimental in
this commit.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-09 13:59:17 -05:00
Peter Bigot
b7da2e258f doc: inclusive language: reference I2C status issue
Status of addressing inclusive language concerns is embedded into the
coding guidelines.  Add a link to the corresponding issue for I2C.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-09 13:59:17 -05:00
Peter Bigot
0866cbcd6c doc: coding guidelines: add an anchor for inclusive language guideline
Documentation for subsystems that use offensive terms by standard may
need to reference this section as justification for their continued
and new use.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-09 13:59:17 -05:00
Flavio Ceolin
5a2f25a7c3 doc: release-notes-2.5: Power management contents
Add some high-level bullets about power management changes in 2.5.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-08 18:02:23 -05:00
Flavio Ceolin
6bae2d5ef0 docs: pm: Update central method diagram
Remove old information about DEEP SLEEP and SLEEP states.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-08 18:01:42 -05:00
Flavio Ceolin
18461fce88 docs: pm: Replace outdated documentation
Power management documentation was still using "deep sleep" and
"sleep" concepts. This commit just remove them, since they are not
longer used, and introduce the new power states defined in pm_state.

As each state has its own meaning and it is documented in the API,
lets just reference them here and avoid getting out of sync.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-08 18:01:42 -05:00
Daniel Leung
0b8fd86784 doc: release-notes-2.5: memory management related items
This adds a few lines about changes to memory management,
introduction of demand paging, and changes to x86 memory
management code.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-08 17:29:32 -05:00
Jennifer Williams
a8c91fd97c doc: release-notes-2.5: boards and SoCs: x86 ehl_crb acrn_ehl_crb
This adds a few lines for newly added board and SoC defintions
for Elkhart Lake (ehl_crb) and ACRN configurations (acrn_ehl_crb).

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-02-08 16:25:29 -05:00
Daniel Leung
c1a41a4490 doc: release-notes-2.5: kernel: add info on thread local storage
This adds a few lines about thread local storage that is being
introduced in this release.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-08 16:24:40 -05:00
Martin Jäger
adfd947fc7 doc: release: Add DAC release notes for v2.5.0
Adding notes regarding new TI driver and enabled support for some
more STM32 series.

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-02-08 16:24:22 -05:00
Carlo Caione
484abf51f2 doc: release: v2.5.0 release notes for ARM AArch64
Zephyr v2.5.0 release notes for AArch64 architecture.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-02-08 14:39:11 -05:00
Ioannis Glaropoulos
7e42108890 doc: release: v2.5.0 release notes for ARM AARCH32
Zephyr v2.5.0 release notes for AARCH32 architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-08 14:38:53 -05:00
Peter Bigot
a00740995b doc: release-notes-2.5: I2C
High-level changes in I2C subsystem since 2.4.0.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-08 12:26:18 -05:00
Eugeniy Paltsev
b9ec64b448 doc: release notes: ARC
2.5 release notes for ARC related changes

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2021-02-08 11:49:21 -05:00
Martí Bolívar
df2980acfe doc: release-notes-2.5: devicetree
New macros etc.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-08 08:26:42 -05:00
Martí Bolívar
78ec3223e7 doc: release-notes-2.5: s/device tree/devicetree/
This is the preferred way to write it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-08 08:26:42 -05:00
Maureen Helm
46d6a73f91 doc: release: Add NXP-related changes to v2.5.0 release notes
Adds v2.5.0 release notes for NXP boards and drivers.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-02-05 17:19:26 -05:00
Maureen Helm
59074044d9 doc: release: Add sensor changes to v2.5.0 release notes
Fills in the sensor drivers section of the v2.5.0 release notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-02-05 17:19:26 -05:00
Martí Bolívar
1d439efbb3 doc: make it clear when DT properties are deprecated
Devicetree properties may be deprecated. Make deprecated properties
more prominent in the generated bindings documentation as follows:

  1. For deprecated node-specific properties, make a new tab which
     only contains the deprecated properties

  2. For deprecated child-binding properties, ensure a line
     mentioning derpecation is in the property details

  3. For deprecated 'base' binding properties, do the same thing as
     child-bindings. Note that there aren't any such properties,
     but they'd fall in this bucket if we add any later on.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-04 13:11:01 -05:00
Peter Bigot
76ebe71fcb doc: data structures: fix description of sflist
Fix a confusing type and clarify what the alternative data structure
adds.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-04 11:57:55 -05:00
Lauren Murphy
ca742c76a9 doc: fix typos in mutex
Fixes typos in mutex documentation accidentally introduced by #31855.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-02-04 10:32:56 -05:00
Jukka Rissanen
599f21da62 doc: net: Add networking changes to 2.5 release note
Initial set of networking related changes in 2.5 release.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-02-04 09:37:18 -05:00
Torsten Rasmussen
2bf26ecf4d cmake: modules: remove Zephyr module duplicates from ZEPHYR_MODULE_NAMES
This allows users to overrule a module from command line.
As example, the Zephyr build system loads the module FOO from
`modules/FOO`, but user has a custom FOO locally at `custom/FOO` and
would like to use this module instead of manifest specified.

If user does `-DZEPHYR_EXTRA_MODULES=custom/FOO` the following error
will be seen:
```
The binary directory

  build/modules/FOO

is already used to build a source directory.  It cannot be used to build
source directory

  custom/FOO

Specify a unique binary directory name.
```

Removing duplicates from the list allows a user to use
`-DZEPHYR_EXTRA_MODULES=custom/FOO` and thus replace `modules/FOO` for
the current build.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-02-03 16:58:28 -05:00
Carles Cufi
8ea91311fa doc: gsg: Update Homebrew installation for macOS
Homebrew now uses bash instead of Ruby to install itself. Use the
recommended command instead of the old one.

Fixes #30037.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-02-03 11:06:33 -05:00
Anas Nashif
2e9e241f29 ci: add action to create release
Action to create release when tag is pushed. This will additionally
create an SPDX file and the changelog since the last tag.

The release is created as a draft and will have to be modified by the
release engineer and published when ready.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-03 09:55:18 -06:00
Carles Cufi
cf946d3365 doc: extensions: Fix generator being ignored in west
The generator option was being ignored in the west build instructions.
Include it now for the case of Makefiles, since west defaults to ninja
on all platforms.

Fixes #29790.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-02-03 09:46:13 -05:00
Maureen Helm
3b4d2fcab9 doc: Add inclusive language coding guideline
Adds a new inclusive language coding guideline that prohibits
introducing new usage of offensive terms like master/slave and
blacklist/whitelist.

Adds a skeleton table that documents existing usage of offensive terms
and conversion status in affected subsystems. This table is incomplete
and needs to be filled in by subsystem maintainers.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-02-02 22:53:54 -05:00
Ioannis Glaropoulos
7471729273 doc: release notes: a note for changing the default FP mode in ARM
Adding a note in the v2.5.0 release notes to reflect
that we have changed the default FP services mode from
unshared to shared, for ARM Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-02 17:58:58 -05:00
Ioannis Glaropoulos
099e9216d4 arm: cortex_m: update docs to reflect the lazy stacking functionality
Update the documentation for Lazy Stacking in Cortex-M, to
reflect the functionality changes (activate the lazy stacking
dynamically when building with MPU stack guards).

Make a note that the FP sharing mode is now default in Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-02 17:58:58 -05:00
Torsten Rasmussen
562717422d doc: dts: improve the DTS overlay file description for board revisions
Improve the DTS overlay description by adding information that a
`boards/<BOARD>_<REVISION>.overlay` will be merged with
`boards/<BOARD>.overlay` if both files exists.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-02-02 14:02:13 -05:00
Lauren Murphy
d922fed7f7 doc: Fix sys_mutex and futex missing documentation
Adds API reference for sys_mutex and futex to mutex documentation,
adds Doxygen documentation for SYS_MUTEX_DEFINE and fixes typo in
futex documentation.

Fixes #27829

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-02-02 14:01:57 -05:00
Erwan Gouriou
e36aece07e doc: release-notes-2.5: Shields Additions
Add mention for Sharp generic shield addition.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-02-02 12:30:08 -05:00
Erwan Gouriou
5be45d827d doc: release-notes-2.5: STM32 Additions
STM32 additions for V2.5.0 release.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-02-02 12:30:08 -05:00
Peter Bigot
067530e453 doc: kernel: add sleep as a defined term
The scheduler documentation was updated before to define a reschedule
point, but the related term sleep was not clearly described.  Add a
definition, and link to it from the API terminology.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-02 12:05:29 -05:00
Joakim Andersson
b20b5c0d44 Bluetooth: host: Deprecate the bt_set_id_addr API function
Deprecate the bt_set_id_addr API function. This is merely a wrapper
for the bt_id_create function now, except an IRK cannot be given.
When CONFIG_BT_PRIVACY is enabled an IRK has to be given by the
application because the bt_rand function cannot be called before
bt_enable.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-02-02 08:46:17 -05:00
Dominik Ermel
c8d1c3ba2c doc: releasenotes 2.5: Add notes on addition fs_file_t_init
The commit adds notes on addition on fs_file_t_init function and its
impact on File system API.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-02-02 07:36:44 -05:00
Henrik Brix Andersen
e9f386a62c doc: releases: 2.5: add EEPROM release notes for v2.5
Add EEPROM release notes for v2.5.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-02-02 07:17:49 -05:00
Peter Bigot
d91fd612a1 doc: release: 2.5: document deprecated littlefs Kconfig options
Note that Kconfig options related to the filecache memory pool have been
deprecated and replaced by a Kconfig option for configuring the
filecache heap size.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-02 07:15:17 -05:00
Peter Bigot
1ee82a1c9b doc: release: 2.5: note build-time resolution of device pointers
Document the existence of new API to retrieve device pointers at build
time.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-01 22:10:51 -05:00
Andy Ross
eb52f98305 release-notes-2.5: Note k_mem_pool removal
This is a removed API, should be called out here.  Also include a
behavioral note, as I don't think we did in release notes this when
k_heap was introduced.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-02-01 21:41:19 -05:00
Alexander Wachter
681173c9ed doc: releasenotes 2.5: Add CAN driver release notes
This commit adds the release notes for the 2.5 releas for
the CAN driver.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-01-31 10:21:15 -05:00
Joakim Andersson
c14da53772 Bluetooth: host: Remove the deprecated bt_conn_create_slave_le function
Remove the deprecated bt_conn_create_slave_le function.
This was deprecated in the 2.3.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00
Joakim Andersson
016b580beb Bluetooth: host: remove deprecated bt_conn_security function
Remove the deprecated bt_conn_security function.
This has been deprecated in the 2.3.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00
Joakim Andersson
58e4263efb Bluetooth: host: Remove deprecated connection create API functions.
Remove the deprecated connection create API functions.
These have been deprecated in the 2.3.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00
Joakim Andersson
6485a660fe Bluetooth: host: Remove the deprecated Advertising Types definitions
Remove the deprecated Advertising Types definitions.
These have been deprecated in the 2.3.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00
Joakim Andersson
5f2a9ba8e4 Bluetooth: host: Remove deprecated security defines
Remove the deprecated security level define and the HCI error
code for authentication failure.
These have been deprecated since the 2.0.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00
Joakim Andersson
a0d62f03a0 Bluetooth: host: Remove deprecated scan filter duplicate params
Remove the deprecated scan filter duplicate enum values and parameter.
This was deprecated for the 2.3.0 release.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-01-29 12:53:10 -05:00
Peter Bigot
dfd8e7522d doc: release: 2.5: add regulators API
Document the existence of the new API that allows constrol of power
management infrastructure, and support for associating power management
dependencies in devicetree.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-28 17:46:15 -05:00
Martí Bolívar
ac9fde5be6 doc: west reserves refs/west/
These Git refs are used by west as a scratch space. Let that be known,
but don't make any other guarantees.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Martí Bolívar
ed4d218abe doc: west: release notes for 0.9.0
The main new features are submodule support and project groups.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Martí Bolívar
fbcdb7e554 doc: west: API changes for 0.9.0
These are minimal.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Martí Bolívar
43a7f71332 doc: west: update schema version
West 0.9 has a new schema version; document it and fix a missed update
from 0.8. Whoops.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Martí Bolívar
8725ba8ae3 doc: west: add submodules
West 0.9, now with submodules!

This is a new feature which allows you to incorporate a project's Git
submodules into the workspace.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Martí Bolívar
a4bb1faec5 doc: west: add project groups
This is a new feature that allows you to associate projects with
groups, then force west to ignore a subset of the projects list by
disabling project groups. This can be selectively overridden via
configuration file to make west stop ignoring the projects within an
individual workspace.

An example use case is to define a project whose Git repository
requires credentials to pull. Putting such a project in a group named
"foo" and disabling group "foo" would make "west update" ignore the
project unless the user specifically configures the workspace to allow
"foo". After that, "west update" will pull the project as usual.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Martí Bolívar
560f685213 doc: west has moved to allowlist/blocklist
The west manifest import feature now uses the terms "allowlist" and
"blocklist" instead of "whitelist" and "blacklist", respectively.

The old terms are still supported by the tool for compatibility, but
the docs for this feature are going to use the new terms exclusively.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Martí Bolívar
3262b09b05 doc: re-work west update to prep for new features
The west update docs mix together the steps for updating a project
with the set of projects that are being updated. This is inconvenient
now that west 0.9 has a concept of inactive projects.

Split the content into a part that describes *which* projects are
updated, and a separate part that describes how *each* project is
updated.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Martí Bolívar
04f8bb7e78 doc: west: add manifest.file config option
I never added documentation for this option; whoops.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Martí Bolívar
7fe7695d01 doc: west update can create loose commits
Try to spell out the implications of that a bit more clearly.

Suggested-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-28 08:23:52 -05:00
Flavio Ceolin
e58024b45a doc: scheduling: Remove ambiguous sentence
The documentation example was giving the impression that time slices are
not reset when a thread is scheduled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-27 16:55:58 -05:00
Andrzej Puzdrowski
830eb58290 manifest: fix MCUboot build after #31404
MCUboot version with bugfix for following issue:
CONFIG_LOG_MINIMAL was replaced by
CONFIG_LOG_MODE_MINIMAL by
zephyrproject-rtos/zephyr#31404 which
broke MCUboot default build.

fixes #31640

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-01-27 13:35:13 -05:00
Peter Bigot
8528e45897 lib: cbprintf: add libc f/printf substitutes
This allows applications that may not use minimal libc avoid the cost
of a second printf-like formatting infrastructure by using printfcb()
instead of printf() for output.  It also helps make sure that the
formatting support (e.g. floats) is consistent between user-directed
output and the logging infrastructure.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-27 13:34:06 -05:00
Peter Bigot
8f682bf9ef doc: fix sorting of predefined
Put the PM-related defines together, in the correct position.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-27 13:34:06 -05:00
Eugeniy Paltsev
664a7894a8 doc: ARC: add info page with Zephyr support status on ARC
As of today, Zephyr misses any kind of info page with overall
support status of ARC processors, their HW features and SW tools.

Fix that.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2021-01-27 11:45:24 -05:00
Carles Cufi
520154dbd0 doc: west: Fix config overrides
Fix the documentation of the usage of --*-file, which were renamed from
--kernel-*.

Fixes #31630.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-01-26 16:23:37 -05:00
Gerson Fernando Budke
a274eb17bf doc: release: 2.5: Add note about west bossac runner
Add release note about improvements in west bossac runner.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-26 19:00:29 +01:00
Gerson Fernando Budke
ee4d75203b doc: release: 2.5: Add note about TagoIO network cloud sample
Add 2.5.0 release note about TagoIO IoT Cloud sample.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-26 19:00:29 +01:00
Gerson Fernando Budke
f449481e87 doc: release: 2.5: Add notes about Atmel related changes
Adds 2.5.0 release notes for Atmel boards and drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-01-26 19:00:29 +01:00
Gerson Fernando Budke
a1663fe041 doc: release: 2.5: Add notes about Inventek es-WIFI changes
Adds 2.5.0 release notes for Inventek es-WIFI driver.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-01-26 19:00:29 +01:00
Gerson Fernando Budke
1a83f4836d doc: release: 2.5: Add notes about Cypress related changes
Adds 2.5.0 release notes for Cypress SoCs, boards, and drivers.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-01-26 19:00:29 +01:00
Gerson Fernando Budke
61b0801b18 doc: release: 2.5: Add release notes about UpdateHub changes
Add release notes related to improvements made in UpdateHub sample.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2021-01-26 19:00:29 +01:00
Hubert Miś
0475cd0eae net: coap: Allow encoding packets using data from constant buffers
Token and payload are appended from data buffers to a CoAP packet
being encoded. Keyword const was missing for parameters in functions
appending these parts to a packet.

Now token and paylod can be copied to CoAP packet from constant
buffers, that can be stored in ROM.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-01-26 06:17:41 -05:00
Krzysztof Chruscinski
7f08061f0c logging: Revamp menuconfig
Clean up logging menuconfig by grouping configuration into
sections like: mode, processing configuration, backends.

Additionlly, removed LOG_ENABLE_FANCY_OUTPUT_FORMATTING which is no
longer in use.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-01-26 06:15:42 -05:00
Kumar Gala
536be8f005 sdk: Move to SDK 0.12.2
Update ci and docs to reference SDK 0.12.2

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-01-25 12:30:49 -05:00
Peter Bigot
affa7a1c7e Revert "device: add post-process of elf file to manage device handles"
This reverts commit 40d3653758.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-23 18:01:03 -05:00
Torsten Rasmussen
11016415dd doc: supporting module Kconfig code in module ext root
Fixes: #31486

Sourcing `cmake/extensions.cmake` to have Zephyr functions available
when including Zephyr CMake files into doc build system.

This is a follow up on #30904 by supporting generated Kconfig files
that might contain lines as `osource "$(ZEPHYR_<MODULE_NAME>_KCONFIG)"`
to be properly parsed for doc building.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-22 15:22:32 -05:00
Flavio Ceolin
321ce7fb77 power: Use substate-id in pm subsystem
Change subsystem to use struct pm_state with substate-id instead of
using only the power state category.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-22 09:31:20 -05:00
Flavio Ceolin
d21cfd5f36 power: Remove power management conditionals from code
Remove conditionals (PM_DEEP_SLEEP_STATES and PM_SLEEP_STATES) from
power management code. Now these features are always available when
power management is enabled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-22 09:31:20 -05:00
Flavio Ceolin
579f7049c7 power: Move pm subsystem to new power states
Migrate the whole pm subsystem to use new power states information
from power_state.h and get states and residency properties from
device tree.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-22 09:31:20 -05:00
Daniel Leung
d3218ca515 debug: coredump: remove z_ prefix for stuff used outside subsys
This removes the z_ prefix those (functions, enums, etc.) that
are being used outside the coredump subsys. This aligns better
with the naming convention.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-01-21 22:08:59 -05:00
Martí Bolívar
e8f12344b0 doc: dts: improve 'get zephyr.dts' HOWTO
Tweak the language to try to be more clear in the HOWTO entry for
looking at a board's devicetree.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-21 17:21:13 -05:00
Flavio Ceolin
c2b2462e70 doc: build: Change a header position
The pre-build header was after its introduction paragraph.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-21 17:20:15 -05:00
Flavio Ceolin
2185c5b399 doc: build: Missing italic
Just using italic when referencing a script. Following this
documentation pattern.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-21 17:20:15 -05:00
Andy Ross
8ccd506966 doc: Clean up docs on thread termination behavior
Discussion about how to re-spawn threads led to the discovery that our
documentation on exactly when that was legal was ambiguous and
confusing.  Rewrite it to be explicit.

Fixes #28970

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-01-21 16:48:01 -05:00
Rubin Gerritsen
76c5707639 bluetooth: controller: Disable Coded PHY by default.
Coded PHY is only enabled by default if the application is using
BT_HCI_RAW.

Coded PHY is not needed in most applications.
By disabling Coded PHY, most applications will:

* Get smaller in terms of flash and ram usage
* Not get vurnerable to devices trying to switch to Coded and
  thereby increasing power consumption.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-01-21 15:57:48 -05:00
Peter Bigot
40d3653758 device: add post-process of elf file to manage device handles
Following the idiom used for system calls, add script support to read
the initial application binary to identify which devices are defined,
and to use their offset in the device array as their unique handle
rather than the externally-defined ordinal from devicetree.  The
device dependency arrays are updated to use these handles.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-21 14:49:04 -06:00
Andrei Emeltchenko
e18379c474 edac: doc: Include EDAC API to Zephyr API Reference
Include EDAC API to generated Zephyr API Reference.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Dawid Niedzwiecki
d1948dc164 emul: espi: Add support for eSPI emulators
Add an emulation controller which routes eSPI traffic to attached
emulators depending on the selected chip(mostly host).
This allows drivers for eSPI peripherals to be tested on systems
that don't have that peripheral attached, with the emulator handling
the eSPI traffic.

Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
2021-01-20 17:49:19 -05:00
Anas Nashif
13fdb9e73d doc: update docs with 0.12.1 SDK
Update documentation with new SDK version.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-20 16:45:31 -05:00
Peter Bigot
7b3dc4856a doc: add a section for timeutil APIs
Describe the role of these APIs, key concepts that they depend on, and
expose the low-level API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-20 16:38:56 -05:00
Anas Nashif
c92ad609b3 MAINTAINERS: update guidelines
Update guidelines regarding updates to maintainers in the MAINTAINER
file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-20 12:21:42 -05:00
Anas Nashif
ccb236f177 MAINTAINERS: replace CODEOWNERS
The Maintairs file will be used to replace the code owners file and will
be used to add reviewers (collaborators + maintainers of affected
areas).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-20 12:21:42 -05:00
Andrzej Puzdrowski
2931caac7c doc/release-note: mcuboot bootutil_public library record
Added note on MCUBoot's bootutil_public library
introduction.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-01-20 14:49:44 +01:00
Torsten Rasmussen
3d88083bf1 cmake: zephyr modules: sanitize all module name when used as variable
The introduction of Zephyr module glue code in the Zephyr repository
introduces a Kconfig variable in the form of:
`config ZEPHYR_<MODULE_NAME>_MODULE`.

All Kconfig variables go into `autoconf.h`, therefore it is necessary
to sanitize the Kconfig variable, so that it does not contain special
characters. To ensure consistent variable name, then the module name
will be sanitized in all variable use in both Kconfig and CMake.
The sanitization is done be replacing all special characters with an
underscore, `_`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-20 12:59:19 +01:00
Martí Bolívar
8fef65392d devicetree: add DT_SAME_NODE()
It can be useful to check if an unknown devicetree node identifier
refers to a known node. Add a helper for this. Under the hood, we take
advantage of the ordinals API, which provides the unique identifiers
we need.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-19 16:06:55 -05:00
Anas Nashif
f862972f35 doc: add documentation for condition variables
Add documentation for condition variables in the synchronization section
of the kernel.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-19 08:55:47 -05:00
Alexander Wachter
f0145f9f3e doc: CAN: Fix code in CAN API documentation
Fix code sections in the doc.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-01-18 23:26:30 -05:00
Alexander Wachter
c8cbf0177a doc: can_api: Update the CAN documentation after API update
This commit is the documentation update after the API rework.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-01-18 23:26:30 -05:00
Robert Lubos
538e19ee2e net: coap: Rework pending retransmission logic
Introduce retransmission counter to the coap_pending structure. This
allows to simplify the retransmission logic and allows to keep track of
the number of remaining retranmissions.

Additionally, extend the `coap_pending_init()` function with `retries`
parameter, which allows to set the retransmission count individually for
each confirmable transaction.

Fixes #28117

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-01-18 23:22:37 -05:00
Dominik Ermel
6c60414059 mgmt: mcumgr: Add support for enabling Direct-XIP app address check
The commit adds Kconfig option:
  CONFIG_IMG_MGMT_REJECT_DIRECT_XIP_MISMATCHED_SLOT
that enables verification of base address Direct-XIP binary, upon
upload, and rejects binaries that would not be able to start from
available address.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-01-18 16:59:29 -05:00
Peter Bigot
3e46ae1acb drivers: flash: nrf_qspi: rework handling of quad-enable bit
Kconfig allowed selecting any bit in the status register as the QE
bit, and defaulted it to 6.  Devices need not require a QE bit at all,
and where JESD216 defines QE bit location the only place in first SR
byte that it can be is bit 6.  Further, the code unconditionally wrote
the value 0x40 without respecting configuration of other bits.  Some
of those bits control write protection of block-protected areas and
should not be changed.

Remove the Kconfig, instead using the jedec,jesd216-controlled
devicetree property.  Allow the driver to recognize whether or not
setting the bit is required, and when it is only use bit 6.  Only
update if the setting does not match the configuration.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-18 16:58:09 -05:00
Torsten Rasmussen
2a9d803a98 doc: documenting the depends feature in Zephyr modules
Fixes: #29549

This commit documents the Zephyr module `depends` feature.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-18 21:53:20 +01:00
Torsten Rasmussen
3b57841497 doc: Zephyr modules naming
Adding documentation regarding how Zephyr modules are named.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-18 21:53:20 +01:00
Torsten Rasmussen
dc2c3ea4dd doc: documenting module_ext_root feature
This commits adds documentation on the Zephyr module ext root feature.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-01-18 18:02:46 +01:00
Martí Bolívar
9633d2ac61 doc: dts: add link from bindings guide to bindings index
We recently added a generated devicetree bindings index. Link to it
from the bindings page in the Guides section of the documentation so
it's easier for beginners to find.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-16 07:59:27 -06:00
Martí Bolívar
00ffc7e7b7 devicetree: add DT_NODE_PATH()
This macro returns a node's full path, given its node identifier.

The entire path to a node is useful information for the user which can
be added to build-time error messages.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-16 07:59:27 -06:00
Nicolas Pitre
7a22a4bdf6 heap: clean up some size related issues
First, the maximum heap size must fit in 31 bits worth of chunks
because the internal 32-bit field holding the size is shared with
the `used` bit.

Then the mention of a 256-byte block in the doc is no longer
relevant. That pertained to the previous allocator implementation.

And ditto for the HEAP_MEM_POOL_MIN_SIZE kconfig option.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-01-15 12:08:20 -05:00
Erwan Gouriou
b711028539 scripts/Kconfig: Add dt_node_has_prop Kconfig function
Add dt_node_has_prop function to query the presence of 'prop'
for given node label.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-01-15 10:29:30 -05:00
Peter Bigot
2b7a27e314 doc: clarify api design guidelines for optional API
There has been discussion about whether invocations of optional API
that has been disabled should:

1. result in a link-time error because the API implementation is not
provided; or

2. result in a run-time error by having a trivial implementation that
returns -ENOTSUP.

Clarify that the intent of the guideline is that a link-time error
should be produced.  The rationale is that it is too easy to disable
the option at build time, and not discover it because the application
fails to check for a `-ENOTSUP` return.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-15 09:50:40 -05:00
Maureen Helm
f63385204c linker: arm: Add cortex_m itcm section
Adds a linker section for Cortex-M instruction tightly coupled memory
(ITCM), similar to the existing section for DTCM. A new executable MPU
region is not added as there isn't currently a need to make this section
accessible to user mode. This section can be enabled by setting a device
tree chosen node zephyr,itcm.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-01-15 14:51:20 +01:00
Andy Ross
e956639dd6 kernel: Remove CONFIG_LEGACY_TIMEOUT_API
This was a fallback for an API change several versions ago.  It's time
for it to go.

Fixes: #30893

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-01-14 21:33:16 -05:00
Marc Herbert
d7ac0e08fc doc: west: add note about west update --keep-descendants option
The previous and short description wasn't enough for me to understand
the interesting trade-off of --keep-descendants, thanks to
@mbolivar-nordic for clarifying this on Slack.

For reference this option was added in west commit 11b8588303 part of
https://github.com/zephyrproject-rtos/west/pull/165/

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-14 16:24:53 -06:00
Henrik Brix Andersen
94ae6fcb9b manifest: update mcuboot
Synchronized up to:
e512181609

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-14 16:54:20 +01:00
Torsten Rasmussen
81746d1893 doc: Application <BOARD>_<revision>.overlay description
This commit is a follow-up to #29990 with added board adjustment files
for shields and DTS overlay description.

It adds `boards/<BOARD>_<revision>.overlay` and
`boards/<BOARD>_<revision>.conf` to the list of files containing board
specific adjustments.
It also adds `<BOARD>.conf` to the documentation, as this has always
been supported but not described in shield docs.

It documents the possibility of using
`boards/<BOARD>_<revision>.overlay` files for DTS adjustments to
specific board revisions.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-14 08:09:34 -06:00
Henrik Brix Andersen
77b8440fd1 drivers: pwm: add API for capturing pwm pulse width and period
Extend the PWM API with optional API functions for capturing PWM pulse
width and period cycles.

Fixes #26026.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-12 19:43:06 +01:00
Peter Bigot
92324d9a4d doc: dts: update howtos with new API
Document the use of DEVICE_DT_GET() to fetch device pointers at
compile time, and update the documentation on defining device
instances to use the devicetree macros.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-12 12:19:15 -06:00
Kumar Gala
86e98f0894 device: deprecate DEVICE_AND_API_INIT
Make DEVICE_AND_API_INIT deprecated in favor of DEVICE_DT_INST_DEFINE
or DEVICE_DEFINE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-01-12 08:31:12 -06:00
Flavio Ceolin
ff0c1a48d2 doc: build: Add missing script info
gen_app_partitions.py was missing.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-10 15:36:57 -05:00
Krzysztof Chruscinski
712ff3298b doc: kernel: other: ring_buffers: Add Kconfig option description
Added section with configuration options.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-01-07 16:54:59 -05:00
Martí Bolívar
7097e1785d doc: improve west's repo-tool.rst
Various improvements to the west repo-tool.rst page and pages that
link to it:

Rename the page title to "Basics", since it documents, well the
basics, including built-in commands like "help" an "config" that are
not directly related to multiple repositories.

The "multi-repo" term was invented before we started using
"workspace". Drop it from the text and rework things using words like
"workspace", "basics", or "built-ins" instead, which read better.

We've been using west for a long enough time that justifying its
existence prominently at the start of this page is no longer
necessary; move that to the "dustbin of history" page (why.rst).

Try harder to clarify exactly what a "project" is, along with other
workspace related clarifications.

Improve the documentation for the west init and west update commands,
and create :ref: targets for linking directly to them for convenience
elsewhere in the docs.

Slim down the usages for other built-in commands, so we don't have to
keep those up to date as carefully each release. This is about to be
important for west 0.9, which is going to change the detailed
semantics for the "[PROJECT ...]" part of each command synopsis in a
way that will be inconvenient to duplicate for each of these.

Move the "Topologies supported" content lower down. Try to help the
reading flow by letting people get familiar with a workspace and what
you can do with it using the Zephyr GSG workspace that they probably
already have before overwhelming them with other possibilities and
choices.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-07 17:16:35 +01:00
Peter Bigot
acd43cbaac net: timeout: refactor to fix multiple problems
The net_timeout structure is documented to exist because of behavior
that is no longer true, i.e. that `k_delayed_work_submit()` supports
only delays up to INT32_MAX milliseconds.  Nonetheless, use of 32-bit
timestamps within the work handlers mean the restriction is still
present.

This infrastructure is currently used for two timers with long
durations:
* address for IPv6 addresses
* prefix for IPv6 prefixes

The handling of rollover was subtly different between these: address
wraps reset the start time while prefix wraps did not.

The calculation of remaining time in ipv6_nbr was incorrect when the
original requested time in seconds was a multiple of
NET_TIMEOUT_MAX_VALUE: the remainder value would be zero while the
wrap counter was positive, causing the calculation to indicate no time
remained.

The maximum value was set to allow a 100 ms latency between elapse of
the deadline and assessment of a given timer, but detection of
rollover assumed that the captured time in the work handler was
precisely the expected deadline, which is unlikely to be true.  Use of
the shared system work queue also risks observed latency exceeding 100
ms.  These calculations could produce delays to next event that
exceeded the maximum delay, which introduced special cases.

Refactor so all operations that use this structure are encapsulated
into API that is documented and has a full-coverage unit test.  Switch
to the standard mechanism of detecting completed deadlines by
calculating the signed difference between the deadline and the current
time, which eliminates some special cases.

Uniformly rely on the scanning the set of timers to determine the next
deadline, rather than assuming that the most recent update is always
next.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-07 11:14:38 +02:00
Martí Bolívar
5f926ed09a boards: nordic: remove unnecessary nrfjprog.py args
The --nrf-family argument has been unnnecessary since 6628a16
(" runners: nrfjprog: boilerplate and recover rework").

Remove a few stragglers that are still using it, to avoid it being
copy/pasted into other board definitions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-06 07:54:55 -06:00
Henrik Brix Andersen
38ae2f9cda drivers: eeprom: mark the EEPROM API as stable
Mark the EEPROM API as stable for the upcoming Zephyr v2.5.0. The EEPROM
API was introduced in Zephyr v2.1.0 and has not seen any changes since.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-05 18:02:54 +01:00
Jordan Yates
5c7151b02c doc: net_buf: document remove functions
Document the existance of the `net_buf_remove_*` family of functions.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-01-05 14:31:13 +02:00
Jordan Yates
4b7e236290 doc: net_buf: document net_buf_push_mem
Document existance of the new function.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-01-05 14:31:13 +02:00
Fabio Utzig
201a8d29cd doc: scripts: fix parsing directive inside literal
This expands the current directive matching regex in the extract_content
script to also allow "`" as an ending character along with spaces; it
fixes issues when directives are added inside a literal ("``"), when
they are used as examples that are not to be interpreted by the docutils
state-machine, but are "accepted" by extract_content.

Technically this is not correct, a directive must always end in
space-like characters,  but a proper parser knows that it is inside a
literal and accept the contents without interpretation; short of
implementing a proper rST parser this "band-aid" fix should work with no
side-effects.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-12-21 13:23:03 +01:00
Peter Bigot
15b19f03dc doc: kernel: expose function
k_thread_system_pool_assign() is referenced at in the memory pool API
documentation and used in multiple tests, but generated documentation
was excluded by preprocessor condition.  Add a PREDEFINED to expose
it.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-12-20 12:38:39 -05:00
Tomasz Bursztyka
e9cf9d0325 doc: Adding ivshmem general and API documentation
A quick summary on what is ivshmem and its Zephyr driver API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-12-16 18:47:35 -05:00
Peter Bigot
96fa707e0c Revert "drivers: move eeprom_slave driver to tests directory"
This reverts commit cabbd916cf.

This is considered to be useful enough that it should be restored
as a stable Zephyr API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-12-16 16:39:49 -05:00
Torsten Rasmussen
0f4fc9943c doc: added description for board revision
This add documentation for the `-DBOARD=<board>@<revision>` feature.

Organized in a user-visible portion in the application development
guide, and implementation details in the board porting guide.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-12-16 08:50:10 -05:00
Stephan Walter
5836e30fc1 doc: End time comparison is wrong in my_wait_for_event sample code
We need to loop while `end` is still in the future and thus larger
than the current uptime, not smaller. Also fix indentation.

Signed-off-by: Stephan Walter <stephan.walter@swissphone.com>
2020-12-16 14:28:01 +01:00
Fabio Utzig
76bfc02345 doc: add initial mcumgr documentation
Add an initial mcumgr documentation to the device management guide,
avoiding the need to redirect a user to the upstream documentation.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-12-15 11:19:01 +01:00
Anas Nashif
7883eedfde doc: rename sanitycheck -> twister
Replace leftover sanitycheck mentions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-14 14:13:16 -05:00
Anas Nashif
0ce662f29d doc: thread-analyzer: document THREAD_RUNTIME_STATS
Add details about THREAD_RUNTIME_STATS and how it can be used and
document how the feature can be used with an example.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-14 13:00:47 -05:00
Maik Vermeulen
4cfd2a1943 net: lwm2m: Added execute arguments support
A dedicated LwM2M execute callback type has been implemented which
supports execute arguments. The lwm2m engine, lwm2m_client sample and
lwm2m objects have been updated accordingly. Also the API change has
been documented, and the lwm2m engine reference has been updated.

Fixes #30551.

Signed-off-by: Maik Vermeulen <maik.vermeulen@innotractor.com>
2020-12-13 15:39:08 -05:00
Anas Nashif
a05d056943 ci: rename sanitycheck -> twister
Change all CI scripts to use the new script name: twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 14:13:02 -05:00
Anas Nashif
99e6a8b999 doc: rename sanitycheck -> twister
Change documentation to use new name for sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 14:13:02 -05:00
Anas Nashif
94f6826d28 sanitycheck: move release data to release/
Move the CSV files with release related data out of the python directory
into scripts/releases, which is more appropriate.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 14:13:02 -05:00
Ioannis Glaropoulos
09b26cf6a1 doc: add comment about TF-M being the default SPE in nRF5340
Add a note in the 2.5 release notes, about TF-M being now
the default Secure Processing Element (SPE) for nRF5340 DK.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-12-11 11:23:26 +01:00
Anas Nashif
e0f3833bf7 power: remove SYS_ and sys_ prefixes
Remove SYS_ and sys_ from all PM related functions and defines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-09 15:18:29 -05:00
Anas Nashif
dd931f93a2 power: standarize PM Kconfigs and cleanup
- Remove SYS_ prefix
- shorten POWER_MANAGEMENT to just PM
- DEVICE_POWER_MANAGEMENT -> PM_DEVICE

and use PM_ as the prefix for all PM related Kconfigs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-09 15:18:29 -05:00
Simen S. Røstad
adb8087707 net: mqtt: Return -1 if keepalive messages are disabled.
In mqtt_keepalive_time_left(), return -1 if keep alive messages are
disabled by setting CONFIG_MQTT_KEEPALIVE=0.

This allows to use mqtt_keepalive_time_left() directly as an input
for poll(). If no keep-alive is expected, -1 would indicate
that poll() can block until new data is available on the socket.

Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
2020-12-08 14:08:36 -05:00
Dominik Ermel
280c21feea doc/releases: Add not on mcumgr support for non-0xff erase flash
The commit adds information, to release notes, on mcumgr now supporting
flash devices that have non-0xff erase value.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-12-08 10:46:15 -06:00
Andy Ross
0c15627cc1 lib: Remove sys_mem_pool implementation
This has been replaced by sys_heap now and all dependencies are gone.
Remove.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-12-07 21:50:14 -05:00
Andy Ross
6965cf526d kernel: Deprecate k_mem_pool APIs
Mark all k_mem_pool APIs deprecated for future code.  Remaining
internal usage now uses equivalent "z_mem_pool" symbols instead.

Fixes #24358

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-12-07 21:50:14 -05:00
Martin Åberg
0b69c558f4 doc: release 2.5: Announce the SPARC FPU support
The SPARC architecture support added in Zephyr 2.5 provides FPU
support.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-12-04 14:33:43 +02:00
Martin Åberg
53a4acb2dc SPARC: add FPU support
This change adds full shared floating point support for the SPARC
architecture.

All SPARC floating point registers are scratch registers with respect
to function call boundaries. That means we only have to save floating
point registers when switching threads in ISR. The registers are
stored to the corresponding thread stack.

FPU is disabled when calling ISR. Any attempt to use FPU in ISR
will generate the fp_disabled trap which causes Zephyr fatal error.

- This commit adds no new thread state.
- All FPU contest save/restore is synchronous and lazy FPU context
  switch is not implemented.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-12-04 14:33:43 +02:00
Gerson Fernando Budke
a49ef04d0c doc: guides: flash_debug: host-tools: Add SAM-BA docs
Add SAM-BA bootloader documentation at Zephyr host-tools in
flash_debug guides.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-03 10:50:23 -06:00
Gerson Fernando Budke
43a0dbe260 doc: guides: debugging: Move to flash_debug dir
The debugging section was generalized for flash and debugging tools.
The links were refactored accordly and all references were updated.
To be consistent, the directory doc/guides/debbugging was renamed to
doc/guides/flash_debug.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-03 10:50:23 -06:00
Ioannis Glaropoulos
41fa181388 doc: add release note comment for TF-M update.
Add a note in the 2.5.0 release notes about the TF-M
module update to v1.2.0.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-12-03 08:52:38 -06:00
Peter Bigot
6918e3def3 devicetree: gpio: provide accessors for controller phandle
Provide a helper to extract the devicetree node_id for a GPIO
controller from a gpio phandle array.  This can be used with
DEVICE_DT_GET() to directly reference the corresponding controller
device.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-12-01 15:19:22 -05:00
Carles Cufi
0d02de6113 doc: script: Default to empty string in DT docset env var
Windows does not default to an empty string when an env var is not
declared, like Linux does. Instead, explicitly default to one in order
for the .strip() call to work properly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-12-01 14:55:19 -05:00
Jakub Rzeszutko
3e65944cfe shell: documentation update
Updated the documantation with newly added configuration features.
Added information where to find minimal shell config file.
Added information how to activate particular features.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2020-11-30 16:03:01 -06:00
Peter Bigot
cf017378fe doc: usermode: correct description of API
The user documentation specifies that a list of objects passed to
k_thread_access_grant() should be terminated by NULL.  The API itself
specifies that NULL should not be passed.  Fix the user documentation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-30 12:59:24 -05:00
Maximilian Bachmann
3c8e98cb39 drivers/pcie: Change pcie_get_mbar() to return size and flags
currently pcie_get_mbar only returns the physical address.
This changes the function to return the size of the mbar and
the flags (IO Bar vs MEM BAR).

Signed-off-by: Maximilian Bachmann <m.bachmann@acontis.com>
2020-11-20 09:36:22 +02:00
Maksim Masalski
c7a5c406b7 doc: timing docs fix misprint
Fix misprint that causes wrong display of the API function name
in the documentation.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-11-19 16:59:47 -05:00
Anas Nashif
80e471dbd9 doc: kernel: clarify object limits
Clarify that while any number of kernel objects can be created, there is
a limit which is set by the available RAM.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-11-19 13:18:59 -05:00
Alexandre Bourdiol
4c15611f42 doc: guides: debugging: host-tools.rst: typo PATH
On Windows, environment variable to update is PATH

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-11-19 11:14:13 -06:00
Markus Becker
638b5f389f net: openthread: OpenThread RCP mode integration into Zephyr
* Add RCP library.
* Conditionally remove non required libraries not required for RCP.
* Drop :option: marker for CONFIG_OPENTHREAD_NCP_SPINEL_ON_UART_ACM

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2020-11-19 12:34:14 +01:00
Anas Nashif
43989ca675 libc: add labs() and llabs()
Add support for abs with additional integer types.

This is needed to make LLVM quiet and stop warning about abs being used
with int64_t and such.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-11-19 08:41:56 +01:00
Kamil Lazowski
104f100749 kernel: memslab: Add maximum mem_slab utilization trace
Add new function to mem_slab API that enables user
to get maximum number of slabs used so far.

Signed-off-by: Kamil Lazowski <Kamil.Lazowski@nordicsemi.no>
2020-11-18 22:33:27 -05:00
Andrzej Puzdrowski
77fb9b8b2c doc/releases: USB DFU class upgrade record
Added note on supported DFU for single-slot.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-11-17 19:51:00 +01:00
Andrzej Puzdrowski
03aed881f4 doc/releases: update release note by latest MCUBoot changes
Notes on MCUBoot changes and flash_area API extension.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-11-17 10:10:40 -06:00
Carles Cufi
0b1ff6f5e4 doc: Add SPARC to the list of supported archs
The introduction page lists all the architectures supported by Zephyr.
Now that SPARC V8 support has been merged, add it to the list. Also list
it in the set of architectures supported by the SDK.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-11-16 08:12:07 -05:00
Martin Åberg
c8bbd412c7 doc: release 2.5: Announce the SPARC support
SPARC architecture is a new feature introduced with Zephyr 2.5.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-13 14:53:55 -08:00
Fabio Utzig
4b93fdb7df doc: fix Kconfig.shield sourcing build issue
Fix documentation build issue where generating the kconfig rST was
failing due to missing Kconfig.shield* files. Add an extra step in
CMakeLists.txt to properly generate them, similarly to what is already
done for Kconfig.soc*.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-11-13 11:10:45 -05:00
Peter Bigot
33103828dc lib: add cbprintf capability
This commit adds a C99 stdio value formatter capability where
generated text is emitted through a callback.  This allows generation
of arbitrarily long output without a buffer, functionality that is
core to printk, logging, and other system and application needs.

The formatter supports most C99 specifications, excluding:
* %Lf long double conversion
* wide character output

Kconfig options allow disabling features like floating-point
conversion if they are not necessary.  By default most conversions are
enabled.

The original z_vprintk() implementation is adapted to meet the
interface requirements of cbvprintf, and made available as an opt-in
feature for space-constrained applications that do not need full
formatting support.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-13 06:38:01 -05:00
Daniel Leung
4b2de23356 doc: add documentation on thread runtime statistics
Adds a section to thread doc on thread runtime statistics
and how to obtain it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-11-11 23:55:49 -05:00
Daniel Leung
a24652e5a2 doc: add documentation for timing functions
This adds basic documentation on timing functions,
and how to use them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-11-11 23:55:49 -05:00
Joakim Andersson
f24a725d84 doc: release-notes: Add note about directed advertising address option
Added note about change in the option for advertising directed
towards a privacy enabled peer.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-11-11 13:22:02 +01:00
Krzysztof Chruscinski
1e46bb3bb5 lib: os: ring_buffer: Allow using full buffer capacity
Previously, ring buffer had capacity of provided buffer size - 1. This
trick was used to distinguish between empty and full states. It had one
drawback: ring buffer could not be used as a pool of equal sized buffers
(using ring_buf_put_claim and ring_buf_get_claim).
Reworked internals to use non wrapping head and tail. Since they are
non wrapping, there is no issue with distinguishing between empty and
full. Since this appraoch would be vulnerable to wrapping on 32 bit
boundary, added a mechanism which periodically reduces all indexes to
avoid 32 bit wrapping.

After this rework, buffer has one byte more capacity. Simple test shows
slight performance improvement.

Updated tests to reflect increased capacity and added test to check if
it is possible to continuesly allocated 2 buffers of half ring buffer
size.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-11-11 13:17:49 +01:00
Brian Bradley
a9c7cd7ed6 doc: document support of shell management for mcumgr
This is documented similarly to how other command
handlers are documented. This documents that shell
management is supported, but relies on the example
project for implementation details.

Signed-off-by: Brian Bradley <brian.bradley.p@gmail.com>
2020-11-11 13:17:02 +01:00
Kumar Gala
173a1cc08a device: deprecate DEVICE_INIT
deprecate DEVICE_INIT in favor of just using DEVICE_DEFINE directly.
The small handful of DEVICE_INIT users was easily converted to use
DEVICE_DEFINE or SYS_DEVICE_DEFINE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-11-10 08:38:09 -06:00
Ioannis Glaropoulos
c3ac3027a1 boards: arm: mark nRF5340 PDK as deprecated.
We deprecate nRF5340 PDK and add a note that
the board will be replaced by nRF5340 DK.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-09 17:33:54 +02:00
Trond Einar Snekvik
ad2fd44d7a Bluetooth: Mesh: Encapsulate feature config
Moves mesh feature configuration to a separate module, deprecating the
bt_mesh_cfg_srv structure. The initial values for the features should
now be enabled through KConfig, where new config entries have been added
for each feature.

This removes the upward dependency on the config server from the core
stack, and makes the config server a pure frontend for the configuration
states, as all spec mandated behavior around the feature states is now
encapsulated.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-11-09 11:23:34 +02:00
Trond Einar Snekvik
8e284750c8 Bluetooth: Mesh: Document Heartbeat
Adds public documentation for the Heartbeat feature in a separate page
under Bluetooth Mesh.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-11-09 11:23:34 +02:00
Jukka Rissanen
c678420b6f doc: net: Add info how to capture IEEE 802.15.4 QEMU traffic
Add additional information how to capture IEEE 802.15.4 traffic
to a pcap file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-05 10:14:43 -06:00
Jukka Rissanen
09bb29cdea doc: net: Add info how to run IEEE 802.15.4 between two QEMUs
Add information how to run two QEMUs and have IEEE 802.15.4 link
layer over UART between them. This is useful if one needs to test
basic IEEE 802.15.4 functionality without a IEEE 802.15.4 radio.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-05 10:14:43 -06:00
Martí Bolívar
808dd9e684 doc: reference: add devicetree bindings content
Add generated documentation content for known devicetree bindings
using the Binding abstraction which was just added to edtlib. This
works similarly to the way Kconfig content is generated, so extract a
bit of common helper code for doing that out and rename the relevant
files to keep the distinction clear.

Make the documentation build system respect a preset DTS_ROOT. In this
way, out of tree bindings can be added to the generated content by
telling the documentation build system where to find them, identically
to how out of tree bindings can be added to a Zephyr application.

Similarly, make the output directory configurable.

Fixes: #28865
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-11-02 14:26:33 -05:00
Martí Bolívar
ee52887089 doc: devicetree: reorganize a bit
Rework some section titles and separate the API into its own sub-page
in the reference section.

This is prep work for adding generated reference material on
devicetree bindings.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-11-02 14:26:33 -05:00
Anas Nashif
196ae3506f doc: fix showing latest version in sidebar
Minor fix for showing latest version in sidebar, no need for link here
that was added in recent commit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-11-02 19:02:29 +01:00
Ioannis Glaropoulos
f530db0525 doc: mention the INIT_ARCH_HW_AT_BOOT functionality in the rel notes
Mention the newly introduced funtionality for Cortex-M
architecture to force the early-boot initialization of
internal architecture HW state.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-02 15:02:24 +01:00
Jan Van Winkel
cf1bd17804 doc: releases: 2.4: Updated LVGL to 7.6.1
Added release note about update of LVGL to minor version 7.6.1

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-11-01 10:51:00 -05:00
Martí Bolívar
2485d76bf3 doc: api: sort the API overview alphabetically
This makes it easier to scan. The sorting is done based on the text
that appears in the HTML, not the :ref: label name.

In the case of the DMIC API, change the title of the document to match
the "Audio Codec" document so we can keep those together.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-30 15:57:30 +01:00
YanBiao Hao
c9be68532c Bluetooth: Mesh: Add Config Client API
The api is used to reset a node (other than a Provisioner) and
remove it from the network

Signed-off-by: YanBiao Hao <haoyanbiao@xiaomi.com>
2020-10-29 14:13:36 +02:00
Peter Bigot
60bc206b77 doc: introduce the regulator driver API
Add a page for the regulator API and introduce it as an experimental
API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-28 15:22:53 +01:00
Eugeniy Paltsev
1ae2b7cad9 doc: add missing setup documentation for ARC MWDT toolchain
ARC MWDT toolchain setup documentation was missing on upstreaming.
Fix that.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-10-27 16:41:36 +01:00
Simon Glass
1545cebff3 doc: emulator: Add basic documentation
Add some basic documentation for Zephyr emulators. This is expanded
from https://github.com/zephyrproject-rtos/zephyr/issues/27531 and
recent commits.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-27 16:41:30 +01:00
Fabio Utzig
8cd7ed1980 doc: bump breathe requirement to >=4.23.0
Breathe>=4.23.0 brings in basic xrefitem rendering support and fixes
issues parsing anonymous struct/unions. This version also adds a config
knob for showing or hiding enumerator values, so set it to generate
documentation compatible with previous versions.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-10-27 13:09:24 +01:00
Andrzej Puzdrowski
5bac6234aa changelog: MCUBoot changes
Added changelog for changes introduced by
latest MCUBoot upgrade.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-10-27 12:52:41 +01:00
Andrzej Puzdrowski
508c0356ab doc/reference/peripherals/flash: extract internal API doc
Divided doxygen API documentation into zephyr-internal API and
user API.
This make sense as user shall not use zephyr-internal API.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-10-27 12:52:07 +01:00
Andrzej Puzdrowski
0b50839c7d doc/reference: Added clarification on flash offset relation
Added information about that offsets are expressed in relation to
the flash memory beginning address.

This info was missing which cause misunderstanding of the concept
while contributing.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-10-27 12:52:07 +01:00
Martin Jäger
ba9fd65a4b doc: kernel: interrupts: zero-latency IRQ update
Add description how to enable zero-latency interrupt in the application
code. Previous docs described only the Kconfig and not the flag.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-26 13:15:20 +01:00
Daniel Leung
3c79b565fe doc: add info about using thread local storage
Adds a simple document on thread local storage.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-10-24 10:52:00 -07:00
Martí Bolívar
3df5f4003c doc: dts: update design goals document
Some information on design goals can be updated:

- we have decided against code generation for the time being
- we can do pin muxing via devicetree (this requires soc.dtsi
  support, but the necessary devicetree infrastructure exists)

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-22 07:48:21 -05:00
Andrew Boie
4abc38b342 doc: usermode: stack access policy change
The current policy of always excluding stacks that aren't
owned by the current thread only works well on MPU systems,
where it is very fast to have a reserved MPU region corresponding
to the stack buffer of the current thread.

This unfortunately is not efficient on MMU-based systems, it
would require either a different set of page tables per thread
or an expensive page table update on context switch.

This PR relaxes the documented policy to leave it up to the
implementation whether threads that all belong to the same
memory domain can see each other's stacks.

There's lots of precedent for this, for example on Linux threads
in the same process can all access each other's stacks.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-10-21 10:20:23 -07:00
Kumar Gala
f80f31eb0d ci: github: reduce when we do doc builds
Rather than doing a doc build on every PR, limit it to PRs that either
touch a file in doc/, *.rst and what's listed as DOXY_SOURCES in
doc/CMakeLists.txt.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-21 17:40:52 +02:00
Kumar Gala
b6b7e4c770 arm: v2m_musca: Mark Musca-A board support deprecated for 2.6.0
Deprecate the Musca-A board and SoC support to be removed in 2.6.0.
There are a number of issues with the Musca-A and there exists both the
Musca-B and Musca-S1.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-21 07:23:22 -05:00
Marc Herbert
c1f6c7d19e doc: extract_content.py: support multiple build directories
Exclude (other) build directories with a CMakeCache.txt file as they
typically contain previous output from ourselves.

One key feature of 'out of source" builds offered by CMake is allowing
multiple build directories. For instance to build different
configurations without starting from scratch. Unfortunately, the
extract_content.py code had a severe issue with multiple build
directories with an interesting effect on build times, see simple
reproduction below:

cd doc/
cmake -B _build/
cmake -B _b2

 # Repeat these a couple times
make -C _build content
make -C _b2 content

find -name rst
./_b2/rst
./_b2/rst/doc/_build/rst
./_b2/rst/doc/_build/rst/doc/_b2/rst
./_b2/rst/doc/_build/rst/doc/_b2/rst/doc/_build/rst

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-10-21 06:27:22 -05:00
Marc Herbert
e3c50af3e6 doc: restore sphinx-html and sphinx-latex shortcuts
Fixes commit 15fbf707ca ("doc: revert to copy files with
extract_content.py directly") that removed (2 years ago!) the definition
of EXTRACT_CONTENT_OUTPUTS while leaving it in use by sphinx-html and
sphinx-latex.

On my Linux box "make sphinx-html" is more than 5 times faster than
"htmldocs", likely because it does not build doxygen nor kconfig.

Also add missing WORKING_DIRECTORY for consistency with regular
targets and to fix this error:

Exception occurred:
  File "~/.local/lib/python3.8/site-packages/sphinx/
                   search/__init__.py", line 284, in __init__
    with open(scoring, 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'scorer.js'

I don't know when that second regression appeared.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-10-20 11:05:41 -04:00
Anas Nashif
5d0cf010e2 doc: use latest label instead of version in docs
Instead of having a .99 version, use latest and link to the lates
documentation on the left side bar.

The version number has been confusing users where it was difficult to
determine if they were looking at the development tree or some released
version.

Fixes #24453

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-10-19 11:52:40 -04:00
Ioannis Glaropoulos
4932925fde doc: modules: rework content describing submitting changes to modules
We rework the titles and headers of the section where we
describe the process for submitting new module and changes
to existing modules. Move the 'requirements' section at the
top of the page.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 17:51:19 +02:00
Ioannis Glaropoulos
07d61350e9 doc: modules: move building with modules into own child section
We move the section about how to build Zephyr and integrate
with modules into its own section with title
'Integrate modules in Zephyr build system'.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 17:51:19 +02:00
Ioannis Glaropoulos
7b4ce3a442 doc: modules: document synchronization practices in module repos
In the module documentation page, add a section to describe
the requirements and the allowed practices for synchronizing
the module code base with the upstream project.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 17:51:19 +02:00
Ioannis Glaropoulos
0362c70142 doc: modules: document Testing and Documentation and module removal
In the module documentation page, add sections for
Testing and Documentation requirements. Add also a
section decribing polices for module deprecation and
removal.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 17:51:19 +02:00
Ioannis Glaropoulos
28e674b32e doc: modules: initial text about licensing policies in modules
Adding content to describe policies and requirements
around licensing in Zephyr modules.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 17:51:19 +02:00
Ioannis Glaropoulos
cc60180299 doc: modules: add text about contribution workflow
Add a section that summarizes the recommended
contribution workflow in zephyr modules.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 17:51:19 +02:00
Ioannis Glaropoulos
04cdfccdb9 doc: modules: define the individual roles for zephyr modules
Submit a paragraph that summarizes the different
individual roles in Zephyr module repositories.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 17:51:19 +02:00
Ioannis Glaropoulos
4fac732eae doc: modules: Introductory text about module candidates
Capture the discussion regarding which external projects
should be considered as candidates for zephyr modules.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 17:51:19 +02:00
Henrik Brix Andersen
6187c8b8df devicetree: rename header to reflect that io-channels are not ADC-only
Rename the devicetree/adc.h header file to devicetree/io-channels.h to
reflect that io-channels are used for both ADC and DAC devicetree
phandles.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-10-19 17:21:33 +02:00
Martí Bolívar
7e64fba9ed doc: dts: macros.bnf comment improvements
Comment updates and cleanups, cosmetic changes.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-17 10:46:00 -05:00
Martí Bolívar
13893af651 doc: dts: fix typo in macros.bnf
The fixed-partitions label -> node mapping macro bit is missing an
underscore.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-17 10:46:00 -05:00
Ioannis Glaropoulos
38dd4683c6 doc: add HW stack protection enabling in the board porting guidelines
Mention in the board porting guidelines the recommendation
to enable by default the HW Stack Protection feature, and
the rationale behind it.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-15 09:55:01 -05:00
Martí Bolívar
25c07e2ad7 doc: document devicetree.h dependency ordinal APIs
Hide these away in the reference documentation for now. It seems
rather unlikely that they'll be used by anything other than internal
infrastructure to get started with.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-14 13:18:44 -05:00
Martí Bolívar
305379e944 devicetree: add first round of dependency ordinal info
Add the first API functions that directly deal with node dependency
ordinals as determined by edtlib:

- DT_DEP_ORD(node_id): node_id's ordinal
- DT_REQUIRES_DEP_ORDS(node_id): list of dep ordinals for node_id's
  direct dependencies
- DT_SUPPORTS_DEP_ORDS(node_id): list of dep ordinals for nodes
  depending directly on node_id
- DT_INST_ equivalents

This is not meant to be an exhaustive set of macros related to
dependency ordinals; rather, it's a starting out point meant to enable
initial struct device dependency tracking work. We can add more if
needed.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-14 13:18:44 -05:00
Krzysztof Chruscinski
61f710b47c doc: release-notes: Add note about clock control API change
Added note about change in clock_control_async_on

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-10-14 14:06:56 +02:00
Jukka Rissanen
accaab2112 net: shell: Add network mgmt events monitor support
Add "net events [on|off]" command that can be used to monitor
the generated network management events.

The monitor output looks like this when enabled:

EVENT: L2 [1] up
EVENT: L3 [1] IPv6 mcast address add ff02::1:ff00:1
EVENT: L3 [1] IPv6 mcast join ff02::1:ff00:1
EVENT: L3 [1] IPv6 address add 2001:db8::1
EVENT: L4 [1] connected
EVENT: L3 [1] IPv6 prefix add 2002:5b9b:41a0::
EVENT: L3 [1] IPv6 address add 2002:5b9b:41a0:0:fec2:3dff:fe11:c147
EVENT: L3 [1] IPv6 neighbor add fe80::9ec7:a6ff:fe5e:4735
EVENT: L3 [1] IPv6 router add fe80::9ec7:a6ff:fe5e:4735
EVENT: L3 [1] IPv6 DAD ok fe80::fec2:3dff:fe11:c147
EVENT: L3 [1] IPv6 DAD ok 2001:db8::1
EVENT: L3 [1] IPv6 DAD ok 2002:5b9b:41a0:0:fec2:3dff:fe11:c147
EVENT: L3 [1] IPv4 address add 192.168.1.69
EVENT: L3 [1] DHCPv4 bound 192.168.1.69

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-10-13 13:42:50 +03:00
Marc Herbert
20c7ec4ad5 doc: west: add inline comments in the tree and manifest examples
It's great to have full manifest examples that can actually work as they
are, however the number of lines can "dilute" the feature currently
described and distract from it. Add some comments in the manifests to
highlight the current topic(s).

The file tree examples and their descriptions are carefully made up and
generally excellent, however I found my eyes going constantly back and
forth between the two in order to match them with one another and build
the actual, graphical representation in my head. These new comments
attached to the major elements of the trees will IMHO accelerate that
visual representation. What I found especially lacking: clues about
which directories are .git/ clones; a pity in the pages specifically
about git clone organization.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-10-12 14:50:17 -05:00
Martí Bolívar
8165008f44 dts: remove legacy macro support
The legacy macros were first deprecated in Zephyr v2.3. Now that
Zephyr v2.4 has been released, that makes two releases where these
macros have been deprecated, so it's OK to remove them.

This leaves support for legacy binding syntax in place. Removing that
is left to future work.

We need to update various pieces of documentation related to flash
partitions that never got updated when the new API was introduced.
Consolidate this information in the flash_map.h API reference page,
since that's really where users will run into it. This also gives us
the opportunity to improve this documentation.

Adjust a couple of kconfigfunctions.py and sanitycheck bits to use
non-legacy edtlib APIs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-09 08:45:38 -05:00
Andrzej Puzdrowski
18a56fc42c changelog: MCUBoot changes
Added changelog for changes introduced by
latest MCUBoot upgrade.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-10-09 11:50:10 +02:00
Marc Herbert
d1f25ce326 doc: ext: link-roles: fix crash when west is available but not used
It should be possible to submit quick documentation fixes without
depending on a complete west workspace. Fixes the following crash:

Exception occurred:
  File "west/src/west/util.py", line 82, in west_topdir
    raise WestNotFound('Could not find a West workspace '
west.util.WestNotFound: Could not find a West workspace in this
                        or any parent directory

Fixes ae8dd14887 ("doc: ext: link-roles: allow non-default baseurl")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-10-09 11:49:29 +02:00
Kumar Gala
4d60b75588 sensor: vcnl4040: Update dts binding for defaults
* Add comments about the default settings
* Change proximity-trigger default to match POR of 'disabled'
* Added reference to datasheet

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-09 11:48:12 +02:00
Peter Bigot
cbff3e34d7 doc: kernel: workqueue: correct documentation of delayed work API
The delayed work API has been changed to allow cancellation in
conditions not previously documented, but this feature can cause both
submission and cancellation to fail in the general case.  Summarize
the conditions and highlight the importance of checking result codes
for these functions.

Also explicitly note that no kernel API can reliably indicate that a
work item has been completed, and that doing so is the responsibility
of the code that provides the work handler.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-09 11:48:00 +02:00
Jakub Rzeszutko
c195529615 shell: documentation update
Updating documentation with dictionary commands description.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2020-10-08 10:12:25 -04:00
Martí Bolívar
93608adb5a doc: update west build --pristine
This needs to be changed to reflect the change of default to 'auto'
from 'never'.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-07 15:16:24 -05:00
Fabio Utzig
c261b784c8 doc: fix broken link-roles on west>=0.8
Fix broken links generated by link-roles after west was upgrade to
0.8.0. `url` was previously `None` and now returns an empty str.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-10-07 15:43:19 -04:00
Mattia Fiumara
8244590fb8 tracing: add feature for analysing post-mortem
This adds a Kconfig option for enabling post-mortem mode of SystemView.
This is useful for crashes that occur after a longer period of time.

Signed-off-by: Mattia Fiumara <mattia.fiumara@bgrid.com>
2020-10-07 10:10:48 -04:00
Peter Bigot
6b22c764f1 doc: coverage: document unit test coverage
Unit tests require a special board and use the host toolchain.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-06 18:08:19 -05:00
Martí Bolívar
cc6fe437c7 doc: west: fix typo in release notes
There's a copy/paste error here.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-06 09:12:41 -05:00
Martí Bolívar
cf5074c999 doc: release-notes: document DT_ENUM_IDX_OR
This is a new DT macro which was added in
c3eef7744a ("include/devicetree.h: Add
DT_ENUM_IDX_OR macro")

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-06 04:56:52 -05:00
Robert Lubos
4455bfc5c0 doc: reference: Add separate entries for CoAP, LwM2M and MQTT APIs
Application protocol APIs are unrelated to each other and change
separately, so it makes sense to have separate entries for each of them.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-10-06 12:01:13 +03:00
Robert Lubos
f7a5638871 net: lwm2m: Make bootstrap optional
Currently, after `CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP` is enabled,
the LwM2M engine will initiate bootstrap procedure on each run. This
approach limits the flexibility of the application, as it's not always
necessary to go over the bootstrap procedure (for instance, the
application may decide to store the security object obtained during the
bootstrap in flash, and restore it on boot).

Fix this by introducing an additional `flags` parameter to the
`lwm2m_rd_client_start()` function, which provides information whether
to run bootstrap in the current session or not.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-10-06 12:01:13 +03:00
YanBiao Hao
dc89bfcc7f Bluetooth: Mesh: Config Client network transmit set/get API
Get/Set network transmit parameter of a node.

Signed-off-by: YanBiao Hao <haoyanbiao@xiaomi.com>
2020-10-02 11:30:12 +02:00
Martí Bolívar
49fdfd4f39 doc: west: changes for v0.8
Track changes in the APIs and CLIs for this release.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-01 20:47:53 +02:00
Martí Bolívar
b593087734 doc: west: API doc cleanups
Use italics more consistently when referring to parameters by name.
Make the ImportFlag members appear.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-01 20:47:53 +02:00
Martí Bolívar
f6e90fce87 doc: west: add missing 0.7.x docs
I neglected to update the release notes when cutting these. Whoops.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-10-01 20:47:53 +02:00
Kumar Gala
55be783c85 settings: Remove deprecated SETTINGS_USE_BASE64 support
Remove code and associated tests and Kconfig related to
SETTINGS_USE_BASE64 that was deprecated in Zephyr 2.2

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-01 07:05:27 -05:00
Jukka Rissanen
722fbc1b80 net: mgmt: Clarify the net_mgmt API documentation
Add information about the network management events when user
wants to listen multiple events from different layers.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-09-30 16:31:38 +03:00
Maureen Helm
3dc0a7c965 doc: conf: Add 2.4.0 version selector
Adds the 2.4.0 release to the documentation version selector.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-27 15:15:49 -05:00
Maureen Helm
b211df9d9b doc: reference: Update API overview for 2.4.0
Updates the API overview table for APIs added or modified since 2.3.0.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-27 15:15:49 -05:00
Maureen Helm
b985624572 doc: reference: Add ec host command api hooks
Adds missing hooks to include the ec host command api in the generated
documentation.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-27 15:15:49 -05:00
Maureen Helm
0962b30173 doc: release: Add 2.5.0 release notes draft
Adds skeleton release notes for the next release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-27 15:15:49 -05:00
Maureen Helm
e1f634b1f3 doc: release: Remove draft status from 2.4.0 release notes
The release notes are now complete.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-27 15:15:49 -05:00
Maureen Helm
0eba6ef639 doc: release: Clean up 2.4.0 release notes
Cleans up grammar, punctuation, and white space in the 2.4.0 release
notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-27 15:15:49 -05:00
Maureen Helm
0ae8d8f77d doc: release: Add more new boards to 2.4.0 release notes
Adds a few more new boards to the release notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-27 15:15:49 -05:00
Johann Fischer
ba12d6e11f doc: release: 2.4 add notes about USB device support
Add notes about USB device support related changes.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-09-27 09:59:42 -05:00
Maureen Helm
0a0cb52fb2 doc: release: Fill in driver sections in 2.4.0 release notes
Fills in all remaining driver sections in the 2.4.0 release notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-26 10:20:32 -05:00
Maureen Helm
53f14c5976 doc: release: Deprecate CONFIG_MULTITHREADING=n in 2.4.0 release notes
Adds a note about deprecating single-threaded mode to the 2.4.0 release
notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-26 10:20:32 -05:00
Maureen Helm
2754c0fb16 doc: release: Add closed issues to 2.4.0 release notes
Adds list of GitHub issues that were closed since the 2.3.0 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-26 10:20:32 -05:00
Carles Cufi
ad940e6170 doc: relnotes: Add Bluetooth release notes for 2.4
Contains Host, Mesh and Controller release notes for the 2.4 release.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-09-26 10:19:06 -05:00
Gerson Fernando Budke
9cd01a8b76 doc: release: 2.4: Add note related to storage
Add flash SHA-256 integrity check note related to storage subsys.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2020-09-25 14:27:57 -05:00
Gerson Fernando Budke
3d6ab6b8f3 doc: release: 2.4: Move shell note to right place
There are two shell sections on documentation.  Move last section to
right place to fix documentation style.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2020-09-25 14:27:57 -05:00
Gerson Fernando Budke
57c099a612 doc: release: 2.4: Add notes and security info about UpdateHub
Add release and security notes related to UpdateHub.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2020-09-25 14:27:57 -05:00
Gerson Fernando Budke
4fe4c01c1f doc: release: 2.4: Add notes about Atmel related changes
Adds 2.4.0 release notes for Atmel SoCs, boards, and drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-09-25 14:27:57 -05:00
Ioannis Glaropoulos
e81954e52a doc: release notes: add missing SoC, Board info in the 2.4.0 notes
Add some missing information regarding some nRF
SoC and Boards that were added in the current release.
Make a note that HW Stack protection is now enabled
by default in Nordic-maintained nRF Boards.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-09-25 13:26:47 -05:00
Ruud Derwig
9d739211ad doc: release notes: ARC
2.4 release notes for ARC related changes

Signed-off-by: Ruud Derwig <Ruud.Derwig@synopsys.com>
2020-09-25 08:30:14 -05:00
Kumar Gala
8a58a44f22 doc: release: 2.4: Add notes about devicetree related changes
Add comments about two main devicetree related features that went into
the 2.4 release.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-09-24 15:17:17 -05:00
Ryan Erickson
c3853bb478 doc: release notes: mention Pinnacle 100 board addition
Add mention of new ARM based board:
Added the Pinnacle 100 Modem Development board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-23 16:40:53 -05:00
Andrew Boie
7b6c7278db doc: releasenotes: mem pool deprecation
Per TSC we will document deprecation for 2.4 but not add
__deprecated tags until the 2.5 merge window opens.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-09-23 15:53:01 -05:00
Maureen Helm
4042a7c347 doc: release: Add NXP SoCs, boards, and drivers to 2.4.0 notes
Adds 2.4.0 release notes for NXP SoCs, boards, and drivers.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-23 15:44:52 -05:00
Maureen Helm
8a4ac53d2f doc: release: Add 2.4.0 highlights
Fills in the highlights section for the 2.4.0 release notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-23 15:44:52 -05:00
Henrik Brix Andersen
21e31bfae4 doc: release: 2.4: add sensor_attr_get() in release notes
Mention the recently added sensor_attr_get() API function in the
release notes for v2.4.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-09-22 16:06:01 -05:00
Flavio Ceolin
7c86add30f doc: release notes: Update security notes for 2.4
Add information about security issues addressed in the v2.4.0
release.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-09-22 13:39:46 -05:00
Fabio Utzig
ae8dd14887 doc: ext: link-roles: allow non-default baseurl
Link roles, aka :zephyr_file: and :zephyr_raw: use a repo's git describe
information to create links but the baseurl is fixed to the upstream
repo. This breaks links created in repos that are forks located
somewhere else.

This commits tries to get the baseurl from west if available so it will
work correctly for forks. If fallbacks to the upstream repo if no
information can be gathered by West, or West is not available.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-09-18 17:40:05 +02:00
Erwan Gouriou
16813844ac doc: release notes V2.4.0: Shields additions
Document Shields additions in V2.4.0 release notes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-09-18 09:35:41 -05:00
Erwan Gouriou
db97ccdb96 doc: release notes V2.4.0: STM32 related additions
Document STM32 related changes in V2.4.0 release notes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-09-18 09:35:41 -05:00
Martí Bolívar
840eaab970 doc: west: add information about private repositories
How to manage repositories that require authentication to fetch from
using west is a frequently asked question.

TL;DR on the answer is that Git already has credential storage built
in, so our expectation is that there is nothing west needs to do in
particular, as users can select whatever credential helper works for
them, or set up a custom one using something like the GIT_ASKPASS
environment variable.

That's not a very helpful expectation if people aren't aware that
credential helpers exist, though, so let's document that and provide
examples for common use cases, as well as west-specific
troubleshooting advice.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-09-17 21:39:03 -04:00
Maksim Masalski
cd068c26dc doc: replace the latest sdk with 0.11.4 version
How-to guide has 0.11.3 SDK
Replace with the latest one SDK 0.11.4 in the documentation
description and links.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-09-17 21:08:38 -04:00
Henrik Brix Andersen
29e067ba33 doc: release: 2.4: add ARM DesignStart FPGA related release notes
Add release notes covering the various ARM DesignStart FPGA related
additions in Zephyr v2.4.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-09-17 14:46:33 -05:00
Daniel Leung
66a741d071 doc: releases: add notes on core dump for v2.4 release
This adds a few lines regarding core dump in the v2.4 release
notes.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-09-17 14:44:48 -05:00
Andrzej Puzdrowski
c393f31b8e release-notes-2.4: flash changes
Added notes on latest flash changes.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-09-17 14:43:23 -05:00
Jennifer Williams
65bcba61d0 docs: ref: kernel: clarify data_item structure in message queues
- use sizeof(struct data_item_type) instead of sizeof(data_item_type)
- use struct data_item_type instead of invalid reference data_item_t
- add aligned typedef struct data_item_type example implemenation
- add note about checking return value for error message

Fixes #19684

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2020-09-17 14:17:47 -05:00
Jukka Rissanen
c8294db083 doc: net: Add note about socket API thread safe status
Currently the socket API is not thread safe so mention this in
socket API documentation. The plan is to add locks in 2.5 release.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-09-17 09:30:52 +02:00
Peter Bigot
4078442bfd Revert "doc: release: 2.4: note behavior change in device_get_binding"
This reverts commit 6dde16d9f8.

The original behavior has been restored for this release.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-16 13:13:22 -05:00
Andrew Boie
785c79c2a6 doc: release-notes: kernel & x86
Updates to the core kernel and x86 for this release.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-09-16 08:43:14 -05:00
Martí Bolívar
43102cacfa doc: application: document OVERLAY_CONFIG
This is a really useful CMake variable that can be used to preserve
the default CONF_FILE value, but "mix in" additional content.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-09-15 19:55:03 -04:00
Fabio Utzig
cb644149c6 doc: add new @option Doxygen ALIAS
This new ALIAS can be used to add references to Kconfig options. To use
it enclose the Kconfig symbol name like this `@option{KCONFIG_FOO}`.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-09-15 15:25:01 +02:00
Fabio Utzig
5ee34e1fae doc: enable SEPARATE_MEMBER_PAGES compatibility
Enable Breathe SEPARATE_MEMBER_PAGES compatibilty; this option allows
resolution of a huge amount of references that are currently broken
(around 650 based on my grep foo!) due to issues in the Doxygen XML
generation when this option is enabled.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-09-15 15:25:01 +02:00
Andrzej Puzdrowski
a9a2d63d03 release-note: settings, management and other updates
Added notes on fallowing items:
EEPROM, IEEE 802.15.4, sensor, NET/PPP, Management,
settings, logging, shell, samples.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Co-authored-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-14 10:47:49 -05:00
Daniel Schaupp
d04c328d69 doc: getting_started: updated reel board blinky gif
Fixes: #28095

Signed-off-by: Daniel Schaupp <daniel.schaupp@online.de>
2020-09-14 16:13:58 +02:00
Krzysztof Chruscinski
dbf0c9507f doc: releases: Update release notes for 2.4 with shell changes
Added note about fixed/changed behavior when too many arguments are
provided.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-09-14 16:05:11 +02:00
Torsten Rasmussen
fb16a3deb0 cmake: ensure consistent behavior between x_ROOT settings
Fixes: #23825

Today, BOARD, SOC, ARCH, DTS, KCONFIG, and TOOLCHAIN_ROOT can be
specified by users or through other CMake files.

It is not clear if relative paths are permitted and/or from where a
relative path is constructed.

Inside CMake, it is very easy to specify `${ZEPHYR_BASE}`,
`${CMAKE_CURRENT_SOURCE_DIR}`, or similar, thus there is no reason to
use relative path inside CMake, as it easy can lead to discussion on
relative to what.

For users manually invoking CMake using, `cmake ... <app-dir>` it is
nice to have to possibility to specify a relative path.
For this purpose, relative path are considered relative to the
`APPLICATION_SOURCE_DIR`.

This commit updates:
- BOARD_ROOT
- SOC_ROOT
- ARCH_ROOT
- DTS_ROOT
- KCONFIG_ROOT
- TOOLCHAIN_ROOT

to allow paths relative to `APPLICATION_SOURCE_DIR` when specified with
`-D<type>_ROOT=<relative-path>`

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-09-10 21:30:24 +02:00
Peter Bigot
87fdee2920 doc: release: 2.4: summarize I2C changes
One new driver, one new capability.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-09 11:48:00 -05:00
Peter Bigot
6dde16d9f8 doc: release: 2.4: note behavior change in device_get_binding
Document that some initialization orders that used to work (and
shouldn't have) will no longer work.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-09 13:06:34 +02:00
Jukka Rissanen
8c3efc7be5 doc: net: Add networking changes to 2.4 release note
Initial set of networking related changes in 2.4 release.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-09-08 11:47:58 +02:00
Ioannis Glaropoulos
2e87e33dd1 doc: release: v2.4.0 release notes draft for Cortex-A
Initial draft of release notes for AARCH64 (Cortex-A)
for the Zephyr v2.4.0 release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-09-07 17:04:10 +02:00
Ioannis Glaropoulos
d378a1b0e6 doc: release: v2.4.0 release notes draft for Cortex-M
Initial draft for Release notes for ARM (Cortex-M)
for the Zephyr v2.4.0 release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-09-07 17:04:10 +02:00
Anas Nashif
01bcd0d7e5 doc: remove benchmarking section from docs
This section does not exist anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-05 13:28:38 -05:00
Anas Nashif
6e27478c3d benchmarking: remove execution benchmarking code
This code had one purpose only, feed timing information into a test and
was not used by anything else. The custom trace points unfortunatly were
not accurate and this test was delivering informatin that conflicted
with other tests we have due to placement of such trace points in the
architecture and kernel code.

For such measurements we are planning to use the tracing functionality
in a special mode that would be used for metrics without polluting the
architecture and kernel code with additional tracing and timing code.

Furthermore, much of the assembly code used had issues.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-09-05 13:28:38 -05:00
Henrik Brix Andersen
2f95794b29 doc: releases: 2.4: add EEPROM release notes for v2.4
Add EEPROM release notes for v2.4.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-09-05 10:26:58 -05:00
Luiz Augusto von Dentz
5c4bde55d0 Bluetooth: GATT: Rework bt_gatt_attr_func_t
Make it actually give the original pointer to the attribute and its
resolved handle so static attributes don't need an extra lookup.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-09-05 11:06:21 +02:00
Torsten Rasmussen
212c336400 cmake: extend support for conf file and board overlays
Fixes: #27934

This commit introduces additional naming support of config files.

It is now possible to create a config file of the form
`prj_<build>.conf` and automatically have a corresponding
`boards/<BOARD>_<build>.conf` config file merged.

As example, one can create a structure as:
|-- prj.conf
|-- prj_debug.conf
|-- boards
      |-- nrf52840dk_nrf52840.conf
      |-- nrf52840dk_nrf52840_debug.conf

when building: (existing behavior)
cmake -DBOARD=nrf52840dk_nrf52840 ...
prj.conf is merged with nrf52840dk_nrf52840.conf

when building: (new behavior)
cmake -DBOARD=nrf52840dk_nrf52840 -DCONF_FILE=prj_debug.conf ...
prj_debug.conf is merged with nrf52840dk_nrf52840_debug.conf

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-09-04 17:52:27 +02:00
Emil Gydesen
05b0ba01d6 doc: Add HRS/DIS/BAS API change entry in 2.4 release-notes
Adds the API and Kconfig change to the release notes for 2.4.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2020-09-04 15:38:44 +02:00
Peter Bigot
13576962b8 doc: guides: dts: document inferred bindings for /zephyr,user
Identify the special case of /zephyr,user as a node for which property
values are generated without having to define a binding.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-04 07:41:19 -05:00
Emil Obalski
0d8bd579a5 usb: hid: All hid_ops callbacks get device pointer.
This commit extends USB hid API callbacks by adding
'const struct device *dev' parameter. If the application
configured more than one HID device then it must specify
separate hid_ops for each device as its unable to determine
for which device the callback was called.

This patch makes it possible to have only one hid_ops within
the application and the application is aware for which device
the callback was called because of explicit device pointer.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-09-04 12:27:44 +02:00
YanBiao Hao
e877ee6088 Bluetooth: Mesh: Adds three Config Client API.
Those APIs are used for deleting appkey, unbinding an application
from SIG model, unbinding an application from vendor model on the
target node, with matching shell command.

Signed-off-by: YanBiao Hao <haoyanbiao@126.com>
2020-09-04 11:47:52 +02:00
Martí Bolívar
c4deb9ebde doc: west: update west sign documentation
Update the documentation to reflect the easier flow.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-09-03 16:49:09 -05:00
Trond Einar Snekvik
3004975765 Bluetooth: Mesh: Fix Health model shell doc
The Health models' shell documentation was mistakenly labeled Heartbeat
Client and Heartbeat Server, and the Heartbeat configuration commands
were mistakenly categorized under these sections.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-09-03 21:50:41 +02:00
Peter A. Bigot
d0d3c4a3a7 fs: allow external file system implementations
The documentation claims that Zephyr supports external file system
implementations, and there's no reason not to do so.  Rework the API
to allow this.

Note that the file system type cannot legally be an enum anymore,
since we need to support file system types that don't have an
identifier assigned in that enum.  Rely on the implicit conversion of
enum values to int to preserve backwards compatibility.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-09-03 21:49:34 +02:00
Peter A. Bigot
353336d632 fs: make file system description const
There's no reason the table of pointers to file system functions needs
to be mutable at runtime.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-09-03 21:49:34 +02:00
Peter A. Bigot
0950b2549e dts: support specifying preprocessor flags for devicetree
In some cases it is useful to use the C preprocessor to control the
content of a devicetree file.  A specific use case is in testing,
where different combinations of node properties must be checked.
Provide a mechanism to allow arbitrary preprocessor flags to be passed
through CMake to affect the devicetree content.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-09-03 14:02:36 -05:00
Peter A. Bigot
b7ce0a2c90 doc: fix capitalization of devicetree
The capitalized spelling is Devicetree, not DeviceTree.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-09-03 14:02:36 -05:00
Flavio Ceolin
49f7e2411e doc: debugging: Add information about gdbstub
An overview about gdbstub and available features.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-09-02 20:54:57 -04:00
Tomasz Bursztyka
dcf89f4990 doc: Add a device qualifier change entry to release-notes for 2.4 version
Documenting the change.

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
Tomasz Bursztyka
c0bcfd2a77 doc: Apply constant qualifier on device instance where relevant
s/struct device */const struct device *

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
Tomasz Bursztyka
e18fcbba5a device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.

A coccinelle rule is used for this:

@r_const_dev_1
  disable optional_qualifier
@
@@
-struct device *
+const struct device *

@r_const_dev_2
 disable optional_qualifier
@
@@
-struct device * const
+const struct device *

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
Trond Einar Snekvik
18ace841d8 Bluetooth: Mesh: Config client net_key_del
Adds a Config Client API for deleting netkeys on the target node, with
matching shell command.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-09-01 14:49:20 +03:00
Henrik Brix Andersen
d92b199173 doc: update list of architectures in introduction
List ARMv6-M (Cortex-M) as a supported architecture.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-08-31 17:37:25 -04:00
Fabio Utzig
92431e2bae doc: fix :c:macro: usage
Remove parameters in :c:macro: usage because it's invalid syntax.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
e73d3c82d8 doc: update :cpp:var: to :c:member:
Update references to struct members to use :c:member:

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
4c2f0605da doc: fix invalid usage of function to :c:macro:
Some macros were using :c:func: and :cpp:func: which forbids Breathe
from resolving those symbols. Update to :c:macro: for proper resolution.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
43133c96f4 doc: update union reference to to :c:union
Update union reference from generic :c:type: to :c:union:.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
ce12936ce1 doc: update enumerator usage to :c:enumerator:
Following the change to use the C domain for parsing, update all
existing :cpp:enumerator: references to :c:enumerator:.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
bb93b337f9 doc: update enum usage to use :c:enum:
Update enum reference usage to use C domain.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
1622b3e66b doc: do not use :c:macro: for NULL
`NULL` is not defined in the Zephyr sources, but rather a C definition
which is not resolved when building the documentation and generates a
warning. Fall back to using just emphasis.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
f635217f35 doc: add :c:macro to some symbols
Fix some C macros that are currently just emphasized in the
documentation with proper symbol resulition using :c:macro:

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
c79d2ce794 doc: update struct references to use :c:struct:
Sphinx>=3.0 includes the `struct` role in the C domain, which provides a
specific way to link to structs, while the old :c:type: role should be
primary used to typedefs. Update existing references, using :c:type:,
:cpp:type: or emphasized symbols that point to structs to use the new
role.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
53fd5ff236 doc: update function references to use :c:func:
Following the change to use the C domain for parsing, update all
existing :cpp:func: references to :c:func:. Remove the parentheses as
well, if used, because they are not needed, this is already known to be
a function, and how it is displayed in the documentation later is a
semantic decision done by the output builder.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
a56446051e doc: add __subsystem attribute and c attributes
Add __subsystem to list of attributes for the parser, and make the c
parser accept the same attributes than the cpp parser, after the change
to use the c parser for ".c" files.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
dcfe684440 doc: move tabs to spaces in Sphinx config
Sphinx's config file is a python script, so follow the standards and use
spaces for identation.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
2825f0bcac doc: switch from CPP to C domain for .c files
Older Breathe versions didn't work correctly with the C domain, so there
was a mismatch when refering to functions and #defines, using :cpp: or
:c: depending on the origin of the refered symbol. With Breathe >=4.19
the C domain works correctly so all symbols can be refered to with the
:c: role.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
6111da4481 doc: use non-deprecated CSS/JS import methods
Update methods used to include JS/CSS files, avoiding deprecated
versions the don't work on Sphinx>=3.x. The new methods work on both
Sphinx==3.x and Sphinx>=2.4.x.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Fabio Utzig
551f1789a5 doc: update versions of build tools
Update documentation build tooling:

- Sphinx>=3.2.0
- Breathe>=4.20.0
- docutil>=0.16.0

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-31 09:57:33 -04:00
Torsten Rasmussen
42d84eaacf docs: Zephyr module and CMake processing
This commit describes add a section which describes how Zephyr modules
are integrated into Zephyr build system and what Zephyr module variables
that are available during CMake and Kconfig processing.

Those variables may be used for refering other Zephyr modules or
including of additional code.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-08-31 12:15:02 +02:00
Olof Johansson
6a8c622bcc doc: update list of architectures in introduction
The list is out of date, so clarify the support a bit and add newly
added subarchitectures.

Signed-off-by: Olof Johansson <olof@lixom.net>
2020-08-27 23:38:54 -04:00
Peter Bigot
77aa89bcb5 drivers: flash: remove W25QXXDV driver
The spi_flash_w25qxxdv driver has been superseded by the generic
spi_nor driver for over a year.  The only non-refactoring change to
the W25Q driver in the last 18 months was done to support a backport
to 1.14.

All devices supported by spi_flash_w25qxxdv driver are expected to be
supported by the spi_nor driver, using the standard `jedec,spi-nor`
devicetree compatible.  No in-tree devicetree files make use of this
driver.

Remove the confusion about which driver to select by removing the
unmaintained redundant driver.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-27 17:39:21 +02:00
Martí Bolívar
20ca76fe17 doc: west: troubleshoot no west on PATH on windows
Depending on how people set up their Python, west might not be on
PATH.

I'd like to have a special-purpose step by step guide for how to
handle this in the documentation to save support time when this
happens. I think it's worth special casing since west is the first
runnable program that pip installs onto a new user's system when
they're following the GSG.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-08-27 16:06:01 +02:00
Carles Cufi
63f838e307 doc: bluetooth: Add a new controller listing
Add a new listing for the Zephyr BLE Controller. This applies to
the Nordic nRF52 series and Zephyr version 2.2.x.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-08-27 15:57:36 +02:00
Anas Nashif
dca317c730 sanitycheck: inclusive language
change whitelist -> allow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-27 07:04:07 -04:00
Andrew Boie
46def95f51 doc: memory domain updates
Update memory domain documentation to reflect the policy, API,
and code changes in this PR.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Gerard Marull-Paretas
01a4e365b7 docs: releases: 2.4: add notes about LVGL Kconfig changes
Add notes about LVGL Kconfig options name changed after alignment
with upstream names.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-08-26 15:32:59 -05:00
Eug Krashtan
bb378c7201 net: coap: Use MQTT style wildcard in path description:
In 'struct coap_resource' path description:
- the plus symbol represents a single-level wild card in the path;
- the hash symbol represents the multi-level wild card in the path.

This change keeps compatibility with RFC 7252 but allows handling
multiple requests in single function.

Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
2020-08-26 12:31:00 +02:00
Henrik Brix Andersen
7749dfc205 doc: reference: overview: bump EEPROM API to unstable
The EEPROM API, which was introduced in Zephyr v2.1.0 and has not seen
any changes since, has multiple implementations supporting a wide
variety of EEPROM backends (SPI, I2C, on-chip, simulator).

Bump the EEPROM API from "experimental" to "unstable" according to the
Zephyr API lifecycle process.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-08-26 12:30:48 +02:00
Peter Bigot
7410b9ed34 doc: guides: design: document how to handle conditional documentation
Various API involves functions and data that are conditionally
enabled.  Zephyr practice is to exclude data (always) and function
(sometimes) declarations at build time using the enabling preprocessor
macro.  This meets functional needs, but blocks generation of the API
documentation as Doxygen will not see the declarations.

Document the need to extend Doxygen's PREDEFINED setting to generate
the documentation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-25 18:09:56 +02:00
Peter Bigot
ec507d3f03 doc: guides: add design guidelines with callback expectations
Provide a location for recommended practices that are not related to
coding style.  Initialize it with information about the expected
design for callbacks.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-25 18:09:56 +02:00
Peter Bigot
e69f22be54 doc: guides: dts: document expectation for devicetree driver configuration
Gaps in Kconfig flexibility make it necessary to provide
instance-specific driver configuration through devicetree properties
in certain cases.  Because these are not hardware characteristics or
configuration they should be marked as zephyr-specific.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-25 18:09:56 +02:00
Peter Bigot
23b34323fa doc: guides: dts: update note on enabling individual instances
The Kconfig options that formerly controlled this capability have been
removed so rework the "exception" (there is no "precedence" anymore).

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-25 18:09:56 +02:00
Peter A. Bigot
5c85e2c914 doc: provide guidance on recommended settings back end
Zephyr release 2.1 changed the default settings back end from FCB to
NVS in all Bluetooth samples for performance and reliability reasons.
Update the settings documentation to provide a clue to developers
trying to decide which to use.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-25 09:35:40 +02:00
Daniel Leung
49206a86ff debug/coredump: add a primitive coredump mechanism
This adds a very primitive coredump mechanism under subsys/debug
where during fatal error, register and memory content can be
dumped to coredump backend. One such backend utilizing log
module for output is included. Once the coredump log is converted
to a binary file, it can be used with the ELF output file as
inputs to an overly simplified implementation of a GDB server.
This GDB server can be attached via the target remote command of
GDB and will be serving register and memory content. This allows
using GDB to examine stack and memory where the fatal error
occurred.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-08-24 20:28:24 -04:00
Fabio Utzig
054a9aeec9 doc: fix typo in heap.rst
typo: stanard -> standard

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-24 20:27:30 -04:00
Fabio Utzig
a83f04ee53 doc: fix typo in fifos.rst
typo: FIF -> FIFO

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-08-24 20:27:30 -04:00
Peter A. Bigot
d75e1a8f32 doc: guides: portability: fix misspellings in POSIX C LANG table
Fix various missing letters and inconsistent parentheses.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-21 13:55:32 -04:00
Henrik Brix Andersen
b3aca735f7 doc: guides: porting: shields: fix directory layout examples
Fix the directory layout examples to use "<board>" when referring to a
board name, and "boards" when referring to the boards directory.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-21 10:27:57 +02:00
Siddharth Chandrasekaran
b5f7706009 doc: portability/posix: Indicate presence of strtok_r
Commit 0637595e added strtok_r implementation but missed updating this
document.

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2020-08-20 19:40:18 -04:00
Martí Bolívar
5fac1ea7bd doc: usermode: use zephyr_file to locate syscall_handler.h
The file name can be converted into a link to the file using
zephyr_file.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-08-19 10:27:26 -07:00
Torsten Rasmussen
edde894d04 cmake: Zephyr CMake package clean-up and minor fix
Fixes: #27375

This is a cleanup of the Zephyr CMake package export.
The code has been simplified so that the export now happens through a
CMake script. This avoids several generated CMake build files compared
to previous export mode, and thus removes the need for a CMake pristine
script.

A benefit of this cleanup is that it also fixes #27375.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-08-19 12:52:33 -04:00
Martí Bolívar
15f9166386 doc: debugging: fix board runner instructions
Using ZEPHYR_BOARD_FLASH_RUNNER relies on a cache variable that
happens to work but is not a supported feature. The appropriate
variable to set is simply BOARD_FLASH_RUNNER.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-08-19 09:51:13 -04:00
Andrew Boie
fc68feea70 doc: add kernel/thread stack usage notes
This is covered in the porting guide, and we have complete docstrings
for these macros, but having discussion here helps new users understand
how to use these and why they exist.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-17 15:35:42 -07:00
Dominik Ermel
9dc00e45ce doc: syscalls: Minor clarifications, fixes of file paths, etc
Clarification of argument passing to system calls.
Fixes of file paths and typos.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-08-17 13:42:23 -04:00
Peter A. Bigot
4eb8d9dd9e drivers: flash: add API to access SFDP region of serial flash devices
Some flash drivers are capable of issuing a JESD216 READ_SFDP command
to read serial flash discoverable parameters.  Allow applications and
utilities access to that capability where it's supported.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-17 13:38:14 -04:00
Peter A. Bigot
13f96d439e sys: onoff: support clients using synchronous transitions
The on-off manager infrastructure is designed to robust asynchronous
transition between binary states where multiple clients may be
initiating a transition from any context.  The actual transition is
performed using a manager that tracks the current state and pending
operations.  Requests are initiated by passing a reference to an
onoff_client object that holds client state including the notification
mechanism.

This API may be used in subsystems where the transitions for a
particular driver are always synchronous and isr-ok, e.g. setting a
SoC-controlled GPIO.  In this situation the full on-off manager
infrastructure is wasteful.  All we need is a record of the service
state: off, active count, or error.

Add a data structure and an API that can be used to replace the onoff
manager functionality in a situation where all transitions are isr-ok
and synchronous while retaining compatible behavior from the client
perspective.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-14 17:53:39 +02:00
Andrew Boie
63c3e153d6 drivers: use node IDs for DEVICE_MMIO.*_INIT
There is nothing wrong with instance numbers and they are
recommended for use whenever possible, but this is an API
design problem because it's not always possible to get nodes
by instance number; in some cases, drivers need to get node
identifiers from node labels, for example.

Change these APIs (which are not yet in any Zephyr release)
to take node IDs instead of instance IDs.

Fixes: #26984

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-14 13:35:02 +02:00
Maksim Masalski
124b55a73d doc: fix incorectness in multiple overlay files description
In Github issue #27548 I found out that documentation has
incorectness. I made fix and described how correctly provide multiple
overlay files for west and cmake. For both of them necessary to use
quotations. After that, necessary to make one more change if you have
multiple files in quotations. For west necessary to separate multiple
files using spaces and for cmake to separate multiple files necessary
to use semicolons.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-08-14 13:34:16 +02:00
Emil Obalski
ba1c2cdb88 doc: releases: 2.4: Add USB detailed changes.
Add a entry to 2.4 release notes about a need to explicitly
call usb_enable() for applications that configures specific
features.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-08-13 11:49:47 +02:00
Peter Bigot
cabbd916cf drivers: move eeprom_slave driver to tests directory
This device isn't an actual hardware driver: it's a virtual EEPROM
that stores data in an instance-specific RAM buffer, with the data
exposed on an I2C bus as a I2C follower (slave) device that can be
controlled by another device acting as a leader (master) on that same
bus.

As such it's a reasonable example of how to write an I2C follower
driver, but it's not clear that it has a real use in applications.  A
Zephyr application that needs to emulate an EEPROM in a real-world
system would be unlikely to provide its data from a RAM buffer.

The sole in-tree reference is in the i2c_slave_api test, so move the
driver implementation into that test.

The Kconfig and hierarchy are being left in place until it is more
clear how this functionality should be selectable within Zephyr.  The
I2C_SLAVE symbol has been converted from menuconfig to config to
eliminate a Kconfig style diagnostic.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-13 11:49:12 +02:00
Dominik Ermel
3620d41916 doc: syscalls: Fix typos in syscalls documentation
Fixing typos.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-08-12 08:50:19 -07:00
Tomasz Bursztyka
6234a01a0a doc: Add a device structure change entry to release-notes for 2.4 version
Documenting the change.

Fixes #27394

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-08-11 19:30:53 +02:00
Tomasz Bursztyka
98d9b01322 device: Apply driver_api/data attributes rename everywhere
Via coccinelle:

@r_device_driver_api_and_data_1@
struct device *D;
@@
(
D->
-	driver_api
+	api
|
D->
-	driver_data
+	data
)

@r_device_driver_api_and_data_2@
expression E;
@@
(
net_if_get_device(E)->
-	driver_api
+	api
|
net_if_get_device(E)->
-	driver_data
+	data
)

And grep/sed rules for macros:

git grep -rlz 'dev)->driver_data' |
	xargs -0 sed -i 's/dev)->driver_data/dev)->data/g'

git grep -rlz 'dev->driver_data' |
	xargs -0 sed -i 's/dev->driver_data/dev->data/g'

git grep -rlz 'device->driver_data' |
	xargs -0 sed -i 's/device->driver_data/device->data/g'

Fixes #27397

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-08-11 19:30:53 +02:00
Tomasz Bursztyka
d86f79cbd7 doc: Update device driver documentation on driver_* attributes rename
s/driver_data/data
s/driver_api/api

Fixes #27397

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-08-11 19:30:53 +02:00
Tomasz Bursztyka
af6140cc0d device: Apply config_info rename everywhere
Via coccinelle:

@r_device_config@
struct device *D;
@@

D->
-	config_info
+	config

And 2 grep/sed rules for macros:

git grep -rlz 'dev)->config_info' |
	xargs -0 sed -i 's/dev)->config_info/dev)->config/g'

git grep -rlz 'dev->config_info' |
	xargs -0 sed -i 's/dev->config_info/dev->config/g'

Fixes #27397

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-08-11 19:30:53 +02:00
Tomasz Bursztyka
a46b4a9921 doc: Update device driver documentation on config_info attribute rename
s/config_info/config

Fixes #27397

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-08-11 19:30:53 +02:00
Torsten Rasmussen
125a4d7c21 doc: release notes: description of SOC, DTS, BOARD, and ARCH roots
This commit updates the release notes with the changes introduced
in #26715.

It also informs readers that existing use of `$(SOC_DIR)` in Kconfig
must be updated, for example to use `rsource` instead of
`source $(SOC_DIR)` in order to adopt to latest changes.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-08-10 12:12:48 +02:00
Torsten Rasmussen
650cf3c6a9 doc: soc root and kconfig description
This commit updates the description of SOC_ROOT according to the new
multiple SOC_ROOT enhancement.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-08-10 12:12:48 +02:00
Peter A. Bigot
76ed20b268 doc: releases: 2.4: note SPI gpio CS active level config change
The change to use devicetree instead of the config option will break
anybody who has a devicetree that doesn't include the proper active
level for cs-gpios (which is not zero).

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-07 06:53:12 -05:00
Jukka Rissanen
d5eb4807d6 doc: net: Add information about net_pkt processing statistics
Add a document how to get and interpret information about
network TX / RX packet processing statistics.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-08-07 10:12:51 +03:00
Joakim Andersson
091565e8d3 doc: relnotes: Document change in L2CAP RX MTU configuration
Document change in how L2CAP RX MTU is set through Kconfig options.
Document recommended new value for applications that have set
CONFIG_BT_RX_BUF_LEN.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-08-06 11:46:48 +02:00
Torsten Rasmussen
c9a78257b2 doc: Zephyr module build settings
This commit adds description of the build setting support in the
module.yml file.

It is described how additional board_root, soc_root, dts_root, and
arch_root can be appended to the build system.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-08-05 08:06:07 -04:00
Torsten Rasmussen
0a4b0bbb7c doc: zephyr module description restructure
This commit restructures the Zephyr module description.
It places the description of the module yaml file in a dedicated section
as this file is common to module inclusion both when using `west` and
without `west`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-08-05 08:06:07 -04:00
Torsten Rasmussen
5f7cc8ded9 cmake: kconfig: support for multiple SOC_ROOT
This commit introduces support for multiple SOC_ROOT.

This means that additional SOC_ROOTs specified using -DSOC_ROOT as
argument to CMake will be forming a list together with ${ZEPHYR_BASE}.

This allows for greater flexibility, as developers can now specify
multiple out-of-tree SoCs and not worry about the SoC used for the
board they compile for.

Also it avoid code, such as:
if(BOARD STREQUAL my_board_using_out_of_tree_soc)
  set(SOC_ROOT some/out/of/tree/soc/path)
endif()
in application CMakeLists.txt.

Finally, allowing multiple SOC_ROOTs prepares for specifying SOC_ROOTs
in Zephyr modules.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-08-05 08:06:07 -04:00
Carles Cufi
244f826e3c cmake: remove _if_kconfig() functions
This set of functions seem to be there just because of historical
reasons, stemming from Kbuild. They are non-obvious and prone to errors,
so remove them in favor of the `_ifdef()` ones with an explicit
`CONFIG_` condition.

Script used:

git grep -l _if_kconfig | xargs sed -E -i
"s/_if_kconfig\(\s*(\w*)/_ifdef(CONFIG_\U\1\E \1/g"

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-08-01 12:35:20 +02:00
Andrew Boie
5bd9afe484 doc: porting: add stack object details
Explain best practices for defining stack object macros.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
Dominik Ermel
d86497ebc2 doc: relnotes: Add API change note for fs_open
Update release notes API change section with information on change to
fs_open parameter list.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-07-30 16:33:18 +02:00
Anas Nashif
4c67339571 doc: add documentation about --integration option
Document the --integration option.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-30 08:00:03 -04:00
Tomasz Bursztyka
f0743df54d doc: Add a IPM API change entry to release-notes for 2.4 version
Documenting the change.

Fixes #26923

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-07-30 09:51:51 +02:00
Tomasz Bursztyka
a4c9801c1c doc: Add a DMA API change entry to release-notes for 2.4 version
Documenting the change.

Fixes #26923

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-07-30 09:48:00 +02:00
Tomasz Bursztyka
e01c4dcceb doc: Add a UART API change entry to release-notes for 2.4 version
Documenting the change.

Fixes #26923

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-07-30 09:43:12 +02:00
Jukka Rissanen
336bcfa471 net: if: Make sure only allowed threads can access syscalls
Make sure that only those threads that have been granted access
to net_if objects, can call the functions that modify net_if data.

The CONFIG_NET_IF_USERSPACE_ACCESS config option is also removed
as it is no longer needed after this change.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-07-29 08:13:22 -04:00
Gerard Marull-Paretas
75949f470f doc: releases: 2.4: add LVGL v7 update details
Add details of the LVGL7 update (e.g. warn about higher ROM usage,
changed Kconfig defaults, ...)

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-07-27 15:06:22 +02:00
Anas Nashif
4b0f5ea100 doc: add documentation for tool targets
Document the following targets:
- ram_report
- rom_report
- puncover
- pahole

Fixes #26758

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-26 19:26:57 -04:00
Maureen Helm
52f993de11 doc: contribute: Require OSI-approved licenses
Updates the contribution guidelines to document the current board policy
of rejecting non-OSI-approved licenses.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-07-25 21:26:55 -04:00
Lauren Murphy
f014ba1ff1 doc: coding guidelines: fix links for other rules examples
This PR fixes the links to the example files in the Gitlab repository.
Fixes Dir 4.8 and Rule 2.1, 5.1, 5.8, 5.9, 8.5, 8.6, 13.1, and 13.5.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2020-07-25 10:50:03 -04:00
David Leach
db36b146e1 kernel: Remove supported size comments from HEAP_MEM_POOL_SIZE
The mempool implementation doesn't require specific sizes and can
support arbitrary sizes up to the limit of available memory. The
Kconfig documentation on this configuration was confusing user.

Fixes #20418

Signed-off-by: David Leach <david.leach@nxp.com>
2020-07-24 10:19:47 +02:00
Peter Bigot
f45f72c9a4 doc: development_process: document that CI style checks can fail
The CI style checking solution can produce false positives when it's
given code that it mis-parses, or that follows conventions it doesn't
allow.  Document a couple examples, and explicitly note that
maintainers should override the -1 vote if they're encountered.

For those following along in the commit history:

   static uint8_t __aligned(PAGE_SIZE) page_pool[PAGE_SIZE * POOL_PAGES];

checkpatch sees "uint8_t __aligned(PAGE_SIZE)" and infers a prototype
for a function "__aligned" that takes an unnamed parameter of type
"PAGE_SIZE".  So it adds "PAGE_SIZE" as a known type name.

   IOPCTL_Type *base = config->base;

This is common in driver code where the vendor HAL allows typedefs for
structure types.  checkpatch was designed for an environment with
limited use of typedefs; "struct IPCTL_Type" would have been handled
properly.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-23 14:04:44 +02:00
Daniel Leung
8fe7fbf7ee doc: coding_guidelines: sort list in natural order
Sort the MISRA lists in a more natural ascending numeric order.
So instead of 1.1 - 1.10 - 1.11 - 1.2 - 1.3, we now have
1.1 - 1.2 - 1.3 - 1.10 - 1.11.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-07-22 17:36:33 -04:00
Andries Kruithof
f434beb2bf doc: Coding Guideline: correct reference for rule 18.6 examples
Rule 18.6 has the examples split in two files. This PR adds
the correct reference to the example files in the gitlab
repository

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2020-07-22 12:43:08 +02:00
Anas Nashif
e8e367ada4 sanitycheck: support only_tags for boards
Support running/building only specific tags and ignoring everything
else.

Adding this to a platform yaml file will enable tests with one of of
tags listed to be executed on the platform.

This is useful for special platform configurations used for testing
specific features for example.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-20 17:44:16 -04:00
Trond Einar Snekvik
f8663774de Bluetooth: Mesh: Document shell commands
Adds a high-level documentation page for the Bluetooth Mesh Shell
subsystem, documenting all available commands and their parameters.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-07-20 12:47:31 +02:00
Ioannis Glaropoulos
0292df5489 doc: release: add note for SW_VECTOR_RELAY feature in Mainline Cortex-M
Add a note in 2.4 release notes regarding SW_VECTOR_RELAY
feature, now supported also in Mainline Cortex-M architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-17 13:22:17 +02:00
Andrew Boie
e33fc71d71 doc: add device MMIO details
Add some overview documentation on how to use this header.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Andrew Boie
9ff148ac83 kernel: define arch_mem_map()
This is the low-level arch function to map a region into page
tables.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-17 11:38:18 +02:00
Carles Cufi
b62a3692d7 doc: contribution: Add link to the coding guidelines
Add a small section that describes the existance of the coding
guidelines page and links to it, in order to raise awareness of the
effort towards complying with those.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-07-17 11:09:45 +02:00
Carles Cufi
c2df27fa0b doc: Link to guidelines from the contribution page
Link to the coding guidelines from the main contribution guidelines
page, so that users are aware of the guidelines.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-07-17 11:09:45 +02:00
Carles Cufi
e924364035 doc: guidelines: Add additional guidelines
Aside from the MISRA-C derived Coding Guidelines, add a list for
additional ones that are not a subset of a standard.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-07-17 11:09:45 +02:00
Carles Cufi
611927c49b doc: guidelines: Cleanup formatting
Cleanup formatting and a couple of instances of missing "rules".

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-07-17 11:09:45 +02:00
Anas Nashif
0ff33d1ae7 doc: fix usage of :c:type
Fixing issues with recent versions of breathe 4.19.2:

 WARNING: Unparseable C cross-reference: 'struct device'
 Invalid C declaration: Expected identifier in nested name, got keyword:
 struct [error at 6]
   struct device
     ------^

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-16 15:44:50 -04:00
Ruth Fuchss
81a6107343 doc: add IDs to some sections
Add documentation IDs to some sections to be able
to directly link to them.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2020-07-16 08:22:48 -04:00
Anas Nashif
568211738d doc: replace lifo/fifo with LIFO/FIFO
Replace all occurances of lifo/fifo with LIFO/FIFO to be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-15 14:01:33 -04:00
Anas Nashif
1fc2e43eb3 doc: make device pm APIs show in doxygen docs
Those were not being processed due to Kconfig only exposing the noop
functions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-14 19:23:15 -04:00
Uma Praseeda
ed9750a3a9 Doc: Updating ieee802154_interface Readme
Added a link to IEEE GET program web page to suggest
an option of downloading the specification to the users.

Signed-off-by: Uma Praseeda <uma.praseeda@nordicsemi.no>
2020-07-14 18:00:46 +02:00
Peter Bigot
9dc7640ede spi-device: set CS gpio flags for all devices that had none
The generic SPI GPIO chip select support now respects devicetree flags
for signal active level.  Update all cs-gpios properties to specify
active low.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-09 06:07:07 -05:00
Peter Bigot
a0f025995d drivers: watchdog: update API to reflect additional return code
Allow feed operations that would stall due to internal peripheral
delays to complete immediately with -EAGAIN indicating that the feed
did not occur as expected.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-09 06:44:59 -04:00
Anas Nashif
dc85b395b0 doc: add coding guidelines
Add the coding guidelines agreed upon by the project TSC with a
description of the staged approach needed to implement them

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-07-08 23:27:15 -04:00
Kumar Gala
6bf761fc0a dts: Remove support for deprecated DTS binding syntax
We deprecated a number of aspects of the DTS binding syntax in Zephyr
2.1.  Remove the support for the deprecated syntax.  Remove from docs
about the deprecated syntax as well.

Removed reference in release-notes-2.1.rst to legacy_binding_syntax
since that anchor doesn't exist anymore.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-08 22:03:24 -04:00
Flavio Ceolin
b7d27b94df doc: security: Avoid confusion with code guideline
Security documentation contains a code guideline section that is more
about security principles than code guidelines itself. Just removing
the mention do code guideline to avoid possible confusions with
upcoming project code guideline based on MISRA-C.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-07-07 19:29:21 -04:00
Ioannis Glaropoulos
4f297c72d3 doc: contribute/modifying_contributions: minor typo fix
Fix a typo in modifying_contributions.rst.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-06 10:44:18 -04:00
Joakim Andersson
4281843fd7 doc: relnotes: Add release notes for updated HCI driver event handling
Add release notes for updated HCI driver event handling for calling the
bt_recv() and bt_recv_prio() functions when delivering HCI events to
the host.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-07-06 11:15:39 +02:00
Ioannis Glaropoulos
5487e51bb7 doc: contribute: modifying_contributions: add link to dev processes
Add a link to the page describing our development
processes, as it contains the description of how
to identify issues and pull requests as stale.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-02 08:15:53 -04:00
Ioannis Glaropoulos
eb005afd2c doc: contribute: Describe policies for modifying patches or others
Add a small section, clarifying the policies around modifying
contributions submitted by other developers.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-02 08:15:53 -04:00
Ioannis Glaropoulos
10fcb6175a doc: contribute: add paragraph about cherry-picking content
Add a small paragraph in the Contribution Guidelines
documentation to stress that cherry-picking of patches
into other pull requests is an allowed practive. Add a
link to additional documentation clarifying policies
around modifying patches of other developers.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-02 08:15:53 -04:00
Jukka Rissanen
4363c566ed doc: kernel: Add sys_sem APIs to kernel documentation
The kernel documentation was missing sys_sem APIs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-06-24 15:38:47 -04:00
David Leach
5385d49029 doc: release: Document release quality metrics
Document the bug count metrics used to gate the release process

Signed-off-by: David Leach <david.leach@nxp.com>
2020-06-24 09:47:34 -04:00
Martí Bolívar
e2b72a0ede doc: clarify how to set $FOO_ROOT in CMakeLists.txt
I received feedback that setting e.g. BOARD_ROOT in CMakeLists.txt is
not quite well specified; in particular, it's important to do so
before pulling in the boilerplate via find_package(). Clear that up.

Reported-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-06-24 09:44:48 -04:00
Peter Bigot
219a3ca96d device: provide internal access to static device array
Device objects in Zephyr are currently placed into an array by linker
scripts, making it easy to iterate over all devices if the array
address and size can be obtained.  This has applications in device
power management, but the existing API for this was available only
when that feature was enabled.  It also uses a signed type to hold the
device count.

Provide a new API that is generally available, but marked as internal
since normally applications should not iterate over all devices.  Mark
the PM API approach deprecated.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-06-23 13:27:14 +02:00
Peter Bigot
72ebf70543 device: refactor to simplify maintenance
DEVICE_AND_API_INIT and DEVICE_DEFINE are identical except that
DEVICE_DEFINE adds a parameter providing the device pm control
function, while DEVICE_AND_API_INIT does not.  This requires duplicate
implementations where if CONFIG_DEVICE_POWER_MANAGEMENT is enabled
then DEVICE_AND_API_INIT delegates to DEVICE_DEFINE with a dummy pm
control function, and if it is not enabled then DEVICE_DEFINE discards
the parameter and delegates to DEVICE_AND_API_INIT.

DEVICE_INIT is like DEVICE_AND_API_INIT but doesn't provide an API.

Clean this up by refactoring so that DEVICE_DEFINE is the core
implementation, providing with and without device power management
right next to each other where they can be compared and maintained.
Redefine DEVICE_INIT and DEVICE_AND_API_INIT delegate to
DEVICE_DEFINE.

Also remove duplicate code by extracting the variations due to
enabling device power management into macros.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-06-22 13:37:07 +02:00
Fabio Utzig
3f28f69477 doc: add --no-index-modules option to genrest.py
This add a new option `--no-index-modules` which works similarly to
`--modules` but does not generated index pages, only retains the
tweaking of how paths are displayed on symbol information pages,
showing '<title>/path/within/module/Kconfig' for paths that fall
within modules.

This is required by NCS, where there are more "modules" which we don't
want to have indexes for.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-06-19 18:14:18 +02:00
Martí Bolívar
1af73a66ab sys/util.h: remove deprecated MACRO_MAP()
Since this is an experimental API and MACRO_MAP() was deprecated in
favor of FOR_EACH() in zephyr v2.3.0, we are within our rights to just
remove it without notice now. Do so and mention it in the release
notes.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-06-18 19:38:10 +02:00
Martí Bolívar
67ac768415 doc: release-notes: add sys/util.h to 2.4 release notes
Add a line item under "API Changes"

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-06-18 19:38:10 +02:00
Martí Bolívar
04df8124ac api: promote sys/util.h to experimental
This file contains definitions for macros which are integral to
significant Zephyr use cases, such as CONTAINER_OF() and various
macros used by devicetree.h internally.

As such, in practice we expect at least advanced (if not intermediate)
users to understand it, so the fact that it's not formally documented
as an API with a stability level is a problem.

Fix that by giving the docstrings a once-over and adding new ones
where they are missing. Move all the remaining non-API macros to
util_internal.h.

Add a Sphinx API page for this header, and include it in the API
overview at "experimental" stability level.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-06-18 19:38:10 +02:00
Håkon Øye Amundsen
13cf241ee6 cmake: docs: Fix 'test_relocation' -> 'code_relocation'
Incorrect name used for sample in two places.
This commit fixes these issues.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2020-06-17 09:40:47 +02:00
Johan Hedberg
2f835332eb doc: releases: Add release notes for Zephyr 2.2.1
Add the release notes for Zephyr 2.2.1.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-06-16 19:12:09 +02:00
Krzysztof Chruscinski
3a25c75ad9 doc: Add CONFIG_UART_ASYNC_API to the doxygen defines
Added CONFIG_UART_ASYNC_API to enable documentation generation for
asynchronous API.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-16 19:11:57 +02:00
Krzysztof Chruscinski
29cab30d46 logging: Clarify that hexdump messages have no function prefix
It was not clear that hexdump messages does not support prepending
with function name. Added clarification.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-16 19:05:51 +02:00
Peter Bigot
ccc53f9872 docs: drivers: remove suggestion to assign driver_api in init function
The driver API should be assigned at the time the device is defined.
Assigning in the init function is redundant and prevents moving the
pointer to a immutable driver structure.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-06-16 10:46:39 -05:00
Robert Lubos
bd7d6926c4 net: lwm2m: Add ObjLnk resource type support
Implement LWM2M ObjLnk resource type and plaintext, TLV and JSON
readers/writers.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-06-15 22:13:34 +03:00
Peter Robinson
eb85aa13d2 doc: reference: Move i2s reference to Audio section
Now there's an audio reference section move the i2s docs there
as the audio section is a better fit.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2020-06-12 10:29:24 -04:00
Carles Cufi
a247be5ca8 doc: bluetooth: Add full name for Nordic
Add "Semiconductor" to the Nordic company name.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-12 15:50:11 +02:00
Carles Cufi
ac343a27ff doc: bluetooth: Add 2.2.x Host qualification listing
Add the new listing from Demant/Oticon.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-12 15:50:11 +02:00
Carles Cufi
b9dcc9b283 doc: release: Clarifications to tagging
Clarify a few points in the tagging section of the release
documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-10 16:23:23 +02:00
Carles Cufi
902633c545 doc: release: Fix the EXTRAVERSION setting
The EXTRAVERSION field needs to be set to an empty string, not to 0,
once the release is cut.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-10 16:23:23 +02:00
Sturla Lange
31b19bf538 doc: contribution: Fix series-push-hook path
The script is located in the scripts directory, not root.

Signed-off-by: Sturla Lange <sturla22@gmail.com>
2020-06-10 05:20:54 -05:00
Peter Bigot
d6a492d8f1 doc: guides: sanity_chk: add documentation on hardware map keyword
The probe_id keyword was added to support overriding the inferred id
when determining the board-id to use when flashing.  Document the
keyword.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-06-10 12:03:17 +02:00
Peter Bigot
3c36b42d03 sanitycheck: add notes key to schema
Prior to addition of schema validation running sanitycheck
--generate-hw-map would preserve the value of any field in an existing
map that it didn't update.  These fields now cause a parsing error.
Add notes as an optional key where information relevant to the board
can be added to provide useful context (such as which serial port
corresponds to the console, or why a non-standard runner is required).

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-06-10 12:03:17 +02:00
Kumar Gala
6e9d109922 doc: api_lifecycle: Use DEPRECATED instead of LEGACY in Kconfig
Recommend that Kconfig symbols related to deprecated features use
'DEPRECATED' in the symbol name instead of 'LEGACY'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-09 18:56:00 +02:00
Kumar Gala
1737bd082d zephyr: Use deprecated instead of legacy for Kconfig int types
Rename the Kconfig symbol from LEGACY_ZEPHYR_INT_TYPES to
DEPRECATED_ZEPHYR_INT_TYPES.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-09 06:49:56 -05:00
Kumar Gala
a2d4292a96 doc: relnotes: Add note about C99 types.
Add top line note about C99 integer types being the default

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Kumar Gala
a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Carles Cufi
964da1ca6c doc: conf: Add 2.3.0 version selector
Add the 2.3.0 release to the version selector for the documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-05 22:03:54 +02:00
Carles Cufi
40b02ee891 doc: relnotes: Add 2.4 release notes draft
Add a working draft for the 2.4.0 release notes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-05 22:03:54 +02:00
Carles Cufi
bb2bc44367 doc: relnotes: Remove draft status from 2.3 release notes
Mark the release notes as complete.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-05 22:03:54 +02:00
Carles Cufi
8beda01c0f doc: reference: Update overview for 2.3
Update the API overview page by looking at the changes in include/ since
the last release.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-05 20:36:16 +02:00
Carles Cufi
89a0bcd1cf doc: relnotes: Add a known issues section
Add a known issues section with the current high-priority bug listed in
it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-05 20:35:56 +02:00
Carles Cufi
b752e05bab doc: relnotes: List all closed issues for 2.3
scripts/release/list_issues.py -o zephyrproject-rtos -r zephyr -s
2020-03-10 -f issues.txt

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-05 20:35:56 +02:00
Carles Cufi
3ebb5f339c doc: relnotes: Fix verb tenses
Use past tenses everywhere.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-05 20:35:56 +02:00
Carles Cufi
7d17c313d4 doc: relnotes: Extra 2.3 tidbits
Add a few extra tidbits related to boards and APIs.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-05 20:35:56 +02:00
Carles Cufi
27b38bd654 doc: relnotes: Document the random subsystem
Add the single relevant change to the random subsystem.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-05 20:35:56 +02:00
Anas Nashif
cab4ffcf40 doc: release-notes: add x86/kernel sections
Amend both kernel and x86 sections and remove unchanged sections in
other subsystems.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-06-05 17:12:22 +02:00
Torsten Rasmussen
61e79bb1eb doc: updated to reflect changes introduced with Zephyr CMake package
This commit updates the Zephyr documentation with changes introduced
by Zephyr CMake package.

It removes 'zephyr-env.sh/cmd' where no longer needed, and updates
boilerplate inclusion to find_package.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-06-04 22:12:03 +02:00
David Brown
b32b5e151a doc: security: Release CVEs from embargo
These CVEs have been released from embargo.  Include details in the v2.3
release notes, and in the vulnerabilities document.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-06-04 22:11:31 +02:00
Wayne Ren
ea7140ba63 doc: add the ARC part for release 2.3
add the ARC processor related part for release 2.3

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2020-06-04 22:09:54 +02:00
Maureen Helm
afd31e9091 doc: release notes: Fixup openisa BLE changes in 2.3 release notes
Fixes up the 2.3 release notes to clarify 2 Mbps PHY support in the
openisa BLE link layer.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-06-04 10:29:00 +02:00
Maureen Helm
38a8f9c247 doc: release notes: Fill in 2.3 drivers section
Adds 2.3 release notes for all remaining driver classes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-06-04 10:29:00 +02:00
Maureen Helm
900329ce08 doc: release notes: Use past tense in 2.3 drivers section
Edits the 2.3 release notes drivers section to use past tense instead of
present tense.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-06-04 10:29:00 +02:00
Torsten Rasmussen
d585cdd185 doc: release notes: add Zephyr CMake package to release notes
This commit fills the Build and Infrastructure section with the Zephyr
CMake package enhancement.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Carles Cufí <carles.cufi@nordicsemi.no>
2020-06-03 18:38:30 +02:00
Carles Cufi
3318ad3dfb doc: kernel: Fix invalid use of K_NO_WAIT
K_THREAD_DEFINE can no longer use K_NO_WAIT to specify the delay after
the timer API rework. Fix the documentation to use 0 and add a note.

Fixes #25697.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-02 18:03:06 +02:00
Martí Bolívar
a2391078f9 doc: release-notes-2.3: remove LED line
No significant changes, just API cleanups.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-06-02 16:41:36 +02:00
Carles Cufi
2ed17d2725 doc: release notes: Add 2.3 Bluetooth release notes
Add release notes for Bluetooth.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-02 16:36:00 +02:00
Carles Cufi
a43d271a70 doc: release notes: Add 2.3 release notes on documentation
Fill the Documentation section in the 2.3 release notes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-02 16:36:00 +02:00
Carles Cufi
a5f9fe3e90 doc: releases: Add 2.3 release notes highlights
List the highlights of this release.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-06-02 16:36:00 +02:00
Andy Ross
567bc2638b docs/releases: Document the heap and timeout changes in 2.3
Some kernel release notes for 2.3.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-06-02 15:22:41 +02:00
Alberto Escolar Piedras
517d652dc7 doc: release-notes-2.3: Add POSIX ARCH section
Added POSIX ARCH section

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-06-02 15:22:11 +02:00
Ioannis Glaropoulos
b32c3e6f9a doc: release_notes: complete list of added ARM SoCs in v2.3 release
Complete the list of added ARM SoCs and SoC Series
in Zephyr v2.3.0 release cycle.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-06-02 15:14:45 +02:00
Ioannis Glaropoulos
b9a3aa8267 doc: release_notes: complete list of added ARM Boards in v2.3 release
Complete the list of added ARM Boards in Zephyr
v2.3.0 release cycle.

Add deprecation note for efr32_slwstk6061a.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-06-02 15:14:45 +02:00
Piotr Mienkowski
b112d5c200 doc: release-notes-2.3: Add GPIO section
Add 2.3 release notes related to GPIO drivers.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-06-01 12:30:24 +02:00
Carles Cufi
d29a06f8a8 doc: dev process: Add a note about deprecation mechanisms
Describe how an API can be deprecated, which is via the __deprecated
keyword or by introducing a legacy Kconfig option.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-05-29 18:06:52 +02:00
Vincent Wan
6084957fb8 doc: release-notes-2.3: add power management for CC13x2/CC26x2
Add support of power management for CC13x2/CC26x2 in release notes.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-05-29 15:05:18 +02:00
Stephanos Ioannidis
90f18b2127 doc: Add ARM release notes for v2.3
This commit adds the ARM release notes for the v2.3 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-29 13:12:14 +02:00
Ioannis Glaropoulos
f0a09ac32d doc: release notes: add release notes entries for ARM Cortex-M
Zephyr v2.3 release notes content for ARM Cortex-M architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-05-29 13:12:14 +02:00
Marc Herbert
3a04536487 doc,cmake: make find_package(Zephyr...) REQUIRED
This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry. See parent commit for more details (split from parent for
better readability).

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-05-29 10:47:25 +02:00
Martí Bolívar
af40c99fac doc: release notes update for devicetree
I believe the devicetree documentation for the release is in good
enough shape now. Add a few more links to the release notes to provide
users with more hints for adapting to the new API.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-28 22:12:38 +02:00
Martí Bolívar
e4a761cffe devicetree: add migration guide documentation and tests
Add test cases that verify various bits and pieces of the legacy
devicetree macros match the new APIs.

Writing these test cases without giving rise to deprecated macro
warnings which might break people's CI if they build with -Werror
requires turning off the __WARN() generation in
devicetree_legacy_unfixed.h. The entire file is deprecated at this
point and must be explicitly enabled with an opt-in Kconfig option, so
there isn't any harm in doing this.

Nevertheless, take a minimally invasive approach to avoiding __WARN()
generation in gen_legacy_defines.py, to avoid the possibility of
breakage. This code is basically frozen anyway, so hacks like this
won't cause maintainability problems since it isn't being actively
maintained.

Use the new tests as fodder for a migration guide from the old API in
the documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-28 22:12:38 +02:00
Anas Nashif
7818597da3 doc: make statement about version bold
Make that top paragraph bold to indicate the version being viewed is for
master.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-28 10:30:38 +02:00
Anas Nashif
517ee9172f doc: add a header to all pages about development version
Add a header to all pages indicating the documentation is for the
development version of Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-28 10:30:38 +02:00
Piotr Zierhoffer
84e54ee92e doc: release-notes-2.3: Add ADXL345 mention
A 3-axis accelerometer from Analog Devices.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2020-05-27 19:39:14 +02:00
Piotr Zierhoffer
1fcebf8057 doc: release-notes-2.3: Add RISC-V-related changes
Mostly related to rv32m1_vega updates, and some generic RISC-V
improvements.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2020-05-27 19:39:14 +02:00
Torsten Rasmussen
9adcabe38d cmake: introduction of ZephyrBuildConfiguration package
The ZephyrBuildConfiguration package allow downstream users to control
the Zephyr build system using a cmake package.

A Zephyr Build Configuration package allows for setting of additional
DTS_ROOT, BOARD_ROOT, and similar variables without having to patch
Zephyr repo, but it also allows for inclusion of additional boilerplate
code for more advanced use cases.

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

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-05-27 17:58:50 +02:00
Erwan Gouriou
b9bde4ce85 doc/release: v2.3.0: Update for stm32
Update V2.3.0 release note for stm32 with:
- Added SoC series
- New boards support
- Noticeable changes in stm32 drivers and subsystems

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-27 13:48:23 +02:00
Erwan Gouriou
b13b6d92fd doc/release: v2.3.0: Update boards/shields section
Add newly supported shields for V2.3.0 release

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-27 13:48:23 +02:00
Paul Sokolovsky
e84fbfff17 doc: release-notes-2.3: Add POSIX subsys highlights
2 useful functions implemented, sample for read()/write() added
(or rather, existing sample to modified to support that).

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-05-27 13:47:49 +02:00
Martí Bolívar
31a90a0e7d doc: dts: simplify DT_INST documentation
Add some introductory text to these driver helpers which makes it more
clear how they are defined in terms of the generic APIs, which allows
removing some boilerplate from doxygen. This also gives us a chance to
call out the exceptional cases and add some more documentation to those.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-26 22:32:34 +02:00
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
Anas Nashif
b12869a3f9 docs: crypto: crypto API documentation
Fix crypto API doxygen syntax and integrate into documentation as RST.

Fixes #21820

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-03-14 13:01:03 -04:00
Jose Alberto Meza
63d26c8b1d doc: reference: peripherals: Add PECI API documentation
Add PECI API documentation

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-03-13 18:53:04 +02:00
Martí Bolívar
ededeb2736 doc: fix some errors
I've been seeing these cause errors on the more recent versions of
Doxygen which come with Arch Linux for a while now. Fix these:

error: Illegal format for option TCL_SUBST, no equal sign ('=') specified for item 'YES'
$ZEPHYR_BASE/tests/kernel/mem_protect/futex/src/main.c:461: warning: end of file with unbalanced grouping commands

Just trying to get them out of my local output and as preparation for
whenever they start showing up for Ubuntu.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-13 11:23:34 -04:00
Andrew Boie
806c8af660 doc: add k_thread_join() to documentation
Added to the section covering thread termination.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-13 08:42:43 -04:00
Erwan Gouriou
5b2d17ab42 doc: board_porting: Provide guideline on MPU activation
Provide a rule to settle on MPU activation by default.
Request is to activate it by default if board resources allow.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-03-12 11:28:58 +02:00
Ruth Fuchss
828d707465 doc: keep IDs when redirecting URLs
When redirecting from old-topic.html#some-id to new-topic.html,
the ID is ignored.
Not sure if it is possible to keep the ID in the meta redirect,
but at least in the JavaScript version we should keep it and
redirect from old-topic.html#some-id to new-topic.html#some-id.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2020-03-11 08:46:26 -04:00
Kumar Gala
5acb97ffa6 doc: releases: Release notes for v2.3 - initial (empty) draft
Getting things prepared for the Zephyr 2.3 release cycle

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-10 20:54:01 +02:00
Andrew Boie
81cfb08f52 random: remove rand32_timestamp.c
This is a copy of rand32_timer.c that uses
z_do_read_cpu_timestamp32() instead of k_cycle_get_32(),
with some logic to ensure different values when called in
rapid succession missing.

Like the other driver, its reported values are not random,
it's a testing generator only.

This appears to have no advantages over rand32_timer.c,
just remove it. In QEMU emulation, the reported TSC values
tend to have the lowest five bits zeroed.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-10 10:40:13 -04:00
Jacob Siverskog
09ade0191d doc/reference/runtime_conf: improve example snippet
Improve settings example snippet so that it builds and works as
expected. For usability purposes, add print of stored value.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2020-03-10 15:11:27 +02:00
Johan Hedberg
883f1aede0 doc: Update generated version list for 2.2.0
Add 2.2.0 to the version pick list. Also remove old versions so that
the oldest one is the LTS release.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-10 10:49:52 +02:00
Johan Hedberg
ee4a28e127 doc: release notes: Update contents for 2.2.0
Finalize the release notes for Zephyr 2.2.0.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-10 10:49:52 +02:00
Carles Cufi
dad082d170 doc: gsg: Link to the gatekeeper section from the toolchains
Add a warning about the Gatekeeper issues that Catalina introduces in
the section about GNU Arm Embedded.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-09 21:56:58 +02:00
Carles Cufi
4a45ceaf62 doc: gsg: Remove duplicate information for Windows
The GSG already includes the setup instructions. Remove the
duplicate that existed in installation_win.rst.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-09 21:56:58 +02:00
Carles Cufi
e35f86aae6 doc: gsg: Remove duplicate information for macOS
The GSG already includes the setup instructions. Remove the duplicate
that existed in installation_mac.rst.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-09 21:56:58 +02:00
Carles Cufi
a997a803a3 doc: gsg: Minor macOS clarification
The check for updates sequence applies to Mojave and later versions.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-09 21:56:58 +02:00
David Brown
dfc276f1be doc: release notes: Update v2.2 for security
Add additional CVEs addressed in this release.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-03-09 21:37:25 +02:00
Johan Hedberg
bf8caf3956 doc: release notes: Remove TBD entry from Build and Infrastructure
There's presumably no more items coming to this section, so remove the
TBD bullet point.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-07 21:00:10 +02:00
Johan Hedberg
6ec317b2de doc: release notes: Add some information for ARC
ARC didn't have many changes, but there's a bunch of irq-related
fixes since the last release, so mention these.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-07 21:00:10 +02:00
Martí Bolívar
fe6107f2b3 doc: finish reworking the board porting guide
Now that the west parts of this file are in better shape, it seems a
shame not to flesh out the rest a bit more.

It's been a while since we looked at this document, as it's still
referring to boards (like Arduino 101) that are no longer supported by
Zephyr, and is generally lacking in concrete, step-by-step advice
for going from zero to working board.

Let's fix that.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-06 19:31:06 +02:00
Johan Hedberg
80ea034f7d doc: release notes: Include LoRa in major features
Add LoRa to the major feature list of 2.2.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-06 18:26:05 +02:00
Flavio Ceolin
46330f13ed doc: release notes: Add 2.2 update mbedTLS
Update libraries section with the mbedTLS version

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-03-05 12:39:30 +02:00
Flavio Ceolin
759c41ea3f doc: release notes: Add 2.2 release notes for security
Added notes about CVE's assigned in this release.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-03-05 12:39:30 +02:00
David Brown
4759da8819 doc: security: Create a vulnerabilities report
In addition to having security vulnerability fixes reported within each
release note page, consolidate all of them in a new vulnerabilities
document.

This gives us two advantages: 1. The vulnerabilities can easily be
referenced in a single place, which is useful for someone trying to
cross reference against CVE lists, and 2. It allows a release to be made
with just CVE numbers when issues are under embargo, and the details can
be added to this vulnerabilities page.  The release notes will be locked
to a tag, and updates will not be visible.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-03-05 12:39:13 +02:00
Andrew Boie
8d5bb88aa7 doc: add x86 and core kernel release notes
Add x86 and core kernel release notes for 2.2.0.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-05 10:28:22 +02:00
Carles Cufi
345d4f51c1 doc: gsg: macOS: Describe Gatekeeper workarounds
Describe how to work around the Gatekeeper enforcement of security
policies in apps launched from the Terminal.

Fixes #23168.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-05 09:43:27 +02:00
Martí Bolívar
180cbf1a00 doc: more board porting improvements
Incorporate more feedback suggested in #23080.

Suggested-by: Lucian Copeland <hierophect@gmail.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-04 22:37:52 +02:00
Carles Cufi
cf2d474adf doc: gsg: Add a note about blinky
Add a note that describes the fact that blinky does not run on all
boards supported by Zephyr, and propose an alternative (Hello World) for
those boards.

Fixes #23169.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-04 21:50:43 +02:00
Carles Cufi
f80164525f samples: blinky: Improve documentation
Improve the documentation of the blinky sample, fixing typos, adding
links to the relevant DT documentation and cleaning up a bit.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-04 21:50:43 +02:00
Maureen Helm
d3957fb1f9 doc: release notes: Add 2.2 changes for all remaining drivers
Adds 2.2 release notes for all remaining driver classes. Moves RISC-V
driver changes from the architectures section to the drivers section.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-03-04 20:29:24 +02:00
Johann Fischer
e0318ff3ee doc: release notes: refine USB relese notes
Refine USB relese notes.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-03-04 09:36:46 +02:00
Johan Hedberg
de3c5ae9ff doc: release notes: Add information for Xtensa SoCs and boards
Mention the Intel Apollolake Audio DSP SoC and board that were added
for Zephyr 2.2.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-03 19:05:43 +02:00
Emil Obalski
a95298e54a doc: release notes: Add 2.2 release notes for USB subsystem
Added usb related notes for Zephyr 2.2

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-03-03 18:40:28 +02:00
Krzysztof Chruscinski
0cc209d5b2 doc: release notes: Add 2.2 release notes for logging subsystem
Added entry regarding changes in the logger.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-03-03 14:01:56 +02:00
Krzysztof Chruscinski
ea331fd03f doc: release notes: Add 2.2 release notes for nrf_uarte serial driver
Added entry regarding UARTE driver implementation changes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-03-03 14:01:56 +02:00
Krzysztof Chruscinski
e81a3ee8c2 doc: release notes: Add 2.2 release notes for clock control
Added entry regarding clock_control driver implementation changes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-03-03 14:01:56 +02:00
Jan Van Winkel
e5ddc31f74 doc: release notes: Add display related release notes
Added display related release notes for Zephyr 2.2

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2020-03-03 09:31:14 +02:00
Martí Bolívar
f2469ce576 doc: board_porting: add link to west flash/debug info
Makes this page a little more visible to porters.

Suggested-by: Lucian Copeland <hierophect@gmail.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-03 09:30:32 +02:00
Carles Cufi
8a5063924c doc: relnotes: Add Bluetooth Controller 2.2 release notes
Fill the Bluetooth Controller section in the 2.2 release notes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-02 22:50:01 +02:00
Tomasz Bursztyka
18dee338d8 doc: release notes: Add 2.2 release notes for DMA
DW and STM32 changes added.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-03-02 21:27:46 +02:00
Carles Cufi
53431884c3 doc: toolchains: Remove warning about GNU Arm 8
Since the latest version available for download works well, there is no
reason anymore to warn the users about a particular, older toolchain
version not working correctly on Windows.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-02 21:27:30 +02:00
Johan Hedberg
50a396720d doc: release process: Update release creation instructions
Fix the GitHub web UI button name, and update the instructions to use
signed tags.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-02 19:36:51 +02:00
Johan Hedberg
8d645b4a8e doc: release notes: Add 2.2 changes for Bluetooth Mesh
Add release notes for Bluetooth Mesh.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-02 19:36:29 +02:00
Johan Hedberg
0280e0a471 doc: release notes: Add 2.2 changes for Bluetooth host
Add release notes for the Bluetooth host.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-02 19:36:29 +02:00
Johan Hedberg
ede8f165af doc: release notes: Add 2.2 changes for Bluetooth drivers
Add release notes for Bluetooth drivers.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-03-02 19:36:29 +02:00
Carles Cufi
b3bb324735 doc: gsg: Update SDK version
Several users have noticed that the SDK version in the GSG is outdated.
Update it to the latest, 0.11.2.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-02 18:52:10 +02:00
Andrzej Puzdrowski
177e075bb5 doc/releases/release-note-2.2: setting sample addition
Add info on introduction of the settings sample.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-03-02 17:41:21 +02:00
Andrzej Puzdrowski
f39f762054 doc/releases/release-note-2.2: flash driver part
Described changes in flash driver implementations.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-03-02 17:41:21 +02:00
Jukka Rissanen
67e43a21c8 doc: release notes: Add information about GSM modem
The Modem chapter was missing mention about generic GSM modem
support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-02-28 16:37:41 +02:00
Martí Bolívar
647fe7a47a doc: dts/macros.rst: "clocks" macro fixes
The "fixed-clock" value referenced in the documentation is actually a
compatible value, not a property name. Fix that.

Harden the "expected to have a clock-frequency property" language to
use "must" instead of "expected". The scripts error out if a node with
fixed-clock compatible is missing a clock-frequency property; it's not
a soft expectation.

Be explicit about clock-frequency units.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-28 12:50:36 +02:00
Alexander Wachter
57bd09186b boards: Remove "supported: -hwinfo" from all boards
Remove all "supported: -hwinfo" definitions from the boards
yaml files and documentation. hwinfo can generally be tested
on every board because it returns -ENOTSUP if not supported.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-02-27 21:14:54 +01:00
Erwan Gouriou
73f7028eb0 doc: Update shields section in V2.2 release note
Document noteworthy changes that will be released in V2.2.0

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-02-27 12:55:39 +02:00
Alberto Escolar Piedras
2836513cd6 doc: release notes: Content for POSIX arch
Nothing significant has happened in the POSIX arch,
so just leave that section with an N/A

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-02-27 12:31:25 +02:00
Andrzej Puzdrowski
208f15e521 doc/reference/runtime_conf/settings: reference missing API group
Added references to missing settings API groups so them
will be generated in documentation build.

Missing API are doxygen subgroup of already referenced doxygen group,
but subgroups aren't automatically extracted to the documentation
output.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-02-27 11:35:19 +02:00
Martí Bolívar
90edd01644 doc: west: 'west installation' is now 'west workspace'
This nomenclature change was done in west 0.7 because it seems to be a
lot easier for people to understand. Propagate it to all the west
documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-25 23:08:02 +02:00
Martí Bolívar
c3ddea01f2 doc: west: update structure page
The main change is that west 0.7 is not a namespace package anymore.
Make some other improvements while here.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-25 23:08:02 +02:00
Martí Bolívar
62c5b3d198 doc: west: add examples for each topology
Add example west.yml files showing how to build west workspaces of
each type. Split these into separate sections as a result since
they're longer.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-25 23:08:02 +02:00
Ioannis Glaropoulos
e489a59b4e doc: release notes: add missing ARM Board in v2.2 release notes
Adding Si Labs EFM32 Jake Gecko board in the v2.2 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-25 14:07:45 +02:00
Ioannis Glaropoulos
747391e705 doc: release notes: list of ARM SoCs added during v2.2 release cycle
This commit adds the list of ARM SoCs whose support was
added during the Zephyr v2.2 release cycle.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-25 14:07:45 +02:00
Ioannis Glaropoulos
0d47d1e4ba doc: release notes: add list of ARM boards
In the 2.2 release notes add the list of ARM boards, whose
support was added during the 2.2 release cycle.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-24 13:46:58 +02:00
Martí Bolívar
8f740f9edf doc: dts/howtos.rst tweaks
A couple of tweaks and a TODO. I think this page could still use some
more love.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-21 12:42:40 -06:00
Martí Bolívar
9fbe872172 doc: dts/macros.rst improvements
Syntax highlight all the DTS fragments, add more internal
cross-referencing to making jumping around the HTML easier, and tweak
the language, filling in a missing piece here and there.

Fix a couple of DTS syntax errors caught by adding highlighting.

Add an ABNF grammar for the macros generated by DT, along with
some comments about why the current grammar is not ideal from a
generality point of view.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-21 12:42:40 -06:00
Martí Bolívar
0bcf84b155 doc: dts/intro.rst improvements
Syntax highlight all the DTS fragments and add some more explanatory
text.

Split the content about important properties into its own section, and
add a similar section about unit addresses.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-21 12:42:40 -06:00
Martí Bolívar
98c1828254 doc: dts/bindings.rst improvements
Add more cross-references, improve section titles, syntax highlight
DTS fragments, and improve some descriptions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-21 12:42:40 -06:00
Stephanos Ioannidis
573db5af60 doc: release: Add ARM Cortex-R release notes
Add ARM Cortex-R architecture release notes

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-02-21 13:58:56 +02:00
Stephanos Ioannidis
451040aabf doc: release: Add ARM GIC release notes
Add ARM Generic Interrupt Controller (GIC) release notes

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-02-21 13:58:56 +02:00
Ioannis Glaropoulos
a9eaa28f4c doc: release: move CC2650 removal to Boards' section
We move the removal of the CC2650 board to the
section about ARM Boards (add, remove).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-21 13:58:56 +02:00
Ioannis Glaropoulos
1209989358 doc: release: v2.2.0 release notes for ARM architecture
Release notes for ARM for v2.2.0 Zephyr release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-21 13:58:56 +02:00
Ioannis Glaropoulos
12497f1eb5 doc: release notes: change kernel to RTOS
Change Zephyr kernel to Zephyr RTOS in Release Notes'
title for v2.2 release, stressing that we deliver an
RTOS instead of a kernel only. Consistent with Zephyr
2.0 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-21 13:58:56 +02:00
Martí Bolívar
93237fcdde doc: dts: pacify checkpatch in macros.rst
This is old text, but checkpatch is complaining since it was
introduced into itso wn file.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-20 12:15:27 +02:00
Martí Bolívar
3a2417443f doc: dts: add design goals defining the scope of DT
Add a page describing the high-level design goals for how Zephyr
should use DT, with examples and counter-examples from current
practice.

Add a TBD section for code generation. It's not clear (to me at least)
where the discussion on that has landed.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-20 12:15:27 +02:00
Martí Bolívar
a20241540b doc: dts: clean up introduction
Combine various bits of information that were formerly scattered about
into a logical order, and fix a few mistakes.

Make some policy changes, e.g. discouraging the use of fixup macros.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-20 12:15:27 +02:00
Martí Bolívar
51b885019e doc: split devicetree docs into multiple pages
The one page on devicetree is too long. Split it into multiple pages
to make it easier to digest and more squintable. This is basically
just moving content around; minimal changes have been made apart from
redoing some transitions and adding a couple of introductory paragraphs.

Rename the 'device-tree' Sphinx :ref: target while we are here.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-20 12:15:27 +02:00
Piotr Mienkowski
62fc80deea doc: Update "Linking Zephyr Within a Partition" section
The method used to link code partition, as defined by
zephyr,code-partition has been modified in Zephyr 1.14. Update the
"Linking Zephyr Within a Partition" section to reflect the change.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-02-19 07:30:43 -06:00
Martí Bolívar
3ddc2da64d doc: remove 'Creating redirect:' build output
This is noisy and getting in the way when I try to read the actual
warnings and errors in the output.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-18 23:09:31 -05:00
Ulf Magnusson
47963cae3f doc: dts: Add lots of documentation for generated macros
Add detailed documentation for macros that get generated by
gen_defines.py. Covers properties, interrupts, phandle-arrays, clocks,
buses, flash partitions, SPI, etc.

Should be relatively complete now, though there might be overlooked
details.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Co-Authored-By: Kumar Gala <kumar.gala@linaro.org>
Co-Authored-By: Marti Bolivar <marti.bolivar@nordicsemi.no>
2020-02-18 15:24:59 -06:00
Jukka Rissanen
24abb19f41 doc: net: Add information about GSM modem support
General information about GSM modem added.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-02-18 18:52:43 +02:00
Nathaniel Graff
eedf4d7043 doc: release notes: RISC-V release notes for 2.2
Adds 2.2 release notes for the RISC-V architecture.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2020-02-18 18:48:34 +02:00
Henrik Brix Andersen
b21ad92a53 doc: release-notes-2.2: add EEPROM release notes for v2.2
Add EEPROM release notes for version 2.2.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-02-18 18:43:29 +02:00
Jukka Rissanen
56a098338f doc: release-note: Move CANBUS to own chapter
CANBUS can be considered a subsystem of its own so moving
it from Networking to own chapter.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-02-13 12:45:14 +02:00
Jukka Rissanen
b23032fed8 doc: net: Add networking changes to 2.2 release note
Initial set of networking changes in 2.2 release.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-02-13 12:45:14 +02:00
Alexander Wachter
8c9553673e doc: release-notes: Added LoRa to the release-notes
Mention new LoRa support in the release-notes.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-02-12 17:40:40 +02:00
Alexander Wachter
a86eeb8d47 doc: release-notes: Release-notes for CAN bus
Added release-notes for the CAN bus subsystem.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-02-12 17:40:40 +02:00
Piotr Mienkowski
041ccb12dd doc: release-notes-2.2: Update GPIO API section
Add release notes introducing changes to GPIO API.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-02-12 13:56:33 +02:00
Martí Bolívar
17144489d9 doc: report west version when it is found
This will help diagnose issues.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-12 11:37:52 +01:00
Kumar Gala
af16c3b3e7 doc: Add reference in toplevel README.rst to install_py_requirements
In the section 'Documentation presentation theme' put a reference to
'install_py_requirements' section in the getting start guide.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-11 17:43:48 +02:00
Anas Nashif
9961b89b17 doc: fixed path for ctf metadata
Point to new location of metadata file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-07 15:58:05 -05:00
Anas Nashif
73008b427c tracing: move headers under include/tracing
Move tracing.h to include/tracing/ to align with subsystem reorg.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-07 15:58:05 -05:00
Anas Nashif
fab2d788ae doc: add a note about required lcov version
Add a note about min. version of lcov required with intermediate text
format support.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-07 15:14:24 -05:00
Martí Bolívar
b4fde33243 doc: west: 0.7.0 documentation
Reflect changes in the APIs made since 0.6.0. These will also need to
be added to the release notes.

Some automatic directives weren't generating the desired output, so
either do it by hand or let new 0.7.0 docstrings supply the information.

Try to better group the content into sections.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-07 07:25:41 -06:00
Martí Bolívar
c20a081423 doc: west: document manifest import feature
West now supports importing other manifest files. Document the basic
behavior.

Add a local table of contents for HTML output, to get a quick index of
the subsections of the "Manifest Imports" section.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-07 07:25:41 -06:00
Martí Bolívar
957476ccae doc: west: add "git." prefix to URL hosts
By request, for clarity.

Suggested-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-07 07:25:41 -06:00
Martí Bolívar
9008578e4f doc: west: add docs for west manifest --validate
This is supported but undocumented.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-07 07:25:41 -06:00
Martí Bolívar
1dafe7aa9c doc: west: move manifest command docs to manifest.rst
This is just a prep work commit for documenting ``west manifest
--merge``.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-07 07:25:41 -06:00
Andrzej Puzdrowski
f85a91837e doc: include settings RT API
Corrected doxygen predefinition for run-time API
inclusion into doxygen build.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-02-07 11:48:13 +01:00
Flavio Ceolin
b5bb4cd085 doc: security: Add hardening tool information
Add basic reference to hardening tool.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-02-06 23:05:38 -05:00
Alberto Escolar Piedras
88f36bb796 doc: getting_started: Add missing native_posix dependencies
For some time now we are building also the C++ samples in
native_posix in CI.
For those who want to run the whole suite locally, they
require g++-multilib, which was missing in the Ubuntu list
=> Add it.

Similarly the display sample is built in CI for
native_posix64, so add the 64bit SDL dev library to both
the Ubuntu and Fedora lists.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2020-02-06 08:52:17 -05:00
Alexander Wachter
10ed5d55d0 doc: networking: Add ISO-TP documentation
This commit adds the documentation for the ISO-TP library

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2020-02-06 10:16:29 +02:00
Wentong Wu
10a669ea87 tracing: ctf: adapt ctf implementation to tracing infrastructure
Adapt ctf implementation to tracing infrastructure.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-02-05 23:54:26 -05:00
Jacob Siverskog
6c218ac2c6 doc/reference/runtime_conf: improve example snippets
Improve settings example snippets by ordering things so that they
actually compile.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2020-02-05 20:32:52 -05:00
Andrei Gansari
820f2bf467 doc: device tree - document pre_dt_board.cmake
Document pre_dt_board.cmake file usage.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-02-05 13:04:44 -06:00
Krzysztof Chruscinski
8df133e547 doc: release-notes-2.2: mention clock_control callback prototype change
Mentioned that callback has one additional parameter (subsys).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-02-05 17:07:01 +01:00
Peter Bigot
e999f7c6fb doc: release-notes-2.2: update for GPIO deprecations
Add a section describing what's been deprecated and how to replace it.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Anas Nashif
e0e31eb296 doc: fix links to www.zephyrproject.org
Lots of broken links after the website update. Fix them or point to
alternatives.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-03 17:22:18 -05:00
Anas Nashif
01b3159b31 doc: update gsg with sdk v0.11.1
We are now using 0.11.1, so update the getting started guide.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-03 14:57:10 -06:00
Martin Rieva
2685a94c02 Bluetooth: Host: Add generic pairing query callback
Similar to pairing_confirm this callback is called each
time a peer requests pairing, but for all types of
pairings, except SSP. The pairing req/rsp information is
passed as a parameter so the application can decide
wheter to accept or reject the pairing.

Fixes: #21036

Signed-off-by: Martin Rieva <mrrv@demant.com>
2020-01-31 20:39:25 +02:00
Robert Lubos
bea1093e62 net: sockets: Remove socket offloading interface
Instead of using a custom offloading interface, users can use
`NET_SOCKET_REGISTER` macro to register custom socket API provider. This
solution removes a limitation, that only one offloaded interface can be
registered and that it cannot be used together with native IP stack.

The only exception remainig are DNS releated operations -
`getaddrinfo`/`freeaddrinfo`, which, when offloaded, have to be
registered specifically.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-31 11:36:02 -05:00
Andrzej Puzdrowski
42c09c99e9 samples/subsys/settings: add the readme doc
Added readme file for the sample

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-01-31 07:45:52 -05:00
Andrzej Puzdrowski
063ee74d4f doc/subsys/settings: improve settings API doc
Corrected improper return value description of
settings_runtime_get().

Added return value description to each of settings handler
description.

Include run-time API into doxygen build.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-01-31 07:45:52 -05:00
Ulf Magnusson
6648fe428a doc: devicetree: Update outdated diagram and mention zephyr.dts
zephyr_dt_inputs_outputs.svg still shows the output from dtc being used,
but dtc is unused (except for finding warnings/errors) after the old
devicetree scripts were removed in commit c8c35f76ab ("scripts: dts:
Remove deprecated extract_dts_includes.py script").

Update zephyr_dt_inputs_outputs.svg to show how things are done now.
Also include the new zephyr.dts debugging aid in it. Tweak the
formatting a bit too.

Add zephyr.dts to the diagram in the build overview section too, and
mention zephyr.dts in the text of the devicetree and build overview
pages.

Remove zephyr_dt_inputs_outputs.png and use zephyr_dt_inputs_outputs.svg
directly. Many other places the documentation include SVGs directly, and
there haven't been any complaints, so it probably works fine. The .png
and .svg versions had also drifted out of sync.

Piggyback a link from the devicetree page to the build overview page, to
make it easier to discover.

(I used draw.io to update the diagrams.)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-30 04:27:39 -06:00
Andrzej Puzdrowski
d852159c27 doc/release: nrf flash driver change record
Added record for describing change of write-block-size
to 32-bits introduced by #19720.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-01-29 14:43:05 +01:00
Peter A. Bigot
1964bf08bb lib: os: onoff: add API for on-off service request and release management
There are various situations where it's necessary to support turning
devices on or off at runtime, includin power rails, clocks, other
peripherals, and binary device power management.  The complexity of
properly managing multiple consumers of a device in a multithreaded
system suggests that a shared implementation is desirable.  This
commit provides an API that supports managing on-off resources.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-01-29 14:08:46 +01:00
Ulf Magnusson
178d3208da doc: genrest.py: Convert to use f-strings
Use f-strings instead of .format() to make the code easier to read,
especially for long multiline strings.

f-strings were added in Python 3.6, which Zephyr requires now.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-28 17:26:11 -05:00
Henrik Brix Andersen
57e3851b30 doc: release-notes-2.2: mention deprecation of counter_read()
Mention that counter_read() is deprecated in favor of
counter_get_value().

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-28 12:52:46 -05:00
Peter Bigot
4fcf80d64f doc: reference: add discussion of terms that define API behavior
Define a minimal set of attributes that can be used to indicate the
allowed context for invoking specific Zephyr API and kernel functions,
and the effect of invoking them on thread and other behavior.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-27 16:05:07 +01:00
Peter Bigot
6b1fd13949 doc: generate documentation for asynchronous SPI API
Add the flag so the related functions are documented and can be
referenced from documentation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-27 16:05:07 +01:00
Peter Bigot
76995b61ac doc: scheduler: define reschedule point
This term needs to be defined to support documenting the effect of
various API calls on scheduler selection of the running thread.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-27 16:05:07 +01:00
Ulf Magnusson
31822c6d5b doc: kconfig: Explain why zephyr/.config assigns promptless symbols
I think a lot of the confusion with promptless symbols being assigned
might come from opening zephyr/.config, seeing that it assigns a bunch
of promptless symbols, and assuming that Kconfig must respect those
assignments, even though it doesn't.

Explain why zephyr/.config assigns promptless symbols (it's because it
doubles as configuration output). That should clarify things a bit.

Also mention what "invisible" means for symbols early on in the page.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-23 12:32:42 +01:00
Sebastian Bøe
56f6e35e47 cmake: Support passing syscall include directories through CMake
Introduce the CMake variable SYSCALL_INCLUDE_DIRS to support
out-of-tree syscall declarations.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2020-01-22 09:26:12 -05:00
Ulf Magnusson
dbed9027ba doc: build overview: Improve diagram, fix errors/stale info, misc.
Diagram and text improvements:

 - Redraw the configuration phase diagram to better reflect the actual
   logic. Remove some misleading arrows, like from devicetree.h to
   Kconfig. Kconfig uses the devicetree scripts directly.

 - After the old devicetree scripts were removed in commit c8c35f76ab
   ("scripts: dts: Remove deprecated extract_dts_includes.py script"),
   the dtc compiler is only run to catch any high-level warnings and
   errors from it. The output is unused.

   Update the diagram and descriptions to explain how dtc is used.

 - Mention kconfigfunctions.py and explain better how devicetree and
   Kconfig interact

 - Clarify that 'cpp' is the C preprocessor. People often confuse it
   with C++.

 - Fix a typo'd devicetree_fixups.h in the text

 - Use the :file: role for files instead of italic text

 - Add links to the devicetree and Kconfig sections of the manual, and
   use the :zephyr_file: role to turn more files into direct links

 - Make the text generic re. Make vs. Ninja

 - Lots of other minor tweaks and clarifications

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-21 22:36:35 -05:00
Andrzej Puzdrowski
cbea659ca7 doc/releases: NFFS removal record
Add removal record to the incoming release note.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-01-21 15:32:47 +01:00
Andrzej Puzdrowski
68f51f66c6 doc: cleanup after NFFS removal
Patch introduce references to LittleFS instead of NFFS where it
was suitable. In other places NFFS mentions were removed

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-01-21 15:32:47 +01:00
Henrik Brix Andersen
14363db47f doc: release-notes-2.2: mention CANopen protocol support
Mention CANopen protocol support as an enhancements for v2.2.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-20 22:48:42 -05:00
Henrik Brix Andersen
cfdabcf448 doc: update doc footer copyright year
Update the documentation footer copyright year.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-20 22:48:23 -05:00
Ulf Magnusson
c08565dad4 doc: Link to Documentation Generation from Documentation Guidelines
Gerson Fernando Budke missed the Documentation Generation page. Nice to
link to it from the Documentation Guidelines page, in case people are
looking for documentation information and find it first.

Maybe the two pages could be put under a common Documentation section
too, though it's nice to have Documentation Generation clearly visible
in the top-level User Guides index.

Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com>
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-20 10:12:19 -05:00
Ulf Magnusson
1810840afe doc: Move Documentation Guidelines right after Documentation Generation
List Documentation Guidelines right after Documentation Generation in
the index for User and Developer Guides. Makes it easier to spot.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-20 10:12:19 -05:00
Robert Lubos
665d195f3a net: sockets: tls: Add missing symbols for a few options
`TLS_PEER_VERIFY` and `TLS_DTLS_ROLE` options accept specific values,
yet no symbols were defined for them. In result, magic numbers were used
in several places, making the code less readable.

Fix this issue, by adding the missing symbols to the `socket.h` header,
and using them in places where related socket options are set.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-20 09:58:23 +02:00
Kumar Gala
b1602c8e39 arm: Removed support for CC2650
The SoC, driver, and board support for the CC2650 and CC2650 Sensortag
aren't currently supported and we are removing them as such.  If anyone
is interesting in supporting this platform we can easily recovery it
from git.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-18 09:27:55 -06:00
Ulf Magnusson
05293ace26 doc: release-notes-2.2: Mention generated_dts_board* renaming
generated_dts_board*.{h,conf} have been renamed to devicetree*.{h,conf}.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-17 17:57:59 +01:00
Ulf Magnusson
4e85006ba4 dts: Rename generated_dts_board*.{h,conf} to devicetree*.{h,conf}
generated_dts_board.h is pretty redundant and confusing as a name. Call
it devicetree.h instead.

dts.h would be another option, but DTS stands for "devicetree source"
and is the source code format, so it's a bit confusing too.

The replacement was done by grepping for 'generated_dts_board' and
'GENERATED_DTS_BOARD'.

Two build diagram and input-output SVG files were updated as well, along
with misc. documentation.

hal_ti, mcuboot, and ci-tools updates are included too, in the west.yml
update.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-17 17:57:59 +01:00
Ulf Magnusson
a8fe2964ee boards: kconfig: Fix enabling USE_SEGGER_RTT for various boards
HAS_SEGGER_RTT is assigned by various Nordic boards, but assignments
have no effect on promptless symbols. This symbol is enabled through
being select'ed by SOC_SERIES_NRF52X.

Holyiot, nRF52833-PCA10100, nRF52840-PCA10056, and nRF52-PCA10040 only
assign HAS_SEGGER_RTT without assigning USE_SEGGER_RTT. They probably
meant to enable USE_SEGGER_RTT, so do that instead.

Also add a help text to HAS_SEGGER_RTT and a warning re. HAS_SEGGER_RTT
vs. USE_SEGGER_RTT to the documentation.

Flagged by https://github.com/zephyrproject-rtos/zephyr/pull/20742.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-17 17:03:40 +01:00
Dominik Ermel
2addfb4696 settings: Deprecate base64 in fs backed settings
Encoding of values with use of base64 has been marked as deprecated and
will be removed in future releases.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-01-16 10:21:29 -05:00
Ulf Magnusson
699b28a089 doc: dts: Remove 'title:' from binding example
'title:' was deprecated in commit 2934ee2cda ("dts: bindings: Remove
'title:' and put all info. into 'description:'"). Overlooked leftover.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-15 14:02:51 +01:00
Ulf Magnusson
d3bdb67cd7 doc: dts: Use definition list for compatible/label/ref
See https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html.
Gives neater output compared to a bullet list.

Also tweak the text a bit.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:53:12 -05:00
Ulf Magnusson
0ddc7b819b doc: dts: Say <BOARD> instead of BOARD
Makes it clearer that it's not meant literally.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:53:12 -05:00
Ulf Magnusson
8d8b06978c dts: Remove generation of <BOARD>.dts_compiled
Unused after the old devicescript were removed in commit c8c35f76ab
("scripts: dts: Remove deprecated extract_dts_includes.py script"). The
old scripts relied on parsing the output of 'dts -Odts', which replaces
e.g. phandle references. The new scripts parse the DTS files directly.

Keep running the dtc compiler just to catch any warnings/errors from it.

The edit to doc/guides/build/build-config-phase.svg is to remove the box
with '*.dts_compiled' in it (and the arrows to/from it). https://draw.io
can be used to edit it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:53:12 -05:00
Ulf Magnusson
9f18df0274 doc: dts: Add more details, implementation notes, and examples
Rewrite most of the 'Input and output files' section to add more details
and implementation notes, and to make some description more more
concrete:

 - Mention dtlib, edtlib, and gen_defines.py, and explain what they do

 - Add an example of how macros get generated from the devicetree, and
   explain the DT_<node>_<property> format of the generated identifiers.

   Merge the 'Include files generation' section into the 'Input and
   output files' section at the same time.

 - Explain that the base devicetree and the overlays just get
   concatenated, and why this works

 - Add more details on how dts_fixup.h files work

 - Mention that the C dtc compiler is only run to catch errors and
   warnings from it

 - Mention that the concatenated devicetree appears in
   zephyr/<BOARD>.dts.pre.tmp

 - Mention /include/, which is the native DTS mechanism for including
   other files

 - Misc. other minor tweaks

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-14 16:53:12 -05:00
Carles Cufi
beedf19ca4 shell: Remove deprecated macros
Remove deprecated macros and add a note to the release notes to this
effect.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-01-09 14:38:49 -05:00
Ulf Magnusson
0ce04d66c4 doc: dts: Linkify Kconfig syms and explain a Kconfig reference gotcha
Turn the CONFIG_* identifiers in the /chosen table into links to the
Kconfig reference.

Also explain why devicetree information doesn't show up in the Kconfig
reference.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-09 15:20:58 +01:00
Ulf Magnusson
5b497cf7ce doc: dts: Explain better how devicetree and Kconfig fit together
It's cryptic that some identifiers for devicetree-related stuff start
with DT_*, while others start with CONFIG_*. Explain what's going on,
and link to the Kconfig preprocessor documentation.

Also remove an early mention of bindings that might be confusing.
Bindings are much more about checking devicetree conformance than about
controlling output, though they do some of that too.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-09 15:20:58 +01:00
Ulf Magnusson
ca0c6a79d6 doc: dts: Add missing documentation for some /chosen properties
Not all /chosen properties were documented. Add the missing ones along
with the macros generated for them.

Found with some grepping for '\<zephyr,.*='.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-09 15:20:58 +01:00
Ulf Magnusson
51e7c55967 doc: dts: Fix outdated list of generated macro names
The *_ON_DEV_NAME macros generated from /chosen properties changed
prefix from DT_* to CONFIG_* in commit 8ce0cf0126 ("kconfig: Convert
device tree chosen properties to new kconfigfunctions"), but the
devicetree documentation still lists the old names. Update the
documentation with the correct anmes.

Also remove an outdated reference to
DT_SRAM_SIZE/DT_SRAM_BASE_REFERENCE, and give a complete list of
generated macros.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-09 15:20:58 +01:00
Ioannis Glaropoulos
c393f3f87a doc: interrupts: add documentation section for zero-latency IRQs
Add a simple documentation section for the Zero-Latency
IRQs feature supported by the kernel.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-01-08 19:57:56 -05:00
Ioannis Glaropoulos
0eb93c201b doc: list dynamic direct interrupts as ARM supported API
Document that the Dynamic Direct interrupts feature is
implemented and supported as an ARM-only API.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-01-08 10:15:09 -08:00
Henrik Brix Andersen
d9d4082325 doc: release notes: Update contents for 2.2
List the added PWM API flags parameter under changes to stable APIs
for the 2.2 release.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-07 18:13:18 +01:00
Peter Bigot
b58e6ae5b6 doc: avoid non-standard value for Kconfig predefines
When building with Kconfig a symbol CONFIG_FOO is either undefined, or
defined to the integer literal 1.  There are styles and use cases
where this is important, e.g. using "#if (CONFIG_FOO - 0)" which would
not work with a macro expanding to the identifier y.  Use the standard
default definition instead of a special non-default one.

Also consistently use space rather than tab indentation within the
multi-line setting, and alphabetize the CONFIG_ predefines.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-06 21:53:46 -05:00
Andrei Emeltchenko
e8da2b80f9 doc: native_posix: Add mention about virtual USB
Add information and link to Virtual USB controller.

Fixes #13232.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-01-06 13:57:36 -05:00
Peter Bigot
74ef395332 kernel: move test of kernel startup state to more visible location
The original implementation left this function hidden in init.h which
prevented it from showing up in documentation.  Move it to kernel.h,
and document it consistent with the other functions that allow caller
customization based on context.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-06 13:55:31 -05:00
David B. Kinder
17299f0734 doc: document python build scripts
We have a collection of python scripts that are part of our build
system.  This PR collects docstring comments added to these scripts into
a summary document.  Previous references to just the script name in
other documentation are updated to point to this build tool
documentation.

Some of the scripts needed an update to be processed (via include
directives) consistently.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-02 17:09:29 -05:00
Erwan Gouriou
9055cfe57e doc/guides: shields: Document shield conditional configuration
Update doc with new Kconfig.shield files.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Erwan Gouriou
7533a65797 doc/guides: shields: Document possibility to enable several shields
It is actually possible to use several shields in the same project.
Reflect it in the shields documentation.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-02 17:02:41 -05:00
Sverre Storvold
649a813bf6 Bluetooth: host: Add calling of read_remote_version
Make remote features and remote version accesible to the application
through the bt_conn_get_remote_info object. The host will auto initiate
the procedures. If the procedures have not finished with the application
calls bt_conn_get_remote_info then EBUSY will be returned.
The procedures should finish during the first 10 connection intervals.

Signed-off-by: Sverre Storvold <Sverre.Storvold@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-12-23 14:47:31 +02:00
Ulf Magnusson
e181e1b773 kconfiglib: Update to hide tracebacks for expected errors
Update Kconfiglib to upstream revision 9c0b562c94 to get this commit in:

    Add Kconfig.__init__() helper flag for suppressing tracebacks

    Tools that don't use standard_kconfig() currently generate spammy
    tracebacks for e.g. syntax errors.

    Add a suppress_traceback flag to Kconfig.__init__() for catching
    "expected" exceptions and printing them to stderr and exiting with
    status 1. Use it to make all tools consistently hide tracebacks.

Use the new flag to hide tracebacks for expected exceptions in
kconfig.py, lint.py, and genrest.py.

Some menuconfig robustness tweaks for wonky terminals are included as
well, and a new feature for customizing .config and autoconf.h header
comments via environment variables.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-20 19:48:09 -05:00
Ulf Magnusson
ea3041dbbe doc: extract_content.py: Detect included files in a more robust way
Allow '.. <figure/include/image/...>:: <path>' to appear anywhere within
a line, and find multiple directives on a single line. This is needed to
find files included e.g. within tables.

Implemented by making the <path> part of the regex more specific and
searching for matches anywhere within the contents of the file. Should
be a bit faster too.

Maybe there's some tiny potential for false positives, but this
generates the same file list as the old version for the current docs at
least.

Fixes: #21466

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-20 13:02:00 -05:00
Carlo Caione
aec9a8c4be arch: arm: Move ARM code to AArch32 sub-directory
Before introducing the code for ARM64 (AArch64) we need to relocate the
current ARM code to a new AArch32 sub-directory. For now we can assume
that no code is shared between ARM and ARM64.

There are no functional changes. The code is moved to the new location
and the file paths are fixed to reflect this change.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-12-20 11:40:59 -05:00
David B. Kinder
efffdfc4d0 doc: tweak search to to understate certain docs
All docs are treated equally in the search results. The built-in search
system knows to emphasize hits in titles and object names, but could use
some help understating hits in non-definitive docs.  In particular, hits
to docs in the  /boards, /samples, and /reference/kconfig docs are often
not as important as hits in other docs, so let's push them later in the
search result output.

We can tweak the search results scoring (and thereby the order of
display) via the ``html_search_scorer`` setting in ``conf.py`` along
with a piece of JavaScript to adjust the result score.

Fixes: #16935

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-12-19 15:52:11 -05:00
Emil Obalski
7fc0486ca0 doc: release notes: Update contents for 2.2.0
Update to API change in regards of USB changes.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-12-19 13:08:55 +01:00
Ulf Magnusson
379145ffce scripts: edtlib: Rename 'child-bus:'/'parent-bus:' to 'bus:'/'on-bus:'
I keep mixing these up, so that's probably a sign that the names are
bad. The root of the problem is that "parent-bus" can be read as both
"this is the parent bus" and as "the parent bus is this".

Use 'bus:' for the bus "provider" and 'on-bus:' for nodes on the bus
instead, which is less confusing.

Support the old keys for backwards compatibility, along with a
deprecation warning.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-19 11:02:28 +01:00
Martí Bolívar
bc444ec6e1 doc: releases: add python 3.6 requirement to notes
Add a release notes line item about the move to Python 3.6.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2019-12-18 20:26:39 -05:00
Ulf Magnusson
e9cf3e9963 doc: kconfig: Mention guiconfig on tips page
Mention guiconfig as well wherever menuconfig is mentioned.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-18 11:53:36 +01:00
Ulf Magnusson
28487d088f doc: kconfig: Cover a common gotcha related to "stuck" symbol values
Explain a common subtle Kconfig gotcha where it might appear that
symbols with prompts are incorrectly "stuck" to a particular value in
the menuconfig interface. I've seen it come up several times now, e.g.
in the discussion that lead to
https://github.com/zephyrproject-rtos/zephyr/pull/20702. I also suspect
it's what's causing
https://github.com/zephyrproject-rtos/zephyr/issues/20673.

Also give suggestions for how to make things behave as intended.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-18 11:53:36 +01:00
Martí Bolívar
93b740c464 doc: update GSG and Linux guides for move to Python 3.6
Add information about the minimum Python version to the advanced Linux
documentation.

Drop 16.04 from the GSG since its system Python 3 is no longer covered
by these instructions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2019-12-18 10:15:45 +01:00
Andrei Stoica
cc19e72497 docs: Bluetooth: HCI_VS: Updated docs on VS HCI commands
This commit complements documentation of Zephyr HCI VS
commands. In particular, it documents the newly introduced
commands

- BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL
- BT_HCI_OP_VS_READ_TX_POWER_LEVEL

These provide HCI-level control over the Tx power of the
BLE radio on a per role/connection basis.

The functionality is enabled upon the Kconfig advanced configuration
triggered by

- BT_CTLR_TX_PWR_DYNAMIC_CONTROL

depending on the enablement of Zephyr HCI vendor-specific command
extensions.

Signed-off-by: Andrei Stoica <stoica.razvan.andrei@gmail.com>
2019-12-17 12:29:57 +01:00
Anas Nashif
c7ef4f0506 doc: modules: document out-of-tree samples/tests
Document how to configure out-of-tree tests/samples and boards in the
module.yml file to be used by sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-16 18:56:28 +01:00
Josh Gao
88ac292f77 doc: s/devicetree/device tree/
Commit 27e5dd13 fixed a bunch of uses of "device tree" in the
documentation, but accidentally hit the part of the documentation
that stated that "devicetree" should be preferred over "device tree".

Signed-off-by: Josh Gao <josh@jmgao.dev>
2019-12-13 18:47:23 +01:00
David Leach
1932d511db doc: update release tagging procedures
Clean up and update release tagging procedures. Use new
document tabs to separate instructions for release
candidate and final releases.

Signed-off-by: David Leach <david.leach@nxp.com>
2019-12-13 08:12:03 -06:00
Piotr Zierhoffer
abc8cbfec6 doc: Trivial fix of GSG formatting
The numbered list for installing toolchains on macOS and Windows is not
formatted correctly.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2019-12-12 19:56:38 +01:00
Carles Cufi
788d6eb29f doc: API: Document the modification of stable APIs
In order to make technical progress possible, some stable APIs
may sometimes need to be modified in a non backwards-compatible way.
Describe the process for integrating such changes in the documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-12-12 11:01:38 -06:00
Carles Cufi
e4ad515530 doc: relnotes: Add sections for Stable API Changes
Add the relevant sections for Stable API Changes so that the release
notes can be populated during development.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-12-12 11:01:38 -06:00
Ulf Magnusson
5c28f39e7f doc: genrest: Use a separate index page for all symbols
Add an option --separate-all-index that makes genrest.py generate a
separate index-all.rst index page that lists all symbols, instead of
listing all symbols in index.rst. index-all.rst is linked from
index.rst.

This was originally motivated by an external project where index.rst
becomes the top-level page, which runs into a Sphinx bottleneck with
sphinx_rtd_theme. See https://github.com/sphinx-doc/sphinx/issues/6909.

This turned out pretty nice after some feedback from Ruth Fuchss, so use
it for Zephyr too.

Also unclutter the generated documentation a bit by removing some
headings. This makes the navigation menu on the left nicer too.

Piggyback making genrest.py executable, which is handy when running it
manually.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 12:32:30 -06:00
Ulf Magnusson
984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
David B. Kinder
a4b134e0db doc: fix indent issues in release process doc
Some incorrect indenting in the doc was causing numbered lists to reset
back to 1 instead of continuing the series.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-12-10 21:44:09 -05:00
David B. Kinder
f72a50b96d doc: remove extra space after nested list
Remove extra spacing after a nested list.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-12-10 21:43:54 -05:00
Martí Bolívar
0186eade51 scripts: add new west build "build.cmake-args" config option
This option, if set, will add arguments to CMake whenever a new build
system is being generated.

It doesn't affect other invocations of CMake, such as when cmake(1) is
run in build tool mode to actually compile the application.

See the documentation changes for details.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2019-12-10 16:19:18 +01:00
David Leach
051435c69d doc: releases: Release notes for v2.2 - initial (empty) draft
Getting things prepared for the Zephyr 2.2 release cycle

Signed-off-by: David Leach <david.leach@nxp.com>
2019-12-09 19:52:20 -06:00
Anas Nashif
21847528a9 tests: document test identifier rules
Document test identifier rules.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-09 15:53:44 -05:00
Flavio Ceolin
e86ec977fb syscalls: Remove references to __syscall_inline
There is no code to handle __syscall_inline so it is better removing
it from doxygen and checkpatch.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-12-09 12:47:15 -05:00
Ulf Magnusson
05281b5b0d doc: kconfig: Add Kconfig intro to index page
Put a short Kconfig overview on the index page that links to the other
Kconfig documentation.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 17:33:36 +01:00
Ulf Magnusson
e32686d0d6 doc: kconfig: Put all documentation on setting symbols on a new page
Add a new 'Setting Kconfig configuration values' page in the new Kconfig
section in 'User and Developer Guides'. Move all the information on
setting Kconfig symbols from 'Application Development' and the board
porting guide into it. The same page now covers both configuration files
and Kconfig.defconfig files.

Add links to the new page in various places to make it easy to find.
Also add some more references to the top-level Kconfig page and other
Kconfig pages.

A lot of stuff was rewritten while moving it over (the CONF_FILE
documentation has been cleaned up in particular). Some new information
has been added as well, like a tip re. minimal configurations being
helpful when making Kconfig settings permanent, and a warning re.
dependencies being ORed rather than ANDed when defining a symbol in
multiple locations.

Fixes: #20915

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 17:33:36 +01:00
Ulf Magnusson
acc829c3ee doc: application: Remove accidental backslashes in Kconfig sample
The SOC Definitions section had backslashes before * in globbing
'source's.

Also change the language for the code block from 'console' to 'none'.
Kconfig isn't shell.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 17:33:36 +01:00
Ulf Magnusson
4461bc7c54 doc: kconfig: Move menuconfig/guiconfig docs to user guide
Move the documentation for the menuconfig and guiconfig interfaces from
Application Development to a new Interactive Kconfig Interfaces page in
User and Developer Guides.

Also tweak Application Development to mention the configuration
interfaces earlier. It's good to encourage people to try things out in
menuconfig, because dependencies often get lost when people seldom run
it and just hand-edit files.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 17:33:36 +01:00
Ulf Magnusson
5c7f2a3667 doc: kconfig: Move extension docs from porting guide to user guide
The Kconfiglib Kconfig extensions are documented in the porting guide,
which is a pretty weird place to document them. Document them under a
new page in the Kconfig section of User and Developer Guides instead.

Also remove the section about the old Zephyr Kconfig behavior for
defaults (tried last-to-first instead of first-to-last). The behavior
was changed 16 months ago (and was undocumented before that), so it
might not be that useful to mention anymore.

Piggyback misc. small language cleanups and organization nits.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 17:33:36 +01:00
Ulf Magnusson
4255bf948c doc: kconfig: Touch up preprocessor docs and put it on a separate page
Touch up the Kconfig preprocessor function documentation a bit and add
some more details to the example. Use the Kconfig preprocessor call
syntax instead of Python syntax in the function synopses.

Also move the preprocessor docs to a separate page, and add a top-level
Kconfig section to User and Developer Guides that links to the Kconfig
tips page and the preprocessor page.

Trying to avoid the Kconfig tips page becoming a dumping ground for
random Kconfig documentation.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 17:33:36 +01:00
David Leach
b413223a66 doc: release notes: Update contents for 2.1.0
Add updated issue list and filled in some details from PRs.

Signed-off-by: David Leach <david.leach@nxp.com>
2019-12-08 20:56:58 -06:00
Ulf Magnusson
f570f19bef doc: genrest: Use , instead of : as the separator in --modules
Using ':' as the separator in --modules breaks module specifications
like

    nrfxlib:nrfxlib:C:/Users/Carles/src/ncs/nrfxlib

The ':' in 'C:' gets seen as a separator.

Use ',' instead, which is unlikely to appear in paths (at least in
--modules). Treat a doubled ',,' as a literal ','.

Another option would be ';', but it clashes with how CMake represents
lists, which is awkward.

Also make quoting of arguments with spaces more robust by passing
VERBATIM to add_custom_target().

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-05 16:23:10 +01:00
David B. Kinder
416a174ac2 doc: fix misspellings in docs
Fix misspellings in docs (and Kconfig and headers processed into docs)
missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-12-04 14:12:53 -06:00
Jukka Rissanen
38db500fe5 doc: net: Enhance 802.1Qav documentation
There was no examples how to set the Qav parameters from application.

Fixes #21074

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-03 14:07:32 -06:00
Jukka Rissanen
26db79375f doc: release: Remove net sample testing feature
The network sample automatic testing feature in PR #19677 is moved
to 2.2 so removing it from 2.1 release note.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-03 14:06:29 -06:00
David B. Kinder
685932237d doc: add doc changes to 2.1 release notes
Add summary of documentation work for 2.1 release.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-12-03 13:15:52 -06:00
Ulf Magnusson
58e2057aaf genrest: Show symbol help texts on index page
Instead of showing the prompt for symbols on the index page, show their
help texts. This makes searching easier.

Fall back on the prompt if no help text is available.

Also change the code to only show one of the prompts if several are
available (happens if a symbol is defined in multiple locations and adds
a prompt in more than one of them). It's probably overkill to show them
all, and it doesn't come up that often.

Suggested by David B. Kinder.

Co-authored-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-03 17:02:22 +01:00
Ulf Magnusson
91c8ffa55c kconfig: doc: Split up symbol reference by path
Use --modules to split the Kconfig reference up by where symbols are
defined. See the argparse docstring for --modules in
doc/scripts/genrest.py.

Not sure what the best way to split things up is, so feedback would be
appreciated. I just pulled out some top-level directories. It could
always be tweaked later.

If a symbol is defined in more than one module (by being defined in
multiple locations), it appears on multiple index pages.

To build the documentation, do

    $ mkdir doc/b && cd doc/b
    $ cmake -GNinja ..
    $ ninja htmldocs
    (output in html/reference/kconfig/index.html)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-03 17:02:22 +01:00
Ulf Magnusson
5492f2f8b6 genrest: List all symbols on main index page and refactor
Instead of having index.rst just link to other index pages in --modules
mode, list all symbols on it, and have links to the module index pages
at the top.

Get rid of index-all.rst and index-main.rst (and all related options).
index-all.rst is no longer needed, and index-main.rst (symbols outside
--modules) might not be that useful to people reading the documentation
(and could be added back if needed).

Also refactor and streamline the code a bunch. For the main index page,
the only difference between modules and non-modules mode is now whether
there's links to other index pages at the top.

Suggested by David B. Kinder.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-03 17:02:22 +01:00
Maureen Helm
9d5d252894 doc: releases: Document major driver changes in 2.1 release note
Documents major driver changes (additions, removals, fixes, etc.) across
all driver families since the 2.0.0 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-12-02 20:00:47 -06:00
Erwan Gouriou
bbcb352a92 doc/guides: Add clarifications to board porting guidelines
Additions:
- Provide clear description of a typical board port on zephyr
- Add a clear statement that peripherals should be disabled by
default (unless clearly specified)
- Add clear mentions on peripheral that should actually be enabled

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-12-02 20:01:29 -05:00
Ioannis Glaropoulos
32f0c165b5 doc: release: add note for new SoC series support in v2.1.0 release
Add a note about supporting new SoC Series in v2.1.0 release.
Style rework in the section for SoC support.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-27 15:56:38 -05:00
Trond Einar Snekvik
deeb4f320d Bluetooth: Mesh: Restructure doc
Adds a deeper hierarchy to the Bluetooth Mesh documentation by moving
the modules in separate pages with a brief description of the concepts
in each module.

Adds the full list of specification defined Health model faults.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-11-27 13:32:45 -05:00
David B. Kinder
f0b97ec568 doc: fix redirect for getting started guide
Redirect link in conf.py was misspelled

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-26 11:39:52 +01:00
Alexander Wachter
7e5acf5f2c doc: Add CAN related changes
Add notes about CAN related changes for this release.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2019-11-25 17:37:30 +01:00
David B. Kinder
0a0c34fe77 doc: add recent documentation writing features
We've added some new capabilities for documentation writers such as the
tabbed interface and numbered instruction steps, as used in the updated
Getting Started Guide.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-24 13:32:49 +01:00
Stephanos Ioannidis
7aa2355af2 arch: arm: Add Cortex-R release notes for Zephyr v2.1.
Adding Cortex-R release notes for the Zephyr v2.1.0 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-11-22 16:09:49 -05:00
Ioannis Glaropoulos
c1d53b62fd arch: arm: release notes section for Zephyr v2.1 (Cortex-M)
Adding a release notes section for the ARM Cortex-M
architecture, to be part of the Zephyr v2.1.0 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-22 16:09:49 -05:00
Erwan Gouriou
0272b9dc5f boards: shields: Release notes section for Zephyr v2.1
Add shields sections update for v2.1 release notes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-22 16:08:57 -05:00
Erwan Gouriou
d0f92d3f5b soc: arm: release not section for Zephyr 2.1 (stm32)
Update v2.1 release notes section with STM32 SoCs status.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-22 16:08:57 -05:00
David B. Kinder
3d6c4b18b6 doc: tweak CSS for responsive table display
Noticed that <p> within a responsive table (as found in the kconfig docs
generated by the new genrest.py script in PR #20322) weren't displaying
using the same font size as table cells without <p> content. This
situation occurs when the help text in the Kconfig file is more than one
paragraph.

Also added a comment explaining why a previous CSS tweak was added.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-22 15:44:05 +01:00
Ioannis Glaropoulos
03ae58490c boards: arm: add new boards into v2.1 release notes
Add a section in the v2.1 release notes listing
the newly added ARM boards.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-22 07:43:51 -05:00
Alberto Escolar Piedras
c9cadaeade doc: Add native_posix information to 2.1 release note
Contains major POSIX arch and native_posix changes between
2.0 and 2.1 releases

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-11-22 07:42:42 -05:00
Henrik Brix Andersen
71adcf9ff4 doc: release notes: mention EEPROM API and drivers in release notes
Mention the new EEPROM device driver API and drivers in the release
notes for v2.1.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-11-22 10:55:38 +01:00
Laurent Meunier
c9e96b3c19 doc: Remind users about environment variables in getting started
In getting started, in case of macOS and Windows, the need to set
zephyr specific environment variables is only specified several links
away from the getting started, which can be easily missed for someone
who already has the toolchain installed. So just remind the user.

Signed-off-by: Laurent Meunier <laurent.meunier@st.com>
2019-11-21 10:56:13 +01:00
Peter Bigot
40ac3c4663 docs: kernel: standardize thread state capitalization
All states in the thread state diagram were initial-cap except
"suspended".  Make it Suspended for consistency.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-21 09:00:26 +01:00
Anas Nashif
12d8cce8b7 sanitycheck: fix documentation of --discard-report
The discard report is now generated for every run as
sanity-out/sanitycheck_discard.csv, the option --discard-report was
dropped.

Fixes #20804

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-20 14:01:34 -05:00
Andrzej Puzdrowski
38510cec22 doc/reference/runtime_conf: fix example snippets
Removed some cut/paste from mynewt with references to os_callout,
os_event in example snippets.

code examples were also aligned to current settings handle API.

fixes #20743

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-11-19 10:21:37 +01:00
Flavio Ceolin
05cb5b3ef0 docs: guide: Add build system information
A detailed overview of Zephyr's build system. This is a
thorough view of the low level build process starting from CMake and
using Make as the build system tool. Things missing here that will be
further documented:

- west
- external modules/libraries

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-11-15 14:58:51 -05:00
Andy Ross
52d6e5983f doc/kernel/smp: Add initialization diagram
Add a simple block diagram detailing the SMP initialization flow.  Not
pretty, but hopefully reasonable.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-11-14 19:13:27 -05:00
Anas Nashif
8b089d2699 doc: kernel: use kconfig documentation in main kernel doc
Documentation about scheduling options was burried in the Kconfig help.
It has better visibility as part of the scheduling section of the main
kernel reference pages.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-14 09:15:38 -05:00
Andrew Boie
cb87cc8fd6 doc: add two diagrams to user mode documentation
One shows how globals are routed for automatic memory
domains. The other illustrates control flow when making
system calls.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-13 15:55:44 -08:00
David B. Kinder
331214704c doc: New developer getting started guide
As presented to the TSC, Zephyr's out-of-box experience for new
developers is, well, complicated.  A number of suggestions were
presented including simplifying the getting started material to present
a straight-forward path through the setup and installation steps through
to getting a sample application built, flashed, and running.

This PR is a work-in-progress towards addressing this OOB experience
with a minimal-distractions version of the GSG. Alternatives, warnings,
and material that could lead the developer astray were moved to
alternative/advanced instruction documents (based on the previous
separate Linux/macOS/Windows setup guides) and a new "Beyond the GSG"
document.

We do take advantage of a sphinx-tabs extension for synchronized tabs to
present OS-specific instructions: clicking on one tab will display all
same-named tabs throughout the doc.

We hope (and will continue evaluating) that this new GSG gets developers
set up quickly and then we can send them along to other documents to
continue learning about Zephyr and trying other sample apps.

Thanks for all your previous feedback that I've worked
into this new version.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-13 14:05:47 -06:00
Flavio Ceolin
d1acc1e3a2 doc: getting_started: Fix clang toolchain use
In order to use clang it is necessary to set the variable
ZEPHYR_TOOLCHAIN_VARIANT to llvm instead of clang.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-11-12 15:40:44 -05:00
Andrei Emeltchenko
19e434d777 doc: usb: Update USB documentation
Update documentation, removing outdated usb_set_config()
initialization method.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-11-12 15:44:55 +01:00
Maureen Helm
6fb97258aa doc: Add missing html redirect entries for mimxrt10{20,60,64}_evk boards
The mimxrt10{20,60,64}_evk board docs were renamed from <board>.rst to
index.rst in commit 0e4ff809d7 but were
missing entries in the html redirect list. Add them.

An entry for mimxrt1015_evk is not added because this board always had
an index.rst board doc.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-11-12 15:08:36 +01:00
Henrik Brix Andersen
0ea5503ce3 doc: reference: peripherals: add EEPROM API documentation
Add documentation for the EEPROM API to the peripheral reference
section.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-11-09 08:59:28 -05:00
Andrew Boie
8d40d8788c doc: update DOXY_SOURCES
Need to add the kernel_arch_interface.h header here
to match zephyr.doxyfile.in.

This is the header which contains the formal kernel-to-
architecture interface and we want docs generated for it.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-11-08 11:49:16 +01:00
Andy Ross
8892406c1d kernel/sys_clock.h: Deprecate and convert uses of old conversions
Mark the old time conversion APIs deprecated, leave compatibility
macros in place, and replace all usage with the new API.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-11-08 11:08:58 +01:00
Andrew Boie
553f30c7a6 doc: add auto-generated architecture interface
This is primarily of interest to people doing architecture ports.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-11-07 15:21:46 -08:00
Andrew Boie
7d5d72ccba doc: add more Kconfig defines
This will expose more arch interface APIs to the doc scanner.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-11-07 15:21:46 -08:00
Andrew Boie
8f5e58f064 doc: add kernel_arch_interface.h to doc generation
Otherwise, we will not pick up all the arch interfaces.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-11-07 15:21:46 -08:00
Andrew Boie
4f77c2ad53 kernel: rename z_arch_ to arch_
Promote the private z_arch_* namespace, which specifies
the interface between the core kernel and the
architecture code, to a new top-level namespace named
arch_*.

This allows our documentation generation to create
online documentation for this set of interfaces,
and this set of interfaces is worth treating in a
more formal way anyway.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-11-07 15:21:46 -08:00
Peter Bigot
8e55968aba doc: correct path to boards/riscv
The board area was renamed from riscv32 to riscv back in July to
accommodate riscv64 support.  Fix the remaining references in
documentation.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-07 12:39:08 -06:00
Trond Einar Snekvik
0151d6dc33 Bluetooth: Mesh: Model extension concept
Adds the model extension concept to the access layer, as described in
the Mesh Profile Specification, Section 2.3.6. Extensions are
implemented as a tree, using two pointers in each model:

The extends pointer points to the first extended model, and the next
pointer points to the next sibling or (if the NEXT_IS_PARENT flag is
set) the parent model in the tree, forming a cyclical "Left-child
right-sibling" (LCRS) tree. The tree root can be obtained by calling
bt_mesh_model_root_get(), and the extended models can be walked by
calling bt_mesh_model_tree_walk().

According to the Mesh Profile Specification Section 4.2.3, all models in
the same extension tree share one subscription list per element. This is
implemented by walking the model's extension tree, and pooling the
subscription lists of all models in the same element into one. If the
config server adds a subscription to a model, it may be stored in any of
the model tree's models' subscription lists. No two models in the same
extension tree and element will have duplicate groups listed. This
allows us to increase extended models' capacity for subscriptions
significantly.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-11-07 18:57:32 +02:00
Kumar Gala
324f5749dc doc: dt: Add note about deprecation of generated_dts_board.conf
Note that generated_dts_board.conf is now deprecated and that users
should utilize functions to access DT related information that was
coming from generated_dts_board.conf.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-07 08:47:35 -06:00
Ulf Magnusson
a328c5190d kconfig: Add linting script
Add a cleaned-up version of a script I used to find a bunch of unused
symbols and some other Kconfig issues. It's set up to be run directly,
with few environment dependencies.

West is required, because the checks need to see Kconfig files and
source code from all modules.

Checks so far:

 - Symbols that can never be anything but n/empty

 - Symbols that look unused

 - menuconfig symbols with empty menus

 - Symbols only defined in Kconfig.defconfig files

See the help strings for the command-line flags for more information.

Some of these checks could probably be checked in CI later, though the
always-n and unused-symbol checks are a bit heuristic and might need a
lot of whitelisting.

Another reason I want to get this in is to have a clean standalone
reference for how to set up the environment for parsing the Kconfig
files. It's gotten trickier over time.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-07 15:32:50 +01:00
Andrew Boie
800b35f598 kernel: use uintptr_t for syscall arguments
We need to pass system call args using a register-width
data type and not hard-code this to u32_t.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-11-06 09:04:16 -08:00
David Leach
afdc63f320 subsys/random: Add cryptographically secure and bulk fill functions
1) Add cryptographically secure random functions to provide
FIPS 140-2 compliant random functions.

2) Add name to random function choice selectors to ease
selection in SOC .defconfig files

3) Add bulk fill random functions.

Signed-off-by: David Leach <david.leach@nxp.com>
2019-11-05 19:36:42 +01:00
Torsten Rasmussen
1f9723af19 cmake: app mem partion flexibility
This commit allows a more dynamic approach for specifying that a zephyr
library must be placed in a dedicated app memomory partition.
This is still done by defining the partition in code using
K_APPMEM_PARTITION_DEFINE, but now the zephyr library can be added to
the generation of partition table using zephyr_library_app_memory
instead of modifying the overall zephyr/CMakeLists.txt file.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2019-11-05 08:44:26 -08:00
Andrzej Puzdrowski
af0abb2b8d doc/reference: move the settings doc higher
Settings documentation was placed under storage paragraph
in documentation tree, which suggested that it was another
storage solution. In fact settings uses storage modules as
its persistent storage back-end.

This patch creates dedicated run-time configuration paragraph
which aim to explain existence (and emphasize) of common run-time
configuration system in Zephyr-RTOS and rationale for using it.
The Settings paragraph is placed under this paragraph as it is only
sub-module which implements the solution.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-11-05 14:06:22 +01:00
Kumar Gala
07e5d89d86 kconfig: Add dt_chosen_enabled function
Add function that will return 'y' or 'n' if a node pointed to by a
chosen property exists and is enabled.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-05 12:04:33 +01:00
Ulf Magnusson
1d7155cb4b doc: kconfig: Document recommended header format
Might help keep things consistent.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Jukka Rissanen
c007beef5f doc: net: Add networking changes to 2.1 release note
Initial set of networking changes in 2.1 release.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-11-03 12:43:38 +01:00
François Delawarde
468a834af0 settings: fix custom backend example
Fix example of custom backend implementation

Fixes: #20163.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-10-31 08:16:09 +01:00
Jukka Rissanen
86bf182f55 doc: net: Add information about SOCKS5 proxy support
Describe how to use the SOCKS5 networking API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-29 08:27:39 +02:00
David B. Kinder
9b66efc858 doc: fix misspellings in rst docs
Fix some misspellings missed during regular reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-29 06:01:13 +01:00
Daniel Leung
b7eb04b300 x86: consolidate x86_64 architecture, SoC and boards
There are two set of code supporting x86_64: x86_64 using x32 ABI,
and x86 long mode, and this consolidates both into one x86_64
architecture and SoC supporting truly 64-bit mode.

() Removes the x86_64:x32 architecture and SoC, and replaces
   them with the existing x86 long mode arch and SoC.
() Replace qemu_x86_64 with qemu_x86_long as qemu_x86_64.
() Updates samples and tests to remove reference to
   qemu_x86_long.
() Renames CONFIG_X86_LONGMODE to CONFIG_X86_64.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-10-25 17:57:55 -04:00
Loic Poulain
32169886ca drivers: Add video API
This generic video API can be used to capture/output video frames.

Once a video buffer is enqueued to a video device endpoint, device owns
the buffer and can process to capture (camera), output (disk, display),
convert (hw encoder)... User can then call dequeue to retrieve
the processed buffer (video driver ensure cache coherency).

Once dequeued, video buffer is owned by user (e.g. for frame
processing, display buffer update, write to media, etc...).

For each video-buffer, user needs allocate the associated frame buffer
via video_buffer_alloc. Buffer format is defined by video device
endpoint configuration. Video device can be controlled (e.g. contrast,
brightness, flip...) via controls.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-25 15:13:53 -05:00
Jukka Rissanen
3cbf4a203d doc: net: Add Websocket API documentation
Add documentation for the Websocket API, also add information how
to use the Websocket as a transport for other high level protocols
like MQTT.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-25 14:03:25 +03:00
Sebastian Bøe
7358bd342a doc: dtc: Don't incorrectly document that DT uses Kconfig
Remove the documentation that incorrectly says that DT uses
Kconfig. DT no longer has access to Kconfig symbols.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-10-24 11:01:08 -05:00
Sebastian Bøe
e79768c2df dtc: Remove support for common.dts
Remove the common.dts file which has been used for a year.

common.dts at one point allowed us to conditionally add an MCUBoot
overlay based on Kconfig.

but since DT lost access to Kconfig options it has been unused.

The overridable variable DTS_COMMON_OVERLAYS, which by default points
to common.dts, is also unused in-tree, and any out-of-tree usage can
be ported over to use DTC_OVERLAY_FILE instead, so we remove the
variable as well.

This simplifies the configuration system.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-10-24 11:01:08 -05:00
Kumar Gala
22e7449b73 kconfig: Introduce typed dt kconfig functions
Replace:
  dt_chosen_reg_addr
  dt_chosen_reg_size
  dt_node_reg_addr
  dt_node_reg_size

with:
  dt_chosen_reg_addr_int
  dt_chosen_reg_size_int
  dt_chosen_reg_addr_hex
  dt_chosen_reg_size_hex
  dt_node_reg_addr_int
  dt_node_reg_size_int
  dt_node_reg_addr_hex
  dt_node_reg_size_hex

So that we get the proper formatted string for the type of symbol.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-10-24 08:51:06 -05:00
Marti Bolivar
52c7df6014 doc: west fixes and updates to manifest.rst
Some of this information is stale and needs to be fixed.

Try to make a few other things clearer while we're here.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-23 21:02:02 -04:00
Andrzej Puzdrowski
61481b6981 doc: include flash page layout API
Flash page layout API was omitted by documentation as it
is optional.
Added tag which turn it on to doxygen setup which allows
to include missing API documentation.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-10-23 20:59:26 -04:00
David B. Kinder
cc1b94c388 doc: fix display of monospaced text links
Links to doxygen-generated API content are displayed as monospaced code
spans in the text, but have no indication that they're are clickable
links.  Tweak the CSS to color the monospaced text the same as regular
links in the text (blue) and after visited (purple).  This might also
help us notice doxygen API references that aren't creating links (and
should).

Fixes: #20032
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-23 08:59:49 +02:00
David B. Kinder
2d56a69735 doc: add v1.14.1 docs to version pick list
Update conf.py to add the v1.14.1 release docs to the master docs
version pick list, and remove the original v1.14.0.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-22 22:59:59 -04:00
Peter Bigot
4d97252cdf doc: dts: describe nexus node magic required for shield gpio translation
Document why and how we use the devicetree nexus map properties to
preserve devicetree flag specifications.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-22 14:40:41 -05:00
Ulf Magnusson
82330172ac doc: kconfig: Get rid of some duplicate path separators in output
Paths like soc//arm/... showed up in the output due to the extra '/' at
the end of the SOC_DIR value. Remove the redundant '/' in SOC_DIR and
other environment variables that get referenced in the Kconfig files.

Kconfiglib never normalizes paths, because it avoids some gotchas, e.g.
with symlinks.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-22 11:09:38 +02:00
David Leach
4eddc394a3 doc: contribution guidelines: Specify roles and responsibilies
Clarify the roles and responsibilities of the Zephyr community
and contributors with respect to PRs, Bugs, and Features.

Signed-off-by: David Leach <david.leach@nxp.com>
2019-10-21 12:34:03 -05:00
Francisco Munoz
60d5657c72 doc: peripherals: KSCAN API documentation
Append KSCAN API to the list of peripherals

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-10-16 13:29:21 -07:00
Ulf Magnusson
711c4d8a48 doc: genrest: Support customizing the description on index pages
Extend the specifications passed to --modules to add the form

    <title>:<suffix>:<path>:<index description filename>

<index description filename> points to a file that contains RST that is
inserted at the top of the index page.

If no filename is passed, the old default description is used.

Also add three flags --top-index-desc, --non-module-index-desc, and
--all-index-desc for customizing the text at the top of non-module index
pages.

This functionality is currently unused in Zephyr, but will probably be
used later. It's being added for a downstream project.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-16 11:57:36 +02:00
Christoph Reiter
a92a35c2f3 doc: fix list formatting in ring_buffer
There is one level of spaces too much which leads to incorrect
formatting.

Signed-off-by: Christoph Reiter <christoph.reiter@infineon.com>
2019-10-15 09:54:39 -07:00
Radoslaw Koppel
bb9c453777 settings: doc: Update the backend documentation
This commit updates the settings backend documentation
to clearly state that it cannot provide old entities
before the final one.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-10-14 12:05:42 +02:00
Anas Nashif
ace5609a6b doc: sanitycheck: document all new features
Update documentation with new features.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-10-11 07:28:19 -07:00
Kamil Piszczek
a940bb1dbc doc: guides: bluetooth: updated persistent storage section
Updated the Persistent Storage section in the Bluetooth guide with NVS
configuration.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-10-11 14:55:24 +02:00
Ulf Magnusson
91384ef01e scripts: genrest: Support splitting symbol documentation up by path
Add a --modules flag to genrest.py for generating separate index pages
for symbols defined within certain paths.

Passing

    --modules Shell🐚subsys/shell Storage:storage:subsys/storage

will generate these index pages, instead of a single index.rst file:

 - index-shell.rst: Lists the symbols defined in subsys/shell

 - index-storage.rst: Lists the symbols defined in subsys/storage

 - index-main.rst: Lists all symbols that are not in subsys/shell or
   subsys/storage

 - index-all.rst: Lists all symbols

 - index.rst: Contains links to the other index pages

The string before the first ':' ('Shell' and 'Storage' above) is used
when generating the title of the index page. 'Shell' gives
'Shell Configuration Options', for example.

The title for index-main.rst can be set by passing
'--non-module-title <title>'. It defaults to "Zephyr".

By default, paths in symbol information pages that are within modules
are shown as '<title>/<path relative to module>'. This can be disabled
by passing --keep-module-paths.

--keep-module-paths would make sense for the example above, but
stripping the path to the module is nice when dealing with modules
defined outside the Zephyr repository.

If a symbol is defined in multiple modules (or both in a module and
outside all modules), it will appear on multiple index pages.

This commit also simplifies how genrest.py is called a bit, making the
Kconfig filename optional (default: Kconfig).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-10 15:36:11 +02:00
David B. Kinder
36603a3bda doc: make consistent release notes titles
For a long time, release notes were titled "Zephyr Kernel x.x.x".  With
the 2.0 release the title was changed to "Zephyr RTOS 2.0.0" and for the
1.14.1 update the title was "Zephyr 1.14.1" and for the 2.1.0 working
draft the title went back to "Zephyr Kernel 2.1.0". The end result was
the release notes index looking like this:

   Zephyr Kernel 2.1.0 (Working Draft)
   Zephyr RTOS 2.0.0
   Zephyr 1.14.1
   Zephyr Kernel 1.14.0
   Zephyr Kernel 1.13.0
   Zephyr Kernel 1.12.0
   Zephyr Kernel 1.11.0

I think the intention was to drop the "Kernel" name (since the release
is more than a kernel), so let's make the release notes titles
consistent by calling post 1.14.0 release notes "Zephyr x.x.x"

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-09 19:28:32 -04:00
David B. Kinder
c686ef1240 doc: forward-port 1.14.1 release notes to master
Integrate the 1.14.1 release notes into the master release notes
documents.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-09 19:28:32 -04:00
David B. Kinder
82d6347355 doc: fix broken file and zephyr-app refs
found some references to files (via :zephyr_file: and :zephyr-app:) that
were moved, so the links were broken

Fixes: #19660

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-08 15:42:32 -05:00
Håkon Øye Amundsen
f20127c137 doc: use simpler words for describing scheduling
Use simple terms when possible.
'inhibit' -> 'prevent'
'supplanted' -> 'replaced'

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2019-10-08 10:21:39 -07:00
Marti Bolivar
27e5dd131f doc: s/device tree/devicetree/
DTSpec writes this as a single word, presumably to make it easier to
grep for / more precise. Follow along in the rest of the docs now that
our main DT docs page agrees with this usage.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Marti Bolivar
9935fdd110 doc: dts: move example to the right place
The K6X example is part of the wrong subsection (devicetree vs
kconfig) currently. Move it up to the right place (the section which
was recently renamed to "input and output files")

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Marti Bolivar
85fa523cf0 doc: dts: add more explanations, with diagrams
Re-work the introductory sections of the devicetree documentation,
adding several figures and cross-references to other useful parts of
the documentation.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Marti Bolivar
2275aae291 doc: add a couple of ref targets
These will be needed later.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Marti Bolivar
2fa0c4874a doc: add more cross-references/examples for DT overlays
Device tree overlays are a bit of a stumbling block. Try to add more
cross-references and examples for how to use them to the application
development doc and the west build page.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Erwan Gouriou
ce37c594ed doc: shields: Document shield variant board overriding
It is now possible to override a shield variant configuration
for a specific board. Get it documented.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-10-07 21:49:26 -04:00
Erwan Gouriou
3865b54802 doc: shields: Update shields doc with board overriding and variants
Shields subsystem provides the possibility to override configuration
for boards and to define variants.

Reflect this in documentation.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-10-07 21:49:26 -04:00
Andy Ross
bb746e6ec4 doc/reference/kernel: Add SMP archtecture doc
SMP had API-level docs, but no architecture-level description.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-04 13:24:40 -07:00
Alexander Wachter
1c7892df3f include: drivers: CAN: changed return parameter description
Changed return parameter description from
"@retval filter id on success"  to
"@retval filter_id on success".
This change suppresses the doxy warnings.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-10-04 13:05:44 -04:00
Alexander Wachter
5b0a7d3523 doc: CAN: Extend CAN doc and moved it to networking
This commit adds a lot more documentation to the Controller Area
Netwok API. The documentation is move to the networking section.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-10-04 13:05:44 -04:00
Piotr Zięcik
19d8349aa5 kernel: Introduce k_work_poll
This commit adds new k_work_poll interface. It allows to
submit given work to a workqueue automatically when one of the
watched pollable objects changes its state.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-10-04 17:15:17 +02:00
Ulf Magnusson
a778868805 doc: dts: Include #cells in legacy syntax section
Give an example for an interrupt controller, where 'interrupt-cells'
should be used instead.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-03 05:57:26 -07:00
David B. Kinder
4207e705f0 doc: fix genrest turbo mode output
PR #19493 cleaned up the turbo-mode process for doc generation but
introduced an error in the generated index.rst that causes use of the
"make htmldocs-fast" (so-called turbo mode) to fail with an error -
the generated list-table directive has no content (other than
the header row).  This PR adds one dummy row.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-02 22:19:30 -04:00
Ulf Magnusson
842e1d4dd1 doc: dts: Fix 'child-binding' typo in legacy syntax section
'child-node' should be 'child-binding'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-02 18:26:23 -07:00
Ulf Magnusson
e5192f8e9a doc: cmake: kconfig: Remove assignments to unused env. vars.
These are never referenced by the Kconfig files or
scripts/kconfig/kconfigfunctions.py.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-02 08:18:46 -04:00
Peter Bigot
0582a0c1bf cmake: add app boards subdir as search location for board overlay files
Putting overlay files in the test/sample root clutters the file
system.  Allow them to be in the boards subdirectory alongside
board.conf files.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-01 20:38:24 -07:00
Ulf Magnusson
c15705f180 doc: genrest: Separate turbo mode logic from rest of code
KCONFIG_TURBO_MODE being twisted up in the normal logic made the code
hard to follow and change.

Use a separate write_dummy_index() function for KCONFIG_TURBO_MODE
instead, and add more documentation for it. Also get rid of options.rst
and just write all the symbol link targets directly to the dummy index
file, which is a bit simpler.

As a small piggybacked improvement for default values, make the heading
'default' instead of 'defaults' when there's only one. The menuconfigs
do this too.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-01 19:21:02 +02:00
Carles Cufi
6c5fc1b532 doc: bluetooth: Add 1.14 qualification listings
Add the 3 new listings obtained in the 1.14.x LTS release.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-10-01 10:42:41 -04:00
Andrew Boie
07525a3d54 kernel: add arch interface for idle functions
k_cpu_idle() and k_cpu_atomic_idle() were being directly
implemented by arch code.

Rename these implementations to z_arch_cpu_idle() and
z_arch_cpu_atomic_idle(), and call them from new inline
function definitions in kernel.h.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-30 15:25:55 -04:00
Alberto Escolar Piedras
f520a221ab doc: contribution guidelines: Clarify use of uncrustify
A few new contributors, after reading the uncrustify section
of the contribution guidelines, have decided to run
existing Zephyr files thru uncrustify, and include in commits
with minor fixes lots of styles changes.
This is something we do not want to encourage.

To avoid this, modify a bit the uncrustify section to
discourage people from doing just that.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-09-30 17:54:57 +02:00
David Lechner
f6fd8a7dab doc: fix dead kconfig links
Links to Linux kernel Kconfig documentation are broken, so replace them
with working ones.

Signed-off-by: David Lechner <david@lechnology.com>
2019-09-27 23:11:14 -04:00
Wentong Wu
8f2da767ee doc: power_management: add diagrams illustrating power management
Add diagram showing the current system power management and the central
method of device power management.

The diagrams were made using draw.io and can be edit using draw.io.y

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-09-27 11:37:40 -04:00
David B. Kinder
fa9d8e09a0 doc: fix doc, boards, and samples misspellings
Regular scan for misspellings in documentation missed during regular
reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-27 11:44:00 +02:00
Laczen JMS
78170ecd18 cmake: app: set zephyr_extra_modules from environment
This PR adds the possibility to specify ZEPHYR_EXTRA_MODULES from an
environmental variable. To add a custom module mymodule in
path/mymodule the variable ZEPHYR_EXTRA_MODULES can be set in
`.zephyrrc` as `export ZEPHYR_EXTRA_MODULES=path/mymodule`.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2019-09-25 05:10:44 -04:00
Anas Nashif
f2b04d9ac2 docs: remove deprecated doxygen options
Noticed those with most recent doxygen, we do not use those options, so
it is safe to remove now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-25 04:42:51 -04:00
Anas Nashif
d803a534c0 docs: kernel: thread documentation enhancements and cleanup
Moving all thread docs into 1 page was a bit too much. Split the section
a bit and remove redundant and useless sections and move some thread
related documentation from the scheduling page to threads (thread states
and priorities).

Add a new figure for thread states.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-25 04:42:51 -04:00
Anas Nashif
25cd3f9f54 docs: kernel: K_FP_REGS is not x86 only
We have more architectures support float now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-25 04:42:51 -04:00
Anas Nashif
72f52c9e44 docs: add posix OS abstraction layer section
Add section about the POSIX support in Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-24 14:56:09 -04:00
Anas Nashif
ae5776051a docs: cleanup cmsis RTOS api docs
Fix formatting of the CMSIS RTOS APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-24 14:56:09 -04:00
Anas Nashif
65eebd33d9 doc: move cmsis rtos API docs to portability/
Move CMSIS RTOS API docs under portability to distinguish from
architecture and board porting.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-24 14:56:09 -04:00
Krzysztof Chruscinski
cc5094b3bf logging: Add option to block in thread context
Added CONIFG_LOG_BLOCK_IN_THREAD option to block until buffer for
log message is available. When log message is called in the thread
and there is no buffer available in the pool, thread will block with
configurable timeout (CONFIG_LOG_BLOCK_IN_THREAD_TIMEOUT_MS). If
buffer cannot be allocated by that time, message will be dropped.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-09-23 22:04:42 -07:00
Andrew Boie
4ce988ab43 doc: provide error handling documentation
We don't really have docs on how fatal errors are induced
or handled. Provide some documentation that covers:

- Assertions (runtime and build)
- Kernel panic and oops conditions
- Stack overflows
- Other exceptions
- Exception handling policy

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-23 23:45:08 +02:00
Mrinal Sen
9fbc5fcd16 debug: tracing: Common Trace Format Simplification
Remove ctf_middle layer and have only ctf_top and ctf_bottom.
Port functionality from ctf_middle to ctf_top and remove
ctf_middle.h file. Update associated documentation.

Signed-off-by: Mrinal Sen <msen@oticon.com>
2019-09-20 09:06:38 -04:00
Ulf Magnusson
5bc06e8250 doc: release notes: Mention devicetree script changes for 2.0 and 2.1
Added in 2.0, along with some binding format simplifications in 2.1.

Bunch of other stuff that could be mentioned, but keep it relatively
short.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-19 20:48:23 -04:00
Markus Fuchs
c53755e5dd doc/reference/storage/sdhc: Document SDSC support
Add note about standard-capacity SD card support.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2019-09-19 09:49:07 -05:00
David B. Kinder
c4f730fcf5 doc: update release notes index to use globbing
Use globbing to find release notes and display them in the expected
reverse-sorted order (newest release first).  Some trickery is needed
because were not using two-digit version/subversion numbers so the list
won't sort naturally. This will eliminate the need to edit the index
page on every release, until we get to subversion 10.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-19 09:27:20 -05:00
David B. Kinder
99e935e2ba doc: reformat net-stack-arch doc for PDF output
While the two-column layout looked OK in the HTML output, it totally
broke the PDF version of the documentation.  So, this change puts the
picture before the text instead of using embedded raw html tags to
create a two-column look. (And fixes the PDF generated output.)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-18 21:03:17 -04:00
David B. Kinder
f6521290e6 doc: replace hlist with column-width class
For long lists of items, it's better to use a multi-column display to
make better use of the screen space.  We used the hlist directive to
accomplish list, but it has a drawback on small (phone) screens because
under the hood, the rendering is done using tables.

Instead, we can take advantage of built-in CSS multi-column support
available in recent browsers.  So, convert uses of the hlist directive
to use an rst-class directive to apply a multi-column class to
the entity. The chosen column-width (18em) gives us a 3-column display
on typical window sizes, but will adjust to more or fewer columns
depending on the actual real estate available.

Also, update the documentation guidelines to mention this change.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-18 13:33:37 -04:00
Anas Nashif
6bdfe5dc16 drivers: gpio: remove sch gpio driver
Was used on galileo which was removed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-18 11:06:18 -05:00
Francisco Munoz
2d8d4e0b1b doc: peripherals: PS/2 API documentation
Append PS/2 API to the list of available peripherals

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-09-18 13:23:52 +08:00
Henrik Brix Andersen
c2869c7e78 doc: reference: settings: list non-volatile storage backend
List the non-volatile storage (NVS) backend in the settings API
reference documentation.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-09-17 16:26:40 -05:00
Torstein Grindvik
d888e012ed subsys/testsuite: make tc_util overridable
A Kconfig boolean is added to allow users to provide their own
output strings when running tests via ztest.
This allows changing e.g. the PASS/FAIL/SKIPPED strings,
add counters, change separators, and similar.

A test using the feature and relevant documentation is added.

Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
2019-09-17 07:11:33 +08:00
Kumar Gala
d005f772ed doc: release notes: Add note on kconfig function deprecation
Add some info on the deprecation of the kconfigfunctions.py that have
been deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-16 16:06:06 -05:00
Anas Nashif
9b30cf70e1 doc: tracing: link kconfig options using :option:
Add a reference to Kconfig option documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-17 04:44:42 +08:00
Anas Nashif
7d82e1765b doc: c library: document which c functions are implemented.
Add supported C library functions in the minimal libc

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-17 04:44:42 +08:00
Anas Nashif
d53c87a3ca doc: tracing: include API docs into documentation
Group tracing documentation in header file and include them into
documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-17 04:44:42 +08:00
Anas Nashif
c1229f0ade doc: tracing: move ctf docs into index
Move CTF section into main tracing document.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-17 04:44:42 +08:00
Anas Nashif
6543e6a1e5 doc: tracing: add figure for tracing with systemview
Add figure and example project configuration for systemview.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-17 04:44:42 +08:00
Anas Nashif
7d27cf9f27 doc: link-roles: convert bytes to string
Get the correct branch name as a string instead of bytes.

Fixes #19165

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-15 18:44:45 -04:00
Andrew Boie
714e37fb78 doc: add more details about memory domains
We now more throroughly discuss memory domains, thread
resource pools, and automatic memory domains.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-15 07:08:05 +08:00
Kumar Gala
5735397b9b kconfig: Add new functions to kconfigfunctions to use EDT
Add a new set of functions that utilize EDT so we can move away from the
generated .conf file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-13 11:42:34 -05:00
Andy Ross
6564974bae userspace: Support for split 64 bit arguments
System call arguments, at the arch layer, are single words.  So
passing wider values requires splitting them into two registers at
call time.  This gets even more complicated for values (e.g
k_timeout_t) that may have different sizes depending on configuration.
This patch adds a feature to gen_syscalls.py to detect functions with
wide arguments and automatically generates code to split/unsplit them.

Unfortunately the current scheme of Z_SYSCALL_DECLARE_* macros won't
work with functions like this, because for N arguments (our current
maximum N is 10) there are 2^N possible configurations of argument
widths.  So this generates the complete functions for each handler and
wrapper, effectively doing in python what was originally done in the
preprocessor.

Another complexity is that traditional the z_hdlr_*() function for a
system call has taken the raw list of word arguments, which does not
work when some of those arguments must be 64 bit types.  So instead of
using a single Z_SYSCALL_HANDLER macro, this splits the job of
z_hdlr_*() into two steps: An automatically-generated unmarshalling
function, z_mrsh_*(), which then calls a user-supplied verification
function z_vrfy_*().  The verification function is typesafe, and is a
simple C function with exactly the same argument and return signature
as the syscall impl function.  It is also not responsible for
validating the pointers to the extra parameter array or a wide return
value, that code gets automatically generated.

This commit includes new vrfy/msrh handling for all syscalls invoked
during CI runs.  Future commits will port the less testable code.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-12 11:31:50 +08:00
Ulf Magnusson
b558956bd7 doc: application.py: Make functions that don't use 'self' static
Fixes this pylint warning:

    R0201: Method could be a function (no-self-use)

Another option would be to turn them into regular functions, but that'd
be a bigger change.

Fixing pylint warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-08 22:20:55 -04:00
Ulf Magnusson
a0fceff1a2 scripts: dts: Simplify and improve 'compatible' matching
Instead of

    properties:
        compatible:
            constraint: "foo"

, just have

    compatible: "foo"

at the top level of the binding.

For backwards compatibility, the old 'properties: compatible: ...' form
is still accepted for now, and is treated the same as a single-element
'compatible:'.

The old syntax was inspired by dt-schema (though it isn't
dt-schema-compatible), which is in turn a thin wrapper around
json-schema (the idea is to transform .dts files into YAML and then
verify them).

Maybe the idea was to gradually switch the syntax over to dt-schema and
then be able to use unmodified dt-schema bindings, but dt-schema is
really a different kind of tool (a completely standalone linter), and
works very differently from our stuff (see schemas/dt-core.yaml in the
dt-schema repo to get an idea of just how differently).

Better to keep it simple.

This commit also piggybacks some clarifications to the binding template
re. '#cells:'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Kumar Gala
c24a791d0c dts/bindings: move template out of YAML dir
As we parse for valid yamls, the template shouldn't get parsed

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Charles E. Youse
6767563f94 arch/x86: remove support for IAMCU ABI
This ABI is no longer required by any targets and is deprecated.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-07 10:07:42 -04:00
Daniel Leung
863548cf19 doc: mailbox: fix typos and clarify meaning of struct field
This fixes some typos. Also fix the meaning of a struct field
where the confusion caused by copy-and-paste from another
field.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-07 10:01:34 -04:00
Carles Cufi
8645cc2b94 doc: cmake: Fix PYTHONPATH on Windows
Correctly set the separator as a semicolon on Windows when
constructing the PYTHONPATH environment variable so that CMake
doesn't intepret it and swallow it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-09-07 10:00:45 -04:00
Kumar Gala
ec3a8ce41b doc: Release notes for v2.1 - initial (empty) draft
Get things started for Zephyr 2.1 release notes.
Individual PRs will update their appropriate sections.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 08:51:31 -05:00
Ulf Magnusson
ca4200a2c7 doc: extract_content.py: Suppress spurious pylint warning
UnicodeDecodeError.object supports indexing, but pylint gets confused
for some reason.

    doc/scripts/extract_content.py:70:16: E1136: Value 'e.object' is
    unsubscriptable (unsubscriptable-object)

This warning is useful enough to want to have enabled in the upcoming
pylint CI check, so suppress it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:13:22 -04:00
Ulf Magnusson
751ee21e08 doc: application.py: Simplify test with 'in'
Getting slightly subjective, but fixes this pylint warning:

    doc/extensions/zephyr/application.py:274:15: R1714: Consider merging
    these comparisons with "in" to "goal in ('build', 'sign')"
    (consider-using-in)

Use a set literal instead of a tuple literal, as recent Python 3
versions optimize set literals with constant keys nicely.

Getting rid of pylint warnings for a CI check. I could disable any
controversial ones (it's already a list of warnings to enable anyway).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:10:30 -04:00
Ulf Magnusson
4c7926234b doc: conf.py: Remove unused subprocess imports
Fixing pylint warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:08:22 -04:00
Ulf Magnusson
4cac371d43 scripts: Suppress/fix undefined variable pylint warnings
dtlib.py and guiconfig.py do some hackery to build token and image
variable names, which triggers spurious pylint warnings like

    scripts/dts/dtlib.py:243:28: E0602: Undefined variable '_T_LABEL'
    (undefined-variable)

Suppress the warning for those files. The generated names get used in
lots of places.

Also suppress some warnings in doc/conf.py ('tags' is from Sphinx), and
fix a legitimate issue in scripts/dts/testdtlib.py.

This pylint check is useful enough to want enabled in the upcoming CI
check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 08:03:04 -04:00
Ulf Magnusson
a07c3dc46f doc: conf.py: Replace bare 'except' with 'except Exception'
A bare 'except:' can do some annoying stuff like eat Ctrl-C (because it
catches KeyboardInterrupt). Better to use 'except Exception:' as a
catch-all.

Even better might be to catch some more specific exception, because even
'except Exception:' eats stuff like misspelled identifiers.

Fixes this pylint warning:

    doc/conf.py:99:0: W0702: No exception type(s) specified
    (bare-except)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 07:56:58 -04:00
Ulf Magnusson
53ce10814d doc: application.py: Remove unused variables
Reported by pylint. Fixing warnings for a CI check.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 07:56:09 -04:00
Ulf Magnusson
0d39a10fbb scripts: Fix random typo'd whitespace
Reported by pylint's 'bad-whitespace' warning.

Not gonna enable this warning in the CI check, because it flags stuff
like deliberately aligning assignments and gets too cultish. Just a
cleanup pass.

For whatever reason, the common convention in Python is to skip spaces
around '=' when passing keyword arguments and giving default arguments:

    f(x=3, y=4)
    def f(x, y=8):
        ...

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 07:54:17 -04:00
David B. Kinder
624ac4801b doc: remove licensing for moved ext/ components
ext/fs/fat and ext/hal/nordic were moved out of the ext folder and into
external modules so we should remove the licensing exceptions noted in
this document.

kconfig and kbuild were removed from the zephyr repo too.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-07 00:17:15 +02:00
Ioannis Glaropoulos
0ea5f84143 doc: release notes: style update; Zephyr Kernel to Zephyr RTOS
Zephyr is more than a kernel, so we update the title of
the release notes' section accordingly.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-06 23:34:18 +02:00
Ioannis Glaropoulos
9f7d4bc475 release: adding 2.0.0 doc link
Add 2.0.0 release to the list and remove
the last release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-06 19:11:59 +02:00
Ioannis Glaropoulos
07d750efb3 doc: release notes: add list of issues for 2.0.0
Adding the list of closed issues for v2.0.0 release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-06 18:01:26 +02:00
David B. Kinder
168751a7b7 doc: fix broken doc links
The project's README.rst references the support board docs with an URL
that's not working these days (see
https://github.com/zephyrproject-rtos/infrastructure/issues/134) so fix
that URL reference.  While looking for other similar linking cases, I
found a hard URL references that should be using :ref: role, and a
release notes reference to a (now) broken link (fixing that in the
/latest/ version of the 1.10 release notes).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-06 16:14:39 +02:00
Marti Bolivar
4b3f89646d doc: getting_started: run west update after pulling zephyr
This is causing confusion.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-09-06 12:14:20 +02:00
Nathaniel Graff
bce38ba98c doc: release notes: RISC-V release notes for 2.0
Adds 2.0 release notes for the RISC-V architecture.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-09-06 10:46:45 +02:00
David B. Kinder
d0ef464201 doc: editor pass on release notes
Do a review and editor pass on the release notes, reduce length of some
lists by using hlist extension, tweak css for appearance of hlist in a
bullet list. Update entries to be in past tense (Added vs. Add).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-05 23:38:34 +02:00
Ioannis Glaropoulos
f9c94d49e8 doc: release notes: add HAL section
Adding a minor section about HAL changes
in the 2.0.0 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-05 20:42:35 +02:00
Marti Bolivar
cc8d92c088 doc: west: v0.6.2 fixes a critical v0.6.1 bug
All v0.6.1 users must upgrade. Add release notes blurb.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-09-05 07:28:07 +02:00
David Brown
f14e024c39 doc: releases: Add CVE-2019-9506 to release notes
Add section about security vulnerability issues in the 2.0.0 release
notes.

Signed-off-by: David Brown <david.brown@linaro.org>
2019-09-04 21:17:47 +02:00
Michael Scott
ee57741c8c doc: net: Update LwM2M block of overview document
Re-word the support block for LwM2M:
- the supported interfaces
- change wording of supported LwM2M objects to include the "required"
  keyword instead of explicitly listing them
- mention several IPSO Smart Objects

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/16327

Signed-off-by: Michael Scott <mike@foundries.io>
2019-09-04 18:27:02 +02:00
Ioannis Glaropoulos
58fa1a1f8f doc: release notes: add comment about tests
Adding a note about new tests and expanded
test case list for 2.0.0 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-09-04 10:00:35 +02:00
Carles Cufi
64841fb457 doc: release notes: 2.0 Kernel release notes
Add a section for the kernel release notes for the 2.0 release.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-09-03 21:17:14 +02:00
David B. Kinder
3c64a6dcb2 doc: remove next/previous chapter buttons
The Next/Previous chapter buttons have been confusing in the past and
recent DX studies still show that folks read these as the "Next"
document to read in some defined order.  These buttons are simply
another way to navigate through the document tree to the "Next" doc in
the table of contents.  Let's remove these buttons (again).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-02 19:56:30 +02:00
David B. Kinder
60136f00cb doc: add how to exit from QEMU in samples
While trying out the hello_world sample built for QEMU, I was expecting
the sample app to exit and I'd return to a command prompt.  Nope.  You
need to exit QEMU manually, so add that step to the sample instructions.
Looking around, there are more uses of QEMU like this that could use
this added step after running the sample app.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-02 12:06:08 -04:00
Charles E. Youse
f04ca02dae doc: relnotes: x86-specific release notes
Not a whole ton to say at the high level: many of the changes have
been discussed in notes for drivers and other subsystems.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-02 12:03:37 -04:00
Daniel Leung
1668ed70c9 doc: fix files mis-named as PNG files
There are a few non-PNG (JPEG and WebP) files that are being
name as PNG files. This causes pdflatex/latexmk to fail due
to them not actually being PNG files. So rename those files
with correct extensions and update the RST files.

Also converted the WebP file in JPEG as PDFLatex cannot parse
WebP image.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-02 13:02:08 +02:00
David B. Kinder
551251ace9 doc: replace with valid png images
PR #18789 missed one png that pngcheck was unhappy with

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-02 13:01:14 +02:00
Wayne Ren
98ad4bb720 doc: relnotes: add notes for arc
add arc specific release notes

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-08-30 21:47:20 +02:00
Marti Bolivar
47f36afdb9 doc: change kernel reference toctree maxdepth to 1
This makes the index cleaner.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-30 13:55:38 +02:00
Marti Bolivar
1e34ea950c doc: add summary table for kernel data passing
Add a table summarizing the key characteristics of each
of the data passing objects.

It is useful for readers to have an overview they can skim without
having to read each section in detail.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-30 13:55:38 +02:00
Marti Bolivar
e9c858abc8 doc: split kernel reference toctrees
Splitting these up by area helps make the sidebar a bit easier to
navigate, and will also let us insert additional overview information
about each area.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-30 13:55:38 +02:00
David B. Kinder
dbc2142402 doc: add doc changes to release notes
Add a summary of 2.0 doc changes, and fix a misspelling.
Also, add the 2.0 release notes to the index page.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-30 09:51:38 +02:00
Daniel Leung
a358248ae0 doc: drivers: add diagram and clarify a note
Add a simple diagram on the device driver model.

Instead of saying "this device driver", spell out that the note
is for the random number generator driver, as the visual
presentation does not have clear distinction.

Also update some formatting.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-08-29 17:33:56 -04:00
Peter Bigot
576d74e4cd doc: relnotes: document change in toolchain newlib default
Note that the ARM Embedded Toolchain no longer uses the full version of
newlib by default.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-29 20:56:41 +02:00
Marti Bolivar
a09d3d69f9 doc: west: add tl;dr for moving to west and troubleshooting
These are based on user feedback on slack and the mailing list.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-29 10:39:42 +02:00
Marti Bolivar
bd4b24810a doc: west: add v0.6.1 documentation
West v0.6.1 has been released. The main feature is that "west update"
now avoids communicating with the network by default when project
revisions have already been fetched.

This allows for offline operation and significantly speeds up the
command (it's 10 times faster on my machine and home network).

There are other miscellaneous changes as well; document them also.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-29 10:37:58 +02:00
Marti Bolivar
1620d29ba6 doc: west: add some missing information
There's missing overview documentation for some miscellaneous
commands. Add it.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-29 10:37:58 +02:00
Marti Bolivar
cfd1f4950f doc: fix zephyr-app-commands for west
Always show how to build. We can't do anything without a build
directory.

Fixes: #18760
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-29 08:18:14 +02:00
David B. Kinder
849f76e793 doc: remove modernizr.min.js from RTD theme
modernizr.min.js is causing unnecessary reloads of a page causing
flashing of the browser window during page load (most noticiable with
firefox).  This empty script effectively wipes out the modernizr.min.js
unnecessarily loaded by the Sphinx rtd theme (see
https://github.com/readthedocs/sphinx_rtd_theme/issues/724)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-27 22:49:44 -04:00
Peter Bigot
3f93f89558 doc: relnotes: add littlefs file system support
Trivial change to note support for littlefs added to the File System
subsystem.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-27 22:05:53 +02:00
Carles Cufi
afcbc9992c doc: Use west everywhere to build and flash
Instead of having a mix of west and CMake/ninja instructions for
building and flashing, document it using only west. This will help
clarify that west is the default build tool in Zephyr and should also
reduce confusion over what tool to use.
Note that the biggest change is changing the default in
doc/extensions/zephyr/application.py for :tool:, from all to west.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-27 19:36:24 +02:00
Carles Cufi
79b49a7673 doc: relnotes: Bluetooth release notes for 2.0
Add a section containing the most relevant Bluetooth changes for 2.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-25 19:31:39 +02:00
Ioannis Glaropoulos
f8b068ed88 release: adding release notes draft for ARM architecture
Zephyr 2.0 release notes draft for the ARM architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-08-25 00:48:24 +02:00
David B. Kinder
fbcbc2ed16 doc: update link from released doc to master
Documents generated for a tagged release have a header that mentions
that the "latest" (master branch) version of the doc may be more up to
date, but the link to the corresponding master doc is missing the
/latest/ (previously the master docs were in the root folder.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Fixes: #17764
2019-08-22 22:45:35 -04:00
Anas Nashif
12438e1047 ext: hal: Make NXP HALs a Zephyr module
Moved to an external repo, https://github.com/zephyrproject-rtos/hal_nxp

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 21:05:23 -04:00
Maureen Helm
06f5f48e33 doc: releases: Document major driver changes in 2.0 release note
Documents major driver changes (additions, removals, fixes, etc.) across
all driver families since the 1.14.0 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-08-19 23:40:05 +02:00
Maureen Helm
3642664aa8 doc: releases: Document boards added/removed in 2.0 release note
Documents all the boards added and removed across all architectures
since the 1.14.0 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-08-19 23:40:05 +02:00
Kumar Gala
13a89cfbe7 doc: sdk: Update docs to use SDK 0.10.3
Update the install docs to reference SDK version 0.10.3

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-19 11:06:55 -05:00
Peter A. Bigot
24b67ef119 doc/reference/drivers: document device-specific API extensions
This PR updates the documentation to cover a technical solution to
providing a driver instance that extends the functionality of a
subsystem API.  The solution described was mooted in Zephyr PR #17072
and approved by the Technical Steering Committee during its 2019-08-07
meeting.

Relates-to: #11993
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-08-18 19:34:57 +02:00
Peter Bigot
d0c2c4d329 doc/drivers: correct number of initialization levels
When init level hierarchy was reworked the documentation was switched to
describe the new levels, but the count of relevant levels was not
changed.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-18 13:26:23 +02:00
Chen Guokai
82da4c57a7 doc: update macOS specific guide for MacPorts
Add comment for the setup failure.
The solution can be infered from ARMmbed/cmsis-pack-manager#97
Fixes #18269.
Signed-off-by: Chen Guokai <1415430544@qq.com>
2019-08-16 21:52:05 +02:00
Jukka Rissanen
a1e7f05eaa doc: net: ppp: Enhance PPP documentation
Add information about supported protocols in PPP and link to
net-tools that contains information how to test ppp against
pppd running in Linux.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-08-14 08:28:46 +03:00
Alberto Escolar Piedras
ef066ca85d doc: Add native_posix information to 2.0 release note
Contains major POSIX arch and native_posix changes between
1.14 and 2.0 releases

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-08-13 21:52:54 +02:00
Jukka Rissanen
8c9af2504c doc: Add networking information to 2.0 release note
Contains major networking changes between 1.14 and 2.0 releases.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-08-13 18:52:59 +02:00
Ioannis Glaropoulos
a70b824929 doc: Release notes for v2.0 - initial (empty) draft
Get things started for Zephyr 2.0 release notes.
Individual teams will update their appropriate sections.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-08-13 11:57:34 +02:00
Carles Cufi
a8b208aff7 doc: west: Fix west completion docs
west completion is an extension command, and therefore requires the user
to be in a zephyr installation in order to be available.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-12 09:44:37 -07:00
Andrzej Puzdrowski
413f1be41e doc/reference/storage/settings: fix misleading examples
Code snippets show misleading example of read_callback usage
in h_set handlers.

This patch aligns snippets to implemented behavior.

fixes #15451

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-08-09 17:40:59 +02:00
Carles Cufi
a8d17437a6 doc: getting started: Use -U when installing west
For users that have an older version of west already installed, it is
useful to include `-U` in the getting started guide, otherwise the
instructions will fail to work depending on the state of the machine.

Fixes #18132

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-09 08:07:01 +02:00
Kumar Gala
9fb1fd4d6a doc: sdk: Update docs to use SDK 0.10.2
Update the install docs to reference SDK version 0.10.2

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-08 21:56:45 +02:00
Andrzej Puzdrowski
c1864b4428 doc/reference: add FCB page
Added page for description FCB subsystem.
Content was ported from MyNewt.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-08-07 14:38:49 -05:00
Carles Cufi
13823b6bcf doc: Update Slack invitation link
The old link seems not to work anymore, so instead replace it with an
invitation link freshly generated.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-05 16:52:15 +02:00
Marti Bolivar
2b3d9df1d7 west: require v0.6.0 or higher
The main change is the elimination of the bootstrapper, a design flaw
/ misfeature.

Update the documentation to be compatible with the 0.6.x releases as
well. This has to be done atomically, as there were incompatible
changes.  Make use of the versionchanged and versionadded directives
to begin keeping track of how these APIs are evolving.

(Note that west 0.6.0 will remain compatible with the extension
commands in Zephyr v1.14 LTS as long as that is still alive. This
change is targeted towards Zephyr 2.0 users.)

This requires a bump in the shippable container and allows us to
simplify the west_commands test procedure.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-05 15:17:45 +02:00
Marti Bolivar
247047bf21 doc: move runner documentation out of west-apis.rst
Now that the runners package no longer depends on west, we can move
the documentation for it from the orphan west-apis.rst page to the
build-flash-debug.rst page that documents the west extension commands
which use that package.

(This is a more logical place for this information, but it was
previously not possible to put it there since we must be able to build
the documentation on a system without west installed, excepting
content in west-apis.rst. Removing the dependency means the runners
automodule directive can safely appear in build-flash-debug.rst.)

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-05 15:17:45 +02:00
Marti Bolivar
6846de68de doc: add a release notes page for west
This just documents what's already happened.

A subsequent patch will extend it for v0.6.x.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-05 15:17:45 +02:00
David B. Kinder
23d863f6c4 doc: add doc home link in left nav
It's been annoying that there was no convenient way to get back to the
documentation home page.  There is a link in the breadcrumb trail at the
top of the page, but folks didn't notice that.  This PR adds a
"Documentation Home" link at the top of the left-nav menu.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-05 13:20:45 +02:00
Carles Cufi
c635409c57 doc: guides: tools: Fix URL to nRF Command-line tools
Fix the URL as it has changed on the Nordic website.

Fixes #18009.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-05 12:52:29 +02:00
Nicolas Pitre
1f4b5ddd0f riscv32: rename to riscv
With the upcoming riscv64 support, it is best to use "riscv" as the
subdirectory name and common symbols as riscv32 and riscv64 support
code is almost identical. Then later decide whether 32-bit or 64-bit
compilation is wanted.

Redirects for the web documentation are also included.

Then zephyrbot complained about this:

"
New files added that are not covered in CODEOWNERS:

dts/riscv/microsemi-miv.dtsi
dts/riscv/riscv32-fe310.dtsi

Please add one or more entries in the CODEOWNERS file to cover
those files
"

So I assigned them to those who created them. Feel free to readjust
as necessary.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-08-02 13:54:48 -07:00
Wayne Ren
a39f5a8cab doc: add doc of arc floating point support
add doc of arc floating point support

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-08-01 18:09:35 -07:00
Ulf Magnusson
4620bbf0c8 doc: dts: Add more information to .dtsi example
- Explain what it means to enable nodes (and for a node to be disabled)
   with some sample code from the .dts(i) files

 - Explain the '&foo { ... }' syntax

 - Linkify files with :zephyr_path:

 - Simplify and shorten wording a bit

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-30 13:44:51 -04:00
Ulf Magnusson
0294f826a6 dts: bindings: Rename binding template to binding-template.yaml
More guessable than device_node.yaml.template.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-30 11:01:51 -04:00
Ulf Magnusson
850e3626da dts: bindings: Add lots more documentation
Add some information that would've saved me a lot of time:

 - Give an overview of how device tree nodes and bindings fit together,
   with examples. Assume people might be coming at it without knowing
   anything about device tree.

 - Explain how 'inherits' works in more detail

 - Explain what 'parent/child: bus: ...' does more concretely, and what
   problem it solves

 - Add more examples to show what things look like in the .dts file

 - Clean up the language a bit and make things more consistent

Also fix some errors, like 'properties: compatible: ...' being wrong
(missing 'constraint:' and compatible strings in the wrong place).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-30 11:01:51 -04:00
Anas Nashif
d4310c0762 toolchain: remove issm support
This toolchain is no londer supported or needed. It was used to build
configurations that are now being removed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-29 21:30:25 -07:00
Anas Nashif
578ae40761 boards: remove quarl_se_c1000
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-29 21:30:25 -07:00
Anas Nashif
ffaba63b10 boards: remove arduino 101 and related boards
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-29 21:30:25 -07:00
Anas Nashif
a597c86c30 boards: remove galileo board
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-29 21:30:25 -07:00
Jukka Rissanen
c9515b4f50 doc: net: ppp: Add PPP documentation
Add information about PPP into Zephyr documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-29 10:24:46 +03:00
Carles Cufi
271eb008cd doc: Minor fixes to the Getting Started guide
A couple of minor fixes suggested by a user.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-26 12:00:19 +02:00
Carles Cufi
9b13d51589 doc: Consolidate Python and pip documentation
The documentation that describes how Python and pip interact with the OS
when installing packages used to be under a common section, and was
moved to the west bootstrap one later on. Since this information is
required early on (for example on Linux when installing CMake via pip3),
move the info to its own section and link to it from others.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-26 12:00:19 +02:00
Carles Cufi
6c73652358 doc: getting_started: Remove Linux distro versions
Remove the version numbers from the distribution listings, since those
get outdated quickly and on top of that they are causing confusion due
to those being now too old to contain recent versions of CMake and DTC.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-26 12:00:19 +02:00
Carles Cufi
ad5791cf89 doc: getting_started: Document DTC version installation
Document that the SDK contains a bundled dtc binary and how to use it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-26 12:00:19 +02:00
Carles Cufi
51fdef5603 doc: getting_started: Add CMake snap installation option
Document how snap can be used on Ubuntu to install a recent CMake
version.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-26 12:00:19 +02:00
Andrew Boie
71ce8ceb18 kernel: consolidate error handling code
* z_NanoFatalErrorHandler() is now moved to common kernel code
  and renamed z_fatal_error(). Arches dump arch-specific info
  before calling.
* z_SysFatalErrorHandler() is now moved to common kernel code
  and renamed k_sys_fatal_error_handler(). It is now much simpler;
  the default policy is simply to lock interrupts and halt the system.
  If an implementation of this function returns, then the currently
  running thread is aborted.
* New arch-specific APIs introduced:
  - z_arch_system_halt() simply powers off or halts the system.
* We now have a standard set of fatal exception reason codes,
  namespaced under K_ERR_*
* CONFIG_SIMPLE_FATAL_ERROR_HANDLER deleted
* LOG_PANIC() calls moved to k_sys_fatal_error_handler()

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-25 15:06:58 -07:00
Tomasz Bursztyka
c7d7b8cd19 doc/networking: Update network management part relevantly
There had been some changes applied on the API after that documentation
was made. Reflect the API behavior change and correct a minor issue.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-07-25 15:21:49 +03:00
Vinayak Kariappa Chettimada
f4eb03c538 Bluetooth: controller: Rename BT_LL_SW to BT_LL_SW_LEGACY
Rename the controller Kconfig option BT_LL_SW to
BT_LL_SW_LEGACY in preparation towards switch to new Link
Layer implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-07-22 14:23:42 +02:00
Anas Nashif
2a1682e7b3 doc: scheduler: add diagrams illustrating scheduler
Add some diagrams showing the different scheduling algorithms we
support.

The diagrams were made using draw.io and can be edit using draw.io.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-18 18:07:17 -04:00
Anas Nashif
9058ef167d doc: move schedling doc to its own section
Move scheduler documentation to its own section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-18 18:07:17 -04:00
Marcin Szymczyk
bddb3f3641 doc: add custom logger frontend description
Describe how custom logger is enabled and what it does.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2019-07-18 11:50:52 +02:00
Peter A. Bigot
8437ab10eb cmake: DT: Add support for overlays that reference board-provided dtsi
The Particle mesh feather boards provide device-tree overlays that
allow individual applications to select the SPI peripheral to be
used for the pins associated with a specific labelled SPI device.
This is necessary because different peripheral instances have slightly
different properties.

Add BOARD_DIR to DTS_ROOTS so these shared files can be located when
included from application-specific overlays.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 07:06:35 -04:00
Tedd Ho-Jeong An
c818406129 doc: Bluetooth: Update PICS to ICS
PICS is changed to ICS by BTI.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Tedd Ho-Jeong An
e5fd1c8792 doc: Bluetooth: Add ICS for Mesh Profile
This patch adds the ICS for Mesh Profile based on 7.4.1.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Tedd Ho-Jeong An
7c5f641db7 doc: Bluetooth: Update SM ICS to 7.4.1
This ptach updates the SM ICS to 7.4.1.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Tedd Ho-Jeong An
ad4035bc25 doc: Bluetooth: Update L2CAP ICS to 7.4.1
This patch updates the L2CAP ICS to 7.4.1.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Tedd Ho-Jeong An
400ab8dc20 doc: Bluetooth: Update GATT ICS to 7.4.1
This patch update the GATT ICS to 7.4.1.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Tedd Ho-Jeong An
26b94e76f8 doc: Bluetooth: Update GAP ICS to 7.4.1
This patch updates the GAP ICS to 7.4.1.
It updates the Bluetooth Spec to 5.1 and added missing ICS tables.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-07-11 09:24:38 +03:00
Andrew Boie
f3c624c831 doc: update coverage documentation
The sanitycheck defaults have changed, and the same options
work for emulators and native_posix.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-07-09 10:20:31 +02:00
Marc Herbert
e5cedcae43 sanitycheck help: how to spot tests that were not run and just built
There are a few reasons why sanitycheck will only build a test and not
run it: list them in the developer guide. Also lists the --options that
provide that information and update their --help message.

A couple other --help fixes.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-07-08 08:07:57 -04:00
Marc Herbert
eee564fbfb doc: add space after cmake -Bdir and ninja -Cdir options
Let's be consistent with official cmake, ninja and make documentations.

https://cmake.org/cmake/help/latest/manual/cmake.1.html
cmake --help
man cmake

https://ninja-build.org/manual.html#_running_ninja
ninja --help

https://www.gnu.org/software/make/manual/make.html#Options-Summary
info make 'Options Summary'
etc.

Related to issue #15315

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-07-07 16:34:12 -04:00
Anas Nashif
fb4d9c0411 doc: exclude internal symbols
Do not index internal symbols in doxygen documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-04 10:04:27 -04:00
Kumar Gala
284bc9d964 dts: Rename SW._GPIO_* -> DT_ALIAS_SW._GPIOS_*
We use the following commands to rename any
SW._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_SW._GPIOS_{CONTROLLER,PIN,FLAGS}

git grep -l SW._GPIO_CONTROLLER | xargs sed -i 's/SW\(.\)_GPIO_CONTROLLER/DT_ALIAS_SW\1_GPIOS_CONTROLLER/g'
git grep -l SW._GPIO_PIN | xargs sed -i 's/SW\(.\)_GPIO_PIN/DT_ALIAS_SW\1_GPIOS_PIN/g'
git grep -l SW._GPIO_FLAGS | xargs sed -i 's/SW\(.\)_GPIO_FLAGS/DT_ALIAS_SW\1_GPIOS_FLAGS/g'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-01 07:14:36 -05:00
Ioannis Glaropoulos
0bae5a48d4 doc: reference: float: document ARM thread tag recommendation
This commit adds a short note in reference/kernel/other/float.
The note instructs to apply pre-tagging of ARM threads to
indicate that they indend to use the FP services.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-06-27 18:07:03 -07:00
Kumar Gala
a614a026b7 dts: Rename DT_.*_GPIO_* to DT_.*_GPIOS_*
Convert DT_.*_GPIO_{CONTROLLER,PIN,FLAGS} ->
	DT_.*_GPIOS_{CONTROLLER,PIN,FLAGS)

Used the following commands to make these conversions:

git grep -l DT_.*_GPIO_CONTROLLER | xargs sed -i 's/DT_\(.*\)_GPIO_CONTROLLER/DT_\1_GPIOS_CONTROLLER/g'
git grep -l DT_.*_GPIO_PIN | xargs sed -i 's/DT_\(.*\)_GPIO_PIN/DT_\1_GPIOS_PIN/g'
git grep -l DT_.*_GPIO_FLAGS | xargs sed -i 's/DT_\(.*\)_GPIO_FLAGS/DT_\1_GPIOS_FLAGS/g'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-27 13:02:34 -05:00
Steven Wang
033706c29c Doc: Use SDK 0.10.1 instead of 0.10.0.
There are several critical issues with SDK 0.10.0. For the detail,
please refer to the link below.

https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.10.1

Signed-off-by: Steven Wang <steven.l.wang@linux.intel.com>
2019-06-27 07:15:19 -04:00
David B. Kinder
b30b52abd5 doc: fix doxygen INPUT path; brand html output
Clean up the INPUT paths for doxygen scanning:

- directory scans include sub-directories so no need
  to include them explicitly
- remove excluded (legacy) includes that no longer exist

Sync directory changes in the CMakeLists.txt (as noted in the comments)

Add content to the home page of the doxygen-generated HTML, and add a
Zephyr branding theme.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>

Fixes: #6773
2019-06-26 21:24:33 -04:00
David B. Kinder
3a16001cdd doc: simplify doc redirection messages
We have directives in conf.py to create redirect links for docs that
have been moved around because of content reorganization.  Reduce the
number of messages written out while debugging was going on and add some
comments to conf.py to explain how the directive works.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-06-26 12:43:23 -04:00
Carles Cufi
41f1f648f6 west: runners: Guess build folder
When using a build folder format with build.dir-fmt that includes any
parameters that need resolving, the west runners cannot find the folder
since the required information (board, source dir or app) is not
available.
Add a very simple heuristic to support the case where a build folder
starts with a hardcoded prefix (for example 'build/') and a single build
is present under that prefix.
The heuristic is gated behind a new configuration option:
build.guess-dir

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-06-26 11:50:26 -04:00
Nicolas Pitre
659fa0d57d lifo/fifo: first word is not always first 4 bytes
The first word is used as a pointer, meaning it is 64 bits on 64-bit
systems. To reserve it, it has to be either a pointer, a long, or an
intptr_t. Not an int nor an u32_t.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-06-26 09:08:42 -04:00
Marc
c790d5b498 Apply David's English corrections from code review
Co-Authored-By: David Kinder <david.b.kinder@intel.com>
2019-06-25 23:34:41 -04:00
Marc Herbert
3022fcecc6 doc: how to unset Clear Linux' CFLAGS and CXXFLAGS
Clear Linux exports to all users a list of "aggressive" compiler and
linker flags. Zephyr's CMake build system will either warn or fail
because of these. Add one magic command that solves the issue.

More background information at https://superuser.com/a/1452523/111302

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-06-25 23:34:41 -04:00
David B. Kinder
8de9cc7079 doc: use @rst/@endrst for ReST in headers
Folks found the use of @rststar/@endrststar non-intuitive (wanted to use
@rststart).  The "star" was there indicating the doxygen comment lines
had a leading asterisk that needed to be stripped, but since our
commenting convention is to use the leading asterisk on continuation
lines, the leading asterisk is always there.  So, change the doxygen
alias to the more expected @rst/@endrst.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-06-25 23:33:55 -04:00
Kumar Gala
95f28eb764 scripts/dts: Remove DT_CHOSEN generation
We never used DT_CHOSEN so lets remove this and add it back if/when
there's an actual need for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-25 08:43:58 -05:00
Charles E. Youse
3dc7c7a6ea drivers/interrupt_controller/mvic.c: remove MVIC interrupt controller
The Quark D2000 is the only x86 with an MVIC, and since support for
it has been dropped, the interrupt controller is orphaned. Removed.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-06-25 08:06:43 -04:00
Charles E. Youse
ca4910827b boards/x86/quark_d2000_crb: drop support for Quark D2000 dev board
Remove the board directory as well as references in tests and samples.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-06-25 08:06:43 -04:00
Ulf Magnusson
a570b40252 genrest: De-spam docs by skipping direct deps. in more places
Similar deal to commit cc14c40a2d ("kconfiglib: Unclutter symbol
strings, avoid redundant writes, misc.").

Hide the direct dependencies in the defaults, selects, and implies
sections. Do the same in menuconfig/guiconfig as well.

This uses a new Kconfiglib API, so update Kconfiglib to upstream
revision 164ef007a8. This also includes some minor optimizations and
cleanups.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-24 12:14:06 -07:00
Marcin Niestroj
a3b363e1ce doc: shell: document Ctrl+N and Ctrl+P meta-keys
Document bash and emacs-like way of navigating history in shell.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2019-06-24 07:17:53 -04:00
Anas Nashif
f2cb20c772 docs: fix misspelling across the tree
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-19 15:34:13 -05:00
David B. Kinder
db60d4919a doc: fix broken references to zephyr files
The zephyr-file role creates a link to the GitHub copy of a file.  Some
files have been moved so update the file references in the documentation
(found by scanning for uses of :zephyr-file:)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-06-18 16:01:55 -04:00
David B. Kinder
6b2cd29223 doc: fix misspellings in documentation
Fix misspellings and doc issues missed during regular reviews (including
some files without a trailing newline)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-06-18 15:08:19 -04:00
Carles Cufi
93e643c5fd doc: extensions: Default to 'all' in 'tool'
In order to expose west to the majority of users, default to 'all'
instead of 'cmake' in the 'tool' option. This means that, unless
otherwise specified, build instructions will be generated for both west
and cmake by default.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-06-17 10:09:57 -07:00
Carles Cufi
b476643695 doc: Cleanup references to cmake
Clean up some stray references to cmake in doc, boards and
samples that don't make explicit use of the zephyr app extension,
as well as other minor doc fixes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-06-17 10:09:57 -07:00
Carles Cufi
2670cd4ca1 doc: extensions: Refactor cmake build instructions generation
In order to simplify the current implementation and to prepare for a
change where we default to west as the standard build tool, partially
refactor the generation of cmake-based build instructions:

- Introduce `cd-into` as boolean flag that controls whether build
instructions are generated from the current working directory or from
inside the actual app folder. In the case of cmake, this includes
changing into the build folder to run ninja or make.

- Default to building from the current working directory, in the case of
cmake using the `-B` flag to create the build folder.

- Remove the usage of ZEPHYR_BASE with the `zephyr-app` option.
The option itslef is kept fsince it has semantic value, and a comment is
added when used.

- Consolidate the _generate_make and _generate_ninja functions into a
common code block inside _generate_cmake.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-06-17 10:09:57 -07:00
Marti Bolivar
ff443c1d23 docs: update west sign docs
Updates for recent changes.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-16 10:16:15 -04:00
Ulf Magnusson
a84ded74ea dts: Replace status = "ok" with status = "okay"
The DT spec. only has "okay" and not "ok". The Linux kernel has around
12k "okay"s and 300 "ok"s.

The scripts/dts scripts only check for "disabled", so should be safe re.
those at least.

The replacement was done with

    git ls-files | xargs sed -i 's/status\s*=\s*"ok"/status = "okay"/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-14 19:51:13 -05:00
Marti Bolivar
c98acc2a9a getting_started: changes for custom toolchains
This option uses a lot of typing, so point out there's a way to save
keystrokes using -C.

Tweak the language around the target toolchain.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-14 14:19:09 -04:00
Marti Bolivar
a506baf7f6 doc: clear up qemu + zephyr sdk interaction
Make it clearer that the note about setting QEMU_BIN_PATH only applies
if you've got the Zephyr SDK installed.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-14 14:19:09 -04:00
Marti Bolivar
5edb6d5def doc: unify documentation on setting environment variables
There are a few different places where alternatives for setting
environment variables are described. None of them is 100% complete, so
the results are likely to be confusing.

Make a single page on setting environment variables, how the zephyrrc
files work, how the zephyr-env scripts work, and some of the important
environment variables, with appropriate references elsewhere. (This is
inspired by the Arch wiki's excellent page on installing programs.)

Link to it from the getting started and application development pages
instead of repeating the information. This has the benefit of
shortening the getting started guide a bit more.

Add some concrete advice on checking the toolchain environment
variables in particular. This is a stumbling block for beginners.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-14 14:19:09 -04:00
Marti Bolivar
b587909427 doc: periodic updates to getting started guide
Updates based on discussion and changes in supported features.

- Make the guide shorter by removing content that's not relevant to
  most users who are truly just getting started, such as information
  about pre-LTS versions that did not support west, and by being more
  concise in some places.

- Decrease the number of colored boxes. At the latest TSC F2F, the
  "note / warning / note / tip" contents were identified as a
  readability problem.

- Add additional information based on new west features, like "west
  boards".

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-14 14:19:09 -04:00
Nicolas Pitre
3d51f7c266 k_stack: make it 64-bit compatible
The k_stack data type cannot be u32_t on a 64-bit system as it is
often used to store pointers. Let's define a dedicated type for stack
data values, namely stack_data_t, which can be adjusted accordingly.
For now it is defined to uintptr_t which is the integer type large
enough to hold a pointer, meaning it is equivalent to u32_t on 32-bit
systems and u64_t on 64-bit systems.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-06-14 05:46:29 -04:00
Ioannis Glaropoulos
d281e12569 doc: kernel: rework doc section of shared FP registers mode
This commit rewrites the documentation section describing
the Shared FP registers mode for Cortex-M to align with the
latest architecture rework of Shared FP mode.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-06-12 09:17:45 -07:00
Anas Nashif
240c516316 doc: generate documentation of ifdef`ed APIs
Enable generation of doxygen documentation for kernel APIs that are
behind Kconfig options and add a note about the option needed to enable
the APIs.

Enable both CONFIG_SCHED_CPU_MASK and CONFIG_SCHED_DEADLINE in doxygen
config file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-10 19:37:29 -04:00
Carles Cufi
98980c6b7c west: build: Configurable build folder format
Add the possibility of configuring the build folder format in west's
configuration system.
The build.dir-fmt configuration option controls how west will create
build folders when not specified, the following parameters are currently
accepted:

- board: The board name
- source_dir: The relative path from CWD to the source directory
- app: The name of the source directory

If CWD is below source_dir in the directory hierarchy then source_dir is
set to an empty string.

This means that if one sets:

[build]
dir-fmt = build/{board}/{source_dir}

Then when building samples/hello_world from zephyr's root for the
reel_board the build folder will be:

./build/reel_board/samples/hello_world

but when building it from inside the samples/hello_world folder it will
instead be:

./build/reel_board

Fixes https://github.com/zephyrproject-rtos/west/issues/124

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-11 00:00:34 +02:00
Andrew Boie
9354bb5af9 doc: fix coverage report documentation
This had numerous problems, but should now be working
end-to-end and produce correct reports with gcovr 4.1.
Use of sanitycheck is now much clearer.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-06-07 14:15:16 -07:00
Ulf Magnusson
e36e544cab genrest: Mention that dependencies are only propagated to 'depends on'
A recent Kconfiglib change turns

    config A
            bool
            prompt "foo" if C && D
            default A if B && C && D
            depends on C && D

into

    config A
            bool "foo"
            default A if B
            depends on C && D

Where e.g. D might be from a surrounding menu/if.

Update the note at the end of symbol pages to clarify that only the
'depends on' includes propagated dependencies.

Piggyback some minor cleanup.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-07 18:20:22 +02:00
Alberto Escolar Piedras
69de620e7e doc: Remove API labels
The API label does not exist anymore. Remove mentions of it
from the documentation.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-06-07 09:17:20 +02:00
Anas Nashif
b8e7d438d5 doc: remove .html from redirect entries
No need for .html at the end of the url in redirect map.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-06 20:50:15 -04:00
David B. Kinder
aa9b602e00 doc: add google analytics tracking to docs
This adds code to each page needed for gathering google analytics
tracking data to the LF-provided Global site tag.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-06-06 20:29:07 -04:00
Anas Nashif
6ecbe713b5 doc: redirect old board pages to new location
Redirect old style board pages to old stype URL with board name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-06 15:38:09 -04:00
Andrzej Puzdrowski
f74cebba34 doc/reference/storage/settings: storage behavior description
Elaborated on storage mechanism usage and key-value version
garbage collection.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-06-05 13:43:00 +02:00
Andrei Gansari
a658cf1536 doc: lpclink2 firmware reference
Documentation updated, added reference to the latest
LPClink2 firmware, default provided firmware may not
work on latest boards (e.g. LPC55xx).

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2019-06-03 15:49:35 -05:00
Ulf Magnusson
baf38e9cb8 doc: Add guiconfig documentation
Add documentation for the new GUI configuration interface in the
Application Development guide.

Also update all the images, touch up the language a bit, and tweak some
minor stuff:

 - Say *.conf instead of .conf to make it clearer that .conf isn't the
   literal name

 - Add a missing -D<board> argument when running cmake

 - Use figure:: instead of image::. Comes out left-aligned and with
   space between the images, which looks nicer.

 - Explain what '- -' and '-*-' means in the terminal menuconfig.

tkinter isn't included by default in many Python installations, despite
being part of the Python standard library, so also add the required
packages to the Development Environment Setup section of the manual. Add
a note to the Application Development section as well, to help
debugging.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-05-30 09:54:06 -04:00
Ulf Magnusson
6cfc13522c menuconfig: Small Space/Enter improvement + fix for obscure bug
Update menuconfig (and Kconfiglib, just to sync) to upstream revision
7e0b9f7ae1, to get these commits in:

  menuconfig: Improve space/enter behavior slightly

  Space toggles value is possible, and enters menus otherwise. Enter
  works the other way around.

  Make this explicit in the code, which also fixes some corner cases,
  like space doing nothing on a y-selected menuconfig symbol.

  -------------------------------------------------------------------

  menuconfig: Fix display issue for unsatisfied-deps selected symbol
  with children

  A symbol with unsatisfied direct dependencies can end up with visible
  children in an implicit submenu if it is selected (though that
  generates a warning), so the optimization in _shown_nodes() isn't
  safe, and causes the child nodes to not be shown outside show-all
  mode.

  Just remove the optimization. Trying things out some more,
  everything's plenty fast enough anyway.

  Checking the direct dependencies of the parent instead would be safe.

The menu path now says "(Top)" instead of "(top menu)" too, which is a
bit more compact. Make the same change in genrest.py.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-05-30 09:54:06 -04:00
David B. Kinder
cfa08fbb48 doc: fix devicetree doc formatting
The directory tree description was missing a code-block shorthand so the
following lines weren't formatted correctly.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-30 09:30:33 -04:00
Krzysztof Chruscinski
a211afb041 logging: Add option to detect missed transient string duplication
Added CONFIG_LOG_DETECT_MISSED_STRDUP (by default on) which enables
scanning of log message strings in search for %s and reports if
string address is not from strdup buffer pool and outside read only
memory section which indicates that log_strdup() wrapping is missing

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-05-29 13:52:31 +02:00
Andrei Emeltchenko
4d2b7f613f doc: usb: Remove old API documentation
Fix documentation build removing old API tags.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Carles Cufi
f5f1b22c5a doc: CMake: Locate Python executable before processing modules
The module processing logic in Zephyr requires Python, since it uses a
Python script to locate and process the modules. It is therefore
required to find the Python executable using CMake before actually
including the CMake script that processes the modules. In order to
prevent this from happening again, move the inclusion of version.cmake
as well in case that script chooses to use Python in the future.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-05-24 11:05:04 +02:00
Carles Cufi
b73790b629 cmake: Fix path handling for ZEPHYR_BASE
With the addition of a local CMake variable ZEPHYR_BASE that mirrors the
value of the environment variable the documentation build broke on
Windows. This is because CMake was incorrectly interpreting backslashes
present in the Windows path as escaping characters. In order to avoid
this, use CMake's built-in file(TO_CMAKE_PATH) functionality, which
converts the path to a canonical version using forward slashes only.
At the same time rework boilerplate.cmake to use the same mechanism
instead of manually replacing backslashes and removing trailing ones.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-05-24 11:05:04 +02:00
Ulf Magnusson
fde86da6f5 doc: kconfig: Fix typo in documentation for 'optional' on choices
Like for other choices, it's the prompt that gets displayed within the
parentheses, not the symbol name.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-05-23 20:34:54 -04:00
Ulf Magnusson
e5cca102a5 doc: kconfig: Encourage dropping 'Enable ...' from most prompts
Usually, it's clear from context, and it makes things consistent.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-05-23 20:34:54 -04:00
Ulf Magnusson
3e69a0e465 doc: kconfig: Explain the 'menuconfig' keyword and good uses for it
Takes a while to figure out what it's there for, so explain what it does
and give an example of a good use for it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-05-23 20:34:54 -04:00
Ulf Magnusson
7c8bcf0772 doc: kconfig: Clarify that 'depends on' works for string/int/hex
Seems people are a bit hazy on this, so explain how it works.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-05-23 20:34:54 -04:00
Jukka Rissanen
ecac10cb47 net: shell: Refactor help information for ping command
Do not always print general help for ping cmd. Only if user supplies
'-h' or '--help' command, print information about the parameters.
After this the generated HTML documentation looks better for the
ping command.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-05-23 22:12:23 +03:00
Jacob Siverskog
d145263691 doc: dfu: Fix module links
Link modules to their respective code directory.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2019-05-22 12:41:09 -04:00
Anas Nashif
4a5751226c qmsi: move to a zephyr module
Adds https://github.com/zephyrproject-rtos/hal_qmsi as a module managed
by west.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-22 09:28:56 -04:00
Anas Nashif
2f126bb51f doc: document submitting changes to modules
Instructions for submitting changes to modules and how they will be
integrated with the main tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-21 21:45:00 -04:00
Anas Nashif
9d3be3720a doc: move module related doc to guides
Move to a new guide which will expand on how to submit modules and how
to maintain them.

Also move topology documentation to repository management section where
it fits better.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-21 21:45:00 -04:00
David B. Kinder
cd6ba94bd4 doc: add references to builds mailing list
builds@lists.zephyrproject.org archives the CI build results for every
and nightly build.  Add references to this in the contribution
guidelines and introduction (pulled from README).

Also added a reference to the "Asking for Help" doc (there was a note to
add this once that doc was merged).

Fixes: #15652

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-21 21:40:20 -04:00
Anas Nashif
21e964ec99 doc: guide for optimizing zephyr
Add section about how to optimize Zephyr for footprint.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-21 14:58:41 -04:00
Ulf Magnusson
605a390633 doc: kconfig: Fix accidental SPDX-License-Identifier in generated doc
RST uses '..' for comments, not '#'. The license line currently shows up
on https://docs.zephyrproject.org/latest/guides/kconfig/index.html

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-05-18 12:13:17 -05:00
Marti Bolivar
6cb8e3ec53 doc: move sign command docs before catch-all page
The current order makes no sense. Move it earlier in the order, so the
catch-all page appears last.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-16 13:49:10 +02:00
Marti Bolivar
64c6a10bd1 doc: updates to west multi-repo docs
Minor updates.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-16 13:49:10 +02:00
Marti Bolivar
90276c28cd doc: updates for west installation docs
Grammar and formatting improvements, as well as changes requested in
review that weren't made (in particular, the ones recommending using
"pip3 show -f west" to see where west is installed instead of listing
common places that might not be right.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-16 13:49:10 +02:00
Carles Cufi
bedfcf4d1b doc: coding style: Expand the list of keywords with braces
Zephyr requires braces on every code block that a keyword introduces, so
list the complete set in the documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-05-15 13:25:10 -05:00
Marti Bolivar
f3d1386ae8 doc: save ZEPHYR_BASE in more places where it's needed
This fixes a corner case.

The ZEPHYR_BASE variable might be set in the environment at generation
time, but unset at build time. Save it in the cmake -E env calls to
scripts that need it.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-12 15:14:16 -04:00
Carles Cufi
9cea26ae77 doc: west: Document west installation in-depth
Create a new dedicated section for west installation that details
some of the finer aspects of the process and steps involved.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-05-10 13:08:27 +02:00
Carles Cufi
66fdd48fdd west: Add completion command
Add a completion command that dumps the contents of a shell
completion file present in the zephyr repository.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-05-10 13:08:27 +02:00
Marcin Szymczyk
e5cbe6a9e7 usb: cdc: Add unique PIDs for each sample
Unique PID is required for each sample in order
to be recognized by host.

When creating a new sample:
- Add USB_PID_<SAMPLE_NAME>_SAMPLE
  in samples/subsys/usb/usb_pid.Kconfig
- Create Kconfig file in your sample's subdirectory, containing:
  config USB_DEVICE_PID
	default USB_PID_<SAMPLE_NAME>_SAMPLE

  source "Kconfig.zephyr"

Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
2019-05-09 08:20:34 -04:00
David B. Kinder
c5112327a7 doc: fix mentions of Wi-Fi trademark name
The approved trademark name is Wi-Fi so update references to WiFi and
other spellings to Wi-Fi in documentation and Kconfig help strings.
(Note that use of spelling variatios of "wifi" in module names, CONFIG
names, link names and such are untouched.)

https://www.wi-fi.org/

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-06 20:10:59 -04:00
Marti Bolivar
3696eccc1a doc: fix west boards tip
Doc fix for an unaddressed review comment from when the feature was
first merged.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-06 16:30:05 -04:00
Marti Bolivar
83a5fd8d4c scripts: make west build -h fit on a screen
The west build --help output no longer fits in a single page.  Move
details and examples into the documentation, so the -h output doesn't
require scrolling around.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-06 16:30:05 -04:00
Marti Bolivar
bbe890ab30 scripts: add build.generator config option for west build
This can be used to override the default CMake generator
permanently. Its values are the same as those acceptable to cmake's -G
option.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-06 16:30:05 -04:00
Marti Bolivar
81e005f4d5 doc: re-word and extend west build documentation
Try to make the language simpler. Introduce each example with a
paragraph that says "To <DO XYZ>" to make them easier to find.

Move the config options to the documentation for that command to make
them easier to find.

Add some more examples for use cases we've gotten questions about.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-06 16:30:05 -04:00
Marti Bolivar
88fb8bacfb scripts: improve west build's board handling
- Respect the BOARD environment setting.
- Don't require --force if the board can't be figured out: it might be
  set in CMakeLists.txt, for example. Instead, downgrade to a warning
  which can be disabled with "west config build.board_warn false".
- Add a build.board configuration option used as a final BOARD fallback
  after CACHED_BOARD (in the CMake cache), --board (command line), and
  BOARD (environment).
- Keep the config docs up to date.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-05-06 16:30:05 -04:00
Carles Cufi
d6f033e690 west: Add a boards command
Add a new "boards" command that is able to list all the boards in the
upstream tree. There is currently no support for out-of-tree boards.

The command executes cmake to use the built-in CMake script,
boards.cmake, to list the boards, and then stores the information
retrieved and allows the user to present it in a user-definable format.

Fixes https://github.com/zephyrproject-rtos/west/issues/53

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-05-03 21:55:13 +02:00
Ioannis Glaropoulos
1a2ef42973 arch: arm: remove FP activation in system boot
This commit removes the activation of the FP context
in ARM system boot. There is no need to do this, since
the FP context will be activated in the presence of
floating point instructions. We update the reference
documentation accordingly.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-03 14:25:22 -04:00
Oleg Zhurakivskyy
b54f1a949a doc/getting_started: mention ZEPHYR_TOOLCHAIN_VARIANT=llvm
Mention that host installed clang can be used for native_posix.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-04-30 09:33:54 -04:00
Krzysztof Chruscinski
7e26f53470 shell: Add macros for creating conditional commands
Added macros which can be used to create a command which depends
on compilation flag. Macros are a cleaner alternative to #ifdefs
around command registration and command handler.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-04-28 13:31:34 -04:00
François Delawarde
94451b22fc subsys/settings: Allow to register custom backends in settings subsystem
Major changes are:
- Expose settings backend API to enable custom backend support.
- Add a new CONFIG_SETTINGS_CUSTOM backend to allow registering a custom
backend.
- Change api of the handlers h_set() routines to allow for
backend-specific read callbacks.
- Provide a customizable settings_backend_init() routine for custom
backends.
- Move runtime settings support to be its own backend.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-04-26 11:24:31 +03:00
Benjamin Valentin
812b999731 net: shell: Improve the output of the ping function
Report rtt, ttl and rssi if available.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-04-26 09:05:14 +03:00
Jacob Siverskog
15333eb391 doc: dfu: Fix mcuboot reference
The previous mcuboot reference didn't make sense - it linked to
itself. Linking to the official website should be more useful.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2019-04-25 09:07:15 -07:00
Carles Cufi
3a88dce9c5 scripts: west: Run pristine.cmake directly instead of the target
When making a build folder pristine until now we were running the
'pristine' build target. The issue with that is that ninja/make or
whatever build tool is being used might decide to re-run CMake itself if
some of the dependencies have changes. This might trigger an error that
is unfriendly and unnecessary, since the user is explicitly asking for
the build folder to be wiped before starting a fresh build.
To avoid this issue restor to running directly the CMake script that the
'pristine' build target itself uses, so as to make sure that the build
folder is wiped unconditionally regardless of changes made to the tree.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-23 13:24:41 -07:00
Georgij Cernysiov
c41320eb82 doc: guides: debugging: probes: correct J-Link usage
Corrects information regarding J-Link usage with ST-Link.

Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-19 13:56:28 -05:00
Antony Pavlov
74be380fa4 doc: application: fix duplicated word
The word 'entries' was duplicated.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2019-04-19 08:19:59 -04:00
Carles Cufi
d9f53455e5 doc: extract_content: Allow for absolute paths in deps
The dependencies in the scripts are figures, images, includes or literal
includes. Typically those dependencies are placed relative to the .rst
file that is being copied, but in some instances you might want them to
refer to an absolute path which, in fact, is relative to Sphinx's
top-level source directory. In this case, and as long as the top-level
source directory is provided, do not emit a warning.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-18 17:52:49 -04:00
Marti Bolivar
1e6f4bd1f6 doc: guides: add "Asking for Help" guide
I often wish I had a short and Zephyr-specific place to point people
to when they're asking for help in ways that make it hard to help
them.

Add one.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-04-18 16:46:37 -04:00
Ulf Magnusson
60c395024f genrest: Include all parents in menu paths
Previously, symbols not defined with 'menuconfig' with children weren't
listed in the children's menu paths. It was deliberate, but it's
probably an anti-feature in retrospect, because it can make it harder to
find stuff by following the menu path.

Don't try to be clever and just list all the parent nodes in the menu
path.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-18 08:47:15 -04:00
Sebastian Bøe
397abd41c8 cmake: DT: Add support for out-of-tree binding root directories
Just like board's can be placed in out-of-tree BOARD_ROOT's, we now
support DeviceTree sources and bindings being placed in out-of-tree
DTS_ROOT's.

This required for out-of-tree drivers that use DeviceTree.

To implement this we get rid of various user-settable CMake variables
like DTS_APP_BINDINGS, DTS_APP_INCLUDE, and instead have ZEPHYR_BASE,
APPLICATION_SOURCE_DIR and out-of-tree directories conform to using
the same DTS_ROOT concept and directory structure.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-04-17 16:25:41 -05:00
Carles Cufi
b7c75915e0 west: build: Add new pristine cmd-line and config option
Add a new command-line and build config option, `pristine`, that the
user can pass to `west build` or set in its configuration file(s) in
order to automatically trigger a pristine build on every build or
whenever west considers it required.

The option can take the following values:

- never: Never run the target
- always: Always run the pristine target before building
- auto: Run the pristine target when required

With `auto`, the pristine target will be run when running
west with an existing build folder containing a build system and:

- Selecting a different board from the one currently in the build system
- Selecting a different application from the one currently in the build
  system

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-17 10:02:46 -04:00
Alberto Escolar Piedras
0eec5dba53 doc: labels: Add links to feature process
Added a few links in the labels description section
to the feature process section.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-04-17 09:39:44 -04:00
David B. Kinder
9d04f03bab doc: add missing doc top labels
All docs should have a label at the top that would
permit cross-document linking via :ref:`labelname`.

Update "testing" label that would have conflicted and fix the only
reference to the old "testing" label in development process
documentation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-16 18:11:30 -04:00
Kumar Gala
cdf55d813b doc: changes for 1.14 documentaiton release
Doc changes listed in the release checklist (#9898)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-16 14:48:23 -05:00
Kumar Gala
db8d32881f doc: releases: Add device tree related changes
Add items on major changes related to device tree usage in this release.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-16 12:38:59 -05:00
David B. Kinder
7848215334 doc: review edits on 1.14 release notes
Clean up accumulated release notes with (final) clarity edits, spell
check, and such.  Remove "Working Draft" from the heading.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-15 18:13:07 -04:00
Anas Nashif
c0abb410ce release: add more highlights from the kernel
Update with more kernel highlights.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-15 14:02:22 -04:00
Andy Ross
c5b2aad94f doc: More kernel release notes for 1.14
Add notes on timer, SMP and x86_64

Signed-off-by: Andy Ross <andy@ajross-mobl.jf.intel.com>
2019-04-15 12:52:38 -04:00
Anas Nashif
802098dca3 release: add list of fixed bugs
Add list of fixed bugs to release notes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-15 11:14:38 -04:00
Anas Nashif
06ab394f05 release: rework release notes, add highlights
Reformat notes and add highlights.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-14 17:08:54 -04:00
Torsten Rasmussen
10327e59c6 doc: Add to 1.14 release notes zephyr modules
Added information to release notes about Zephyr modules which allow for
splitting ext/ into multi-repo instead using Zephyr modules.

Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
2019-04-13 08:45:04 -04:00
Flavio Ceolin
d1176d1789 doc: relnotes: add notes about MISRA-C
Update release notes with MISRA-C info.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-04-13 08:00:19 -04:00
Andrew Boie
5d6aaeb88b doc: relnotes: add notes for x86 and userspace
Update release notes for changes in 1.14.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-13 07:59:53 -04:00
Sebastian Bøe
c15545d4d4 doc: relnotes: 1.14 Build and Infrastructure release notes
Add more release notes for the build system for version 1.14.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-04-12 17:58:18 -04:00
Ioannis Glaropoulos
7f478a5d29 doc: guides: porting: fix nRF51 Cortex-m core
nRF51xx SoCs have an ARM Cortex-M0 core, not an ARM Cortex-M0+.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-12 10:28:02 -05:00
Robert Lubos
a886a28450 doc: relnotes: 1.14 nrf 802.15.4 radio driver update
nRF 802.15.4 radio driver was updated, hence mention it in release
notes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-04-12 10:08:05 -04:00
David B. Kinder
f38aa2e301 doc: improve visibility of doc version menu
Move the doc version selection menu from the bottom of the left nav menu
to above the TOC menu, making it more obvious.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-12 09:37:15 -04:00
Andrzej Głąbek
4438c1a5fe doc: relnotes: 1.14 add a few more drivers related release notes
Add more drivers related release notes for version 1.14.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-04-12 08:29:06 -04:00
Anas Nashif
a942fcc23e doc: release notes cleanup
Added ARC related changed and cleaned up bullets.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-11 23:57:12 -04:00
Krzysztof Chruscinski
aa9f0ec2fa doc: relnotes: 1.14 logging, shell, ring_buf and drivers release notes
Added release notes for 1.14 release.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-11 17:51:21 -04:00
Maureen Helm
dd7ccd590d doc: releases: Add drivers to 1.14 release notes
Adds new and significantly modified drivers to the 1.14 release notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-04-11 17:49:40 -04:00
Maureen Helm
720ce48e2f doc: releases: Add Arm, RISC-V, and shield boards to 1.14 release notes
Adds all the new Arm, RISC-V, and shield boards to the 1.14 release
notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-04-11 17:49:40 -04:00
Johan Hedberg
44bfefce14 doc: relnotes: 1.14 Bluetooth Host release notes
Add major changes for Bluetooth Host since 1.13.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-04-11 10:40:57 -04:00
Carles Cufi
d3f56d60dc doc: relnotes: 1.14 Bluetooth Controller release notes
Add the relevant release notes for the Bluetooth Controller for version
1.14.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-11 10:40:57 -04:00
Ioannis Glaropoulos
7886d50f2c doc: relnotes: 1.14 arm arch release notes
Release notes entries for ARM architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-11 10:40:31 -04:00
Ioannis Glaropoulos
3e61917254 doc: relnotes: 1.14 arm SoC/Boards release notes
Release notes entries for ARM SoC and Board support.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-11 10:40:31 -04:00
Andrzej Puzdrowski
e015661b94 doc: relnotes: 1.14 update documentation improvement patagtaph
Update the relevant release notes for the documentation improvement
for version 1.14.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-11 10:38:45 -04:00
Andrzej Puzdrowski
b607d48031 doc: relnotes: 1.14 nRF5 flash driver release notes
Add the relevant release notes for the nRF flash driver for version
1.14.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-11 10:38:45 -04:00
Andrzej Puzdrowski
480c5d00f2 doc: relnotes: 1.14 settings release notes
Add the relevant release notes for the settings for version
1.14.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-11 10:38:45 -04:00
Andrzej Puzdrowski
5e52d3a11d doc: relnotes: 1.14 flash_map release notes
Add the relevant release notes for the flash_map for version
1.14.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-11 10:38:45 -04:00
David B. Kinder
9fff548c88 doc: add orphaned crypto docs
tinycrypt documentation wasn't included in the table of contents so add
it into the guides section.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-11 08:08:28 -04:00
Johan Hedberg
91139c1534 doc: bluetooth: Clarify notes about blocking in the RX thread
Callbacks called from the RX thread may block, but should avoid doing
it for long periods of time.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-04-10 17:43:55 -04:00
Johan Hedberg
c5e826e8ff doc: bluetooth: Move L2CAP text from to API reference section
Move the L2CAP text from the guides section to the API reference
section.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-04-10 17:43:55 -04:00
Johan Hedberg
bf31fbd789 doc: bluetooth: Move GATT text to API reference section
Move the GATT text from the guides section to the API reference.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-04-10 17:43:55 -04:00
Johan Hedberg
d34128a97b doc: bluetooth: Add reference to Mesh API section
Add a reference from the architecture guide to the Mesh API section.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-04-10 17:43:55 -04:00
Johan Hedberg
eb46f47a8d doc: bluetooth: Fix text corruption
For some reason there were garbage characters at the end of the line.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-04-10 17:43:55 -04:00
Johan Hedberg
83b443aa2d doc: bluetooth: Move connection management text to API reference
Move the connection management text from the Guides section to the API
reference section.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-04-10 17:43:55 -04:00
Alberto Escolar Piedras
6a70f397ff doc: Reorganize development model section
Renamed the page "review_process.rst" to "dev_env_and_tools.rst"
as the old name did not cover all its content.
Moved the labels page content into this
"Developemnt Environment and Tools" page.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-04-10 12:58:43 -04:00
Alberto Escolar Piedras
ee194c375a doc: dev_process: Add description about GH labels usage
There has been some confusion about how GitHub labels
should be used.
This commit adds a new doc page, which tries to clarify this.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-04-10 12:58:43 -04:00
Alberto Escolar Piedras
1923a04ff0 doc: Add to 1.14 release notes native_posix and nrf52_bsim changes
Added information to the release notes about the new drivers
in native_posix, the new nrf52_bsim board and the BabbleSim
integration in CI and testcases.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-04-10 12:41:51 -04:00
David B. Kinder
2e5172dab7 doc: update 1.14 release notes with doc changes
Update 1.14 draft release notes with doc changes.  Also edited existing
release notes material to make sentence tense consistent (past tense).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-10 07:37:04 -04:00
Anas Nashif
ceca823b59 doc: remove references to IRC
Remove references to IRC and mention Slack instead.

Fixes #15266

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-09 07:53:31 -04:00
Piotr Mienkowski
d38ffedd4d doc: add example of how to build MCUBoot app with west
This commit extends existing documentation by providing an example
of how to build Hello World sample application for MCUboot using
west.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-04-08 19:37:39 -04:00
Anas Nashif
15ca53dbba doc: development process: feature tracking
Add section about adding features and feature tracking.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-08 19:00:12 -04:00
Anas Nashif
7946b88c2d doc: remove outdated and wrong merge-window description
This picture was wrong and outdated describing an old process we used to
have.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-08 19:00:12 -04:00
Anas Nashif
318a98a7fb doc: fix ztest code samples
Remove extra commas and close brackets in code samples.

Fixes #14098

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 12:22:00 -04:00
Anas Nashif
3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
David B. Kinder
b379030724 doc: tweak index and release notes index for 1.14
Update the release notes page to include the 1.14 release notes
(currently a draft in progress), and update the main index page to
clarify how to get to documentation for other Zephyr versions.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-05 14:49:19 -04:00
Andy Gross
122eb7b647 doc: release-notes: Add security vulnerabilities
This patch adds information about the security vulnerabilities being
fixed in the 1.14 release.

Add a intro statement that these issues were addressed,
and include x86 vulnerabilities addressed in this release.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2019-04-04 22:31:28 -04:00
Marti Bolivar
7eca2568bd doc: additional clarifications on west
Add a missing reference to how west is used to set ZEPHYR_MODULES in
without-west.rst, augmenting the application development guide a bit
to include this in the list of important variables, cleaning that up a
bit while we are here and adding some more west details.

Add a big fat warning in the getting started guide that using Zephyr
without west is not for the faint of heart.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-04-04 08:32:15 -04:00
Erwan Gouriou
4fd9d89d51 doc/guides/debugging: Add node for openocd support on windows
Add a note to mention how to get openocd working on windows.
This is taken from stlink-v21.rst file before its reformatting.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-02 11:09:22 -04:00
Erwan Gouriou
09482207b7 doc/guides: debugging: Add ST-Link to probes
Add ST-Link chapter in probes page and reference in host-tool
openocd section.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-02 11:09:22 -04:00
Maureen Helm
3854f23acf doc: boards: Edit nxp board and debug probe docs
Incorporates minor documentation edits recommended by David Kinder after
PR #14000 was merged.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-04-02 05:36:45 +08:00
Alberto Escolar Piedras
52f6f6b960 doc: API lifecycle: Require creating a issue to track removal
As discussed in the TSC meeting of 2019/03/27:
To ensure that we do not forget to remove an API 2 releases later
and to provide a bit better visibility about when the removal
is planned, require that a GH issue be created, and that this
issue be added to the roadmap for the apropriate release.

As a free bonus:
Removed a redundant line in the list and added one missing article.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-03-31 17:14:56 -04:00
Carles Cufi
c6249aca18 doc: Enable undef warnings in Kconfig
When generating the Kconfig reference documentation, enable the warnings
for undefined Kconfig options in order to make sure all references are
met.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-29 23:10:59 -04:00
Carles Cufi
1aa4d8d09c doc: Process zephyr modules to parse all of Kconfig
In order to parse all the Kconfig files that make up the whole Kconfig
tree we need to process the modules, since this can optionally provide
Kconfig files. In order to do so, include the modules CMake file so that
they are listed and a Kconfig.modules is generated.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-29 23:10:59 -04:00
Maureen Helm
dfd779c380 doc: tools: Remove opensda page
This page has been replaced by doc/guides/debugging/probes.rst and
doc/guides/debugging/host-tools.rst

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-03-29 22:50:44 -04:00
Maureen Helm
97448fe22f doc: debugging: Introduce guide covering debug probes and host tools
Zephyr boards use a wide range of debug probes and debug host tools that
can often be confusing to users. Introduce a new debugging guide that
documents all the different variations of debug probes and host tools in
one place, including which combinations are valid.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-03-29 22:50:44 -04:00
Andrzej Puzdrowski
4a8e4de0f1 doc: documentation of flash_area and flash_map
Initial documentation.

fixes #14789

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-03-29 22:20:43 -04:00
Ramakrishna Pallala
5049694a20 doc: Add documentation for file system subsystem
Add documentation for file system subsystem.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2019-03-29 09:38:33 -04:00
Marti Bolivar
d3bb3cfd7a doc: west: add missing parts for zephyr v1.14
- add glossary terms for important concepts we have to explain often,
  like "west installation"

- add autodoc directives for pulling in west API docs

- add missing documentation for built-in features like west's
  configuration, extension commands, etc.

- add missing documentation for "west sign" extension

- describe the manifest in a self-contained way rather than linking to
  the relevant pykwalify schema, also adding a missing reference to
  "west manifest" in the miscellaneous multi-repo commands list

- move various details regarding history and motivation to why.rst
  among other changes to repo-tool.rst, leaving it closer to a "tell
  me what I really need to know" style overview

- update planned features

Fixes: #14992
Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-03-29 11:24:32 +01:00
Marti Bolivar
cd795195d5 doc: fix parallel builds
Several of our extensions don't declare they are parallel read or
write safe. Upon inspection, they are.

Not declaring parallel read safety defeats a lot of the speed ups that
are possible when using SPHINXOPTS="-j=auto", so mark the extensions
safe and get the performance back.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-03-29 11:24:32 +01:00
Erwan Gouriou
45962cbe33 doc: dts: Remove orphan section
'orphan:' appears before Flash Partitions section on
https://docs.zephyrproject.org/latest/guides/dts/index.html page.
Fix this

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-03-29 04:56:21 -05:00
Kumar Gala
c6cce7a42e doc: Update release_process to clarify about GitHub tagging
Add a note in the tagging section of the release process that explains
why using GitHub release process for tags should NOT be done.

Fixes #14985

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-03-29 10:36:01 +01:00
Ulf Magnusson
a449c98db2 scripts: Fix risky uses of non-raw regex strings in Python scripts
Fixes pylint warnings like this one:

    doc/conf.py:325:0: W1401: Anomalous backslash in string: '\s'.
    String constant might be missing an r prefix.
    (anomalous-backslash-in-string)

The reason for this warning is that backslash escapes are interpreted in
non-raw (non-r-prefixed) strings. For example, '\a' and r'\a' are not
the same string (first one has a single ASCII bell character, second one
has two characters).

It just happens that there's no \s (or \., or \/) escape for example,
and '\s' turns into two characters (as needed for a regex). It's risky
to rely on stuff like that regexes though. Best to make them raw strings
unless they're super trivial.

Also note that '\s' and '\\s' turn into the same string.

Another tip: A literal ' can be put into a string with "blah'blah"
instead of 'blah\'blah'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 14:41:32 -05:00
Ulf Magnusson
d5b0bd14e3 scripts: Remove unused imports in all Python scripts
Discovered with pylint3.

Upstream open-amp PR: https://github.com/OpenAMP/open-amp/pull/168

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 11:06:20 -05:00
Ulf Magnusson
12ba9dfa52 scripts: Remove unused variables in all Python scripts
Discovered with pylint3.

Use the placeholder name '_' for unproblematic unused variables. It's
what I'm used to, and pylint knows not to flag it.

Python tip:

    for i in range(n):
        some_list.append(0)

can be replaced with

    some_list += n*[0]

Similarly, 3*'\t' gives '\t\t\t'.

(Relevant here because pylint flagged the loop index as unused.)

To do integer division in Python 3, use // instead of /.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 11:06:20 -05:00
Ulf Magnusson
eebce9d0e5 logging: doc: Remove SYS_LOG-related documentation
Replaced by the new CONFIG_LOG system.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 09:30:29 -04:00
Sebastian Bøe
7061c035cd kconfig: Move Kconfig.modules to the root build directory
Currently, the Kconfig.modules file is placed in the build directory
relative to the CMake "project". But technically, the file is not
project-specific, but global, or build-directory specific.

So we move it up one level to the CMAKE_BINARY_DIR instead. Currently,
there is only one project, so this change has no effect, but this
enables us to have multiple projects in the future, which again
enables multi-image builds.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2019-03-28 09:23:02 -04:00
David B. Kinder
5d8e367efe doc: fix misspelling in docs and API comments
Fix misspellings missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-27 15:59:09 -04:00
Jukka Rissanen
5378672d8a doc: net: Fix networking overview document
Add references to external documents like RFCs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-27 09:59:48 -05:00
Jukka Rissanen
1564e205e0 doc: net: Minor fixes to BSD socket documentation
Some clarifications to BSD socket descriptions. Also added
rendering hints for some strings.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-27 08:37:39 -04:00
Thomas Ebert Hansen
d83f926c38 doc: security: Change link to development model.
The development model docs are now part of the technical docs.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
2203489f6d doc: security: Update embargo period
The embargo period is 60 days.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
eb34b86fe5 doc: security: Correct indentation
Use similar indentation as the other bullet points above.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
bb881d2d9d doc: security: Update Security Group definition
Rewrite who the members of the Security Group are
and move the 'ability' of the members to an outer
bullet point.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
f1ad50f85a doc: security: Reword unintelligible sentences
The sentence "To process process documentation." does not make
any sense at all.

Add missing "the" to the sentence "in form of".

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
7166e35487 doc: security: Correct statement about Coverity
Remove statement that static code analysis is planned for the future.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
0f0103e0b1 doc: security: Unify citations
Use similar style for citations.
Add online references where applicable.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
c9fec3ca7d doc: security: Fix section reference
Replace reference to Chapter 4 with Secure Design section.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Thomas Ebert Hansen
33d1067d25 doc: security: Unify name of security subcommittee
Use the term 'Zephyr Security Subcommittee' where applicable.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2019-03-26 22:21:59 -04:00
Piotr Mienkowski
1b66d900a8 doc: update power management subystem documentation
This commit brings power management subystem documentation up to date
with the implementation. The main changes since the last time the
documentation was updated include introduction of power managment
policies.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-03-26 13:27:55 -04:00
Piotr Mienkowski
204311d004 power: rename Low Power States to Sleep States
There exists SoCs, e.g. STM32L4, where one of the low power modes
reduces CPU frequency and supply voltage but does not stop the CPU. Such
power modes are currently not supported by Zephyr.

To facilitate adding support for such class of power modes in the future
and to ensure the naming convention makes it clear that the currently
supported power modes stop the CPU this commit renames Low Power States
to Slep States and updates the documentation.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-03-26 13:27:55 -04:00
Anas Nashif
21de8733c6 doc: move usermode under references
Move usermode documentation to be under api reference and not under
kernel.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-26 09:50:16 -04:00
Ulf Magnusson
ba312fe844 scripts: Remove unnecessary () around if/while conditions in Python
Not needed in Python. Detected by check C0325 in pylint3.

Also replace an

  if len(tag):

with just

  if tag:

Empty strings, byte strings, lists, etc., are falsy in Python.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-26 07:59:59 -05:00
Ulf Magnusson
0eee1f699b doc: conf.py: Fix spacing typos
These are probably not deliberate. Fixes some pylint warnings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-26 07:59:33 -05:00
Ulf Magnusson
5c8fd84d12 scripts: Remove extra trailing newlines from Python scripts
Fixing all instances so that it can be flagged in a pylint CI check
later.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-26 07:53:08 -05:00
Ulf Magnusson
9822b1dd1b doc: application.py: Remove unused _mkdir() 'compact' parameter
Found with pylint.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-26 07:49:35 -05:00
Ulf Magnusson
0aeba398fb doc: fix_tex: Remove redundant 'return'
Making a clean slate for some pylint CI tests.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-26 07:47:20 -05:00
Ulf Magnusson
2ce55e9e88 scripts: Fix bad indentation in Python scripts
Making a clean slate for some pylint CI tests.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-26 07:46:35 -05:00
Ioannis Glaropoulos
3bc0f88653 doc: kernel: float: fix ARM-specific content
This commit updates the documentation as follows:
- stresses that the lazy stacking preservation is disabled
  by default and not supported in ARM Cortex-M builds,
- corrects the figure of extra stack requirement when
  floating point services are enabled in ARM builds.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-03-25 22:32:00 -04:00
Ioannis Glaropoulos
fd3c26a9f9 doc: kernel: float: several content fixes
This commit provides the following fixes:
- Corrects the note regarding which ARM MCUs may support
  floating point services
- Rewords the text stressing the undefined behavior when
  multiple threads access the floating point registers.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-03-25 22:32:00 -04:00
Anas Nashif
54ffd7cf18 doc: remove note about calling recheck in CI
The command `recheck` was always experimental and should not be part of
the contribution guidelines and flow. It is not working now, so remove
it from the docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-25 15:46:49 -04:00
Tomasz Bursztyka
a10df124ba doc/networking: Add documentation on struct net_pkt and its API
Memory managment and operations.

Fixes #13114

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-25 13:50:55 -04:00
Alberto Escolar Piedras
6dce703c37 doc: Bluetooth: Correct how to run native_posix
1. The build paragraph was listed with the run option.
   But, we need to pass an argument to the native_posix board,
   so "ninja run" alone is not good enough.
   Plus, it was not coherent with the rest of the text, as
   the paragraph intended to tell people how to build.
2. Added "sudo" to the run line, as the user needs extra
   permissions to connect to a host BT controller.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-03-25 09:21:08 +01:00
Carles Cufi
cb44b7e768 doc: Bluetooth: Document the debug monitor and btmon in general
Move the original documentation in the arduino_101 board to a common
section in the Bluetooth documentation and document the use of `btmon`
in general.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-21 17:23:08 +02:00
Alberto Escolar Piedras
7f3431da0e doc: application: Correct note about external modules
A note in the Modules (External projects) section indicated
that in the future it would be possible to do something that
can be already done.
So, let's clarify the note with how it can be done.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-03-18 11:30:29 -05:00
Johan Hedberg
8aba2d51e7 doc: networking: buf: Add mentions of net_buf_add_mem & net_buf_pull_mem
These are APIs that were added after this part of the documentation
was originally created.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-03-18 10:12:13 +02:00
Alberto Escolar Piedras
63b349f1e0 doc: Bluetooth: Expand BabbleSim section
Added some more content to the section about how to simulate
with BabbleSim and a couple of extra links.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-03-17 21:39:21 -04:00
Jukka Rissanen
622e49394a doc: net: Re-apply the networking release notes for 1.14
This is a revert of 45a4fbf2ae and
this commit removes the offending function references from
Networking chapter in 1.14 release note. After the BSD socket
documentation adds the function references we can revisit the
release note and add back the function references.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-15 10:35:46 -05:00
Kumar Gala
45a4fbf2ae Revert "doc: Add networking information to 1.14 release note"
This reverts commit fe9f85464c.

Getting the following issues:

releases/release-notes-1.14.rst:60: WARNING: 'any' reference target not found: getnameinfo
releases/release-notes-1.14.rst:60: WARNING: 'any' reference target not found: shutdown
releases/release-notes-1.14.rst:60: WARNING: 'any' reference target not found: freeaddrinfo
releases/release-notes-1.14.rst:60: WARNING: 'any' reference target not found: gethostname
releases/release-notes-1.14.rst:60: WARNING: 'any' reference target not found: getsockopt
releases/release-notes-1.14.rst:60: WARNING: 'any' reference target not found: setsockopt
releases/release-notes-1.14.rst:60: WARNING: 'any' reference target not found: select

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-03-15 08:02:15 -05:00
David B. Kinder
aa4531b2d0 doc: remove local version of Sphinx searchtools.js
We previously created an improved version of searchtools.js (used by the
Sphinx search) to remove the reST tags shown in the search results.
This has now been fixed in the upstream version of searchtools.js along
with other speed and visual improvements, so we should remove our local
copy.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-15 07:00:12 -05:00
Sebastian Bøe
f13af1c80e doc: Instruct Windows users to not install the lastest gnuarmemb
The latest release of the Windows toolchain has a critical bug,
Windows users should install the next-to-latest release instead.

To prevent Windows users from being affected we add a note about this
in the documentation.

Bug: https://github.com/zephyrproject-rtos/zephyr/issues/12257

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-03-15 06:58:36 -05:00
Jukka Rissanen
fe9f85464c doc: Add networking information to 1.14 release note
Contains major networking changes between 1.13 and 1.14 releases.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-15 06:48:41 -05:00
Jukka Rissanen
93f14a1fb6 doc: net: Add anchor to socket offloading chapter
We need to have a link to socket offloading chapter from
release notes.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-15 06:48:41 -05:00
David B. Kinder
6000a6205a doc: prepare for improving doc API linking
Linking to API material requires knowing the pecularities of how
doxygen, sphinx, and breathe work. In an attempt to hide some of this
we're preparing the current docs to allow use of configuration defaults
that will let us more simply use a default role that will hunt for a
reference target in the various domains that are available by using a
default "role" of "all".  This will let us use the simple notation
`functionname` or `typename` without fully specifying the reference as
:c:func:`functionname`.

This patch cleans up exising docs that were (incorrectly) using single
backtics where double backtics should have been used, and also found
some typos (such as a space between the role name and the reference,
such as :file: `filename`, and a missing colon such as
c:func:`functionname`)

This is a start to address issue #14313

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-15 05:47:19 +01:00
Michael Scott
9439a393b6 doc: net: Add LwM2M high-level description and usage
Add high-level documentation for the LwM2M library and examples
for client setup.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-03-14 19:17:55 -05:00
Suryansh Sharma
c995b6a620 doc: Fix typo and markup elements
Fixes a typo in board_porting.rst
Fixes wrong syntax for file markup element
in build-flash-debug.rst

Signed-off-by: Suryansh Sharma <suryansh@evilscientist.cc>
2019-03-14 19:14:36 -05:00
Ramakrishna Pallala
6b21e1b7a7 power: Add device idle power management support
Add framework for device Idle Power Management(IPM)
for suspending devices based on device idle. This will
help in saving power even while system(CPU) is active.

The framework uses device_set_power_state() API set the
device power state accordingly based on the usage count.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2019-03-14 14:26:15 +01:00
Ramakrishna Pallala
e1639b5345 device: Extend device_set_power_state API to support async requests
The existing device_set_power_state() API works only in synchronous
mode and this is not desirable for devices(ex: Gyro) which take
longer time (few 100 mSec) to suspend/resume.

To support async mode, a new callback argument is added to the API.
The device drivers can asynchronously suspend/resume and call the
callback function upon completion of the async request.

This commit adds the missing callback parameter to all the drivers
to make it compliant with the new API.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2019-03-14 14:26:15 +01:00
Ioannis Glaropoulos
a907e694e9 doc: guides: porting: correct references to user mode APIs
User mode-related API functions have been renamed to use the
'z_' prefix, so we need to update the architecture porting
guide accordingly.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-03-13 16:08:46 -07:00
David B. Kinder
b48c7fc9c1 doc: add note about force pushes to contrib guide
Let folks know that using amend and force pushes for adding review
changes is the recommend method for contributing to the project, but it
can cause some unexpected behavior from GitHub.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-13 16:08:08 -07:00
Jukka Rissanen
6346cc1a9e doc: net: Add SNTP API documentation
Documentation for Simple Network Time Protocol library was
missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-13 15:37:02 -07:00
David B. Kinder
8164505aad doc: Release notes initial (empty) draft
Get things started for the 1.4 release notes.
Individual teams will update their appropriate sections.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-13 05:36:39 -05:00
Luiz Augusto von Dentz
269935dca9 doc: Bluetooth: Add initial documentation for the GATT layer
Add initial sections for GATT layer.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-03-13 10:40:05 +01:00
Luiz Augusto von Dentz
258cd01152 doc: Bluetooth: Add initial documentation for the L2CAP layer
Add initial sections for L2CAP layer.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-03-13 10:40:05 +01:00
Johan Hedberg
00cabc6381 doc: Bluetooth: Add initial guide for the host stack
Add initial sections for the Bluetooth host stack, as well as a simple
diagram of the various protocol & profile layers.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-03-13 10:40:05 +01:00
Johan Hedberg
6721dec2e7 doc: Bluetooth: use :cpp:func: instead of :c:func:
:c:func: doesn't seem to generate proper hyperlinks, whereas
:cpp:func: works as expected.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-03-13 10:40:05 +01:00
Carles Cufi
8f05a4c6d5 doc: Bluetooth: Documentation overhaul
Overhaul the Bluetooth documentation to split it into manageable units
and include additional information, such as architecture and tooling.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-13 10:40:05 +01:00
David B. Kinder
ebc4e83a20 doc: update windows installation guide
Add a note installing programs manually on your Windows system: you may
need to update the Windows PATH so the system can file these programs.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-13 10:13:38 +01:00
Ulf Magnusson
ddf9193934 doc: kconfig: Encourage using menuconfig as a sanity check
Some people never use the menuconfig, but it makes a good sanity check
when making Kconfig changes, so encourage it for that. Mention a few
things that can be checked in it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-11 16:36:20 -07:00
Ulf Magnusson
e6a2b157f3 doc: kconfig: Add section on (lack of) conditional includes
Add a section on how 'if' works to the 'Kconfig - Tips and Best
Practices' page, especially when combined with 'source'.

There seems to have been some confusion here that lead to a bunch of
duplicated dependencies. It's probably simpler than most people assume.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-11 16:36:20 -07:00
Kumar Gala
07384cf9e9 docs: Updated Linux Getting started for SDK 0.10.0
Update instructions to point at SDK 0.10.0

Fixes #14258

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-03-11 11:01:08 -05:00
Jukka Rissanen
5ac2461339 doc: net: Fix L2 documentation
Use proper link to Zephyr source files. Fix rendering of special
options like NET_OK, NET_DROP and NET_CONTINUE.
Add reference links to network technologies documents.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-09 17:01:26 -05:00
Krzysztof Chruscinski
b0ba9c0133 doc: shell: Document logging to shell in case of early crash
In case of early crash, shell will not output logs. Added
documentation explaining how to handle such situations.

It is recommended to enable simple logger backend (RTT, UART)
which are available earlier.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-03-09 10:08:14 -05:00
Jukka Rissanen
319d8c7e2a doc: net: Updates to network architecture document
The architecture document contained old information and is now
updated to match the reality.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-09 10:06:55 -05:00
David B. Kinder
505cc2bb0e doc: use :zephyr_file: where appropriate
A new role :zephyr_file: is available that renders to a link to the file
or folder in GitHub.  Find appropriate references using :file: and
convert to :zephyr_file: to take advantage of its linking capability.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-09 09:50:27 -05:00
Erwan Gouriou
831fbed3a7 scripts: Add hook calllable series-push-hook script
Running checkpatch in pre-commit hook could be a constraint
for day to day work. Though, running it before pushing to
zephyr repo is highly recommended.
Add a  series push script callable from pre-push hook.
Document how to use it in contribute section.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-03-08 16:43:06 -05:00
Carles Cufi
b710177a27 west: commands: build: Specify source dir without a flag
In order to simplify the usage of `west build`, take a positional
argument with the source directory instead of requiring the `-s,
--source-dir` flag. This makes it easier and quicker to invoke west when
building, as well as being consistent with CMake.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-08 21:19:42 +01:00
Jukka Rissanen
9a0cf4b48f doc: net: Fix VLAN documentation in doc and in sample
The VLAN documentation had double wording and proper links to files
in github was missing, which did not look good in the rendered HTML
page.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-07 20:31:04 -05:00
Jukka Rissanen
ea997adf18 doc: net: Fix instructions how to compile qemu_x86 with e1000
The qemu_x86 compile instructions for Ethernet were missing
the e1000 overlay config.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-07 20:30:03 -05:00
Jukka Rissanen
3a5f707d45 doc: net: Minor fixes to DNS documentation
Fix link to DNS Kconfig option. Add proper links to DNS files
in github. Fixed link to DNS sample application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-07 20:29:47 -05:00
Jukka Rissanen
4e201a60e3 doc: net: Use proper github link for statistics Kconfig file
Show proper network statistics Kconfig file link.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-07 13:04:57 -06:00
Jukka Rissanen
301aeda9ef doc: net: Update the L2 documentation
The L2 documentation was describing functionality that has changed
recently. Now it should match the current reality.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-05 08:29:31 -05:00
Ulf Magnusson
259c2409c0 doc/CMakeLists.txt: Rename CONFIG_DIR to CONF_DIR
Avoids having it look like a Kconfig symbol reference (which gets
detected by an upcoming CI check).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-04 22:55:29 -05:00
David B. Kinder
b1944bc669 doc: fix broken internal link in app dev doc
Reference to internal page link was incorrect (looked like a reference
to an external page).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-04 18:42:00 -05:00
Jukka Rissanen
2610c09f0f doc: net: Move net-shell to system management page
The net-shell is more logically part of system management page.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-03 23:50:17 -05:00
Jukka Rissanen
575040496d doc: net: Add table of contents to networking docs
This allows easy access to different part of the page.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-03 23:50:17 -05:00
Ulf Magnusson
4099b972e1 doc: dts: Clarify CONFIG_SRAM documentation
There is no symbol called CONFIG_SRAM. Mention CONFIG_SRAM_SIZE and
CONFIG_SRAM_BASE_ADDRESS instead, and also mention that the DT_* values
they're generated from.

This gets rid of a false-positive undefined Kconfig symbol reference
too.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-02 03:46:10 +01:00
Ulf Magnusson
596135165a doc: tests: Remove ref. to undefined sym. CONFIG_ADC_QMSI_SAMPLE_WIDTH
CONFIG_ADC_QMSI_SAMPLE_WIDTH was removed in commit acc40d990a ("adc:
remove adc_qmsi driver"). It's only used as an example in the
documentation, but might as well use an existing symbol instead.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-02 03:46:10 +01:00
Jukka Rissanen
35e744ff1c doc: net: Enhance LLDP documentation
The Link Layer Discovery Protocol chapter was missing Overview
and also the API reference was not populated properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-01 09:45:06 +01:00
Sebastian Bøe
6d4ba3490f cmake: Deprecate 'set_conf_file'
In-tree, all usage of 'set_conf_file' is implementing the same
pattern (with some inconsequential differences).

To reduce copy-paste and get closer to dropping support for
'set_conf_file', we include this pattern into the built-in set of
patterns.

'set_conf_file' is causing issues for future extensions,
e.g. multi-image support, and is also the source of a lot of
duplicated code.

Note support for 'set_conf_file' is not dropped, it is only marked as
deprecated.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-03-01 09:44:09 +01:00
David B. Kinder
e731bdc81a doc: fix docs, include, and Kconfig misspellings
Fix misspellings missed during regular reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-28 09:32:12 +01:00
Jukka Rissanen
4021bb3cf2 doc: net: Minor tweaks to gptp documentation
Adding OpenAVnu/gptp and linuxptp links to the doc.
Also the "Application interfaces" chapter had some style issues.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-27 08:35:50 -06:00
Jukka Rissanen
cd100899ed doc: net: Enhance Ethernet management documentation
The Ethernet management documentation was missing Overview
chapter.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-27 10:27:02 +01:00
Ulf Magnusson
dd5ff3957c doc/guide/dts: Clean up DTS template
Add a missing semicolon after /dts-v1/, and a blank line between
/dts-v1/ and the root node.

Use 'code-block:: none' instead of 'code-block:: yaml' as well.
DTS is not YAML.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-26 17:27:51 -08:00
Jukka Rissanen
13b8c2ccbf doc: net: Change connectivity API doc to use BSD sockets
The connectivity API will now point to BSD socket API instead
of legacy connectivity API (net_context.h) when creating
a network application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 17:27:08 -08:00
Robert Lubos
663460cd21 doc: net: Add socket offload description
Add decription and API reference for socket offloading.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-02-26 17:26:48 -08:00
Jukka Rissanen
b68f5f0fe1 doc: net: Update network overview chapter
Fixing typos and missing features in network overview
chapter.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 17:23:29 -08:00
Piotr Mienkowski
40b5522058 power: doc: fix usage of 'low power state' phrase
The phrase 'low power state' is often incorrectly used to indicate
'low power' or 'deep sleep' states. This commit fixes the ambiguities
by renaming 'low power state' to 'power state' where necessary.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-26 02:30:13 +01:00
Piotr Mienkowski
f04a4c9deb power: rename CPU_LPS_n power states
CPU_LPS_n name used to indicate a low power state is cryptic and
incorrect. The low power states act on the whole SoC and not exclusively
on the CPU. This patch renames CPU_LPS_n states to LOW_POWER_n. Also
HAS_ pattern for Kconfig options is used in favor of a non standard
_SUPPORTED. Naming of deep sleep states was adjusted accordingly.

Following is a detailed list of string replacements used:
s/SYS_POWER_STATE_CPU_LPS_(\d)_SUPPORTED/HAS_STATE_LOW_POWER_$1/
s/SYS_POWER_STATE_CPU_LPS_(\d)/SYS_POWER_STATE_LOW_POWER_$1/
s/SYS_POWER_STATE_DEEP_SLEEP_(\d)_SUPPORTED/HAS_STATE_DEEP_SLEEP_$1/

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-26 02:30:13 +01:00
Jukka Rissanen
985c5d72a5 doc: net: Add documentation for net-shell
Simple page describing net-shell commands.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 02:24:45 +01:00
Jukka Rissanen
79824f4dcc doc: net: Hide misc host connectivity chapters from index
No need to show

* native_posix board setup (native_posix_setup.rst)
* QEMU Ethernet setup (qemu_eth_setup.rst)
* QEMU SLIP setup (qemu_setup.rst)
* USBNET setup (usbnet_setup.rst)

in main network index as links to those chapters are already
found in "Networking with the host system"
(networking_with_host.rst) chapter. In order not to trigger
a doxygen warning, place the chapters into hidden toctree.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 02:07:51 +01:00
Jukka Rissanen
c30f6c38d5 doc: net: Enhance Ethernet documentation
Add Overview chapter + info about IEEE 802.1Qav (credit based
shaper).

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-26 02:07:36 +01:00
Robert Lubos
b48f968f65 doc: net: Add Thread protocol description
Add a documentation page for Thread with a brief description.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-02-26 01:46:18 +01:00
Andrew Boie
4ce652e4b2 userspace: remove APP_SHARED_MEM Kconfig
This is an integral part of userspace and cannot be used
on its own. Fold into the main userspace configuration.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-02-23 07:43:55 -05:00
Jukka Rissanen
fd6aa0a508 doc: net: Add overview chapter to IPv4/6 helper doc
Overview chapter was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-22 13:54:14 -05:00
Jukka Rissanen
1d43377db9 doc: net: Move networking reference document chapters around
Group the networking chapters for reference document so that the
layout is more logical and easier to read.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-22 13:32:09 -05:00
Anas Nashif
ccad9d0d09 tests: move testsuite and configs into subsys/
Move test related code and the testsuite away from tests/ and make it a
proper subsystem.
The way tests were integrate in the tree was not obvious and actual
tests were intermixed with the testsuite code.

This will allow us to have trees with the testcode and without the
samples by just remove the folders tests/ and samples, needed for
isolating actual code from test/sample code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-22 08:58:40 -05:00
Carles Cufi
c2d5e7b01c kconfig: Don't load env var if in doc mode
Do not load the GENERATED_DTS_BOARD_CONF if in doc mode, since it will
not defined as it doesn't apply. No need to defined it to a dummy value.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-22 10:14:21 +01:00
Anas Nashif
63d330e78b doc: Rework Development Process section
- Added various contents from stale wiki pages
- Added API life cycle document
- Add pictures showing process in general
- Split the document into multiple sections.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-21 18:04:02 -05:00
Ravi kumar Veeramally
37b8ec6acb doc: Add CoAP high-level description
Add high-level documentation for CoAP library.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-02-21 17:49:07 -05:00
Jukka Rissanen
edb01e229f doc: net: context: Add comment to use BSD socket API instead
The net_context API is being phased out.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:59:24 -05:00
Jukka Rissanen
9146237fa3 doc: net: Enhance net_timeout API documentation
Add overview to net_timeout API documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:39:20 -05:00
Jukka Rissanen
b364cf4b12 doc: net: Enhance promiscuous mode documentation
Added overview and sample usage for promiscuous mode documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:38:13 -05:00
Jukka Rissanen
9191bf3a0b doc: net: Enhance network statistics documentation
Add information how to collect network statistics in the system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:37:56 -05:00
Jukka Rissanen
db45ed716f doc: net: Hide UDP API documentation
The UDP API functions are for Zephyr internal use only so do
not generate documentation for them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:37:43 -05:00
Jukka Rissanen
8c9bff57a0 doc: net: Enhance network offloading API documentation
Add small overview what network offloading means.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 16:37:26 -05:00
Marc Herbert
2270f4b116 Instant doc/ gratification: do not re-run doxygen when not needed
Use file(GLOB_RECURSE ...) to generate a superset of doxygen input
files. Use this list as a dependency for a new empty file
doc/_build/last_doxy_run_tstamp.

The incremental build time to re-run "make htmldocs-fast" after a small
.rst doc change is brought down from from ~8s to ~4s on my Linux system
and from ~30s to less than 10s on my MacBook.

(Doxygen changes are still slow for a couple reasons recently isolated
and documented in doc/CMakeLists.txt)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-02-21 19:49:14 +01:00
Marc Herbert
fc64481bdf doc/CMakeLists.txt: trivial comments and logging enhancements
Clearly shows where time is spent. More specifically helps work on the
next commit while removing noise from it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-02-21 19:49:14 +01:00
Laczen JMS
7989801966 fs/nvs: Improve init speed and remove fs->locked
This patch removes the free space calculation from nvs initialization.
The available space can be calculated if required using the routine
nvs_calc_free_space.

This patch also removes the locked state of nvs, it is not possible to
get in a locked state.

Changes:

Removed locked state and free_space from the nvs structure.

nvs_reinit(): has been replaced with by an internal only function
_nvs_startup().

nvs_write(): removed the possibility to place the file system in a
locked state, if to many gc operations are required it will return
-ENOSPC.

ssize_t nvs_calc_free_space(): introduced, calculates the free space
that is available in the nvs file system.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2019-02-21 09:32:52 -05:00
Jukka Rissanen
5e83e919e3 doc: net: Enhance DHCPv4 documentation
Add short overview for DHCPv4. Do not add dhcpv4 library internal
state in the documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-21 08:01:51 -05:00
Carles Cufi
997ef85ea9 doc: Clean up build instructions and use of variables
Remove most unnecessary instances of `export` and `cmake` use that can
instead be replaced with `zephyr-app-commands` or similar. This is to
avoid documentation using different mechanisms to describe the same
actions and in preparation for documenting `west build` everywhere.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-21 11:46:45 +01:00
Jukka Rissanen
f820062475 doc: net: Enhance network interface documentation
Add overview to network interface API documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-20 19:42:30 -05:00
Jukka Rissanen
9e4d147e44 doc: net: Enhance network hostname configuration documentation
Add overview how to use the network hostname API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-20 19:42:13 -05:00
Jukka Rissanen
65208bda28 doc: net: Enhance network configuration library documentation
Add overview and sample usage for the config library.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-20 19:41:59 -05:00
Jukka Rissanen
c17d302321 doc: net: Enhance DNS resolver documentation
Add more information about DNS resolver to documentation. Move
generic DNS information from the sample application into DNS
resolver documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-20 19:41:47 -05:00
Alberto Escolar Piedras
80c9a6acea doc: Add more coverage documentation
Add more documentation about how to generate coverage reports
for POSIX arch based boards

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-02-20 18:05:09 -05:00
Jukka Rissanen
bf2eb7b65c doc: net: Enhance Trickle algorithm documentation
Add overview chapter.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-20 17:28:11 -05:00
Jukka Rissanen
d9b891941b doc: net: Enhance PTP time format documentation
Added overview for PTP time format documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-20 17:27:40 -05:00
Jukka Rissanen
707e2294b6 doc: net: Enhance IEEE 802.15.4 documentation
Add a simple overview chapter to IEEE 802.15.4 documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-20 13:30:59 -05:00
Jukka Rissanen
41d17433f0 doc: net: Add more info for network connectivity with host
Added more detailed information how to connect Zephyr instance
to host system like Linux desktop.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-20 07:32:42 -05:00
Krzysztof Chruscinski
a5efcc2c53 shell: Add cpp-friendly shell macro for subcommands creation
Add macro for creating subcommand set in a way that is
accepted by C++ (SHELL_STATIC_SUBCMD_SET_CREATE). Currently,
it exists along with SHELL_CREATE_STATIC_SUBCMD_SET which is
used in the tree but it is not liked by cpp.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-20 07:31:35 -05:00
David B. Kinder
882702e688 doc: fix misspellings in docs
Fix misspelling in boards, samples, and doc missed during regular
reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-19 21:35:45 -05:00
Paul Sokolovsky
4ff21f631a doc: sockets: Update to the current state of affairs
1. There's now proper fdtable, pointer casting to "fd" is gone.
2. select() was implemented.
3. Enumerate implemented functions more thoroughly, so users can
fulltext-search them.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-02-19 17:29:44 -05:00
Adithya Baglody
30797d9c87 doc: gcov: Added documentation for code coverage.
The documentation shows the steps to be followed for generating the
code coverage reports.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2019-02-19 17:17:16 -05:00
Jukka Rissanen
3a93b33c99 doc: net: Enhance core API documentation
Add information about net_recv_data() and net_send_data()
functions.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-19 15:21:01 -05:00
Erwan Gouriou
8223cfb18a doc/guide/dts: DTS documentation add-on
Update dts documentation.
Rework some parts to provide more clarity and elaborate
yaml bindings usage.

Fixes #10318

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 15:09:08 -05:00
Jukka Rissanen
94f3091e08 doc: net: Enhance link layer address documentation
Add overview chapter to link layer address documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-19 15:07:41 -05:00
Carles Cufi
40b63e5dc8 doc: Fix the doxygen output directory references
Use a variable to set the doxygen output directory so we can refer to it
later when fixing mtimes instead of hardcoding it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-19 16:44:21 +01:00
Marc Herbert
82df254512 doc/getting_started: mention ZEPHYR_TOOLCHAIN_VARIANT=host briefly
Skipping the setup of a toolchain is especially nice for brand new users
who just want to give qemu_x86[_64] or native_posix a quick try, gives a
great first impression.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-02-14 19:43:25 -05:00
Marc Herbert
5284231750 doc: fix incremental build by fixing doxygen output mtime
Doxygen doesn't support incremental builds.  It could be ok because it
doesn't take much time in this codebase.  However it's not because it
makes old output look new which has a cascade effect on sphinx:
https://sourceforge.net/p/doxygen/mailman/message/36580807/

Make doxygen artificially smarter by saving and restoring modify
timestamps on the filesystem for doxygen output files that haven't
changed.

On my system this brings down the time to run an incremental "make
htmldocs" from 75s down to 8s (cmake -DKCONFIG_TURBO_MODE=1 used in both
cases)

This optimization speeds-up non-doxygen documentation work only.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-02-13 06:58:52 -06:00
Sebastian Bøe
1ca1075b20 cmake: kconfig: pass GENERATED_DTS_BOARD_CONF on to kconfig
Make kconfigfunctions.py agnostic to where GENERATED_DTS_BOARD_CONF is
located.

We don't want to encode the path of GENERATED_DTS_BOARD_CONF into more
places than necessary. Also, re-using GENERATED_DTS_BOARD_CONF makes
it easier to change where generated_dts_board.conf is located.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-02-12 20:16:47 -05:00
Carles Cufi
ee0b6fddd0 doc: getting_started: Document building with west
Document building the samples with west (for now only in the Getting
Started guide).
Also switch to `reel_board` by default since `arduino_101` is no longer
well supported.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-12 20:15:52 -05:00
Carles Cufi
635abed43f doc: getting_started: Add a reference to west multi repo
Reference the multiple repository management section in the Getting
Started Guide, so that users have a direct link to the text describing
how multiple repositories are managed.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-12 20:15:52 -05:00
Erwan Gouriou
7fce83ff8e kconfigfunctions: Disambiguate reference to DTS generated database
Documentation for kconfigfunctions, mentions they look up elements
in "the DTS generated "conf" style database". This indication
could be cryptic for new zephyr users. Adding the exact name and
path of the file for disambiguation.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-12 11:37:53 -06:00
Piotr Zięcik
9cc63e07e4 power: Fix naming of Kconfig options controlling deep sleep states
This commit changes the names of SYS_POWER_DEEP_SLEEP* Kconfig
options in order to match SYS_POWER_LOW_POWER_STATE* naming
scheme.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-12 07:46:32 -05:00
Piotr Zięcik
7a49356c77 power: Fix naming of Kconfig options controlling low power states
The SYS_POWER_LOW_POWER_STATE_SUPPORTED and SYS_POWER_LOW_POWER_STATE
suggests one low power state but these options control multiple
low power state. This commit uses plural in the names to indicate
that.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-12 07:46:32 -05:00
Carles Cufi
e672d1521c doc: extensions: application: Use paragraphs for multi-tool
When generating instructions for both west and CMake, use paragraphs and
literal blocks for better layout.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-12 09:23:43 +01:00
Carles Cufi
c8f484c85a doc: extensions: application: Overhauld and add west support
Overhaul the application extension in order to modularize its structure
and add support for building, flashing and debugging with west.
Both west and CMake are now supported, even at the same time, in which
case instructions for both will be generated.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-12 09:23:43 +01:00
Carles Cufi
68b876bebb doc: extensions: application: Fix multi-os handling
Correct the handling of the HOST_OS list so that we do not insert an
extra line break because of the 'all' entry and we correctly insert the
required comment.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-12 09:23:43 +01:00
Carles Cufi
1b47af03a9 doc: extensions: applications: Fix error handling
Fix a copy-paste error in the error handling for the host OS
input variable.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-12 09:23:43 +01:00
Carles Cufi
47b781e1a0 doc: bluetooth: Add reference to Bluetooth API
Add a general reference to the Bluetooth API pages.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-11 07:54:27 -05:00
Piotr Zięcik
994ef5c3c4 power: Move part of Power Management API to correct group
Part of Power Management API was incorrecty documented under
"Power Management Hook Interface" section. This commit fixes
that problem by introducing "System Power Management APIs".

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-11 07:52:12 -05:00
Anas Nashif
fa46d80d7f docs: add figure to board doc template
Add example of how to add an image for the board.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-11 07:45:21 -05:00
Anas Nashif
75e91bfbda boards: up_squared: add intro and image
Expand overview and add image of board.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-11 07:45:21 -05:00
Robert Lubos
d942c1d718 doc: Add MQTT high-level description
Add high-level documentation for MQTT library.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-02-09 09:39:03 -05:00
Anas Nashif
b8fc4ec058 doc: create an empty Kconfig.modules
This file is now needed by Kconfig and was not created during doc
creation. So touch an empty file to make doc build go through.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-08 22:47:02 -05:00
Carles Cufi
01e0552f64 doc: west: Document build system integration
Document the build system integration with west and any projects managed
by it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
2019-02-08 22:47:02 -05:00
David B. Kinder
1cc8bbb4ae doc: fix misspelling in kconfig doc
Fix typos introduced by PR #13186

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-08 16:33:09 -06:00
David Brown
f8b838d404 jwt: Add JSON web token library
This patch adds a JSON web token library that adds the capability
to sign JSON tokens.  This was located in subsys due to the dependency
on MBEDTLS, which resides in /ext.

Signed-off-by: David Brown <david.brown@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2019-02-08 15:32:58 -06:00
Carles Cufi
41b63571a4 doc: west: Document west build
Document the `west build` command in the section corresponding to the
west commands that deal with the CMake cache, which is now named
"Building, flashing and debugging" for consistency.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-08 14:58:28 -05:00
Kumar Gala
f2ef52f122 kconfig: kconfigfunctions: update dt_str_val
Clarify the docs for dt_str_val that if the name isn't found we return
and empty string.  Also cleanup the code slightly as we don't need to
escape the double quote.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 12:02:18 -06:00
Kumar Gala
ff70b3444f dts: Convert CONFIG_ to DT_ symbols for chosen props
Replace generating CONFIG_ symbols with DT_ symbols for chosen
properties like 'zephyr,console' or 'zephyr,bt-mon-uart'.  We now use a
kconfigfunctions (dt_str_val) to extract the info from dts into Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 11:41:26 -06:00
Carlos Stuart
e6a3c31790 doc: cmsis_rtos_v2: Updated documentation
Updated documentation to reflect that osThreadJoin and osThreadDetach
are now supported.

Signed-off-by: Carlos Stuart <carlosstuart1970@gmail.com>
2019-02-08 11:59:38 -05:00
Kumar Gala
2579adea1e kconfig: kconfigfunctions: Add dt_str_val function
Add dt_str_val to extract a string from the dt conf database.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 10:29:57 -06:00
Kumar Gala
bfaaa6bbe9 dts: Convert CONFIG_CCM to DT_CCM
Since we know do DTS before Kconfig we should try and remove dts from
creating Kconfig namespaced symbols and leave that to Kconfig.  So
rename CONFIG_CCM_<FOO> to DT_CCM_<FOO>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 10:29:57 -06:00
Marc Herbert
a49f9ebb2e doc/CMakeLists.txt: find sphinx-build-3 before sphinx-build
On (at least) Fedora the /usr/bin/sphinx-build binary always belong to
python2-sphinx which results in a confusing "cannot import name
DEVNULL" error below (DEVNULL is available from python 3.3).

Tell find_program() to look for sphinx-build-3 first and then
sphinx-build next.

(shorten) Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sphinx/config.py",
    line 161, in __init__ execfile_(filename, config)
  ...
  File "conf.py", line 17, in <module>
    from subprocess import CalledProcessError, check_output, DEVNULL
ImportError: cannot import name DEVNULL

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-02-08 09:09:51 -05:00
Piotr Zięcik
d02e3ebd4c power: Eliminate SYS_PM_* power states.
The power management framework used two different abstractions
to describe power states. The SYS_PM_* given coarse information
what kind of power state (low power or deep sleep) was used,
while the SYS_POWER_STATE_* abstraction provided information
about particular power mode.

This commit removes the SYS_PM_* abstraction as the same
information is already carried in SYS_POWER_STATE_*.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-08 09:07:00 -05:00
Andrew Boie
41f6011c36 userspace: remove APPLICATION_MEMORY feature
This was never a long-term solution, more of a gross hack
to get test cases working until we could figure out a good
end-to-end solution for memory domains that generated
appropriate linker sections. Now that we have this with
the app shared memory feature, and have converted all tests
to remove it, delete this feature.

To date all userspace APIs have been tagged as 'experimental'
which sidesteps deprecation policies.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-02-08 07:04:30 -05:00
David B. Kinder
c1dce2f799 doc: fix misspellings in docs
Fix misspellings missed in regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-07 22:06:14 -05:00
Klaus Petersen
c66cb76fed Build: Added support for out-of-tree Arch
Introduces the ARCH_ROOT argument, similar to BOARD_ROOT and SOC_ROOT.
This enables support for out-of-tree architectures.

The ARCH_ROOT out-of-tree layout is expected to be the following:
 * ${ARCH_ROOT}/arch/${ARCH}/
 * ${ARCH_ROOT}/include/arch/${ARCH}/ (Optional)

Signed-off-by: Klaus Petersen <kape@oticon.com>
2019-02-07 17:00:43 -05:00
Himanshu Jha
4c435625ab doc: coccinelle: Add documentation for SPFLAGS usage
Add documentation for -f=/--sp-flag= flag usage with an
example.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
2019-02-07 08:12:20 -05:00
David B. Kinder
7744101887 doc: add icons to the home page blocks
Use (free license) fontawesome icon characters to pretty up the Zephyr
home page navigation blocks added earlier.  (The fontawesome font famliy
is already included by the read-the-doc theme so we can take advantage
of that.)

Also amend the section descriptions.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-05 18:36:16 -05:00
Anas Nashif
2b9458c378 doc: restructure and create index pages
Move all lead pages to be index pages and create redirect rules from the
old pointers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
d6f72a67fc doc: introduce final structure
Move guides and APIs into separate directories and cleanup naming
introducing index files rather than named section files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
f9cc8f081c doc: move kconfig docs into one document
New functions section belongs in the overall Kconfig document.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
7d22953291 doc: move networking/bluetooth to user/developer guides
Include both networking and bluetooth in the user guides.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
94781e6694 doc: net: enable more net options in doxygen
Enable additional networking features to get them included in doxygen
output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
13f054075d doc: networking: move API reference to new section
Move text from under subsystems and put it under API reference where it
makes sense.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
13d10b843f doc: netowrking: split API reference
Split API reference into smaller pages per group.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
03eada3c98 doc: device driver and dts cleanup
Clean up those sections and move them the API reference section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
9b02a4acd1 doc: rename device driver section
Shorten title and remove redundant "device" from the title.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
96140fa029 doc: move release notes to own folder
Remove release note noise into a new folder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
4d93a9797f doc: changed structure and layout
Move to the new structure with both:

 - API Reference
 - User and Developer Guides

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
4beba9f948 doc: add bluetooth to api reference
Add bluetooth API documentation to reference.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
3c912086e6 doc: bluetooth: split API docs
Split API docs into multiple pages.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
b2b8edd5c8 doc: restructure Bluetooth docs
Put all realted docs in one page.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
f143097beb doc: display: cleanup display API page
Make the reference consistent with other APIs and fixed heading.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Anas Nashif
437cbbeb3b doc: consolidated filesystem API reference
Fixed doxygen groups for filesystems and created one stop reference for
filesystems in the docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Ravi kumar Veeramally
1e47f26d1c net: coap: Remove legacy CoAP implementation
As we are removing net_app and net_pkt based libraries and
applications, CoAP legacy based libraries and apps are moved
to socket based implementations. So removing legacy CoAP.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-02-04 16:49:59 -05:00
Andrzej Puzdrowski
563e9f6d0d doc: subsystem: nvs Added troubleshooting paragraph
Troubleshooting paragraph explains case when either
nvs API returns -ETIMEDOUT or MPU faults happens.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-02-02 10:28:46 -05:00
Andrei Emeltchenko
071a72dccc doc: Add documentation for using native_posix USB driver
Add docs for using virtual native_posix USB controller over USB/IP
protocol.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-01 19:03:12 -05:00
Kumar Gala
622684ff02 doc: Add docs about kconfigfunctions
Add docs on the kconfigfunctions that we support.  We only expose some
functions related to device tree currently.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-01 10:16:06 -06:00
Carles Cufi
fa26ef02d2 doc: Add KCONFIG_DOC_MODE env var handling
Export a new KCONFIG_DOC_MODE environment variable when building the doc
and invoking Kconfig, so that the functions that expect a build folder
can accordingly return a hardcoded value.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-01 10:16:06 -06:00
François Delawarde
4fac841869 debug: CTF Tracing with POSIX backend
This commit implements a CTF-backend for Zephyr's tracing API.
The CTF-backend itself is split in a middle-layer and a bottom-layer.
- Middle-layer decides the payload in event transactions,
- Bottom-layer implements the IO transport.

A simple POSIX bottom-layer is provided so far.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-02-01 08:56:02 -05:00
Jukka Rissanen
941f43588a doc: net: Remove net-app API references
As the net-app API is removed, the documentation links to it
need to be removed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-01 12:29:21 +02:00
Jukka Rissanen
d1162600e9 net: app: Remove net-app API files
The net-app API is removed. Users should use the BSD socket API
for application development.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-01 12:29:21 +02:00
Marti Bolivar
ae38cc6af2 doc: without-west.rst: fixes for correctness
Fix some correctness issues.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-02-01 10:02:11 +01:00
Marti Bolivar
488c94825c doc: incremental improvements to west docs
Reorganize the entry page so it's not as jarring of a landing by
reorganizing the content a bit in the rest of the toctree.

This makes it easier to read more progressively without having to jump
around as much.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-02-01 10:02:11 +01:00
Andrew Boie
c253a686bf app_shmem: auto-initialize partitions
There are no longer per-partition initialization functions.
Instead, we iterate over all of them at boot to set up the
derived k_mem_partitions properly.

Some ARC-specific hacks that should never have been applied
have been removed from the userspace test.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-01-30 23:15:51 -05:00
Andrew Boie
85e1fcb02a app_shmem: renamespace and document
The public APIs for application shared memory are now
properly documented and conform to zephyr naming
conventions.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-01-30 15:43:58 -08:00
Anas Nashif
e78ccdf4b8 doc: rename kconfig section
kconfig entries are options, symbols is probably an internal name to
kconfig.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-30 18:38:48 -05:00
Anas Nashif
ac7db91c68 doc: group storage components
Group storage components into one group.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-30 18:38:48 -05:00
Anas Nashif
8eee0b7fdd doc: move sensor doc to peripherals section
Sensors are peripherals, so move the reference alongside all other
peripherals.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-30 18:38:48 -05:00
Anas Nashif
7f150788af doc: move sensor APIs to main sensor doc
Move doxygen API reference to the main documentation page.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-30 18:38:48 -05:00
Anas Nashif
47fc5095f8 doc: move version API to kernel
Move this last doxygen API to the kernel section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-30 18:38:48 -05:00
Anas Nashif
4db3d06c2e doc: add peripherals reference
Create a reference page for each peripheral and move doxygen API
reference to the main documentation page.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-30 18:38:48 -05:00
Anas Nashif
ecff7e6901 doc: move USB API to USB section
Move doxygen API reference to the main documentation page.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-30 18:38:48 -05:00
Anas Nashif
64cffceb90 doc: move PM API to PM section
Move doxygen API reference to the main documentation page.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-30 18:38:48 -05:00
Anas Nashif
1206eb721a doc: move device driver model API reference
Move doxygen API reference to the main documentation page.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-30 18:38:48 -05:00
Robert Lubos
859fee02c5 doc: api: Reference MQTT over sockets library
The MQTT over sockets doxygen group was not referenced, hence the API
documentation was missing. Replace legacy MQTT lib reference with a new
one.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-01-30 08:26:25 -05:00
Jakub Rzeszutko
4c3bcbafef shell: documentation update
Updated documantation in regards to new shell printing strategy.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-01-30 13:05:56 +01:00
Andrew Boie
f278f31da1 app_shmem: delete parallel API for domains
The app shared memory macros for declaring domains provide
no value, despite the stated intentions.

Just declare memory domains using the standard APIs for it.

To support this, symbols declared for app shared memory
partitions now are struct k_mem_partition, which can be
passed to the k_mem_domain APIs as normal, instead of the
app_region structs which are of no interest to the end
user.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-01-29 11:11:49 -08:00
Krzysztof Chruscinski
1d9e5ee108 logging: Refactoring 'in place' mode to reduce memory footprint
Changed 'in place' mode to bypass logger system and directly
call active backends. With this approach memory footprint of
the logger can be significantly reduced in terms of RAM and ROM.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-01-29 17:24:37 +01:00
Carles Cufi
c2bea66764 doc: getting_started: Clarify what west does
Add additional details about what running `west init` and `west update`
actually does in the local filesystem.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
6162e93a00 doc: west: Do not fail doc build if west not used
In case west is not present or was not used to initialize the local
zephyr repository, avoid failing the documentation build by including a
placeholder file.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
0fa1db9416 doc: west: Misc formatting fixes
Miscellaneous formatting fixes in the west documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
6b00bc9357 west: Multiple CI fixes for the topic-west branch
In order to be able to merge the topic branch, we require a few
fixes to CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Marti Bolivar
ab82264ace scripts: add west build, flash, and debug commands
West now supports a mechanism for extension commands. Use it to move
the command implementations that are tightly coupled with boards and
the zephyr build system back into the Zephyr repository.

This patch doesn't include test cases. Those will be moved over in a
subsequent patch.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-29 10:15:01 +01:00
Carles Cufi
7335ef9142 doc: west: Overhaul documentation to match current model
Overhaul the west documentation so that it matches the model that is
currently implemented in the west repository.
This model is no longer subject to change in the short or mid term,
since it has been selected as the only viable one for multi-repo
management using west.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
323280a18e doc: west: Move files to the correct location
West documentation files now belong in doc/tools/west and not doc/west.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
29b5eb3581 doc: Use west instead of Git to clone Zephyr
Since west is no longer included in the Zephyr repository, instruct
users to install and use west in order to obtain the Zephyr source code.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Carles Cufi
8d5259af04 doc: scripts: Retrieve west path at runtime
Since west is no longer part of the Zephyr tree, we can no longer
hardcode its path anymore. Instead, use west itself to retrieve its
path, in order to point the documentation build to the correct
active west installation.
This is optional, and the documentation build will still work if west is
not installed on the system.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-29 10:15:01 +01:00
Jukka Rissanen
4043909d69 net: http: Remove HTTP client and server APIs
The old legacy APIs use net-app library and as that is being
removed, then the dependencies need to be removed also.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-01-25 11:21:20 -05:00
Jukka Rissanen
1cba0161ed net: websocket: Remove the websocket as HTTP APIs are removed
Remove the experimental websocket code as it uses HTTP APIs
which are being removed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-01-25 11:21:20 -05:00
David B. Kinder
89db6e3ad3 doc: fix formatting error in security doc
Continuation of a bullet list item wasn't indented properly, causing a
new list to be started (with odd indentation).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-24 18:27:27 -05:00
Anas Nashif
4fa0f7bc58 doc: move shell API documentation
Move API reference to where the logger is being documented.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 09:16:03 -05:00
Anas Nashif
c6415fe9bf doc: move logger API reference
Move API reference to where the logger is being documented.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 09:16:03 -05:00
Anas Nashif
4bcb294f45 doc: move usermode API documentation
Move API reference to the main documentation section under the kernel.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 09:16:03 -05:00
Anas Nashif
3499312249 doc: kernel: use zephyr_file role
Link to files in git tree on Github.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 09:16:03 -05:00
Anas Nashif
2dc4e270b2 doc: kernel: flatten kernel docs and add API references
Instead of having kernel APIs documentated in a separate page, move the
API references to the object pages and have everything in one place.

Remove the intermediate category page and list all section under the
kernel directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 09:16:03 -05:00
Anas Nashif
29f37f0ddb doc: threads: merge into one document
Merge kernel sections into one single document and remove the
intermediate page grouping objects.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 09:16:03 -05:00
Anas Nashif
9b148d2691 doc: whitelist CONFIG_NET_MGMT_EVENT in doxygen
When disabled, documentation is not generated correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 09:16:03 -05:00
Anas Nashif
eeb3bf2e39 doc: tweak doxygen css and remove top border
The top border on function names and other doxygen items made
documentation very difficult to read. Remove the top border and make the
auto-generated docs readable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 09:16:03 -05:00
Anas Nashif
072c466ff4 doc: add extension for linking github files
When referencing files from the git tree create a link to the file for
easy browsing of header files and other files of interest.

Borrowed from esspresif/esp-idf project and modified for Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 09:16:03 -05:00
Anas Nashif
940a931b08 doc: turbo mode for kconfig options
Building the documentation for all the Kconfig options significantly
adds to the total doc build time.  When making and testing major changes
to the documentation, we provide an option to temporarily stub-out
the auto-generated configuration documentation so the doc build process
runs much faster.

To enable this mode, set the following option when invoking cmake

    -DKCONFIG_TURBO_MODE=1

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-23 16:26:19 -05:00
Varun Sharma
5b43aa52b5 doc: tools: corrected file path in documentation
Corrected file path for code relocation sample path in documention

Fix for GH #12543

Signed-off-by: Varun Sharma <varun.sharma@intel.com>
2019-01-23 08:03:16 -05:00
Anas Nashif
38a77799d1 doc: add extension to handle HTML redirects
Handle redirects for moved pages. This extension is originally from the
ESP32 project and is maintained here:

https://github.com/espressif/esp-idf/blob/master/docs/html_redirects.py

Commit b240a181b7215158ef4db22ee7e694f938868502

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-22 21:28:42 -05:00
Anas Nashif
99aadec857 doc: settings: shorten title
Make title of this subsystem doc shorter to fit nicely in the menu.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-22 14:09:24 -05:00
Anas Nashif
172fa29485 doc: nvs: Change document title
Remove "for Zephyr" and capitilize title. Also minor change to API
heading.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-22 14:09:24 -05:00
Anas Nashif
bea9c6e88d doc: move kernel overview up
Put the kernel overview at the top level of the kernel documentation and
make it visible immediatly when browsing the kernel docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-22 14:09:24 -05:00
Anas Nashif
218599d6b7 doc: move source structure to application/
This is the structure of the whole tree, not really related to the
kernel.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-22 14:09:24 -05:00
Anas Nashif
e0bd4b66d8 doc: move logger to be main logging entry in doc
No need for intermediate page now that we have 1 logger system
supported.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-22 14:09:24 -05:00
David B. Kinder
f012084824 doc: eliminate doc build missing image warning
Out-of-tree doc builds rely on extract__content.py to copy needed
content from the source folders to the build folders. To minimize what's
copied, all the reST files are copied plus files referenced by the reST
files.  The extract_content.py script does a pattern match scan for
directives that reference other files (e.g., .. image::) and copies the
referenced file.  It's not a smart parser though and doesn't ignore
directives in comments or in code-blocks.  Rather than teaching the
script how to properly parse reST files, we'll just change the example
(in a code-block) to reference an existing image.

Fixes: #12621

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-21 15:32:54 -05:00
Sebastian Bøe
1526070082 cmake: Use a variable for 'zephyr_prebuilt'
There is an effort underway to make most of the Zephyr build script's
reentrant. Meaning, the build scripts can be executed multiple times
during the same CMake invocation.

Reentrancy enables several use-cases, the motivating one is the
ability to build several Zephyr executables, or images, for instance a
bootloader and an application.

For build scripts to be reentrant they cannot be directly referencing
global variables, like target names, but must instead reference
variables, which can vary from entry to entry.

Therefore, in this patch, we replace global targets with variables.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-01-19 07:21:55 -05:00
David B. Kinder
d57ece8ec6 doc: update doc guidelines
Add information about image size recommendations, and add some more
details about other reST features such as tables.  Also added a flow
picture to the documentation generation doc.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-19 07:05:53 -05:00
Kumar Gala
9502fce067 doc: extensions: Add shield support to zephyr-app-commands
Add 🛡️ as an argument to zephyr-app-commands, update the shield
porting rst example to use it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 18:22:02 -05:00
Erwan Gouriou
0115c47b69 cmake: dts: move to specifying shield on the command line
Rather than specifying SHIELD via Kconfig, we move it to being
specified via the command line, similar to board.

So we can do:

  -DSHIELD=x_nucleo_iks01a1

or, for multiple shields:

  -DSHIELD="x_nucleo_iks01a1 frdm_kw41z"

Following cmake change, update x_nucleo_iks01a1 sample in order
not to enable CONFIG option anymore but set SHIELD cmake option.

Last, update documentation to reflect this change.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 13:20:59 -06:00
Jakub Rzeszutko
f2c03280f2 shell: documentation update
1. Update shell documentation according to proposals in
PR #12437 (Extend shell meta keys).
2. Fix lines exceeding 80 characters limit.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-01-17 15:45:28 -05:00
Peter A. Bigot
bfad9721d2 kernel: remove k_alert API
This API was used in only one place in non-test code.  See whether we
can remove it.

Closes #12232

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-16 21:34:07 -05:00
Andrzej Puzdrowski
df243d3e63 doc: subsystem: settings: loading data behavior description
It was unclear how loading data from persisted storage works.
This patch introduce explanation for that.

Code examples were aligned to recent changes.

Removed misleading information about simultaneous back-end support.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-01-16 21:27:21 -05:00
Jakub Rzeszutko
ef672165a7 shell: documentation update according to new meta-keys
Updated shell.rst accoring to newly added meta-keys.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-01-14 16:01:48 -05:00
Jukka Rissanen
a7afdc3512 net: rpl: Remove the deprecated code
The RPL was deprecated earlier so remove it by this commit.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-01-13 09:40:36 -05:00
Anas Nashif
4426bfd7f7 doc: remove unused theme
Remove old and unused theme.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-11 11:34:31 -05:00
Anas Nashif
63bdb805e0 doc: Add top-level navigation grid
Make the documentation page a little bit more interesting with top-level
navigation grid highlighting the most important sections with a brief
description.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-11 11:34:31 -05:00
Anas Nashif
960de8c873 doc: move development process from the wiki
move development model from the wiki to the main documentation to keep
it in sync and updated all the time and to get proper reviews.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-11 09:34:37 -05:00
Anas Nashif
6c5ed261a4 doc: remove SYS_LOG from documentation
Make old and obsoleted SYS_LOG orphan until we completely remove it.

Fixes #12235

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-11 08:48:24 -05:00
Ricardo Marramaque
2b63cfbb3e doc: gs: Warn about Windows 10 CMake issue
Include a warning in regards to Windows 10 1803 build.

Signed-off-by: Ricardo Marramaque <ralm@rmarramaque.com>
2019-01-10 17:29:01 +01:00
Anas Nashif
5d91118672 doc: set author to the Zephyr project
replace 'many' with something more meaningful.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-07 10:31:51 -05:00
Anas Nashif
2c4b6a5307 doc: minor tweaks to documentation guidelines
Change titles and make them consistent with the rest.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-07 10:31:51 -05:00
Anas Nashif
7efe1b14b0 doc: remove ip stack migration guide
This is now outdated and obsolete.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-07 10:31:51 -05:00
Anas Nashif
1ae9b89293 doc: reloacation: shorten long lines
Some style fixes and change title.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-07 10:31:51 -05:00
Anas Nashif
276c589dc3 doc: restructure documentation
With the new theme we are able to have more section in the top level.
Move things around and expose the most important sections in the top
table of content.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-07 10:31:51 -05:00
Anas Nashif
6b22a93286 doc: remove leading 'Zephyr' for some documentation sections
This is redundant information. We already know we are Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-07 10:31:51 -05:00
Anas Nashif
f71c2a3948 doc: net-app: Fix structure and section layout
Mark sub-sections as such, otherwise we have all sections on the same
level.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-07 10:31:51 -05:00
David B. Kinder
7ed0c7415c doc: add (more) missing API docs
As mentioned in issue #12265, some APIs
aren't included in the generated
API docs because doxygengroup directives were missing. Also add a
comment referencing defgroups that are just organizational and the
scanning script can ignore.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-04 13:43:47 -05:00
Sebastian Bøe
5748fe11e5 cmake: Fix VERSION warning in doc build
The 'doc' build has been invoking 'project' with the argument "VERSION
${PROJECT_VERSION}". This is cargo-cult code inherited from the
toplevel build system.

This can be safely removed because in the doc build the versioning
variables that are set by 'project' are unused and PROJECT_VERSION is
not available to be de-referenced at that point in time any way ...

This fixes #12282

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-01-04 13:28:09 +01:00
David B. Kinder
67db1d5321 doc: add comment for API doxygen group check
add a comment for the scanner script for missing API doxygengroup
directives so it won't complain about a parent defgroup used only for
organization

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-03 12:38:28 -05:00
David B. Kinder
c8ba6fe41d doc: add missing networking APIs
As mentioned in issue #12265, some networking APIs
aren't included in the generated
API docs because doxygengroup directives were missing.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-03 12:38:28 -05:00
David B. Kinder
6d912bf035 doc: add missing cfb API
As mentioned in issue #12265, this API wasn't included in the generated
API docs because a doxygengroup directive was missing.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-03 12:38:28 -05:00
Anas Nashif
5060ca6a30 cmake: increase minimal required version to 3.13.1
Move to latest cmake version with many bug fixes and enhancements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-03 11:51:29 -05:00
Andrei Emeltchenko
e8ecd275a0 doc: usb: Move API documentation to usb_api
Move API documentation text to the right place.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-01-02 11:53:44 -05:00
42accf2e64 disk: add a SDHC card over SPI driver.
Features:

- Uses the SPI bus to communicate with the card
- Detects and safely rejects SDSC (<= 2 GiB) cards
- Uses the optional CRC support for data integrity
- Retries resumable errors like CRC failure or temporary IO failure
- Works well with ELMFAT
- When used on a device with a FIFO or DMA, achieves >= 310 KiB/s on a
  4 MHz bus

Tested on a mix of SanDisk, Samsung, 4V, and ADATA cards from 4 GiB to
32 GiB.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-12-30 16:24:10 -05:00
Anas Nashif
74a74bb6b8 power: rename api sys_soc -> sys_
sys_soc is just redundant, just call APIs with sys_*.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-28 16:16:28 -05:00
Anas Nashif
9151fbebf2 power: rename APIs and removing leading _
Remove leading underscore from PM APIs. _ was used for internal APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-28 16:16:28 -05:00
David B. Kinder
2e1021d3e7 doc: update doc footer copyright year
Happy 2019!

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-28 10:42:23 -05:00
Krzysztof Chruscinski
d653a5182c shell: Allow calling shell_fprintf from various contexts
Extended shell to allow command to indicate that shell should
halt not accepting any input until termination sequence is
received (CTRL+C) or shell_command_exit() is called. While shell
is in that state it is allowed to print to shell from any thread
context.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-28 10:42:06 -05:00
Andrew Boie
74f114caef userspace: easy checking for specific driver
In general driver system calls are implemented at a subsystem
layer. However, some drivers may have capabilities specific to
the hardware not covered by the subsystem API. Such drivers may
want to define their own system calls.

This macro makes it simple to validate in the driver-specific
system call handlers that not only does the untrusted device
pointer correspond to the expected subsystem, initialization
state, and caller permissions, but also that the device object
is an instance of a specific driver (and not just any driver in
that subsystem).

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-12-27 20:31:58 -05:00
David B. Kinder
06d78354ae doc: regular misspelling scan
Fix misspellings in documentation (.rst, Kconfig help text, and .h
doxygen API comments), missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-26 13:27:14 -05:00
Rajavardhan Gundi
b609175aff CMSIS RTOS V2: Introduce CMSIS RTOS V2 API header file
CMSIS RTOS API provides a generic RTOS interface for embedded
processors (actually for Cortex-M processors but are generic
enough to be used elsewhere). This header file is for V2 version.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-12-20 12:23:22 +01:00
Krzysztof Chruscinski
08f0d93cbb shell: Improve handling of log messages
If burst of log messages was passed to the shell log
backend, it was likely that messages were lost because
shell had no means to control arrivals of log messages.

Added log message enqueueing timeout to the shell instance
to allow blocking logger thread if short-term arrival rate
exceeded shell capabilities.

Added kconfig option for setting log message queue size
and timeout in RTT and UART instances. Added section in
shell documentation which explains interaction between
the logger and shell instance acting as a logger backend.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-19 14:37:00 +01:00
Kumar Gala
2cc957e860 scripts: extract_dts_includes: Generate defines for chosen props
Generate a set of defines that convey if a given chosen property is used
or not.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-17 11:26:40 +01:00
Krzysztof Chruscinski
0899a6c0b7 logging: severity-wise filtering of function name prefix presence
Extended logger configuration to allow function name prefix for
messages with certain severity levels. By default only debug
messages are prefixed with function name.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-12-13 14:21:25 +01:00
Anas Nashif
4810d6e64d doc: logging: fix doxygen references
Fix references in doxygen comments and enable util.h which has
documentation for references macros in log_core.h

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-10 20:38:09 -05:00
Anas Nashif
69c758436c doc: add kernel version API to doxygen
Put kernel version API into doxygen and make it available as a
documented API.

Fixes #6319

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-08 17:24:53 -05:00
Ulf Magnusson
57b28cae2c kconfiglib: Save previous configuration to .config.old
Update Kconfiglib (and menuconfig, just to sync) to upstream revision
094f4a9622046, to add the commit below.

  Save existing configuration to .<filename>.old in write_config()

  Add a default-True 'save_old' flag to write_config(). If 'save_old' is
  True and an existing configuration file is being overwritten, a copy
  of the old configuration file is saved to .<filename>.old (e.g.
  .config.old) in the same directory.

  Errors are ignored, as the old configuration would usually just be a
  nice-to-have, and not essential.

  The same functionality could be added for minimal configuration files
  and headers, but it's probably most useful for configuration files.

Other changes:

  - Parsing performance is improved a bit

  - scripts/kconfig/kconfig.py now prints the path to the merged
    configuration in zephyr/.config, to make it a bit easier to
    discover.

Fixes: #2907

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-12-08 17:14:38 +01:00
Ruth Fuchss
664741c5bf doc: Add anchor in Getting Started
Add an anchor in the Getting Started topic to be able to link to
the requirements section.

Signed-off-by: Ruth Fuchss <ruth.fuchss@nordicsemi.no>
2018-12-07 16:45:49 -05:00
Carles Cufi
65ced0ee5e doc: tools: Update links to Nordic website
The links to the nRF Command-line tools have changed.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-12-07 11:32:33 -05:00
Erwan Gouriou
a1ccde2629 doc/tools: stlink: Provide guidelines for openocd install on windows
Add directives for openocd installation in Windows environment.

Fixes #7325

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-07 11:26:30 -05:00
Jukka Rissanen
f4fc30569b doc: net: Add instructions for native_posix board
Add generic instructions how to use native_posix board with
networking enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-12-07 18:20:54 +02:00
Varun Sharma
4223e7bbcc doc: code_data_relocation: Details about code data relocation feature
Added basic working details of code/data/bss relocation feature,
how to use with examples & code sample details

Signed-off-by: Varun Sharma <varun.sharma@intel.com>
2018-12-07 10:32:41 -05:00
Carles Cufi
6075133bae doc: dts: Document aliases and chosen nodes
In order to clarify their use, add a brief description of the Device
Tree `aliases` and `chosen` nodes and their use in Zephyr.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-12-07 12:11:11 +01:00
Carles Cufi
15fbf707ca doc: revert to copy files with extract_content.py directly
Adding ninja targets based on the files that are to be copied into the
build folder doesn't seem to speed up the build, so simplify the CMake
script by relying on extract_content.py to do the copy.

Numbers on my machine:

* master
  clean: 6m45.541s, 6m8.113s
  incremental: 1m24.233s, 1m32.720s

* revert
  clean: 6m25.221s, 6m19.751s
  incremental:1m20.893s, 1m20.337s

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-12-06 14:27:29 -05:00
David B. Kinder
691e1170c1 doc: tweak API CSS for improved usability
API documentation (generated from doxygen comments) visibility
improvement by using a light-blue background on fields (vs. grey),
matching the Kconfig option documentation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-05 16:32:59 -05:00
Himanshu Jha
5cc08cbeae doc: application: coccinelle: Mention report mode as a necessary rule
The newly proposed script must have report mode implemented
in them since they are less verbose warnings and helpful
in automated CI when throwing warnings to users.

Also, fixup mailing list links to follow .rst rules for
documentation using bullets while rectifying unwanted bold text.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
2018-12-05 15:14:05 -05:00
Jakub Rzeszutko
9e958b405c doc: shell: update according to new help usage
Updated documentation according to recent changes:
1. Removed options from the shell.
2. Simplified help usage.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-05 15:15:44 +01:00
Jakub Rzeszutko
5451ff2848 shell: remove "options" concept
Removing help "options" from shell API.

Currently SHELL_OPT macro is not used by users. What is more
commit: a89690d10f ignores possible options created in
command handler by the user. As a result they are not printed
in help message.

Second, currntly implemented "options" in command handlers options are
implemented without SHELL_OPT macro.

And last but not least this change will allow to implement
help handler in a way that user will not need to think about calling
functions printing help in a command handler.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-05 15:15:44 +01:00
Jakub Rzeszutko
d232ef129c shell: documentation update
Removing requirements to sort commands.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-04 15:52:36 -05:00
Håkon Øye Amundsen
81c6662d23 cmake: flash: scripts: Include externally built hex files
Allow user to add externally built hex files to the cmake property
HEX_FILES_TO_MERGE. The hex files in this list will be merged
with the hex file generated when building the zephyr application.

This allows users to leverage the application configuration
available in Kconfig and CMake to help decide what hex file
should be merged with the zephyr application.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 19:04:13 +01:00
Anas Nashif
521ccca2ae crc: move all crc APIs into one header
Move all CRC APIs into one single header.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-12-04 08:52:46 -06:00
Peter A. Bigot
5bb18ac719 kernel: update documentation referencing old init levels
A couple references to the old PRIMARY and SECONDARY levels were left in
place when everything moved to the new levels.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2018-12-03 11:29:43 -08:00
David B. Kinder
b645194cd3 doc: add sphinx extension improving only directive
The Sphinx ``.. only::`` directive is limited to handling only
conditional text and can't handling conditional use of directives
For example,

```
.. only:: test

   .. automodule:: west.runners.core
      :members:
```

is not handled. This PR monkey patches the handling of the existing
``.. only::`` directive done by Sphinx.

See https://github.com/pfalcon/sphinx_selective_exclude for details.
Licensing amended to Apache 2.0 with permission from the author.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-02 14:17:24 -05:00
Piotr Mienkowski
970aef2905 kernel: ensure System Power Managment enables Tickless Idle.
System Power Management is only supported in Tickless Idle mode.
This patch modifies Kconfig dependencies to ensure System Power
Management option selects Tickless Idle one.

Fixes: #11046

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2018-11-21 23:16:35 -05:00
Robert Lubos
21a2e1eb5e doc: Add secure sockets documentation
Add documentation for secure sockets subsystem.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-11-21 12:25:57 -05:00
Marek Pieta
ac31020deb doc: subsystems: shell: Documentation fix
Change fixes typo in documentation.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2018-11-20 12:11:22 +01:00
Sathish Kuttan
e275ae5e06 doc: kernel: add k_msgq_peek() API
Add documentation for k_msgq_peek()

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-11-19 17:53:22 -05:00
Sebastian Bøe
8ba5aff8c0 kconfig: Drop support for specifying CROSS_COMPILE through Kconfig
When we move DT infront of Kconfig we are going to need access to a C
toolchain before Kconfig is evaluated. This means it will not be
possible to specify the toolchain used through Kconfig.

To deal with this we ...

Drop support for specifying CROSS_COMPILE through Kconfig. Still
available is the ability to specify CROSS_COMPILE through the
environment or through a CMake variable.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-19 15:04:13 -05:00
Anas Nashif
10970a60c0 sanitycheck: remove unused platforms keyword
This keyword had no effect and was being copied over to many samples
errornously.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-19 15:03:55 -05:00
Himanshu Jha
4d1a1217f1 doc: application: coccinelle: Add information about coccinelle list
Add link to coccinelle mailing list info and archives.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
2018-11-17 14:50:33 -05:00
Harry Jiang
b0d2a7add7 doc: fix the example code typo
This commit fix the typo of k_poll_signal_raise() api example code

Signed-off-by: Harry Jiang <explora26@gmail.com>
2018-11-13 08:09:53 -05:00
Sebastian Bøe
5a2ddf37d9 msys: Drop support for building in an MSYS environment
MSYS support was added as a stop-gap while native windows support was
unsupported. Now that Native windows support is stable we can drop
support for MSYS.

Dropping support for MSYS fixes #11260 and allows us to spend more
resources on native windows support.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-13 10:28:33 +01:00
Ulf Magnusson
42a7c43a2a doc: Fix some typos on the Kconfig best practices page
Found some copy-paste errors while going through it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-11-11 14:31:26 -05:00
Ulf Magnusson
ef11776460 doc: Document some Kconfig best practices and tips
Add a new 'Kconfig tips and best practices' page that covers some
Kconfig best practices, tips, and arcana, like the following:

 - What should be turned into a Kconfig symbol?

 - Best practices and pitfalls for 'select'

 - Factoring out common dependencies

 - Kconfig shorthands

 - Redundant defaults

 - Explanations of various more obscure Kconfig features, like 'imply',
   optional prompts, optional choices, and 'visible if'

Link the new page in the sidebar (under Developer Guides), the
application development primer, and the architecture and board porting
guides.

Perhaps other, more Zephyr-specific information could be added later on
as well, but this is a good start.

Include some other Kconfig-related documentation improvements as well:

 - In the application development primer, give 'CONFIG_FOO=n' as the way
   to set a bool symbol to 'n', instead of '# CONFIG_FOO is not set'.
   That seems to be what people usually do in practice in Zephyr.

   Explain why '# CONFIG_FOO is not set' works as well. There's a
   technical reason for it, related to Make.

 - Mention that the recommended syntax for referencing environment
   variables is now $(FOO) (which uses the Kconfig preprocessor)

 - Mention that the kconfiglib.py docstring has more in-depth
   information about how symbol values are calculated.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-11-11 09:01:14 -05:00
Krzysztof Chruscinski
5e346812ac logging: Refactor LOG_MODULE_REGISTER and LOG_MODULE_DECLARE macros
Changed LOG_MODULE_REGISTER and LOG_MODULE_DECLARE macros to take log
level as optional parameter. LOG_MODULE_DECLARE can now also be used
in static inline functions in headers. Added LOG_LEVEL_SET macro
which is used when instance logging API is used to indicate maximal
log level compiled into the file.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-11-10 12:38:29 -05:00
Andrew Boie
110728af53 doc: add details about dynamic interrupts
Update interrupts.rst with information on how to use dynamic
interrupts. As they are used in the same way as IRQ_CONNECT(),
not much needs to be written.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-11-10 11:01:22 -05:00
Flavio Ceolin
899914ed6a doc: Fix duplicated word
The word version was duplicated for Latexmk.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-11-09 16:34:14 -05:00
Luiz Augusto von Dentz
6c95b555ac shell: Add macros to print messages
This adds macros for printing info, normal, warning and error messages
including line termination.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-11-09 11:19:49 +01:00
Luiz Augusto von Dentz
a89690d10f shell: Add APIs to set number of arguments
This allows the shell core to perform precheck before calling the
handler which then can assume the number of arguments is correct.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-11-09 11:19:49 +01:00
Ulf Magnusson
f70f323193 scripts: west: Add documentation for the multi-repo commands
Explain multi-repo concepts like manifests and projects, give an
overview of the currently implemented commands, and give an example of a
potential workflow.

There's no way to submit a multi-repo change for review yet, so this is
still experimental.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-11-09 10:27:36 +01:00
Maureen Helm
4ab023d31f doc: Fix licensing links for cmsis, nordic, and mcux components
Fixes broken licensing links for the cmsis, nordic, and mcux external
components. Updates the cmsis license to Apache 2.0 now that we're using
cmsis version 5.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-11-07 22:57:50 -05:00
Carles Cufi
f803a25ec1 doc: bluetooth: Add existing qualification listings
List the currently available Bluetooth Qualification Listings for the
Zephyr Host and Controller.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-11-07 15:30:34 -05:00
Ioannis Glaropoulos
e9432c6e94 doc: kernel: usermode: correct prefixes in app memory section
Application shared memory API uses 'appmem_' prefix for
its functions and macros. This commit updates the respective
documentation to align with the API convention.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-11-06 16:14:41 -05:00
Anas Nashif
62cce740ea sanitycheck: clarify -s vs -T options in ztest doc
Clarify the difference and fix the ztest documentation adding more
examples.

This fixes #10662.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-05 17:31:36 -05:00
Anas Nashif
0819684703 doc: update docs with latest SDK
Changed documentation to point to SDK 0.9.4.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-05 11:00:38 -05:00
Flavio Ceolin
aecd4ecb8d kernel: Change k_poll_signal api
k_poll_signal was being used by both, struct and function. Besides
this being extremely error prone it is also a MISRA-C violation.
Changing the function to contain a verb, since it performs an action
and the struct will be a noun. This pattern must be formalized and
followed and across the project.

MISRA-C rules 5.7 and 5.9

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-11-04 11:37:24 -05:00
David B. Kinder
6871b927b7 doc: update getting started pip3 --user info
Using ``pip3 install --user`` installs Python packages in the Python
user install directory (``.local``) so we should remind folks to add
``~/.local/bin`` to their PATH.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-03 22:58:48 -04:00
David B. Kinder
babc199545 doc: fix misspellings in docs
Scan and fix for misspellings missed during regular
reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-02 20:10:20 -04:00
Christoph Schramm
ff50393bf0 doc: shell: rtt: Add documentation for RTT shell backend
Please see notes for running RTT on macOS

Signed-off-by: Christoph Schramm <schramm@makaio.com>
2018-11-02 12:19:58 -04:00
Alberto Escolar Piedras
27ec9fa7f2 doc: Linux installation: Add gcc and gcc_mulitlib for Ubuntu
In 0d811b9aee the gcc-mulitlib package
was removed from the Ubuntu list of packages to install.
Seems this may be creating some confusion for some developers (see
comments in #10243)
Let's add it back.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-11-01 18:39:09 -04:00
Paul Sokolovsky
bd0ab78677 doc: usermode: Add missing "called" in _k_object_init() description
The phrase "object must have _k_object_init() on it at some point"
visibly misses "called".

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-11-01 16:36:26 -04:00
Ravi kumar Veeramally
c8954d3544 net: coap: CoAP library support over sockets
CoAP library is migrated to support over socket based
applications or other higher layer protocols. Most of the
API's and functionality is kept as it is except few changes.

net_pkt/net_buf is removed from CoAP library. Now it expects
a pre-allocated flat buffer and length. If there is not enough
space to append any data, library simply returns an error.
It's user's responsibility to allocate and free memory.

One change in functionality is, earlier coap_pending_clear()
used to clear the memory, but now it's user's responsibility
to free the memory.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-10-31 19:44:25 -04:00
Jan Van Winkel
ca66c8ea41 doc: Added generic display interface to API doc
Added generic display interface to Display Interfaces APIs
documentation

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2018-10-31 08:41:27 -04:00
Pavel Kral
1a583fa8be ext: debug: segger: Add USE_SEGGER_RTT that enables RTT libraries.
This option allows to explicitly include Segger RTT libraries and
enables use of it for various subsystems. It is disabled by
default as it consumes more RAM.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
2018-10-31 12:47:53 +01:00
Ioannis Glaropoulos
3e02f38a38 kernel: mem_domain: minor typo fixes
Fixing a few minor typo fixes in kernel/mem_domain.c
and the respective documentation section.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-10-29 12:34:12 -04:00
Jakub Rzeszutko
7e3a6e85d3 doc: shell: add information about dummy backend
Shell documentation has been updated with information about new
backend called DUMMY.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-28 11:45:41 -04:00
Himanshu Jha
1e7a70c082 doc: application: coccinelle: Miscellaneous cleanups
Update documentation with spell fixes and refactoring
changes.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
2018-10-28 11:42:43 -04:00
Reto Schneider
7eabab2f5d samples, tests: Use semi-accurate project names
When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming every project "NONE"
defeats this functionality.

This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names in the samples (and again, in
the tests folder) folder, small manual adjustments have been done.

Signed-off-by: Reto Schneider <code@reto-schneider.ch>
2018-10-27 21:31:25 -04:00
Carles Cufi
9fd4c3a70d doc: Remove quotes from Windows env var
Windows requires that there are no quotes around environment variables,
remove the ones in the documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-10-26 18:27:01 +01:00
Sebastian Bøe
e8420d91bb doc: Fix pip3 install command
The getting started guide says to run:

pip3 install -r --user zephyr/scripts/requirements.txt

but this is broken. It should be:

pip3 install --user -r zephyr/scripts/requirements.txt

This fixes #10817 and is a regression from:
0d811b9aee

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-25 07:21:35 +01:00
Andrei Emeltchenko
e408d9c3a4 doc: usb: Use new USB API for sample code
Replace sample code, making it use newest USB API, reading code
directly from sources, and changing to the simplest sample - loopback.
CDC ACM is quite big and modifying sample would render line change
quite often.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-24 11:18:12 +01:00
Krzysztof Chruscinski
5d28fcd689 logging: Add optional function name prefix
Extended logger to support optional log message prepending with
function name.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-24 11:14:26 +01:00
Henrik Brix Andersen
74ca4f58a6 doc: bluetooth: clarify where to find the btmgmt binary
Prepend the btmgmt call with the tools/ subdirectory to line up with
the other BlueZ tool calls in the examples.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-10-24 11:13:47 +01:00
Carles Cufi
24da65276a doc: extract_content: Normalize path of ignored folders
Normalize the path of ignored folders so that variations in paths
formats on Windows are detected correctly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-10-23 10:28:27 +01:00
Jakub Rzeszutko
917dd83e8b doc: shell: update example usage of shell_cmd_precheck function
Updated example usage of shell_cmd_precheck according to new API.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-19 13:35:56 +02:00
Marti Bolivar
61042c3ea9 application: fix code-block directive in custom SoC section
Without the extra colon, this is showing up as a comment.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-17 19:07:58 -04:00
Marti Bolivar
0b6bbcf6df doc: application primer: improvements to "creating an application"
- Fix a few errors and bits of stale information in "Creating an
  Application", also adding additional cross-references.

- Consolidate some of the steps to help users create CMakeLists.txt
  correctly by unambiguously putting target_sources() after the
  boilerplate include.

- Split the description of the important build system variables into
  its own section and add more context for what they do.

- Add whitespace warning

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-17 19:07:58 -04:00
Marti Bolivar
23d12e9e68 doc: reorder the sections for better flow
Put the Developer Guides after the Getting Started guide, and make
sure the Application Development Primer is the first item in the
Developer Guides. Make some other ordering adjustments as well.

These changes collectively make for a more logical order for linearly
reading through the Zephyr documentation for the average user.
"Average user" here is defined as a person who wants to:

1. learn what Zephyr is and its distinguishing features
2. install a Zephyr development environment, building/running hello
   world
3. learn the basics of how Zephyr applications are structured
4. start diving deeper

This privileges "users" over "developers", i.e. it pushes sections
related to Zephyr's internals and how to edit them down lower in the
order.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-17 19:07:58 -04:00
Marti Bolivar
0d811b9aee doc: overhaul getting_started
The getting started documentation has become a bit of a mess over
time:

- The reader needs to jump forward and backward in the documents
  depending on what their system already has installed (e.g. "start by
  cloning Zephyr, oh wait, see below if you don't have Git yet" etc.).

- The operating system setup guides, toolchain setup instructions, and
  application build and run information have each become their own
  balkanized fiefdom, with duplicated, confusing and sometimes
  inconsistent results.

- Linux documentation for all distributions is incomplete in some
  places (the Arch documentation in particular is vestigial)
  and wrong in others (platforms like Ubuntu still nominally require
  tools, like autoconf, that haven't been necessary since we stopped
  using the C Kconfig tools)

- The dependencies needed to build the documentation have
  gotten *huge* since the LaTeX additions and massively overstate the
  footprint of Zephyr's real dependencies. This is particularly a
  problem on Linux, where those dependencies were not clearly
  separated from those needed to build Zephyr.

- The toolchain setup documentation is confusing and scattered across
  the main file and the platform-specific files. There are various
  bits of incomplete and/or incorrect information. For example, the
  docs imply that you can use the Zephyr SDK on non-Linux hosts, which
  isn't true. As another example, some toolchains, such as GNU Arm
  Embedded, are documented several times. As a final example, some
  toolchains, such as Intel's ISSM, are squirrelled away in the
  Windows document when there are Linux builds available.

Overhaul the pages to fix these issues and otherwise clean up the
language. One significant side-effect is that all the
toolchain-related information is rooted in a single toctree. Another
is that it should now be possible to follow the instructions, in
order, on any supported platform.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-17 19:07:58 -04:00
Marti Bolivar
27eb8d3db4 doc: add warning about sphinx errors
I committed a user error and edited a file named in the sphinx output
to correct an error. To my dismay later, I discovered my work had been
lost as that file is not versioned.

Warn the others.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-16 15:10:18 -04:00
Marti Bolivar
d7dc113783 doc: avoid copying content twice
In a clean build, Ninja is creating copies of the extracted
documentation outputs regardless of whether they already exist or
not. I can't explain this behavior from the documentation of the build
command, but it's so, even if extract_content.py is patched to use
copyfile() instead of copy2() so that outputs (copied .rst files in
the build directory) have strictly newer mtimes than inputs (source
tree .rst files).

This extra copying doesn't happen for incremental builds, for some
reason.

To account for this behavior, add and use an extract_content.py option
that skips content extraction completely and leaves that all up to the
add_custom_command() which tracks each individual input->output build
command.

Reported-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-16 15:10:18 -04:00
Anas Nashif
deaab90641 tests/samples: cleanup tags
Remove redundant 'sample' tag and add something that matches the
functionality and features being tested, demonstrated.

Avoid short abbriviations and using full names for fs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-16 09:17:51 -04:00
Marti Bolivar
b307be0382 doc: cmake must be re-run if adding/removing files
This is a consequence of the move to tracking each documentation
source file individually.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Marti Bolivar
d9f512cbcf doc: add sphinx-html and sphinx-latex convenience targets
Most of time (i.e. when just writing to .rst files or editing images,
rather than editing Doxygen or Kconfig), a full rebuild of the docs
pipeline is not necessary.

This is unfortunate, because it takes over a minute to re-run doxygen
etc. (on my system), whereas an incremental sphinx-build run should
only take a few seconds.

As a band-aid to help developers who have already generated a docs
build and know the consequences of their actions, add "sphinx-html"
and "sphinx-latex" targets. These just re-extract content files into
the build directory and run sphinx-build. This makes for much faster
documentation edit/compile/read loops.

Add some extra COMMENTs while we're here, to make it more obvious
what's going on when the docs build system crunches on something.

A "proper" solution for changing "ninja html" to have similar
performance would need, at least, to:

- only re-run doxygen if any source files have changed
- only re-generate Kconfig if any of those files have changed

That's all left to future work, as this is good enough to make
rebuilding the docs bearable for me.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Marti Bolivar
2952bf85d9 doc: add comment describing SPHINX_OUTPUT_DIR behavior
Explain the asymmetry with the situation when it is unset.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Marti Bolivar
0913c296cf doc: fix extract_content.py dependency tracking
The logic which copies source documentation files into the build
directory could use some improvements to its dependency management, so
that when a source file changes, extract_content.py gets re-run.

Make these changes as follows:

- Add an --outputs flag to extract_content.py, so that the
  sources it depends on and generates can be saved into a file and
  thus made known to the build system

- Change the way the sources and destination are specified in the
  extract_content.py command line so that the entire job can be done
  in a single command, rather than multiple (to avoid having to
  collate multiple --outputs files in CMake)

- Extract the content at configure time with execute_process(),
  tracking all inputs and outputs within the build system itself. Use
  this information to make sure that each individual output depends on
  just its exact input file, ensuring updated inputs produce updated
  outputs without having to call extract_content.py again.

- Ensure that the "content" build system target depends on all the
  outputs, transitively triggering a rebuild any time an input
  file (e.g. .rst documentation file or included image/source file)
  changes.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Marti Bolivar
9802f883f5 doc: rewrite extract_content.py for better input/output tracking
Separate the phases of creating the list of outputs (and output
directories) from the actual creation of these outputs. This lays the
groundwork for just printing the inputs and outputs in a subsequent
patch, enabling CMake to track dependencies properly.

In the now-separate output generation phase, use shutil.copy2() to
preserve metadata like access and modification times when possible,
rather than re-reading every file and seeing if the contents are
different. This has the same semantics but is clearer and potentially
more efficient, as the initial copies have more accurate relative
timestamps.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Marti Bolivar
0d4ca68051 doc: clean up extract_content.py use of environment variables
Minor cleanups:

- Allow the user to run extract.content.py -h with ZEPHYR_BASE unset
  without crashing
- Replace the use of the ZEPHYR_BUILD environment variable with an
  --ignore argument (that can be given multiple times) which specifies
  a path to a directory whose files should *not* be copied, and use
  it to ignore the build directory
- rename, reorder, and tweak get_files() arguments a bit to go from
  source to dest, with extra configuration at the end, getting rid of
  local shadowing of global built-in functions

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Marti Bolivar
5336f30def doc: make extract_content.py flake8 clean
Address flake8's complaints.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-10-12 11:37:48 +02:00
Krzysztof Chruscinski
5f6070e2f7 logging: Add autostart option to LOG_BACKEND_DEFINE
Extended macro to accept flag indicating if given backend must be
initialized and enabled when log subsystem starts. Typically, simple
backends will have autostart flag set. More complex may require
explicit enabling (e.g. shell over BLE can only be enabled when
BLE connection is established).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-11 13:29:50 +03:00
Jakub Rzeszutko
5b6f6e3ae5 doc: shell: update documentation for shell init procedure
User do not need to initialize shell instance manually now
and this change has been reflected in the documentation.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-11 12:08:04 +02:00
Praful Swarnakar
963c7a5c64 doc: Add description for harness and its various configs
Document how to use harness and it's various configurations
such as type, regex and fixture that can be used to pick specific
board setup that fulfills external dependency for test case.

Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
2018-10-10 19:11:29 -04:00
Ulf Magnusson
92ef8582b9 Kconfig: Remove redundant $(ZEPHYR_BASE) from 'source's
The $srctree environment variable gives the path relative to which
'(o)source' statements work (the current directory is used if $srctree
is unset). It is set to $ZEPHYR_BASE in cmake/kconfig.cmake, so there's
no need to qualify the source of Kconfig.zephyr in sample Kconfig files
(or in external projects).

All 'source's in Zephyr assume that the Zephyr root directory is used as
the srctree as well, and would break otherwise.

Remove the $(ZEPHYR_BASE)s to make it clearer that all 'source'
statements work relative to the Zephyr root. There was some user
confusion on IRC.

Also explain how things work in the documentation.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-10-10 11:28:27 -05:00
Ulf Magnusson
5cfe06b6bc genrest/menuconfig: Fix crash for promptless choices
Update menuconfig (and Kconfiglib, just to sync) to upstream revision
256e5b3e38e92 to get the fix below in, for an issue in an external
project. Also update genrest.py with a similar fix (the genrest issue
was what originally prompted it).

    menuconfig: Improve/fix promptless choice handling

    The code assumed that all parent (interface) menus always have a
    prompt, which is false for items in promptless choices. This led to
    a crash e.g. when viewing the symbol information for a symbol within
    a promptless choice.

    Promptless choices with children can show up "legitimately" when
    people define choices in multiple locations to add symbols, though
    this is broken in the C tools.

    Use standard_sc_expr_str(node.item) instead of the non-existing
    prompt for promptless choices. That way they show up as
    '<choice (name if any>)>', which is consistent with how they're
    shown elsewhere.

    This commit also changes how choice names are displayed in
    show-name/show-all mode, to the standard_sc_expr_str() format.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-10-10 16:16:28 +02:00
Jakub Rzeszutko
9b87f63eca doc: shell: Updating documentation according to source changes
Added a table describing what are options driving terminal to
a new line.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-10 10:45:28 +02:00
Krzysztof Chruscinski
26031f7bfd lib: ring_buffer: add raw byte access mode
Extended ring buffer to allow storing raw bytes in it. API has been
extended keeping 'data item' mode untouched.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-09 13:58:44 -04:00
Krzysztof Chruscinski
ff5f00f2c3 lib: ring_buffer: Rename sys_ring_buf_ to ring_buf_item_
Deprecate API prefixed with sys_ring_buf_ and rename it
to ring_buf_item_ since this API is not a typical ring buffer
but ring buffer of data items (metadata + 32bit words).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-09 13:58:44 -04:00
François Delawarde
c11e96d9b8 cmake: Support custom out-of-tree toolchains
Add a new optional TOOLCHAIN_ROOT cmake and environment variable to
specify an alternative location for toolchain cmake files.

When set, Zephyr will look for a toolchain cmake file located in:
${TOOLCHAIN_ROOT}/cmake/toolchain/${ZEPHYR_TOOLCHAIN_VARIANT}.cmake

Signed-off-by: François Delawarde <fnde@oticon.com>
2018-10-08 12:43:32 -04:00
Sebastian Bøe
8eb734cd82 DT: Rename from dts.fixup to dts_fixup.h
The Zephyr configuration system uses many different files in many
different formats. It makes it a lot easier for users to understand
what these files do if when we use the correct file extensions.

To this end we rename the dts.fixup files to the correct file
extension '.h'.

This is a breaking change for out-of-tree fixup files. Such files will
be detected and given an appropriate error message.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-08 11:38:56 -04:00
Andrei Emeltchenko
f7067655d6 doc: usb: Use contents instead of hand made structure
Use proper contents keyword.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-05 10:50:19 -04:00
Andrei Emeltchenko
add69d60e3 doc: usb: Move generated api to the right place
Move USB API to the right place.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-10-05 10:50:19 -04:00
Luiz Augusto von Dentz
bbaa374afa Shell: Remove reference to alphabetically sorted
It is no longer required to have the command table alphabetically
sorted.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-10-03 10:51:52 +02:00
Himanshu Jha
46b4c51674 doc: application: Add documentation for Coccinelle tool
Add a detailed documentation for the Coccinelle tool.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
2018-10-02 14:03:39 -07:00
Jakub Rzeszutko
794bda73dc doc: shell: update documentation to reflect bug fix #10207
Shell macro SHELL_DEFINE no longer needs new line character.
Specification has been updated accordingly.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-02 11:55:47 -07:00
Carles Cufi
d8e228c97c doc: getting started: Document pdf build on Windows
Add a section to optionally install the Chocolatey packages required to
build the documentation in .pdf format on Windows.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-10-02 18:48:26 +02:00
Carles Cufi
0698dba8e8 doc: cmake: Enable PDF build on Windows
In order to make PDF generation work on Windows, search for a generic
Latex package and use full quotes for the latexmk environment variable.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-10-02 18:48:26 +02:00
Jakub Rzeszutko
99f64c1e47 doc: subsystems: shell: update documentation
Shell handler can now return an int value. This change has
been reflected in shell.rst.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-10-02 14:44:25 +02:00
Krzysztof Chruscinski
a15438e8f5 logging: add mechanism for handling transient strings
Extending logger to support logging transient strings (with %s).
With dedicated call (log_strdup), string is duplicated to a buffer
from internal logger pool. Logger implicitly manages the pool.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-10-01 15:26:14 -04:00
Sebastian Bøe
93230a52e1 doc: cmake: Change the format of KERNELVERSION to match Zephyr
The documentation has been setting the environment variable
KERNELVERSION to the PROJECT_VERSION of the documentation. But
PROJECT_VERSION is not set during the documentation build so this has
no effect.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-10-01 09:16:05 -04:00
David B. Kinder
432562dd19 doc: fix doc misspellings
Fix misspellings missed during regular reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-29 22:55:14 -04:00
Jakub Rzeszutko
bef64c3b77 doc: subsystems: shell: Add documentation.
1. Remove old shell documentation.
2. Create documentation for new shell module.
3. Fix shell.h comments to be able to generate
   API documentation.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-09-29 14:42:05 -04:00
Ulf Magnusson
8dce59b681 doc: kconfig: Explain the '<type> <prompt>' shorthand
The board porting guide assumed that people were already familiar with
the Kconfig 'bool "foo"' shorthand for giving a symbol's type and prompt
at the same time. I got an email pointing out that it isn't obvious.

Explain the shorthand, and also mention that it's the preferred style in
Zephyr.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-29 12:38:29 +02:00
Carles Cufi
7599fad178 doc: cmake: Do not use USES_TERMINAL on latex/pdf targets
The following error appeared on documentation builds when enabling the
USES_TERMINAL flag:

  USES_TERMINAL may not be specified without any COMMAND

This is because targets without a command should not be using the flag
at all, so remove its usage from those. Instead, use it in the
add_custom_command() that actualy invokes sphinx.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-09-26 12:13:39 +02:00
David B. Kinder
713b6df561 doc: fix doxygen BUILD_ASSERT error
PR #10216 hit a doxygen/breathe known issue that is worked around by
adding an entry to the doxygen configuration to treat BUILD_ASSERT() as
a predefined macro.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-26 00:33:13 +05:30
Marti Bolivar
55b462cdfa scripts: update west to latest upstream version.
Update to the latest west. This includes a new 'attach' command. There
are also multi-repo commands, but those won't get exposed to the user
unless they install Zephyr using "west init" + "west fetch" (and not,
say, "git clone").

Replace the launchers; they now detect whether zephyr is part of a
multi-repo installation, and run the west code in its own repository
if that is the case.

This also requires an update to:

- the flash/debug CMakeLists.txt, as the new west package is no longer
  executable as a module and must have its main script run by the
  interpreter instead.

- the documentation, to reflect a rename and with a hack to fix
  the automodule directive in flash-debug.rst for now

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-09-25 17:51:22 +02:00
Anas Nashif
780c1c28ee doc: Update intro with ble mesh and kernel features
Expand introduction about Zephyr with additional details.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-22 06:53:55 -04:00
Erwan Gouriou
242c729539 doc: provide shield usage documentation
Following introduction of shield feature,
provide requested documentation.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-21 18:51:26 -04:00
Sebastian Bøe
89a197be84 cmake: Re-direct KCONFIG_ROOT when convention is used
Automatically detect the Kconfig file in it's conventional placement
${APPLICATION_SOURCE_DIR}/Kconfig and set KCONFIG_ROOT accordingly.

'Convention over configuration' is an imporant principle for
minimizing metadata and keeping things consistent. We use this
principle for instance with the file prj.conf.

This commit applies this principle to also re-direrct KCONFIG_ROOT.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-09-21 13:37:21 -04:00
Johan Hedberg
461a9de773 doc: Bluetooth: Mention Mesh in the supported features
Add Mesh to the supported features list of the Bluetooth stack.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-09-20 07:31:04 -04:00
Anas Nashif
47db520a0b docs: revamp section introducing Zephyr
Add more features and re-order sections slightly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-19 17:29:06 -04:00
Iván Sánchez Ortega
3a80518577 doc: Indent RST code blocks and notes
Fixes the indentation for some code blocks and notes
through the "getting started" instructions.
The main effect is that an ordered list
is no longer broken by a note block.

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2018-09-19 14:46:02 +02:00
Andrei Emeltchenko
70f046e396 logger: Rename SHOW_COLOR and FORMAT_TIMESTAMP options
Make options available for other backends

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-09-18 14:56:10 +02:00
Ulf Magnusson
02d0523f40 doc: Fix RST error in Kconfig template documentation
A blank line is needed after '.. code-block::', or the code gets
misinterpreted as RST parameters:

  ...doc/subsystems/logging/logger.rst:168: WARNING: Error in
    "code-block" directive:
  maximum 1 argument(s) allowed, 9 supplied.

  .. code-block:: none
     module = FOO
     module-str = foo
     source "subsys/logging/Kconfig.template.log_config"

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-15 09:21:49 -05:00
Krzysztof Chruscinski
a728a46a60 logging: add template for log configuration
Added Kconfig.log_template file with template for module log
configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-14 12:32:56 -04:00
Erwan Gouriou
7a9f4f6879 doc: fix desription SoC tree structure example
Example of st_stm32 soc tree structure was instantiating
'stm32l0' dir as subdir of 'common' which is not the case.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-13 08:55:59 -04:00
Anas Nashif
1666130416 doc: custom SOC configurations
Document how to use out-of-tree SOC configurations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Anas Nashif
96455d5881 build: support out of tree SoC definition
Add the glue to make this work with SoC code outside of the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00
Ulf Magnusson
d713033d5c Kconfig: Use new preprocessor syntax for env. variables
With the new Kconfig preprocessor (described in
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/
kconfig-macro-language.txt), the syntax for expanding environment
variables is $(FOO) rather than $FOO.

$(FOO) is a general preprocessor variable expansion, which falls back to
environment variables if the variable isn't set (like in Make). It can
also be used in prompts, 'comment's, etc.

The old syntax will probably be supported forever in Kconfiglib for
backwards compatibility, but might as well make it consistent now that
people might start using the preprocessor more.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-11 19:17:25 -04:00
Ulf Magnusson
d0e8752a52 Kconfig: Rename $ENV_VAR_{ARCH,BOARD_DIR} to $ARCH/$BOARD_DIR
The prefixes might be a leftover from the old 'option env="..."' symbols
(which are no longer needed). Since environment variables can be
referenced directly now, there's no point in having a prefix.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-11 19:17:25 -04:00
Daniel Leung
1d88e8684c doc: document build target for PDF
This adds to the documentation how to build PDF.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-11 14:55:43 -04:00
Daniel Leung
7a1ec635d0 doc: convert internal http links to references
This converts the http links within the Zephyr document
into references. This allows the links within the PDF file
to jump to the correct sections instead of going to
the Internet.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-11 14:55:43 -04:00
Daniel Leung
c164c8ea8b doc: fix using Ninja to generate PDF
The chain of dependencies works for make but not for Ninja.
Make it explicit so Ninja will work to generate PDF.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-11 14:55:43 -04:00
Kumar Gala
4fede8dd0b log: make name param explicit
Rather than having some implied name for the logging name, explicitly
pass it in the macros LOG_MODULE_REGISTER & LOG_MODULE_DECLARE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-11 13:25:55 -05:00
Andrei Emeltchenko
798cdaec7e doc: Using doxygen comments from the code for USB Core
Instead of documenting in rst, pull the API from USB Device Core Layer
header.

Fixes: #5702

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-09-11 12:54:47 -04:00
Andrei Emeltchenko
1e1b46d101 doc: Using doxygen comments from the code for USB DC
Fixes issue with USB subsystem doc not pulling from header
doxygen comments of USB Device Controller code.

Fixes: #5702

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-09-11 12:54:47 -04:00
David B. Kinder
f2ba7046eb doc: final edit for 1.13 release notes
Fixed misspellings, Synopsis DesignWare references, move Synopsys nSIM
support to boards/SoC section.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-10 20:11:47 -04:00
Anas Nashif
3510436d48 release: update notes with gh issues
Add list of resolved GH issues since last releas.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-10 20:09:20 -04:00
David B. Kinder
3654752e2d doc: use https for docs.zephyrproject.org references
doc site now supports https access

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-10 17:46:34 -04:00
David B. Kinder
531f8ed93d doc: update copyright contents and display
Tweak copyright year (2018) and display copyright unconditionally.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-10 17:45:55 -04:00
David B. Kinder
23d4c5d6d0 doc: changes for 1.13 documentaiton release
Doc changes listed in the release checklist (#8320)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-10 13:46:14 -04:00
Ioannis Glaropoulos
cdc73951d0 doc: add detailed description of Armv8-M features in release notes
This commits adds detailed description of Armv8-M features that
are introduced in the 1.13 release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-09-07 09:38:04 -04:00
Ioannis Glaropoulos
69e81ff7c2 doc: add TrustZone support in the list of key features
This commit includes the basic support for ARM TrustZone-M
in the list of key features for 1.13 release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-09-07 09:38:04 -04:00
Anas Nashif
05e6c53e08 doc: update release notes
Update additional section and overview of the release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-06 23:31:50 -04:00
Anas Nashif
8944bf9bcc release: wrap lines in release notes
keep all line wrapped.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-06 23:31:50 -04:00
David B. Kinder
ebb28c0635 doc: add doc changes to 1.13 release notes
Update draft 1.13 release notes with documentation changes (and fix a
spelling typo)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-06 23:22:06 -04:00
David B. Kinder
03d416ec66 doc: fix 404 error page message
The custom 404 error page reports an incorret "url being requested"

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-06 21:13:57 -04:00
Maureen Helm
11460676eb doc: release notes: Fill in driver section for 1.13
Fills in the drivers section with notable additions and changes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-06 11:16:32 -04:00
Maureen Helm
c392a015fe doc: release notes: Add arm arch and boards for 1.13
Adds arm highlights to the architectures and boards sections.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-06 11:16:32 -04:00
Sebastian Bøe
19845a7489 cmake: Don't use the environment variable CFLAGS
Some distros set the environment variable CFLAGS, this will
accidentally affect Zephyr builds.

To fix this we clear the environment variable from within the Zephyr
build system for the duration of the CMake execution.

Until now we have been instructing the user to clear it, but it is
easier for the user if we clear it for him.

The same applies to CXXFLAGS.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-09-05 18:40:32 -04:00
Carles Cufi
618b97fefc doc: Add Bluetooth release notes for 1.13
Add the relevant highlights from the 1.13 development cycle for the
Bluetooth subsystem and its samples.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-09-05 18:26:06 -04:00
David B. Kinder
13a210355e doc: fix reference to log.h
logger api header file reference was incorrect

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-09-05 00:41:58 -04:00
Ravi kumar Veeramally
42c19497b6 samples: net: coap: Remove apps using raw mbedtls APIs
This removes these network sample applications
  samples/net/coaps_client
  samples/net/coaps_server

as they are using low level mbedtls APIs. You should use
preferably socket based or net-app based applications.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2018-09-04 16:17:37 -04:00
Ioannis Glaropoulos
56312cdd19 doc: fix minor typo in clock.rst
Remove redundant "is" in the description of Kernel system clock.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-09-04 11:56:03 -04:00
Paul Sokolovsky
9fe831476e doc: relnotes-1.13: Condense/cleanup networking section
Merged closely related items into one bullet point, improve
description of some items, try to sort items a bit better
(that can be further improved).

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-09-03 11:43:31 -04:00
Henrik Brix Andersen
be7d2768cb doc: settings: fix inline sample code
Fix a couple of issues in the code examples for the settings
subsystem.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-09-02 21:44:33 -04:00
Ismael Fillonneau
84908fa2ff doc: kernel: usermode: fix macro name
_SYSCALL_HANDLER macro has not been updated to Z_SYSCALL_HANDLER

Signed-off-by: Ismael Fillonneau <ismael.fillonneau@stimio.fr>
2018-08-31 13:53:44 -04:00
Jukka Rissanen
350026e8c8 doc: Add networking information to 1.13 release note
Contains major networking changes between 1.12 and 1.13 releases.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-08-30 14:28:17 -04:00
Yasushi SHOJI
1f1307e1d6 doc: enhance multi-level interrupts diagram
Make the multi-level interrupts diagram more clear by saying:

  - the "-" means an interrupt slot
  - all interrupt slots are numbered from 0 starting from right most
  - alphabets denote devices
  - add an example chain for device D

Signed-off-by: Yasushi SHOJI <y-shoji@ispace-inc.com>
2018-08-30 10:52:59 -04:00
Anas Nashif
e6f2dff735 doc: DRAFT start for 1.13 release notes
Get the 1.13 release notes started.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-30 10:44:17 -04:00
Daniel Leung
9945e7fda0 doc: add ability to generate PDF
This adds new targets to generate build documentation through
LaTEX to PDF.

There are a few notes:

1. pdflatex complains about the tex file generated by doxygen
   so it needs to be fixed with a Python script before feeding
   in through pdflatex.

2. SVG files are not recognized by pdflatex so they are converted
   to known good format on the fly, only for producing PDF. This
   uses the libRSVG's rsvg-convert tool.

Relates to #6782.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-08-29 18:16:56 -04:00
David B. Kinder
1d1a4b321b doc: fix misspellings in reST files
Fix misspellings missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-08-28 13:59:38 -04:00
Ulf Magnusson
c1f54cc5fd Kconfig: Show include paths in menuconfig and documentation
Update Kconfiglib and menuconfig to upstream revision a28bc4da9762e,
which adds include path information to menuconfig, showing how the
Kconfig file of the symbol got 'source'd in addition to showing the
definition location.

Add include path information to the auto-generated Kconfig documentation
too.

Some small Kconfiglib bugs are fixed to, like error reporting for
recursive 'source's being broken (crashing instead of printing the
error), a minor file descriptor leak, and syntax checking not catching
extra trailing tokens after 'if <expr>' and 'depends on <expr>'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-26 09:47:20 -07:00
Anas Nashif
1d4e089498 qemu: support alternate path of qemu binaries
Support using an alternate QEMU path for when we want to use a qemu
version not available in the SDK.

To use the alternate qemu version, export QEMU_BIN_PATH and point it
to the bin directory which contains the qemu executables.

For example:

export QEMU_BIN_PATH=/usr/local/bin

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-22 15:44:53 -07:00
Anas Nashif
469bd39b82 doc: add tracing section
Add initial tracing documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-21 05:45:47 -07:00
Anas Nashif
a2248782a2 kernel: event_logger: remove kernel_event_logger
Move to more generic tracing hooks that can be implemented in different
ways and do not interfere with the kernel.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-21 05:45:47 -07:00
Ulf Magnusson
f2acdffea3 genrest: List symbols selected by each symbol
Previously, you had to go to the Kconfig dump at the bottom of the
symbol reference page to see selected symbols (as opposed to the
select*ing* symbols, which were already listed). Might be easy to miss.

Use a format similar to the list of defaults
('- SELECTED_SYM if CONDITION').

Also list 'imply's, though I don't think those are used anywhere in
Zephyr yet.

Simplify the code generating the list of selecting symbols a bit as
well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-19 11:19:24 -07:00
Ulf Magnusson
a56be6f58d Kconfiglib: Fix $srctree behavior for the top-level Kconfig file
Due a design goof, the top-level Kconfig file passed to
Kconfig.__init__() wasn't looked up relative to $srctree. This broke a
planned fix for an issue with the CI check for references to undefined
Kconfig files in external projects.

Update Kconfiglib to upstream revision 953cc12464 to fix it.

Also update doc/CMakeLists.txt to pass 'Kconfig' instead of '../Kconfig'
to genrest.py. $srctree is already set to $ZEPHYR_BASE.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-18 10:38:52 +02:00
Carles Cufi
896a6966f8 doc: Make Sphinx output directory configurable
In order to be able to place the generated HTML content directly in a
folder of the user's choice, make the Sphinx HTML output folder
configurable.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-16 14:40:12 +02:00
Kumar Gala
ebc3ce3a0e Revert "log: make name param explicit"
This reverts commit 2cb17a0332.  It
doesn't handle the dynamic logging case and thus breaks things.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-08-15 11:19:46 -05:00
Kumar Gala
2cb17a0332 log: make name param explicit
Rather than having some implied name for the logging name, explicitly
pass it in the macros LOG_MODULE_REGISTER & LOG_MODULE_DECLARE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-08-15 09:41:02 -05:00
Ulf Magnusson
0af60bc2c0 Kconfig: Document new def_{int,hex,string} extensions
These work like def_bool, setting the type and adding a default at the
same time. This extension fixes some Kconfig inconsistency.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-15 04:07:44 -07:00
Ulf Magnusson
17f1b0adec Kconfig: Switch to improved globbing statements
A design flaw of 'gsource' is that there's no way to require at least
one file to match the glob pattern. This could lead to silent errors.

Switch to a new design, where a plain 'source' is globbing and requires
at least one file to match. A separate 'osource' (optional source)
statement is available for cases where it's okay for a pattern (or plain
filename) to not match any files.

'orsource' combines 'osource' and 'rsource' (relative source).

This commit search-replaces 'gsource' with 'source', but backwards
compatibility with 'gsource' is still maintained by making it an alias
for 'osource' (and by making 'grsource' an alias for 'orsource').

The three Kconfig files arch/{nios2,posix,xtensa}/Kconfig source
arch/{nios2,posix,xtensa}/soc/*/Kconfig, which doesn't match any files.
Use 'osource' for those. The soc/*/Kconfig files seem to be for
additional SoC-specific symbols, only none exist yet on those ARCHes.

Also use 'osource' for the source of $ENV_VAR_BOARD_DIR/Kconfig in
boards/Kconfig, which doesn't exist for all boards.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-15 04:07:44 -07:00
Sebastian Bøe
3747b5ba84 doc: Document new app boilerplate requirement
Document that the boilerplate code included in all applications must
now also include

cmake_minimum_required(VERSION 3.8.2)

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-08-15 04:06:50 -07:00
Ulf Magnusson
bf8efdbf5b genrest: Generate RST links in a less hacky way
Use the new Kconfiglib expression printing customization functionality
to get rid of the hacky expr_str() overriding.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-13 19:31:46 -07:00
Paul Sokolovsky
028aae1ec9 net: config: Rename Kconfig options to correspond to library name
This finishes refactor of splitting off net_config library name from
net_app library, started in c60df1311, c89a06dbc. This commit makes
sure that Kconfig options are prefixed with CONFIG_NET_CONFIG_
instead of CONFIG_NET_APP_, and propagates these changes thru the
app configs in the tree.

Also, minor dependency, etc. tweaks are made.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-08-13 18:42:31 -07:00
Rajavardhan Gundi
d22cd76c9c CMSIS RTOS V1: Introduce CMSIS RTOS V1 API header file
CMSIS RTOS API provides a generic RTOS interface for embedded
processors (actually for Cortex-M processors but are generic
enough to be used elsewhere). This header file is for V1 version.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-08-13 13:08:07 -07:00
Laczen JMS
7d2e59813f subsys: fs/nvs: Rewrite for improved robustness
On flash NVS was stored one entry after another including the metadata
of each entry. This has the disadvantage that when an incomplete write
is performed (e.g. due to power failure) the complete sector had to be
rewritten to get a completely functional system.

The present rewrite changed the storage in flash of the data. For each
sector the data is now written as follows: the data itself at the
beginning of the sector (one after the other), the metadata (id, length,
data offset in the sector, and a crc of the metadata) is written from
the end of the sector. The metadata is of fixed size (8 byte) and for
a sector that is completely occupied a metadata entry of all zeros is
used.

Writing data to flash always is done by:
1. Writing the data,
2. Writing the metadata.

If an incomplete write is done NVS will ignore this incomplete write.

At the same time the following improvements were done:
1. NVS now support 65536 sectors of each 65536 byte.
2. The sector size no longer requires to be a power of 2 (but it
still needs to be a multiple of the flash erase page size).
3. NVS now also keeps track of the free space available.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2018-08-10 14:16:06 -07:00
Laczen JMS
b9dead0a42 subsys: fs/nvs: Improved nvs for larger blocksizes
The nvs module has some disadvantages for larger block size. The data
header and slot are taking up to much space. A rewrite is proposed that
reduces the used storage space for systems with write block size > 4.

The data storage in flash is now one unit consisting of: data_length,
data_id, data and data_length again in a multiple of the write block
size. The data_length at the end is used to validate the correctness of
the flash write and also allows to travel backwards in the filesystem.

As a comparison, on a system with block size 8 byte, a 32 bit values
now fits 1 block including the metadata (length and id). This used to
be 3 blocks.

The data_length will occupy 1 byte if the data length is less than 128
byte, it will occupy 2 byte if the data length is 128 byte or more. The
data length is limited to 16383 byte.

Each write to flash is verified by a read back of the data.

The read performance is improved because reading is done backwards so
the latest items are found first.

When the filesystem is locked it can be unlocked by calling
reinit(), this will clear flash and setup everything for storage.

add sample documentation - README.rst

Update dtsi to include erase_block_size, use erase_block_size in sample

Update prj.conf to include CONFIG_MPU_ALLOW_FLASH_WRITE

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2018-08-10 14:16:06 -07:00
Ulf Magnusson
d08a212ea2 Kconfig: Document the new prefer-earlier-defaults behavior
Update the documentation to say that earlier defaults are preferred,
while explaining Kconfig.defconfig files.

Keep the section that covered the Zephyr prefer-later-defaults patch as
documentation for the behavior having changed. It will be linked in a
warning later.

Also add documentation explaining how to configure choices, including
using multiple definition locations to change a choice 'default'.
Document that 'range's can be added/overriden as well. This works
reliably now.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-10 12:38:28 -07:00
Kumar Gala
d04eaf3baf doc: Fix warning associated with GNU ARM embedded rename
We missed one reference to GCC ARM Embedded when we renamed it to GNU
ARM Embedded.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-08-09 19:13:15 +02:00
Carles Cufi
957262e37d build: Replace GCC ARM Embedded with GNU Arm Embedded
The old GCC ARM Embedded website on launchpad
(https://launchpad.net/gcc-arm-embedded) has been superseeded by the new
GNU Arm Embedded one
(https://developer.arm.com/open-source/gnu-toolchain/gnu-rm).

This also means a change of name from "GCC" to "GNU". Reflect this in
the enviroment variables so that the proper term is used henceforth.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-09 13:57:55 +02:00
David B. Kinder
5c8398da05 doc: switch to use RTD theme
This PR removes use of the customized zephyr_docs_theme, replacing it
with the new read_the_docs theme.  It ignores the tags that were
previously used to switch the theme for "development" vs. "daily" or
"release" and always uses the RTD theme.  (The "daily" vs. "release" is
still honored to change the breadcrumb and doc version to "latest" if
"daily" is specified (as we did for the current doc build process),
otherwise it uses the version extracted from the
VERSION file in the source code (as would be appropriate for the docs
for a tagged release.)

This also pulls in using template extensions for breadcrumb and the
notice about latest having more up-to-date content when the "release"
tag is set.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-08-08 17:48:27 +02:00
Maureen Helm
0c5a88a6f7 doc: Update OpenSDA document for flashing with jlink
Flashing support was added to the jlink runner in commit
9f57d11d9b, but the OpenSDA document
wasn't updated accordingly. Update it now.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-08-08 10:12:00 +02:00
David B. Kinder
17d045244a doc: tweak doc build instructions
There was a remaining reference to a doc/Makefile that needed
to be changed to CMakeLists.txt

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-08-08 09:59:32 +02:00
Jesus Sanchez-Palencia
598276262c net: l2: Add support for Link Layer Discovery Protocol (LLDP)
The LLDP protocol defines 2 separate agents, the Transmitters and
the Receivers. For the context of Zephyr, we are only interested in
the Tx agent, thus we drop any LLDP frames received by Zephyr.

LLDP frames are basically composed by an ethernet header followed by
the LLDP Protocol Data Unit (LLDPDU). The LLDPDU is composed by several
TLVs, some of them being mandatory and some optional.

Our approach here is having TLVs fully configured from Kconfig, thus
having the entire LLDPDU constructed on build time.

The commit adds NET_ETH_PTYPE_LLDP definition and related handling.

If CONFIG_NET_LLDP is enabled then ethernet_context has a pointer to
the struct net_lldpdu that belongs to that ethernet interface. Also
when CONFIG_NET_LLDP is enabled, the LLDP state machine will start to
send packets when network interface is coming up.

Currently the LLDP state machine is just a k_delayed_work() sending the
LLDPDU at a given period (defined by CONFIG_NET_LLDP_TX_INTERVAL).

Fixes #3233

Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-08-08 09:53:24 +03:00
David B. Kinder
6750b8d2e8 doc: fix misspellings in docs
Occasional scan for misspellings missed during normal doc reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-08-08 01:49:14 -05:00
Carles Cufi
d6c56d57c3 doc: Remove unnecessary copy statements
Since we're now copying the whole doc/ folder into the output folder,
there's no need anymore to copy certain files by hand.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-07 21:31:38 +02:00
Carles Cufi
a33b15d253 doc: Remove workaround file
No longer needed since the contents of the doc/ folder are now copied
verbatim.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-06 21:56:57 +02:00
Carles Cufi
a0dbc7aa4b doc: Copy all doc/ contents and not just .rst files
To avoid having to refer to non-rst files artificially in order to get
them copied into the destination folder, make a raw full copy of the
doc/ folder instead of copying only the .rst files.

Fixes #9128

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-06 21:56:57 +02:00
David B. Kinder
2cf47fed38 doc: tweak table CSS for caption location
Table captions and figure captions, by default, appear in different
locations.  Move table captions below the table to match figures.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-08-06 09:45:13 -05:00
Marti Bolivar
55327a183d logging: fix runtime filtering initialization
The runtime filters (both aggregated and per-backend) are all getting
initialized to the default level CONFIG_LOG_DEFAULT_LEVEL. This is not
correct behavior: the initial runtime setting for each source ID
should match its compile-time level setting.

Otherwise, setting CONFIG_LOG_RUNTIME_FILTERING=y changes the logging
behavior for messages that pass the compile time filter check, but not
the runtime check (this currently happens when LOG_LEVEL=4, since
CONFIG_LOG_DEFAULT_LEVEL=3).

Fix this by initializing all filters to their module's compile time
settings. Also make sure that filters are set up before backends are
activated, to avoid race conditions.

Fix a stray documentation typo while we are here.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-08-02 19:18:05 +02:00
Marti Bolivar
df8d4e96ef logging: fix multi-file module support
The documentation says a module can be split up over multiple files,
but there's no good way to do that. In the file with the
LOG_MODULE_REGISTER() call, the definitions of the module's state
variables serve as declarations that LOG_DBG(), etc. can use. But in
other files making up the module, no such declarations are available,
and the macro expansion bombs out spectacularly and confusingly.

Fix this by adding a LOG_MODULE_DECLARE() macro which other files in
the module can use to declare the internal state used by the log
module, so that LOG_DBG() etc. work properly.

Keep the documentation up to date.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-08-02 19:18:05 +02:00
Arjun Warty
cd1705313f Doc: installation_linux.rst: Feedback Updates
Modified the web page to  make it direct and easier to understand.

Major changes being the selection of the directory in the Zephyr SDK
Installation and a Note added for the '.zephyrrc' to include the SDK
installation location if not default.

Minor changes involving the elimination of repeated use of same sentence
with different Host OS and indentation correction in the Fedora section
since it showed up in 'white text' rather than code block.

SDK's '.zephyrrc' documentation needed to have the default location and
the user defined location

Signed-off-by: Arjun Warty <arjun.warty@nxp.com>
2018-08-02 19:16:20 +02:00
Carles Cufi
7555476b4c doc: Replace title with logo in front page
Replace the current title with an image containing the Zephyr logo for
the root README.rst, in order to make the GitHub landing page more
attractive.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-02 18:56:08 +02:00
Alexei Colin
368826e951 doc: getting started: add Arch Linux package
The SDK has been packaged for Arch Linux and can be found
in Arch User Repository. Update the docs to make this known.
The package is useful because by installing it the user
gets all dependencies automatically installed.

Signed-off-by: Alexei Colin <ac@alexeicolin.com>
2018-07-31 20:21:41 -04:00
David B. Kinder
f3f266ea9d doc: more RTD theme tweaks
Change logo and increase logo size, remove RTD links to github source,
add CSS for :kbd: role (keyboard key press), change logo link to project
home rather than doc home (via zephyr-custom.js). Update 404 error page
for wider page layout, force page break before footer, show URL that got
you to the 404 page.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-31 20:19:19 -04:00
David B. Kinder
f6349c88af doc: simplify CONTRIBUTING, merge non-apache
Simplify the CONTRIBUTING file seen when submitting a PR, make
references to the full contributing documentation, and merge the
contributing non-apache licensed material.

fixes: #6188

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-26 22:15:49 -04:00
Maureen Helm
d7d1090422 doc: scripts: Updates for pyocd v0.11.1
pyocd recently added support for python 3 so we can now remove the
python 2 package requirements. It also merged Zephyr thread awareness
upstream, so we can remove the reference to my pyocd pull request.

Tested debugging and flashing on Linux and Windows.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-07-27 00:54:55 +02:00
David B. Kinder
d47bd0b5c3 doc: prepare for read_the_docs theme change
Add infrastructure for switching production documentation to use the
cleaner read_the_docs theme as noted in issue #6774.  This change won't
affect the current "daily" or "release" builds but will change local
builds that previously also used the RTD theme, but now have the version
selection capability added.

This PR also adds the Zephyr logo and favicon to the RTD-themed docs,
and moves the top level images into an images/ folder.

Note that issue #9128 requires workaround.rst to force a reference to
files needed for the build but not directly referened in a .rst file.
(When #9128 is fixed, we can remove this workaround.rst.)

Once merged and tested, we'll tweak the conf.py to use the RTD theme
for all doc builds (e.g, when DOC_TAG=daily or release) in a subsequent
PR.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-26 18:13:05 -04:00
David B. Kinder
4cac31b298 doc: fix doxygen error for BUILD_ASSERT_MSG
Similar to #8042, doxygen has issues with function macros (those that
don't end with a semicolon). Workaround is to have doxygen treat these
as predefined by the doxygen preprocessor.  Fixes a problem showing up
in PR #9140.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-26 18:12:42 -04:00
Shawn Mosley
573f32b6d2 userspace: compartmentalized app memory organization
Summary: revised attempt at addressing issue 6290.  The
following provides an alternative to using
CONFIG_APPLICATION_MEMORY by compartmentalizing data into
Memory Domains.  Dependent on MPU limitations, supports
compartmentalized Memory Domains for 1...N logical
applications.  This is considered an initial attempt at
designing flexible compartmentalized Memory Domains for
multiple logical applications and, with the provided python
script and edited CMakeLists.txt, provides support for power
of 2 aligned MPU architectures.

Overview: The current patch uses qualifiers to group data into
subsections.  The qualifier usage allows for dynamic subsection
creation and affords the developer a large amount of flexibility
in the grouping, naming, and size of the resulting partitions and
domains that are built on these subsections. By additional macro
calls, functions are created that help calculate the size,
address, and permissions for the subsections and enable the
developer to control application data in specified partitions and
memory domains.

Background: Initial attempts focused on creating a single
section in the linker script that then contained internally
grouped variables/data to allow MPU/MMU alignment and protection.
This did not provide additional functionality beyond
CONFIG_APPLICATION_MEMORY as we were unable to reliably group
data or determine their grouping via exported linker symbols.
Thus, the resulting decision was made to dynamically create
subsections using the current qualifier method. An attempt to
group the data by object file was tested, but found that this
broke applications such as ztest where two object files are
created: ztest and main.  This also creates an issue of grouping
the two object files together in the same memory domain while
also allowing for compartmenting other data among threads.

Because it is not possible to know a) the name of the partition
and thus the symbol in the linker, b) the size of all the data
in the subsection, nor c) the overall number of partitions
created by the developer, it was not feasible to align the
subsections at compile time without using dynamically generated
linker script for MPU architectures requiring power of 2
alignment.

In order to provide support for MPU architectures that require a
power of 2 alignment, a python script is run at build prior to
when linker_priv_stacks.cmd is generated.  This script scans the
built object files for all possible partitions and the names given
to them. It then generates a linker file (app_smem.ld) that is
included in the main linker.ld file.  This app_smem.ld allows the
compiler and linker to then create each subsection and align to
the next power of 2.

Usage:
 - Requires: app_memory/app_memdomain.h .
 - _app_dmem(id) marks a variable to be placed into a data
section for memory partition id.
 - _app_bmem(id) marks a variable to be placed into a bss
section for memory partition id.
 - These are seen in the linker.map as "data_smem_id" and
"data_smem_idb".
 - To create a k_mem_partition, call the macro
app_mem_partition(part0) where "part0" is the name then used to
refer to that partition. This macro only creates a function and
necessary data structures for the later "initialization".
 - To create a memory domain for the partition, the macro
app_mem_domain(dom0) is called where "dom0" is the name then
used for the memory domain.
 - To initialize the partition (effectively adding the partition
to a linked list), init_part_part0() is called. This is followed
by init_app_memory(), which walks all partitions in the linked
list and calculates the sizes for each partition.
 - Once the partition is initialized, the domain can be
initialized with init_domain_dom0(part0) which initializes the
domain with partition part0.
 - After the domain has been initialized, the current thread
can be added using add_thread_dom0(k_current_get()).
 - The code used in ztests ans kernel/init has been added under
a conditional #ifdef to isolate the code from other tests.
The userspace test CMakeLists.txt file has commands to insert
the CONFIG_APP_SHARED_MEM definition into the required build
targets.
  Example:
        /* create partition at top of file outside functions */
        app_mem_partition(part0);
        /* create domain */
        app_mem_domain(dom0);
        _app_dmem(dom0) int var1;
        _app_bmem(dom0) static volatile int var2;

        int main()
        {
                init_part_part0();
                init_app_memory();
                init_domain_dom0(part0);
                add_thread_dom0(k_current_get());
                ...
        }

 - If multiple partitions are being created, a variadic
preprocessor macro can be used as provided in
app_macro_support.h:

        FOR_EACH(app_mem_partition, part0, part1, part2);

or, for multiple domains, similarly:

        FOR_EACH(app_mem_domain, dom0, dom1);

Similarly, the init_part_* can also be used in the macro:

        FOR_EACH(init_part, part0, part1, part2);

Testing:
 - This has been successfully tested on qemu_x86 and the
ARM frdm_k64f board.  It compiles and builds power of 2
aligned subsections for the linker script on the 96b_carbon
boards.  These power of 2 alignments have been checked by
hand and are viewable in the zephyr.map file that is
produced during build. However, due to a shortage of
available MPU regions on the 96b_carbon board, we are unable
to test this.
 - When run on the 96b_carbon board, the test suite will
enter execution, but each individaul test will fail due to
an MPU FAULT.  This is expected as the required number of
MPU regions exceeds the number allowed due to the static
allocation. As the MPU driver does not detect this issue,
the fault occurs because the data being accessed has been
placed outside the active MPU region.
 - This now compiles successfully for the ARC boards
em_starterkit_em7d and em_starterkit_em7d_v22. However,
as we lack ARC hardware to run this build on, we are unable
to test this build.

Current known issues:
1) While the script and edited CMakeLists.txt creates the
ability to align to the next power of 2, this does not
address the shortage of available MPU regions on certain
devices (e.g. 96b_carbon).  In testing the APB and PPB
regions were commented out.
2) checkpatch.pl lists several issues regarding the
following:
a) Complex macros. The FOR_EACH macros as defined in
app_macro_support.h are listed as complex macros needing
parentheses.  Adding parentheses breaks their
functionality, and we have otherwise been unable to
resolve the reported error.
b) __aligned() preferred. The _app_dmem_pad() and
_app_bmem_pad() macros give warnings that __aligned()
is preferred. Prior iterations had this implementation,
which resulted in errors due to "complex macros".
c) Trailing semicolon. The macro init_part(name) has
a trailing semicolon as the semicolon is needed for the
inlined macro call that is generated when this macro
expands.

Update: updated to alternative CONFIG_APPLCATION_MEMORY.
Added config option CONFIG_APP_SHARED_MEM to enable a new section
app_smem to contain the shared memory component.  This commit
seperates the Kconfig definition from the definition used for the
conditional code.  The change is in response to changes in the
way the build system treats definitions.  The python script used
to generate a linker script for app_smem was also midified to
simplify the alignment directives.  A default linker script
app_smem.ld was added to remove the conditional includes dependency
on CONFIG_APP_SHARED_MEM.  By addining the default linker script
the prebuild stages link properly prior to the python script running

Signed-off-by: Joshua Domagalski <jedomag@tycho.nsa.gov>
Signed-off-by: Shawn Mosley <smmosle@tycho.nsa.gov>
2018-07-25 12:02:01 -07:00
Krzysztof Chruscinski
c12fa740a2 logging: Remove log.h including in headers limitation
Added macro trick which evaluates macro when used and not
when header file is included. After this change order of
defining LOG_LEVEL and including log.h is no longer fixed.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-19 10:05:00 -04:00
Carles Cufi
e182dbc22e doc: cmake: Enable out-of-tree builds
The following changes have been made to support out-of-tree builds:

* In order to avoid using relative hardcoded paths, use CMake's
  configure_file() to replace the paths in the doxygen input file
  so that the output directory is set correctly.
* All .rst and additional required files are now copied from the doc/
  folder into the build/rst folder using extract_content.py. The
  samples/ and boards/ folder are copied twice (once into build/rst
  and another into build/doc/rst) to manage relative paths.
* All paths are absolute where possible, including themes and static
  content.

This patch ensures that the Zephyr repo is not contaminated by the
build at all.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-19 08:44:41 -04:00
Carles Cufi
16155ad93a doc: windows: Clarify Python paths
In order to make things simpler for the user, remove the
`--user` flag when invoking pip and pip3 so that executables are placed
in the <Python>\Scripts folder, which is added to the PATH
automatically.
Additionally clarify and clean up the documentation tools section.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-18 15:48:29 -05:00
Carles Cufi
60c5540dbf doc: cmake: Conditionally add USES_TERMINAL to html targets
When using Ninja, output will be buffered until the command completes
unless USES_TERMINAL is used. Use USES_TERMINAL here so that output is
sent directly to the terminal without having to wait. This is a bit of
an abuse of the Ninja console pool, but for building documentation this
should not be an issue since it's a self-contained CMake project.
Note that this is done conditionally, only when Sphinx output is not
disabled by using its "-q" flag.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-17 11:08:25 +02:00
Carles Cufi
7896451713 doc: cmake: Use proper dependencies
Properly use add_dependencies() instead of DEPENDS for the custom
targets.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-17 11:08:25 +02:00
Daniel Leung
62b8489635 doc: getting_started: add instructions to build on Clear Linux
This expands the Development Environment Setup on Linux guide to
include instructions for Clear Linux.

Tested on Clear Linux build 23610.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-07-16 21:02:24 -04:00
Krzysztof Chruscinski
46db70ac4c doc: subsys: logging: internal thread and thread wake up
Documenting new logger features: waking up processing thread
and internal logger processing thread.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-16 11:12:16 -04:00
Carles Cufi
2516aa07e4 doc: Add doxygen to Chocolatey package list
In order to build the documentation one needs Doxygen. Now that building
the documentation is supported on Windows, include this package.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-13 15:02:24 -04:00
Carles Cufi
2af9a9e628 doc: cmake: Use flexible variables for inclusion
In order to be able to use this CMakeLists.txt file from other projects,
use the proper variables so that they refer to their own paths.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-13 19:26:22 +02:00
Carles Cufi
d505ca7081 doc: cmake: Fix argument parsing
Fix the way a list is constructed during argument parsing so that CMake
propagates the options correctly to Sphinx.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-13 07:25:02 -04:00
Carles Cufi
247ca67cea doc: sphinx: Reshuffle sphinx cmd-line options
Move options to the place they belong ([OPTIONS] SOURCEDIR OUTPUTDIR)
according to sphinx itself.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 23:11:46 -04:00
Carles Cufi
45d58a7bb1 cmake: Rename process.cmake to reflect contents
Rename process.cmake to reflect its contents: executing the CMake
command "execute_process".

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 23:11:46 -04:00
Carles Cufi
60a9e1a7c7 doc: Remove unused filter-doc-log.sh
The filter-doc-log.sh script is no longer used since its functionality
has been moved to the CMakeLists.txt and filter-known-issues.py.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 01:26:05 +02:00
Carles Cufi
5ead0a52a5 doc: Remove old Makefile
With the transition to CMake, the old Makefile is not required anymore.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 01:26:05 +02:00
Carles Cufi
7480f17d50 doc: Change Makefile and doc for building docs to CMake
Now that CMake is supported for building the docs, adapt the
instructions to build the documentation to the new mechanism and also
adapt the root-level Makefile to support building using CMake.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 01:26:05 +02:00
Carles Cufi
ae69934cb9 doc: Support building with CMake
Add a new CMakeLists.txt that is capable of building the documentation.
Note that the error checkin currently only works on Unix platforms since
it's tied to a shell script.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-07-12 01:26:05 +02:00
Jukka Rissanen
2dc28b495e doc: net: gptp: Enhance gPTP documentation
Add TSN (Time Sensitive Networking) description to networking
overview document. Also make sure that gPTP documents are linked
together properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-06 19:19:26 -04:00
Jukka Rissanen
c7bb8c21ac doc: net: gptp: Fix gptp API function description
The user API function descriptions were pointing to wrong
function documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-06 19:19:26 -04:00
Krzysztof Chruscinski
5ea5b8d35f doc: subsys: logging: Add documentation for new logger
Documentation for new logger subsystem.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-07-06 19:18:19 -04:00
Jukka Rissanen
489b27a22b doc: net: Fix source tree layout documentation
The subsys/net/l2 directory was recently introduced so add it to
the documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-06 19:17:35 -04:00
Yasushi SHOJI
e09af5f008 doc: enhance cross compile section in getting started
"Getting Started" does not clearly state how to use a custom cross
compiler.  This patch adds a new section "Using Custom Cross
Compilers" to it.

To support users without SDK, we have the section "Building without
the Zephyr SDK".  But the section is all about prebuilt tools in the
SDK but not build process.  This patch adds two pointers "Using 3rd
Party Cross Compilers" and "Using Custom Cross Compilers" pointing to
the actual building process, and let those section describe
ZEPHYR_TOOLCHAIN_VARIANT, which is cross compilers dependent variable.

The patch also clarify what a 3rd party cross compiler is and what a
custom compiler is.

Signed-off-by: Yasushi SHOJI <y-shoji@ispace-inc.com>
2018-07-05 09:04:09 -04:00
Xuan Ze
8c94b5353a doc: device: dts: Fix the error in the doc.
Fix punctuation error.

Signed-off-by: Xuan Ze <119524428@qq.com>
2018-07-05 07:51:51 -04:00
Alberto Escolar Piedras
c026c2ed82 sanitycheck: control coverage from command line
Added a new command line options to sanitycheck:
--enable-coverage which will compile for native_posix
with CONFIG_COVERAGE set, and unit tests accordingly.
+
Now -C --coverage implies also --enable-coverage.

Background:
After 608778a4de
it is possible to add Kconfig options from command
line during the cmake invocation.
So we can use it to set CONFIG_COVERAGE for the native_posix
target when we need to instead of relaying on it always
being compiled with coverage enabled.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-07-03 08:36:06 -04:00
Jukka Rissanen
8c5c111c97 doc: net: Add information about gPTP
Add gPTP information to documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Julien Chevrier <julien.chevrier@intel.com>
2018-06-28 16:50:50 +03:00
Jukka Rissanen
45b06a252f net: gptp: Initial core IEEE 802.1AS support
Core IEEE 802.1AS-2011 (gPTP) support and application interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Julien Chevrier <julien.chevrier@intel.com>
2018-06-28 16:50:50 +03:00
qianfan Zhao
af05ff6c55 doc: Introduct debugging and downloading using Jlink on stm32 boards
Introduct the ways to debugging and downloading using JLink tools on
stm32 boards if had convented ST-Link On-Board into a JLink.

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-06-27 15:48:38 -05:00
Ulf Magnusson
35ec18ac08 genrest: Mention implicit default values
It's common for people to put in a 'default n' "just in case", because
it might not be obvious that bool symbols implicitly default to 'n'. To
make it clearer, mention the implicit default value on the reference
pages of symbols without defaults.

Also mention that choices without defaults default to the first
(visible) symbol in the choice.

Note: Adding to the confusion, Kconfig used to generate a
'# CONFIG_FOO is not set' line for 'default n', but no output when there
was no default. I changed that recently in both the C tools and
Kconfiglib. There's no output either case now (unless the symbol is
visible).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-26 14:40:04 +02:00
Carles Cufi
457450522e doc: dt: Clarify the relationship between DT and Kconfig
Try to clarify the scope of Device Tree vs Kconfig in order to allow
Zephyr users to identify where a particular configuration option when
developing an application, board support or SoC support.

Fixes #7230

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-06-25 16:41:10 +02:00
David Brown
00ef6b5e3c doc: Enumerate threats in model
Certain external requirements require justification that threats in a
threat model have been satisfied.  In order to do this, the threats must
be enumerated, and given labels.

Add labels to the threats.  Use rts's citation model to allow the
threats to be grouped and listed at the end of the document to help with
cross referencing.

Signed-off-by: David Brown <david.brown@linaro.org>
2018-06-22 12:30:06 -04:00
Sebastian Bøe
608778a4de cmake: Support specifying Kconfig options on the CLI
This resolves #5723 by adding support for assigning to Kconfig options
from the CMake CLI.

CMake CLI Kconfig options can be specified like so:

'cmake -DCONFIG_ASSERT=y'

The lifetime of such an option is the same as the lifetime of a CMake
cache variable, and in principle any method of populating the
CMakeCache could be used, such as cmake-gui.

This has been implemented by scanning the CMakeCache variables before
Kconfig is executed and writing any that are prefixed with 'CONFIG_'
to a new Kconfig fragment in the build directory that is merged in
with a high precedence.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-06-20 15:40:24 -04:00
David B. Kinder
a9e0d14bee doc: fix misspelling in vlan document
fix misspellings missed during regular review

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-20 12:37:15 -04:00
Jukka Rissanen
cf9bfb20f1 doc: net: Add information about websocket server API
Websocket server side support was not mentioned in network
overview.rst document.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-06-20 12:06:58 -04:00
David B. Kinder
934a4d2b13 doc: fix genrest.py to use utf-8 encoding
The genrest.py script (used to create the Kconfig configuration option
documentation) was depending on the environment's locale settings to
properly handle UTF-8 character encoding in the reST files it creates.
When we reused this script for another project, that environment's
LC_CTYPE was set to C, telling Python to use ASCII as the (default)
encoding.  This patch is a prophylactic measure to prevent potential
failures by adding the encoding option on the open() calls.

It also includes a small tweak to the introduction.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-19 20:16:59 -04:00
David B. Kinder
3bdb52f1ad doc: improved error reporting for non-UTF8 docs
Improve error reporting to include the filename being processed when a
problem occurs during a pre-generation phase when boards and samples
files are temporarily copied (by doc/scripts/extract_content.py) into
the documentation area for processing.

Two recent problems were noticed:

  Some new files were using window-1252 encoding and included windows
  printer quote marks and hyphens, for example 0x92 in window-1252
  encoding is Unicode 0x2019 for 'RIGHT SINGLE QUOTATION MARK'.

  An image file reference by a reST file was missing

Both of these threw an exception reporting the error, but did not
include any information about the file currently being processed, making
it hard to fix the problem (e.g., change the Windows right quote
character to an ASCII ').

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-18 19:35:21 -04:00
David B. Kinder
de6d61d110 doc: remove local copy of jquery.js
With the update to Sphinx, we no longer need to provide our own updated
version of jquery.js (update is now part of the Sphinx release).

See #5591 and #5618

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-18 12:42:46 -04:00
David B. Kinder
a3d83ec9f4 doc: update doc build tools documentation
Update the doc build tools versions listed in requirements.txt (and
mentioned in the doc building instructions).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-18 12:42:18 -04:00
Rodrigo Peixoto
f5e3813010 docs: Fix mailbox k_mbox_msg.tx_block documentation
- Replace old tx_block.pool_id to tx_block.data;
- Fix code examples.

Signed-off-by: Rodrigo Peixoto <rodrigopex@ayna.tech>
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-14 18:00:17 -04:00
Michael R Rosen
92f146ea7a doc: update application docs wrt CONF_FILE
Update the application documentation to discuss the new ability to
use semicolons as separators when there are multiple files. Enabling
semicolon separators also enables CMake lists to manipulate CONF_FILE
from the application side.

Signed-off-by: Michael R Rosen <michael.r.rosen@intel.com>
2018-06-11 17:26:39 -04:00
David B. Kinder
4dcf928a40 doc: fix doxygen error for device.h macros
Doxygen has issues with function macros (those that don't end with a
semicolon).  Workaround is to have doxygen treat these as predefined by
the doxygen preprocessor.

Fixes: #7367

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-11 17:26:14 -04:00
David B. Kinder
5890004ea7 release: 1.12 doc cleanup
Fix typo in 1.12 release notes, remove old doc version links (before
1.9)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-11 15:16:19 -04:00
Ulf Magnusson
31ab6bffb2 genrest: Generate documentation and links for choices
Until now, choices have kinda been a black box in the Kconfig reference,
and hid the dependencies of choice symbols (because choice symbols
depend directly on the choice rather than on whatever the choice
'depends on').

Generate separate information pages for choices and turn <choice>
dependencies into links.

One complication is that choices (usually) don't have names. Use the
index of each choice in the Kconfig files (first choice seen = choice 0,
then choice 1, etc.) instead to identify each choice.

Choice reference pages include the same information as symbol reference
pages (minus some things that don't apply for choices), and also list
the choice symbols contained in the choice.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:40:48 -04:00
Ulf Magnusson
a760c5b029 doc: Makefile: Remove latex_paper_size (PAPER) option
This configuration variable was removed in Sphinx 1.6:
http://www.sphinx-doc.org/en/master/changes.html#id35. I suspect no one
might be using it. It could still be passed in SPHINXOPTS if needed.

Maybe the paper size should be set from Python instead:
http://www.sphinx-doc.org/en/master/usage/configuration.html

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:37:04 -04:00
Ulf Magnusson
9af9b1fbdb doc: Makefile: Lowercase internal Make variables
Makes it easier to tell which variables can be set directly by the user.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:37:04 -04:00
Ulf Magnusson
fa121da196 doc: Makefile: Remove the 'prep' target
Only used to add some prereqs to the 'json' target. Put the prereqs
directly on the 'json' target instead.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:37:04 -04:00
Ulf Magnusson
953dfe75e5 doc: Makefile: Remove the 'doxy-code' target
Identical with the 'doxy' target. Move the 'doxy-code' recipe over to
'doxy' and remove 'doxy-code'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:37:04 -04:00
Ulf Magnusson
5917f9b605 doc: Makefile: Remove CONFIG_SHELL assignment
CONFIG_SHELL seems to be some autoconf thing
(https://www.gnu.org/software/autoconf/manual/autoconf.html). Maybe this
was meant to be SHELL, which Make looks at. Would probably be rare to
run a non-compatible shell here though.

CONFIG_SHELL isn't exported, so it isn't visible to the recursive make
invocations ($(MAKE) -C ...) either.

Remove it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:37:04 -04:00
Maureen Helm
51ae306b59 doc: release notes: Finalize 1.12 release notes and docs
Removes the "draft" tag from the 1.12 release notes and adds a 1.12 link
on the release notes page. Adds a link to the 1.12 docs on the home
page.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-11 10:36:43 -05:00
Maureen Helm
d3afa353a8 doc: release notes: Update 1.12 release notes with more GitHub issues
Adds a few more issues that were closed just prior to the 1.12 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-11 10:35:32 -05:00
Maureen Helm
8e89206815 doc: release notes: Update 1.12 release notes with GitHub issues
Lists all the GitHub issues closed since the 1.11.0 release (Fri Mar 9
2017).

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-09 13:33:46 -05:00
Andy Gross
d6f2858a14 doc: relnotes: Add security vulnerability information
This patch adds notes for the security related changes going into
release 1.12.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-06-08 16:45:47 -05:00
Marti Bolivar
f8251693bb conf.py: clean up exit if ZEPHYR_BASE is unset
Suggested by Ulf Magnusson.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
869e9cce01 doc: add initial west documentation
This covers its design and scope, and provides usage and some
implementation documentation on the existing flashing and debugging
commands.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
3a766aedf0 doc: conf.py: add sphinx.ext.autodoc extension
This will allow us to pull in Python API documentation from source
files.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
1c852ddf5c doc: conf.py: make sure west is importable from Python
We need this to be able to pull in its API documentation.

This will need modifications when multi-repo support is available, in
order to get the imports from the independent West repo, but for now
just use the copy in Zephyr.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
e802d8de35 doc: conf.py: remove unused import
Make a pep8 linter happier.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
e8d0e72adf doc: extensions: fix :app: behavior for zephyr-app-commands
The directive is not generating the right "mkdir" steps when used with
the :app: option. Fix it.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
c6c1501355 getting_started: building: fix inaccuracies
The building and running section is out of date, as Windows and macOS
commands are available now.

It also has some accuracies:

- the following section describes how to build hello_world, not how to
  make a new application based on it

- zephyr-env scripts do more than just set project-specific
  environment variables (they modify PATH on Unix, and may run
  arbitrary RC scripts on all platforms)

Fix these issues.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
64ab13264a getting_started: fixes and cleanups for installation_linux
Miscellaneous fixes and concision improvements.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
9ca4d84079 getting_started: fixes for intro section
Commas are needed before coordinating conjunctions joining independent
clauses. Two backticks are needed for teletype fonts.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
3fc206fa53 getting_started: fix UNIX-ism
Now that the instructions work on Windows, delete a reference to
~ (the user's home on a Unix system) in the text.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Andy Gross
8b9042c419 doc: security: Remove revision history
This patch removes the revision history from the security overview
document.  With this file being maintained in git, there is no need
for an additional in-document revision history table.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-06-07 18:05:01 -05:00
Andy Gross
2825f79a2c doc: security: Update security overview for recent features
This patch revises the security overview document to bring the
information pertaining to stack protection, thread separation,
and memory protection up to date with the current state of the
software releases.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-06-07 18:05:01 -05:00
Carles Cufi
b0abf365af doc: relnotes: 1.12 Bluetooth release notes
List the notable changes in the Bluetooth subsystem for the 1.12 release
notes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-06-06 15:54:08 -05:00
Carles Cufi
59027fb689 doc: relnotes: Correct a couple of headline items
Minor changes to the persistent storage support and settings subsystem
headlines.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-06-06 15:54:08 -05:00
David B. Kinder
d04a7efd8d releasenotes: updated documentation changes
Included additional documentation changes for this release

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-06 09:45:36 -04:00
Maureen Helm
72d4d8bce1 doc: release notes: Fill in summary, arch, and kernel sections for 1.12
Fills in the summary section with roadmap features added in the 1.12
release. Fills in the architectures and kernel sections with notable
additions and changes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-06 09:44:41 -04:00
David B. Kinder
265f502b8e releasenotes: update with doc issues addressed
Add documentation changes with this release

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-05 14:18:19 -05:00
Spoorthi K
711adb89ba doc: Update release note for 1.12
Added additional tests for threads and memory domain.
Documented test cases in kernel.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-06-04 11:43:04 -04:00
Ulf Magnusson
972386d7a3 genrest: Highlight Kconfig as Kconfig, not Python
Sphinx defaults to Python highlighting, but a Kconfig lexer is available
as well
(http://pygments.org/docs/lexers/#pygments.lexers.configs.KconfigLexer).
Use it.

This only highlights Kconfig definitions without links (references to
other symbols), as Sphinx doesn't highlight '.. parsed-literal::' blocks
with links. It's an improvement over Python stuff getting highlighted at
least.

Side note: '.. highlight:: none' still gives '.. parsed-literal::'
blocks without links a different background color, for whatever reason.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-01 09:07:05 -04:00
David B. Kinder
7760b941f9 doc: fix misspellings in docs
Scan and fix misspellings missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-01 09:01:43 -04:00
Jukka Rissanen
d58efe7724 doc: net: Add information about network traffic classification
Add information about traffic class support in Zephyr.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-06-01 09:01:25 -04:00
Jukka Rissanen
e5be22fab2 doc: net: Add information about VLANs
Add description about virtual LAN support in Zephyr.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-06-01 09:01:25 -04:00
Henrik Brix Andersen
f1eda7b9e0 doc: updated doc for Zephyr release 1.12.
Mention the new iBeacon sample application in the release notes.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-05-31 08:58:55 -05:00
Punit Vara
5d50d13667 doc: Update doc for POSIX feature
Added POSIX semaphore to release notes.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-30 08:30:17 -04:00
Rajavardhan Gundi
98fcaf29ec release: Update release notes with CAVS ICTL info
Update the release notes with CAVS interrupt controller info.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-05-30 08:29:15 -04:00
Maureen Helm
9d8c630bcd doc: release notes: Add details to various sections for 1.12 release
Fills in the boards, drivers, build, and hals subsections with major
additions and changes in the 1.12 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-29 16:18:54 -04:00
Punit Vara
c4bbdc70d1 doc: Update doc for posix feature
Update doc with posix mutex feature and test case added.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-29 15:40:40 -04:00
Ramakrishna Pallala
cf8ee7372d doc: updated doc for Zephyr release 1.12.
Updated doc for release 1.12 for :-

Kernel:
Added k_thread_foreach API

Libraries / Subsystems:
subsys/disk: Added support for multiple disk interfaces
subsys/fs: Added support for multiple instances of filesystem
subsys/fs: Added Virtual File system Switch (VFS) support

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-28 08:47:05 -04:00
Anas Nashif
92b9d9606d doxygen: enable more option for docs
Enable options to allow doxygen parsing those members of structs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-26 09:16:42 -04:00
David Brown
a7ffc83bcc doc: Create a sensor threat model doc
Add a doc to the security section enumerating a threat model for a
sensor-type device.  This will help the direction of work to meet these
security requirements for this particular application.

Signed-off-by: David Brown <david.brown@linaro.org>
2018-05-25 17:23:07 -04:00
Anas Nashif
1c7ba097b5 sanitycheck: document --device-testing feature
Document testing on hardware using sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-24 16:55:55 -04:00
Anas Nashif
0a9a505e73 sanitycheck: update script arguments
Update sanitycheck script arguments with latest commands.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-24 16:55:55 -04:00
David B. Kinder
11c6306f76 doc: tweak CSS for option table display
Noticed in docs.zephyrproject.org/subsystems/test/sanitycheck.html that
the first column of the option table display is too narrow (for short
option names that are shown on the same line as the description).  This
PR tweaks the CSS to widen the first column enough to stop wrapping in
most cases.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-24 16:15:24 -04:00
Jukka Rissanen
993f6db76d doc: Add networking information to 1.12 release note
Contains major networking changes between 1.11 and 1.12 releases.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-05-24 08:19:25 -05:00
Anas Nashif
a50a388b2d doc: build with CONFIG_USERSPACE enabled
Add references to APIs being tested and groups tests correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Anas Nashif
9e4f25bbad doxygen: reference requirements
Add special command @req to reference requirements. This will help with
traceability between tests and requirements using doxygen.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Andrew Boie
1fd8b139c8 doc: update syscall docs to new handler APIs
The syscall handler APIs were renamespaced and have
different semantics now.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-23 16:58:16 -04:00
David B. Kinder
6c6cf23d4d doc: fix misspellings in docs
Caught some misspellings missed by the normal review process.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-23 16:57:33 -04:00
Andy Ross
7aa25fa5eb kernel: Add "meta IRQ" thread priorities
This patch adds a set of priorities at the (numerically) lowest end of
the range which have "meta-irq" behavior.  Runnable threads at these
priorities will always be scheduled before threads at lower
priorities, EVEN IF those threads are otherwise cooperative and/or
have taken a scheduler lock.

Making such a thread runnable in any way thus has the effect of
"interrupting" the current task and running the meta-irq thread
synchronously, like an exception or system call.  The intent is to use
these priorities to implement "interrupt bottom half" or "tasklet"
behavior, allowing driver subsystems to return from interrupt context
but be guaranteed that user code will not be executed (on the current
CPU) until the remaining work is finished.

As this breaks the "promise" of non-preemptibility granted by the
current API for cooperative threads, this tool probably shouldn't be
used from application code.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-05-23 14:25:52 -04:00
Ulf Magnusson
8e7a00512b doc: Makefile: Use phony targets and remove unneeded prereqs
Turn 'content', 'kconfig', and 'prep' into phony targets so that the
docs can be built even if there is a file called e.g. 'kconfig' in
zephyr/doc/.

Also remove the Python scripts as prerequisites from the rules and
reference them directly in the recipes instead. The phony targets are
always "out-of-date", and there are no rules to run for the Python
scripts themselves.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-22 13:31:56 -04:00
Ulf Magnusson
06ecb287fc genrest: Move from doc/scripts/genrest/ to doc/scripts/
Having a single directory with just genrest.py feels a bit pointless.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-22 13:31:56 -04:00
Ulf Magnusson
b45e152ff0 menuconfig/genrest: Exclude implicit submenus from menu paths
Make all menu paths ("(top menu) -> menu -> submenu -> ...") exclude
implicit submenus, which are shown indented in the menuconfig interface
and are created when items depend on the symbol before them.

Previously, implicit submenus were excluded in the menu path at the top
of the menuconfig interface, but were included in the menuconfig symbol
information dialog and in the docs generated by genrest.py.

This makes it consistent, and un-spams the documentation for some
symbols a bit.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-22 13:31:56 -04:00
Diego Sueiro
dcc9cefe09 doc: i.MX7 updated doc for Zephyr release 1.12
i.MX7 updated doc sections for Zephyr release 1.12:

Architectures:
    nxp_imx/mcimx7_m4: Added support for i.MX7 Cortex M4 core

Boards:
    colibri_imx7d_m4: Added support for Toradex Colibri i.MX7 board

Drivers and Sensors:
    serial: Added support for i.MX UART interface
    gpio: Added support for i.MX GPIO

HALs:
    nxp/imx: imported i.MX7 FreeRTOS HAL

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-05-22 13:30:30 -04:00
Savinay Dharmappa
3fb20eb8ed doc: updated doc for Zephyr release 1.12.
Updated doc for release 1.12 for :-

1. Added device tree support for nios2 based boards.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-21 22:48:31 -04:00
Ulf Magnusson
aa26289458 kconfig: Get rid of leading/trailing whitespace in prompts
Leading/trailing whitespace in prompts requires ugly workarounds in
genrest.py, as e.g. *prompt * is invalid RST. strip() all prompts in
Kconfiglib and get rid of the genrest.py workarounds. Add a warning too.

The Kconfiglib update has some unrelated cleanups and fixes (that won't
affect Zephyr).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-19 09:26:39 +03:00
David B. Kinder
f93ca23765 doc: mark bt_test_cb API as not documented
add a comment so the script for checking undocumented defgroups doesn't
report this internal API as not documented

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-19 09:23:10 +03:00
David B. Kinder
ef927a87ec doc: fix missing networking API documentation
Inspired by #7666, I scanned for other doxygen defgroups that weren't
mention in the documentation and found these:

   vlan  (defined in net/ethernet_vlan.h)
   ieee802154_mgmt  (defined in net/ieee802154_mgmt.h)
   ethernet_mgmt  (defined in net/ethernet_mgmt.h)

Added these to networking .rst, and also added one more level to the
toctree directive to show these nested groups in the table of contents.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-19 09:22:40 +03:00
David B. Kinder
d1d0dd45ed doc: fix missing NVS API documentation
Sphinx only displays API documentation for items within the specified
doxygen defgroup, and importantly, not the subgroups of this defgroup.

If you define a defgroup with defgroup children, you need to tell Sphinx
to display API information about the child defgroups too.  (If the
parent defgroup has no entities of it's own, you can leave that out.)

This patch replaces the (empty) display of the parent defgroup with that
of its two child defgroups.

It also fixes an unnecessarily long text line while I was in there.

Fixes: #7666

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-19 09:22:14 +03:00
Ulf Magnusson
09c813793b doc: genrest: Speed up documentation rebuilding
Skip writing index and symbol RST files whose content hasn't changed, to
avoid updating their timestamps. This makes documentation rebuilds much
faster, as Sphinx looks at the timestamp to determine if an RST file has
been updated.

Rebuilding docs with symbol reference up-to-date, before:

    $ time make html
    real    4m52.838s
    user    4m46.242s
    sys     0m4.249s

After:

    $ time make html
    real    0m48.731s
    user    0m47.571s
    sys     0m0.908s

Testing was done with 'make VERBOSE=1 SPHINXOPTS= html', suggested by
Marti Bolivar.

Piggyback a small cleanup to the code generating the select/imply
information.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-18 14:09:20 +03:00
Ulf Magnusson
aa9fe26166 doc: genrest: Show properties on the correct symbol definition
Previously, symbols defined in multiple locations (e.g.,
Kconfig.defconfig symbols) would incorrectly get all their defaults,
selects, implies, and ranges displayed on the first definition.

This commit uses the Kconfiglib functionality added in 53af8db920066
("kconfiglib: Record which MenuNode has each property") to show such
symbols with all properties in the right location.

The definitions are now listed one-by-one, with the filename/linenr
displayed before each definition. The menu path (e.g.,
'(top menu) -> Device Drivers') is now listed for each definition as
well.

Fixes: #6879

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-17 23:55:07 +03:00
Ulf Magnusson
4dc9e5b2de kconfig: Get rid of 'option env' bounce symbols
This commit gets rid of the 'option env="ENV_VAR"' bounce symbols.
"$FOO" now expands directly to the value of the environment variable
FOO, instead of to the value of the Kconfig symbol FOO.

This change is likely to soon appear in the C tools as well. Those
'option env' symbols always seemed kinda pointless, and have broken
dependency handling due to forcing symbol evaluation during parsing,
before all the symbols have even been seen.

Compatibility with the C tools could be retained by naming all
'option env' symbols the same as the environment variable they
reference.

This commit also updated the Zephyr documentation to explain the new
behavior. It's relevant for $ZEPHYR_BASE and out-of-tree Kconfig
extensions.

Commit message from Kconfiglib (cbf32e29a130d)
==============================================

Make "$FOO" directly reference the environment variable $FOO in e.g.
'source' statements, instead of the symbol FOO. Use os.path.expandvars()
to expand strings (which preserves "$FOO" as-is if no environment
variable FOO exists).

This gets rid of the 'option env' "bounce" symbols, which are mostly
just spam and are buggy in the C tools (dependencies aren't always
respected, due to parsing and evaluation getting mixed up). The same
change will probably appear soon in the C tools as well.

Keep accepting 'option env' to preserve some backwards compatibility,
but ignore it when expanding strings. For compatibility with the C
tools, bounce symbols will need to be named the same as the environment
variables they reference (which is the case for the Linux kernel).

This is a compatibility break, so the major version will be bumped to 6
at the next release.

The main motivation for adding this now is to allow recording properties
on each MenuNode in a clean way. 'option env' symbols interact badly
with delayed dependency propagation.

Side note: I have a feeling that recording environment variable values
might be redundant to trigger rebuilds if sync_deps() is run at each
compile. It should detect all changes to symbol values due to
environment variables changing value.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-17 23:55:07 +03:00
Andrew Boie
2b9b4b2cf7 k_queue: allow user mode access via allocators
User mode may now use queue objects. Instead of embedding the kernel's
linked list information directly in the data item, a container struct
is allocated from the caller's resource pool which is then added to
the queue. The new sflist type is now used to store a flag indicating
whether a data item needs to be freed when removed from the queue.

FIFO/LIFOs are derived from k_queues and have had allocator functions
added.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-17 23:34:03 +03:00
Paul Sokolovsky
b98388c67f doc: networking: qemu_setup: Update details and add DNS information
Majority of "accessing Internet" setup is the same for both QEMU and
real boards connected to host, mention that explicitly. Be more
precise that networking settings require net_app_settings API, not
entire net_app. Finally, add information about DNS setup for the
samples requiring it.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-05-17 17:29:02 +03:00
Anas Nashif
941007d4a0 doc: Update Zephyr SDK version
Reference new SDK version (0.9.3) in the docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-17 11:08:35 +03:00
Andrew Boie
f3bee951b1 kernel: stacks: add k_stack_alloc() init
Similar to what has been done with pipes and message queues,
user mode can't be trusted to provide a buffer for the kernel
to use. Remove k_stack_init() as a syscall and offer
k_stack_alloc_init() which allocates a buffer from the caller's
resource pool.

Fixes #7285

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-16 17:32:59 -07:00
Andrew Boie
97bf001f11 userspace: get dynamic objs from thread rsrc pools
Dynamic kernel objects no longer is hard-coded to use the kernel
heap. Instead, objects will now be drawn from the calling thread's
resource pool.

Since we now have a reference counting mechanism, if an object
loses all its references and it was dynamically allocated, it will
be automatically freed.

A parallel dlist is added for efficient iteration over the set of
all dynamic objects, allowing deletion during iteration.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-16 17:32:59 -07:00
Andrew Boie
92e5bd7473 kernel: internal APIs for thread resource pools
Some kernel APIs may need to allocate memory in order to function
correctly, especially if they are exposed to userspace where
buffers provided by user code cannot be trusted.

Instead of simply drawing from the system heap, specific pools
may instead be assigned to threads, and any requests made on
behalf of the calling thread will draw heap memory from that pool.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-16 17:32:59 -07:00
Andrew Boie
e9cfc54d00 kernel: remove k_object_access_revoke() as syscall
Forthcoming patches will dual-purpose an object's permission
bitfield as also reference tracking for kernel objects, used to
handle automatic freeing of resources.

We do not want to allow user thread A to revoke thread B's access
to some object O if B is in the middle of an API call using O.

However we do want to allow threads to revoke their own access to
an object, so introduce a new API and syscall for that.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-16 17:32:59 -07:00
Andrew Boie
a2480bd472 mempool: add API for malloc semantics
This works like k_malloc() but allows the user to designate
a specific memory pool to use instead of the kernel heap.

Test coverage provided by existing tests for k_malloc(), which is
now derived from this API.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-16 17:32:59 -07:00
Anas Nashif
2a892d5d6d doc: update mac instructions
Use sdn-ng scripts to build toolchain instead of repeating them here.

Fixes #6912

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-16 22:21:31 +03:00
Sebastian Bøe
9342e3d32e doc: getting_started: Remove redundant and erronous doc's
The 'getting started' documentation is stating that one should set
some environment variables, but this is not necessary because the user
has already been instructed to set the variables in the
platform-specific guides.

The duplicated documentation should be removed because it is inferiour
to the original documentation. E.g. this documentation does not
describe how to permanently set environment variables. Also, it is
confusingly demonstrating how to use the SDK on Windows, but this is
not supported.

I believe that the purpose of the section is to verify that the user
has not misconfigured or misinstalled the toolchain, but this
responsibility is handled better by CMake itself.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-05-15 18:13:35 +03:00
Laczen JMS
b1e45b413e subsys: fs: Add Non Volatile Storage (NVS) for zephyr
Zephyr supports fatfs, nffs and fcb as storage layer. fatfs and nffs
are less suited for application in memory restricted IC's. fcb has a
smaller footprint but has a complex api.

The proposed module is a module with a even smaller footprint compared
to fcb and a simple interface for reading and writing entries. The
module provides wear levelling of flash. This allows the module to be
used not only to store configuration settings but to store device state
(e.g. state of a light switch over reboots) of a zephyr device.

Fixes buffer overflow by introducing maximum read length in nvs_read()
and nvs_read_hist().

Fixes nvs_write() not to reflash the same data. Allows the user to do
call nvs_write() for all defined entries without worries about flash
wear.

Fixes garbage collection error where wrong data could be copied.

Add nvs_delete() to allow deleting a stored entry. A deleted entry will
not be copied to a new flash sector

Include flash wear information in the README.md documentation

0/25 Update module after reviewers remarks, added documentation to
nvs.h, removed README.md by nvs.rst in doc/subsystems folder

04/26 Update module after reviewers remarks, updated nvs.rst, added more
documentation to samples/subsys/nvs/src/main.c, updated doxygen info
in nvs.h (hope this time it works).

04/26 Update subsystems.rst to include nvs.restart

04/27 Updated nvs.c and nvs.h to avoid a possible flash deletion loop
when the file system is full.

04/29 Updated nvs_write to detect and ignore deletes of non-existing
items

05/06 Update NVS module to return standard error codes, removed low
level API, added configuration options. NVS now uses the board dts to
determine the flash storage location (FLASH_AREA_STORAGE_OFFSET).

05/06 Update nvs.rst. Updated intendation and added intermediate
variables in nvs.c to make the code easier to read.

05/06 Update nvs.rst.

05/07 Update nvs.rst

05/08 Changed the API to a more standard file system API.

05/08 Removed cnt_max from nvs_read() as it is not used.

05/08 Removed #ifdef(CONFIG_NVS_LOG) from nvs_priv.h, now the module can
be build with debugging off.

05/09 Removed configuration options for SECTOR_SIZE, SECTOR_COUNT and
MAX_ELEM_SIZE. It is now easy to support multiple NVS filesystems on
one or multiple devices. Changed logging to support newlib systems.
Thanks to Olivier Martin for reporting and proposed changes.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2018-05-15 10:29:16 +02:00
David B. Kinder
9af44d8256 doc: add native posix command line help
The zephyr.exe created when building a native POSIX application can take
some parameters that are documented in the "board" document, so add a
reference to that documentation here.

fixes: #6384

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-14 17:24:03 -04:00
Michał Kruszewski
0c2ef4ea3d drivers: watchdog: Watchdog API redesign
New API enables setting watchdog timeout in the unit of microseconds.
It is possible to configure watchdog timer behavior in CPU sleep state
as well as when it is halted by the debugger.
It supports watchdogs with multiple reload channels.

Jira: ZEP-2564

Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2018-05-14 10:28:23 -05:00
Ulf Magnusson
a869f875ec doc: Mention that dependencies can be checked in menuconfig
This is handier in some ways compared to the symbol reference pages. The
search feature is more flexible, and you get to see which dependencies
are currently unsatisfied.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-05-13 17:02:12 -04:00
Andrzej Puzdrowski
7ac624e774 doc/subsystem/settings: fix wrong settings_handler field names
The document talks of settings_handler fields such
as ch_name and ch_set, whereas the actual names
are name, h_set, etc.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-05-11 16:53:57 -04:00
David B. Kinder
486c5a54e5 doc: add doc writing guides w/common usages
I've collected some of the common issues encountered with doc reviews
into a new contributing document, and included use of the
Zephyr-specific extension for generating code building examples.

Updated conf.py and created an external list of substitutions making it
easier to manage them without editing the sphinx conf file (and
documented this).

Tweaked the comments in the application.py extension python code to
render better in the generated doc that extracts these comments (keeps
the documentation in the python code too to ease maintenance when
updates are made).

Updated the sample template to mention use of this sphinx extension.

fixes: #6831
fixes: #6811

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-11 09:09:49 -07:00
Ulf Magnusson
930dbd5d80 doc: Document Kconfig extensions and Zephyr-specific behavior
Document the gsource (globbing source), rsource (relative source), and
grsource (globbing + relative source) statements.

Also add a separate section that documents Zephyr's non-standard
prefer-later-defaults Kconfig behavior. It was only mentioned in passing
before.

Piggyback: Move the note about .config assignments having no effect on
invisible symbols closer to the beginning of the 'Configuring invisible
Kconfig symbols' section. It makes more sense there.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-05-10 16:24:42 -07:00
David B. Kinder
3e136b4d23 doc: fix misspellings in doc and Kconfig files
Fix misspellings missed during regular PR reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-09 15:06:43 -05:00
Inaky Perez-Gonzalez
850b218e73 doc: document best practices for main.c suite declaration
With the introduction of --list-tests to sanitycheck, a few rules have
been added to how to declare test suites.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2018-05-09 13:19:38 -04:00
David B. Kinder
18859171a3 doc: flatten doxygen-generated HTML structure
The current doxygen configuration settings create 4096 folders to hold
the generated HTML output (with names such as d3/ddb/).  This makes it
difficult to know what an URL would be for a particular module's
(defgroup's) documentation.  By not creating these subdirectories,
module documentation file names become quite predictable:

     group__<group name>.html

(e.g., group__sensor__interface.html) allowing us to create
links from the Sphinx-generated documentation into the doxygen-generated
HTML content (this part is under investigation).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-09 09:53:04 -04:00
Ulf Magnusson
11952a60bf kconfig: Remove the C Kconfig implementation
Remove the C Kconfig tools and various scripts associated with them.

scripts/kconfig/diffconfig is popular, so keep it.

I don't know whether anyone is using scripts/kconfig/config. Remove it
and see if anyone screams.

scripts/kconfig/streamline_config.pl deals with modules ('m' values) and
can safely be removed. Zephyr's Kconfig files do not use modules.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-05-07 21:53:37 +02:00
Ulf Magnusson
418cc0eafe doc: Update for menuconfig.py
Update the Application Development Primer to describe the new menuconfig
configuration interface:

 - Update the section explaining how the configuration is navigated,
   changed, and saved

 - Add a section explaining how to jump directly to a symbol in the
   configuration interface

 - Replace mconf screenshots with menuconfig.py screenshots. Remove some
   screenshots that are no longer used.

 - Remove the section explaining how to load arbitrary .config files
   from within the configuration interface. That feature hasn't been
   implemented yet in menuconfig.py.

 - Do various minor language cleanup

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-05-07 21:53:37 +02:00
Anas Nashif
7a6f7136bb doc: process test documentation
Also parse test documentation. When add tests to doxygen, we get
warnings about device.h macros not being defined. Exclude this now and
track this in issue #7367.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-07 12:27:07 -04:00
Johan Hedberg
d22b7c9f2d Bluetooth: Remove bt_storage API
The same functionality is now supported by the settings-based
solution, so remove bt_storage out of the way. There were stubs in
bt_storage to handle per-peer information (e.g. pairing keys) but this
was never actually implemented in full. The next step is to add this
support to the settings-based solution.

Leave the code for generating temporary IRK and identity address in
case BT_SETTINGS is not enabled. Also leave the code for using vendor
HCI to read the identity address, in which case the settings
implementation will not touch it.

Introduce a new bt_unpair() API to replace the removed
bt_storage_clear(), since the latter was actually doing more than just
storage management: it was also handling runtime storage of pairing
information. Later, the bt_unpair() implementation will be extended to
clear settings-based pairing storage.

There is one feature that the bt shell module looses: the ability to
give a specific identity address to the "init" command as a parameter.
We might look later in the future if this is really needed, and add a
separate API for this.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-05-04 17:26:05 -04:00
Anas Nashif
7a587eea8f tests: document skipping tests and listing them
Add documentation about skipping tests and listing sub testcases (cases
within test projects).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-03 17:23:37 -04:00
David B. Kinder
2c8a3835d9 doc: DRAFT start for 1.12 release notes
Get the 1.12 release notes started with material derived from the 1.12
roadmap (closed issues) and headings from the 1.11 release notes.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-03 11:03:20 -05:00
David B. Kinder
c5615aada4 doc: change https://zephyrproject.org/doc refs
Remove extra indirection to documentation (and required
server link redirection) from https://zephyrproject.org/doc/...
to http://docs.zephyrproject.org/...

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-02 18:32:44 -04:00
Anas Nashif
a6eee02c00 samples: enhance integration sample and document it
Document the integration test sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-30 17:15:29 -04:00
Ulf Magnusson
63cb2334f0 doc: Document Zephyr's Kconfig configuration scheme
In particular, try to demystify Kconfig.defconfig files, and provide
guidelines on whether configuration settings should go in
BOARD_defconfig or Kconfig.defconfig.

The board porting section seems to be the most relevant one here, so put
the documentation there, with some "see also" links from elsewhere.
Things could be reorganized later if needed.

Give a general overview of visible and invisible Kconfig symbols as
well, as that ties in with the configuration scheme.

This is reverse-engineering on my part. The configuration scheme doesn't
seem to be documented anywhere prior.

Fixes: #7159

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-04-27 13:31:20 +02:00
Johan Hedberg
9968cda453 fs: Convert NFFS partition to a generic one
The NFFS partition at the end of flash is also useful for any other
file system or even the Flash Circular Buffer (FCB). Rename the
partition from 'nffs_partition' to 'storage_partition' and make it
depend on a new hidden Kconfig entry which the relevant users will
select (such as NFFS and FCB).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-04-26 16:06:55 +05:30
Leandro Pereira
39dc7d03f7 scripts: gen_kobject_list: Generate enums and case statements
Adding a new kernel object type or driver subsystem requires changes
in various different places.  This patch makes it easier to create
those devices by generating as much as possible in compile time.

No behavior change.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-04-26 02:57:12 +05:30
Leandro Pereira
c200367b68 drivers: Perform a runtime check if a driver is capable of an operation
Driver APIs might not implement all operations, making it possible for
a user thread to get the kernel to execute a function at 0x00000000.

Perform runtime checks in all the driver handlers, checking if they're
capable of performing the requested operation.

Fixes #6907.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-04-26 02:57:12 +05:30
David B. Kinder
b4d67dcc46 doc: update doc generation instructions
Incorrectly stated Sphinx 1.7.0 was supported (it's not); newest working
version is 1.6.7.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-04-25 05:55:03 +05:30
Andy Ross
3f55dafebc kernel: Deprecate k_thread_cancel() API
The only difference between this call and k_thread_abort() (beyond
some minor performance deltas) is that "cancel" will act as a noop in
cases where the thread has begun execution and will return an error.
"Abort" always succeeds, of course.  That is inherently racy when used
as a "stop the thread" API: there's no way in general (or at all in
SMP situations) to know that you're calling this function "early
enough" to catch the thread before it starts.

Effectively, all k_thread_cancel() gives you that k_thread_abort()
doesn't is an indication about whether or not a thread has started.
There are many other ways to get that information that don't require
dangerous kernel APIs.

Deprecate this function.  Zephyr's own code never used it except for
its own unit test.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-04-24 03:57:20 +05:30
Ulf Magnusson
64eb789ff5 doc: Clarify format for CONF_FILE
The documentation doesn't give the format for listing multiple files in
CONF_FILE (space-separated list).

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-04-24 03:39:12 +05:30
Ulf Magnusson
303484aa2f doc: Clarify application configuration
The current application configuration documentation makes it a bit
unclear that configuration files are merged. Rewrite the documentation
to explicitly talk about merging, which I think is less confusing.

Remove the following section from the introduction as well, as I think
it might make people wonder how they can have an existing kernel
configuration when they haven't created one. The updated configuration
section (which the introduction now has a forward reference to)
clarifies the zephyr/.config bit anyway.

    If omitted, the application's existing kernel configuration option
    values are used; if no existing values are provided, the kernel's
    default configuration values are used.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-04-24 03:38:20 +05:30
Ulf Magnusson
1ae99f02f1 doc: Improve Kconfig interface description
Pressing Y/N to configure boolean configuration symbols probably won't
be supported in the upcoming Python menuconfig implementation, and Space
is much smoother anyway. '?' is smoother than tabbing to '< Help >' too.

Also remove this part, which I couldn't make sense of:

    When a non-default entry is selected for options that are
    non-numerical, an asterisk :kbd:`*` appears between the square
    brackets in the display. There is nothing added added the display
    when you select the option's default.

[*] just means the current symbol value is 'y'.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-04-24 03:36:12 +05:30
Iván Sánchez Ortega
e618608fca doc: Expand info about troubleshooting ModemManager
Expand information about the ModemManager issues (spurious AT commands)
and instructions on adding Segger USB devices to the ModemManager
blacklist.

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-21 07:05:38 -07:00
David B. Kinder
a380dce018 doc: fix links to mailing lists
A recent LF change to the Zephyr mailing list hosting software changed
the mailing list names and links to the message archives.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-04-21 06:55:46 -07:00
David B. Kinder
b57ac8a2ff doc: improve Sphinx search results output
The search result from Sphinx displays raw ReST file snippets showing
the context of the search hit.  While we could generate text versions of
the ReST files just for the search results, it would potentially double
the time to generate docs (run once to generate txt files, run again to
generate HTML).

Instead, this patch does a poor man's cleanup of the ReST markup on the
fly when the search summary snippets are written out.  Not perfect, but
looks much better.

It does expose a problem that some of our ReST content is not actually
written out into a .rst file. Content that's dynamically generated by
extensions, such as the sample code from zephyr-app-commands, can
yield a search result hit, but there's no hits in the .rst file content
itself.

Line 552-558 are the modified lines from the Sphinx-provided
searchtools.js that does the pattern match/replace.

Addresses: #7032

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-04-21 06:54:35 -07:00
Sebastian Bøe
558406932b doc: win: Invoke pip3 instead of pip to be safe
It has been observed that users might "default" to Python2 and pip
will therefore install packages for the wrong Python. pip3 appears to
always be installed when Python3 is installed, so we invoke pip3
instead of pip2 to be safe.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-04-21 05:42:04 -07:00
Ulf Magnusson
3a72cc9889 doc: genrest: Simplify select logic with split_expr()
The logic for walking reverse dependencies (from 'select's and 'imply's)
is a bit tricky to read (and write), and was essentially duplicated in a
few different spots (including in the upcoming menuconfig
implementation).

Use a new split_expr() helper function that's been added to Kconfiglib
to reduce code duplication and make the code more readable.

This also has another nice side effect: The list of symbols that select
a particular symbol now has the symbols in the order that they appear in
the Kconfig files.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-04-17 08:02:40 -07:00
Sebastian Bøe
88b66b58b1 doc: getting_started: Make it more obvious how to follow the guide
Several users have reported confusion about whether one should stop at
the 'Using MSYS2' guide, or continue following the guide.

To resolve this we title the three options as Option 1,2,3, and change
the wording of the second guide to make it clear that it is an
alternative, not an additional step.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-04-12 14:18:31 -04:00
Andrei Emeltchenko
a660fcb315 doc: Add USB documentation identifiers and links
Add nicer looking links to sections and correct section name.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-04-12 14:03:00 -04:00
Andrei Emeltchenko
556e5329a6 doc: Make code consistent lowering case
Lowering case for consistency.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-04-12 14:03:00 -04:00
Andrei Emeltchenko
5e9563ab8b doc: usb: Move USB sections to USB Stack
At the moment "USB Vendor and Product identifiers" is hanging
inside "Subsystem" section.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-04-12 14:03:00 -04:00
Marti Bolivar
70a5bdedd8 doc: network-management-api: clarify intended event listening usage
Clean up the text, add an important warning, and add a self-contained
example rather than referring to the internal test code.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-04-12 10:35:10 +03:00
Marti Bolivar
f6a25cfd0e docs: network-management-api: update a changed function name
The old net_mgmt_add_event_cb() is now net_mgmt_add_event_callback().

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-04-12 10:35:10 +03:00
Erwan Gouriou
9708372080 doc: provide board porting guidelines
Provide board porting guidelines to help achieving a coherent
board library to ease work for people developing application
not board specific and define clear objective to help board
porting reviews.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-06 22:23:45 -04:00
Carles Cufi
361ef34043 doc: subsys: Remove unnecessary subsystem from titles
In order to be consistent with the rest of the subsystems, remove
"subsystem" from the title.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-06 07:30:33 -04:00
Andrzej Puzdrowski
f1275a78f2 doc: subsystem: settings subsystem doc
This patch introduce doc for settings subsystem
with FCB and File System beck-ends.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-04-06 12:46:39 +02:00
David B. Kinder
9abc31e315 doc: clean up QEMU networking doc
Noticed a typo in the first sentence, then some missing articles further
down, and some other clarity and grammar edits came along.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-04-05 19:18:06 -04:00
David B. Kinder
e48b64d1be doc: fix doc misspellings in doc, boards, samples
Occasional spelling-check scan found some misspellings.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-04-05 19:17:01 -04:00
Loic Poulain
4b78225393 doc: usb: Update API doc
Add missing DC driver functions:
- usb_dc_ep_read_wait
- usb_dc_ep_read_continue
- usb_dc_ep_mps

Add missing DC status code:
- USB_DC_INTERFACE

Document new transfer API.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2018-04-05 16:43:43 -04:00
Carles Cufi
cd05a630c8 doc: getting_started: Modernize macOS instructions
Modernize macOS instructions to fit the latest packages offered by
Homebrew and macOS High Sierra.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-05 12:48:33 -04:00
Carles Cufi
8a8d981822 doc: subsys: Add dfu and mgmt subsytem doc
Add documentation for two closely-related subystems: dfu and mgmt, which
are currently undocumented.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-05 16:56:46 +02:00
Carles Cufi
6fd8a0b3ca doc: dts: Add reference to mcuboot flash partitions
Add a reference to the MCUboot flash partition doc so we can link to it
from other documentation pages.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-04-05 16:56:46 +02:00
Stig Bjørlykke
cde9c00c76 doc: Show a command to enable IPv4 forwarding
Using QEMU host on a Zephyr application using IPv4 to access Internet
requires IPv4 forwarding, so show a command to enable IPv4 forwarding.

Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
2018-04-02 15:26:28 -04:00
Ulf Magnusson
4703ba7d31 doc: genrest: Use Kconfiglib 2 and improve output
The new version of the reference page for a symbol lists the following
essential and generally useful information at the top of the page:

 - Prompt

 - Type

 - Help text

 - Direct dependencies (from 'depends on', and inherited from if's and
   menus)

 - Defaults

 - Other symbols selecting or implying the symbol

The current symbol value and visibility are no longer displayed. They
don't make much sense in a reference document, as they depend on user
values from configuration files.

The bottom of the reference page also includes the symbol represented in
Kconfig format (including propagated dependencies).

All references to defined symbols appearing in expressions are turned
into links, which can be clicked on to jump to the reference page for
that symbol.

The following (slightly outdated) screenshot gives an idea of the
format:
https://www.dropbox.com/s/a34tlk2ncyus8po/promptandtype.png?dl=0

This commit also removes Kconfiglib 1, since it is no longer used.

Fixes #5622
Fixes #6821

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-03-29 14:25:24 -04:00
Maureen Helm
c33087d336 build: doc: Add support for a Windows equivalent to .zephyrrc
Adds support for setting user environment variables in the file
%userprofile%\zephyrrc.cmd

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-03-29 10:35:19 -04:00
Ulf Magnusson
6188579063 filter-doc-log.sh: Fix error for empty log file
Running 'make html' in doc/ when doc.log is missing or empty gives the
following error if sphinx-build doesn't write anything on stdout/stderr:

    Error in ./scripts/filter-doc-log.sh: logfile "doc.log" not found.
    Makefile:84: recipe for target ”html” failed
    make: *** [html] Error 1

The problem is that scripts/filter-doc-log.sh tests for the existence of
the log file with [ -s ${LOG_FILE} ], which requires it to be nonempty.

Fix it by using -e instead, which only checks if the log file exists.
scripts/filter-known-issues.py ($KI_SCRIPT) seems to be able to deal
with empty files (and runs quickly).

Fixes #6854

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-03-29 08:26:47 -04:00
Ulf Magnusson
80c28dbf5e doc: sphinx: Fix broken import of lexer.DtsLexer
When sphinx-build is run under Python 2, running e.g. 'make html' in
doc/ currently causes the following error:

    Exception occurred:
      File "conf.py", line 128, in <module>
        from lexer.DtsLexer import DtsLexer
    ImportError: No module named lexer.DtsLexer

The problem is that doc/extensions/lexer/ contains no __init__.py file,
which prevents Python 2 from finding submodules in it[1].

The problem does not occur for Python 3, due to implicit namespaces
packages:
https://www.python.org/dev/peps/pep-0420/

Add an empty __init__.py to doc/extensions/lexer/ to fix building when
sphinx-build uses Python 2 (2.7 is still the version recommended on the
Sphinx homepage). This won't alter the behavior for Python 3.

(doc/extensions is added to the search path at the beginning of conf.py
and so doesn't need an __init__.py. doc/extensions/zephyr already has an
empty __init__.py.)

[1] https://docs.python.org/2/tutorial/modules.html#packages

Fixes #6851

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-03-29 08:16:04 -04:00
Jukka Rissanen
e5ea7d2260 doc: net: Add websocket and websocket_console to net API docs
Websocket related groups were missing from network API documentation.

Fixes #6779

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-03-28 10:05:49 +03:00
Sebastian Bøe
bdc5c72498 samples: Add sample that demonstrates a custom board definition
Add a sample that demonstrates a custom board definition. This proves
that BOARD_ROOT works and can be a useful reference when creating a
custom board definition.

Instead of spending time making up a board, the nrf52840_pca10056
board has been copied as-is. And the hello world sample has been used
as the basis for the application.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-03-27 09:35:35 -04:00
Carles Cufi
9ba007e878 doc; bluetooth: Rework and expand the Bluetooth doc
In order to avoid duplication, move all information relating to QEMU and
BlueZ from samples to subsystems, and expand to cover BlueZ installation
and usage of Controllers with BlueZ and QEMU in detail.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-27 09:45:08 +02:00
Sebastian Bøe
8356045633 docs: Fix reference to non-existent SYS_INIT_PM macro
The documentation is referencing the macro SYS_INIT_PM, but
SYS_INIT_PM does not exist, the correct name is SYS_DEVICE_DEFINE.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-03-26 13:17:39 -04:00
Sebastian Bøe
0de21f8a9b doc: drivers: Include device_config declaration in documentation
There are several references to config_info in this documentation, but
no introduction to what it is. Including this declaration makes it
possible to understand the documentation.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-03-26 13:17:39 -04:00
Sebastian Bøe
917d8e2f7b doc: drivers: Re-order error-handling section
The paragraphs on error handling are out-of-place, as they are
abruptly explained in the middle of a section that is about the cruft
involved in declaring and implementing drivers.

This commit moves them into their own section.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-03-26 13:17:39 -04:00
Sebastian Bøe
b07cb2924b docs: Use simple english
Simplify the sentence by using simple english.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-03-26 13:17:39 -04:00
Reto Schneider
3642a69a6b doc: boards: Remove hint to ini file
Since commit a792a3d410, adding an ini
file in scripts/sanity_chk/arches/ to support a new board is no longer
needed.

Signed-off-by: Reto Schneider <code@reto-schneider.ch>
2018-03-23 22:21:54 -04:00
Bobby Noelte
a5a29e4efc doc: sphinx: Add Pygment lexer for DTS
Add pygment lexer for DTS code-block.

Fixes #6029

Origin: skiboot, https://github.com/qemu/skiboot
Status:  91350c5a926795d8917a4eff699941361f780476
Description: Syntax highlighting of Device Tree Source (dts)
Dependencies: None
URL: https://github.com/qemu/skiboot/blob/master/doc/DtsLexer.py
commit: 91350c5a926795d8917a4eff699941361f780476
Maintained-by: External
License: BSL-1.0
License Link:
    https://github.com/qemu/skiboot/blob/master/doc/DtsLexer.py

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2018-03-23 08:16:49 -04:00
Stig Bjørlykke
029c3235e9 doc: Supplement list of implemented socket operations
Add sendto() and recvfrom() to the list of implemented operations
in BSD Socket API.

Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
2018-03-21 15:36:11 -04:00
David B. Kinder
34d02e5e24 doc: fix backslashes in doc
Single backslashes outside of a code-block are treated as escape
characters, so need to double up to get a single backslash rendered in
the generated HTML.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-03-21 13:11:01 -05:00
Sebastian Bøe
43bc30466a Revert "doc: Kconfig: Decode Kconfig sources as UTF-8 instead [...]"
This reverts commit f8d451258e. The
revert is done because of a regression in Mac OSX
https://github.com/zephyrproject-rtos/zephyr/issues/6726

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-03-21 08:57:44 -04:00
Anas Nashif
585fd1faec doc: kernel: capitalize Fifo/Lifo
Capitalise Fifo and Lifo in documentation, those are acronyms and need
to be all in caps.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-20 14:01:30 -04:00
Maureen Helm
e2d73fb153 doc: application: Add Eclipse debugging section
Document how to debug a Zephyr application in the Eclipse IDE.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-03-20 12:44:05 -04:00
Sebastian Bøe
f8d451258e doc: Kconfig: Decode Kconfig sources as UTF-8 instead of as LC_CTYPE
Decode Kconfig sources as UTF-8 instead of decoding them according to
the system locale (which might be ascii-only).

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-03-20 12:07:02 -04:00
Iván Sánchez Ortega
71ddd825ec doc: Add 'apt-get install python3-wheel' to linux installation docs
Adding missing dependency to the "getting started" documentations.
Without the python3-wheel package, running "pip3 -r requirements.txt"
on a Debian system will fail.

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2018-03-17 19:05:17 +01:00
David B. Kinder
d5841d7201 doc: fix doxy syntax for hiding internal symbols
EXCLUDE_SYMBOLS uses spaces as seperator and not commas.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-03-13 06:33:38 -07:00
Stig Bjørlykke
80f7d41f24 doc: Fix K_ALERT_DEFINE in a code example
Add the missing 'max_num_pending_alerts' argument to the
K_ALERT_DEFINE used in the "Signaling an Alert" code example.

Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
2018-03-09 20:27:43 -05:00
Carles Cufi
00ba8c339a release: Update release notes with GitHub issues
List all issues closed after the date of the 1.10 release (8th December
2017).

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-09 23:24:18 +01:00
David B. Kinder
f0c38ae4d8 doc: release notes: fix spelling and formatting
Fixed spelling and formatting issues (a blank line is required before
the first item in a list, or sublist).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-03-08 17:28:37 +01:00
David B. Kinder
5229f87e8b doc: add version info on Latest docs
All Sphinx-generated pages for tagged release documentation include the
release version number in the breadcrumb header.  This patch adds this
to the "Latest" daily doc build results that are the default pages seen
when visiting docs.zephyrproject.org

Fixes: #6432
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-03-07 13:56:28 -05:00
Maureen Helm
35ce8baed4 doc: release notes: Add driver and sensor changes for 1.11 release
Fills in the drivers subsection with a list of major additions and
changes in the 1.11 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-03-06 21:31:37 -05:00
Kumar Gala
52e0494d70 doc: release notes: add HAL section related updates
Added various bullet items for the HALs we imported and updated in this
release.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-06 17:21:54 -05:00
Kumar Gala
85b694e6c2 doc: release notes: Add board related release notes
Added details on new ARM boards, removal of panther board support on
x86 and arc, and dts.fixup changes.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-06 15:20:55 -05:00
Leandro Pereira
c93894c493 doc: release notes: Add notes for ESP32 SoCs
Note that the I2C driver is now operational and there's a new driver
for the PWM LED controller.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-03-06 15:20:13 -05:00
Johan Hedberg
d86b219a8d doc: release notes: Add Bluetooth changes for 1.11 release
Provide a short summary of Bluetooth changes that have happened
between 1.10 and 1.11.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-03-06 14:41:22 +01:00
Carles Cufi
04a0a2619c doc: release notes: Add major 1.11 features
Include and describe all the highlights in the 1.11 release, listed in
the major features initial section and described in the different
subsections in more detail.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-05 05:43:27 -05:00
David B. Kinder
d0ba9d9493 doc: add 1.11 links for docs and release notes
Update the home page to add a choice for the 1.11 docs and update the
release notes page to add the 1.11 release notes link.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-03-04 21:16:10 +01:00
David B. Kinder
cfc5941dba doc: release notes: documentation
Add documentation updates for 1.11 (and fix a formatting problem while I
was in there)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-03-03 08:57:07 +01:00
Andy Gross
3cbc5c5091 doc: release notes: Add security notes
This patch adds security specific items to the 1.11 release notes.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-03-02 07:08:28 +01:00
Jukka Rissanen
d36028fa52 doc: Add networking information to 1.11 release note
Contains major networking changes between 1.10 and 1.11 releases.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-02-23 16:24:42 +01:00
David B. Kinder
05e00f6e7f doc: remove use of sphinx autodoc extension
Looks like newer versions of Sphinx have a problem with the autodoc
extension.  Since we're not usine Sphinx to process python source for
documentation, removing use of autodoc eliminates the problem.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-22 15:28:34 -05:00
David B. Kinder
540efaf402 doc: fix misspellings in docs
regular spell check on .rst files found a few misspelled words

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-22 15:28:20 -05:00
Marti Bolivar
b7b1dfb8b6 doc: application: re-work DT overlay section
Edits and additions for clarity and correctness, based on the current
contents of the file (dts.cmake) which controls the DTS build.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-02-22 18:52:42 +01:00
Marti Bolivar
137cb01693 doc: flash_partitions: rework
Re-work the flash partitions documentation:

- add sections to provide more complete context

- link to useful information on DT overlays elsewhere in the
  documentation

- touch up some phrasing

- inline a smaller, self-contained example within the page rather than
  linking to an entire board dts

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-02-22 18:52:42 +01:00
Leandro Pereira
44be8fbb30 doc: doxygen: Hide implementation detail symbols
Hide all symbols whose names begin with an underscore.  Although these
might be documented, they shouldn't be used by applications, as there's
no guarantee they will be available in subsequent versions, or maintain
API and ABI compatibility.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-02-20 16:42:35 -05:00
David B. Kinder
e5dcd0236c doc: Update doc building instructions
Instructions for generating documents locally needed some updates
because of build environment changes and use of newer tool versions.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-17 09:15:46 -05:00
Anas Nashif
e172fa3b52 build: support out-of-tree custom boards
This is one way we can support out of tree board definitions. Basically
all this needs is a board definition in the application source directory
that follows the same structure we have in the main Zephyr tree (also
allowing multiple custom boards). An application tree would look like
this for example:

boards/
CMakeLists.txt
prj.conf
README.rst
src/

with boards following the same structure as in Zephyr:

.
├── boards
│   └── x86
│       └── arduino_101
│           ├── doc
│           │   └── img
│           └── support
└── src

To use this, you need to specify the BOARD_ROOT variable on the command
line when building:

cmake -DBOARD=<board name> -DBOARD_ROOT=<path to boards> ..

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-14 19:20:29 -05:00
Carles Cufi
771dfb0d13 doc: nordic_segger: Add link to Python viewer
Courtesy of thomsten on IRC, add a link to a handy RTT viewer written in
Python and cross-platform.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-13 17:27:48 -05:00
Carles Cufi
3f623c2160 doc: nordic_segger: Document conflicting console
Describe how to disable the UART console to avoid unexpected
redirections that will prevent the console output to go through RTT.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-13 17:27:48 -05:00
Andy Gross
0eb6275fa5 doc: kernel: usermode: Add MPU stack and userspace documentation
This patch adds documentation on the design and implementation of stack
objects for architectures which utilize MPU backed stack and memory
protection.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-02-13 12:42:37 -08:00
Anas Nashif
7ee8bb9677 build: deprecate ZEPHYR_GCC_VARIANT
We want to support other toolchain not based on GCC, so the variable is
confusing, use ZEPHYR_TOOLCHAIN_VARIANT instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-13 07:44:45 -08:00
Carles Cufi
980c0cf4ac build: win: Add a new zephyr-env.cmd file
Add a new zephyr-env.cmd that mirrors the functionality of zephyr-env.sh
but on Windows platforms. It sets ZEPHYR_BASE to the location of the
script.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-12 19:22:22 -05:00
Carles Cufi
d0c2be7c8a doc: getting_started: Windows build doc fixes
Correct 2 items in the Windows Getting Started doc:

 * dtc-msys2 is now an upstream Chocolatey package
 * Add instructions to clone and build Ninja for MSYS2

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-12 13:47:42 -05:00
Andy Gross
ff22490d56 doc: Update security feature information
This patch updates information pertaining to userspace related security
features.  Some of these have been added to releases and this needs to
be shown in the document.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-02-12 13:47:19 -05:00
Alberto Escolar Piedras
25e0636c84 doc: Sanitycheck command line options fixup
Aligned sanitycheck command line options in doc
with the actual ones.
+
Minor fix in --coverage description.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-10 13:22:06 -05:00
Johan Hedberg
bd989a79ba tests: Remove broken net_buf unit tests
The net_buf unit tests were doing some pretty hacky stuff with
defining a dummy _net_buf_pool_list variable to fulfil the linker
magic that happens with a real build. Until now the code got lucky in
that the simple net_buf_alloc() tests didn't depend on
_net_buf_pool_list being valid, however with the coming redesign even
net_buf_alloc will require proper setup of this.

Since the unit tests were extremely minimal, and not testing anything
beyond what tests/net/buf already tests, just remove them for now.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-02-10 09:20:42 +02:00
Carles Cufi
72684ef815 dts: mcuboot: Support for common overlays and mcuboot
When the Kconfig BOOTLOADER_MCUBOOT is selected, an overlay to place the
image at the slot0 location is required. In order to avoid having to do
this manually for all samples when targetting MCUboot, include the logic
inside the dts.cmake script to prepend a new common.dts file that then
conditionally includes mcuboot.overlay.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-09 09:11:13 -05:00
Anas Nashif
c1e395ec90 doc: we do not need gcc-c++.i686 on fedora
This package is not needed for building on fedora and currently causes
dependency issue with the fedora package manager, so remove it.

Fixes #6013

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-07 22:39:06 -05:00
David B. Kinder
acc0adb46e doc: tweak Zephyr introduction features list
Elevate prominence of some items buried in the services list that are
significant changes introduced in the last few releases.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-07 16:42:02 -05:00
Spoorthi K
788b38b8c4 doc: memory_domain: Update memory domain API's documentation
Remove thread from memory domain API (k_mem_domain_remove_thread())has
only one argument which is thread ID as per the implementation whereas
documentation says there has to be two arguments, memory domain and
thread ID.Memory domain argument is not required as a thread belongs
to single memory domain at any point in time. Also memory domain
initialisation function (k_mem_domain_init()) should accept only 3
arguments i.e, memory domain name, number of parts and array of
pointers to the memory domain, instead of 4.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-02-07 08:36:18 -05:00
Rajavardhan Gundi
1e6adba9ef drivers/interrupt_controller: Introduce multi-level interrupt support
In a scenario where a platform harbours multiple interrupts to the
extent the core cannot support it, an interrupt controller is added
as an additional level of interrupt. It typically combines several
sources of interrupt into one line that is then routed to the parent
controller.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-02-06 22:39:05 -05:00
Anas Nashif
61346f0c42 doc: install pyocd using pip2
pyocd does not exist as a python 3 module, use pip2 to install it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-06 19:40:42 -05:00
David B. Kinder
10330cadcb doc: update Zephyr features list in intro
Intro page update to list the features and major changes that
happened in the last year

fixes #5136

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-06 19:36:08 -05:00
David B. Kinder
0b1d20e254 doc: Add shell doc for kernel module
Issue #5996 mentions the need for a shell feature that is somewhat
implemented already, but not documented: the "kernel" module has
commands to display information about the kernel version, uptime,
cycles, threads, and stacks, so add that to the subsystem/shell doc.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-06 19:35:32 -05:00
Anas Nashif
b452e9ecde doc: update package dependencies for Linux
We now require host compiler for building Zephyr in 32bit mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-06 15:59:36 -08:00
Carles Cufi
1cce63ae8f cmake: dts: Allow multiple overlay files
This patch changes the manner in which we collect DTS overlay files so
that they comply with the same approach taken for configuration fragment
files (.conf).

Additionally it also documents the usage of those files in the
Application Developer Guide.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-05 14:09:43 -05:00
Carles Cufi
65d1a2ef76 doc: Release Notes draft for 1.11
Initial draft for the upcoming 1.11 release notes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-02-05 06:48:56 -08:00
Alberto Escolar Piedras
bfabdf1de5 shell: Added noprompt command
Added noprompt command to shell. It will disable printing
the prompt.
For the native port, when feeding commands from a file or
pipe the prompt reprinting after each command (without echoing)
just confuses the user.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-02 07:48:46 -08:00
David B. Kinder
ec1b1df5ed doc: fix ReST heading underlines
The expected order for heading levels in our ReST documents is # for H1,
* for H2, = for H3, and - for H4.  Some documents snuck in without
following this guideline.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-01 19:33:39 -08:00
Andrew Boie
578e6fdbb0 doc: user mode overview documentation
The existing docs immediately dive into the details without providing
the user with any kind of high level overview or description of the
threat model.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-01-30 10:32:39 -08:00
Andrzej Puzdrowski
77532ae2cf doc: device: dts: Explanation for flash partitions
This documentation is needed for developers who are porting new boards.
Fixing #5577


Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-01-29 14:01:20 +01:00
Carles Cufi
0008e34150 doc: guides: app: Rework for multi-OS support
Rework the Application Development Primer so that it describes the
differences between UNIX and Windows builds and uses Ninja by default,
in order to be compatible with all of them.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-22 15:49:34 +01:00
Carles Cufi
72046a8abc doc: getting_started: Support multi-OS instructions
In order to be able to document the build on Windows and UNIX
systems, slight variations are required on the app commands
that are used throughout the documentation system.

This includes getting rid of the prompt symbol and providing commands
for both UNIX and Windows operating systems.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-18 16:53:31 -05:00
Carles Cufi
acbdeabe34 doc: app: Use unix on qemu builds
Since QEMU currently requires Linux or macOS to run, use "unix" as a
host OS for those documenting the build with it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-18 16:53:31 -05:00
Carles Cufi
e62ee6ab3c doc: ext: app: Add a new "host-os" option and default to ninja
In order to properly support documenting building on both UNIX and
Windows, a new "host-os" option has been added to the Python script,
alongside with a switch to ninja as the default generator.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-18 16:53:31 -05:00
Carles Cufi
174de51548 doc: getting_started: Require ninja on macOS
Since we're switching to ninja as a default generator for CMake, require
the ninja package as part of the requirements on macOS.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-18 16:53:31 -05:00
Carles Cufi
5b2dd50c9b doc: Document the new native Windows dev environment
The new native Windows development environment no longer relies on MSYS2
or WSL at all. Instead it uses a standard Command Prompt and Windows
native tools. Document the installation and setup process in order to be
able to compile and develop.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-01-16 17:26:02 -05:00
David B. Kinder
9e74a8162d doc: change sensor subsystem doc title
Make sensor subsystem section title consistent with other subsystem
titles.

fixes: 5687

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-01-16 17:24:46 -05:00
David B. Kinder
076e6d3ec8 doc: update jquery version to 3.1.2
The jquery provided by Sphinx 1.5.5 has a bug dealing with the
coordinates returned for offset().top for empty <span> tags, generated
by Sphinx for intra-document labels used to create hyperlink anchor
targets.  As reported in PR #5591, some browsers (chrome for example)
don't scroll to the right spot in the document when we link to these
intra-document label points.  jquery v3.1.2 fixes this.  (When Sphinx
updates the jquery included in its release, we can remove our copy that
is overriding the copy installed in the generated output by Sphinx.)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-01-15 18:31:08 -05:00
Patrik Flykt
010fb40b95 subsys: usb: Set Zephyr project USB Vendor and Product IDs
Document USB Vendor and Product IDs and their intended usage.
Set the Vendor and Product IDs and define the USB bcdDevice
Device Descriptor Device Release Number to be the binary
coded decimal representation of the Zephyr major and minor
kernel version number.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2018-01-15 15:47:53 -05:00
Anas Nashif
3bbd1c77ab doc: recent kconfig changes break doc generation
Instead of wildcards we now are using environment variables to set the
path to Kconfig files for board and architecture. This break
documentation generation for Kconfig variables.

Using the env variables, we now set the path to what it used to be to
restore previous behavior.

Also, when something like this happens in the future, we should abort on
doc creation failure.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-12 15:34:09 -05:00
David B. Kinder
3e4e3bd96f doc: update windows setup git clone instructions
Modern windows tools will properly handle windows or linux line endings
so remove the warning about windows tools.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-01-09 16:02:24 -05:00
Sebastian Bøe
8e30c6e790 doc: getting_started: Improve the docs for cloning on Windows
Explain why we set core.autocrlf=false.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-09 09:28:05 -05:00
Sebastian Bøe
4694ffecce doc: win: Specify autocrlf=false when cloning
Certain parts of Zephyr require Unix-style line-endings. To make sure
the line endings are not converted to Windows-style line-endings we
explicitly specify core.autocrlf=false when cloning.

This fixes #5557

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-08 10:24:51 -05:00
Sebastian Bøe
cedfa9b4ab doc: Fix broken links in getting_started
Fix broken links in getting_started. We now use "Implicit Hyperlink
Targets" instead of :ref:. I don't know why :ref: wasn't working.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-01-08 10:24:36 -05:00
Anas Nashif
82e66127b9 doc: remove unsupported doxygen options
Do not list unsupported doxygen options in the config file, those cause
the doc building process to fail on some systems.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-06 22:12:03 -05:00
Dong Xiang
f60b2a6b0f doc: devices: correct devicetree specification path
Signed-off-by: Dong Xiang <dong.xiang@linaro.org>
2018-01-03 10:01:59 -05:00
Mariusz Skamra
1c4c6791bf Bluetooth: doc: Update ICS values for LE profiles
This updates GAP, GATT, SM, L2CAP ICS values according to following
documents:
GAP.ICS.5.0.2
SM.ICS.5.0.0
GATT.ICS.5.0.1
L2CAP.ICS.5.0.1

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-02 14:36:53 +01:00
Mariusz Skamra
b90f0bd1ac Bluetooth: doc: Widen column gaps in l2cap-pics.txt
The gap between 1st and 2nd column is only one character.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-01-02 14:36:53 +01:00
Anas Nashif
6b55598ad4 board: posix: add native_posix board definition
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-27 14:16:08 -05:00
Inaky Perez-Gonzalez
aa765005e8 doc/scripts/filter-doc-log: protect further against bad TERM env
Checking for TERM being undefined before doing tput with colors is not
enough; if TERM is defined as 'dumb', this thing also behaves dumbly.

In fact, the whole trying to do colors thing is dumb and causes all
kinds of headache in corner cases, so just wrap anything smelling like
color in a check for TERM being undefined or 'dumb' and be done with
it.

It shall take care of different automation mechanisms that don't
invoke 'make htmldocs' from a user console.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-12-22 08:36:39 -05:00
Anas Nashif
e2122cbf89 lib: move ring_buffer from misc/ to lib/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-15 20:02:01 -05:00
Marti Bolivar
006f13ca08 doc: application: fix KCONFIG_ROOT example file
The APPLICATION_BASE variable in the example Kconfig file was copied
in from an (out of tree) application which relied on it during the
Kbuild days, but it's actually not needed by the CMake build system
and should be removed.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-12-14 14:05:48 -05:00
Carles Cufi
d1273df205 doc: getting_started: Add note for Windows env vars
Some users might want to inherit their already existing Windows
environment variables into the MSYS2 system. This note explains how to
achieve this.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-12-14 12:37:25 -05:00
Inaky Perez-Gonzalez
22f22c2fc2 filter-doc-log.sh: don't use tput if TERM is not defined
When running on jenkins and other automation environment, TERM will
not be defined and thus tput errors out.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-12-13 16:10:53 -05:00
Anas Nashif
1d7ce279d8 doc: add __init__.py for python2 compatibility
Some CI systems still using python2 modules, add this until we move all
to python 3.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-12 17:52:57 -05:00
Tomasz Bursztyka
c88000a051 net/ieee802154: Split the net mgmt part from the L2 specific header
L2 specific data and IEEE 802154 net mgmt interface are not related.
Plus, application may use the net mgmt part, not the L2 one. So let's
split the content in relevant headers.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-12-12 09:29:48 -05:00
Anas Nashif
c84a283d68 sanitycheck: adapt testcase documentation
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-11 14:47:08 -05:00
Anas Nashif
7514178df4 doc: fix version parsing
Something stopped working after we move to 1.10, this seems to fix it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-09 12:23:52 -05:00
Anas Nashif
35af0de032 release: update release notes for 1.10
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-08 13:05:26 -05:00
David B. Kinder
62d97cd1d4 doc: (Final) release notes edit prior to release
Final edit pass on the release notes prior to 1.10 release.
Fixed misspellings in GitHub issues title (here and in GitHub).
Updated doc changes.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-12-07 08:10:51 -06:00
Kumar Gala
7bb1786fbe doc: Update list of issues resolved in release
Add one last minute issue that was resolved for the release

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-12-06 15:56:18 -06:00
Kumar Gala
7d0ab1b96a doc: Update release notes for issues closed in this release
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-12-05 17:11:20 -06:00
David B. Kinder
dc3edfbed0 doc: fix release notes list formatting
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-12-05 17:11:06 -06:00
Kumar Gala
d8360ed226 doc: Update release notes for ARM SoC & Board additions
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-12-05 13:45:56 -06:00
Kumar Gala
c7432e419f doc: update whitespace in release-notes-1.10.rst
Remove gratitious blank lines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-12-05 13:45:56 -06:00
David B. Kinder
6e22175a62 doc: add links to 1.10 docs and release notes
Add link to the 1.10 technical docs to the available tech docs listed in
the documentation home page. Add the 1.10 release notes to the list of
available release notes in the release notes page.

Also update description of where to get Zephyr source code (downloadable
archives listed in the GitHub tagged releases page).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-12-05 13:39:22 -06:00
David B. Kinder
8b81294f55 doc: environment setup needs zephyr clone first
There are files in the cloned copy of the Zephyr tree needed to setup
the development environment, so there's a bit of chicken and egg
problem.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-12-05 12:48:14 -05:00
David B. Kinder
407eb2dd6c doc: fix doc Makefile dependency on python
With a clean Ubuntu install,  following the getting started page
instructions for linux, only python3 is installed.  Apparently (by
design), a python3 install does not create the symbolic link for
/usr/bin/python so the doc/Makefile complains.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-12-05 12:46:21 -05:00
Anas Nashif
b277d3b081 doc: update release notes for 1.10
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-05 10:05:42 -05:00
David B. Kinder
c7e9495811 doc: fix broken notes directives
Fix two docs using ".. note:" instead of ".. note::" (missing a colon).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-12-04 15:00:17 -05:00
Sebastian Bøe
13a6840261 cmake: Re-organize syscall generation wrt. the build system
This commit fixes
https://github.com/zephyrproject-rtos/zephyr/issues/5008.

It does so by splitting up gen_syscalls.py into two scripts with a
json metadata file to communicate syscall metadata between them. The
parsing script parses header files from include/ and writes syscall
metadata to a file if the contents changed. The generation script
reads from the json file and generates syscall code.

The build system DAG now looks like this:

always_rebuild -> json -> syscalls -> offset.o

The script for generating json will do so only if the content changes,
this ensures that the entire DAG does not always do a full rebuild.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2017-12-04 10:51:07 -08:00
David B. Kinder
be49790ff3 doc: fix handling of OPTION directive in genrest
The genrest.py script used to create configuration options documentation
from the KConfig files generates slightly incorrect OPTION directives
(with an extra colon at the end).  Sphinx 1.5 didn't care, but Sphinx
1.6 does, so fix this now in preparation for upgrading Sphinx to the
current version.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-12-02 10:16:03 -05:00
Kumar Gala
2b50be628a doc/dts: Update to reflect new path locations
Since we moved around where yaml, dts, and fixup files exist we need to
update the docs to reflect those changes.  Also, try and make the docs
at little more generic to changes that are occuring.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-12-01 13:37:04 -06:00
David B. Kinder
621ac8f84b doc: add missing API content
Some API material (from doxygen comments) wasn't included in the
generated documentation because there was no doxygengroup Sphinx
directive to display them. This PR add content into appropriate places
in existing documentation (e.g., Bluetooth Cryptography APIs into the
Bluetooth API doc) and creates two new collections for Display and
Miscellaneous APIs.

Comments added to the .rst files to mention doxygengroups that are
intentionally excluded (because they're organizational groups containing
subgroups that are included).

Sorted the Bluetooth API list, mostly.

Fixed a couple doxygen group titles defined in the include files, and
added a few patterns to filter new "expected" errors from the document
generation process.

Legacy and deprecated APIs remain left out, as intended:

   http_legacy  (net/http_legacy.h)
   spi_interface_legacy  (spi_legacy.h)
   zoap  (net/zoap.h)

fixes: Issue #5051

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-12-01 08:58:56 -05:00
David B. Kinder
f3f0c03b86 doc: update 1.10 release notes
Added documentation changes and build tools note about CMake change.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-30 19:21:18 -06:00
Johan Hedberg
aac375fafb doc: Add Bluetooth changes to 1.10 release notes
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-11-29 15:36:05 -05:00
Anas Nashif
a6f44500b0 doc: fix indentation of yaml samples
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-22 13:27:01 -05:00
Anas Nashif
dc87059cf1 doc: strip zephyr root from generated docs
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-22 13:27:01 -05:00
Anas Nashif
471c1894e5 doc: update doxygen configuration file
Run file through doxygen -u doc/zephyr.doxyfile and generate
a clean config with latest options and documentation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-22 13:27:01 -05:00
Anas Nashif
8694a13514 doc: update index with latest previous releases
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-22 13:27:01 -05:00
Sven Dowideit
46f530e273 doc: make the CMake instructions a little more active
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-11-22 07:49:41 -05:00
Jukka Rissanen
a916b796d5 doc: Add networking information to 1.10 release note
Contains major networking changes between 1.9 and 1.10 releases.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-11-20 16:40:24 -05:00
Anas Nashif
cb9390c791 doc: add full version to generated docs
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-19 23:16:03 -05:00
David B. Kinder
fa48b93239 doc: fix missing bluetooth mesh API docs
Sphinx/breathe doesn't support showing nested groups, so explicitly add
the nested groups in the API documentation (for Bluetooth Mesh).

Also, added an ignore pattern for a nested unnamed type known issue.

fixes: issue #5040

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-19 07:46:13 -05:00
Youvedeep Singh
16ef09ef53 doc: update release-notes-1.10 document
Update for LOW POWER state and SYSTEM OFF state for nrf52.
update for TICKLESS KERNEL support in xtensa_sys_timer

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2017-11-18 08:55:58 -05:00
Andrei Emeltchenko
59161cebcd net: doc: Add Ethernet over USB basic documentation
Add basic documentation about Ethernet over USB and describe
prj_netusb.conf configuration file.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-11-18 08:49:57 -05:00
Ding Tao
fddcfa73d4 doc: Replace nano_sem with k_sem
The struct nano_sem is obsolete, so replace with struct k_sem.

Signed-off-by: Ding Tao <miyatsu@qq.com>
2017-11-18 08:48:42 -05:00
Anas Nashif
b53d69747b doc: add a new template variable
Signify if the documentation is for a release or if it is the
development version from master.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-18 08:47:57 -05:00
Maureen Helm
addf42b5e1 doc: Convert OpenSDA doc to CMake
Fixes #4899

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-11-17 18:36:16 -05:00
David B. Kinder
08ce2bb37f doc: add starter for 1.10 release notes
Note we've added a new Sphinx inline role for references to GitHub
issues, :github:`1234` (along with the existing inline role for Jira
issues :jira:`ZEP-1234`)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-15 13:45:22 -06:00
David B. Kinder
2d4d295261 doc: warnings from doxygen not being reported
While sphinx-build messages are captured to a file (and tee'd to
stdout), messages from doxygen weren't captured to the file and so were
missed as an error that needed fixing.  (You can see the message if you
run 'make htmldocs' locally and in shippable script output, but the
message filtering tool that throws an error if unexpected messages
appear, didn't get to see those.  This fixes that.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-15 09:11:23 -05:00
Anas Nashif
a57f26c673 doc: fix reference to CTNG supported toolchains
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-14 19:28:42 -05:00
Andrew Boie
1099d40ad3 doc: expand system call documentation
This gives more detail on how system calls with large argument
lists, or large return value types should be handled.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-11-14 14:29:31 -08:00
Anas Nashif
e754d44791 doc: report which warnings/errors are new
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-13 17:45:42 -05:00
David B. Kinder
89514de230 doc: fix misspelling in docs
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-13 14:43:37 -08:00
David B. Kinder
e63615f90f doc: fix incorrect file reference in API doc
reference to test/ should be tests/

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-13 16:56:48 -05:00
Anas Nashif
ade26a09fc doc: fix location of non APL code README
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-13 13:34:27 -05:00
Anas Nashif
540644d375 doc: make sure we use gdb from SDK
installed GDB on host might not be compatible with the binary generated
by Zephyr. Mention that we need to use the gdb that corrosponds to the
toolchain being used.

Fixes #4312

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-13 13:34:27 -05:00
Sebastian Bøe
8d0a80c6a9 cmake: Fix SDK-less builds
This change changes the semantics of the environment variable
ZEPHYR_SDK_INSTALL_DIR to allow the use of 3rd party toolchains
alongside the Zephyr SDK's host tools.

Specifically, setting ZEPHYR_SDK_INSTALL_DIR now indicates that the
Zephyr SDK host tools are to be used. But not necessarily that the
Zephyr SDK's toolchain is to be used.

The documentation is also changed to explain this behaviour.

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-13 13:14:32 -05:00
Carles Cufi
0182be42b1 doc: Convert bits and pieces to CMake
Convert leftover references to "Make" to CMake.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-12 15:51:24 -05:00
Johan Hedberg
fbe5674f9b Bluetooth: doc: Update references to qemu usage
The qemu option to access the host's Bluetooth controller is now
automatically added to QEMU_EXTRA_FLAGS whenever Bluetooth support is
enabled in the application. Update the documentation to reflect this.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-11-12 15:05:49 +02:00
Marti Bolivar
ae80ce716b doc: extensions: allow arbitrary goals
Rather than continuing to add build system goals, let's just trust the
user to do the right thing. The only special case is build, which is
the default goal.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-10 18:35:50 -05:00
Marti Bolivar
1fa355490f doc: extensions: cosmetic whitespace fixes
Make flake8 happier about the whitespace.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-10 18:35:50 -05:00
Anas Nashif
706ac7fe07 doc: redirect doc generation output using tee
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-10 09:30:10 -05:00
Carles Cufi
92d3d367e3 doc: ext: Add a run goal to the zephyr-app-commands
Since run is also used commonly, add it as a goal as well for those
users of the extension that want to create a sequence similar to:

$ make
$ make run

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-10 09:27:23 -05:00
Carles Cufi
041f018300 doc: ext: Add compact option to zephyr-app-commands
The new :compact: option allows for a single block of code output
without additional newlines or comments.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-10 09:27:23 -05:00
Carles Cufi
30f2acb057 doc: ext: Extend zephyr-app-commands with new args
New arguments added:

- conf: -DCONF_FILE=<>
- gen-args: Additional arguments to pass to CMake
- build-args: Additional arguments to pass to Make or Ninja

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-10 09:27:23 -05:00
Carles Cufi
fa0030a31c doc: getting_started: Convert to using app extension
Use the new zephyr-app-commands extension to document the building of
applications

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-09 10:35:22 -05:00
Carles Cufi
e23742d5c7 doc: ext: Fix application extension CMake params
CMake requires "-D" for every macro that is passed into it. Add the
relevant "-D" for the Make variant of the extension.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-09 10:35:22 -05:00
Marti Bolivar
6092fb0f86 doc: add zephyr-app-commands directive
Add extensions/zephyr to the documentation. This is where Sphinx
extensions customized for Zephyr will live.

Within, add application.py. This provides a directive,
zephyr-app-commands, which generates commands in the docs to build,
flash, debug, etc. an application. For now, these are Unix shell
specific. Later on, they can be customized to generate additional
formats, perhaps with extra options.

After this is used throughout the tree, doing this with an extension
enables global changes with changes to the directive implementation
only.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Carles Cufi
00a07c385c doc: cmake: Unify getting started guides
Unify the format and mechanisms used in the different Getting Started
guides so that they are consistent in:

- The way Kconfig is built
- Avoiding using -B and -H CMake options
- -DBOARD instead of export

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Carles Cufi
3d01cdd60e doc: cmake: Update the Linux CMake instructions
We no longer want to pin users to 3.8.2. Instead we tolerate the warning
and therefore ask users to get the latest CMake package from their
distro.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Carles Cufi
4e59b3df62 doc: cmake: Update macOS build instruction
Update macOS build instructions so that they reflect the transition to
CMake.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe
3998b9e5ef cmake: Use Make for examples instead of Ninja
Ninja is not tested as well as Make yet, so for now, recommend using
Make.

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Anas Nashif
a037c363bb doc: fixed version parsing for docs
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-08 20:00:22 -05:00
Anas Nashif
efff10acbb doc: fix doxygen EXCLUDE
Add backspace and fix spacing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
2308ff1858 doc: application: fix britishism regarding parentheses
Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
04a07c5cce doc: application: merge configuration paragraphs
Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
386df0c4e9 doc: application: fixup for app versus zephyr config
The line between Zephyr versus application is blurry since they share
a configuration, but try to disambiguate.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
d36c308889 doc: application: add rest formatting to CMakeLists.txt
Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
42e4672985 doc: application: clarify KCONFIG_ROOT section
The documentation regarding application-specific Kconfig options is
unclear. Fix that.

Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
f79a95abe1 doc: application: revise app/zephyr link documentation
Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
0c0c06242c doc: application: fix "behavior" british spelling
Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
9bd9d487eb doc: application: clarify a pronoun antecedent
Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
e21b175a03 doc: application: provide ddd install instructions
Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
137424368d doc: application: fix typo
s/remove/remote/

Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
97c8596733 doc: application: fix QEMU capitalization
Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
10d19de019 doc: application: define ELF
The ELF format and extension is an acronym that needs a
definition. Add it.

Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
1f6175ad86 doc: application: debugging fixes
Grammatical fixes caught in review of unrelated changes.

Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
609bd35eaa doc: application: fix up alternate CONF_FILE
Fix the instructions for when an alternate CONF_FILE is used.

Reported-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
ca46dfa378 doc: application: fix up "running an application"
Re-work this section for clarity, making it clearer where the division
between emulated and real hardware is, and cleaning up the
instructions. Also re-work for correctness, updating Kbuild-style
flash instructions to use CMake.

Also make sure users know they can flash and run from anywhere on the
system using cmake --build.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
199dc8a18c doc: application: trivial whitespace fix
Fix the white space around "Naming Conventions", which is currently
appearing on its own line.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
9c85c7f11c doc: application: move build/run/debug docs after overview
This document's flow could be improved a bit. The overview section is
followed by somewhat dense reference material, which is then followed
by step-by-step instructions central to the application workflow.

Fix this up by moving the details to the end, and adjusting the
transitions between the sections a bit.

The diff looks like a mess, but this commit is mostly just moving
things around. There are also various grammar fixes incorporated from
review.

Reviewed-by: David Kinder <david.b.kinder@intel.com>
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>

squash! doc: application: move build/run/debug docs after overview
2017-11-08 20:00:22 -05:00
Marti Bolivar
dfcb2dfc70 doc: application: trivial fixups to "Rebuild an Application"
Make clear that a terminal is being used, and use a Sphinx :ref:
instead of a reST link.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
1b9b28847e doc: application: improvements to "Overriding Default Configuration"
Make this a bit less Unix-centric, changing the CMake invocation lines
to only use documented parameters that continue to work across all
CMake versions (-B doesn't work everywhere, and -H means "help" in
recent versions of CMake).

Handle some 80-column cleanliness. Add documentation about the search
key, /. Be a bit more explicit about the steps.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
554eebae1c doc: application: improve Kconfig setting documentation
Now that the above sections more clearly define the behavior of
CONF_FILE, the section on writing a .conf can be cleaned up and made
into a simple primer on syntax.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
40e04e6e1b doc: application: re-work CMakeLists.txt / configuration division
Fix a few issues related to the description of an application's
CMakeLists.txt file, and how that relates to its configuraiton.

Make sure the section "Application CMakeLists.txt" appears under the
parent "CMake" section, instead of on its own. The order in which
lines appear in the application CMakeLists.txt is important, and
that's not coming through clearly, so try to improve that. Document
how the values for BOARD and CONF_FILE are determined by
boilerplate.cmake here. Also document usage of KCONFIG_ROOT, as its
Kbuild-based equivalent is something that users ask about.

Merge some content from the following section "Application
Configuration" into the appropriate places, to keep the document flow
working. Add references in "Application Configuration" to definitions
provided previously in the document, for clarity.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
1d93f674a4 doc: application: touch up cmake overview
Fix up some grammar issues and add more reST formatting.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
ccfdff6577 doc: application: CMake updates for overview and creation docs
Update the initial application overview and the basic "how to create
an application" sections for the CMake transition. This is worth doing
on its own, and also enables other fixes and improvements to below
sections.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Marti Bolivar
2e3ecd8c52 doc: getting_started: add ref target for running hello world
This makes it possible to point users at a canonical location for how
to use zephyr-env.sh, etc.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-11-08 20:00:22 -05:00
Carles Cufi
4faed167b9 doc: getting_started: Windows MSYS2 with CMake
Update the Windows MSYS2 instructions with the required CMake commands
used to build on this platform.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Marti Bolivar
3eef1e3bea doc: application: fix stale sentence about Kbuild
The Overview section still mentions Kbuild, but the build system is
CMake now.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-11-08 20:00:22 -05:00
Anas Nashif
602a14365d doc: update with CMake instructions
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-08 20:00:22 -05:00
Anas Nashif
4c2d26098e doxygen: ignore misc/util.h
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-08 20:00:22 -05:00
Andrew Boie
8bffcda547 doc: usermode: iterative refinements
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-11-08 13:00:07 -08:00
David B. Kinder
d06e4f536c doc: fix misspellings in porting/arch.rst
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-08 13:51:33 -05:00
Andrew Boie
0bf9d33602 mem_domain: inherit from parent thread
New threads inherit any memory domain membership held by the
parent thread.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-11-08 09:14:52 -08:00
Andrew Boie
dede4cbd62 doc: move memory domain docs under user mode
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-11-07 09:32:37 -08:00
Andrew Boie
2d2a97b3f6 docs: initial user mode documentation
This initial batch of documentation describes policies and
mechanism related to kernel objects and system calls.

Some details on porting user mode to a new arch have been
provided in the architecture porting guide.

Thread documentation updated with some user mode consideration.

This is not the final documentation, more to come in subsequent
patches.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-11-07 08:18:48 -05:00
Jukka Rissanen
2486694eb9 net: http: Create HTTP library that uses net-app
Create http library that uses net-app instead of net_context
directly. The old HTTP API is deprecated.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-11-06 09:33:00 -05:00
Johan Hedberg
018198cedc net: buf: Add slist helpers
Now that net_buf has "native" support for sys_slist_t in the form of
the sys_snode_t member, there's a danger people will forget to clear
out buf->frags when getting buffers from a list directly with
sys_slist_get(). This is analogous to the reason why we have
net_buf_get/put APIs instead of using k_fifo_get/put.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-11-06 14:20:40 +02:00
Christoph Sax
591ba2c7ba doc: fix typos in a few docs
Found a few spelling issues while reading the documentation.
Corrections are provided.

Signed-off-by: Christoph Sax <c_sax@mailbox.org>
2017-11-05 08:20:14 -05:00
David B. Kinder
fafff0fa78 doc: update links to new zephyrproject.org site
Fix links to content on the new version of zephyrproject.org that moved.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-03 19:31:14 -04:00
Andy Gross
ede2dc6ae1 doc: Update security vulnerabilities email address
This patch fixes the email used for reporting security
vulnerabilities.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-11-03 14:19:08 -07:00
Marti Bolivar
668513e4fb docs: application: document "make flash" conventions
This is an important part of the workflow, which is missing from the
documentation.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-11-01 08:36:14 -04:00
Leandro Pereira
da9b0ddf5b drivers: Rename random to entropy
This should clear up some of the confusion with random number
generators and drivers that obtain entropy from the hardware.  Also,
many hardware number generators have limited bandwidth, so it's natural
for their output to be only used for seeding a random number generator.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-01 08:26:29 -04:00
Anas Nashif
780324b8ed cleanup: rename fiber/task -> thread
We still have many places talking about tasks and threads, replace those
with thread terminology.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-30 18:41:15 -04:00
Carles Cufi
97e030900b doc: 1.9.x release notes
Release notes for the following Zephyr kernel versions:

* 1.9.1
* 1.9.2

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-10-28 13:44:24 -04:00
David B. Kinder
9017a8451b doc: eliminate many "expected" doc gen warnings
Adding NET_MGMT_DEFINE_REQUEST_HANDLER to the doxygen configuration
list of pre-defined macros eliminates 800 lines of "expected" warning
messages from the document generation output.  Generated API docs
are unchanged. Cool.

Remember this if/when other macros pop up as a problem for the
doxygen/breathe/sphinx API generation tools.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-10-20 19:34:45 -04:00
David B. Kinder
3d2e1dc431 doc: fix doxygen handling of __attribute__(x)
The predefined macro list for doxygen processing had a typo error
causing __attribute__(x) to not be handled correctly.

kernel.h was recently updated to include use of
 __attribute__((sentinel)) and doxygen wasn't happy about
processing the API doc comments for the affected function.

Also added a couple of other predefined macros used in Zephyr.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-10-20 15:29:10 -04:00
David B. Kinder
2632c6d804 doc: update linux installation guide for 0.9.2 SDK
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-10-19 20:09:00 -04:00
Carles Cufi
81643e2c1d doc: getting_started: Fix layout issue with code block
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-10-18 12:25:53 -04:00
David B. Kinder
9fa45795f8 doc: spelling and clarity edits to sanitycheck doc
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-10-17 18:39:46 -04:00
David B. Kinder
ee71332b99 doc: fix doc misspellings
Found some spelling issues missed during regular PR review

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-10-17 14:31:52 -04:00
Anas Nashif
ebc329dc30 doc: document extra_configs option for testcases
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-17 14:13:52 -04:00
Anas Nashif
90c1cf1fcf doc: run oldconfig on xtools config
This is needed to reset the configuration options based on the OS we are
building on.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-12 16:27:12 -05:00
Leandro Pereira
712ce26fa0 docs: drivers: Fix syntax errors in "Single Driver, Multiple Instances"
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-10-09 20:53:22 -04:00
Ravi kumar Veeramally
c30f692af0 net: samples: Modify coaps_client to new CoAP api's
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-10-06 22:07:37 -04:00
Ravi kumar Veeramally
7519240502 net: samples: Modify coaps_server to new CoAP api's
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-10-06 22:07:37 -04:00
Ravi kumar Veeramally
bde8c6d616 net: samples: Modify zoap_client to new CoAP api's
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-10-06 22:07:37 -04:00
Ravi kumar Veeramally
3e4a70669a net: samples: Modify zoap_server to new CoAP api's
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-10-06 22:07:37 -04:00
Ravi kumar Veeramally
42a91f4c07 net: coap: Rename ZOAP library
ZOAP library has certain limitations in parsing and preparation of
coap messages. It can handle only on single network fragment. If
network packet is split between multiple fragments it fails. This
patch is just copy and rename of 'zoap' to 'coap'.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-10-06 22:07:37 -04:00
David Leach
9bc6461144 doc: Adding ccache to Linux environment setup.
The sanity test script needs to have ccache installed on the Ubuntu
and Fedora developement environments.

Signed-off-by: David Leach <david.leach@nxp.com>
2017-10-04 17:50:44 -04:00
Carles Cufi
2f790f5c1e doc: getting_started: Clarify MSYS2 instructions
The MSYS2 installer does not include an updated version of the package
database, so users need to update it first in order to install all of
the required dependencies. Additionally, the repo must be cloned before
being able to install the Python requirements.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-10-03 14:47:46 -04:00
David B. Kinder
37340c7353 doc: remove obsolete v1 changes/porting docs
doc/kernel/overview/changes.rst contains information about changes from
kernel release 1.5 ("Version 1 Kernel") to the combined "Version 2
Kernel" and doc/porting/application.rst talked about how to change
applications using Version 1 interfaces to the Version 2 interface.
This information remains in the online tagged versions of the
documentation, but it's time to remove this from the current
documentation set. (Also removing example porting code.)

Fixes issue #1524

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-10-03 14:47:11 -04:00
Chunlin Han
e9c9702818 kernel: add memory domain APIs
Add the following application-facing memory domain APIs:

k_mem_domain_init() - to initialize a memory domain
k_mem_domain_destroy() - to destroy a memory domain
k_mem_domain_add_partition() - to add a partition into a domain
k_mem_domain_remove_partition() - to remove a partition from a domain
k_mem_domain_add_thread() - to add a thread into a domain
k_mem_domain_remove_thread() - to remove a thread from a domain

A memory domain would contain some number of memory partitions.
A memory partition is a memory region (might be RAM, peripheral
registers, flash...) with specific attributes (access permission,
e.g. privileged read/write, unprivileged read-only, execute never...).
Memory partitions would be defined by set of MPU regions or MMU tables
underneath.
A thread could only belong to a single memory domain any point in time
but a memory domain could contain multiple threads.
Threads in the same memory domain would have the same access permission
to the memory partitions belong to the memory domain.

The memory domain APIs are used by unprivileged threads to share data
to the threads in the same memory and protect sensitive data from
threads outside their domain. It is not only for improving the security
but also useful for debugging (unexpected access would cause exception).

Jira: ZEP-2281

Signed-off-by: Chunlin Han <chunlin.han@linaro.org>
2017-09-29 16:48:53 -07:00
David B. Kinder
de85fdedf9 doc: more attribute ids to eliminate warnings
Building off the success of PR #4119, add more attributes to the sphinx
processing list (as encountered in PR #4123) plus others from
include/toolchain/gcc.h that looked safe to add.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-29 16:10:38 -07:00
Andrew Boie
fa94ee7460 syscalls: greatly simplify system call declaration
To define a system call, it's now sufficient to simply tag the inline
prototype with "__syscall" or "__syscall_inline" and include a special
generated header at the end of the header file.

The system call dispatch table and enumeration of system call IDs is now
automatically generated.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-29 13:02:20 -07:00
David B. Kinder
3d4f213a9c doc: add sphinx/breathe conf to eliminate warnings
The doxygen/sphinx/breathe processing for API documentation has some
known issues and we've been using a post-processing filter to eliminate
"expected" warnings.  Sphinx/Breathe 5.0 was updated to support
identifying attributes causing these warnings, so this PR adds a
starting list to get around warnings recently introduced with __syscall
and __syscall_inline (PR #4103).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-29 12:17:28 -07:00
David B. Kinder
9c50ac3ca7 doc: update doc generation info
Update the versions of tools used to generate documentation locally and
include a description of the message filtering now included in the doc
build Makefile (formerlly only done in the CI scripts).

Also, include the documentation docs in the developer guides to help
folks that want to contribute and generate docs locally.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-29 05:51:59 -07:00
David B. Kinder
10b24a87fc doc: add contributing non-Apache2.0 docs
Add contribution process for including non-Apache 2.0 components
as approved by the TSC.  Include a README template that lists
information requested by the TSC and governing board for review.
Add a brief mention in the CONTRIBUTING link that appears when
submitting a new PR or Issue via the GitHub web interface.

Included an introduction to the process steps that includes using the
zephyr devel mailing list to discuss new components.

fixes #1543

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-22 08:39:38 -04:00
David B. Kinder
d3b0cd4827 doc: move docgen filter out of shippable script
Because of known issues with Sphinx/Breathe tools we're using to
generate doxygen-based comments for our API documentation, we're getting
a bevy of warning messages written out. As a workaround for our CI
system, we created a filter-known-issues.py script to remove "expected"
warnings from the output.

This patch moves calling that filter script into the doc generation
Makefile so folks making local builds of the docs won't be tripped up by
all the warning messages either.  Output of the "make htmldocs" command
is now filtered so only "unexpected" errors and warnings will be shown.

(See https://github.com/sphinx-doc/sphinx/issue/2682 and
sphinx-doc/sphinx#2683i for the Sphinx/Breathe issues.)

Fixes #1527

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-22 08:07:30 -04:00
Michał Kruszewski
ae76cb0598 net: Improve documentation about accessing Internet from qemu.
Add information that static IPV4 address of gateway needs to be
explicitly configured when DHCP is not supported.

Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
2017-09-22 08:01:44 -04:00
David B. Kinder
8c708fd049 doc: fix misspellings and hyphen use
fixed error introduced in application.rst (v1.8) along with a general
spelling check pass including consistent spelling of "runtime" and
hyphenated words with "pre-"

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-20 15:33:43 -04:00
Sebastian Bøe
b56c317ffd doc: Add RISC-V to a list of SDK-supported ISA's
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-09-18 10:20:39 -04:00
David B. Kinder
d98661ac27 doc: update to use macOS throughout docs
fixes #1499

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-15 17:21:47 -04:00
David B. Kinder
d0e9d7c102 doc: fix link title in linux installation guide
fixes: #1501

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-14 20:48:54 -04:00
David B. Kinder
1b79787540 doc: tweak API doc CSS for RTD theme
Tweaks to the zephyr-doc-theme for improving the API layout
should be applied to the read-the-docs (RTD) theme too.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-13 09:14:21 -04:00
Massimiliano Cialdi
d140a7f501 doc: fix instruction in Adding Directories section
Signed-off-by: Massimiliano Cialdi <cialdi@gmail.com>
2017-09-12 18:16:27 -04:00
Anas Nashif
1caa6f27ec doc: update release notes with ARC details
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-12 13:46:30 -04:00
Anas Nashif
2397ce8975 doc: update release notes index with 1.9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-12 13:19:51 -04:00
David B. Kinder
f64151a7f1 doc: improve API docs with sections
Doxygen-generated API documentation had the ability to
group API information into sections based on the class
of items: Defines, Typedefs, Enums, Functions and then
alphabetized with these groups.  By removing the
Breathe directive :content-only: we can get these class
groupings back (instead of having items just sorted
alphabetically across all classes), and also allow @name
groups to be defined for creating and displaying additional
groups (as requested by a developer).

Depends on CSS changes in
https://github.com/zephyrproject-rtos/docs-theme/pull/14

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-12 07:48:37 -04:00
David B. Kinder
91f25ee588 doc: exclude spi_legacy.h from API docs
spi.h and spi_legacy.h contain duplicate type and function names that
interfere with the doxygen-based API documentation.

fixes: #1425

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-10 09:18:01 -04:00
Andrew Boie
81c53364c9 doc: add gperf to workstation setup packages
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
David B. Kinder
5bbaa12e59 doc: add 1.9.0 docs link to index page
In final preparation for the 1.9 release, add the doc link for the
tagged 1.9.0 documentation to the index page.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-07 18:27:51 -05:00
Shilpashree L C
4ef3378173 doc: update release notes for v1.9
Updated the Jira list with the latest jira entries
in the release notes. RTOS-2393

Signed-off-by: Shilpashree L C <shilpashree.lc@intel.com>
2017-09-07 12:29:37 -05:00
David B. Kinder
874ff05c73 doc: update release notes
remove WIP in heading, fix misspelling, fix python filename,
updated doc section

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-07 09:59:44 -05:00
Anas Nashif
0075488ccd doc: update 1.9.0 release notes
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-07 07:04:58 -05:00
Ruslan Mstoi
0bd1635518 Bluetooth: doc: update GATT PICS file
This commit makes GATT PICS up-to-date with the Zephyr HCI
TPG test plan

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2017-09-07 05:52:11 -05:00
David B. Kinder
aea3038633 doc: genrest writing files without final newline
The script used to generate Kconfig documentation (genrest.py)
was creating .rst files without a final newline.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-06 18:37:55 -05:00
David B. Kinder
19d9d41921 doc: fix broken wiki reference
Reference to the Development Model should point to GitHub wiki

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-06 14:50:42 -05:00
Ruslan Mstoi
666d0b672a Bluetooth: doc: update SM PICs file
This commit makes SM PICs up-to-date with the Zephyr HCI
TPG test plan

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2017-09-06 12:00:11 -05:00
Ruslan Mstoi
8c99dbd3ca Bluetooth: doc: update L2CAP PICs file
This commit makes L2CAP PICs up-to-date with the Zephyr HCI
TPG test plan

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2017-09-06 11:59:35 -05:00
Ruslan Mstoi
f23d44afd4 Bluetooth: doc: update GAP PICs file
This commit makes GAP PICs up-to-date with the Zephyr HCI
TPG test plan

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2017-09-05 09:16:44 -05:00
Carles Cufi
2e17a60957 doc: release notes: Add BLE controller to the highlights
Include the fact that the Zephyr BLE Controller is ready for
qualification in the release highlights.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-09-05 07:39:28 -04:00
Johan Hedberg
d31189906b release-notes: Make a clear note about the Kconfig prefix change
Make it known to any out-of-tree apps that they need to update their
references to any Bluetooth Kconfig options.

Jira: ZEP-2558

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-09-04 13:04:08 -04:00
Anas Nashif
52fdd53c27 doc: cleanup release notes
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-04 09:16:46 -04:00
LC Shiplashree
6d6007892b doc: update release notes for v1.9
Added the list of Jira items, Kernel and HAL
related changes for release notes v1.9

Signed-off-by: Shilpashree L C <shilpashree.lc@intel.com>
2017-09-04 06:05:10 -04:00
David B. Kinder
70e381f2e8 doc: scan/fix .rst file misspellings
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-31 14:22:39 -04:00
Leandro Pereira
ad98840a09 doc: release_notes: Add note about mbedTLS and TinyCrypt updates
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-31 13:54:14 -04:00
Leandro Pereira
e8d7055760 doc: release_notes: Add note about ESP32 support
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-31 13:54:14 -04:00
Adithya Baglody
144b92ae7d doc: update release notes for v1.9
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-08-30 08:08:27 -04:00
Harm Berntsen
1f46eb66d8 doc: fix Zephyr SDK archive URL
Signed-off-by: Harm Berntsen <git@harmberntsen.nl>
2017-08-26 08:06:55 -04:00
Maureen Helm
4f465b4e8e doc: Update 1.9 release notes for arm
Adds arm items to the architectures and boards sections.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-08-25 12:20:28 -04:00
Maureen Helm
cd4a875e09 doc: Add Kinetis adc and pwm drivers to 1.9 release notes
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-08-25 12:20:28 -04:00
Savinay Dharmappa
e27a162ac4 doc: updated doc for Zephyr release 1.9.
Updated doc for release 1.9 for :-

1. Added device tree support for Intel Quark based microcontroller
   boards.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-08-25 09:08:20 -04:00
Youvedeep Singh
7725fc07e3 doc: updated doc for Zephyr release 1.9.
Updated doc for rel 1.9 for :-
1. TICKLESS Kernel support for nrf RTC timer.
2. Added test cases for stress test round robin scheduling and priority
premptive scheduling.

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2017-08-25 08:57:55 -04:00
David B. Kinder
8875a98221 doc: fix sphinx 1.5 broken search box
Sphinx 1.5 introduced changes that broke the
sphinx-supplied search (as explained in
https://github.com/sphinx-doc/sphinx/pull/2454)

This patch, along with a patch in the docs-theme
https://github.com/zephyrproject-rtos/docs-theme/pull/10
repairs things.

Jira: INF-136

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-22 16:28:53 -04:00
David B. Kinder
b03ed2b2b9 doc: remove use of :download: directive
The :download: directive doesn't format well on output, and also
links to files that likely have linux line endings that don't
display well on Windows systems.

fixes: #1204

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-22 08:34:37 -04:00
Paul Sokolovsky
d50bea3c5e doc: 1.9: Elaborate on BSD Sockets and some other factual fixes
There're no "POSIX API support", of POSIX features, only subsets of
Pthreads and BSD Sockets APIs are implemented.

Also, mention HTTP client/server improvements.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-08-22 08:17:04 -04:00
Michael Scott
9ad830ab54 doc: Move LwM2M support to Major enhancements section of 1.9 rel notes
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-08-21 08:37:15 -04:00
David B. Kinder
cf17f4870d doc: fix typos and licensing text
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-18 21:42:08 -04:00
David B. Kinder
a13eaf5082 doc: add custom 404 page
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-18 21:41:45 -04:00
Anas Nashif
85f7fbcfed doc: move API under Developer Guides
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-18 16:32:28 -04:00
Anas Nashif
8fc665c427 doc: move security section up
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-18 16:32:28 -04:00
Anas Nashif
3e4efa02f2 doc: put licensing and release notes in the index page
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-18 16:32:28 -04:00
Anas Nashif
e381a61ff0 doc: simplify top level TOC
Simplify top-level table of contents and create the user guide which
includes the application development primer and other guides and
refereces instead of having them at the top-level.

Also move glossary section away from top-level TOC and remove broken
search link.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-18 16:32:28 -04:00
Anas Nashif
19c823e2e9 doc: move application development and reference into one section
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-18 16:32:28 -04:00
Anas Nashif
f39e2b4103 doc: add Xtensa as supported architecture
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-18 16:32:28 -04:00
Anas Nashif
3009359601 doc: move device drivers, model and tree in one section
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-18 16:32:28 -04:00
David B. Kinder
1257bdc9ec doc: add project security docs
While we're working on doc publishing that separates
kernel docs that are release-specific from project docs
that aren't, (temporarily) put the security documents
here so they'll be published with the 1.9 release.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-17 23:20:40 -04:00
Punit Vara
ede588a19f doc: Add APDS9960 sensor driver in release note v1.9
Signed-off-by: Punit Vara <punit.vara@intel.com>
2017-08-17 14:17:41 -04:00
Carles Cufi
16a28bf106 Bluetooth: VS: Add RSSI to Scan Req Received Event
In order to allow for the controller to report the RSSI of a received
Scan Request, include the field inside the Scan Request Received
Vendor-Specific Event.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-08-17 12:36:51 +02:00
David B. Kinder
ab04339e2f doc: update 1.9 release notes with doc changes
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-16 19:45:51 -04:00
Marti Bolivar
cf9a5e352f doc: 96Boards Carbon: add Bluetooth setup docs
Add cross-referenced information on the 96b_carbon and
96b_carbon_nrf51 pages which disambiguates between the two "boards".
Also describe how to flash 96b_carbon_nrf51 with
samples/bluetooth/hci_spi and 96b_carbon with samples/bluetooth/ipsp
to support a Bluetooth HCI stack on 96Boards Carbon (the physical
board).

While we're here, make the documentation page for 96b_carbon match the
format in doc/templates/board.tmpl.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-08-15 22:58:02 +03:00
Ricardo Salveti
8dbb388000 samples: Bluetooth: add HCI SPI raw handler sample
Add a sample application that allows a Zephyr-based Bluetooth
controller to interface with an HCI driver via SPI. This sample
implements the same BT SPI protocol already as Zephyr's HCI SPI
driver.

Currently, the sample only supports the legacy SPI API.

Provide a single configuration file, avoiding board-specific
files. Some board-specific configuration information must be provided
via other means:

- CONFIG_BT_CONTROLLER_TO_HOST_SPI_DEV_NAME
- CONFIG_BT_CONTROLLER_TO_HOST_SPI_IRQ_DEV_NAME
- CONFIG_BT_CONTROLLER_TO_HOST_SPI_IRQ_PIN

Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-08-15 22:58:02 +03:00
Carles Cufi
0ac5dd760f doc: Clarify the Bluetooth 5.0 support in 1.9
Since Advertising Extensions are not supported yet by Zephyr, clarify
the extend of Bluetooth 5.0 support in the subsystem.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-08-15 09:56:56 -04:00
Carles Cufi
749d318199 doc: Add BLE controller changes to 1.9 release notes
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-08-15 09:35:33 -04:00
Luiz Augusto von Dentz
f54f2bac49 doc: Add Bluetooth host changes to 1.9 release note
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-15 09:35:33 -04:00
Piotr Mienkowski
cbff174d3a drivers: Add I2S (Inter-IC Sound) driver API
Origin: Original

Jira: ZEP-230
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-08-14 11:14:34 -04:00