Fixes an issue where the shell API could block indefinitely when called
from threads other than the shell's processing thread, especially when
the transport (e.g. USB CDC ACM) was unavailable or inactive.
Replaced `k_mutex_lock` calls with an indefinite timeout (`K_FOREVER`)
by using a fixed timeout (`K_MSEC(SHELL_TX_MTX_TIMEOUT_MS)`) in shell
API functions to prevent indefinite blocking.
Link: https://github.com/zephyrproject-rtos/zephyr/issues/84274
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
Introduced a new Kconfig option `SHELL_PRINTF_AUTOFLUSH` to allow
configuring the autoflush behavior of shell printing functions.
Updated `Z_SHELL_FPRINTF_DEFINE` to use the
`CONFIG_SHELL_PRINTF_AUTOFLUSH` setting instead of hardcoding
the autoflush behavior to `true`.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
Update the HW models to the provisional branch zephyr_2025_01_22
which enables the use the not yet released CRACEN RNG & CM HAL
while enabling the latest nrf HAL 3.10
Including the following:
4aac556 Support latest nrf HAL 3.10 / MDK 8.69.1 for 54L15 builds
2e75940 UART: Correct UART names printed out to the users
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Reverts the change made in d4d53010f00cadbb4f89c6d41391937646fc1740
(The changes was moved to another file in a restructuring)
The commit incorrectly assumed that no blocking would be allowed in
the syswq. This has caused issues observed among others
in #77241 and #80167
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Mention the removed prompt for BT_ECC in the migration guide, and also add
a note about the removed HCI emulation layer to the release notes.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
This option only exposes internal APIs, so there should be no need to allow
applications to set an explicit value. Instead, users of the API should
select it through Kconfig.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Remove the HCI command & event emulation layer for ECDH commands and
events. This means that we always do the necessary operations in the host.
The existing BT_ECC Kconfig option stays, but now gets automatically
enabled when necessary (e.g. based on the BT_SMP option), which is why this
commit removes so many explicit assignments in prj.conf files.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
This hides the deprecation warning when UART_NRFX_UARTE_LEGACY_SHIM is
false because UART is not used.
Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
Only lookup for i3c devices if I3C=y, fixes a build error:
zephyr/drivers/i2c/i2c_shell.c:
In function 'device_is_i2c':
zephyr/drivers/i2c/i2c_shell.c:341:43:
error: array type has incomplete element type 'struct i3c_driver_api'
341 | return DEVICE_API_IS(i2c, dev) || DEVICE_API_IS(i3c, dev);
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fix regression in Coded PHY S2 reception to any other PHY Tx
in the s/w switch implementation.
Regression in commit 55b7dba8ec ("Bluetooth: Controller:
Refactor sw_switch hal interface use").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Test `tracing.transport.uart.async.test` was working only due sheer
serendipity: one of the tracing strings checked,
sys_trace_k_mutex_lock_exit, was never being registered on the tracing
buffer. However, the check never got to check this string, so the test
was passing.
Why wasn't it being registered? Tracing buffer size was a bit small for the
flurry of messages - increasing it solves the problem, and is what this
patch does.
Why did the check never got to the missing string? Tracing thread has a
lower priority, so when the k_sleep of test thread expired, it was
preempted. Indeed, if the sleep was changed by any number of ticks, the
test would fail. Even changing order - and thus number - of instructions
executed could make this test fail.
While at it, fixed some typos and an imprecise commentary on code.
Fixes: #84169
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Originally, when the POSIX_SHARED_MEMORY_OBJECTS option was
added, the O_TRUNC flag was not consistently available.
Now that it is consistently available, ensure it is used
within the shm_open() function.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
For usbser.sys driver, which is the default USB host driver for CDC
devices in windows, it is expected that USB device always indicate
completion of transmission by short packet. In case where the last
packet length is multiple of max packet size of the BULK IN endpoint,
the USB device shall indicate completion of transmission by sending a
zero length packet. This commit adds the sending of the short packet
termination mentioned above, ensuring condition of short packet
terminate is fulfilled.
Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
Z_GENERIC_SECTION() uses STRINGIFY() to convert its argument to a
string, therefore the argument shouldn't contain additional quotes.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The SystemCoreClock variable must be placed in the '.shared' section for
the MAX78000 and MAX78002 because the ARM core is responsible for changing
the System Clock and updating the SystemCoreClock variable, and the
RISC-V core knows what the System Clock frequency is through the
shared variable.
Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
On SMP systems, threads going through k_thread_abort() may still
be running while the test moves on to the next one. This creates
some interferences and may result in the next test failing. So
after each test, we need to do k_thread_join() on those threads
to make sure they are no longer active.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Reviewer expectation was burried under contributor section, it deserves
to be on the same level and highlighted.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The text in this note is not accurate and should already be covered by
the license agreement, no need to say what the license already covers in
non-legal terms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This test is overly sensitive to the relative timing of the devices
and/or their random number generation.
Due to this the test failed with its current setup when chanding the
random generation for the nrf54.
Let's work around it by offsetting a bit one of the devices.
This is a provisional workaround until the underlying issue is
addressed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the new entropy driver for 54L devices and therefore
claim BT_CTLR_ENTROPY_SUPPORT is always supported
(note 54H remains unsuported)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Switch the default entropy driver for 54L05/10/15 devices to the new
CRACEN based one.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's default to this new driver.
And therefore change the conditions in the BT controller kconfig
which were selecting the native_posix fake entropy driver
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add support for the new nrf hal CRACEN CTR DRBG driver including a new
kconfig option to enable it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>