Commit graph

92815 commits

Author SHA1 Message Date
Grzegorz Swiderski 7b2c947ac8 sysbuild: Apply FILE_SUFFIX to sysbuild.conf
Unless `SB_CONF_FILE` is set by the user, an optional `sysbuild.conf`
file is taken by default. If `FILE_SUFFIX=foo` is set, then it should
also be possible to find `sysbuild_foo.conf`, just like with `prj.conf`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-03-22 12:41:32 +00:00
Grzegorz Swiderski 073240fa68 samples: drivers: mbox: Use FILE_SUFFIX
Simplify this sample's recently updated configuration, and ensure that
the file suffix feature works in sysbuild.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-03-22 12:41:32 +00:00
Grzegorz Swiderski 3cff550180 cmake: configuration_files: Add missing FILE_SUFFIX handling
for Kconfig fragments in the `boards` application subdirectory.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-03-22 12:41:32 +00:00
Grzegorz Swiderski 50f0454fbd cmake: extensions: Change zephyr_file() argument parser prefix
Replace `FILE` with `ZFILE` as the prefix for `cmake_parse_arguments()`.
This is because `zephyr_file()` accepts `SUFFIX` as function argument,
and it should not be accessible as `FILE_SUFFIX` as it would conflict
with the CMake cache variable of the same name. Accessing the argument
as `ZFILE_SUFFIX` prevents the cached value from slipping into the
function scope.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-03-22 12:41:32 +00:00
Grzegorz Swiderski 438c95458f cmake: Fix doubling FILE_SUFFIX on boards/*.overlay files
When building with `-DBOARD=plank -DFILE_SUFFIX=foo`, the build system
could set `DTC_OVERLAY_FILE` to one of:

  - boards/plank_foo_foo.overlay
  - boards/plank_foo.overlay
  - boards/plank.overlay

The first choice is a bug, as the suffix should only be applied once.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-03-22 12:41:32 +00:00
Carles Cufi 592f434d0e Revert "Bluetooth: tests: bsim: host/adv/resume2"
This reverts commit d00cdf9868.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-03-22 07:36:55 -04:00
Torsten Rasmussen 1497104de4 unittest: update unittest to hwmv2
Follow-up: fe25709a9c twister: add unit_testing soc and board

Moving the soc.yml and board.yml to subsys/testsuite tree.
Introduce subsys/testsuite/arch/archs.yml with unit_testing arch.

Update the Zephyr CMake module unittest.cmake to include HWMv2 and
reorder includes to follow same order as zephyr_default.cmake.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-03-22 11:51:58 +01:00
Torsten Rasmussen fd772f8e77 scripts: remove boards_legacy sub-folder from list_boards.py
Fixes: #69785

The boards_legacy sub-folder was temporarily introduce in collab-hwm
branch during porting to HWMv2.

This should have been removed before merging collab-hwm to main as it
prevent looking up boards in oot roots.

Removing the temporary sub-folder for HWMv2.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-03-22 11:51:58 +01:00
Luis Ubieda 0186a96419 doc: release: Add information on UART over Bluetooth LE and NUS Service
Add documentation on relevant sections to list addition of Bluetooth LE
service NUS (Nordic UART Service), as well as the UART driver for UART
over Bluetooth LE and snippets to easily enable it.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-22 10:25:37 +01:00
Luis Ubieda f67dc14a64 samples: shell: Add support for UART over Bluetooth LE NUS
Tested and working with nrf52840dk/nrf52840.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-22 10:25:37 +01:00
Luis Ubieda 1347a7e820 samples: logging: Add support for UART over Bluetooth LE NUS
Tested and working with nrf52840dk/nrf52840.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-22 10:25:37 +01:00
Luis Ubieda 0beefffd1b snippets: Add nus-console snippet
Allowing to be applied on various samples to enable UART over Bluetooth
LE NUS without added complexity.
Tested with nrf52840dk/nrf52840 on the following samples:
- samples/subsys/console/echo.
- samples/subsys/console/getchar.
- samples/subsys/console/getline.
- samples/subsys/logging/logger.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-22 10:25:37 +01:00
Luis Ubieda 6fbbd6de24 bluetooth: nus: Add Kconfig option to auto-start Bluetooth LE
Enables compatibility of NUS for codebases that are not
Bluetooth-centric (e.g: Non-bluetooth samples that use UART over
Bluetooth LE for Console, Logging, Shell, others).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-22 10:25:37 +01:00
Luis Ubieda 205994b87b drivers: serial: bt: Add UART over NUS Bluetooth driver
Enables usage Bluetooth LE GATT as a serial endpoint to exchange data
using UART APIs. This implementation is compatible with UART Interrupt
Driven APIs and uses the nus-uart device-tree node properties to
configure FIFO buffers for transmitting and receiving. Defining
multiple instances of the driver is possible and it allows implementing
multiple GATT NUS service instances to exchange data as separate serial
endpoints.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-22 10:25:37 +01:00
Luis Ubieda d834ec875e samples: bluetooth: nus: Add Peripheral NUS sample
Demonstrating basic usage of NUS to exchange data.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-22 10:25:37 +01:00
Luis Ubieda f6b1b24a50 bluetooth: services: nus: Add Nordic UART Service
NUS is implemented as a Bluetooth LE service, exchanging data treating
the NUS characteristics as Serial endpoints: RX characteristic to
receive, TX characteristic to send binary packets.

This implementation also enables the ability to define multiple
instances of the NUS Service, analogous to mutliple serial endpoints,
to use each one for different purposes. Unless disabled through Kconfig,
NUS instantiates a default instance, similar to what other services do,
which allows users not interested in using multiple instances, to not
worry about the inherent complexities.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-22 10:25:37 +01:00
Aleksander Wasaznik d00cdf9868 Bluetooth: tests: bsim: host/adv/resume2
This test is an attempt at formalizing at least part of the behavior
described in commit 6a79c3deae.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-22 10:25:07 +01:00
Aleksander Wasaznik ebd176905a Bluetooth: testlib: add bt_testlib_disconnect
This is a convenience function.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-22 10:25:07 +01:00
Aleksander Wasaznik 89c9491804 Bluetooth: testlib: add bt_testlib_conn_wait_free
This function waits for a free connection slot. It should be used to
slow down a busy loop trying to obtains a connection slot.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-22 10:25:07 +01:00
Aleksander Wasaznik c84c9beece Bluetooth: testlib: Add bt_testlib_conn_unindex
This function obtains a reference to a connection object by its index.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-22 10:25:07 +01:00
Aleksander Wasaznik dd038b4405 Bluetooth: testlib: Support BT_SMP=n
This is the minimal change to make compilation with `BT_SMP=n` work.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-22 10:25:07 +01:00
Fin Maaß 47424e0add task_wdt: add shell
add shell for task_wdt

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-03-22 10:24:55 +01:00
Fin Maaß 6c1e447fbe task_wdt: reformat Kconfig
reformat Kconfig for task_wdt

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-03-22 10:24:55 +01:00
Fin Maaß b61d6ce46e mgmt: hawkbit: check http status code in response
check http status code in response

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-03-22 09:24:45 +00:00
Herman Berget 976da5da5c samples: hci_uart_async: Dont try to receive 0 bytes
It is not necessary and it ends up in an nrfx assert.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2024-03-22 10:24:38 +01:00
Anas Nashif f73af06f2b twister: better help for --no-update option
Add some more details to the --no-update option.

Fixes #70173

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-22 10:24:22 +01:00
Robert Lubos 323f1f81b9 net: dhcpv4_server: Add option to NAK Request from unrecognized client
Zephyr's DHCPv4 server does not implement persistent storage of address
leases. In result, all leases are lost on reboot, which can cause
delays with clients starting in INIT-REBOOT state and thus sending
(potentially several) Requests before attempting full Discover-Request
procedure.
Add option to override RFC defined behavior, which states that if we
don't recognize the client sending the Request, the server shall remain
silent. Enabling that option allows the server to send NAK reply in case
client is not recognized, informing the client it should proceed with
full procedure.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-22 10:24:15 +01:00
Robert Lubos 09c4328b2a tests: net: dhcpv4: server: Fix tests after including client ID
Client ID option is now expected in Request/Ack responses so tests need
to be updated accordingly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-22 10:24:15 +01:00
Robert Lubos fd113b7102 net: dhcpv4_server: Include client ID in server responses
RFC6842 updated RFC2131 in terms of including client ID option in
responses sent from the server. According to that RFC, the server MUST
include the client ID option in Offer/Ack/Nak replies, if it was
provided by the client.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-22 10:24:15 +01:00
Robert Lubos 41ffc5fabb net: dhcpv4_server: Improve DHCP Request retransmission handling
In case ACK from the server was lost, we'd not reply Request
retransmissions, as the lease state is already in allocated state on the
server side. Therefore we also need to allow to reply with ACK in such
case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-22 10:24:15 +01:00
Robert Lubos 50e0807c0a net: dhcpv4_server: Increase reserved address timeout
5 seconds turned out to be too short timeout in case retransmissions
kicked in at DHCP level, hence increase the timeout.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-22 10:24:15 +01:00
Jamie McCrae 15385c7f52 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  24ac8cc2be9384288829aac7477f522a7a71f3d4

Brings following Zephyr relevant fixes:
 - 24ac8cc2 boot: zephyr: Fix disabling I/D caches
 - 5d067f0e zephyr: boards: set BOOT_MAX_IMG_SECTORS value for
   rd_rw612_bga
 - aafcbad6 boot: Refactoring image dependency functions to reduce
   code size

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-03-22 09:24:08 +00:00
Daniel DeGrasse 6b3e14e7d5 drivers: pwm: pwm_mcux_ctimer: use correct clock subsystem ID
With the merge of zephyrproject-rtos/zephyr/pull/70254,
MCUX_CTIMER_CLK_OFFSET is no longer defined nor needed. Remove this from
the macro getting the clock subsystem in the ctimer PWM driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-22 10:23:58 +01:00
Alberto Escolar Piedras 11e9c71059 twister bsim harness: Fix for hwmv2 platfrom names
The new hwmv2 platform names have "/" and "@" in
their names, we need to replace those with "_".
Otherwise the harness will produce a FileNotFoundError
exception when trying to create the executable.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-22 10:23:52 +01:00
nagendra modadugu 6b621a2939 dts: opentitan: update plic interrupt count to match spec
previously `184`, update to `182`, per:
https://opentitan.org/book/hw/top_earlgrey/ip_autogen/rv_plic/

Signed-off-by: nagendra modadugu <ngm@meta.com>
2024-03-22 09:23:46 +00:00
Erwan Gouriou 0014ec9f33 boards: st: tfm: Update board documentation
regression.sh path is now tfm/api_ns/regression.sh, reflect it in the
doc.
Remove duplicate TF-M material.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-03-22 09:23:30 +00:00
Erwan Gouriou 83369d7b7c boards: st: nucleo_u575zi_q: Remove TF-M from board doc
There is no ns variant available for this board.
Remove references from board doc.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-03-22 09:23:30 +00:00
Erwan Gouriou cb891ba45e boards: st: nucleo_u5a5zi_q: Remove TF-M references
This board is not available in TF-M, remove any TF-M related material.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-03-22 09:23:30 +00:00
Erwan Gouriou c7e084e75b boards: st: nucleo_l552ze_q: Populate ns flash partitions
Rather than providing flash partitions in samples, provide default
partition (no tests) as part of the board ns variant default configuration.

Update or remove related overlays.

Update ns variant yaml file to specify actual flash available for the
ns application (36K).

Additionaly, fix comment in b_u585i_iot02a_ns.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-03-22 09:23:30 +00:00
Erwan Gouriou 7a7abb7b18 soc: st: Set BUILD_WITH_TFM by default (when required)
CONFIG_BUILD_WITH_TFM should always be set when building a non
secure target.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-03-22 09:23:30 +00:00
Erwan Gouriou 3a383aad6c boards: st: Clean up compiler related directives
Clean up early days TF-M development directives which are outdated today.
Factorize remaining CMake instructions in soc.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-03-22 09:23:30 +00:00
Tomasz Bursztyka 7004f373f2 disk/nvme: Update copyright headers
Most of the code is a port of FreeBSD's NVMe's driver, made by Jim
Harris (Intel).

Though all subsequent contributions that happened on this original
driver were made on files copyrighted by Intel, and under BSD-2 clause,
let's update the copyright header to point out Jim's original work and
major contributors were relevant.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-22 09:23:00 +00:00
Johann Fischer ae08fe99ae samples: cdc_acm: use USB notification messages to detect DTR
Use USB notification messages to detect DTR and baudrate updates.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-03-22 10:10:42 +01:00
Johann Fischer 77e0a9ef20 samples: usb: add message callback registration to the common code
This allows samples to receive earlier notification immediately after
initialization.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-03-22 10:10:42 +01:00
Johann Fischer 567827add8 usb: device_next: use USB notification in CDC ACM implementation
Add message types for line coding and contol line state updates.
Add a publish message function that takes a pointer to a device
structure as payload, and use USB notification in the CDC ACM
implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-03-22 10:10:42 +01:00
Johann Fischer 3aef852fc0 usb: device_next: implementation of USB device support notification
The implementation uses the system workqueue and a callback provided
and registered by the application. The application callback is called in
the context of the workqueue. Notification messages are stored in a
queue and delivered to the callback in sequence.

We cannot call application callback directly from the USB device stack
thread because the behavior of arbitrary code provided by the
application is unpredictable, and we do not want it to be executed in
the same context where all events from the device controller are
handled.

Nor can we use the ZBUS subsystem directly. ZBUS offloads responsibility
for defined behavior to the observers and application, and does not
provide any way for the publisher to enforce defined behavior and
execution context.
ZBUS listener would be called from the USB thread context and is not
acceptable. ZBUS subscriber does not provide delivery guarantee and
cached message can be overwritten. ZBUS message subscriber has
cumbersome global configuration and buffers that are too complicated to
handle from USB configuration, and even if we would use it, defined
behavior is not possible because of how listener and subscriber are
handled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-03-22 10:10:42 +01:00
Johann Fischer 13022ceab7 drivers: udc_dwc2: enable SOF interrupts and SOF events
Enable SOF interrupts and SOF events.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-03-22 10:10:26 +01:00
Jamie McCrae 0c936f8bda tests: drivers: mbox: mbox_data: Fix usage of board name checking
Fixes using outdated hwmv1 board name checking with proper board
defines

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-03-22 10:06:04 +01:00
Jamie McCrae 931d286b57 samples: shields: x_nucleo_iks01a3: Fix deprecated config fragment
Fixes uses an old deprecated way of setting a Kconfig fragment
file for this sample

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-03-22 10:06:04 +01:00
Jamie McCrae f70aa925d7 samples: logging: multidomain: Fix usage of board name checking
Fixes using outdated hwmv1 board name checking with proper board
defines

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-03-22 10:06:04 +01:00