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>
Add support for the open hardware CANbardo Universal Serial Bus (USB) to
Controller Area Network (CAN) adapter board.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add check that should enable MFP when connect to WPA3 network,
as MFP required is mandatory for WPA3 network.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Support printing WPA3 enterprise type in scan result for more
accurate display, including the suiteb, suiteb-192 and WPA3
enterprise only.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
For 'wifi status' and 'wifi ap status' cmd of the hostap case,
originally only support getting 'EAP-TLS' for the enterprise
mode, which is not correct. Now support getting the specific
enterprise mode, including the WPA3 enterprise mode and
the EAP method type.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Change Wi-Fi suiteb type into WPA3 enterprise security type, it
includes suiteB, suiteB-192 and WPA3 enterprise only mode.
Support setting WPA3 enterprise only mode, which should use
cipher_config->key_mgmt as WPA-EAP-SHA256, and the AKM in RSN
IE will show 00-0F-AC:5.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Remove EAP TLS SHA256 security, as it was added to support the AKM
of 00-0F-AC:5 in RSN IE, but actually this AKM is used by WPA3
enterprise only mode.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
The check combination of "is zero" and then "less than zero" leaves open
the theoretical possibility of a positive return value, which would
continue on with an uinitialized 'sym'.
Checking for "not zero" has the same effect and covers all situations.
Commit 56fd85442 did the same thing for 'rela' a few lines above, but
missed this instance. No other places in the llext code have this issue.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Previously, filesystems could not be mounted at '/' because
mount points were restricted to being at least 2 characters.
Since '/' corresponds to the standard POSIX root filesystem
location, reduce the minimum length of a mount point to
1 character.
With that, we can mount a POSIX root filesystem.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
not force host variant if environment is setting something different in
the case of posix arch.
Fixes#83766
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The Espressif branch of OpenOCD uses the version string "v0.12.0" instead
of "0.12.0" causing the version regex match to fail.
Add an optional 'v' prefix to avoid the failure.
Fixes: #83373
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>