The PDL has several ASSERT levels which can greatly increase footprint
when used. For example our clock drivers assert using float formatting
which means the large addition of float format functionality when
enabled.
Determine the PDL ASSERT level and enablement based on CONFIG_ASSERT.
Flash usage for hello_world shows about a 20% improvement.
hello_world on PSOC Edge 84 M33 with this and ASSERT=n ~37K
hello_world on PSOC Edge 84 M33 before this change and ASSERT=n ~44K
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Move the futex value validation inside the spinlock critical section
in z_impl_k_futex_wait().
Previously, a time-of-check to time-of-use (TOCTOU) race condition
existed because the futex value was evaluated before acquiring
futex_data->lock. This created a vulnerability window:
Thread A (waiter) Thread B (waker)
───────────────────────── ────────────────────────
atomic_get() == expected
atomic_set(new_val)
k_futex_wake() -> no waiters yet
k_spin_lock()
z_pend_curr()
[waits forever, wake lost]
If the waker updates the futex value and signals between the waiter's
value check and lock acquisition, the wake signal is lost. This causes
the waiting thread to block indefinitely.
Holding the lock during the evaluation ensures the value check and the
subsequent wait-queue operations are atomic relative to concurrent
wakeups. A concurrent wake must now either complete before the waiter
acquires the lock (waiter sees the updated value and returns -EAGAIN)
or arrive after (waiter is safely in the wait queue and gets woken).
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Add support for configuring the High-Speed Low-Voltage (HSLV) mode
in the GPIO port manager based on the DT configuration. This
enhancement allows for improved performance at lower voltages.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use the new and appropriate "st,stm32h5-pinctrl" compatible for the pinctrl
in DTSI for STM32H5 series.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add a new binding for the pinctrl controller of STM32H5 series.
The specificity of this series is that the "High-Speed Low-Voltage" (HSLV)
feature is configured per pin. This feature allows to increase the maximum
speed of the IO pins at low voltage.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add a Zephyr-side module directory for hal_espressif with
Kconfig symbols that control HAL log output at compile time:
- ESP_HAL_LOG_LEVEL: gates ESP_LOGx macros (printk backend)
- ESP_HAL_EARLY_LOG_LEVEL: gates ESP_EARLY_LOGx and
ESP_DRAM_LOGx macros (esp_rom_printf backend)
The esp_log.h header itself lives in the HAL repository,
keeping all logging macro definitions in one place.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add validation of the available and supported contexts durings
discovery, as well as testing that both the server and client
correctly handles changes to the contexts during a connection.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The supported contexts were read but never provided to the
upper layers. Additionally if the supported contexts are
notifible we also subscribe to it.
This commit also fixed some other various things related
to the change to supported contexts.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The option needs a dependency to THREAD_MONITOR, fix a build breakage
with, for example:
west build -p -b nrf52dk/nrf52832 samples/subsys/shell/shell_module -- \
-DCONFIG_EXTRA_EXCEPTION_INFO=y -DCONFIG_THREAD_MONITOR=n
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
With 6GHz band, channel numbers are not unique anymore, channel 1 can
mean both 2.4GHz or 6GHz, so, take the band info as the argument from
the user.
Keep auto-detection for backwards compatibility sake.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
Use a different API call to complete the function rather than
relying on USB .init() to terminate the configuration.
This allows to set the endpoint descriptors before usbd_init()
is called.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Add a test for the FTL disk driver using the spi_nand flash driver. This
test utilizes the frdm_mcxn947 board with the MikroE Flash 5 Click shield.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add a test for the FTL disk driver using the spi_nand flash driver. This
test utilizes the frdm_mcxn947 board with the MikroE Flash 5 Click shield.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add support for bad block management in SPI NAND flash devices.
This includes functions to check if a block is bad and to mark
a block as bad. The bad block marker is stored in the OOB area of
the first page of each block.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add support for the LOG_OUTPUT_FLAG_THREAD flag in the ADSP mtrace
backend's format_flags() function. When CONFIG_LOG_THREAD_ID_PREFIX is
enabled, this allows log messages to display the thread name or ID as a
prefix.
This enables displaying information about running threads and their
priorities, which can be useful debug information for analyzing system
behavior and thread execution patterns.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Add support for the LOG_OUTPUT_FLAG_CORE flag in the ADSP mtrace
backend's format_flags() function. When CONFIG_LOG_CORE_ID_PREFIX is
enabled, this allows log messages to display the originating CPU core ID
as a prefix.
This is particularly useful in multicore ADSP systems where deferred
logging may format messages on a different core than where they were
created. The core ID prefix helps identify which core generated each log
message.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Update all log_output_process() function calls in the nRF ETR debug
driver to include the new core_id parameter that was added to support
the CONFIG_LOG_CORE_ID_PREFIX feature.
The core_id parameter is set to 0 for all call sites in this driver
since core ID information is not available from the trace/log packets
being processed. This maintains backward compatibility while adapting to
the updated log_output_process() function signature.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Update all log_output_process() function calls to include the new
core_id parameter that was added to support CONFIG_LOG_CORE_ID_PREFIX
feature.
The core_id parameter is set to 0 for these call sites since they don't
have core ID information available. This maintains backward
compatibility while adapting to the updated function signature.
Affected files:
- tests/subsys/logging/log_output/src/log_output_test.c
- tests/subsys/logging/log_output_net/src/log_output_test.c
- tests/subsys/logging/log_timestamp/src/log_timestamp_test.c
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Add support for displaying the CPU core ID that generated each log
message. This is particularly useful for debugging multicore embedded
systems where identifying the originating core is critical.
Key implementation details:
- Add CONFIG_LOG_CORE_ID_PREFIX Kconfig option (depends on SMP or
MP_MAX_NUM_CPUS > 1)
- Capture arch_proc_id() at log message creation time to ensure the
correct core ID is recorded, even when log processing happens on a
different core
- Add core_id field to log_msg_hdr structure
- Add LOG_OUTPUT_FLAG_CORE flag (BIT 9)
- Display format: "[core %d]" prefix in log output
- Add log_msg_get_core_id() accessor function
The core ID is captured when the log message is created (not when
formatted), which is essential for deferred logging where the processing
thread may run on a different core than the one that generated the log.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Introduce DT_FOREACH_REG and DT_INST_FOREACH_REG macros to enable
iteration over reg entries in devicetree nodes by invoking a user-
supplied macro per entry. Add support for macros accepting a
separator and variadic arguments with the new DT_FOREACH_REG_SEP,
DT_FOREACH_REG_VARGS, and DT_FOREACH_REG_SEP_VARGS macros, as well
as their DT_INST_ variants.
The DT_FOREACH_REG macro mirrors the behavior of the ranges property.
Update the devicetree macro generation logic in gen_defines.py to
emit the new macro variants. Document the additions by expanding the
Augmented Backus-Naur Form grammar in macros.bnf. Add detailed
comments with usage examples and parameter details for all new macros.
Expand test coverage with new overlay nodes and dedicated tests to
verify macro correctness and behavior, across various node scenarios
including multi-register, single-register, and nodes lacking reg
properties.
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
Add Kconfig option to accept unaligned addresses and/or lengths for
flash_write for stm32 devices. Use with caution after understanding
target platform flash implementation details. Op may fault if used
without forethought
Signed-off-by: Sudarshan Jagannathan <sudarshan.jagannathan@st.com>
Add drivers for Advanced Interrupt Controller (AIC).
Update Kconfig.mchp and CMakeList.txt accordingly.
Signed-off-by: Tony Han <tony.han@microchip.com>
This adds support for the SR100-RDK board.
Signed-off-by: Łukasz Kędziora <lkedziora@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Signed-off-by: Andreas Weissel <andreas.weissel@synaptics.com>
This adds the soc files for the Synaptics SR100 SoC.
Signed-off-by: Łukasz Kędziora <lkedziora@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Andreas Weissel <andreas.weissel@synaptics.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This adds the pinctrl driver for Synaptics SR100-series SoCs.
Signed-off-by: Łukasz Kędziora <lkedziora@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Andreas Weissel <andreas.weissel@synaptics.com>
This adds the clock control driver for Synaptics SR100-series SoCs.
Signed-off-by: Łukasz Kędziora <lkedziora@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Andreas Weissel <andreas.weissel@synaptics.com>
Take into account the maximum frequency indicated in host capabilities
when changing the bus frequency, to avoid failing calls to sdhc_set_io()
when an MMC device is capable of working with higher frequencies than
the host can handle.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Update the tests to verify that all the local API functions
work as expected for both TBS (index 0) and GTBS.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If we get a remote request to originate a call via a control
point write, we lookup a TBS instance based on the URI.
However for the local API function bt_tbs_originate we did
not, so the same operation, if the target bearer was GTBS,
had different behavior depending on whether it was locally or
remotely invoked.
This commit makes the two behave the same.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Handling of Errata 16 was failing if VPR triggered event when interrupt
on the application core are disabled. In that case an event is lost and
IPC communication fails. Improved workaround by enabling interrupts
during the initialization and store the information if interrupt got
triggered while event is disabled. Pending event is triggered after
enabling the event.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>