Commit graph

94583 commits

Author SHA1 Message Date
Jukka Rissanen 87f45d153f tests: net: http_server: Add tests for the HTTP server
Tests for HTTP server support.

Signed-off-by: Emna Rekik <emna.rekik007@gmail.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-04-30 13:25:22 +02:00
Jukka Rissanen 4b157b9099 net: lib: http_server: Initial HTTP server support
Original code developed as a GSoC 2023 project by Emna Rekik.

Code refactored in order to provide better bisectability
as the origical commits were not bisectable.

The server supports static and dynamic resources, managed by
HTTP_SERVICE/HTTP_RESOURCE macros.

Fixes #59685
Fixes #59686
Fixes #59688
Fixes #59690
Fixes #59670
Fixes #59700
Fixes #59684
Fixes #59693
Fixes #59693
Fixes #59694
Fixes #59699
Fixes #59696
Fixes #59688
Fixes #59690
Fixes #59670
Fixes #59700
Fixes #59685
Fixes #59686
Fixes #59688
Fixes #59691

Signed-off-by: Emna Rekik <emna.rekik007@gmail.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-04-30 13:25:22 +02:00
Robert Lubos 318dcb6336 net: lib: http_server: Add HPACK and Huffman code encoder/decoder
Add HTTP/2 helper libraries to encode and decode HPACK encoded headers,
according to RFC7541.

HPACK string encoding requires to support certain set of Huffman codes,
therefore implement Huffman encoder/decoder as well.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-04-30 13:25:22 +02:00
Jukka Rissanen 392f0ced2c net: http: service: Allow user to set TLS security tag list
Have separate macros to setup a HTTPS service.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-30 13:25:22 +02:00
Anas Nashif b306e80e00 doc: fix duplicate lable data_structures
Fix duplication of label.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-30 12:00:58 +02:00
Anas Nashif 9bc237abe8 doc: various doxygen fixes
Fix paramters and syntax of doxygen in various headers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-30 12:00:58 +02:00
Anas Nashif 0510e081a3 testsuite: ztress: fix doxygen command
Fix doxygen command.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-30 12:00:58 +02:00
Anas Nashif 49d443d56f clock_control: nrf: fix references to kconfig
Fix references to kconfig variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-30 12:00:58 +02:00
Anas Nashif ad63db9808 zbus: doxygen reference to kconfig
Fix references to kconfig variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-30 12:00:58 +02:00
Rubin Gerritsen ebae4b8cf7 Bluetooth: Controller: Default stream count based upon app configs
When building ISO applications on a device that has the host
and controller on the same core, the application developer
shouldn't have to set controller specific configurations.

Without this change the samples iso_receive and iso_broadcast
will fail to run on NRF52 series devices as the samples
try to set up two streams but the controller is configured
to support only one.

Controller unit tests that were previously only enabling the
controller specific ISO configurations now also enable the
top-level ISO configurations to ensure that the default
stream count is properly configured.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-04-30 11:45:47 +02:00
Chaitanya Tata 09048e0a16 net: ipv6: mld: Fix improper reference drop
In case of successful submission, the reference shouldn't be put down,
this only should done on error cases.

As reference is put down on success, during the buffer unref, no action
is taken due to an uint8 overflow (ref is now 255), so, the buf->frags
isn't cleared properly and the next time the frags is used and when L2
inserts a second frag, the first head frag and next frag are same (due
to buffer re-use) causing an infinite loop in either net_buf_frag_last
or net_pkt_get_len.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-04-30 11:45:38 +02:00
Lukasz Majewski e40c8757f3 doc: board: ip_k66f: Update doc with LLDP DSA example information
The ip_k66f now supports its KSZ8794CNX switch IC via DSA subsystem.

With the samples/net/dsa it is possible to handle LLDP frames on this
board.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-04-30 12:37:22 +03:00
Tomas Galbicka 950382cb17 samples: ipc: static_vrings add NXP boards support
This commit adds support for these NXP Multi-core boards for
IPC static_vrings sample using OpenAmp lib:
 - lpcxpresso55s69
 - mimxrt1160_evk
 - mimxrt1170_evk
 - mimxrt1170_evkb

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2024-04-30 08:57:01 +02:00
Jiafei Pan bd699d0d50 tests: counter_basic_api: add imx93 evk support
Add i.MX 93 EVK support for counter_basic_api test application.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-30 08:53:59 +02:00
Jiafei Pan 3cf52f873c dts: mimx93: add tpm counter
Add device tree node for TPM counters.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-30 08:53:59 +02:00
Jiafei Pan 91c081833e drivers: clock_control: imx_ccm_rev2: add tpm clock
Add TPM clock support on i.MX 93 platform.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-30 08:53:59 +02:00
Jiafei Pan 073725e00f drivers: clock_control: imx_ccm_rev2: clean up header file
Peripheral mask is 0xFF00, so reorder the peripheral definitions to
be consecutive.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-30 08:53:59 +02:00
Marouen Ghodhbane 3fb0e784ff drivers: counter: mcux: add support for TPM
Add TPM native Zephyr driver. It's mainly inspired from the GPT
counter implementation.

Signed-off-by: Marouen Ghodhbane <marouen.ghodhbane@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-04-30 08:53:59 +02:00
Flavio Ceolin a458d892e6 pm: device_runtime: Check busy status in runtime_enable
We can't enable device runtime power management in a device that is
set busy since it may suspend this device.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-04-30 08:53:18 +02:00
Declan Snyder 9320907fdf drivers: uart_mcux_lpuart: Fix APIs used together
Handle controller instances wanting to use different
API instances, need to change init flow so that they dont
interfere with each other, trick for now is returning
either the interrupt driven or async apis as not enabled
if the other has already been used on that controller.

Previously, there was an issue where enabling CONFIG_UART_ASYNC_API
would overwrite the init even if controller was meant to use
interrupt driven (as kconfig is global to affect all the controllers)

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-30 08:53:02 +02:00
Declan Snyder dfe4991a2c Revert "drivers: serial: uart_mcux_lpuart: fix IRQ-driven API with ASYNC_API"
This reverts commit a80fa5163b.

That commit broke the polling API when used with the interrupt driven,
it is completely wrong to disable the receiver from irq_rx_disable,
the uart_basic_api test has been broken on all lpuart platforms because
of this bug.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-30 08:53:02 +02:00
Luis Ubieda 262af5645c doc: tests: i2c_ram: Specify required Hardware Setup
This testsuite requires an external I2C RAM connected to the I2C bus.
Adding details to provide guidance to users interested in running the
suite.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-29 22:32:28 +01:00
Peter Mitsis de1855f42d samples: echo_client: Bump kobj thread bitmask size
Bumps the kobj thread bitmask size due to a recent change
in the logic for aborting threads.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-29 22:32:00 +01:00
Andrej Butok ca4993ddb2 test: mcuboot: enable test for rd_rw612_bga
Enable mcuboot test for rd_rw612_bga

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-04-29 22:31:33 +01:00
Declan Snyder e3ef4e3f09 drivers: mdio: Remove empty functions
Remove empty functions that were "implementing" the
mdio bus_enable and bus_disable apis.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-29 22:31:16 +01:00
Declan Snyder 3ef9880457 include: mdio.h: Make bus functions optional
Make bus_enable and bus_disable optional for drivers
to implement by checking if it is NULL in the api struct.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-29 22:31:16 +01:00
Jamie McCrae 5033399322 scripts: list_hardware: Add check for soc.yml runner validity
Adds checking that qualifiers listed in a soc.yml file are valid
for the socs and cpuclusters defined in that file

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 17:56:19 +01:00
Jamie McCrae df72732744 doc: release: 3.7: Add SoC/board flashing configuration note
Adds a note that a new flashing configuration system has been
added for boards and socs

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 17:56:19 +01:00
Jamie McCrae ff823c63ee doc: build: flashing: Add documentation
Adds documentation on the new flashing configuration system

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 17:56:19 +01:00
Jamie McCrae 4b2d19f147 soc: nordic: Add run once and deferred reset configuration
Adds configuration that allows nRF53 and nRF91-based boards to be
flashed through west using sysbuild for multiple images with the
recover or erase options and prevent running those commands for
each image being flash, which would make the device unbootable.
Also defers reset whilst all images for the cores of these SoCs
are flashed.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 17:56:19 +01:00
Jamie McCrae 8b62a16b57 soc: nordic: Reformat soc.yml file
Reformats the soc.yml file to have uniform 2-space indentation

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 17:56:19 +01:00
Jamie McCrae a0267d2f48 west: runners: Add run once commands and deferred reset
This adds supports for flashing images with sysbuild where there
are multiple images per board to prevent using the same command per
image flash which might cause issues if they are not ran just once
per flash per unique board name. A deferred reset feature is also
introduced that prevents a board (or multiple) from being reset if
multiple images are to be flashed until the final one has been
flashed which prevents issues with e.g. security bits being enabled
that then prevent flashing further images.

These options can be set at a board level (in board.yml) or a SoC
level (in soc.yml), if both are present then the board configuration
will be used instead of the SoC, and regex can be used for matching
of partial names which allows for matching specific SoCs or CPU cores
regardless of the board being used

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 17:56:19 +01:00
Sylvio Alves 568e777b84 twister: update overflow section name regex
esp32 platforms can overflow its dram0_0_seg and dram0_1_seg.
So update current dram section to meet both cases.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-04-29 17:41:15 +01:00
Alberto Escolar Piedras ec5d127f1f ci: coverage: typo fix in platform list
Fix quemu => qemu

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-29 17:40:56 +01:00
Øyvind Rønningstad 4be7a4de65 qemu_malta_qemu_malta_be.yaml: Fix 'identifier' typo
qemu_malta//be -> qemu_malta/qemu_malta/be

This caused the board not to work with Twister.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-04-29 17:40:47 +01:00
Pieter De Gendt 79b8285c6b doc: releases: 3.5: Fix COFNIG typo
Fixing a typo for a `Kconfig` option.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-04-29 17:40:39 +01:00
Peter Mitsis a3c7152f92 kernel: Update thread cpu in z_get_next_switch_handle()
Updates z_get_next_switch_handle() to set the new thread's base.cpu
value as it is done in do_swap(). This helps to ensure that the
last CPU on which the thread executed remains current.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-29 17:40:28 +01:00
Yong Cong Sin 4363a787b1 posix: uname: increase version name length
to 70 to prevent overflowing the char array.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-04-29 17:40:16 +01:00
Lukasz Mrugala 83db378dc5 scripts: twister: Remove Handler atavisms
Removed following fields from relevant Handlers,
as they were unused in code:

* Handler's state
* Handler's generator
* BinaryHandler's call_west_flash
* QEMUHandler's results
* QEMUWinHandler's results

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-04-29 17:40:06 +01:00
François Baldassari 3f78ca9873 ARC: fault: Fix uninitialized memory access
Found via static analysis. In fault path when checking for stack
overflows, if CONFIG_MULTITHREADING is not set, `guard_end` is left
uninitialized and is subsequently used in a comparison.

The solution is to simply return `false` in this configuration as stack
guards are not configured in the first place.

Signed-off-by: François Baldassari <francois@memfault.com>
2024-04-29 17:39:57 +01:00
Nicolas Lebedenco 6837ca808b cmake: Revert breaking change to CMAKE_SYSTEM_NAME
This commit reverts a breaking change in CMAKE_SYSTEM_NAME introduced by
"Zephyr" back to "Generic") and removes the file
`cmake/modules/Platform/Zephyr`.

Both changes in the aforementioned PR were only introduced to ultimately
modify the value of the global CMake property TARGET_SUPPORTS_SHARED_LIBS
for the special case of building for Xtensa with LLEXT.

The modification of CMAKE_SYSTEM_NAME is considered a breaking change
because it has the potential to alter the build of any non-trivial project
that previously checked for the "Generic" system identifier as
corresponding to Zephyr - for example by doing
`if (CMAKE_SYSTEM_NAME STREQUAL "Generic")`. Such builds may now break in
many ways including silently when there is no `else()` clause with a
`message()` to alert the user that a whole configuration block had been
skipped.

In essence, that CMAKE_SYSTEM_NAME modification was only introduced in
order to have CMake to load `cmake/modules/Platform/Zephyr.cmake` which in
turn adjusted the value of TARGET_SUPPORTS_SHARED_LIBS.

But the use of a CMake platform file like this is ineffective for
non-trivial projects where one or more top level CMake `project()` calls
may happen before the first call to `find_package(Zephyr)` because in such
cases CMAKE_MODULE_PATH will not have been modified yet to contain the
path to <Zephyr_ROOT>/cmake/modules and thus no platform file will be
include by CMake.

This patch moves the conditional override of TARGET_SUPPORTS_SHARED_LIBS
needed by some archs (e.g. Xtensa) into the `kernel.cmake` module which
is known to be the first call to `project()` that enables any language and
thus the one that must come before any artifact target can be defined.

Note commit 64e7d85 added a Kconfig to specify the object type of llext
being built, so it's not tied to the arch anymore but to the
CONFIG_LLEXT_TYPE_ELF_SHAREDLIB option.

Signed-off-by: Nicolas Lebedenco <nicolas@lebedenco.net>
2024-04-29 16:17:39 +02:00
Jamie McCrae 0408eee229 doc: release: 3.7: Add socs folder note
Adds release notes about the addition of a socs folder for
applications to store Kconfig fragments and devicetree overlays

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

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 15:08:35 +01:00
Jamie McCrae da3007e559 tests: cmake: overlays: Add soc_folder_overlay test
Adds a testcase for the new ``socs`` folder, with overlays

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 15:08:35 +01:00
Jamie McCrae 1ed6d89d13 tests: cmake: overlays: Add soc_folder_kconfig test
Adds a testcase for the new ``socs`` folder using Kconfig fragments

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 15:08:35 +01:00
Jamie McCrae 6ed5ac7111 cmake: modules: configuration_files: Add support for soc overlays
Adds support for SoC overlay files which go in a ``socs`` folder
in application folders and functions similar to the ``boards``
folder, but works for SoCs instead of boards

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 15:08:35 +01:00
Jamie McCrae 6f58159a72 cmake: Add support for socs folder and Kconfig fragments
Adds support for a new ``socs`` folder that can be placed in
application folders and functions similar to the ``boards``
folder, but works for SoCs instead of boards

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 15:08:35 +01:00
Jamie McCrae 43c323a835 cmake: modules: extensions: Fix documentation for zephyr_build_string
Fixes a missed entry and a wrong named variable in the
documentation for this function

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 15:08:35 +01:00
Patryk Duda 144a08c58c cmake: modules: Introduce FindThreads module
Some third-party modules uses 'find_package(Threads REQUIRED)' to check
if threads implementation is supported.

The original implementation tries to find threads library using various
methods (e.g. checking if pthread library is present or compiling
example program to check if the implementation is provided by libc), but
it's not able to detect pthread implementation provided by Zephyr.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-04-29 15:59:42 +02:00
Jamie McCrae acd14f8af2 scripts: module: Fix sysbuild module listing
Fixes an issue with zephyr modules not being listed in sysbuild if
they did not have a Kconfig file set

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 14:57:22 +01:00