Improve navigability in the documentation by adding a link to the main
HTTP Server documentation page to the HTTP Server sample.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use the same scheme as for string descriptors. Descriptors can be added
or removed using the existend interface.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
We could reuse the BOS header, but there are parts that are only needed
in the legacy device support or used internally and the tests. Move this
parts to the appropriate places.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
It simplifies the macros to create the string descriptors. We also no
longer need placeholders for the SerialNumber descriptor when it is
generated from hwid. In the future, we can store other descriptor types
in the same list.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Do not use application-provided placeholder buffers. Generate
SerialNumber just before ASCII string is converted to UTF16LE. Make
dependency on HWINFO optional, but enabled by default.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move and rework string descriptor data to a separate structure so we can
share memory with another type. Also add description to the
USBD_DESC_STRING_DEFINE macro.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This is slower but should have no real effect. In the future we can
support more than ASCII7 format and store it in other memory areas.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add function to get string descriptor index and function
to remove linked descriptor from a device. This abstracts
it a bit so that the user does not need to know how it is
handled internally.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Microchip external HAL repository has been updated with
the MEC5 HAL for new chips. MEC5 is a full HAL with chip
headers, C peripheral code, and PINCTRL DTSI files. MEC5
is meant for MEC174x, MEC175x, and also include support
for the older MEC172x named as MECH172x. NOTE: legacy
MEC172x in the currest zephyr tree is not affected.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
After recent HWv2 model changes there is defconfig file
broken, so we got incorrect platform configuration. Fix that.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Shows a simple application which loads extensions and some simple
extensions. While everything is inside Zephyr tree, everything can
actually be build from different directories (even machines), as long as
the EDK is generated from the application and used by the extensions.
More information is available at sample's README.
This sample is build only for twister, as it requires a few steps to be
properly run, namely build the EDK, install it somewhere, build the
extensions using the EDK and finally build the application with the
extensions.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This test uses pytest to generate an EDK from a simple Zephyr
application, and uses this EDK to build a simple extension, to ensure
that EDK generation is sane.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Instead of hardcoding `autoconf.h` imacro, get the list of imacros from
the llext flags. As those come in the form of absolute paths, they also
need to be massaged to point from the EDK directory without revealing
host complete paths.
Also, the EDK now keeps the imacros on a different flag,
`LLEXT_GENERATED_IMACROS_CFLAGS`, to keep it similar to other generated
includes.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Some flags are common between in tree extensions and out of tree
supported by the EDK. Instead of duplicating those flags, the EDK reuses
the llext ones.
However, as the EDK has its own needs, two new lists,
`LLEXT_EDK_APPEND_FLAGS` and `LLEXT_EDK_REMOVE_FLAGS` are defined to
allow EDK to append or remove flags as needed.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Besides the LLEXT_CFLAGS, which have all that is needed to compile,
generate more granular ones, LLEXT_INCLUDE_CFLAGS,
LLEXT_ALL_INCLUDE_CFLAGS, LLEXT_GENERATED_INCLUDE_CFLAGS and
LLEXT_BASE_CFLAGS. These are done for convenience, as they can help on
different setups, such as unit testing.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
A new Kconfig option which generates syscall stubs assuming that
extensions will always run on userspace, thus simplifying linking
them, as there's no need for z_impl_ stubs (used for direct syscalls),
CONFIG_LLEXT_EDK_USERSPACE_ONLY.
While defining __ZEPHYR_USER__ could have the same effect for optmised
builds, people building extensions on debug environments - thus
non-optimised - would suffer, as they'd need to somehow make the stubs
available (by either exporting the symbol or implementing dummy stubs).
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Loadable extensions need access to Zephyr (and Zephyr application)
includes and some CFLAGS to be properly built. This patch adds a new
target, `llext-edk`, which generates a tar file with those includes and
flags that can be loaded from cmake and make files.
A Zephyr application willing to expose some API to extensions it loads
only need to add the include directories describing such APIs to the
Zephyr ones via zephyr_include_directories() CMake call.
A new Kconfig option, CONFIG_LLEXT_EDK_NAME allows one to control some
aspects of the generated file, which enables some customization - think
of an application called ACME, willing to have a ACME_EXTENSION_KIT or
something.
All EDK Kconfig options are behind CONFIG_LLEXT_EDK, which doesn't
depend on LLEXT directly - so that EDK features can be leveraged by
downstream variations of loadable extensions.
Also, each arch may need different compiler flags for extensions: those
are handled by the `LLEXT_CFLAGS` cmake flag. An example is set for GCC
ARM.
Finally, EDK throughout this patch means Extension Development Kit,
which is a bad name, but at least doesn't conflict with SDK.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
The nRF54H20 EXMIF peripheral requires word accesses. Doing accesses of
byte or half-word sizes results in bus fault.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
This adds DT aliases for LED and button used in recovery mode of the
MCUboot bootloader, on the 'nucleo_wba55cg' board.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This board includes three gpio-connected LEDs and push-buttons. Include
all missing defines in board's DTS and while at it, fix existing button
definition (missing pull-up enable) and align node names with other
boards (e.g. 'nucleo_wb55rg').
Provided changes were tested on real board with 'blinky' and 'button'
samples.
Additionally, duplicated LED nodes no longer required were removed from
overlay file for this board, in 'suspend_to_ram' sample.
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
There is some instability problems with qemu_riscv32
https://github.com/zephyrproject-rtos/zephyr/issues/72858
which cause this sample test to fail in CI at random.
Let's change the integration platform to a reliable one,
so this test focuses on the sample and does not produce
false test failures due to the platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
nRF54H20DK board is first major user of new UDC DWC2 driver.
Add nRF54H20DK (Application CPU) to allowed platforms in USB device
samples.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
On USBHS, we cannot access the DWC2 register until VBUS is detected and
valid. Kernel event API is used to block if a valid VBUS signal is not
present when the user tries to force usbd_enable().
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The NUMDEVEPS field provides the number of endpoints in addition to the
control endpoint. It is used to iterate over GHWCFG1 register value to
get correct number of configured IN/OUT endpoints. To get it correctly,
we need to use it internally as number including control endpoint.
Interpretation of INEPS misses +1 because value 0 means 1 IN endpoint
and so on.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Although we can get the number of configured OUT and IN endpoints and
endpoint capabilities from the DWC GHWCFGn registers, we need to
configure the number of endpoint configuration structs at build time. On
some platforms, we cannot access the hardware register at pre-init, so
we use the GHWCFGn values from the devicetree to provide endpoint
capabilities. This can be considered a workaround, and we may change the
upper layer internals to avoid it in the future.
Also, add a new vendor quirk to fill in platform-specific controller
capabilities.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Rework and rename vendor quirks to better reflect where they intended to
be called. Number of quirks probably not final and will be trimmed
later.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move most of the controller initialization to a separate function called
during udc_enable(). This allows us to add support for the platform
where the device controller is only available when VBUS is present and
the PHY is powered.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Should increment `ch.chan_idx` instead of `channel_idx`,
otherwise we will be stucked in the loop forever.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
s2ram procedure used RAM magic word for marking suspend-to-RAM. This
method may not work in some cases, e.g. when global reset does not
reset RAM content. In that case resuming from s2ram is detected when
global reset occurred.
RAM magic word method is the default but with
CONFIG_PM_S2RAM_CUSTOM_MARKING a custom implementation can be provided.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit upgrades the LE audio API and implementation
from experimental to unstable.
LE Audio have existing for quite a few years in Zephyr
and is not going anywhere, but at the same time it still
has significant effort remaining before it can be
considered stable.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When Broadcast Sink is connected to Broadcast Assistant then keep
connection when Broadcast Source is removed.
Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
We've reversed core launch order to workaround issue of
ARConnect initialization interfere with secondary cores
startup (we don't want to workaround it in runtime as it's
only possible in case of debug session).
However it bring us new issues with the simulation run:
- mismatch arcnum (core ID) with ARConnect ID
- mismatch arcnum (core ID) with CPU name in nSIM instruction traces
To avoid these issues let's use direct core order for simulation
runs.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
While running the following command:
aplay ... | arecord ...
multiple times, it was discovered that the SAI transmit
FIFO goes into underrun. This only happened in the
beginning, a few BCLK cycles after unmasking the transmit
data line. With the following flow:
1) Trigger start on RX
a) Do TX and RX software reset
b) Enable RX FIFO error interrupt
c) Enable RX DMA requests
d) Enable receive data line
e) Enable transmitter
f) Enable receiver
..... some time has passed .....
2) Trigger start on TX
a) Enable DMA requests
b) Enable transmit data line
and configuration in mind:
1) RX is SYNC with TX
2) TX is ASYNC
3) Each FSYNC edge is 32-bit wide
4) Each frame contains 2 32-bit words
this points to the following possibilites:
1) The transmitter is enabled so close to the
start of a new frame that even though the DMA requests
are asserted, the DMAC doesn't have enough time
to service them until the module goes into underrun
=> the timing is bad.
2) The transmitter is enabled somewhat close to
the start of a new frame such that the DMAC is not
fast enough to service the module until it goes into
underrun => DMAC is too slow AND the timing is bad.
Although the exact cause was not pinpointed, this patch
aims to fix the problem by writing a frame's worth of 0s
in the transmit FIFO. This way, even if we're dealing with
scenario 1) or 2), the DMAC has plenty of time to perform
the transfer (i.e: a frame), thus avoiding the underrun.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The vbat driver requires the adc node to be enabled:
```c
.adc = DEVICE_DT_GET(DT_INST_IO_CHANNELS_CTLR(inst))
```
Update its Kconfig to depend on `DT_HAS_ST_STM32_ADC_ENABLED`,
which is the `"st,stm32-adc"` compat that all ST ADC bindings
include, this will guarantee that at least one ADC node is
enabled, but not necessarily the ADC used by the vbat node.
To make sure that it at least compiles, we init the `adc`
pointer only if the specified ADC node is enabled, otherwise
it will points to `NULL`.
Finally, check if the `adc` points to `NULL` in
`stm32_vbat_init`. We are not relying on the existing
`device_is_ready` check because `DEVICE_DT_GET` will not
return `NULL` if the ADC is enabled. `adc == NULL` means
that the ADC node is not enabled in the devicetree.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This sample assumes that two separate sockets can be bound on IPv4 and
IPv6. On Linux (via Native Simulator Offloaded Sockets) this is possible
when there is no IPv4 to IPv6 mapping. Same can be true to other offloaded
sockets.
CONFIG_NET_IPV4_MAPPING_TO_IPV6 is disabled for this sample, so IPv4 to
IPv6 mapping is disabled for Zephyr native IPv6 layer. For offloaded
sockets this option does not define whether mapping is enabled or not, so
try to unconditionally (and without error checking) disable it.
This patch fixes compatibility with NSOS, since two separate sockets can be
bound on the same address and port, one for IPv4 and second for IPv6.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
According to 'man 7 socket' about SO_PRIORITY:
Setting a priority outside the range 0 to 6 requires the CAP_NET_ADMIN
capability.
So use 6 instead of 8, in order to make UDP socket tests pass with native
offloaded sockets on native_sim platform.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>