This pull request documents additional requirements for treewide
changes which were discussed at the process WG (see
issue #48886 for details).
These requirements apply to especially impactful changes. They exist
both to try to make sure the changes get enough review, and to give
users a heads-up mechanism about incoming treewide changes.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit updates the CI workflows that trigger on both push and pull
request events to limit their event trigger scope to the main and the
release branches.
This prevents these workflows from simultaneously triggering on both
push and pull request events when a pull request is created from an
upstream branch to another upstream branch (e.g. pull requests from
the backport branches to the release branches).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
QEMU for NIOS2 and LEON3 do not provide support for the "can-bus" object
type. Skip configuring CAN bus command line arguments for these.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove the `bt_hex`, `bt_addr_str`, `bt_addr_le_str` and `bt_uuid_str`
macros from `bt_str.h` as they were just aliases for the `*_real` functions
in the same file.
The functions has been renamed without the `_real` suffix.
Some files were using the functions and not the macros, they have been
updated to use the new name of the functions.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Move the function in the `subsys/testsuite/ztest/src/ztest_mock.c` files.
This is motivated by the fact that there is others re-implementation of
`*printk` functions using libc counterparts in the `ztest_mock.c` file.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
The file `tests/bluetooth/host/keys/bt_keys_get_addr/src/main.c` was using
functions from `tests/bluetooth/host/host_mocks/print_utils.c` which were
exactly the same as the one in `common/log.h`.
The code was duplicated because the test author wanted to include
`common/log.h` to get the stringifying functions, but could not due to
unwanted side-effects.
See the comment from the unit test author here:
https://github.com/zephyrproject-rtos/zephyr/pull/48676#discussion_r973672151
The new `common/bt_str.h` does not have side-effects, so it is
suitable for unit tests.
The `snprintk` function has been redefined inside the `main.c` to use the
libc because of the kernel being not compiled entirely.
Also, the `CONFIG_LOG`, `CONFIG_BT_DEBUG_LOG` and
`CONFIG_TEST_LOGGING_DEFAULTS` have been disabled in the Kconfig files
of each `keys` tests. That so logs are not compiled and so, there is
no need to link the `printk` functions that are used by the logs.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Functions related to string manipulation that were defined in
`common/log.h` has been moved to the `common/bt_str.h` file and their
implementation in `common/bt_str.c`.
Files that were using those functions has been updated consequently.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
While reviewing the dependency between Picolibc POSIX APIs and Zephyr, I
found that the picolibc libc-hooks code copied a bunch of functions from
the newlib version which weren't needed. This required replacing a few
calls to the (now removed) '_write' hook with printk instead.
Signed-off-by: Keith Packard <keithp@keithp.com>
Zephyr implementation is limited to 4 IRQ per GPIO bank when up to 8 is
theoritically possible.
It is now possible to use until 8 IRQ per GPIO bank. This can be
achieved with minimal effort in a device tree overlay:
&gpio0 {
interrupts = <4 2>,<5 2>,<6 2>,<7 2>,<32 2>,<33 2>;
};
&gpio1 {
interrupts = <34 2>,<35 2>;
};
Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
Fix ticker slot reserved check to handle deferred execution
of ticker worker where ticks_elapsed is greater than
ticks_slot_previous. In which case, each ticker expiring be
checked for overlap with previous slot reservation.
This fixes:
ASSERTION FAIL [0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/
controller/ll_sw/nordic/lll/lll.c:476
lll_preempt_calc: Actual EVENT_OVERHEAD_START_US = 3906
Flash erase operation exposed the assertion, CPU being
halted deferred the ticker_worker collision resolution and
ticker expiry was not individually checked for overlap with
previous expired ticker reservation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing first connection event due to first connection
event ticks_slot of central and peripheral overlapping with
the initiator window ticks_slot and advertising ticks_slot,
respectively.
Use ticker_stop_abs interface so that when the ticker is
stopped the ticks_slot_previous is truncated to the actual
ticks used as requested by the supplied absolute ticks.
Relates to commit 8a294a62d4 ("Bluetooth: controller:
legacy: Fix missing first conn event").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The PWM definitions for Atmel SAM SoCs can differ slightly.
This commit adds support for the PWM defines used by SAM4S.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Cache written data to avoid rewriting same flash page multiple times
when writing subsequent flash pages. The cache is used for reads to
account for reading not yet committed (i.e. dirty) page data. Speeding
up reads is not intention of this patch and therefore the read path
does not modify cache state.
Fixes: #30212
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Rename the CAN loopback driver receive function to make the code easier to
understand. Add proper check against NULL for RX callback function
pointers.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Fix ticker instance ticks_current initialization to be
acquired from the RTC counter value. The RTC counter may
have run in previous use of ticker before bt_disable hence
keep the instance ticks_current equal to RTC counter value
when ticker_init() is called again.
Relates to commit 4349a475a8 ("Bluetooth: Controller: Add
deinit() infrastructure").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add back erroneously removed ll-addr command, when removing
legacy Controller, which is provided when using Zephyr
Bluetooth Low Energy Controller to read the random and
public address set by the Host, and used by the Controller.
Relates to commit b67a31e411 ("Bluetooth: controller:
Remove legacy LL").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
STM32WB Controller supports application to initiate the "PHY Update
Procedure" (BT_USER_PHY_UPDATE) while it doesn't support it to be
automatically triggered on connection establishment (BT_AUTO_PHY_UPDATE).
Default BT_USER_PHY_UPDATE to true, which automatically defaults
BT_AUTO_PHY_UPDATE to false.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The SDMMC disk driver kconfig no longer needs to be set
at the board level, it is defaulted at the driver level
based on device tree. Remove unecessary code from NXP boards.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Set default of DISK_DRIVER_SDMMC Kconfig based on the devicetree.
This should avoid having to set the kconfig at the board level
in order to use sdmmc.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Load image kconfig setting into image target properties.
This allows sysbuild to evaluate and check image configuration as part
of CMake invocation.
sysbuild_get() is updated to support reading of CMake cache or Kconfig
settings for an image.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The signature of import_kconfig() take two mandatory arguments and one
optional:
> import_kconfig(<prefix> <kconfig_fragment> [<keys>])
but has been implemented in such a way that it loops all arguments after
the two mandatory args and sets the same list on those.
Fix this error by only setting the created variables on the third and
optional argument if it exists.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
So far running twister tests didn't fail even though the sample failed
to receive the initial attestation token data.
Therefore this adds the regex lines that the samples prints if the
IAT data were received.
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
Update power_domain drivers to use DT_HAS_<compat>_ENABLED Kconfig
symbol to expose the driver and enable it by default based on
devicetree.
We remove one reference in prj.conf that is no longer needed.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
Brackets were originally used in the sensor info shell command output to
make it obvious when a field is a null string, however they incorrectly
suggest that a field is an array. Remove the brackets and conditionally
print "(null)" instead.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Several other widely-used pthread implementations
abstract `pthread_t` as `uint32_t`. The benefit
there is that we avoid passing around a pointer to
an internal structure (implementation detail).
Additionally, this removes the alias from `k_tid_t`
to `pthread_t` inside of `struct pthread_mutex`.
Signed-off-by: Chris Friedt <cfriedt@meta.com>
hal_nxp was added to cmake's include directories globally, without
checking if the hal is enabled. This made all Zephyr builds end up
including hal_nxp, even for other vendors.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Skip all CAN controller tests utilizing CAN loopback mode for the
kvaser,pcican CAN controller card as emulated in QEMU.
QEMU emulation of the SJA1000 CAN controller backend does not yet support
the SJA1000 Self Reception Request command which is required for proper
loopback operation.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add support for configuring CAN emulation support in QEMU. For now, the
only supported CAN controller is the single-channel Kvaser PCIcan PCI card.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This seems to have caused CI failures and its unclear why just yet
so revert instead.
This reverts commit cbee9e9fdd.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>