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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Shell macro SHELL_DEFINE no longer needs new line character.
Specification has been updated accordingly.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>