Commit graph

5426 commits

Author SHA1 Message Date
Benjamin Cabé 2e5f56665b doc: tracing: fix formatting issue
The list of user-defined functions in "User-Defined Tracing" section was
not properly formatted (missing blank line).
Switched the (broken) list to a code block to now provide C syntax
highlighting.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 16:42:32 +01:00
Benjamin Cabé d30ec30a85 doc: guides: Update PDF output path
The zephyr.pdf file is to be found in _build/latex folder, not
_build/pdf.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 14:38:12 +01:00
Benjamin Cabé b6165e01ca doc: can: samples: fix bad reference to can-counter sample
Fixed a dangling reference that was silently ignored before.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 10:18:02 +01:00
Tomasz Bursztyka ba02d85c74 doc/nvme: NVMe mandates dword-aligned buffer addresses
In Zephyr, this is let to the disk access API user. There is nothing the
driver can do about it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-09-22 09:23:18 +02:00
Benjamin Cabé f6a4217a88 doc: driver: samples: Update driver samples to use new Sphinx extension
Migrated existing driver samples to use the new code-sample directive
and role.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 09:21:43 +02:00
Guillaume Gautier 01f080ebe0 doc: releases: update migration guide
Update migration guide

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-09-22 09:21:34 +02:00
Gerard Marull-Paretas beec8b05a8 device: only allow PRE_KERNEL_1/2 and POST_KERNEL levels
Because devices share the same underlying infrastructure with SYS_INIT,
the same levels have always been available. However, not all of them are
needed, and some are not even usable. For example, `EARLY` can't be used
because when initialized `z_device_state_init` has not been called yet.
`SMP` has never been used by device drivers, and it is now in question,
likely to be moved to SMP specific hooks. Finally, `APPLICATION` does
not make much sense in the context of Kernel devices. Note that of the 3
levels just mentioned, only one was actively tested (`APPLICATION`) by
Kernel tests, meaning others were likely never considered in the context
of devices.

This patch leaves `PRE_KERNEL_1`, `PRE_KERNEL_2` and `POST_KERNEL`
available to devices. Others have been deprecated, and will generate a
compiler warning if used.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-21 15:02:45 +02:00
Benjamin Cabé 4f1cd0e428 doc: Migrate subsys/ code samples to new Sphinx extension
This migrates the subsys code samples to the new Sphinx code-sample
extension, making it easier to find relevant samples when browsing
API reference.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-21 09:28:31 +02:00
Benjamin Cabé 108893304a doc: code-sample: Fix "text" attribute for code sample links.
A link to a code-sample should have its "text" attribute set to the text
description of the sample, not the description _node_.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-20 20:23:56 +01:00
Benjamin Cabé c82d023248 doc: Issue warning for dangling code-sample references
Sphinx will now issue a warning when a code-sample role points to a
sample that does not exist.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-20 11:36:12 +01:00
Benjamin Cabé 430e009a5f samples: net: mqtt-sn: fix bad code-sample id
The MQTT-SN publisher sample is referred to as mqtt-sn-publisher, not
mqtt-sn-publisher-sample.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-20 11:36:12 +01:00
Ryan Erickson 452fadcd0e doc: migration-guide: inform about MODEM_GSM_PPP deprecation
MODEM_GSM_PPP is deprecated in favor of using the new
MODEM_CELLULAR driver.
Directly related to this are UART_MUX and GSM_MUX. These are also
being deprecated.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2023-09-19 15:25:47 +01:00
Benjamin Cabé 994558ef8e samples: net: doc: Use new Sphinx extension to document networking samples
Use the new code-sample directive and roles to document the networking
samples so that they show up as "Related samples" when browsing the
various relevant networking APIs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-19 15:22:59 +01:00
Jukka Rissanen ccc2a7a90d doc: release: Migration guide for CONFIG_NET_INTERFACE_NAME option
Clarified the impact of CONFIG_NET_INTERFACE_NAME Kconfig option
as it can change how SO_BINDTODEVICE BSD socket option behaves.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-09-19 15:22:19 +01:00
Kuno Heltborg 2d02cae964 MGMT: Add user data to mgmt_handler
RFC: #60616

Signed-off-by: Kuno Heltborg <kunoh@live.dk>
2023-09-19 15:20:58 +01:00
Tom Burdick cbc6af0d09 spi: Cleanup and fix SPI docs build
Use the defined(__DOXYGEN__) more specifically in the header to better
match i2c.h and make things more explicit. Removes the define being
setup in zephyr.doxyfile.in.

Fixes some of the deprecation notes and what to look for instead. Fixes
some typos.

The async, signal, and rtio APIs for SPI are now shown in the built docs
as would be expected.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-09-19 08:46:16 -05:00
Johann Fischer f67dd39bb2 drivers: ramdisk: use devicetree to instantiate RAM disk
Rework RAM disk driver to be configured using devicetree and
support multiple instances.

This patch also removes a copy of the RAM disk driver,
tests/subsys/fs/fat_fs_dual_drive/src/disk_access_test_drv.c,
that was there for testing multiple disk drivers support.

Bonus: one SYS_INIT() less and a memory region can be exported to the
host.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-09-18 17:36:50 +02:00
Gerard Marull-Paretas 9019e46839 doc: migration-guide: inform about GPIO_AS_PINRESET deprecation
In favor of the new devicetree 'gpio-as-nreset' property.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-18 13:14:08 +02:00
Hein Wessels 8219c7ccda doc: release process: link to milestone dates on wiki
This adds a link for convenience. Many times before I struggled to
find the date for the next feature freeze. This is to help others,
and myself, to find it easier in the future.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-09-18 11:16:27 +01:00
Grzegorz Chwierut 033afe1c0c twister: doc: Update pytest and twister docs
Document how to use pytest_root keyword. Update docs
with changes in pytest-twister-harness plugin.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-09-18 05:59:35 -04:00
Ludvig Samuelsen Jordet b990a74f8b Bluetooth: Mesh: Add support for Upload OOB Start
This adds support for the Upload OOB Start message to the DFD server, by
providing callbacks that the application can use to hook any OOB scheme
into the model behavior.

There are also extensive changes to the dfu_slot module, to accomodate
the new needs that appeared with the support for OOB transfer (mainly,
fwid, size and metadata are no longer available when the slot is
allocated, they appear later in the handling).

Signed-off-by: Ludvig Samuelsen Jordet <ludvig.jordet@nordicsemi.no>
2023-09-18 10:55:20 +01:00
Aaron Massey a7b25d599b fuel_gauge: Join get/set prop structs
The fuel gauge API uses separate get/set property structs to indicate what
properties are readable or writable. This lead to duplication in property
names and potential confusion for new users of the API. See issue #61818.
In addition to above, drivers already determine at runtime if a property is
supported for read or write actions.

Join the get/set fuel gauge property structs as a single struct.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-18 10:38:59 +01:00
Gerard Marull-Paretas c0bf310ac8 doc: migration-guide: add notes on CONFIG_NFCT_PINS_AS_GPIOS changes
So that users know how to migrate to the new option.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:05:28 +02:00
Benjamin Cabé b5a50e9ae1 doc: Revert "doc: Add more known-warnings"
This reverts commit 3127d7b54c which
was forgotten when switching back to breathe from docleaf and  causing
unecessary "here's a warning about something that's not actually
a warning" :)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-15 15:05:23 +02:00
Fabio Baltieri 8bd49da316 doc: doxygen: define XEN_GUEST_HANDLE_64 as no-op
Doxygen gets confused by the macro expansion in
include/zephyr/xen/public/domctl.h as that is only defined if
CONFIG_ARM64=y, add a no-op expansion of that macro when building the
documention so it has something to work on.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-15 13:51:19 +01:00
Carlo Caione e4a125b6a4 dt: Make zephyr,memory-attr a capabilities bitmask
This is the final step in making the `zephyr,memory-attr` property
actually useful.

The problem with the current implementation is that `zephyr,memory-attr`
is an enum type, this is making very difficult to use that to actually
describe the memory capabilities. The solution proposed in this PR is to
use the `zephyr,memory-attr` property as an OR-ed bitmask of memory
attributes.

With the change proposed in this PR it is possible in the DeviceTree to
mark the memory regions with a bitmask of attributes by using the
`zephyr,memory-attr` property. This property and the related memory
region can then be retrieved at run-time by leveraging a provided helper
library or the usual DT helpers.

The set of general attributes that can be specified in the property are
defined and explained in
`include/zephyr/dt-bindings/memory-attr/memory-attr.h` (the list can be
extended when needed).

For example, to mark a memory region in the DeviceTree as volatile,
non-cacheable, out-of-order:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_VOLATILE |
			       DT_MEM_NON_CACHEABLE |
			       DT_MEM_OOO )>;
   };

The `zephyr,memory-attr` property can also be used to set
architecture-specific custom attributes that can be interpreted at run
time. This is leveraged, among other things, to create MPU regions out
of DeviceTree defined memory regions on ARM, for example:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-region = "NOCACHE_REGION";
       zephyr,memory-attr = <( DT_ARM_MPU(ATTR_MPU_RAM_NOCACHE) )>;
   };

See `include/zephyr/dt-bindings/memory-attr/memory-attr-mpu.h` to see
how an architecture can define its own special memory attributes (in
this case ARM MPU).

The property can also be used to set custom software-specific
attributes. For example we can think of marking a memory region as
available to be used for memory allocation (not yet implemented):

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_NON_CACHEABLE |
			       DT_MEM_SW_ALLOCATABLE )>;
   };

Or maybe we can leverage the property to specify some alignment
requirements for the region:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_CACHEABLE |
			       DT_MEM_SW_ALIGN(32) )>;
   };

The conventional and recommended way to deal and manage with memory
regions marked with attributes is by using the provided `mem-attr`
helper library by enabling `CONFIG_MEM_ATTR` (or by using the usual DT
helpers).

When this option is enabled the list of memory regions and their
attributes are compiled in a user-accessible array and a set of
functions is made available that can be used to query, probe and act on
regions and attributes, see `include/zephyr/mem_mgmt/mem_attr.h`

Note that the `zephyr,memory-attr` property is only a descriptive
property of the capabilities of the associated memory  region, but it
does not result in any actual setting for the memory to be set. The
user, code or subsystem willing to use this information to do some work
(for example creating an MPU region out of the property) must use either
the provided `mem-attr` library or the usual DeviceTree helpers to
perform the required work / setting.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-09-15 12:46:54 +02:00
Laurentiu Mihalcea ff1bb65793 doc: release: 3.5: Add note about shared interrupt support
Add a note that shared interrupts are now supported.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Laurentiu Mihalcea b1111d9de4 doc: interrupts: Document support for shared interrupts
This commit adds the documentation for shared interrupts.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-09-14 08:35:12 +02:00
Pavel Vasilyev 422cfeeb1a doc: Bluetooth: Mesh: Align wording for models instantiation req
According to https://github.com/zephyrproject-rtos/zephyr/pull/61886#issuecomment-1713302331
we need to use "must only" for models that spec states:
`If supported, ... shall be supported by the primary element and shall
not be supported by any secondary element`.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-14 08:33:46 +02:00
Daniel Leung 26ffa9f59a doc: picolibc: a few words about building without native support
This adds a few words about using Picolibc without native support
from toolchain, and how to enable this behavior for toolchain.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-13 17:36:46 -04:00
Andrei Emeltchenko 8ac4b248c1 doc: west: Remove empty Footnotes rubric
Remove empty rubric. Cross-linking markups are not included in
Footnotes.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Benjamin Cabé 4d53ae8a42 doc: shell: fix incorrect use of :kbd: role
Key combinations described using the sphinx :kbd: role should not have
a white space around + sign
i.e. should be :kbd:`Ctrl+d` not :kbd:`Ctrl + d`

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 11:35:44 +02:00
Huifeng Zhang 80e1b37fdb doc: release-notes: Add Aarch32 v3.5.0 notes
Adds release notes for Aarch32 for Zephyr 3.5.0.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Huifeng Zhang 2c22e83dfb include: arch: arm: Remove aarch32 directory
This commit follows the parent commit work.

This commit introduces the following major changes.

  1. Move all directories and files in 'include/zephyr/arch/arm/aarch32'
    to the 'include/zephyr/arch/arm' directory.

  2. Change the path string which is influenced by the changement 1.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Huifeng Zhang df41deac1c arch: arm: Remove aarch32 directory
It doesn't make sense to keep the aarch32 directory in the
'arch/arm/core' directory as the aarch64 has been moved out.

This commit introduces the following major changes.

  1. Move all directories and files in 'arch/arm/core/aarch32' to
    'arch/arm/core' and remove the 'arch/arm/core/aarch32' directory.
  2. Move all directories and files in 'arch/include/aarch32' to
    'arch/include' and remove the 'arch/include/aarch32' directory.
  3. Remove the nested including in the 'arch/include/kernel_arch_func.h'
    and 'arch/include/offsets_short_arch.h' header files.
  4. Change the path string which is influenced by the changement 1
    and 2.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Benjamin Cabé f8398fda02 doc: css: fix text color for toggle buttons in related samples
Missed this usability issue earlier. This makes the text and icon in
collapsible admonition the same color as the admonition title.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:15:34 +02:00
Benjamin Cabé fad29ecb03 doc: Code samples must be referenced using new dedicated role
Drop code that would let people reference samples using legacy
:ref:`sample_id` syntax, and only support the use of
:zephyr:code-sample:`sample_id` role going forward.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:15:34 +02:00
Benjamin Cabé 59e4c5aed0 samples: fully migrate basic samples to the new Sphinx extension
- Updated basic samples READMEs to use the new zephyr:code-sample::
  directive. Dropped "-sample" suffix that's not required anymore now
  that samples have their own namespace.
- Updated all references to the samples to use the :zephyr:code-sample:
  role. Checked and updated the wording of said references to account
  for the fact that samples should not have "... sample" in their name
  anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:15:34 +02:00
Mia Koen 01f144b201 doc: bluetooth: mesh: fixed spec links
Corrected the profile specification v1.0.1 link to point to
the spec directly and not to the general specification page.
Added link to protocol specification v1.1.

Signed-off-by: Mia Koen <mia.koen@nordicsemi.no>
2023-09-12 16:30:44 +02:00
Mia Koen 0d57935d80 doc: bluetooth: mesh: doc for SAR Config models
Adding rst files describing SAR Configuration
models, SAR Configuration Client and SAR Configuration
Server.

Signed-off-by: Mia Koen <mia.koen@nordicsemi.no>
2023-09-12 16:30:44 +02:00
Mia Koen ad57c7d621 doc: bluetooth: mesh: listed models alphabetically
Changed placement of a few models so they are
in alphabetical order

Signed-off-by: Mia Koen <mia.koen@nordicsemi.no>
2023-09-12 16:30:44 +02:00
Pavel Vasilyev 028031ec20 doc: bluetooth: mesh: Fix link to Assigned Numbers document
The previous file doesn't exist anymore and was redirecting to the new
link.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-12 09:27:02 +02:00
Pavel Vasilyev 1c2abbd7f1 doc: bluetooth: mesh: Add missing bt_mesh_dfd group to DFU doc page
Add missing bt_mesh_dfd group to the mesh DFU documentation page as it
covers all DFU models including Firmware Distribution models (called
as `dfd` in the code).

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-12 09:27:02 +02:00
David Lamparter a532dbab51 doc: list ST7735S alongside ST7735R
Throw ST7735S into a few places so people can find it.

Signed-off-by: David Lamparter <equinox@diac24.net>
2023-09-11 20:05:26 +02:00
Benjamin Cabé 5b0a08d876 doc: net: tftp: fix API documentation
add a missing doxygen group and show the API reference the Sphinx doc.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-11 19:57:28 +02:00
Benjamin Cabé 7c4ff77bf3 doc: zbus: samples: Use new Sphinx extension to document samples
Use the new code-sample directive and roles to document the zbus samples
so that they show up as "Related samples" when browsing zbus API.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-11 19:56:57 +02:00
Anders Storrø 51707daade doc: Bluetooth: Mesh: Fix comp data doc entries
Minor cleanup of the mesh composition data pages
documentation.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-09-09 12:16:05 +03:00
Keith Packard 28e6839db6 doc/releases: Add picolibc migration notes
There aren't any 'required' or 'recommended' changes when switching from
the minimal C library to picolibc, but there are a bunch of things which
application developers might need to be aware of. Add a separate section to
list those.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-09-08 19:07:37 +02:00
Anders Storrø 81c6ae8908 doc: Bluetooth: Mesh: Add docs for comp data pages
Adds documentation for all supported composition data pages.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-09-08 14:44:25 +02:00
Benjamin Cabé c26679be42 samples: net: cloud: drop Google Cloud IoT Core
Google Cloud IoT Core has been retired on August 16, 2023.
Removed the sample and the link to it in a previous release note.
Added a redirect to other IoT cloud samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-08 11:04:25 +02:00