Move z_shell_backend_rx_buffer_flush() before state_set() in
shell_start() to prevent a race condition where incoming shell
commands could be lost.
Previously, the sequence was:
1. state_set() - prints the prompt
2. z_shell_backend_rx_buffer_flush() - flushes RX buffer
If the shell thread was preempted after printing the prompt,
the host could see the prompt and send commands. When the
thread resumed, z_shell_backend_rx_buffer_flush() would discard
those commands.
By flushing the RX buffer before printing the prompt, any
commands received after the prompt is visible will not be
affected by the flush operation.
Fixes#99674
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
This commit removes the OPENTHREAD_REFERENCE_DEVICE flag for NXP RW612
samples, as these are not meant to be included in a test setup.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
- Fixes an inconsistency in the board list
of the MCUx-VSCode extension. No functional change.
- Adjusts names in yaml files to follow the currently used approach
"NXP <board_name> [(cpu)] [(type)]".
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The function was casting a char* help pointer to struct shell_cmd_help*
and reading its 4-byte magic field. When the help string was shorter
than 4 bytes, this caused a read past the end of the buffer.
The fix replaces the struct cast with a byte-by-byte comparison of the
magic number.
Fixeszephyrproject-rtos/zephyr#102598
Co-authored-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The DTB file was previously listed as bcm2712-rpi-5.dtb, which was
inaccurate, as the hyperlink referenced the `bcm2712-rpi-5-b.dtb`
file. To ensure documentation precision and avoid potential
confusion, update the file name to the correct
`bcm2712-rpi-5-b.dtb`.
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
The ARM cores in BCM2712 are incapable of running the kernel in 32-bit
mode. The option `arm_64bit=1` is unnecessary and can be confusing, as
Raspberry Pi 5 runs in 64-bit mode by default.
Removed the `arm_64bit=1` configuration from documentation for Raspberry
Pi 5 (BCM2712).
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
In order to compile the demo application for a secure MQTT connection,
several networking API functions are used, which is properly defined by
some of the POSIX libraries already integrated onto Zephyr project. By
adding the missing libraries, compilation to the reference board
adi_eval_adin1110ebz passes.
As a minor change, reordered the sequence of included libraries to be
in alphabetical order.
Fixes#102372.
Signed-off-by: Cesar Santos <dev.cmsantos@gmail.com>
The new node is called "npu_cache".
This way a possibility is offered to choose - thru an overlay - if to
enable the NPU cache or not.
This new node has a dependency with node "npu", so the NPU cache's
status is taken into account only in case node "npu" has status "okay".
Default status value of "npu_cache" is "okay"
(i.e. enable the NPU cache).
Signed-off-by: Wolfgang Betz <wolfgang.betz@st.com>
Add a model of LDREX/STREX/CLREX, that although simple may be correct
enough to cover the needs of SW using these instructions.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Actually, the parameter is the number of bytes to read, not the number
of double words.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
The parsing of the number of bytes to read in the read command was being
done in hexadecimal, causing unexpected behavior.
Now the number can be interpreted in decimal or hexadecimal if prefixed
with 0x.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This patch runs clang-format on the shell_flash_test.c file
before the real patch gets applied, otherwise the changes
would be hard to read.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This patch runs clang-format on the flash_shell.c file before the
real patch gets applied, otherwise the changes would be hard to
read.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Fix spelling and wording issues in comments for phytec
phyboard_atlas xip FlexSPI NOR configuration headers.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Remove inclusion of files already included by the arch linker script from
the SoC-specific linker script.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
STM32MP1 series used a custom SOC_LINKER_SCRIPT, but all it did was
include the main Cortex-M script, unnecessarily re-include headers already
included by the main script(!) and add a custom section.
Get rid of the custom SOC_LINKER_SCRIPT but keep the custom section by
moving it to a linker script snippet file, added to the build system using
CMake directives.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Fix the panel pixel format enum in the X-NUCLEO-GFX01M2 shield overlay
by using PANEL_PIXEL_FORMAT_RGB_565 as defined in panel dt-bindings.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Fix Devicetree compilation errors caused by incorrect enum macro
names used in DTS overlay files.
Replace LSM6DSV16X_DT_ODR_AT_120Hz with the correct Devicetree enum
LSM6DSVXXX_DT_ODR_AT_120Hz in the stream_drdy sample boards overlay.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
This option already depends on BT_PER_ADV_RSP being enabled, so we should
have a more reasonable default for it. This way e.g. the existing PAwR
sample app should work without additional changes.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
During configuration the base->ICR1 or base->ICR2 register is written
without an IRQ lock. This can result in unwanted side-effects if the status
bit isn't cleared, or the edge select still needs to be updated.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Check the return value of adxl372_set_op_mode() in
adxl372_submit_stream() and abort on error.
Fix CID: 516239
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add a 'U' suffix to the interrupt status mask passed to
lan9250_write_sys_reg() to make the constant explicitly unsigned.
This avoids signed/unsigned ambiguity and addresses a SonarQube
static analysis warning.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The lan9250_thread() function declares a local variable that may be
used without being initialized, triggering a -Wmaybe-uninitialized
warning when building with -Werror.
Initialize the variable at declaration to ensure deterministic
behavior and avoid build failures.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Several LAN9250 helper functions ignored return values from register
access and wait routines, potentially hiding SPI or timeout
failures.
Propagate error codes from read/write/wait helpers throughout the
driver so failures are detected and handled by callers.
This improves robustness and makes error conditions visible during
initialization, PHY access, RX/TX paths, and MAC configuration.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Do direct resource path comparison on all registered resources before
falling back to fnmatch() so that exact path matches get always
preference.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test case verifying that if there's a static resource defined
which overlaps a FS resource pointing to a directory, it takes
preference on exact URI match.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Release camera frame immediately after video encoding.
Doing so, the frame could be reused by camera for next capture
without waiting for the end of network transmission.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Fix missing input buffer encoder dequeue, this was corrupting camera
device fifo because of same buffer queued into two different fifo.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Set multiline on pixel pipes to 128 lines to limit slave IP hardware
handshakes and so reduce the number of interrupts received by slave IP.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Log number of interrupts, including fuse interrupts at each
key frame and at the end of encoding.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Fix wait of hardware encoding completion by using
interrupt signaling instead of polling on irq status.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Introduce the missing flag to compile code with Zbkb extension,
which has already been supported by the GCC 12 in current SDK.
Signed-off-by: Andy Lin <andylinpersonal@gmail.com>
This adds optional clock control support to the spi_dw driver. The
support currently assumes that the clock control binding uses clkid for
the clock cell name.
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>
The ethernet DMA driver code was causing the silent dropping of packets
with length 125, 126 and 127. The root cause of the problem is that the
DMA engine performs an extra four bytes transfer corresponding to the
Receive Status Word. For those particular packet lengths, the previous
code incorrectly calculated the last fragment size.
The new code avoids that pitfall by decrementing the total frame size as
the fragments are being collected, while avoiding the creation of an
extra fragment on the extracted network packet.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Make USBD_HWINFO_DEVID_LENGTH prompt optional so that the code compiles
even if HWINFO is disabled.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Both cases use a large static buffer, we can optimize here and use a
single mutex-protected buffer for both.
sendmsg() test case needed adjustments, as it was also testing a buffer
overflow scenario. This can only be properly tested however if CID
feature is disabled, as otherwise the common helper buffer size is
increased for the CID use case, preventing the overflow from taking
place.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
For options that return the handshake status, make sure they work in
multi-client DTLS server case, by returning the status for the session
that completed handshake most recently. For TLS and DTLS client cases
that should make no difference, as there should only be one session per
context.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
With support for multiple client sessions for DTLS server socket, the
session timeout can no longer rely on built-in mbed TLS timing out
mechanism, as this only works for the session that is currently active.
Background sessions would never time out if the client just went silent.
Therefore, allocate a per-session timestamp, that keeps track of the
last activity on the session. Then, whenever poll() or recv() is called
loop over all sessions to identify those that timed and should be
released.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case a client address changes, but a session uses Connection ID
extension, the server should verify if the packet belongs to any of the
established sessions based on the CID value.
Therefore, before attempting to allocate a new session in such case,
loop over sessions and try to match the packet to one of the existing
sessions based on CID. In case of success, update the corresponding peer
address.
If no session is found based on CID, only then try to allocate a new
one.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case of errors on an active session (in most cases peer closing the
session), the session should be freed. Note, that as mbed TLS needs some
session context to work with, the last session on a socket is not freed,
but only reset instead.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
For TX, the DTLS server needs to check the peer address before passing
the packet to mbed TLS. In case the peer address doesn't match the
active session, it needs to switch sessions.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Refactor RX side for DTLS server to allow session switching when a
datagram from a peer that does not match current session. The server
needs to loop over established sessions, and in case no session is
found allocate a new one.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Split DTLS BIO RX functions for client and server case, given the
functionality will differ heavily. DTLS server needs to peek packet
before passing it to mbed TLS to allow to switch DTLS sessions in case
peer address doesn't match.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>