Compiler-generated FLIX instructions are currently disabled for LLEXT due
to a historic issue with LLEXT feature that appears to be already
resolved. However, another issue with FLIX is now being investigated.
The latter issue is not related to LLEXT but userspace feature.
To mitigate impact of global complier settings, this change adds a kconfig
choice for controlling FLIX generation independently for LLEXT modules.
Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
Make sure choice option name is not same as actual config option
that is enabling it. Use _SECURITY suffix for clarity of what
choice is actually about.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
CTS is missing the Local Time Information characteristic and this
commit adds the UUID and the full characteristic to its service.
The peripheral example has been updated as well to use this and
implement it on the example so it is easy to test it out.
Signed-off-by: Martin Moya <moyamartin1@gmail.com>
- Add kconfig for HCI event synchronous buf pool to allow vendors
to configure buffer count based on the application/host platform
requirements
Signed-off-by: Vinit Mehta <vinit.mehta@nxp.com>
When receiving a DNS query, make sure that the packet contains
also query type and class fields before trying to access them.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Use ate_end_addr >= data_end_addr instead of > to ensure the
last delete ATE is scanned and recovered correctly.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Fixeszephyrproject-rtos/zephyr#103442
Origin: Original
Adds a separate TX traffic class for CDC-ECM and CDC-NCM in USBD Next
to prevent a deadlock during interface provisioning.
Tested with a custom nRF53-app firmware which combines CDC-ECM /
CDC-NCM (both tested) with mDNS with USB hosts MacOS, iPadOS, and
Alpine Linux.
Signed-off-by: Jay Beavers <jay@tolttechnologies.com>
Control read handlers handle_get_status(), handle_get_state() and
handle_upload() return value is used to set errno. Setting errno inside
the functions and then returning 0 therefore does not fail the request
as intended.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Added support for elapsed time service (ETS). The service
is introduced currently with the experimental tag.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
The TBS spec only specificially disallows join for calls in
the incoming state. The Alerting and Dialing state in Zephyr
were disallowed, but that fails some TBS join tests.
Removed the (implicit) checks for alerting and dialing and
updated the state changer code to be more explicitly so that
all call states, except for incoming, is explicitly handled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Refactor bt_tbs_set_uri_scheme_list to take a single string instead
of an array of URIs. This should not affect applications much
in any way (and may actually be easier to use), but simplifies
the implementation significantly, and reduces memory footprint.
Additionally it also make the client and server more similar
as bt_tbs_client_read_uri_list just returns it as a single
string as well.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
bt_pacs_register would assert if e.g.
CONFIG_BT_PAC_SRC_NOTIFIABLE=y but param.src_pac = false.
Add checks for setting the attributes, only if the parameter
actually enables the characteristics.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds fixes for build and runtime issues using MWDT:
* Rename sections for llext_memblk.c buffers as MWDT cannot initialize
sys_mem_blocks struct with buffer address when the section name of
sys_mem_blocks struct (its variable name) is identical to the
buffer's section name
* Adds --no-check-sections flag for MWDT on final stages of
linking. Unlike other toolchains, MWDT's default behavior is to
strictly check and fail on section overlap. Using SLIDs requires
overlap; see llext-sections.ld
* Modifies inspect test case's ifdef around rodata sections, as
not all Harvard platforms using MWDT have .rodata_in_data sections -
their creation is triggered by passing the -Hccm flag to CCAC.
As an example, nsim/nsim_em doesn't have them and nsim/nsim_vpx5 does
* Removes -Hccm flag when building with CONFIG_LLEXT_RODATA_NO_RELOC
as it causes CCAC to mark the custom section llext.rodata.noreloc
writable (SHF_WRITE) though it has only read-only data, making it
impossible for for LLEXT to recognize it and put it in the
appropriate region; see llext_load.c's llext_map_sections
* Adds name to unnamed first argument of threads_objects_test_setup,
removing warning about omitting parameter names being a
C2x extension
Also fixes a build warning for GCC about pointer arithmetic in
the INSTR_FETCHABLE macro.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Avoid dereferencing `stream` in the debug log message when checking
for invalid input parameters.
The previous log printed `stream->ep` and `stream->conn` inside a
combined NULL check, which could trigger static analysis warnings
about a possible NULL pointer dereference.
Align the implementation with the existing pattern used in the file
by logging a generic "Invalid stream" message instead.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Make nvs_flash_al_wrt_streams() non-static when CONFIG_ZTEST is
enabled so it can be unit tested.
Add test_nvs_write_stream to verify correct concatenation and
write behavior for different head/data/tail combinations.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Rework the NVS garbage collection data move path to support
write-block–aligned packing of consecutive records.
Introduce struct nvs_block_move_ctx to buffer unaligned tail
bytes during GC. Data is moved in write_block_size-aligned chunks
only, and any remaining bytes smaller than one write block are
temporarily buffered and prepended to the next write. The final
tail is flushed before GC completion.
Extend struct nvs_flash_wrt_stream to support an optional
header buffer, allowing head/data/tail segments to be written
as a single contiguous stream while respecting flash alignment
requirements.
This enables packed back-to-back data movement during GC without
introducing additional padding between records. CRCs are not
recomputed for moved data, preserving on-flash format and
compatibility.
No changes are made to normal nvs_write() alignment semantics
outside of GC.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Extend the NVS garbage collection path to optionally commit a
pending write request while GC is running.
Introduce struct nvs_gc_write_entry to describe a write operation
that may be handled during GC. When space is insufficient and GC is
triggered from nvs_write(), the write request is passed to
nvs_gc(). If the entry being updated is encountered in the sector
currently being garbage collected, the old copy is skipped and the
new data may be written directly into the active sector, provided
there is sufficient space.
This avoids unnecessary data movement where the old entry would
otherwise be copied during GC and then immediately superseded by a
new write.
The existing GC behavior is preserved when no pending write is
provided.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Introduce nvs_flash_al_wrt_streams() to support aligned flash
writes composed of a primary data buffer and an optional tail buffer.
This refactors the existing aligned write path to allow multiple
contiguous buffers to be written as a single logical stream while
respecting flash write-block alignment requirements. The new helper
enables cleaner handling of cases where data must be extended with
additional metadata (e.g. CRC) without temporary concatenation
buffers or partial pre-writes.
nvs_flash_data_wrt() is updated to use the stream-based interface
for CRC handling. The existing nvs_flash_al_wrt() API is preserved
as a thin wrapper for backward compatibility.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
iiii
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
When starting adv via handover, we log the address used
for the advertising set for debugging purposes.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Implement the validation if there is exactly one GAP service
in GATT database.
The validation is performed as soon as the GATT database
is available and forbids to enable the Bluetooth if the configuration
is not compatible with the Bluetooth Specification.
The verification may be disabled by the user for better performance
or deliberate implementation that is not compliant with the
specification.
Signed-off-by: Radosław Koppel <r.koppel@k-el.com>
Set the unused argument of the name characteristic to NULL.
This removes the reference from GAP service to the hci_core.
Signed-off-by: Radosław Koppel <r.koppel@k-el.com>
Rename the DEVICE_NAME_GATT_WRITABLE_ kconfig options to
BT_DEVICE_NAME_GATT_WRITABLE_.
Rename DEVICE_APPEARANCE_GATT_WRITABLE_AUTHEN to
BT_DEVICE_APPEARANCE_GATT_WRITABLE_AUTHEN.
The old options are marked as deprecated.
Signed-off-by: Radosław Koppel <r.koppel@k-el.com>
Remove Generic Access Service implementation from gatt files and move it
into separate file in services directory.
The default service implementation can be disabled by the user in purpose
of providing the GAP implementation directly in the application.
Signed-off-by: Radosław Koppel <r.koppel@k-el.com>
Add missing fields in arm,stmesp binding and limit Coresight STM
frontend to SoCs which have the required hardware.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Use specific alignment when STM logging frontend is used on RISCV
core (PPR or FLPR). It fixes the case where 64 bit variable were
incorrectly logged.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add a new Kconfig option CONFIG_LOG_RUNTIME_DEFAULT_LEVEL that allows
setting the initial runtime filter level at system startup, independent
of compile-time log levels.
This enables a common use case where firmware needs to:
1. Compile with DEBUG level (to include all log macros)
2. Boot with minimal logging (e.g., ERROR only for quiet startup)
3. Allow dynamic runtime increases via IPC or other mechanisms
Previously, autostart backends were always initialized with
CONFIG_LOG_MAX_LEVEL, which meant compile-time and initial runtime
levels were coupled. This change decouples them when runtime filtering
is enabled.
Changes:
- Add CONFIG_LOG_RUNTIME_DEFAULT_LEVEL Kconfig option under
LOG_RUNTIME_FILTERING, defaulting to LOG_DEFAULT_LEVEL
- Update z_log_runtime_filters_init() to use the new config for initial
aggregated filter levels
- Update autostart backend initialization in z_log_init() and
activate_foreach_backend() to use CONFIG_LOG_RUNTIME_DEFAULT_LEVEL
instead of CONFIG_LOG_MAX_LEVEL when runtime filtering is enabled
This allows firmware to start with ERROR-level logging while keeping
full DEBUG compile-time capability, then dynamically increase verbosity
as needed without recompilation.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This will save flash memory by 1489 bytes and make usage help look
uniform in different commands.
Re-order the shell commands to alphabetical order. This has been
done before but has bitrotted over time.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The standard format "frame-based payload" was abused as a way to get
generic descriptors that match all other format and frame types.
This is not accurate as some fields do not match, causing misalignment
of some struct fields in some case.
Correct the misuse by introducing new valid structs and refactoring the
descriptor parsing to use them instead.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Only bind to a controller after probing. Wait that a class is matching and
assigned to a device to assign a host controller to a class. This allows
a class to be used by any of the controller in place.
Remove the `c_data->uhs_ctx` field, not used anywhere, in favor of using
`c_data->udev->ctx`.
Signed-off-by: Josuah Demangeon <me@josuah.net>
This will save flash memory by 646 bytes and make usage help look
uniform in different commands.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Make sure to check packet length check before starting the
IPv6 fragmentation reassembly process. This way we can drop the
malformed packet without consuming resources.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Previously the name was only set when CONFIG_NET_L2_PPP_LOG_LEVEL >=
LOG_LEVEL_DBG. NET_ERR/NET_WRN in ipv6cp (and others) use fsm->name
as %s at any log level, which could pass NULL into the logger and
crash in cbprintf/strlen. Always assign the name so logging is safe.
Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
Add check in valid_unicast_audio_start_param to verify
that the ep connection matches the member_conn.
Instead of declaring the endpoints in the unit tests, we
not define them in the mock unicast client and use the
discover function to get pointers.
This allows for a proper implementation of
bt_bap_unicast_client_has_ep as well as makes the tests more similar
to a normal application.
This change required a significant change in the unicast_stop
unit tests as well, which uncovered a small bug in the implementation.
The bug was fixed as part of this commit.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There's no use of k_poll in the host stack anymore, so remove leftovers
and related definitions.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The Bluetooth Mesh code depends on k_poll, so it should have the
appropriate select statement in its Kconfig.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Any leading -D passed to target_compile_definitions on an item will
be removed, here remove them to make code style consistent.
Signed-off-by: Paul He <pawpawhe@gmail.com>
NVS calculates required_space for an entry by summing data size, ATE size
and CRC size. However, the CRC size is assumed to be 4 bytes and the
calculation does not account for the flash write block size.
On flashes with write_block_size greater than 4 bytes (e.g. 8 or 16),
the data + CRC payload must be padded to the write block size. The
current logic underestimates the required space, which may cause writes
to cross sector boundaries and corrupt adjacent entries or ATEs.
Fix this by aligning the data + CRC payload size to the flash write
block size before adding the ATE size to required_space.
This makes NVS space accounting consistent with flash write granularity
and prevents sector overflow on non-4-byte write block devices.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Fix draw_char_htmono() to compute byte offsets with row-based
HTILED addressing and keep g_y controlled by the outer loop.
This avoids row-skips and broken rendering near clipping boundaries.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Fix cfb_framebuffer_finalize() to invert the software framebuffer
only when pixel format polarity and cfb inversion state differ.
This restores the expected behavior for MONO01/MONO10 finalize output.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Handle both VTILED and HTILED framebuffer layouts in cfb_invert_area().
Also update the basic cfb test helper to read pixels correctly for
HTILED buffers.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Update ll_data_path_tx_pdu_release() to have return -ENOTSUP
so that the node_tx is released using the fallback method to
use the MFIFO from LLL to ULL_HIGH context.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add the 'net dns browse <service>' command to resolve multiple hosts of a
certain service type.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add an entry to the DNS cache for DNS_RESPONSE_DATA messages, and return
dns_read with DNS_EAI_ALLDONE instead of DNS_EAI_NODATA.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>