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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>