Commit Graph

104750 Commits

Author SHA1 Message Date
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
Dominik Ermel d7765ccae7 tests/stream_flash: Disable SPI_NOR on nrf54l devices
The stream flash test has been written with SoC internal
storage in mind and its simplified structure does not take
into account possibility of existence of devices with
different erase characteristics, at run time.
The commit fixes the test failing with Nordic bords that
have CONFIG_SPI_NOR=y set by default, which made test
to behave like device with erase capability has been tested.

The commit sets CONFIG_SPI_NOR=n for nrf54l devices.

Fixes #79181

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-10-30 14:29:13 -05:00
Jacob McClellan 39042dc9cc logging: Initialize 'chosen' pointer in z_log_msg_claim_oldest to NULL
Fixes a compiler warning 'chosen' may be uninitialized when later
dereferenced

Signed-off-by: Jacob McClellan <mcclellanjacob@meta.com>
2024-10-30 14:28:52 -05:00
Jeroen Broersen f889c1abab net: lwm2m: Add TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 to cipher list
Add TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 to the list for use with x509
certificates. The LWM2M v1.1 specification says that a LWM2M client
which used X509 certificates must support this ciphersuite and
additional ciphersuites may be supported.

Signed-off-by: Jeroen Broersen <jbroersen@interact.nl>
2024-10-30 14:27:40 -05:00
Emil Gydesen 3a8ce6efb4 tests: Bluetooth: tester: Add logging of messages for BTP
Add log statements for each command, event and response
for debugging purposes.

Tests do not send enough of these to clutter the IUT logs
and it is useful for debugging to more easily determine
what command triggered a function call or when the
responses and events are sent to the AutoPTS client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-30 14:27:23 -05:00
Benjamin Cabé 3c83604b84 doc: extensions: check dead zephyr_file/zephyr_raw links
Add a check to ensure that all zephyr_file/zephyr_raw links are pointing
to valid paths in the current zephyr tree.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-30 09:43:50 -07:00
Benjamin Cabé 14d0a19cc2 doc: fix occurrences of broken zephyr_file: links
In preparation of adding a check for dead references, this commit fixes
currently broken zehpyr_file: links.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-30 09:43:50 -07:00
Chaitanya Tata 92985011b6 drivers: nrfwifi: Fix memory leak in TX path
During secure association, if we get any data packets from the
networking stack (as we switch off the dormancy) then they will be
dropped till the 802.1x port is authorized, but with recent changes the
corresponding network buffer isn't freed causing a memory leak.

Handle this case and free the network buffer (Using an OSAL API though
it's Zephyr to avoid duplication and also getting access to "struct
nwb");

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-30 09:43:41 -07:00
Fin Maaß 83c3b1c708 drivers: flash: spi_nor: simplify defines
simplify defines by using `DT_INST_**_OR` macros.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-30 09:43:18 -07:00
Fin Maaß 27aeabb5b2 drivers: flash: spi_nor: fix config struct
lots of values from the DT where not set corretly, if
`CONFIG_SPI_NOR_SFDP_RUNTIME` was
enabled. This fixes it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-30 09:43:18 -07:00