Commit graph

7592 commits

Author SHA1 Message Date
Jilay Pandya
a7e6fe6e6e docs: migration_guide_4.1: renamed device tree property
add migration guide of renamed device tree property:
- max-curr-opt

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-01-19 19:22:37 +01:00
Anas Nashif
3269b49b66 doc: coding guidelines: move safety related language to saftey section
Move some of the historical safety related language and
enforcement strategy re coding guidelines to the safety section.

The coding guidelines are and have been in effect for a while now,
but it seems this introduction text is confusing contributors.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-18 02:33:02 +01:00
Måns Ansgariusson
9a64bcc29a docs: update k_pipe documentation to align with the rewritten interface
This commit updates the k_pipe documentation to reflect the rewritten
interface.
Changes include:

* Detailed explanations of k_pipe concepts, initialization, and usage.
* Examples for defining, writing to, reading from, flushing,
	and closing a pipe.
* Clarified behavior in edge cases and introduced enhanced error-handling
  details.

Updated suggested use cases and API references.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2025-01-17 19:43:44 +01:00
Carles Cufi
ea4e46d075 doc: contribute: Extend Reviewer Expectations with additional rules
This change was triggered by a review comment linked below:
https://github.com/zephyrproject-rtos/zephyr/pull/83117#issuecomment-2549120181

It extends the current Reviewer Expectations with additional rules
agreed upon by multiple Zephyr contributors in order to simplify and
standardize the decision-making process during PR reviews.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-17 19:43:32 +01:00
Carles Cufi
3756f59a55 doc: contribution guidelines: Clarify and extend
Clarify and extend some of the PR and contribution guidelines so that
they cover practices that have been effectively enforced by maintainers,
but were never properly documented.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-17 19:43:17 +01:00
Stephanos Ioannidis
b69f8ee0b6 doc: develop: toolchains: Remove 'xtools' documentation
The `xtools` toolchain variant has been deprecated since Zephyr v3.3.0 and
now removed.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2025-01-17 10:50:07 +01:00
Haiyue Wang
4cc76e8a9a doc: Update the File Systems samples link syntax
The commit 16183f665e ("samples: subsys: fs: create common fs sample")
renames the sample name for FAT fs from 'fat_fs' to 'fs_sample'.

To avoid this kind of errors, ":zephyr:code-sample:`xxx`" is introduced.

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
2025-01-16 22:56:44 +01:00
Yishai Jaffe
7885d46d27 docs: migration guide: 4.1: renamed silabs spi compatibles
Renamed the Silabs SPI drivers compatible strings.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-01-16 22:43:59 +01:00
Dmitrii Golovanov
b4d22420e9 twister: harness: recording: Allow multiple patterns
Extend Twister Harness 'recording' feature to allow multiple
regular expression patterns to extract different types of records
from test output.

Add 'merge' recording mode to collect all extracted data fields
into a single record object of the test instance.

Export to CSV file now takes all field names occurred in the collected
records, sort it alphabetically, and then use it for columns instead of
using only the first record's fields. This is done to address possible
situation when records have different set of fields.

Adjust Twister documentation and test suite to the above changes.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-01-16 22:38:51 +01:00
Wajdi ELMuhtadi
01d9861d71 drivers: sensor: wsen_pdus_25131308XXXXX: add sensor driver
Add wsen_pdus_25131308XXXXX driver with
the corrected name and compatibility with
the hal update as well as added new features..

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2025-01-16 22:35:47 +01:00
Luca Burelli
f3bf6357c7 doc: gh_utils: ignore added-but-not-committed files
If the file is added to the index, but not committed yet, the 'git'
command will return an empty string. This patch checks for this case and
treats it as if the file was not tracked at all.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-01-16 14:52:35 +01:00
Benjamin Cabé
92271d173f doc: _extensions: fix :zephyr:board: role with Intersphinx
Resolving the target for a zephyr:board role when using Interpshinx
needs to account for the fact that a board object might be in the
domain (it's part of the catalog), and yet not have any actual docname
associated with it for there's no page in the "local" docs
that defines a ..zephyr:board:: documentation for it.
Handle that case so that ZephyrDomain#resolve_xref yields to Intersphinx
that will eventually find the target in the inventory for
docs.zephyrproject.org.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/83737

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-16 14:47:53 +01:00
Jilay Pandya
055c4a0a2e docs: migration guide 4.1: fifo_depth renamed
add migration guide entry after renaming fifo_depth to fifo-depth

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-01-15 19:06:06 +01:00
James Roy
949826ebd3 doc: Add a new migration guide entry to USB
Rename the phy_handle property to phy-handle in
the devicetree and bindings of the USB subsystem.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-01-15 19:05:54 +01:00
Mark Chen
f4da9b9705 drivers: sensor: Add sensor clock API support
This commit introduces a new Sensor Clock API, enabling the retrieval
of cycle counts and conversion to nanoseconds based on the system or
external clock. The API includes:

- `sensor_clock_get_cycles()` to get the current cycle count from the
  sensor clock.
- `sensor_clock_cycles_to_ns()` to convert cycles to nanoseconds using
  the clock's frequency.

The implementation supports both system clocks and external clocks
defined in the device tree, making the sensor clock integration more
flexible for various sensor use cases.

Signed-off-by: Mark Chen <mark.chen@cienet.com>
2025-01-15 19:03:13 +01:00
Yangbo Lu
7c57fec0d0 drivers: firmware: scmi: add power domain protocol
Added helpers for ARM SCMI power dmomain protocol.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-01-15 19:03:00 +01:00
Fabian Blatz
7537a142be doc: migration-guide-4.1: Add section about step interval based API
Adds a two bullet points explaining the change of the velocity based API
towards an step interval one.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-15 15:06:37 +01:00
Fabian Blatz
dfaca867ca doc: hardware: peripherals: stepper: Migrate to step interval API
Migrates the peripherals documentation to the new step interval based APi
instead of the velocity one.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-15 15:06:37 +01:00
Anas Nashif
4ee6b833c5 doc: convert coding guideline rules to definition lists
Use definition list instead of deep header levels.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-15 11:51:42 +01:00
Jilay Pandya
9cce4841e5 docs: migration_guide_4.1: entry for renamed device tree properties
add migration guide after renaming device tree properties
- pin_mask -> pin-mask
- pinmux_mask -> pinmux-mask
- vbatts_pins -> vbatts-pins
- bit_per_gpio -> bit-per-gpio
- off_val -> off-val
- on_val -> on-val

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-01-15 11:51:33 +01:00
James Roy
0de4cdf9e1 doc: Add a new migration guide entry to display
Rename the pclk_pol and data_cmd-gpios propertys
to pclk-pol and data-cmd-gpios in the devicetree
and bindings of the display subsystem.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-01-15 11:51:23 +01:00
Jilay Pandya
f1d4d5323c docs: migration guide: 4.1: renamed sdhc device tree properties
add migration guide entry after renaming device tree properties

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-01-15 01:37:45 +01:00
Jukka Rissanen
572518edc7 doc: net: http-server: Add information about static fs resources
The supported resource list was missing static file system resource
description.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-14 15:39:50 +01:00
James Roy
4cb8ec7ebf doc: Add a new migration guide entry to counter
Rename the primary_source, secondary_source,
filter_count and filter_period property to
primary-source,  secondary-source, filter-count
and filter-period in the devicetree and bindings
of the counter subsystem.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-01-14 13:24:14 +01:00
Henrik Brix Andersen
f07063db20 doc: update copyright notice in the documentation
Update copyright notice to reflect current year.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-01-10 14:56:01 +01:00
Nicolas Pitre
46aa6717ff Revert "arch: deprecate _current"
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").

This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.

The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.

Hence this revert.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-01-10 07:49:08 +01:00
Pieter De Gendt
60da065f03 doc: develop: test: twister: Add ctest harness option
Add ctest to the list of harnesses and the ctest_args harness config
option.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-10 04:12:42 +01:00
Matt Rodgers
579e5868b0 doc: websocket: update docs to describe additional callback parameter
Update HTTP server documentation and migration guide to account for
added request_ctx parameter to the http_resource_websocket_cb_t
callback.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2025-01-08 21:02:02 +01:00
Pieter De Gendt
751f3a9c37 doc: develop: Add external runners for modules information
Add an example for the `runners` section in the zephyr/module.yml file,
and a paragraph to the west "flash and debug runners" section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-08 17:02:06 +01:00
Henrik Brix Andersen
cf91c1b84f doc: licensing: clarify the impact of the various files
Clarify the impact of the various non-Apache-2.0 licensed files in the
tree.

Clean up the formatting to improve readability and better match the other
parts of the project documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-01-08 17:01:24 +01:00
Anas Nashif
53486c9538 doc: twister: add documentation of integration_toolchains
Document the new option and how to use integration_toolchains.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-08 12:58:59 +01:00
Gerard Marull-Paretas
17806f2054 doc: extensions: api_overview: do not hardcode github URL
Add a new extension config value so that repo URL is not hardcoded in
the extension code.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-08 11:30:54 +01:00
Gerard Marull-Paretas
29257f60fe doc: extensions: api_overview: improve some comprehensive lists
Some comprehensive lists were hard to read, improve the code a bit so
that things make more sense.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-08 11:30:54 +01:00
Gerard Marull-Paretas
602290e838 doc: doc-guidelines: document :project: option for doxygengroup
The doxygengroup now supports specifying a project, document this
feature.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-08 11:30:54 +01:00
Gerard Marull-Paretas
9a1c378b67 doc: extensions: doxybridge: add support for multiple projects
Modify the extension so that multiple Doxygen projects can be
referenced. While not required in upstream Zephyr, other users
downstream may require support for this feature.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-08 11:30:54 +01:00
Gerard Marull-Paretas
4f6b650c35 doc: extensions: doxyrunner: add support for multiple projects
Modify the extension so that multiple Doxygen projects can be added.
While not required in upstream Zephyr, other users downstream may
require support for this feature.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-08 11:30:54 +01:00
Gerard Marull-Paretas
05c1e56f73 doc: extensions: api_overview: refactor extension
The extension had a some major design flaws, mainly:

- Ignored the `api_overview_doxygen_xml_dir` setting, instead it
  "sniffed" doxyrunner properties, so violating environment boundaries
- Computation of Doxygen HTML path worked because of the hardcoded URL
  in relative form found in doc/conf.py

This patch moves most code to the actual directive, so that context can
be obtained from the document being parsed. Also, the only config
required now is the Doxygen output dir, obtained from doxyrunner at
conf.py level.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-01-08 11:30:54 +01:00
Emil Gydesen
e45830893f Bluetooth: CCP: Introduce new CCP API
The CCP API for the Call Control Profile works on top of the
TBS API, and will eventually replace parts of the TBS API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-01-08 07:50:32 +01:00
Dominik Ermel
bb0fa0746b stream_flash: Enforce size to be explicitly present on init
The commit changes requirements for stream_flash_init, where size
can no longer be 0 and has to be explicitly set, to avoid situation
where size autodetection, invoked by size == 0, would miss changes in
layout and silently allow overflow of Stream Flash into other partitions.

There has also been new Kconfig option CONFIG_STREAM_FLASH_INSPECT,
set to y by default to keep legacy behaviour, that can be used to turn
off stream_flash_ctx vs device inspection, allowing user to shed
inspection code once it is not useful anymore.

Fixes: #71042

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-01-07 15:56:49 +01:00
James Roy
19963594b0 doc: build: dts: Fix incorrect foreach documentation
Replaced incorrect rst link references in the description
of traversing ancestor nodes, along with some conflicting
descriptions.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-01-07 14:13:21 +01:00
Martin Becker
2871f1abef sca: added support for Polyspace tool
Add the cmake files for running static code analysis with the Polyspace
tools in the west build. The analysis leverages the compilation database.
Options for the analysis are documented in doc/develop/sca/polyspace.rst.

Analysis results are printed as command line output and provided as CSV.

Manually tested on v4.0.0 with various sample applications.

Signed-off-by: Martin Becker <mbecker@mathworks.com>
2025-01-07 14:13:13 +01:00
Jordan Yates
052aaf6abe doc: _scripts: gen_devicetree_rest: add individual files
Add a CLI argument for specifying individual files to be added to the
parsing. This is useful for downstream users that wish to import files
such as `bindings/spi/spi-device.yaml`, without also pulling in all the
associated SPI controllers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-07 00:26:08 +01:00
Haiyue Wang
f9bff7f32f modules: lvgl: Rename the VDB custom section Kconfig name
There are 4 Kconfig names about the "Draw Buffer". Rename 'VBD' to 'VDB'
in Kconfig option 'LV_Z_*VBD*_CUSTOM_SECTION' to make name consistent.

config LV_Z_VDB_ALIGN
	int "Rending buffer alignment"

config LV_Z_VBD_CUSTOM_SECTION
	bool "Link rendering buffers to custom section"

config LV_Z_DOUBLE_VDB
	bool "Use two rendering buffers"

config LV_Z_VDB_SIZE
	int "Rendering buffer size"
	default 100 if LV_Z_FULL_REFRESH

And the draw buffer definition is now:

	static uint8_t buf0[BUFFER_SIZE]
	#ifdef CONFIG_LV_Z_VDB_CUSTOM_SECTION
		Z_GENERIC_SECTION(.lvgl_buf)
	#endif
			__aligned(CONFIG_LV_Z_VDB_ALIGN);

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
2025-01-06 17:13:29 +00:00
Jordan Yates
feaf21f80c drivers: watchdog: kconfig option for callback support
Add a non-configurable option which drivers can select to indicate that
they do not support callbacks on watchdog expiry.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-06 08:48:41 +01:00
Henrik Brix Andersen
b114e0f6db doc: requirements: avoid using pygments v2.19.0
Avoid using pygments v2.19.0 as it contains a regressions in parsing "cfg"
code-blocks.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-01-05 22:09:44 +01:00
Martin Jäger
17cde7d574 samples: net: openthread: create category in docs
Add higher-level category for OpenThread in docs to avoid orphaned
sample documentation.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-01-03 19:39:13 +01:00
Martin Jäger
8eff86229e samples: net: openthread: shell: add sample application
Add simple application to test Thread and IEEE 802.15.4 using the
OpenThread shell.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-01-03 19:39:13 +01:00
Carles Cufi
3c420a4828 checkpatch: Adapt the braces check to Zephyr
scripts/checkpatch.pl was written originally for the Linux kernel, and
its code reflects the kernel's coding style. In particular, it has
checks for unneeded braces around single-statement if/else/for/while
conditions. In Zephyr however, braces are always required, and so the
checks needed modifying to verify the opposite condition.

In order to enable the now-compatible checks, we also remove the
--ignore BRACES statement in .checkpatch.conf.

Limitations: the current code works well if there are not conditional
statements (e.g. #if, #ifdef or #endif) next to the if/else/for/while
conditions. This is rarely the case, but triggers with the Bluetooth
controller in code like this:

```
 #if defined(CONFIG_BT_PERIPHERAL)
        if (!lll->is_hdcd)
 #endif /* CONFIG_BT_PERIPHERAL */
        {
```

```
        } else
 #endif /* CONFIG_BT_CTLR_PRIVACY */
        {

```

```
 #if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
        if (lll->cte_started) {
                radio_switch_complete(phy_s, 0, phy_s, 0);
        } else
 #endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
        {
```

```
 #ifdef DUAL_BANK
        while ((FLASH_STM32_REGS(dev)->SR1 & FLASH_SR_QW) ||
               (FLASH_STM32_REGS(dev)->SR2 & FLASH_SR_QW))
 #else
        while (FLASH_STM32_REGS(dev)->SR1 & FLASH_SR_QW)
 #endif
        {
```

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-12-30 21:46:47 +01:00
Xudong Zheng
002b4ca818 doc: release: 4.1: add CONFIG_FILE_SYSTEM_SHELL_MOUNT_COMMAND
This allows the mount shell subcommand to be optionally disabled.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-12-29 05:49:58 +01:00
Jamie McCrae
fed62cd2f3 doc: build: snippets: Add sysbuild usage
Adds an example on how to use a snippet with sysbuild

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-27 07:18:13 +01:00