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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>