Commit graph

93815 commits

Author SHA1 Message Date
Alberto Escolar Piedras e41ed3886f manifest: Update nRF hw models to latest
* Update the HW models module to
123d37db9cae528d51530c61ba0422192bc03bda

Including the following:
* 123d37d RTC: Fix for TASKS_TRIGOVRFLW with stopped counter

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-12 16:51:23 -04:00
Jukka Rissanen 9324723889 net: pkt: Remove obsolete and not used TCP flag
The tcp_first_msg field is no longer used so remove it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-12 16:50:59 -04:00
Marc Herbert 89493ee56b Revert "toolchain: gcc: Simplify GEN_ABSOLUTE_SYM and GEN_ABSOLUTE_SYM_KCONFIG"
This reverts commit 87779e73f8.

Commit 87779e73f8 ("toolchain: gcc: Simplify GEN_ABSOLUTE_SYM and
GEN_ABSOLUTE_SYM_KCONFIG") "unified the variants from using a
target-specific dialects to a target-agnostic solution". While reducing
duplication is always desired, this "unification" got rid of some
differences between architectures. Among others, this commit generalized
the use of the `c` constant operand modifier in the `GEN_ABSOLUTE_SYM()`
macro. Before this commit, the `c` modifier was NOT in use in a number
of architectures!

Generally speaking, reducing copy/paste/diverge must always be performed
in _two_ distinct phases with ample testing time between the two phases:

1. First, perform functional changes that remove the divergence.

   < give plenty enough time for testing >

2. Finally, remove the identical copies.

More specifically, I understand the `c` modifier may be required by some
architectures, but it's causing problems on other(s). Notably, it broke
the build with one pre-C11, gcc-based Xtensa toolchain:

```
14:03:17 kernel_offsets.h: Assembler messages:
14:03:17 kernel_offsets.h:28: Error: bad expression
14:03:17 kernel_offsets.h:28: Error: junk at end of line,
                                first unrecognized character is `c'
14:03:17 kernel_offsets.h:29: Error: bad expression
14:03:17 kernel_offsets.h:29: Error: junk at end of line,
                                first unrecognized character is `c'
...
```

While newer Xtensa toolchains accept `c`, they also ignore it. `c` makes
no difference whatsoever with all the (working) Xtensa toolchains I
tested. So for `Xtensa`, `c` is a best useless and at worse breaking the
build.

Up to gcc version 12 (2022), the `c` constant modifier was documented as
X86-specific!
https://gcc.gnu.org/onlinedocs/gcc-12.3.0/gcc/Extended-Asm.html#x86Operandmodifiers

Only starting with gcc version 13 (2023), the `c` modifier was
officially supported as "generic":
https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Extended-Asm.html#Generic-Operand-Modifiers

`c` was very likely working with other architectures before 2023, but
not officially and we don't know which architectures and we don't know
when.

Note toolchain/gcc.h is included by toolchain/llvm.h and also used by
clang. The status of `c` across clang versions is unknown.

While I personally hate copy/paste/diverge with a passion, these macros
GEN_ABSOLUTE_SYM() and GEN_ABSOLUTE_SYM_KCONFIG() are very small so that
particular duplication is very reasonable. Architecture-specific code is
tricky and portability across toolchain and toolchain versions even
more. Testing low-level changes like this across different architectures
would also require demanding and unlikely coordination across different
architectures/companies.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-04-12 15:30:40 -04:00
Seppo Takalo 51d80a9838 net: lwm2m: Allow CoAP block size to be changed
Allow changing the CoAP Block-wise transfers block-size
for subsequent GET requests.

It looks like Leshan switches block size back to its
configured value, if it is smaller.
So even when we send block N=0 with size of 512, Leshan
seem to handle that properly but still asks N=2 with
block size 256(if that is configured).

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-04-12 09:14:36 -04:00
Ayush Singh 71437f71df samples: net: sockets: echo_client: Enable subg tcp
- TCP should not be disbled by default for subg in this particular
  sample since it is mostly used to test network rather than
  performance.

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-04-12 15:03:57 +02:00
Ayush Singh e9963be3af samples: net: sockets: echo_server: Enable subg tcp
- TCP should not be disbled by default for subg in this particular
  sample since it is mostly used to test network rather than
  performance.

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-04-12 15:03:57 +02:00
Alberto Escolar Piedras 4f7b144ef6 arch posix: When building for the native_simulator only link ASAN once
Only request the linker to link ASAN in the final stage, not
during the partial linking stage.
This fixes a link issue when building with llvm.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-12 15:03:35 +02:00
Alberto Escolar Piedras b59b21f8bb arch posix: pass -fsanitize-recover=all also to native_simulator build
If the CONFIG_ASAN_RECOVER option is set, also pass
-fsanitize-recover=all to the build of the native simulator
built files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-12 15:03:35 +02:00
Alberto Escolar Piedras 1fcc245eda native_simulator: Get latest from upstream
Align with native_simulator's upstream main
6f6b359c4fe26ddeed8a65ad55f5bc402d3b7f91

Which includes:
* 6f6b359 Avoid issue with llvm address sanitizer

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-12 15:03:35 +02:00
Marek Metelski 1c8ea0a941 cmake: shields: Simplify shield processing, print shields from modules
Fix issue #67244 in which boards from external modules where not
printed in the help message (displayed for `shields` target or
when trying to build with unknown shield). The SHIELD_LIST variable
was reset for each BOARD_ROOT discovered.

Simplify discovery logic. Discover all shields and set relevant
variables (SHIELD_LIST and SHIELD_DIR_${name}) in one step and
process all the expected boards in the next step.

Signed-off-by: Marek Metelski <marek@metelski.dev>
2024-04-12 15:03:29 +02:00
Morten Priess 2f1a254eae Bluetooth: controller: Implement LE Create BIG Test command
Implement test version of the LE Create BIG command ll_big_test_create
(BT_HCI_OP_LE_CREATE_BIG_TEST) in the controller.

This enables use of CONFIG_BT_ISO_ADVANCED, which supports use of
the following BIG/QoS configuration parameters (otherwise derived):

- ISO_Interval
- NSE
- Max_PDU
- BN
- IRC
- PTO

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-04-12 14:58:07 +02:00
Michal Smola 7bf2d8ff46 twister: fix NXP hw detection in hardware map
Some NXP boards are not detected by twister when creating hardware map,
because manufacture name is NXP instead of NXP Semiconductors expected
by twister.
Fix it by adding NXP to manufacturers list.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-04-12 08:44:41 -04:00
Guillaume Gautier 97177ba01a samples: boards: stm32: pm: s2ram: add spi
Add SPI transfer in the suspend to ram samples to test SPI PM.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-04-12 13:49:04 +02:00
Guillaume Gautier b567a7db83 drivers: spi: stm32: add pm support
Add power management support for STM32 SPI

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-04-12 13:49:04 +02:00
Vinayak Kariappa Chettimada cd58325b2a samples: Bluetooth: hci_ipc comment about NRF_DEFAULT_IRQ_PRIORITY
Update comment about use of NRF_DEFAULT_IRQ_PRIORITY in
hci_ipc sample for Nordic nRF53x series.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-04-12 13:48:57 +02:00
Vinayak Kariappa Chettimada 7ece6aed16 Bluetooth: Controller: Fix regression in BT_RX_STACK_SIZE use
Fix regression in BT_RX_STACK_SIZE use due to
commit b91728619c ("Bluetooth: host: remove
`CONFIG_BT_RECV_BLOCKING`").

Profiling of Controller Rx thread has been mentioned in
commit 586ba9fd13 ("Bluetooth: Controller: Increase
BT_RX_STACK_SIZE for BT_HCI_RAW enabled").

Also, move the TX_STACK_SIZE value as default in Kconfig
from the explicit value being set in hci_ipc sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-04-12 13:48:57 +02:00
Piotr Kosycarz c7c6cb4c99 boards: nordic: nrf54h20dk: enable HWFC
For both UARTs connected to debugger chip.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-04-12 13:48:46 +02:00
Guennadi Liakhovetski 1ec6a94679 llext: document positive return values of llext_load()
llext_load() can return positive values when the respective llext use
count is positive. Add the missing documentation.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-04-12 12:02:52 +02:00
Ayush Singh f50a2e58b3 samples: net: zperf: Add subg overlay
- Tested on beagleconnect_freedom

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-04-12 11:54:55 +02:00
Adam Matus 869d4fc041 net: zperf: Improve shell upload cmd
Minor improvements to usage of zperf_shell upload.
Added common defaults for the upload commands arguments.
Print defaults in cmd help.
Throw warning when user sets baud rate for TCP upload.

Signed-off-by: Adam Matus <adam.matus@nxp.com>
2024-04-12 11:54:49 +02:00
Jukka Rissanen d40abe8c0f net: vlan: Fix net_eth_get_vlan_tag() to check correct interface
The network interface parameter for net_eth_get_vlan_tag() should
be the VLAN interface so use the search loop properly.
Earlier the main interface could be checked.

Add also test cases for this so that we can catch that the func
works properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-12 11:54:33 +02:00
Alberto Escolar Piedras 719c4f4036 boards: nrf_bsim: bst hooks: Call tests delete only once
bst_delete() is called from an ON_EXIT hook, which can be called
several times if an exit hook itself fails and calls exit on
its own.
This is not what most tests destructors will expect, and they
may do weird things in this case. So let's not call into it again.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-12 11:54:26 +02:00
Miika Karanki 67de8d58ec scripts: logging: support native_posix dictionary logging
- Do not look CONFIG_* symbols from dynamic symbols which might
  be there before the symbol table where CONFIG_* symbols are found.

- Define posix architecture in ARCHS list.

- Check if architecture is not found instead of letting the code
  run into trying to access dictionary with None key.

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2024-04-12 11:54:18 +02:00
Robert Lubos b292a9e8b5 net: sockets: tls: Add more logging in case of errors
Add more error logs in case of (mostly) mbed TLS errors, so it's easier
to get an initial idea of what went wrong based on logs only. Getting
an information on an actual mbed TLS error code is quite helpful in such
cases.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-04-12 11:54:02 +02:00
Jędrzej Ciupis 2371dce46b boards: raytac: remove direct RESET register access
Replace direct access to RESET register to control the network CPU with
dedicated API, which allows safely sharing the network CPU with other
users.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-04-12 11:31:47 +02:00
Jędrzej Ciupis 2b23a52642 boards: nrf53: switch to the network CPU management API
Switch to the network CPU management API from direct nrfx calls.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-04-12 11:31:47 +02:00
Jędrzej Ciupis ec3c3f153b soc: nordic: nrf53: network CPU Force-OFF management
This commit introduces a common API for managing nRF53 SoC network CPU
Force-OFF state.

From the application CPU point of view, the network CPU is a shared
resource used by multiple users. The current solution where every user
controls the network core state directly leads to dependencies between
users and does not scale well.

To address this problem there should be a single entity responsible for
controlling the network CPU Force-OFF signal. This commit introduces
such module.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-04-12 11:31:47 +02:00
Sebastian Głąb 5600ae335b tests: drivers: clock_control: Add nRF54L15 to platform allow
Add nRF54L15 to platform_allow in the sample.yaml:
- clock_control_api,
- nrf_clock_calibration,
- nrf_lf_clock_start,
- onoff.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-04-12 10:19:57 +02:00
Alberto Escolar Piedras f9e7861f53 manifest: Update nRF hw models to latest
* Update the HW models module to
c8fd53aab0c52b3898e5b89ca7c3e1a96e299306

Including the following:
* c8fd53a RADIO: Support logical address selection
* 31614b4 RADIO: Add test interface to offset Tx and Rx power

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-12 09:53:38 +02:00
Bartosz Miller 211477f874 drivers: Extend coverage for UARTE driver
Add more test cases for UARTE driver API
Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-04-12 09:19:15 +02:00
Erik Brockhoff dca085e155 bluetooth: controller: refactor node_rx_pdu for memory optimization
Generic node_rx_hdr struct contains data not used for done event, so this
pdu specific data is moved to node_rx_pdu to minimize memory usage for
MFIFO_done alloc.

This however calls for a considerable write-through replacing the generic
node_rx_hdr with node_rx_pdu when relevant and needed.

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2024-04-12 09:19:08 +02:00
Joakim Andersson eb133834ca samples: nrfx_prs: Workaround for uninit not clearing events
Add workaround for uninit functions not clearing events for
spim and uarte.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-04-12 09:18:35 +02:00
Joakim Andersson d97c780fb0 samples: nrfx_prs: Add handling of SCK initial value based on mode
Add handling of SCK initial value based on the SPI mode used.
If mode is using CPOL then SCK needs to be set.

Fixes: #71154

Signed-off-by: Joakim Andersson <joakim.andersson@heimdallpower.com>
2024-04-12 09:18:35 +02:00
Joakim Andersson e9cf74b581 samples: nrfx_prs: Fix sample frequency
Fix setting of sample frequency.
The nrfx drivers are now using raw integere values instead of nrf
definitions.

Fixes: #71154

Signed-off-by: Joakim Andersson <joakim.andersson@heimdallpower.com>
2024-04-12 09:18:35 +02:00
Erik Brockhoff 83f0647762 bluetooth: controller: use correct CONFIG for central CIS create proc. data
Use CONFIG_BT_CTLR_CENTRAL_ISO instead of CONFIG_BT_CENTRAL in
declaring central CIS CREATE procedure context data. In some configs the
size of this data structure is bound by central CIS CREATE, so doing it
correctly will save memory in the procedure context allocation.

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2024-04-12 09:18:22 +02:00
Gwen Weinholt 58d204acf9 soc: st: stm32: stm32l4x: enable ART flash cache accelerator
Enable instruction cache, data cache and prefetching.

Signed-off-by: Gwen Weinholt <git@weinholt.net>
2024-04-12 09:18:15 +02:00
Tim Lin ca66e7d5e1 ITE: soc: chip_chipregs: Cleanup it8xxx2 chip registers
1. Distinguish the registers of V1 and V2.
2. Remove unused chip variant configuration.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-04-12 09:18:08 +02:00
Marc Herbert 17081222e2 drivers: dai: intel: ssp: fix LOG_ERR level / false positive
There's no way this log level was intentional: this line is just the
title / prefix of a multi-line section with mostly LOG_INF statements.

Fixes commit 6423bc3bc8 ("drivers: dai: intel: ssp: Improve logging
output") which was very large hence error-prone.

Fixes SOF bug https://github.com/thesofproject/sof/issues/9026

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-04-11 17:30:20 -04:00
Henrik Brix Andersen 00eae2dffd doc: releases: release-notes: 3.7: can_get_{min,max}_bitrate() changes
Mention the new can_get_bitrate_min() and can_get_bitrate_max() CAN
controller API functions along with the deprecating of the existing
can_get_min_bitrate() and can_get_max_bitrate().

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-04-11 17:08:35 -04:00
Henrik Brix Andersen 8eded2f76b drivers: can: add can_get_bitrate_{min,max}(), deprecate existing APIs
Since the minimum/maximum supported bitrates are now stored in the common
CAN controller driver configuration struct, retrieving these can no longer
fail.

Add new CAN controller API functions can_get_bitrate_min() and
can_get_bitrate_max() reflecting this and deprecate the existing
can_get_min_bitrate() and can_get_max_bitrate().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-11 17:08:35 -04:00
Henrik Brix Andersen be54b552d7 drivers: can: fake: specify maximum supported bitrate
Specify a maximum supported bitrate.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-11 17:08:35 -04:00
Henrik Brix Andersen 776f771172 drivers: can: loopback: specify maximum supported bitrate
Specify a maximum supported bitrate.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-11 17:08:35 -04:00
Tom Burdick 4180d70439 dma: Fix error_callback enable/disable confusion
Previously the logic was inverted for error_callback_en where 0 was
enablement and 1 was disable. This was likely done so that the default,
sensibly so, was to enable the error callback if possible. A variety of
in tree users had confused the enable/disable value.

Change the name of the flag to error_callback_dis where the default
remains 0 (do not disable the callback!) and correct in tree uses of the
flag where it seemed incorrect.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-04-11 17:08:10 -04:00
Henrik Brix Andersen 85b3e458ce drivers: can: bump API version from 1.0.0 to 1.1.0
Bump the CAN controller API version from 1.0.0 to 1.1.0 to reflect bus
recovery API changes introduced for v3.7.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-11 16:44:15 -04:00
TOKITA Hiroshi 1c4d7e439f doc: scripts: redirects: fix redirect for arduino_uno_r4_minima
The directory name in boards has been changed with the addition of
support for Arduino UNO R4 WiFi, so add a redirect from
boards/arduino/uno_r4_minima to boards/arduino/uno_r4.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2024-04-11 15:51:33 -04:00
Ederson de Souza 2febacc60b tests/kernel/device: Add tests for device deferred init
Ensure that devices are not ready before calling `device_init()`, but
are after the call.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-04-11 15:50:44 -04:00
Ederson de Souza eeebb4d911 kernel: Device deferred initialization
Currently, all devices are initialized at boot time (following their
level and priority order). This patch introduces deferred
initialization: by setting the property `zephyr,deferred-init` on a
device on the devicetree, Zephyr will not initialized the device.

To initialize such devices, one has to call `device_init()`.

Deferred initialization is done by grouping all deferred devices on a
different ELF section. In this way, there's no need to consume more
memory to keep track of deferred devices. When `device_init()` is
called, Zephyr will scan the deferred devices section and call the
initialization function for the matching device. As this scanning is
done only during deferred device initialization, its cost should be
bearable.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-04-11 15:50:44 -04:00
Jilay Pandya eaa2c60220 refactor: adjust spacing by clang formatting
This commit clang-formats the file after the new additions

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-04-11 20:09:59 +02:00
Jilay Pandya 895e889b38 fix: sensor: veml7700
This commit introduces checks in order to sanitize input data

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-04-11 20:09:59 +02:00
Jędrzej Ciupis 4bbf14ff99 ieee802154: document expected behavior for invalid ACKs
Extend ieee802154 transmit function documentation with the expected
return code for correctly received invalid ACK packets.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-04-11 20:09:23 +02:00