Commit graph

175 commits

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