Update Zephyr fork of MCUboot to revision:
4eba8087fa606db801455f14d185255bc8c49467
Brings following Zephyr relevant fixes:
- 4eba8087 boot: zephyr: boards config of the stm32h573 disco kit
- 2dd7c655 boot: zephyr: boards config of the stm32h7rs target
boards
- cde66e17 boot: zephyr: defines FLASH device for external NOR
- 6a178d29 bootutil: Use flash base address for direct hash
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue where external sysbuild Kconfig path variables
were not provided and meant they could not be overwritten
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
When LTO is enabled, linker may relocate literal pools out of Thumb LDR
instruction's reach causing "offset out of range" errors while linking.
This commit adds `.ltorg` directive in the inline asm blocks where absolute
addresses are loaded using the `ldr` instructions, in order to ensure that
the literal pool containing the absolute addresses are placed near the
`ldr` instructions.
Note that the `.ltorg` directive is recognised by all toolchains supported
by Zephyr and no toolchain abstraction is provided for now.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
When building the docs for a release, the section of the getting started
that lets the user `west init` their workspace now has them check out
the version matchin the release.
Fixeszephyrproject-rtos/zephyr#92163
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The allocated_bytes were missing the allocation metadata. Because of that
the sum of free_bytes and allocated_bytes doesn't remain constant after
each allocation. This convention doesn't match glibc's behavior. This
commit changes the chunksz_to_bytes function to include the metadata in the
calculation. The analysis of the mallinfo2 function from glibc has been
done in #92392 Pull Request.
Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
The #91219 miss some entries when doing the clean-up. This removes
some of remaining SUBALIGN entries in the iterable sections. It do
not consider SECTION_PROLOGUE and zephyr_linker_section entries.
Fixes#92349
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
When peer monitor and retransmission timeout are zero, set them to the
default values. This ensures that the monitor timeout is always a valid
value to avoid the L2CAP BR timer work queue hang.
Signed-off-by: Make Shi <make.shi@nxp.com>
This commit updates the link to the source of the firmware of the DAPLink
on-board debug adapter.
Phytec migrates all repositories from the "PHYTEC-Messtechnik-GmbH" GitHub
organization to the "phytec" GitHub organization. The code in the relevant
branch remains unchanged and the branch has been pushed to the new
organization.
Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
In check_dns_query(), the assignment `ret = -ENOMEM` was never used since
the function returns false immediately afterward.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Avoids shadowing the outer 'ret' variable by reusing it instead of
redeclaring it inside a conditional block.
This improves code clarity.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The name used in CMakeLists for this test is "zero_latency_irqs" despite
testing the ramfunc feature instead. This might be a copy-paste mistake
as it was originally "arm_zero_latency_irqs", which is another test that
exists.
Change the project name in CMakeLists to match what the test truly is.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
HTTP 1.1 server has two ways of indicating the message body length -
either by providing the Content Length header, or by closing the
connection when the entire body has been transmitted.
The second method didn't work with Zephyr's HTTP client implementation,
as EOF on a socket was treated as an error condition. Therefore, if no
Content Length was provided by the server, such transfers would always
end up with ECONNRESET error.
In order to fix this, we need to notify the parser about the EOF on a
socket when connection is closed. It is the parser role to determine
whether the EOF was expected in current state (by marking end of message
flag) or not (by setting an error).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add references to new API, functions, devicetree bindings introduced
from introduction of the UVC class.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Cache CTRL1 into reg_ctrl1_active_val inside lis2dh_init_chip()
in the PM_DEVICE_ACTION_TURN_ON path. This prevents the first
runtime-PM RESUME from writing 0x00 to CTRL1 and disabling the sensor
when runtime-PM is enabled.
Fixes: #92196
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Previously, ZRESTRICT was used in aio.h without also including
zephyr/toolchain.h.
Tests may have compiled because the toolchain header was included by
some other means.
We should explicitly include it to ensure that ZRESTRICT is defined.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
`DEVICE_DT_GET()` guarantees that the `dev` pointer can never
be `NULL`, the check is therefore redundant, remove it.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
When a function pointer is `NULL`, it could be that the underlying
hardware doesn't support it, or it isn't implemented.
If a function isn't supported by the hardware, its driver should
return `-ENOTSUP`, the API layer should return `-ENOSYS` when a
function isn't implemented.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Missed in #91596 that more platforms are added in common part.
Excluded nrf9160dk/nrf9160 and nucleo_wba55cg from
configuration with BLE.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The second argument should unconditionally be the size of the output
memory area, not computationally derived from the input payload length.
The previous length validations would be incorrect when
`cmd_len == CONFIG_LORA_RYLRXX_CMD_BUF_SIZE`, as `snprintf` would be
told the output buffer was `CONFIG_LORA_RYLRXX_CMD_BUF_SIZE + 1` bytes
long.
Fixes#92619Fixes#92624
Signed-off-by: Jordan Yates <jordan@embeint.com>
Makes the choice CORTEX_M_SYSTICK_LPM dependent upon the
CORTEX_M_SYSTICK to prevent its default from showing up in
the .config of projects that do not use the CORTEX_M_SYSTICK
timer driver.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Remove duplicated check for 'ep->stream == NULL' to clean up conditionals
and avoid unnecessary repeated evaluations.
This cleans up the code and avoids unnecessary repeated condition
evaluation.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The clock get rate api can be slow in certain targets and thus slowing
each SPI transaction. Instead on startup fetch the clock rate and store
this in ram. Then each spi configure action is simply reading that
variable
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Update the process_dns function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Update the trigger_events function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Update the socket_service_thread function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
All Nordic boards were enabling CONFIG_HW_STACK_PROTECTION
unconditionally, which is usually not a problem except if the particular
application happens to want to disable the MPU (or equivalent hardware
for RISC-V). In that case, the following warning is shown:
warning: HW_STACK_PROTECTION (defined at arch/Kconfig) was assigned the
value 'y' but got the value 'n'.
Check these unsatisfied dependencies: ARCH_HAS_STACK_PROTECTION (=n).
In order to avoid this warning, conditionally enable the hardware stack
protection only when the architecture supports it.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update gdb arguments to enable linkserver
debugging when app does not reset after load.
This is useful for when the app is loading to
ram. In this case if gdb reset after loaded the
ram would be flushed when debugging and there would be
nothing no image in ram to debug.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Remove cmake code that updated the linkserver memory view, however
the values passed here are wrong and linkserver already includes
the correct space e.g location = 0x0 && size = 0x00080000
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Updated board.cmake to check for single
image builds to indicate rather an additional
reset is needed for cases such as sysbuild.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
This reverts commit 043bb58488.
Note that scripts/requirements-actions.txt might not be 100% the same
as what was pinned prior to the revert due to it being difficult to
restore previous versions while also accounting for the new dependencies
that were added in the meantime.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Virtio headers are moved to zephyr/drivers/ as they have no reason to be
top-level headers since virtio is a driver class.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix a bug in zbus_chan_rm_obs() where removing the first observer in a
channel's observer list would cause undefined behavior due to accessing
a member of a NULL pointer.
The issue occurred when prev_obs_nd was NULL (indicating the first node
in the list) and the code attempted to pass &prev_obs_nd->node to
sys_slist_remove(). This resulted in accessing the 'node' member of a
NULL pointer, which is undefined behavior even when taking its address.
The sys_slist_remove() function is designed to handle a NULL prev_node
parameter correctly for removing the first element in a list. The fix
ensures we pass NULL directly instead of attempting to compute the
address of a member within a NULL pointer.
This was detected by Undefined Behavior Sanitizer as "member access
within null pointer".
Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
Peripheral clocks are currently not being disabled for JTAG reset
condition, which causes driver init failures when debugging the SoC
with JTAG. Fix by disabling all clocks for this reset type.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Coverity reports a potential integer overflow in the accel_range
computation due to the use of a left shift on an int type.
CID 520269: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
Even though the register value is constrained to 0–3 by the BMA456 spec,
and no real overflow occurs, an explicit cast to int64_t prevents false
positives and aligns with safe coding practices.
Fixes: #90517
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
There was an unnecessary nested `if` in `ifx_cat1_counter_init` with the
same condition already checked in the outer block.
This results in dead and redundant code with no functional impact but
harms readability.
The inner `if (rslt != CY_RSLT_SUCCESS)` was removed to clean up the
function.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The function counter_rz_gtm_set_alarm was accessing alarm_cfg->flags and
alarm_cfg->ticks before verifying that alarm_cfg is non-NULL.
This could lead to undefined behavior or crashes if a NULL pointer is
passed.
The pointer check has been moved before any dereference to fix this bug.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
In coap_well_known_core_get(), move the null check for 'resource' before
applying pointer arithmetic ('resource + 1') to avoid undefined behavior
when 'resource == NULL'.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Socket dispatcher (and offloaded implementations in tests) register
fd as ZVFS_MODE_IFSOCK therefore they should register a close2(
function instead of close().
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
socketpair fd regsiters ZVFS_MODE_IFSOCK therefore it should register a
close2() function instead of close().
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case address mode in a packet is none, the address pointer within mhr
struct will not be set. Therefore, the pointer should not be used before
address mode is verified inside ieee802154_check_dst_addr().
This was reported by UBSAN:
subsys/net/l2/ieee802154ieee802154.c:296:41: runtime error: member
access within null pointer of type 'struct ieee802154_address_field'
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The iface test suite uses two different interface types with two
different context types and iid tests mixed up the two. It attempted
to create a mac address for Ethernet interface (which uses
struct eth_fake_context), however the net_iface_get_mac() function
only works with Dummy interface context (struct net_if_test). In
result the Ethernet interface context was corrupted (mac address
overwritten the promisc_mode flag).
Fix this by extracting mac generation code into a common function, and
use it in the Ethernet iface initialization phase instead of directly in
the test.
This was reported by UBSAN:
tests/net/iface/src/main.c:239:34: runtime error: load of value 11,
which is not a valid value for type '_Bool'
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>