Boot time initialization functions and data used there must be
available at boot. With demand paging, these may not exist in
memory when they are being used, resulting in page faults.
So pin these functions and data in linker sections to make
sure they are in memory at boot time.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Allowed toolchains was not set in 'board' metadata causing those to not
build and get filtered.
Fixes#83792
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Rename the Infineon XMC4xxx CAN node devicetree property clock_div8 to
clock-div8 (prefering hyphens over underscores to separate devicetree
property names).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Enables the fractional-N (FRACN) setting for PLL1 in the STM32H5XX
clock driver.
This feature allows achieving a system clock frequency of 250 MHz from
an 8 MHz `clk_hse`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Exit the init earlier when XSPI is in memory map mode. Avoid
unnecessary checks and prevent pin reconfiguration that might
cause line spikes. Clock check beforehand is preserved.
Remove '\n' from the LOG_DBG string.
Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
Exit the init earlier when OSPI is in memory map mode. Avoid
unnecessary checks and prevent pin reconfiguration that might
cause line spikes. Clock check beforehand is preserved.
Remove '\n' from the LOG_DBG string.
Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
We add a serial UART driver for Microchip MEC5 HAL based chips.
The driver supports polling, interrupts, and runtime configuration
features. Power management will be implemented in a future PR.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Includes a RTC attribute as counter value to demonstrate
data being kept in memory after deep sleep reset.
This is only valid when MCUboot is enabled.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This PR includes changes in all Espressif's SoCs to enable
keeping data in RTC memory after deep-sleep.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This macro is defined in a few places which leads to macro redefinition
error e.g. when compiling prometheus network sample for NPCX boards.
Provide one definition of IS_BIT_SET() in util_macro.h to fix the
problem.
Signed-off-by: Patryk Duda <patrykd@google.com>
Check whether the length of buf is consistent with the valid data
received for op code BT_BAP_BASS_OP_ADD_SRC and BT_BAP_BASS_OP_MOD_SRC.
If the length of buf is inconsistent with the valid data received, the
response is error code BT_ATT_ERR_WRITE_REQ_REJECTED instead of other
errors.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
All immediates in RISC-V are encoded as two's complement. This commit
adds a test for relocating jumps that utilize the full range of the
immediate, in both positive and negative direction.
To this end, the test uses the compressed b-type (CB) instruction to
branch to its maximum negative (-256) and maximum positive (+254)
targets.
In case of test failure, expect relocating the corresponding llext to
fail.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
The RISC-V architecture-specific relocations need to check whether
each required relocation can fit into the modified instruction's
immediate. All immediates in RISC-V are encoded as two's complement.
The current truncation check has an off-by-one error for checking
the maximum negative distance, as two's complement encoding can
represent a negative value that is the maximum positive value plus
one, causing LLEXT to refuse loading valid code.
This commit adds an additional condition to the check that fixes
the aforementioned issue.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
Move the instance pointer, which is a constant value, into a dedicated
config structure. At the same time, remove the type casting macros as
this pattern has been removed from the tree for some years now.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The STM32 IWDG is a single channel watchdog, and therefore should be
returning `-ENOMEM` when a user attempt to install additional timeouts,
instead of overwriting previous values.
Signed-off-by: Jordan Yates <jordan@embeint.com>
the following implementations are added:
- set cyclic variable to handle circular/normal mode :
enable dest/source_reload_en variable to set CIRC bit to 1 for RX or TX.
- DMA_STATUS_COMPLETE(0), DMA_STATUS_BLOCK(1) macros to handle half
and full irq
- add ASYNC_UART_STATUS_TIMEOUT(3) macro to work with default mode
- add status input in uart_stm32_dma_rx_flush function to handle
async events depending on the mode we are in.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
co-authored-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
This macro will help us to enable the 5th bit CIRC on the DMA_CCRx
register for all stm32 series having this configuration.
Thus the DMA will be able to handle the circular buffers.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
co-authored-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
The LLEXT EDK test works by packaging an EDK and then testing its
functionality to build the extension in an external CMake build step.
That CMakelists.txt file currently references the required tools using
the ZEPHYR_SDK_INSTALL_DIR environment variable, which must be manually
set by the user.
This change modifies the test to read the newly added 'build_info.yml'
file, generated by Zephyr during the first build step. This allows to
set the ZEPHYR_SDK_INSTALL_DIR environment variable automatically based
on the (possibly auto-discovered) SDK path.
A few minor compliance cleanups are also included.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Allows having CMake variables inside of this Kconfig to e.g. use a
value that can specify a board directory or path relative to a
CMake file location variable
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
nrfx_config is setting NRFX_SPIM_EXTENDED_ENABLED based on presence of
a DT property. However, there are test cases when it is expected that
extended SPIM features will be disabled on a target that supports
extended features. Allow that by not setting the value if it is already
defined.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Repeated references to _current won't produce a different result as the
executing thread instance is always the same. Use the const attribute to
let the compiler know it may reuse a previously obtained value. This offset
the penalty for moving z_smp_current_get() out of line and provides yet
more binary size reduction.
This change is isolated in its own commit to ease bisecting in case some
unexpected misbehavior is eventually observed.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Define the generic _current directly and get rid of the generic
arch_current_get().
The SMP default implementation is now known as z_smp_current_get().
It is no longer inlined which saves significant binary size (about 10%
for some random test case I checked).
Introduce z_current_thread_set() and use it in place of
arch_current_thread_set() for updating the current thread pointer
given this is not necessarily an architecture specific operation.
The architecture specific optimization, when enabled, should only care
about its own things and not have to also update the generic
_current_cpu->current copy.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").
This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.
The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.
Hence this revert.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>