Report the error state to the UpdateHub server before triggering a rollback
in autohandler mode. This prevents the server from redeploying the same
(failed) update after rollback, avoiding update loops. Also exposes a new
public syscall: updatehub_report_error(), allowing manual mode users to
report an error explicitly.
Signed-off-by: Adrien Maillard <adrien.maillard@edu.hefr.ch>
cbprintf_package_convert may invoke z_cbprintf_cpy with a null pointer
to buf and zero length to indicate a flush operation. This triggers
an error from the undefined behavior sanitizer due to memcpy being called
with a null src, which is undefined behavior according to the C standard.
This is avoided by exiting early in z_cbprintf_cpy when length is zero.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Update the RaspberryPi CSI camera connector nexus gpio in order to only
expose the list of GPIO pins in order to support both 15-pin and 22-pin
connectors as well as 15-pin to 22-pin conversion cables.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Refactor the `MIN_HEAP_FOREACH` macro to use a cleaner
for-loop style removing the need for a third `body` argument.
Update the sample application with the new macro changes.
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Change license owner to Prevas due to initially wrong owner due to company
mix-up during co-development.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Remember which DNS server was added by a source like DHCPv4 or v6
message. This will allow system to remove DNS servers that were added by
that source. Then when stopping for example DHCP, we can remove those
specific DNS servers and not leaving DNS servers hanging in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Change noinit region to be after bss so that it would not cause
alignment issue for the data region setup
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
The RX linker is using the name "data" for .data region start
which caused the application cannot use "data" for variable
naming globally.
This commit change the name to "__data_region_start" as expected
in the linker_defs.h file
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Updated documentation to clarify that while credential pairs should
generally share the same secure tag for subsystems supporting multiple
credentials per tag, some implementations may expect only one credential
per tag.
Signed-off-by: Maxwell Weru <mburumaxwell@gmail.com>
The CH32V003 has a 8 channel, 10 bit onboard ADC. Add an immediate
mode driver and the appropriate pinctrl bindings. Note that the
CH32V003 GPIO pins have both a floating input and an analogue input
mode, and the pinctrl is needed to put the pin in analogue mode.
Signed-off-by: Michael Hope <michaelh@juju.nz>
The WCH External Trigger and Interrupt controller (EXTI) supports
between 8 and 22 lines where each line can trigger an interrupt on
rising edge, falling edge, or both edges. Lines are assigned to a
group, and each group has a separate interrupt. On the CH32V003/6,
there is one group of 8 lines, while on the CH32V208 there are
multiple groups with between one and six lines per group.
In the same way as the STM32 and GD32, define an EXTI driver that
configures the peripheral and an internal interface that can configure
individual lines.
Signed-off-by: Michael Hope <michaelh@juju.nz>
Addition of selection APIs (set/get) in order to be able
to control the crop and compose of a video device.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
- Issue: There is a bus-fault while accessing empty userdata structure
pointer if application does not include any include service
userdata instance (which consist of UUID list of included service)
but service array has defined dummy entry for it assumed to be
overridden by app during initial flow.
- For example, the issue has happened in case of tmap-central sample
without "CONFIG_BT_OTS" support. there are some MCS attributes
dependent on OTS service because of that
"BT_GATT_INCLUDE_SERVICE(NULL)" entry is added as part of service
definition. The given entry does not have userdata handler defined
and is expecting to be overriden by the app if it will be included.
During "bt_mcs_init()" call, "mcs.attrs[i].user_data" is not
populated with any attr-instance pointer. This makes CPU to access
null-address during reading local-database include-service attribute
which was not provided by the app but the include-service entry was
added to the db.
- Fix: Adding condition to check if user-data has null address, and
returning back to avoid any hard-faults.
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
These were wrong and incomplete. Rebuild based on section 7.2.11 of
the CH32V00XRM and added the CH32V007-only remaps.
Signed-off-by: Michael Hope <michaelh@juju.nz>
The rtc device driver APIs rtc_update_set_callback and
rtc_alarm_set_callback are not allowed from usermode threads, thus
they should not be marked as syscalls. The APIs where never
implemented as sycalls, there is no z_vrfy wrapper for them, so
only change needed is to not mark them as syscalls with the
special __syscall "attribute" and z_impl wrapper.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
- Added a CPU load callback with threshold
- Changed cpu_load to use k_timer instead of k_work
Signed-off-by: Kristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
Avoid undefined behavior caused by casting floating-point values outside
the int32_t range. The updated implementation explicitly validates input
bounds before performing conversions, ensuring consistent behavior across
platforms.
Added test cases to cover edge conditions near float rounding limits
and INT32 range boundaries.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
The macro SHELL_SUBCMD_SET_END was defined as {NULL}, which triggers a
-Wmissing-field-initializers warning due to the missing 'help' field in
the shell_cmd struct. Replacing {NULL} with {0} silences the warning.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add clock bindings for UART/USART (1-9) peripherals in the
`stm32mp2_clock.h`.
Add UART/USART clocks rate reading to the STM32MP2 clock driver.
Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
There are multi sai instance shared on clock source on
cm33_cpu0, clock driver don't need index parameter, so
modify clock driver to adapt clock driver.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
A mid-air collision between two different changes to sys_clock.h
resulted in a test failure.
```shell
tests/kernel/timer/timer_api/src/main.c:763:
timer_api_test_timeout_abs: Z_IS_TIMEOUT_RELATIVE(t2) is false
```
Re-apply the change that was added in
9075d53355
to keep tests running smoothly.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Merge sys_clock.h into sys/clock.h and preserve the original header.
This allows us to use a slightly more intuitive name for the
sys/clock.h header, while reducing churn throughout the codebase.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Use the newly added sys_clock API in lib/os for
* clock_gettime()
* clock_settime()
* clock_nanosleep() and nanosleep()
* gettimeofday()
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Additional entries for the sys_clock API, comprised of:
* sys_clock_gettime()
* sys_clock_settime()
* sys_clock_nanosleep()
along with the constants
* SYS_CLOCK_REALTIME
* SYS_CLOCK_MONOTONIC
* SYS_TIMER_ABSTIME
The primary motivation for this API is so that libc and other
libraries have a familiar-enough API to reach to when POSIX
is not available, since POSIX is optional in Zephyr.
By adding this API to lib/os, we also eliminate dependency cycles
between libc and posix, as lib/os is a mutual dependency.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add support for gating/ungating IMX8QM/IMX8QXP's ESAI clocks and the
AUD_PLL_DIV_CLK0 clock used as source for ESAI's EXTAL.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>