Commit Graph

160 Commits

Author SHA1 Message Date
Declan Snyder 0d36622b05 doc: Fix dt_chosen_has_compat doc
Missing a parameter in this function documentation

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 22:44:51 +01:00
Declan Snyder 4773975a6b scripts: Add dt_compat_any_has_prop value param
Add optional value parameter to dt_compat_any_has_prop
kconfig preprocessor function, which puts an additional constraint on
the truth of the function in that the property value must match the
parameter value.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:53:27 +01:00
Benjamin Cabé bcfbcc00af boards: qemu: adopt new zephyr:board directive and role
This updates the documentation of all the Qemu boards
to use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Dominik Lau b38a4ccbdb boards: added touch controller to the `/chosen` node
This adds zephyr,touch property to boards with touch controllers, analogous
to `zephyr,display`.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-10-09 18:11:21 +01:00
Jamie McCrae 1df078158f doc: build: Add signing page
Adds a signing page under build, which contains information on
how to sign images from the build system, this removes the old
details for using west sign with imgtool from the west sign page

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Arrel Neumiller a3556aafb7 doc: kconfig: clarify .config file location
Fixes issue #78815

Specifies explicitly the location of the generated .config file
relative to the build directory.

Signed-off-by: Arrel Neumiller <rlneumiller@gmail.com>
2024-10-02 09:54:12 +02:00
Florian Grandel 247ce6cbe2 doc: build: kconfig: preprocessor: remove obsolete entry
The entry listed in the docs does not exist. The correct entry
(dt_compat_enabled) is present.

Fixes #79081

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-28 08:14:45 -05:00
Declan Snyder f8a4a2ff5c doc: dts: Link Linux binding guidelines.
The Linux binding DO's and DONT's about designing DT bindings
pretty much all apply to Zephyr as well, and a lot of these issues
come up in reviews in Zephyr, which is the reason that Linux has
this page in the first place, to list common binding review topics.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-20 11:52:34 -05:00
Benjamin Cabé 9a16b93868 samples: hello_world: use zephyr:code-sample directive
Adds missing code-sample directive to the Hello World sample in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-16 10:05:18 +02:00
Benjamin Cabé aee98147d2 doc: sphinx-lint: fix dangling-hyphen
Dangling hyphens at the end of a line are usually a problem, ie. you
have an "hyphenated-word" and breaking it on two line will render it as
"hyphenated- word".
This commit fixes the few occurences of such dangling hyphens.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-11 07:39:30 -04:00
Benjamin Cabé e0bf01af79 doc: sphinx-lint: fix missing-space-before-role
used sphinx-lint to catch sphinx roles missing opening tag colon.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-11 07:39:30 -04:00
Chaim Zax f54a53b4b3 drivers: ws2812_gpio: Make timing configurable and less hardware dependend
The current driver contains assembly code which is specific for the nRF51
SOC which makes it incompatible with other SOC's. This patch adds support
for other nRF SOC's as well. The timing is calucated based on the CPU clock
frequency, but can be configured manually as well if needed.

Changes have been verified on a Adafruit Feather nRF52840 Express board,
which contains a single NeoPixel RGB LED. Timings have been verified using
a scope connected to the WS1812 data line.

Signed-off-by: Chaim Zax <chaim.zax@zaxx.pro>
2024-09-06 11:31:00 -04:00
Benjamin Cabé 34982bb00b doc: samples: use :zephyr-app: for in-tree samples
The zephyr-app-commands directive can output a helpful hint to the user
when they are trying to build a sample that is in the Zephyr tree,
telling them to ensure they are in the root folder of the Zephyr repo.

Update all doc pages that were using :app: instead of :zephyr-app: so
that the hint is displayed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:18:05 -04:00
Benjamin Cabé d23d19d7f0 samples: bluetooth: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 16:58:32 -04:00
Benjamin Cabé 385f8e127d doc: Use basic ..doxygengroup syntax
Do not pass options to doxygengroup to rationalize
usage and be less dependent on Breathe.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-13 09:49:21 +01:00
Pieter De Gendt 0e1a98c1bc doc: build: kconfig: Update preprocessor functions
Split preprocessor functions into different categories and add newly
introduced functions.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-02 13:41:07 +02:00
Declan Snyder 42f77ef836 doc: kconfig: Add missing preprocessor functions
Add preprocessor functions missing from the documentation list.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-16 18:17:34 +02:00
Pisit Sawangvonganan eead5104fc doc: fix typo in multiple directories before v3.7.0 release
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `doc` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-08 09:21:24 +02:00
Jordan Yates a9456221cd doc: version: document the numeric version limits
The `VERSION` numeric fields are used to construct the `uint32_t`
`KERNELVERSION` and `APPVERSION` values, which only allocates a single
byte for each field.

The field in `app_version.h` is `APP_TWEAK`, not `APP_VERSION_TWEAK`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-24 08:28:54 -04:00
Jamie McCrae f1410959fd doc: sysbuild: Add tag for application configuration section
Adds a tag to the sysbuild application configuration section so it
can be referenced in other documentation

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-12 18:27:14 -04:00
Fin Maaß fb8b30d8d0 dts: devicetree.h: add DT_REG_HAS_NAME
Add DT_REG_HAS_NAME,
DT_REG_ADDR_BY_NAME_OR,
DT_REG_SIZE_BY_NAME_OR,
DT_INST_REG_HAS_NAME,
DT_INST_REG_SIZE_BY_NAME_OR and
DT_INST_REG_ADDR_BY_NAME_OR.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 17:12:23 -05:00
Martí Bolívar 74abb2bf95 devicetree: add first-class node label helpers
Add the following new macros:

- DT_FOREACH_NODELABEL
- DT_FOREACH_NODELABEL_VARGS
- DT_INST_FOREACH_NODELABEL
- DT_INST_FOREACH_NODELABEL_VARGS

These are for-each helpers for iterating over the node labels of a
devicetree node. Since node labels are unique in the entire
devicetree, their token representations can be useful as unique IDs in
code as well.

As a first user of these, add:

- DT_NODELABEL_STRING_ARRAY
- DT_INST_NODELABEL_STRING_ARRAY

The motivating use case for these macros is to allow looking up a
struct device by devicetree node label in Zephyr shell utilities.
The work on the shells themselves is deferred to other patches.

To make working with the string array helpers easier, add:

- DT_NUM_NODELABELS
- DT_INST_NUM_NODELABELS

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2024-06-12 18:49:54 +02:00
Johan Hedberg 0b8e56120c Bluetooth: doc: Update documentation for the new HCI API
Update references to devicetree chosen properties and how devicetree nodes
should be defined in order to enable the new HCI drivers.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 19:42:49 -04:00
Torsten Rasmussen ed954bf638 doc: describe Kconfig tracking symbol
Fixes: #73132

Add a subsection on tracking Kconfig symbols whose default values is
obtained from another Kconfig symbol.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-04 14:06:13 -05:00
Yong Cong Sin bbe5e1e6eb build: namespace the generated headers with `zephyr/`
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.

Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.

Updated the includes path of in-tree sources accordingly.

Most of the changes here are scripted, check the PR for more
info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00
Declan Snyder 79f1b23cdb doc: Add missing ABNF macros for child num
Commit 5871ff010b
added support for generated DT macros to get the number
of child nodes of a node, but we forgot to update
the documentation of the augmented Backus–Naur form
of the DT macros to reflect this addition.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-22 13:46:04 -05:00
Declan Snyder 5f938228fd doc: sysbuild: Fix namespace example
The namespace example seems to have a typo missing the CONFIG_
part of the kconfig argument in the mcuboot target, fix it.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-07 15:22:05 -05:00
Jamie McCrae ff823c63ee doc: build: flashing: Add documentation
Adds documentation on the new flashing configuration system

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 17:56:19 +01:00
Jamie McCrae af467659de doc: build: Add details on SoC overlays
Adds details about Kconfig fragments and devicetree overlay files
that will be included in a build if they are found in the
``socs`` folder

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 15:08:35 +01:00
Andrej Butok c8f12c9273 doc: kconfig: fix HAS_CONFIGURABLE_FOO
Use HAS_CONFIGURABLE_FOO instead of wrong HAS_CONFIGURABLE.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-04-29 15:53:34 +02:00
Jamie McCrae 3d48ad90c9 doc: develop: application: Fix missed HWMv2 changes
Fixes outdated information that was missed with the HWMv2 migration

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-18 08:06:49 -07:00
Benjamin Cabé 27f91456a4 doc: dts: fix link to reel board DTS file
fix broken link following hwmv2 migration

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-03-15 18:21:05 -04:00
Benedikt Schmidt 004b307206 doc: kconfig: add exemption for busses in select recommended practices
Add the exemption for busses to the recommended practices
for select.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-02-26 12:06:06 +01:00
Jamie McCrae 5d458d1ce6 doc: build: sysbuild: Remove mention of child image
Removes mention of child image to prevent confusion with other
systems that have no relation to sysbuild

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-16 06:46:25 -06:00
Jordan Yates d323acafc3 doc: build: snippets: application required snippets
Document how an application can automatically include snippets when
being built.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-02-14 14:14:20 +01:00
Jamie McCrae 425ef8abd3 doc: Add documentation on FILE_SUFFIX build variable
Adds details to the application development page and sysbuild
page documenting the variable, how it works and how it should
be used

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 19:54:21 +01:00
Torsten Rasmussen a306397818 version: cmake: kconfig: introduce extra <type>_VERSION_<x>_STRING
Fixes: #68360

This commit introduces <type>_VERSION_TWEAK_STRING which includes
the tweak field in the string, but without the extra version.
This format is used by MCUboot / imgtool, and thus makes it easier to
align code to the format used by MCUboot.

This commit also introduces <type>_VERSION_EXTENDED_STRING which
includes the tweak field in the string in addition to the extra version
field.

The new defines / variables is available in code, CMake, and Kconfig,
and it defined for KERNEL, APP, and custom types, such as MCUBOOT.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-01 10:28:43 +00:00
Torsten Rasmussen 738999e191 version: export tweak version in version.h
The commit export TWEAK version to code through version.h.
This aligns the symbols available in code with those available in
CMake and Kconfig.

The new define is available for both KERNEL, APP, and custom version
types (such as MCUBOOT).

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-02-01 10:28:43 +00:00
Yong Cong Sin 450a66fa36 gen_defines: output the interrupt level of a node
Currently it is tedious to know the level of an interrupt for
a node in C. One would have to go through a very complex and
error prone macros to check if there's a parent interrupt
controller & if the controller has an interrupt number and thus
not a pseudo interrupt controller like the one found in
`rv32m1`. The level of a node is required to encode the
Zephyr's multi-level interrupt number

Since it is easier to do it in the `gen_defines` script, let's
do the heavy lifting there so that we can introduce new DT
macros to get the interrupt level very easily later.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Bjarki Arge Andreasen 08d6ff059e scripts: dts: gen_defines: Generate interrupt-controller macro
Extend the gen_defines.py write_interrupts(node) function to
generate macros to get the interrupt controller for an
interrupt specifier by idx and by name.

The information is already generated by edtlib.py and stored in
node.interrupts[].controller. This addition uses the node pointed
to by the controller member to generate the following example output

define DT_N_S_device1_IRQ_IDX_0_CONTROLLER \
       DT_N_S_gpio_800

define DT_N_S_device1_IRQ_NAME_test4_CONTROLLER \
       N_S_device1_IRQ_IDX_0_CONTROLLER

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-17 13:18:00 +01:00
Adam Bozanich 9e4328cdcd doc: build: dts: bindings-syntax: compatible typo
The discussion and bindings for this node
assume that it is compatible with `"bar,pwm"`.

Signed-off-by: Adam Bozanich <adam.boz@gmail.com>
2023-11-29 17:39:30 -08:00
Benjamin Cabé 155420522b doc: Fix occurrences of repeated words
Another round of repeated words cleanup. This commit tries to keep the
diff minimal and line wrapping was mostly left intact in the touched
files, as having them consistent across the documentation is probably
the topic of a future tree-wide cleanup (or not)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-15 17:34:39 -05:00
Chris Friedt c0064f1de8 logging: uart: support multiple instances
Extends the log_backend_uart to support logging to multiple
UART instances.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-13 09:47:06 +01:00
Yong Cong Sin 30940418b3 doc: kconfig: sort devicetree functions alphabetically
Sort these entries alphabetically to make it easier to read.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 15:31:38 +01:00
Yong Cong Sin 4b0fa40c71 doc: kconfig: remove duplicated devicetree function
These devicetree function entries already existed in the doc
since #21133.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 15:31:38 +01:00
Fabio Baltieri 8816852c2c doc: dts: api: update the inter-node dependencies documentation
Update the inter-node dependencies documentation to clarify the child
node dependency inheritance recently introduced in 403640b75e.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-08 10:06:57 +01:00
Jordan Yates 7aae40e844 doc: build: kconfig: document `configdefault`
Document the new `configdefault` Kconfig extension.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-10-26 09:47:06 +02:00
Jordan Yates ee1acd8ae5 doc: build: kconfig: expand on multiple symbols
Convert the warning about multiple symbol definitions to a dedicated
section. This allows the warning to be restricted to the information
that is non-intuitive, with a note for actions that should be taken
when working with multiple definitions.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-10-26 09:47:06 +02:00
Benjamin Cabé 70b49c7f51 doc: build: Fix highlighting of code blocks
Set appropriate language for code blocks to show up with the right
syntax highlighting.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-18 18:39:23 +03:00
Benjamin Cabé 57c17da528 doc: devicetree: Fix highlighting of code blocks
Make sure devicetree code blocks all have proper pygments language set.
Fixed a few other "none" code blocks as well.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-18 13:22:45 +03:00