Disable the pll2 when clearing the clock config prior to
testing the clock_control driver for the stm32h7
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Like in C test. If MAX STDDEV is lower than single clock cycle then
set it to a single clock cycle.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
If frequency of the system clock is lower then deviation may exceed
default value (10us). Instead of adjusting the default value, test is
rounding up expected standard deviation to a single clock cycle.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Currently, json array macros are passing the outer "container" struct
to the Z_JSON_ELEMENT_DESCR macro, causing the alignment to be calculated
from the outer struct which may be incorrect. Fix this by using the
biggest shift from the nested objects to calculate the alignment as the
struct size is calculated based on the biggest alignment of it's members.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Add test to check that alignment and offsets of object array elements
are calculated correctly.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Previous OpenOCD version finding would fail when additional tokens were
prepended to the 'openocd --version' output, as happens with some third-
party OpenOCD repackages (xPack for one).
Fixes: #71955
Signed-off-by: Nick Kraus <nick@nckraus.com>
This commit removes the "-vvv" argument from the SLID generation
scripts' command line when building Zephyr or an extension with
Kconfig CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID enabled. This removes
a lot of noise in the build log (usually ~250 lines) and is fine to
do because the printed information is also saved in build artifacts.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr/bluetooth` and `subsys/bluetooth`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
pollfd array used with zsock_poll() should not be modified while inside
zsock_poll() function as this could lead to unexpected results. For
instance, k_poll already monitoring some kernel primitive could report
an event, but it will not be processed if the monitored socket file
descriptor in the pollfd array was set to -1. In result,
zsock_poll() may unexpectedly quit prematurely, returning 0 events, even
if it was requested to wait infinitely.
The pollfd arrays used by zsock_poll() (ctx.events) is reinitialized
when the service thread is restarted so modifying it directly when
registering/unregistering service is not really needed. It's enough if
those functions notify the eventfd socket used to restart the services
thread.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Increase the default TX thread stack size for the CAN loopback driver from
256 to 512 bytes as the former has shown to be too little when using the
loopback driver on real hardware.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
If we couldn't send all (or any data) via the socket,
invoke poll instead of blindly retrying and flooding the socket
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
If we couldn't send all (or any data) via the socket,
invoke poll instead of blindly retrying and flooding the socket.
Respect timeout through http_client_req
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
Iterating the observations can be simplified to a struct iterator instead
of first getting the count and looping afterwards.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Some of the A2DP interfaces are not defined if the corresponding feature
is not enabled, and therefore shall not be initialized.
This patchs include the interfaces/variables by the configurations to
go through the compiling stage.
Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
When NO_BACKENDS was not defined then log backends were
initialized (even though not used). During the initialization
filters for that backends were configured and because of that
messages were not filtered out as expected.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When userspace is used and frontend was used for logging then runtime
filtering was failing because in user context filtering data was
accessed and filtering data is in the kernel space. Fixing that and
adding runtime filtering to the pre frontend function which is
already executed in the kernel space and filter data can be
accessed.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Logging string stripping depends on LOG_DICTIONARY_SUPPORT being
enabled and it was not set in UART dictionary frontend.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Log frontend supports runtime filtering so it should be
allowed to enable it even when only frontend is used with
no backends.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Use the message queue to pass the new report from the input callback,
and use a semaphore to protect the report buffer until it is transferred
to the host.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Starting next week, I will no longer be active on this work account,
& I will no longer be available to contribute to STM32 in Zephyr.
I will be reachable on my personal account: @JarmouniA
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
From https://mails.dpdk.org/archives/dev/2021-December/231212.html:
Downcasting a void* to struct aesni_gcm_session* caused the session
data to be treated as tainted. Removing the void* temporary variable
and adding a cast avoids this issue.
Try the same approach here to prevent the ldr->sect_hdrs pointer from
being treated as tainted.
May fix#74817.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Previously both temperature and pressure were updated regardless of
which one was requested.
Fixes CID: 392519, GH: 74779.
Fixes CID: 392497, GH: 74777.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
If CONFIG_NET_MGMT_EVENT_DIRECT is enabled and CONFIG_NET_MGMT_EVENT_INFO
disabled it does not build because mgmt_push_event writes to non existing
struct members
Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
Fix system workqueue block caused by mgmt_event_work_handler
when CONFIG_NET_MGMT_EVENT_SYSTEM_WORKQUEUE is enabled.
Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
The series-specific Kconfig files were not included, leading
to RTT not being considered available.
Fixes#75511.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
During initialization, zero is returned if an unexpected device ID is
read because the returned variable is not written to after a previous
non-zero check. Return -EIO instead to indicate an error occurred.
Detected with the following Coccinelle script:
@@
identifier I;
@@
*if (I) {
...
return ...;
}
if (...) {
... when != I
when any
* return I;
}
Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
Currently we get the build error when building
'tests/subsys/logging/log_backend_uart':
error: static_assert expression is not an integral constant expression
BUILD_ASSERT(strlen(TEST_DATA) < SAMPLE_DATA_SIZE);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It can be easily workarounded by using sizeof instead of strlen
to calculate string size.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
In `tests/subsys/logging/dictionary` we don't include stdio.h
header but use standard stream definitions (i.e. `stdout`)
which cause build issues (if the minimal libc is used).
Fix that.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Disable branch coverage for the `__ASSERT` family of macros. Covering
all of the assertion branches by definition means triggering the
assertion, which can be either challenging or impossible to exercise,
and in either case results in the immediate termination of the test.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Multiple values for `--exclude-branches-by-pattern` will result in only
the last value taking effect. Resolve this by merging all the provided
regex patterns into a single pattern with the `|` operator.
Signed-off-by: Jordan Yates <jordan@embeint.com>
In case where the system is overloaded, net stack buffer
could fail to allocate next packet. That scenario requires
wifi internal Wi-Fi driver to free current rx buffer. This is
currently not being called. This fixes it by making sure
esp_wifi_internal_free_rx_buffer() is called in all scenarios.
Fixes#63043
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Converts the `<inf> i2c_ll_stm32_v2: I2C TIMING` message
displayed by the driver to a LOG_DBG. Also makes an actual
error message a LOG_ERR instead of a LOG_DBG.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Note CONFIG_PM_* affects device.h too. Even if not compiled, the more
code the pre-processor sees the better.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes the following error appearing in the test coverage added by the
next commit:
In file included from zephyr/tests/lib/cpp/cxx/src/main.cpp:18:
```
zephyr/include/zephyr/pm/device.h:275:9: error: designator order for
field 'pm_device_base::state' does not match declaration order
in 'pm_device_base'
275 | }
| ^
zephyr/include/zephyr/pm/device.h:315:17: note: in expansion of
macro 'Z_PM_DEVICE_INIT'
315 | Z_PM_DEVICE_INIT(Z_PM_DEVICE_NAME(dev_id), node_id,
```
Note this failure is observed with any g++ -std=c++NN standard value -
even before C++20.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This provides C++ build test coverage for device.h (notably:
Z_DEVICE_INIT() fixed in the previous commit) and for some other Device
Tree macros.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Conditionally remove braces for designated initializers of anonymous
unions. This makes it compatible with C++20 while not breaking pre-C11
gcc.
This does for device.h what commit c15f029a71 ("init.h: restore
designated initializers in SYS_INIT_NAMED()") did for init.h
See https://docs.zephyrproject.org/latest/develop/languages/cpp/ and
long discussion in #69411 for more obscure C/C++ compatibility details.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The minimum version of pyelftools is 0.29 to make it working
with scripts/footprint/size_report
Fixes#75605
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
RTIO expects the CHAINED flag to be set when ordering of operations is
important. The callbacks in the icm42688 stream handling were not
chained into, meaning the callbacks would have occured immediately
rather than *after* the SPI reads/writes.
Update all the spi transactions to chain into the desired callbacks in
the driver.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
When multithreading is off packet buffer should not use feature which
allows waiting for available buffer.
mpsc_pbuf is used by logging which can work in deferred mode in
no multithreading build.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>