Commit Graph

105109 Commits

Author SHA1 Message Date
Krzysztof Chruściński f82ffc9213 tests: lib: cbprintf_package: Extend test coverage
Add test for cbprintf_package_convert function which checks if
it correctly handles array that holds string lengths. When convert
function is used twice, at first to calculate size of the output
package and then to actually convert the package, array of string
lengths can be used to optimize operation by not calculating
string lengths twice. However, array may not be able to hold all
string lengths that are needed for that package. In that case,
string lengths that did not fit into the array will be calculated
twice, in both conversions.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-01 09:56:03 -05:00
Mert Vatansever 9cfd185ab0 tests: drivers: flash: Fix MAX32666 flash error
This commit fixes flash error by correcting flash size.

Signed-off-by: Mert Vatansever <mert.vatansever@analog.com>
2024-11-01 09:55:52 -05:00
Benjamin Cabé f7ffadaf3d doc: hide main table of contents
Hide the main table of contents so that it doesn't show up in the actual
documentation index, only in the side bar. This helps keep the index
less cluttered and to the point.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-01 09:55:37 -05:00
Benjamin Cabé 96f07b832e doc: move less important information under the fold
Help make sure the most important documentation entry points are visible
without scrolling by moving less important information "under the fold".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-01 09:55:37 -05:00
Håvard Reierstad 0b88078b28 Bluetooth: host: Fix unsafe cast in is_subscribed
The current implementation casts the user data to the attribute value,
which makes an assumption about the user data. This commit changes the
implementation to use the attribute value read function when extracting
the characteristic properties.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-01 09:55:25 -05:00
Joel Hirsbrunner 8d07197d6d devicetree: Remove deprecated enum macro
Remove deprecated _ENUM_TOKEN and _ENUM_UPPER_TOKEN. These are
deprecated for over three years by now.

Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
2024-11-01 09:55:11 -05:00
Mert Ekren 193eeaef0c drivers: pinctrl: max32: fix correct configuring drive strength
This commit fixes configuring pin drive strength in pinctrl driver.
Previously, there was a mismatch while filling pincfg and checking
pincfg drive strength field. This fix simplifies the operation and
avoids gpio driver header dependency.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
2024-10-31 14:18:38 -05:00
Lukasz Mrugala 9dc0af55e2 scripts: twister: Fix NOTRUN in test_only
When using the --build-only into --test-only
Twister setup, NOTRUN statuses were not properly rerun.

Now they are properly run again if runnable.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-10-31 14:18:17 -05:00
Seppo Takalo 1e5a537ade net: lib: coap_client: Remove unnecessary atomic variable
In receiving thread, continuing the loops is based on
has_ongoing_exchanges() so it does not need atomic
coap_client_recv_active variable.

When idling, it wakes from semaphore. But there was potential
deadlock when coap_client_schedule_poll() would not signal the
semaphore, if atomic variable was already showing that it runs.
Removing the atomic variable removes this deadlock.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo 9c9dc9f760 tests: coap_client: Add tests for poll() errors
If we receive poll() error during a request, it must
be forwarded to application.

If instead receive poll() error later, it should not be
forwarded as it might be result of application closing the
socket.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo 350d20e027 net: lib: coap_client: Send RST for unknown queries
When receiving unknown response, respond with CoAP Reset.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo 1dc24872ce net: lib: coap_client: Remove duplicate token comparison
Response tokens are already compared in get_request_with_token().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo e96e95b6f6 net: coap: Add API to send reset message
Add helper API to construct CoAP Reset message.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo 1890dbd637 net: lib: coap_client: Fix reset handling
Fix handling of received CoAP reset.


Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo a14f083030 net: lib: coap_client: Use reset_internal_request() instead of flagging
It is error prone to flag separate booleans, so try to use
reset_internal_request() every time we release the internal request
structure.

Also refactor the reset_internal_request() so that we reset the
timeout value so it does not trigger again.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo 623a1ffd52 net: lib: coap_client: Don't decrease retry counter on send() failure
If send() fails, we have not technically send the CoAP retry yet, so
restore the same pending structure, so our timeouts and retry counters
stay the same.

This will trigger a retry next time the poll() return POLLOUT, so we
know that we can send.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo 6481b0ec6c net: lib: coap_client: Forward recv() errors to handling loop
Forward recv() errors to handle_poll(), so there is only one place to
handle error codes.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo 4c6dd4c7b7 net: lib: coap_client: check poll() condition before retrying CoAP msg
Refactor the CoAP retry handling into the handle_poll() function,
so that we only try to send retries if the socket reports POLLOUT.

Also move the receiving into same loop, so when poll() reports POLLIN
we recv() the message and handle it before proceeding to other sockets.

Also fix tests to handle POLLOUT flag and add support for testing
multiple clients.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo 46b7c84512 net: lib: coap_client: Release internal request when failed to send
When transmission of first request fails, reset the internal request
buffer as there is no ongoing CoAP transaction.

Application can deal with the failure.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo 1ea569d776 net: lib: coap_client: Protect initialization with mutex
Protect global list of clients with mutex.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Chaitanya Tata bb2f602b7e shields: nrf7002eb: Add missing SR RF switch GPIO
This causes a build error as nRF70 driver running on CPU APP needs this
when SR co-existence is enabled.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-31 14:17:31 -05:00
Chaitanya Tata d137527f88 boards: nordic: Fix the label for nRF70 SR co-existence
The co-existence modules expect a common and fixed name, so, rename it
to avoid churn.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-31 14:17:31 -05:00
Filip Kokosinski ecf308e8de dts/andes: adjust the sizes of PLIC nodes
This commit adjusts the sizes of the two PLIC nodes AE350 defines:
* `plic0` size is changed from `0x04000000` to `0x02000000`
* `plic_sw` size is changed from `0x04000000` to `0x00400000`

Without these change, `plic0` address space would overlap with `plic_sw`,
and with other memory-mapped peripherals.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-10-31 14:17:02 -05:00
Fabio Baltieri 63890e2526 arch: arm: cortex_m: add memory to the clobber list
Add "memory" to the clobber list"

From GCC 14 the compiler optimizes away memory accesses that do not
impact the asm block. Adding the memory to the clobber list lets the
compiler know that the memory state is to be preserved.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-31 14:16:48 -05:00
Fabio Baltieri 7015a0ee37 arch: arm: cortex_m: move _main in input list
Move the _main argument to the input list rather than the output one on
the asm block and change the spec to "r". The ASM block does not return,
so it does not make sense for it to expect any output.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-31 14:16:48 -05:00
Armin Kessler 78f688a3e7 scripts: twister: Fix serial_py referenced before assignment
This fixes `serial_py referenced before assignment` if `flash_before`
is set.

Signed-off-by: Armin Kessler <ake@espros.com>
2024-10-31 14:16:36 -05:00
Armin Kessler e31bf8bf50 scripts: twister: Add Espressif as manufacturer
Adds Espressif as manufacturer so that generation of HW-Map file is
possible

Signed-off-by: Armin Kessler <ake@espros.com>
2024-10-31 14:16:25 -05:00
Daniel Leung cdb9166b81 cmake: toolchain/xcc,xt-clang: env vars for multiple cores
To use Xtensa toolchain, various environment variables must be
set so the executables can find necessary files and what core
to compile for. This becomes an annoyance when you have to
test multiple boards with different cores. You have to use
one set of environment variables per core. Twister cannot test
them all in one setting, and it is especially annoying doing
west builds. So enhance the environment variables handling so
that TOOLCHAIN_VER and XTENSA_CORE can be replaced by
TOOLCHAIN_VAR_<board> and XTENSA_CORE_<board> where <board>
is the normalized board target (think <board>.yaml). CMake
will then figure out the core ID for the toolchain to use.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-31 09:26:00 -05:00
Daniel Leung 59b2163eeb cmake: toolchain/xt-clang: force assembler ID to GNU
xt-clang uses GNU Assembler (xt-as) based on binutils. However,
CMake doesn't recognize it when invoking through xt-clang. This
results in CMake going through all possible combinations of
command line arguments while invoking xt-clang to determine
assembler vendor. This multiple invocation of xt-clang
unnecessarily lengthens the CMake phase of build, especially
when xt-clang needs to obtain license information from remote
licensing servers. So here forces the assembler ID to be GNU to
speed things up a bit.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-31 09:26:00 -05:00
Lukasz Mrugala ff1857af55 scripts: twister: Enchance TestCase/Instance info and presentation
ExecutionCounter has been expanded and now hold i.a.
more information on the statuses of TestCases.
This information is now incorporated in relevant summaries
- runner.py and reports.py.
Layout of those was changed to present that
and previous information in a clear and concise way.

TestInstance execution counter now is more intuitive.
Instances filtered out before running are no longer included there.
Retries now properly reset the counter.

TestCases with None and other incorrect final statuses
are logged as errors, but do not
exit Twister with a nonzero exit code.
This is because None statuses, although incorrect,
are currently common.

Inconsistent spacing in ERROR and FAILED fixed.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>

scripts: Dmitri fix

Fix of a problem noticed by Dmitri

Removed unnecessary additional spaces when
printing FAILED and ERROR status.
Now TwisterStatus.get_color is used more.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-10-31 09:24:18 -05:00
Damian Krolik 502c9ffb32 drivers: ieee802154_nrf5: skip Enh Ack conf for invalid short address
If the invalid short address (0xfffe) is specified,
configure the Enhanced Ack just for the extended address.
This is needed because Header IEs for Enhanced Ack must be
configured before the short address has been assigned to
the child.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2024-10-31 09:24:03 -05:00
Fengming Ye 91d9cc259d net: wifi: shell: add 80211R usage in connect command
Add 80211R fast BSS transition argument usage in connect command.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-10-31 09:23:48 -05:00
Anas Nashif ac37ba8739 tests/samples: use platform_key on cmsis_rtos tests/samples
Coverage for cmsis rtos APIS should is provided using simulation, we
should not build those on every platform we have. Avoid failures due to
incompatiblities in requirements coming from various boards and also
reduce churn and noise during testing and CI.

Fixes #80215

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-31 09:23:30 -05:00
Emil Gydesen 5ebe1194be tests: Bluetooth: Tester: Fix use of uninitialized cig_id for CAP
The CAP tests used u_group->cig->index but the u_group->cig may
have been deleted when the stream is released, which meant
that u_group->cig == NULL when e.g. unicast_stop_complete_cb
was called and that could cause failing tests as the index
would just be a uninitialized value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-31 09:23:16 -05:00
Piotr Krzyzanowski 74a5599ac8 samples: sensor: qdec: change pins used for qdec nrf54h20dk
Change pins that are used for qdec nrf54h20dk to align with shield
(loopbacks) used in internal CI. This change is needed to start
qdec driver power management testing.

Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
2024-10-31 09:22:58 -05:00
Andreas Huber 075d5d3009 net: mqtt: Fix missing close function
If POSIX_API is not configured the close function is not available.
Use zsock_close instead.

Signed-off-by: Andreas Huber <andreas.huber@ch.sauter-bc.com>
2024-10-31 09:22:44 -05:00
Anas Nashif fad8a1ff31 intel_adsp: fix new style twister configuration
Missed a few keys while moving to the new style twister.yaml file for
the intel_adsp platform. Add those back.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-31 09:22:30 -05:00
Phi Bang Nguyen 8d1a7026c5 samples: video: capture: Fix floating point logging issue
The default frame rate is printed as a floating point number. Without
enabling CONFIG_REQUIRES_FLOAT_PRINTF, it is not printed at all. Fix it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-31 09:22:11 -05:00
Vukan Turkulov 124aae3876 doc: specify thread safety for each data structure
The documentation of "Kernel/Data Structures" incorrectly
states that 'all provided structures are uniformly unsynchronized;
access to them is not threadsafe by default'.
In reality, some of them are threadsafe and some are not.
This might discourage users from using threadsafe data structures
where applicable, or mislead users into adding unnecessary locks.

This proposal addresses the issue by specifying thread safety
for each provided data structure.
My assessment of thread safety is based purely on source code analysis;
hence an expert verification would be appreciated.

Signed-off-by: Vukan Turkulov <vukant@gmail.com>
2024-10-30 18:45:33 -07:00
Riadh Ghaddab 6cc28c78b7 MAINTAINERS: add ZMS maintainer
Add myself "rghaddab" as maintainer to the ZMS storage system as I am
the author of this new storage solution

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-10-30 18:44:30 -07:00
Nicola Ochsenbein 14852f5b6e MAINTAINERS: remove maintainer FatFs
Remove ox11 as maintainer and remove the FatFs reentrant subgroup

Signed-off-by: Nicola Ochsenbein <nici.ox11@gmail.com>
2024-10-30 18:44:18 -07:00
Reto Schneider 743761d7d1 scripts: Fix CMake spelling
As per its creators, CMake is written with a capital "M".

The initial reason for this change is that I want Twister to print
"ERROR : CMake build failure" instead of "ERROR : Cmake build failure".

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-30 16:32:24 -05:00
Timon Skerutsch 054bd850f0 doc: gsg: Add second note about different Linux distributions
The initial note about the install guide for different distributions
can be easily overlooked. Add a second note to make it more prominent
in the first step.

Signed-off-by: Timon Skerutsch <zephyr@diodes-delight.com>
2024-10-30 16:32:03 -05:00
Daniel DeGrasse e075569646 boards: nxp: add documentation for SEGGER SystemView support with ECC
SOCs using ECC require the SEGGER RTT control block address to be
provided to the tooling, as the SEGGER tools will not scan the memory
range of ECC ram. Add documentation making this clear to boards with
these SOCs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-30 16:31:39 -05:00
Riadh Ghaddab 99b7080aba MAINTAINERS: add myself rghaddab to collaborators of Flash
Add myself to the collaborator list of flash to contribute to the work
of enhancement of flash API

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-10-30 16:31:24 -05:00
Daniel Leung 38825c0ac5 tests: timer_behavior: use fabs() instead of abs()
abs() takes integer as argument but time_diff_us is of double.
So use fabs() instead.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-30 16:31:15 -05:00
Daniel Leung cc5adf2e92 tests: timer_behavior: change sqrtf() to sqrt()
sqrtf() is used for floats but the argument and resulting
variable are both doubles. LLVM would complain about
implicit conversion from float to double. So use sqrt()
instead as it is used with doubles.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-30 16:31:15 -05:00
Sa Sasu 5dc5fa5ee2 scripts: print the file name when decode syscall
the script shows an incorrect file name, I check the wrong file first, then
I find the script did not print the current reading file name.

Fix this to prevent others from wasting their time on this.

The new error message:

```
[1/179] Generating syscalls.json, struct_tags.json
Error decoding zmk/.../altera_msgdma.c (included in zephyr/.../ethernet.c)
```

Signed-off-by: Sa Sasu <i@sasa.su>
2024-10-30 14:30:55 -05:00
Pieter De Gendt fa29a07526 doc: develop: west: Add alias documentation
Add documentation and examples for west aliases.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-30 14:30:31 -05:00
Jonathon Penix e020f31fdb cmake: libc: minimal: Avoid linking against other libc implementations
The minimal libc is currently built as a zephyr_library and will be
included in the final link line as such. However, the c_library property
will still be set as "-lc" (for most linkers) and will be added to the
link line. This effectively requires that a separate libc implementation
be available in the toolchain and makes it possible to accidentally pull
from the non-minimal libc.

This doesn't seem desirable, so try to prevent this by clearing the
c_library property if we are using the minimal libc.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-10-30 14:29:37 -05:00