Commit Graph

95317 Commits

Author SHA1 Message Date
Abderrahmane Jarmouni fdb3457058 tests: drivers: uart: async_api: support DCache with nocache memory
Add support for running tests with DCache enabled & put DMA buffers
in a nocache memory region to avoid coherency issues.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 16:09:20 -04:00
Abderrahmane Jarmouni e783aafdd0 drivers: uart_stm32: add DCache support in async DMA mode
Adapt the driver to verify if DMA buffers are located in noncacheable
memory when DCache is activated, in order to avoid cache coherency issues.
This is required until manual cache coherency management is implemented.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 16:09:20 -04:00
Gerard Marull-Paretas 0630c5cfb5 samples: sysbuild: add hello world for multiple board targets
Add a new "hello world" sample that can be built for multiple board
targets. This sample can be used to see if Zephyr boots successfully
with _minimal_ configuration on SoCs with multiple cores, or boards with
multiple SoCs.

The following configurations are provided for now:

- nRF5340 DK: cpuapp+cpunet
- nRF54H20 DK: cpuapp+cpurad, cpuapp+cpuppr, cpuapp+cpuppr(xip)

Note that because of a quoting bug somewhere in the build system,
SB_CONFIG_REMOTE_BOARD is specified in .conf files (see the sysbuild/
directory). This should be fixed in the near future.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-13 16:09:01 -04:00
Gerard Marull-Paretas 8120bd7519 samples: move with_mcuboot sample to samples/sysbuild
This creates a new category of samples that demonstrate certain features
of sysbuild. "application development" was a very generic name.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-13 16:09:01 -04:00
Jason Murphy 467af2d6b8 boards: arm: fix gpio-led flags on adi_eval_adin2111ebz
These LEDs are active-LOW instead of active-HIGH.

Signed-off-by: Jason Murphy <jason.murphy@analog.com>
2024-05-13 16:07:28 -04:00
Jason Murphy 40a8ed84aa boards: arm: fix gpio-led flags on adi_eval_adin1110ebz
These LEDs are active-LOW instead of active-HIGH.

Signed-off-by: Jason Murphy <jason.murphy@analog.com>
2024-05-13 16:07:28 -04:00
Najumon B.A 7f16b7fb94 tests: arch: x86 : update stack variable name in nmi test case
update stack variable name in nmi test case for BSP

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2024-05-13 16:07:11 -04:00
Najumon B.A 2803dcd564 arch: x86: remove limitation of number of cpu support in smp
Remove the limitation of number of cpu support in x86 arch.
Also add support for retrieve cpu informations such as for
hybird cores.

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2024-05-13 16:07:11 -04:00
Fredrik Gihl 2d31d45429 drivers: sensors: Add support for ds18s20
Added support for the older ds18s20 inside the (newer) ds18b20.

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-05-13 16:06:35 -04:00
Corey Wharton bf114c6b1a logging: add API to trigger immediate processing of logs
There are use cases where it's beneficial to trigger the log
thread to process log messages as soon as able instead of waiting
for the processing timer or threshold triggers. An example would be
to flush the log buffer before entering the idle thread after
forcing a system power state.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-05-13 16:06:11 -04:00
Corey Wharton 2b9c552050 logging: fix logging.async test
Test has code to test conditions where CONFIG_LOG_PROCESS_THREAD=y
but this option was not enabled in any of the tests. This code was
using removed APIs and did not build anymore. This change enables
the log thread for the logging.async and fixes the tests.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-05-13 16:06:11 -04:00
Hess Nathan 958a4505bd coding guidelines: comply with MISRA Rule 12.1.
-added parentheses verifying lack of ambiguities

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-13 16:05:53 -04:00
Grzegorz Swiderski 24ce3f4182 drivers: serial: nrfx: Update Kconfig dependencies for RX cache
Two Kconfig symbols were tied to a board-specific DT nodelabel - namely
the `NRFX_UARTE_CONFIG_RX_CACHE_ENABLED` and `UART_<n>_RX_CACHE_SIZE`
were tied to `shared_ram3x_region` - but this is not necessary.

That DT node is where the UARTE driver RX/TX cache buffers are placed
in the default nRF54H20 DK memory map, but on another board, they could
be located somewhere else.

The exact memory sub-regions used for this purpose are indicated using
the `memory-regions` property on each UARTE instance, which should be
generic enough already, so let's use that instead.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 16:05:39 -04:00
Jordan Yates af515ef87b logging: log_cache: ensure cache contains an entry
Return an error if the provided cache configuration is not large enough
to hold a single entry. An empty `active` and `idle` list causes NULL
dereferences in `log_cache_get`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 16:05:18 -04:00
Dmitrii Golovanov 2005deddb4 scripts: size_report: Fix tree build for symbol copies
Fix the memory footprint tree build for symbols with copies,
e.g. static inline functions which are local per each compilation
unit. Copies have the same path and symbol name, but different
memory blocks associated, so they have to have separate nodes.
Before the fix, these copies were merged into one node, with
summary size and memory address of one of the symbols.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-13 16:04:59 -04:00
Dmitrii Golovanov b438a74bd0 scripts: size_report: Report section name for symbols
Report section name for symbols: both at json and text reports.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-13 16:04:59 -04:00
Dmitrii Golovanov 8e6a921104 scripts: size_report: Don't set non-terminal node address
Don't set 'address' property for non-terminal nodes which are
also shown in JSON footprint reports, thus to avoid confusion
that a file or directory node has a continuous memory area allocated
at some address and with the total size of all its associated child
nodes which are likely scattered over different memory sections.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-13 16:04:59 -04:00
Dmitrii Golovanov 272731169c scripts: size_report: Optimize ELF headers reading
Read ELF headers only once for the size_report scirpt called
for 'all' memory areas, consequently it executes 30-50% faster.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-13 16:04:59 -04:00
Dmitrii Golovanov 55ebc691cd scripts: size_report: Fix pylint warning on unused import
Remove unused import to resolve pylint warning.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-13 16:04:59 -04:00
Dmitrii Golovanov 6c5eaacbb7 scripts: size_report: Fix underflow on a section end address
Fix integer underflow bug on a section end address calculation
causing incorrect address range for zero length sections and
potential mistakes on symbol to memory area match.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-13 16:04:59 -04:00
Nicolas Pitre e9a47d932c kernel: mmu: shrink and align struct z_page_frame
The struct z_page_frame is marked __packed to avoid extra padding as
such padding may represent significant memory waste when lots of page
frames are used. However this is a bad strategy.

The code contained this somewhat dubious comment and code in
free_page_frame_list_put():

	/* The structure is packed, which ensures that this is true */
	void *node = pf;
	sys_slist_append(&free_page_frame_list, node);

This is bad for many reasons:

- type checking is completely bypassed;

- if the sys_snode_t node member is no longer located at the front of
  struct z_page_frame then the code will still compile and possibly run
  but be broken with memory corruption as a likely outcome;

- the sys_slist_append() code is completely unaware of the packed
  attribute which breaks architectures with alignment restrictions.

Let's improve code efficiency as well as memory usage by removing the
packed attribute and manually packing the flags in the unused virtual
address bits. This way the page frame array remains naturally aligned,
data access becomes optimal and the actual array size gets even smaller.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-13 16:04:40 -04:00
Nicolas Pitre 57305971d1 kernel: mmu: abstract access to page frame flags and address
Introduce z_page_frame_set() and z_page_frame_clear() to manipulate
flags. Obtain the virtual address using the existing
z_page_frame_to_virt(). This will make changes to the page frame
structure easier.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-13 16:04:40 -04:00
Carles Cufi cbf5ab49e6 doc: migration: 3.7: Add missing links to GitHub Pull Requests
To provide further context for users.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-05-13 16:04:11 -04:00
Carles Cufi 54a83e2c17 doc: releases: Enforce linking to Pull Requests in migration guide
In order to provide additional context and information to Zephyr users,
ensure that each entry in the migration guide contains a link to the
GitHub Pull Request that introduced the corresponding change.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-05-13 16:04:11 -04:00
Fin Maaß 9bd0170aad net: http: client: mark as unstable
As the http client API is currently used by two applications
(websocket and hawkbit), it should be marked as unstable, according
to the docs:
https://docs.zephyrproject.org/latest/develop/api/api_lifecycle.html

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-13 16:02:55 -04:00
Balaji Srinivasan d9b3ffa5ea drivers: regulator: npm6001: Fix compiler warning
This patch fixes a compiler warning about the val being used
uninitialized. The previously present if check did not seem to satisfy
compiler. Hence the val is now explictly initialized.

Signed-off-by: Balaji Srinivasan <balaji.srinivasan@nordicsemi.no>
2024-05-13 09:54:48 -05:00
Mateusz Michalek a859191413 drivers: flash: RRAMC regions
Adding definition of regions granularity to Kconfig.

Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
2024-05-13 09:53:05 -05:00
Robert Lubos f63f508c21 tests: net: sockets: tls: Add missing teardown delays
A few tests involving TCP were missing TCP teardown delay. Adding these
improves tests stability when testing in a loop for longer periods (i.
e. with CONFIG_ZTEST_SHUFFLE enabled).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-13 09:52:29 -05:00
Marek Pieta b8fedfb6c1 bluetooth: host: conn: Fix assertion failure in wait_for_tx_work
Calling bt_disable in system workqueue context while BLE connected may
lead to calling wait_for_tx_work in this context. Fix check in code to
avoid assertion failure.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2024-05-13 09:51:59 -05:00
Henrik Brix Andersen 423f18c4dd samples: modules: canopennode: make sample configurations depend on nvs
Make two of the CANopenNode sample configurations depend on "nvs" instead
of trying to establish a local rule for which boards have the needed
functionality.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-13 09:50:37 -05:00
IBEN EL HADJ MESSAOUD Marwa 23a03b7a0a drivers: counter: ll_stm32_timer: G4X changes
Use "const LL_TIM_OC_GetCompareCHx" & "const LL_TIM_IsEnabledIT_CCx" with
STM32G4X series, following changes in stm32cube:stm32g4xx:drivers:
include:stm32g4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa 99fd91bf1c drivers: pwm: pwm_stm32: G4X changes
Use "const LL_TIM_IC_GetCaptureCHx" & "const LL_TIM_IsActiveFlag_CCx"
with STM32G4X series, following changes in stm32cube:stm32g4xx:drivers:
include:stm32g4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa ccd1019f80 drivers: dma: G0X changes
Use "const LL_DMA_IsActiveFlag_HTx", "const LL_DMA_IsActiveFlag_TEx",
"const LL_DMA_IsActiveFlag_TCx" and "const LL_DMA_IsActiveFlag_GIx" with
STM32G0X series, following changes in stm32cube:stm32g0xx:drivers:
include:stm32g0xx_ll_dma.h

Use "const LL_DMAMUX_IsActiveFlag_SOx","const LL_DMAMUX_IsActiveFlag_RGOx"
"const LL_DMAMUX_ClearFlag_SOx" and "const LL_DMAMUX_ClearFlag_RGOx" with
STM32G0X series, following changes in stm32cube:stm32g0xx:drivers:
include:stm32g0xx_ll_dmamux.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa 1f16e9c44c drivers: counter: ll_stm32_timer: F4X changes
Use "const LL_TIM_OC_GetCompareCHx" & "const LL_TIM_IsEnabledIT_CCx" with
STM32F4X series, following changes in stm32cube:stm32f4xx:drivers:
include:stm32f4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa 820cf4d639 drivers: pwm: pwm_stm32: F4X changes
Use "const LL_TIM_IC_GetCaptureCHx" & "const LL_TIM_IsActiveFlag_CCx"
with STM32F4X series, following changes in stm32cube:stm32f4xx:drivers:
include:stm32f4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa c0869be56f west.yaml: hal_stm32: STM32Cube packages update
Update STM32Cube packages:

update stm32u5 to cube version V1.5.0
update stm32wb to cube version V1.19.0
update stm32f4 to cube version V1.28.0
update stm32g0 to cube version V1.6.2
update stm32h5 to cube version V1.2.0
update stm32l5 to cube version V1.5.1
update stm32g4 to cube version V1.5.2
update stm32h7 to cube version V1.11.2

Update of lib/stm32/stm32wb package to version V1.19.0

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
Daniel Apperloo 9fc26804fb linker: decouple KERNEL_WHOLE_ARCHIVE from LLEXT
Dynamic code execution applications not using LLEXT for "extension"
loading are subject to the same linker optimization symbol resolution
issue described in commit 321e395 (in summary, libkernel.a syscalls
not used directly by the application result in weak symbol resolution
of their z_mrsh_ wrapper).

To support usecases where an application is using alternative methods
to load and execute code calling syscalls (likely from userspace) or
is using a mechanism where the linker may not be aware, the configuration
option has been decoupled from CONFIG_LLEXT (who is now a selector) to
KERNEL_WHOLE_ARCHIVE.

Signed-off-by: Daniel Apperloo <daniel.apperloo@intel.com>
2024-05-13 14:23:38 +02:00
Pieter De Gendt 294939a31e cmake: Set C compile features early for modules
If modules require C compiler features, these need to be set before
calling add_subdirectory.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-13 14:23:20 +02:00
Noah Pendleton 265da0df86 buildsystem: Add an option to compress debug sections
Compressing debug sections can reduce the output
ELF file size substantially.

Signed-off-by: Noah Pendleton <noah.pendleton@gmail.com>
2024-05-13 14:23:12 +02:00
Arkadiusz Cholewinski 60aeb4e6bc CI: Fix coverage reporting
The fix applies to parse_testplan function.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-05-13 14:23:00 +02:00
Marcin Niestroj 3111261940 drivers: nsos: fcntl: prefer Zephyr-specific macros over libc
Definitions of fcntl flags are different between native libc and Zephyr. In
order to correctly map those values to the host, include Zephyr's fcntl.h
header, instead of the one bundled with libc.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-13 14:22:46 +02:00
Jordan Yates 557418ace6 tests: flash_simulator: reboot: added
Add a test for the flash simulator preserving memory across a
`sys_reboot` through the use of memory regions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:37 +02:00
Jordan Yates 4bdc61132c tests: flash_simulator: move to subfolder
Move the implementation test to a subfolder so an additional test can be
added.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:37 +02:00
Jordan Yates 2bb2dd6e82 tests: flash_simulator: fix devicetree indentation
Fix the mix of spaces and tabs in the `nucleo_f411re.overlay` file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:37 +02:00
Jiafei Pan 153255f15b board: mimx93_evk_a55: disable gpio expander by default
This commit is to fix some GPIO test case build issue:
https://github.com/zephyrproject-rtos/zephyr/issues/72619

In fact, the issue is introduce by expander GPIO PR:
https://github.com/zephyrproject-rtos/zephyr/pull/69330
It is used to add GPIO expander support,  in this PR, dts node layout is:
lpi2c {
	MFD driver {
		gpio driver {
		}
	}
}
The initial idea is to disable all these node by default in order to keep
a minimal default image, but expander GPIO PR only disabled lpi2c and MFD
driver node, but enabled gpio driver node, so gpio driver will report
building error as it depends on expander and i2c which are disabled, so
this fix is to disable gpio node.  If we want to use expander gpio, we
need to enable i2c, expander and gpio nodes simultaneously.

Some GPIO test cases have been enabled on i.mx93 EVK board by enabling
onchip GPIO controller in the overlay, for example:
tests/drivers/gpio/gpio_basic_api/boards/imx93_evk_mimx9352_a55.overlay

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-05-13 14:22:30 +02:00
Jordan Yates 4c4f0bce58 manifest: update quicklogic HAL
Update quicklogic HAL to fix compilation errors when C++ support is
enabled.

Fixes #72604.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:21 +02:00
Johann Fischer b501278237 drivers: udc_dwc2: handle interrupt IEPINT before the RXFLVL
During a control read transfer host is able to start status stage as
soon as it receives last data packet. The time between last data packet
and status stage can be approximately 1 us at High-Speed and 8 us at
Full-Speed (exact timing depends on host but it is mostly constrained by
bus turnaround time).

With sufficient interrupt latency it is therefore possible that both
IEPINT (raised at end of Data Stage) and RXFLVL (raised at Status Stage)
would be set when dwc2 interrupt handler reads GINTSTS register. When
device is operating at High-Speed, the latency introduced by UART logger
backend is enough to trigger this condition. If the RXFLVL is handled
before IEPINT the stack will trigger "Cannot determine the next stage"
error.

Handle IEPINT before RXFLVL to make the handler immune to increased
interrupt latencies.

Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-13 11:46:39 +01:00
Piotr Dymacz 36d8583589 boards: st: nucleo_wba55cg: add 'zephyr,bt-c2h-uart'
Include 'zephyr,bt-c2h-uart' in 'chosen' node to make it possible to use
HCI raw mode over UART. This was tested on real board with 'hci_uart'
sample, with Linux machine as a host (kernel 6.8, BlueZ 5.75).

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2024-05-13 11:39:24 +02:00
Dmitrii Golovanov 4d85967e09 twister: Set default coverage platform only when needed
Set options.coverage_platform only when running coverage.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-13 11:39:16 +02:00
Tim Lin d371a89c3f ITE: soc: Add the variant of it82002bw
Add the variant of it82002bw

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-05-13 11:39:10 +02:00