Commit graph

6052 commits

Author SHA1 Message Date
Christopher Friedt e8b178411c posix: remove unneeded option to link with posix subsys
The CONFIG_APP_LINK_WITH_POSIX_SUBSYS option was originally
present so that internal POSIX implementation headers would be
on the include path.

There is no implicit need for any app or library to include
private POSIX headers. Instead, the standard POSIX API should
be used.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-02-01 05:26:24 -05:00
Emil Gydesen 6c403da3cd Bluetooth: Audio: Shell: CAP change volume offset command
Add sthe change volume offset command to the CAP commander shell.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-01-31 21:35:17 -05:00
Navinkumar Balabakthan 253003d737 doc: releases: shared_irq changes added in doc
shared_irq api changes updated in migration-guide-3.6.

Signed-off-by: Navinkumar Balabakthan <navinkumar.balabakthan@intel.com>
2024-01-31 13:47:39 -06:00
Daniel DeGrasse 0fc0c0fe3f docs: migration-guide-3.6: Add note about migrating ILI9XXX displays
Add note describing required devicetree changes to migrate ILI9XXX based
displays to use new MIPI DBI SPI driver, instead of directly using the
SPI API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-31 16:01:45 +00:00
Daniel DeGrasse 1074fbd91e doc: hardware: add peripheral documentation for MIPI DBI
Add documentation for MIPI DBI peripheral class

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-31 16:01:45 +00:00
Dominik Ermel d30265b2cf doc/release: Add note on removed Flash Map API macros
Note on removal of deprecated Flash Map API macros:
 - FLASH_AREA_LABEL_EXISTS()
 - FLASH_AREA_LABEL_STR()
 - FLASH_AREA_ID()
 - FLASH_AREA_OFFSET()
 - FLASH_AREA_SIZE()

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-01-31 09:08:12 -06:00
Najumon B.A 6e7f50d7aa docs: rename intel,pcie compatible id to pcie-controller
rename intel,pcie compatible id referance to pcie-controller in
header file comments and rst files

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2024-01-31 15:03:06 +01:00
Gaetan Perrot 19700040af doc: posix: mark sched_setparam & sched_setscheduler as supported
`sched_setparam()` and `sched_setscheduler()` is now implemented,
mark it so.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-01-31 11:16:26 +01:00
Benjamin Cabé 69787dad17 doc: Clean up list of Fedora dependencies
Fixed several issues with the install instructions for Fedora:

- removed packages that are already pulled by "Development Tools" and "C
  Development Tools and Libraries" groups
- added missing "which" package needed for SDK installation script
- added python3-devel package (needed for some of the Python requirements)
  and install python3 instead of a fixed python38

Tested on a vanilla Fedora 39 Docker image.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-01-30 20:39:41 -05:00
Alberto Escolar Piedras ed2e7eaefe doc: releases: migration-guide: 3.6: Add note on SOURCE macros
Warn users about the SOURCE macros not being defined globally anymore
and them needed to set them if they need them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-30 18:50:27 -05:00
Alberto Escolar Piedras 7d1b3bc083 doc: release-notes: native targets related updates
Add to the 3.6 release notes the native targets related
updates.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-30 18:50:27 -05:00
Alberto Escolar Piedras 7de2fadaa3 doc: release-notes: Mention removal of global SOURCE definitions
Mention that we do not define these macros globally anymore

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-30 18:50:27 -05:00
Adam Wojasinski 9b30b7405e doc: posix: Update POSIX supported API documentation with sysconf()
Updates in documentation support for `sysconf` API
in the `POSIX_SINGLE_PROCESS` group option.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-01-30 18:01:18 +01:00
Alberto Escolar Piedras ba81d439e4 doc coding_guidelines: Exclude host tooling from rule A.5
Rule A.5 is meant for code build with the embedded libCs and
which runs in embedded targets. Let's be more clear about this
and explicitly indicate that host tooling is not covered by it.
Otherwise, the current
"The "Zephyr codebase" in this context refers to all source
code files committed to the main Zephyr repository"
covers too much.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-30 18:00:48 +01:00
Johan Stridkvist 8943025471 doc: peripherals: Document limitation
Asynchronous and interrupt driven APIs can be used at the same time for
different hardware peripherals.

Signed-off-by: Johan Stridkvist <johan.stridkvist@nordicsemi.no>
2024-01-30 08:28:57 -05:00
Øyvind Rønningstad 3e41e68ce6 doc: Update release notes and migration guide for zcbor 0.8.1
No changes, but update version numbers

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-01-30 13:38:51 +01:00
Anas Nashif ccaf8d1e79 doc: modules: dummy external module
placeholder to make ci happy.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-29 17:54:11 +01:00
Anas Nashif 7c7407849f doc: add template for external modules
Add template for external modules. Add a module file under external/
will list the module under

https://docs.zephyrproject.org/latest/develop/manifest/index.html#external-projects-modules

which then can be referenced from within the tree where it makes sense.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-29 17:54:11 +01:00
Ben Marsh bef0dc065f doc: mqtt: Fix incorrect usage of poll()
The MQTT docs used K_MSEC() to provide the timeout parameter to poll().
Doing this causes a compilation error as poll() expects it's
third parameter to be of type int, not k_timeout_t.

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2024-01-29 10:25:32 -06:00
Aymeric Aillet 2a93e06fba doc: releases: migration-guide: 3.6: note on renaming RA kconfig options
Add a note about the renaming of several Renesas RA driver kconfig options.
These options have been renamed when renaming several driver file names.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2024-01-29 11:32:46 +01:00
Aymeric Aillet bf30c2a3b3 doc: releases: 3.6: note on renaming RA drivers kconfig options
Add a note about the renaming of several Renesas RA driver kconfig options.
These options have been renamed when renaming several driver file names.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2024-01-29 11:32:46 +01:00
Fengming Ye 8cd61b6c66 doc: migration-guide: 3.6: zperf statistics changes
Add information about zperf ratio between mbps and kbps, kbps and bps
changes from 1024 to 1000, to align with iperf.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-01-29 10:05:35 +01:00
Adam Wojasinski dc90d6ccff doc: posix: Add missing entries in POSIX supported API doc
`mq_timedsend()` and `mq_timedreceive()` are implemented but
the information is missing in the documentation.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-01-26 22:27:07 +00:00
Jordan Yates 0ac5835c59 doc: release-notes: document spi_nor sleep changes
Document the changes to sleeping in `spi_nor_wait_until_ready`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-01-26 11:59:04 -06:00
Henrik Brix Andersen ffa3e415a0 doc: releases: migration-guide: 3.6: list CAN transceiver API change
Add a note about the addition of a can_mode_t argument to the
can_transceiver_enable() API call.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-26 15:55:18 +00:00
Henrik Brix Andersen 6cfbb544de doc: release-notes: 3.6: mention new CAN controller API system calls
Mention the new CAN controller API system calls in the release notes.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-26 14:27:57 +01:00
Henrik Brix Andersen bde074714e drivers: can: shell: print name of associated CAN transceiver if present
Print the name of the associated CAN transceiver in the "can show" shell
subcommand.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-26 14:27:57 +01:00
Henrik Brix Andersen 336d7ef7b4 drivers: can: shell: print current operation mode in show subcommand
Print the current operation mode in the "can show" shell subcommand.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-26 14:27:57 +01:00
Pisit Sawangvonganan 512dc9ff38 doc: fix typo in multiple directories (build, hardware, kernel, project)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the doc/build, hardware, kernel, project directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-26 13:16:18 +01:00
Pisit Sawangvonganan accea5eb69 doc: services: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the doc/services directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-26 13:16:18 +01:00
Pisit Sawangvonganan 0ee2927c32 doc: develop: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the doc/develop directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-26 13:16:18 +01:00
Pisit Sawangvonganan 679cea1c06 doc: connectivity: networking: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the doc/connectivity/networking directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-26 13:16:18 +01:00
Pisit Sawangvonganan 9a59e03225 doc: connectivity: bluetooth: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the doc/connectivity/bluetooth directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-26 13:16:18 +01:00
Yong Cong Sin d07d8082c9 doc: touch-up multi-level interrupt documentation
Some very minor touch-ups for multi-level interrupt
wordings and documentations to better reflects its current
state.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-26 11:47:36 +01:00
Pisit Sawangvonganan f51c8ee739 doc: releases: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the doc/releases directory.

The typo in the 'Issue Related Items' section will be left unchanged.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-25 18:14:31 -05:00
Adam Wojasinski 2e7a1f9702 doc: posix: Update POSIX supported API documentation
Updates in documentation support for `mq_notify` API
in `_POSIX_MESSAGE_PASSING` group option.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-01-25 19:47:37 +01:00
Øyvind Rønningstad 0176a27474 doc: Add release notes and migration guide for zcbor 0.8.0
A short release note referring to the official release notes,
and a migration guide with the most likely changes that need to be made.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-01-25 15:09:16 +00:00
Flavio Ceolin 3fc5d971fe security: Add compiler static analysis support
Enable GCC builtin static analysis in Zephyr's static code analysis
(SCA) infra.

When this option is enabled GCC performs a static analysis and
can point problems like:

sample.c

+	int *j;
+
+	if (j != NULL) {
+		printf("j != NULL\n");

output:

${ZEPHYR_BASE}/samples/userspace/hello_world_user/src/main.c:30:12:
warning: use of uninitialized value 'j' [CWE-457]
[-Wanalyzer-use-of-uninitialized-value]

   30 |         if (j != NULL) {
      |            ^
  'main': events 1-2
    |
    |   25 |         int *j;
    |      |              ^
    |      |              |
    |      |              (1) region created on stack here
    |......
    |   30 |         if (j != NULL) {
    |      |            ~
    |      |            |
    |      |            (2) use of uninitialized value 'j' here

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-01-25 12:07:27 +01:00
Timm Knape 019fbefa0f doc: Clarified usage of STL with Minimal C++ Library
STL is not available, so the applications should *not* rely on it.

Signed-off-by: Timm Knape <timm@knp.de>
2024-01-25 08:54:38 +01:00
Dominik Ermel 43d57ce1c2 doc/releases: Add note on update of LittleFS
The LittleFS is now at version 2.8.1.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-01-24 21:47:35 +01:00
Johan Hedberg c1dfa97960 doc: coding_guidelines: Update reference to Bluetooth language document
Update the reference to the Bluetooth Appropriate Language Mapping
Tables document. The link is now the same as the Bluetooth SIG website
uses.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2024-01-24 18:02:38 +01:00
Pieter De Gendt 71d8213ef9 doc: develop: modules: Add entry for ZEPHYR_CURRENT_MODULE_NAME
A new cmake variable is added for zephyr modules, namely
`${ZEPHYR_CURRENT_MODULE_NAME}`. Add it to the documentation.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-24 10:54:17 +01:00
Yong Cong Sin 2166a6f92f doc: release: migration guide: 3.6: add note on DT IRQ macros changes
Add a note on the Devicetree IRQ macros changes, especially for
multilevel interrupt platforms.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-24 09:22:38 +00:00
Derek Snell 117dc55233 doc: linkserver: update installer link
Updates link to MCUXpresso Installer

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-01-23 22:11:02 -05: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
Benjamin Cabé de21b50002 doc: guidelines: drop mentions of Parasoft Codescan
Drop the section of the coding guidelines that's referring to Parasoft
Codescan as it's not used by the project anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-01-23 10:02:39 +01:00
Markus Swarowsky 54a938a67a doc: services: tfm: Update version 2.0.0 in overview
Update the mention of the "currently integrated" version of TFM to match
the latest upgrade.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-22 18:22:33 +01:00
Henrik Brix Andersen e4c3f30feb doc: releases: migration-guide: 3.6: list removal of can_get_max_bitrate_t
Add a note about the removal of the optional can_get_max_bitrate_t callback
from the CAN controller driver API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-22 13:09:09 +01:00
Henrik Brix Andersen 53da5f6f87 doc: releases: migration-guide: 3.6: removal of run-time CAN RTR filter
Add a note about the removal of the CAN_FILTER_DATA and CAN_FILTER_RTR
flags from the CAN controller driver API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-21 11:00:31 +01:00
Henrik Brix Andersen 3436c93387 drivers: can: remove run-time RTR filtering, add build-time RTR filter
A growing number of CAN controllers do not have support for individual RX
hardware filters based on the Remote Transmission Request (RTR) bit. This
leads to various work-arounds on the driver level mixing hardware and
software filtering.

As the use of RTR frames is discouraged by CAN in Automation (CiA) - and
not even supported by newer standards, e.g. CAN FD - this often leads to
unnecessary overhead, added complexity, and worst-case to non-portable
behavior between various CAN controller drivers.

Instead, move to a simpler approach where the ability to accept/reject RTR
frames is globally configured via Kconfig. By default, all incoming RTR
frames are rejected at the driver level, a setting which can be supported
in hardware by most in-tree CAN controllers drivers.

Legacy applications or protocol implementations, where RTR reception is
required, can now select CONFIG_CAN_ACCEPT_RTR to accept incoming RTR
frames matching added CAN filters. These applications or protocols will
need to distinguish between RTR and data frames in their respective CAN RX
frame handling routines.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-21 11:00:31 +01:00
Pavel Vasilyev 981c79b7ce Bluetooth: Mesh: Drop explicit support for Bluetooth Mesh 1.0.1
Bluetooth Mesh Protocol 1.1 is backward compatible with Bluetooth Mesh
Profile 1.0.1, therefore the stack can still be qualified for 1.0.1 if
needed. But explicit support for both versions requires additional
maintenance efforts and doubles the CI time. To make the stack
qualifiable for 1.0.1, the one needs to remove Private Beacons reception
and compile out SHA256 algorithm support.

What is changed:
- Removed `CONFIG_BT_MESH_V1d1` option.
- Removed `transport_legacy.c` which was using 1.0.1 implementation. The
  new transport layer has new SaR logic that should still be possible to
  qualify for 1.0.1.
- Removed the legacy transport Kconfig options. They are superseded by
  the new transport Kconfig options.
- Tester app: `overlay-mesh-v1d1.conf` is merged into
  `overlay-mesh.conf`.
- Removed BabbleSim tests for 1.0.1.
- Updated documentation.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-01-19 12:55:40 +01:00
Doug Foster 6a1f48bd4e doc: posix: Update services/portability/posix doc
Update index.rst located in doc/services/portability/posix/overview
to include link to POSIX samples.

Signed-off-by: Doug Foster <dougwfost@gmail.com>
2024-01-19 10:32:23 +01:00
Henrik Brix Andersen 93551a4a95 doc: releases: migration-guide: 3.6: note on removal of CAN_FILTER_FDF
Add a note about the removal of the CAN_FILTER_FDF flag from the CAN
controller driver API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-19 09:55:43 +01:00
Dmitrii Golovanov b6e48d04f6 doc: posix: Fix internal links
Fix several links to other Zephyr doc sections as internal.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-01-19 09:32:29 +01:00
Jamie McCrae aa523a4bde doc: release: 3.6: Add note on fixed MCUmgr UDP error code
Adds a note about a fixed error code

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-01-18 20:16:11 +01:00
Krzysztof Chruściński a0382bd0f3 soc: arm: nordic_nrf: Disable UART runtime configuration
Since it takes 400 bytes of code and it is rarely used disable
by default this feature.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-18 11:12:55 +01:00
Fabio Baltieri 24cf2f6548 doc: use substitutions to replace all current harcoded SDK versions
This creates a set of substitution rules to replace all current usages
of SDK versions in the documentation, apart from a few that were not
meant to be copy-pastable anyway and the version has just been swapped
with a <version> placeholder.

Since code-block does not parse the content, these have all been
replaced with parsed-literal. That one though parses URLs, which cannot
be broken, so a series of URL substitutions are provided too.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-18 10:54:20 +01:00
Yong Cong Sin b8008c4727 shell: shell_uart: improve macro compatibility with previous version
The `SHELL_UART_DEFINE` macro was previously
`SHELL_UART_DEFINE(_name, _tx_ringbuf_size, _rx_ringbuf_size)`,
before it got removed in #63967 and then reinstated in #66218 as
`SHELL_UART_DEFINE(_name)`.

However its current form isn't compatible with previous Zephyr
version, and would cause compilation error when an application
migrates from to v3.6, let's modify it to accept variable
arguments for now.

Added documentation for this public API and updated the
migration guide accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-18 10:52:08 +01:00
Emil Gydesen 490c5e3b20 Bluetooth: Audio: Shell: CAP change volume command
Add sthe change volume command to the CAP commander shell.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-01-17 12:00:09 -05:00
Emil Gydesen 77c76fd7aa doc: Bluetooth: Update audio status table
Put CAP Commander into WIP.
Put PBP source and sink into done.
Put GMAP into done (minus samples).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-01-17 11:56:29 -05:00
Laurin Wolf f59ab74ba8 docs: lwm2m: fix example x509 CA certificate resource id
The resource ID of the CA certificate in the Security Object should
be 0/0/4 instead of 0/0/5

Signed-off-by: Laurin Wolf <laurin@l5w.de>
2024-01-17 16:11:04 +00: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
Erwan Gouriou af126d010a include: pinctrl.h: Make PINCTRL_SKIP_SLEEP available with CONFIG_PM
In some cases, PINCTRL_STATE_SLEEP may be required even when
CONFIG_PM_DEVICE is not defined.
One example is the possibility/need to put JTAG pins to analog when
CONIG_PM=y and CONFIG_DEBUG=n.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-01-16 15:20:15 +00:00
Amrith Venkat Kesavamoorthi 879e3a42b0 drivers: gpio: PCF857x: Modify PCF8574 driver
Modify existing PCF8574 driver as PCF857x for:
PCF8574 - 8 channel I/O expander
PCF8575 - 16 channel I/O expander

Signed-off-by: Amrith Venkat Kesavamoorthi <amrith@mr-beam.org>
2024-01-16 15:19:14 +00:00
Jonathan Rico 38c39af4df Bluetooth: L2CAP: Prepend SDU header immediately
Previously it was not always possible to prepend the header.

It was not possible if the application neglected to reserve the space
for headers.  This is bad because it forces a buffer segment allocation
even if the buffer had enough room for the headers. E.g. a payload of 10
bytes in a netbuf of 30 bytes would have been segmented.

We now explicitly reject the buffer if it does not have the headroom.

This allows us to do a nice thing; simplify L2CAP segmentation.

We convert the SDU from the application into a PDU payload, by
prepending the SDU header, i.e. the SDU length in the original buffer.

This PDU payload is ready to be chunked into PDUs without having to keep
track of where in the SDU we are. This has the effect of removing a
bunch of logic in the segmentation machine.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-01-16 11:29:43 +00:00
Jukka Rissanen 11f7fa2782 drivers: eth: phy: Remove syscall from phy API
No point marking the phy API to be callable from usermode,
the device cannot be accessed from usermode anyway so this
is pointless. User can call the phy API from supervisor mode
thread just fine.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-15 15:48:03 -06:00
Grzegorz Swiderski 460b6ef122 code_relocation: Add NOKEEP option
When using the code and data relocation feature, every relocated symbol
would be marked with `KEEP()` in the generated linker script. Therefore,
if any input files contained unused code, then it wouldn't be discarded
by the linker, even when invoked with `--gc-sections`.

This can cause unexpected bloat, or other link-time issues stemming from
some symbols being discarded and others not.

On the other hand, this behavior has been present since the feature's
introduction, so it should remain default for the users who rely on it.

This patch introduces support for `zephyr_code_relocate(... NOKEEP)`.
This will suppress the generation of `KEEP()` statements for all symbols
in a particular library or set of files.

Much like `NOCOPY`, the `NOKEEP` flag is passed to `gen_relocate_app.py`
in string form. The script is now equipped to handle multiple such flags
when passed from CMake as a semicolon-separated list, like so:

   "SRAM2:NOCOPY;NOKEEP:/path/to/file1.c;/path/to/file2.c"

Documentation and tests are updated here as well.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-01-15 13:20:17 +01:00
Fabian Pflug bccec3cccd doc: twister: fix spelling errors
Fis spelling errors in twister doc

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-01-15 11:33:06 +00:00
Jonathan Rico 75c2aeb8bd Bluetooth: L2CAP: stop stealing buffers from SDU pool
It seems like a nice idea at first, but leads to hard-to-debug
situations for the application.

The previous behavior can be implemented by the app by defining
`alloc_seg` and allocating from the same pool as `buf`.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-01-15 09:58:58 +01:00
Dmitrii Golovanov b184fc3a62 posix: sched: Add CONFIG_POSIX_PRIORITY_SCHEDULING
Add `CONFIG_POSIX_PRIORITY_SCHEDULING` Kconfig option to select
APIs from PSE53 `_POSIX_PRIORITY_SCHEDULING` option group.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-01-15 09:57:44 +01:00
Andrej Butok a21076bbf3 doc: pyocd: Add CMSIS DAP Onboard Debug Probe support
Add the CMSIS DAP Onboard Debug Probes to the list
of supported probes by pyOCD.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-01-12 15:57:32 -05:00
Daniel Leung bd3c76c88d doc: force include interface header files first
Force include interface header files first before other files
under include. This is due to doxygen always using the first
found item during linking. Because of this, without forcing
the interface definitions first, almost all of these would
link to the same named items, for example, under ARC header
files instead. Hence the need to manually shuffle the items
so linking would actually link to the correct items.

Note that this only works with functions and macros that are
actually defined in the interface file. A simple doc section
with @def would not work as this is not an actual definition.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-11 21:06:03 -05:00
Daniel Leung 206e1d5b0e sys: atomic: move doxygen doc to atomic.h
This moves the doxygen doc from atomic_builtin.h to
atomic.h, as the doc should not have been inside
a particular implementation.

Also add an alias @atomic_api to replace the repetitive
wordings in the doc.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-11 21:06:03 -05:00
Henrik Brix Andersen 53217b980c doc: release: migration-guide: 3.6: mention change in mcp320x bindings
Mention the change in the microchip,mcp320x bindings to use the common
io-channel-cells name "input" instead of "channel".

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-11 17:32:28 +01:00
Jukka Rissanen aeb1e41c22 doc: net: Add network configuration guide
Add a simple document describing various network related
configuration options and how they affect the available
resources in the system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-11 10:26:47 -05:00
Yong Cong Sin 768ed26010 doc: posix: signal: fix sigsuspend typo
The `sigsuspend` is currently `igsuspend`, fix that.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-11 07:49:26 -05:00
Yong Cong Sin f82b64504c doc: posix: signal: mark sigprocmask as supported
`sigprocmask()` is now implemented, mark it so.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-11 07:49:26 -05:00
Gerard Marull-Paretas 9e5e8e8c40 doc: extensions: zephyr-domain: make Breathe inserts optional
So that external users of the domain only interested in e.g. referencing
roles, can skip tweaks made to Breathe's directives.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-11 10:04:44 +01:00
Gerard Marull-Paretas 9f4a7ba0f5 doc: extensions: zephyr-domain: fix object descriptions
Zephyr's domain code-sample object description was incorrectly yielded,
making Sphinx inventory (objects.inv) unusable on other projects that
need to use the domain via Intersphinx.

Ref. https://www.sphinx-doc.org/en/master/extdev/domainapi.html

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-11 10:04:44 +01:00
Henrik Brix Andersen 1fa11bd038 doc: release: migration guide: 3.6: add note on stm32h7 CAN domain clk
Add a note describing the new default for the STM32H7 FDCAN CAN controller
domain/kernel clock and how to override it.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-10 20:59:55 -05:00
Christopher Friedt b85b7a3490 doc: posix: overview: clarification on conformant implementations
Any C library with conformant implementations of POSIX features,
options, or option groups can be used in place of the versions
provided with Zephyr's POSIX implementation as long as there is
no source licensing compatibility or linking clause violation.

Implementations of such features, options, or option groups can
be used in whole or in part, as long as there is no conflict
with the rest of Zephyr or the application.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-10 18:17:10 +00:00
Christopher Friedt 5bbec7a45d docs: posix: option groups: add _POSIX_THREAD_SAFE_FUNCTIONS
The _POSIX_THREAD_SAFE_FUNCTIONS option was mentioned in
aep/index.rst but not expanded.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-10 18:17:10 +00:00
Christopher Friedt ce42bf3820 doc: posix: option groups: add C_LANG_JUMP and C_LANG_MATH
Add POSIX_C_LANG_JUMP and POSIX_C_LANG_MATH option groups
with links to specification details on opengroup.org .

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-10 18:17:10 +00:00
Christopher Friedt 283d813c88 doc: posix: option groups: abbreviate POSIX_C_LANG_SUPPORT
In order to reduce verbosity on the primary Option Groups page,
simply add a note that the POSIX_C_LANG_SUPPORT is considered
supported with newlib, picolibc, or any other libc conforming to
the ISO C standard.

Add a link to the language support page that details C, C++, ..

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-10 18:17:10 +00:00
Fabio Baltieri bd8cee8683 drivers: input: add an analog-axis driver
Add an input driver to read data from an analog device, such as a
thumbstick, connected to an ADC channel, and report it as an input
device.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-10 15:05:35 +01:00
Yong Cong Sin 9016cec150 doc: posix: mark sem_open, sem_close & sem_unlink as supported
The `sem_open()`, `sem_close()` & `sem_unlink()` functions are
now implemented, so mark them as supported.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-10 07:18:19 -05:00
Piotr Golyzniak 8831aa60eb scripts: twister: add copying of bsim exe
To make possible to build bsim tests by Twister, it is necessary to
copy executables to BabbleSim bin directory.

Signed-off-by: Piotr Golyzniak <metody159@gmail.com>
2024-01-10 12:10:58 +01:00
Jukka Rissanen b0dd9a2980 doc: net: ppp: Fix the point-to-point documentation
The ppp doc was still referring to gsm-modem sample which
is no longer there. Also removed old information that is no
longer relevant.

Fixes #67171

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-10 12:06:19 +01:00
Jamie McCrae 7ff715b848 doc: release: 3.6: Add note on sysbuild shield fix
Adds a note that the sysbuild shield fix has been applied

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-01-09 10:37:38 -06:00
Anas Nashif 72c6ffb2d0 doc: ztest: remove reference to non-existing test
custom_output test does not exist anymore.

Fixes #67168

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-09 10:27:15 +01:00
Henrik Brix Andersen 527383f9b1 doc: release: migration-guide: 3.6: mention change in lmp90xxx bindings
Mention the change in the ti,lmp90xxx bindings to use the common
io-channel-cells name "input" instead of "positive" and "negative".

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-09 10:04:18 +01:00
Alberto Escolar Piedras b89399ff40 docs boards native_sim: Add mention about the EEPROM simu
Add a small paragraph about the EEPROM simulator,
and improve slightly the flash simulator section

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-09 10:04:03 +01:00
Jamie McCrae bde23945fe doc: release: 3.6: Add note on shield processing change
Adds a note that shields are now processed in order

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-01-09 10:03:15 +01:00
Thomas Gagneret 7bde51bccf scripts: zspdx: Include modules as packages in zephyr.spdx
The current zephyr.spdx does not contain the modules included in the build.
This commit split the zephyr-sources package into multiple packages, one
for each modules found by zephyr_module.py.

Signed-off-by: Thomas Gagneret <tgagneret@witekio.com>
2024-01-09 09:59:57 +01:00
Daniela Andreea Dumitrache 3bfb2e3ab2 Bluetooth: Audio: Add implementation for PBP and dedicated sample apps.
PBP API allows sources to create a Public Broadcast Announcement.
PBP API to parse a Public Broadcast Announcement.

public_broadcast_source application starts extended advertising and
includes a Public Broadcast Announcement. The advertised broadcast
audio stream quality will cycle between high and standard quality.

public_broadcast_sink application scans for broadcast sources and
synchronizes to the first found source which defines a Public Broadcast
Announcement including a High Quality Public Broadcast Audio Stream
configuration.

Add bsim tests for Public Broadcast Profile APIs.

Add shell implementation for Public Broadcast Profile APIs.

Signed-off-by: Daniela Andreea Dumitrache <danielaandreea.dumitrache@nxp.com>
2024-01-09 09:59:23 +01:00
Anas Nashif afc319e3fa ztest: shell: add shell support
- Support for listing both testcases and testsuites
- Support for running single suites or single test cases
- Support shuffling tests and repeating execution based on command line
  arguments.

For example, build with

west build -p  -b qemu_cortex_m3  tests/kernel/sleep   -t run -- \
-DCONFIG_ZTEST_SHUFFLE=y -DCONFIG_ZTEST_SHELL=y

Following commands are available:

uart:~$ ztest
ztest - Ztest commands
Subcommands:
  run-all          :Run all tests
  shuffle          :Shuffle tests
  list-testsuites  :List all test suites
  list-testcases   :List all test cases
  run-testsuite    :Run test suite
  run-testcase     :Run testcase

shuffle accepts two arguments --suite_iter and --case_iter which allows
repeated exercution of testcases or suites.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-09 09:58:57 +01:00
Reto Schneider 698f3b1a58 doc: Fix sentence
Before this commit, the sentence did not make sense.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-01-08 14:06:40 -05:00
Fabio Baltieri e0c24c8842 doc: input: few minor fixes
Few documentation fixes that got caught post merge.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-08 16:16:26 +00:00
Fabio Baltieri 79e10f0d0f doc: input: add a dedicated GPIO keyboard documentation
This driver supports few different hardware configurations, add a
document page showing some of them next to some schematics snippets

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-08 10:23:53 +01:00
Bjarki Arge Andreasen de855162a7 doc: emul: Adjust reference to emulated RTC docs
Add reference to section in RTC peripheral documentation which
covers the emulated RTC.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-08 10:10:13 +01:00