Commit Graph

83738 Commits

Author SHA1 Message Date
Keith Short abf26affe0 doc: Add instructions for installing Python dependencies
The Python dependencies specific to building the documentation were
recently removed from the common requirements. Point users to the
documentation generation instructions and provide details on installing
the doc specific dependencies.

Signed-off-by: Keith Short <keithshort@google.com>
2023-09-06 15:16:38 +02:00
Benjamin Cabé f9192a2e4a drivers: dmic: doc: Cleanup Doxygen documentation
Fixed several comments that were not proper Doxygen ones, causing
documentation for this file to be incomplete.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-06 15:12:14 +02:00
Benjamin Cabé 105a254f4d drivers: codec: doc: Fix Doxygen comments
Added a few missing brief descriptions + fixed existing ones
to use proper Javadoc-style comments.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-06 15:11:56 +02:00
Florian Grandel 82abe48646 MAINTAINERS: IEEE 802.15.4
When IEEE 802.15.4 maintainership was updated in ec98555f42 the L2 part
was missed. Proposes to assign both L1 and L2 to the same persons.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-06 09:07:38 -04:00
Anas Nashif af03d374f5 manifest: Update SOF tree with zephyr related fixes
- Updates with a patch fixing CONTAINER_OF issues by Fabio.
- init.h include fixes by Gerlad

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-06 09:07:13 -04:00
Yuchao Guo 9fb6c9ddd7 west: runners: uf2: Add more fstype check for is_uf2_partition
During testing it was found that if the partition type was displayed as
msdos it could not be detected correctly, so this partition type
determination was added.

Signed-off-by: Yuchao Guo <yuchao.guo@hoorii.io>
2023-09-06 14:16:58 +02:00
Rick Talbott 774da57db9 shell: Add shell command command rem
Added the shell comment command.

Signed-off-by: Rick Talbott <richard.talbott1@t-mobile.com>
2023-09-06 14:02:38 +02:00
Jamie McCrae 2f05af891d doc: services: device_mgmt: smp: Add SMP version 2 details
Adds SMP version 2 error response details to the documentation.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-06 13:05:40 +02:00
Anders Storrø 01a6ecb6bf Bluetooth: Mesh: Send od priv proxy with devkey
According to the mesh 1.1 spec, section  4.4.14.1: “. The access layer
security on the On-Demand Private Proxy Client model shall use the
device key of the node supporting the On-Demand Private Proxy
Server model.“

This commit alters the API and implementation to reflect this.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-09-06 13:05:14 +02:00
Jamie McCrae 76be0d28dd west.yaml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  9bf7ce8c5fe8152836a6e00bd4444153bd950342

Brings following Zephyr relevant fixes:
 - 9bf7ce8 zephyr: Fix build for non-arm archs
 - e188dbb zephyr: Fix boot serial extensions

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-06 13:03:42 +02:00
Jamie McCrae a15752c79c mgmt: mcumgr: Split mgmt defines to new file
This splits defines to a separate file, which are commonly needed
by out-of-tree projects whereby the full MCUmgr include cannot be
used due to undefined types being used.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-06 13:03:42 +02:00
Benjamin Cabé b2977b7657 doc: Make code-samples admonition collapsible
Use sphinx-toggle to make "Related code samples" collapsible.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-06 12:11:28 +02:00
Benjamin Cabé 5832f6ed5f doc: Use new Sphinx extension for code samples
Use the new code-sample directive and roles in a few places
to demonstrate how it works.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-06 12:11:28 +02:00
Benjamin Cabé e7829752ae doc: Update sample.tmpl with new directive
Update the sample.tmpl file so that it encourages people to use the new
:zephyr:code-sample: directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-06 12:11:28 +02:00
Benjamin Cabé 3c5f3da4d8 doc: Add Sphinx extension for code samples
This adds a new Sphinx extension for both a code-sample directive and role.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-06 12:11:28 +02:00
Manuel Argüelles 7ca35f94ee mr_canhubk3: add missing pinmux settings for SW2
GPIO pin for `sw2` was missing to be configured as input for external
interrupts.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-06 11:44:40 +02:00
Daniel Gaston Ochoa d8fab9e435 stm32h7: spi: Add SPI loopback tests for 16 bits frames
Enable these tests only for H7 and if DMA is not enabled, as
running them with DMA would require modifying the dmamux
configuration in devicetree to move half-words instead of
bytes.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2023-09-06 11:44:28 +02:00
Diogo Correia 168791e08a winc1500: fix undefined declarations
LOG_LEVEL > LOG_LEVEL_OFF guards were protecting a couple of function
declarations. These functions were being used without taking this fact
into consideration. These guards are now applied around the stack_stats()
function only.

Signed-off-by: Diogo Correia <diogo.correia@fraunhofer.pt>
2023-09-06 11:44:20 +02:00
Dat Nguyen Duy b92ad4b56a boards: mr_canhubk3: enable NXP S32 EMIOS PWM
In this board, there are eight PWM channels from
EMIOS 0 CH0 --> EMIOS 0 CH7 that can be used to
generate PWM pulse to outside of the board.

Moreover, there are three RGB leds that can use
PWM pins for blinking, faded leds

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-06 11:44:00 +02:00
Dat Nguyen Duy 92f3fb79fe drivers: pwm: introduce PWM driver for NXP S32 EMIOS
This introduces PWM driver with supporting PWM output
APIs based on NXP S32 EMIOS peripheral. This supports
three mode: OPWFMB, OPWMCB and OPWMB.

OPWFMB uses internal counter, the new period and duty
cycle takes effect immediately.

OPWMCB and OPWMB use external counter as timebase, changing
PWM period at runtime will impact to all channels share the
same timebase. Also the new period and duty cycle take effect
in next period boundary of the timebase

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-06 11:44:00 +02:00
Dat Nguyen Duy e5e2f2fad8 drivers: misc: add NXP S32 eMIOS driver
This PR adds a misc driver for NXP S32 eMIOS peripheral.
eMIOS provides multiple unified channels (UCs), there are
several channels can be used as reference timebase
(master bus) for other channels. At this time, the
driver does initialize global configuration for eMIOS

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-06 11:44:00 +02:00
Fabio Baltieri eee426742b manifest: update loramac-node
Update loramac-node to include one more shadow variable fix.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-06 11:32:19 +02:00
Andrei Emeltchenko 83af7349f3 boards: x86: Remove unneeded board check
When building EFI is desired for all board variants, remove unneeded
board check.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-06 09:35:44 +02:00
Bjarki Arge Andreasen 2d2d3ececd drivers/modem/modem_cellular.c: Improve bus pipe usage
This commit improves the usage of the bus pipe (connected
to UART) to only open it when the modem is actually
powered and ready, not when leaving the idle state. This
ensures the pipe is flushed before sending the init script,
and re-enables the UART driver if it is disabled due to
errors.

While building a test platform based on the nRF9160 and a
Quectel BG95, it was discovered that the nRF9160 correctly
throws UART errors if the RX is enabled while the UART RX
line is low (which was due to the modem being powered
down).

The improvements should also help help remove the
"<wrn> modem_chat: receive buffer overrun" warning which
would occur during startup as the pipe was opened, but
nothing was receiving the data, causing the buffer to
overflow.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-09-06 09:35:34 +02:00
Bjarki Arge Andreasen c2647ff24b subsys/modem/backend: Correct async UART backend close
The backend currently returns the pipe closed event immediately
after calling uart_rx_disable() which is not the correct behavior.
the pipe closed event should be called when the UART_RX_DISABLED
event is raised by the UART driver.

With this fix, back-to-back open/close/open... will work as
expected, where before the second open would often fail since
the UART was not actually disabled yet.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-09-06 09:35:34 +02:00
Yves Vandervennet 1477865a7a linkserver: doc: updates for NXP's mimxrt1170
This commit adds the documentation details for the linkserver support
on rt1170.

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2023-09-06 09:35:24 +02:00
Yves Vandervennet ab9da956b0 nxp: mimxrt1170: add support for NXP's LinkServer
LinkServer is NXP's tool to flash and debug on MCU's.
This patch expands support for LinkServer to MIMXRT1170.

There is one limitation with flashing and debugging the SoC's seciond
core (COrtex M4) that will be addressed with a future submission.

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2023-09-06 09:35:24 +02:00
Pavel Vasilyev d36b7f4de0 Bluetooth: Mesh: Fix Solicitation RPL PDU Server compilation
A pointer to the key struct should be passed after the PSA support has
been added.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-06 09:35:10 +02:00
Pavel Vasilyev 2a472b8b47 Bluetooth: Mesh: Fix Opcode Aggregator Server compilation
Remove ifdef around `srcs` and let linker exclude it when Opcode
Aggregator Client model is not enabled.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-06 09:35:10 +02:00
Théo Battrel 8bd36fc589 Bluetooth: Host: Fixes SMP issues
If the bonding information has been cleared before pairing had a chance
to complete (probably by the application), indicate this by setting an
appropriate log message.

Also check that keys exist before calling `bt_keys_store`.

Fixes #59788 and #61465

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-09-06 09:35:01 +02:00
Théo Battrel 95ac71893c Bluetooth: Test: Add tests to reproduce SMP issues
This test reproduce two issues, #59788 and #61465.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-09-06 09:35:01 +02:00
Joakim Andersson aa608d016d manifest: Update TF-M with shared boot data fix
Update TF-M version with fix for build with shared boot data enabled,
i.e. CONFIG_TFM_MCUBOOT_DATA_SHARING=y.

Regression from: 485fa940aa

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-09-06 09:33:24 +02:00
Richard Wheatley a92008c17d soc: arm: ambiq: apollo4: add simobuck init to apollo4 init
Adds comments and simobuck init function for low power.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2023-09-06 09:33:06 +02:00
Florian Grandel fa4f15a7d5 tests: net: conn_mgr_monitor: increase stack size
Fixes the broken conn_mgr_monitor test.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-06 09:32:36 +02:00
Francois Ramu 6bf26a1590 west.yml: update modules/hal/st with new sensor/vl53l1x version
Update the ../modules/hal/st/sensor/vl53l1x to version 2.4.5

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-09-05 10:13:23 -05:00
Albert Jakieła dd4ef7d2b5 drivers: sensor: Add PM support to LM75 digital temperature sensor
Add support for device power management. When the sensor
is not powered, the fetch function will fail. When the
sensor is not connected to a power domain, it will behave
as usual.

Signed-off-by: Albert Jakieła <aja@semihalf.com>
2023-09-05 09:49:42 -05:00
Fabio Baltieri 9b29c2cf33 west: add entries for missing modules
Add maintainer entries for two missing modules.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-05 10:31:33 -04:00
Lukasz Mrugala 2c95b6944f scripts: tests: twister: Testsuite test fix
Previous tests didn't take b48c3cd into account.
This fix restores previously passing tests.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-09-05 10:30:44 -04:00
Johann Fischer ad498aa550 usb: device: hid: remove CONFIG_USB_HID_PROTOCOL_CODE
Kconfig option USB_HID_PROTOCOL_CODE, deprecated in v2.6,
is finally removed.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-09-05 16:16:56 +02:00
Alexander Razinkov 176713abfe arch: riscv: Trap handler alignment configuration
RISC-V Spec requires minimum alignment of trap handling code to be
dependent from MTVEC.BASE field size. Minimum alignment for RISC-V
platforms is 4 bytes, but maximum is platform or application-specific.

Currently there is no common approach to align the trap handling
code for RISC-V and some platforms use custom wrappers to align
_isr_wrapper properly.

This change introduces a generic solution,
CONFIG_RISCV_TRAP_HANDLER_ALIGNMENT configuration option which sets
the alignment of a RISC-V trap handling code.

The existing custom solutions for some platforms remain operational,
since the default alignment is set to minimal possible (4 bytes)
and will be overloaded by potentially larger alignment of custom solutions.

Signed-off-by: Alexander Razinkov <alexander.razinkov@syntacore.com>
2023-09-05 16:16:46 +02:00
Warren Buffer 610125418f boards: arm: efr32_radio_brd4170a: Added docs
Added documentation for Silicon Labs' BRD4170A Radio board

Signed-off-by: Warren Buffer <warren.buffer78@gmail.com>
2023-09-05 16:16:30 +02:00
Warren Buffer 17978182d2 boards: arm: Added support for Silicon Labs BRD4170A
Added support for Silicon Labs' BRD4170A Radio Board, based on the
EFR32MG12P SoC.

Signed-off-by: Warren Buffer <warren.buffer78@gmail.com>
2023-09-05 16:16:30 +02:00
Warren Buffer 09577b0a0e soc: Added support for EFR32MG12P433F1024GM68
Added devicetree and Kconfig for EFR32MG12P433F1024GM68, needed for
the BRD4170A radio board by Silicon Labs.

Signed-off-by: Warren Buffer <warren.buffer78@gmail.com>
2023-09-05 16:16:30 +02:00
Andriy Gelman c262ff5be0 boards: arm: xmc45_relax_kit: Add memory regions to linker
Add memory regions to linker.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-09-05 16:16:11 +02:00
Ren Chen 6bceb45176 usb: hid: Call the report proto callback function when the reset occurs
This commit changes the protocol callback function is invoked if the HID
protocol changed due to reset.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2023-09-05 16:15:58 +02:00
Grzegorz Swiderski a768a05e62 doc: sysbuild: Add documentation for image ordering
Add a brief subsection to explain `sysbuild_add_dependencies()`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-05 15:27:04 +02:00
Grzegorz Swiderski 4cfea45c44 sysbuild: Make the image processing order well-defined
Adjust the order in which image-specific `sysbuild.cmake` files are
iteratively included by sysbuild.

This is motivated by the introduction of `sysbuild_add_dependencies()`.
In the following example:

  sysbuild_add_dependencies(CONFIGURE my_sample sample_a sample_b)

the `my_sample` image is expected to be added before this function is
called. Success depends not only on the placement of the call, but on
the order in which new images are added, which itself is influenced by
the order in which `sysbuild.cmake` files are included. This last order
can be tweaked to make the "dependencies" feature more user-friendly.

This is done by rewriting the internal `sysbuild.cmake` processing loop
into a new, general purpose function - `sysbuild_add_subdirectory()` -
which is a wrapper for `add_subdirectory(<source_dir>)` that recursively
includes `sysbuild.cmake` files for all images found in `<source_dir>`.

With the new function, all images that are expected to be found in a
given `<source_dir>` are guaranteed to be added around the same time.
This wasn't the case with the old processing loop, because the image-
specific `sysbuild.cmake` files (where "sub-images" could be defined)
were left to be processed at the very end.

Below is the initial order in which sysbuild will add all images.
Note: the order of Zephyr modules (from 1 to n) is well-defined.

  1. Main application (aka DEFAULT_IMAGE)
  2. MCUboot (optional)
  3. All images added via these directories:
     3.1. <module-1>.sysbuild-cmake
     3.2. <module-2>.sysbuild-cmake
     ...
     3.n. <module-n>.sysbuild-cmake

  4. All images added via these files:
     4.1. ${BOARD_DIR}/sysbuild.cmake
     4.2. ${APP_DIR}/sysbuild.cmake (aka sub-images of DEFAULT_IMAGE)

These images are intended to be sorted for the users' convenience, from
most to least important in the build system, or least to most dependent
on other images for configuration (potentially).

Finally, the use of `sysbuild_add_subdirectory()` requires updating the
directory structure in sysbuild:

  ./images
    - All images should belong here. The `DEFAULT_IMAGE` should be the
      first and only image at the top level, so that it gets added first
      and its sub-images get added last.

  ./images/bootloader
    - Moved from ./bootloader.

  ./images/boards
    - Adds images from the board-specific `sysbuild.cmake` file.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-05 15:27:04 +02:00
Grzegorz Swiderski 6640c04df6 sysbuild: Remove IMAGES variable
This variable was originally provided for two indended purposes:

  * Let users manually add a new image in a desired order in the list.
  * Let users set build-only images, which are excluded from the list.

Given the recent additions of the `sysbuild_add_dependencies()` function
and the `BUILD_ONLY` parameter, `IMAGES` should be considered obsolete.

Furthermore, the list of images added to sysbuild should be updated
automatically when calling `ExternalZephyrProject_Add()`. This is now
possible by using a GLOBAL property internal to sysbuild.

With that, the `IMAGES` variable can be removed. Its existing usage for
image ordering is replaced with `sysbuild_add_dependencies()` treewide.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-05 15:27:04 +02:00
Grzegorz Swiderski c323cc6fb1 sysbuild: Support relative ordering of images
Fixes #53650

The existing solution for image ordering involves the `IMAGES` variable,
which sysbuild originally provided to let users manually add a new image
in a desired order. This isn't very flexible for the following reasons:

* The order in which `IMAGES` is updated across multiple modules and
  `sysbuild.cmake` files is not well defined.
* Having a single variable means that the same order is used for both
  configuration and flashing. Usually, there is no reason for the
  flashing order to be the same as the configuration order.

Introduce the `sysbuild_add_dependencies()` function for more fine-tuned
ordering of images. It makes one image depend on other images in either
configuration or flashing order. Its usage is similar to the standard
CMake function `add_dependencies()`, but with an extra parameter to
distinguish between two types of dependencies:

 sysbuild_add_dependencies(CONFIGURE my_sample sample_a sample_b)
 sysbuild_add_dependencies(FLASH     my_sample sample_c sample_d)

CONFIGURE dependencies determine the order in which sysbuild configures
(runs CMake for) the individual images. This is useful if there is some
information from one application's build which needs to be available to
another application.

FLASH dependencies control the sequence of images used by `west flash`.
This could be used if a specific flashing order is required by an SoC,
a runner, or something else. Note that these dependencies are not valid
for images specified as `BUILD_ONLY`.

The internal `sysbuild_images_order()` function is responsible for
assembling two sorted lists of images based on the added dependencies,
with the help of `topological_sort()`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-05 15:27:04 +02:00
Grzegorz Swiderski 6c2ad89e4c cmake: extensions: Add zephyr_topological_sort()
This function performs topological sorting of CMake targets. Its initial
use case in Zephyr will be for implementing sysbuild image dependencies,
i.e., specifying an image order for CMake configuration and flashing.

Sourced from a comment on PR #57884 (anchor: #discussion_r1206807021)

Authored-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-05 15:27:04 +02:00