Using semihosting on supported architectures (arm, xtensa, riscv) it now
possible to generate tracing giles easily and without being restricted
by size.
Using qemu for example, it is now possible to generate the tracing file
simply by running:
west build -p -b mps2/an385 tests/kernel/msgq/msgq_api/ \
-t run --snippet semihost-tracing
This will generate a tracing file in the build/ directory which can be
viewed with babeltrace.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add support for 64-bit devmem operations for 64-bit devices.
Signed-off-by: Sergii Vystoropskyi <vistorop@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
The frame_based descriptors differ from the frame descriptors
in that there is no dwMaxVideoFrameBufferSize field.
In order to do that, add a new uvc_frame_based_discrete_descriptor
structure to be used to fill in proper information into the
frame descriptor. In addition to that, a new format descriptor
is also added for frame based transfer.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
This commit prepares introduction of the UVC Frame Based support by
using the struct uvc_frame_descriptor as parameter of most of the UVC
functions. struct uvc_frame_descriptor contains the common fields for
all supported frame type and then depending on the DescriptorSubtype
the pointer is casted in the correct struct definition.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Using the Wi-Fi credentials system, we need to stop connecting with stored
credentials once a connection has been successful.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Introduce dedicated helper functions for connection type checking:
- bt_conn_is_br() for BR/EDR connections
- bt_conn_is_le() for LE connections
- bt_conn_is_iso() for ISO connections
- bt_conn_is_sco() for SCO connections
Replace direct conn->type comparisons with these new helper functions
throughout the connection management code. This improves code readability,
maintainability, and provides proper configuration checks for each
connection type.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Use a combination of multiple helper functions to implement the
functionality of existing interfaces starting with `bt_sdp_get_`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Update the command `sdp-find` to support attribute parsing helper.
If the argument count is 1, the general SDP discovery will be used
to discover the protocol `L2CAP`.
In the SDP record discovered callback, call attribute parsing helper
functions to parse the SDP record and SDP attributes. And print all
parsed attribute values.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The current implementation does not support multiple attributes with
the same attribute identifier in a discovered SDP record.
Add function `bt_sdp_record_parse()` to parse the received SDP record.
Add function `bt_sdp_has_attr()` to check if the specified attribute
identifier has been discovered.
Add function `bt_sdp_get_attr()` to get the attribute of specified
attribute identifier.
Add function `bt_sdp_attr_value_parse()` to parse the attribute value.
Add function `bt_sdp_attr_has_uuid()` to check if the attribute
contains the specified UUID.
Add function `bt_sdp_attr_read()` to read the value of the attribute.
Add function `bt_sdp_attr_addl_proto_parse()` to parse the protocol
descriptor from the additional protocol descriptor list.
Add function `bt_sdp_attr_addl_proto_count()` to get the protocol
descriptor count of the additional protocol descriptor list.
Add function `bt_sdp_attr_addl_proto_read()` to read the attribute
value from the additional protocol descriptor list for specific index
and UUID.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
After #94079, CONFIG_COVERAGE_DUMP is enabled even if CONFIG_COVERAGE is
not set. As a result CONFIG_ZTEST_NO_YIELD is disabled which has some
implications on other tests.
Coverage dump method is necessary only if coverage is collected on
hardware, which is enabled by CONFIG_COVERAGE_GCOV. Let's specify
default dump method, only if CONFIG_COVERAGE_GCOV is set.
Fixes: #94079
Signed-off-by: Patryk Duda <patrykd@google.com>
When loading from `.elf` files, it is not guaranteed that section
headers are word aligned with the `.elf` file. Attempting to perform
a direct assignment results in the compiler assuming the input pointer
is aligned, resulting in usage faults if the assumption is broken.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This local pointer assignment does nothing and readers may get a wrong
interpretation of the intention of the function.
Signed-off-by: Ricardo Cañuelo Navarro <rcn@igalia.com>
Zephyr's long term goal for crypto support is to use only PSA API. This
commit replaces usages of MD with proper PSA API for HMAC.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
With the long term goal to transition all crypto support toward PSA API,
this commit deprecates CONFIG_JWT_SIGN_RSA_LEGACY.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add code comments explaining the handling of short prepare
that can be enqueued out of order and present in use of FIFO
for prepare pipeline.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
In the case of a CIG having multiple CIS, and all CIS has been
requested to being disconnected (i.e. they all enter the
BT_ISO_STATE_DISCONNECTING state), then when the first disconnect
complete is handled in bt_iso_chan_disconnected, then the
cig->state was prematurely set to BT_ISO_CIG_STATE_INACTIVE.
This meant that if the application called bt_iso_cig_terminate
when the 2nd CIS entered bt_iso_chan_disconnected and called
chan->ops->disconnected(chan, reason) then the CIG would be
removed. When the CIS then entered bt_iso_cleanup_acl, it
would access removed data from cleanup_cig.
Change bt_iso_chan_disconnected to not allow the termination
of the CIG until all CIS have entered the BT_ISO_STATE_DISCONNECTED
state.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Support only power-of-two disk sector sizes to enable significant
throughput improvements:
* SCSI data zero-copy
* allow queuing multi-packet transfers
Previously large SCSI buffers did not improve performance. With this
change, larger SCSI buffer allows scheduling bigger USB transfers which
reduces overhead.
Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
The UVC class was deciding itself which formats were sent to the host.
Remove this logic out of the UVC class and introduce uvc_add_format() to
give the application the freedom of which format to list.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Make use of the recently merged fmt->size to know the maximum size of the
frame to be allocated, which works for both compressed and uncompressed
video.
Signed-off-by: Josuah Demangeon <me@josuah.net>
When running out of descriptor, return an error instead of ignoring it.
The application need to make sure to adjust the Kconfig macros to have
enough descriptors for all formats to add.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Reduce Controller assertion check code size for ARM Cortex-M
CPUs by using the undefined instruction exception.
`arm-none-eabi-addr2line` commandline can be used to get the
source file and line number.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Introduce development and fatal assertion classification
in the Controller implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use the peers asychronous control character map to only escape
characters that need to be, instead of always escaping bytes 0 to 31.
For data packets with values randomly distributed, this results in 11%
fewer bytes needing to be transmitted over the link, if no bytes need to
be escaped (256+2)/(256+2+32).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Accept the `ASYNC_CTRL_CHAR_MAP` option in configuration messages from
the peer. The map is reset to the default value each time the interface
comes up.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Expose the currently configured value for the PPP peers Asynchronous
Control Character Map through a public function.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The fix in 1264a923f3 was incomplete, because
it doesn't initialize the variable. To quote from opengroup [1]:
address_len
Either a null pointer, if address is a null pointer, or a pointer to a
socklen_t object which on input specifies the length of the supplied
sockaddr structure, and on output specifies the length of the stored
address.
This caused the returned address to be incomplete, because it got truncated
depending on what addrlen_local got initialized with implicitly. This broke
talking to discovered MQTT-SN gateways.
I intend to implement integration tests for the MQTT-SN UDP transport to
prevent such issues in future, but that will be done in a separate PR.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/recvfrom.html
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Add shell command for testing BR/EDR power mode control. Supports
entering sniff mode with configurable parameters (min/max interval,
attempt, timeout) and exiting back to active mode. Provides real-time
feedback on mode change requests and status.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>