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>
The ILM_MAX_SIZE of different chip variants can be declared in the
Kconfig of the respective variant.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Adding required flag to the current-speed as without this driver
does not compile.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The default value of IEEE802154_NRF5_DELAY_TRX_ACC Kconfig option is
based on a symbol that is undefined for nRF54H20. It evaluates as empty,
which leads to compilation errors with very cryptic logs.
This commit assures that a sane value for IEEE802154_NRF5_DELAY_TRX_ACC
is selected at all times, avoiding the compilation errors.
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
This commit adds an ieee802154 node to the list of nRF54H20 application
core's peripherals. While it does not translate directly into a physical
RADIO peripheral, it represents the capability to use the ieee802154
radio indirectly through cpurad.
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>