Using < > in the kconfig:option role was causing the <_board> section
to be omitted from the rendered docs, and using the role was useless
anyway as the option name was not a real one.
Use the fancy :samp: role instead to achieve the same goal.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Added links to relevant doc pages when appropriate
Added a mention about PTP
Added a mention about PSA Crypto
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Cleaned up migration guide, mostly fixing single quotes being used
instead of double quotes plus some other minor spelling mistakes.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix indendtation in posix deprecations.
The top-level bullet was indented by an extra space, so remove
the space.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This patch fixes two broken links in the LED strip release note.
:kconfig:option: cannot be used with removed Kconfig options. This
results in broken links. Let's use the code's inline markup delimiter
instead.
It also adds a missing link to the DT compatible of the IS31FL3194
controller.
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
This reverts commit a156b619d4.
Now that Sphinx 7.4 is out, it is possible to use webp images
in the PDF documentation (they're converted to png).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commits adds release notes for the 3.7 release for the following
maintenance areas:
* Microchip RISC-V Platforms
* LiteX Platforms
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
A few previously deprecated Kconfig options have not yet been
present for 1 release cycle and can (theoretically) just be
removed, without deprecation (see next commit).
* GETENTROPY
* POSIX_CONFSTR
* POSIX_ENV
* POSIX_SYSLOG
For dependency information, please see
https://docs.zephyrproject.org/3.6.0/kconfig.html#kconfig-search
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Make a PR description an expectation/requirement for
pull requests submitted to the zephyr project.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Let's mention this GPL licensed file, even that it
is just a configuration file.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Current implementation will not work if comits were not provided.
ie. use case with list of changed files will fail as args.commits is None.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Treat Bluetooth Classic similar to Bluetooth Mesh and Audio by
not including it in the BT host, as most of the BT Host people
are LE-only.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The API was placed under a non-existing group: coresight_apis. Place it
under os_services, as other debug/ APIs.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Correct license identifiers in two files copied from internal Nordic
repositories that were not properly adjusted for Zephyr:
- dts/bindings/flash_controller/nordic,rram-controller.yaml (added in
commit 3a8ee7df91)
- dts/bindings/misc/nordic,nrf-dppic-local.yaml (added in commit
796d09d2a6)
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Adds release notes for Nuvoton Numaker M2L31X SoC, drivers and board
introduced since the last release.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
Add migration guide info for the DT property names of the
microchip,ksz8081 binding being changed.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
While doxygen comments on subsequent lines with the `/*<` is technically
valid, it is not standard. It also confuses at a minimum the `vscode`
intellisense provider, which assigns the comments to the wrong enum
values.
Signed-off-by: Jordan Yates <jordan@embeint.com>
After recent nsim SoCs & boards reorganization the SOC_SERIES_*
config is missing for vpx5 SoC which leads to cmake errors
when building against nsim/nsim_vpx5 configuration.
Fix that and align soc series name in soc.yml
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
clarify membership eligibility and need to be a project collaborator,
add references and link to them.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add notes for Nordic HAL and a few more entries for I2S and PWM drivers,
as well as for Nordic SoCs and boards.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add Infineon CYW20829 SoC and board information to release notes for
Zephry 3.7.
Signed-off-by: Fyall Ian (CSS ICW SW MTO INT) <ian.fyall@infineon.com>
There is one externally visible change which affects
the process of booting the audio DSP from the host,
where dedicated registers are now used to communicate
the boot status instead of using arbitrary memory
locations. This affects the ACE family of audio DSP.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The declaration of statically allocation stacks have been
updated to use another macro, which also unifies both
single stack declaration and array stack declaration.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds some bits on demand paging and eviction algorithm as
the logic of NRU has changed, and LRU introduced.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Docs now start at a high level, discussing sensors, attributes,
channels, and reading data from them.
Followed by more detailed usage guides in how to solve common problems
sensor users may run into.
Additionally renames the sensor_api sphinx tag to sensor
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
It's more than just an API doc and the label was longer than needed,
shorten to rtio as a doc label.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
The source files required for this features are not present
in the tree for this SOC.
So if CONFIG_PM or CONFIG_POWEROFF are enabled, there would
be a cmake failure.
Let's just indicate these features are not supported in
kconfig.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Since the kconfig preprocessor functions are under the devicetree
maintainance area, the documentation for them probably should be too.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Adds release notes for notable changes and new sensor drivers introduced
since the last release. Organizes changes by sensor vendor to reflect
similar changes made in the tree.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Apple has released other processors, e.g. M2 or M3, so Apple Silicon is no
longer a synonym of M1.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Make it depend on MBEDTLS_PSA_P256M_DRIVER_ENABLED instead of
selecting it.
This fixes the build of
tests/crypto/secp256r1/crypto.secp256r1.p256-m_raw on filtered-out
platforms since PR #75441 (83cd9f5a01).
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
As the items come from the memory slab, their initialization state
can't be guaranteed. This is causing some devices triggering an assert
in p4wq where the item's thread is not null (not zero).
Signed-off-by: Luis Ubieda <luisf@croxel.com>
`struct acl_data` is used even when Host flow control is not enabled.
It is written to through the `acl(buf)` accessor in `conn.c:hci_acl()`.
Hopefully no netbufs were harmed by that :/
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This removes the TF-M CMake warning "Actual TF-M version is not
available from Git repository. Settled to v2.1.0" which always
got triggered because Zephyr's TF-M repo does not have the upstream
Git tags.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Add a sample that can test various TF-M build options. For now we only
test `CONFIG_TFM_BL2=n` and `CONFIG_TFM_MCUBOOT_IMAGE_NUMBER=1`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fix builds with `CONFIG_TFM_MCUBOOT_IMAGE_NUMBER=1`. The merged binary
should be signed with the same argumements as a secure build, not a
non-secure build, except with a different layout file generated by the
TF-M build system.
Fixes#68345.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Currently, the NFCT pins cannot be used as GPIOs on the nRF54L15 MCU
because the Nordic HAL for this MCU uses the new upcoming `NRF_CONFIG_`
style configuration settings for this MCU.
To support all nRF5x MCUs, the old configuration is still required
because Nordic didn't update their MDK entirely to the new style.
Signed-off-by: Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
Since the introduction of HWMv2, boards can have multi-arch SoCs (e.g.
nRF54), so changes to these kind of boards do not have a clear place
now. Simply group all of them together.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Doing duplicates count of bugs, a PR fixing a bug is not a bug report.
Many PRs fixing an open bug are labeled with 'bug' and thuse are being
counted twice.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Current if CONFIG_XIP is enabled, then ALIGN_WITH_INPUT and the align
argument to SECTION_DATA_PROLOGUE are set together, and that is not a
valid option combination; if ALIGN_WITH_INPUT is present, then the
section's LMA alignment is inherited from the previous section, and that
cannot be combined with another alignment option.
The background for this line is in the following commit:
6b3c5e8bb2
Additionally, this is the documentation from ld:
(from https://sourceware.org/binutils/docs/ld/Forced-Output-Alignment.html)
> 3.6.8.3 Forced Output Alignment
>
> You can increase an output section’s alignment by using ALIGN. As an
> alternative you can enforce that the difference between the VMA and
> LMA remains intact throughout this output section with the
> ALIGN_WITH_INPUT attribute.
Signed-off-by: Tavish Naruka <t-naruka@ispace-inc.com>
RISC-V trap entry is handled in soc/common/riscv-privileged/vector.S.
Remove the redundant modification in CLIC driver.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
CLIC should be the first level interrupt controller because it replaces
the basic RISC-V local interrupt.
The interrupt level in CLIC controls preemption between IRQs, rather than
specifying the number of nested interrupt controllers.
Removed CONFIG_MULTI_LEVEL_INTERRUPTS and the incorrect interrupt level.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
A patch was added to the voltage divider to handle an erroneous
negative voltage reading for the nrfx_saadc which could return
negative voltages even though the ADC mode was single ended.
This has now been patched in the ADC driver.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The NRF SAADC produces negative values in single ended mode if the
positive input is below 0V (ground). This behavior does not match
the ADC device driver API, which states that in single ended mode,
the readings must be positive [0 .. 2^resolution - 1].
This commit extends the adc_nrfx_saadc device driver to track which
channels in a sequence are configured to be single ended, to then
corrects negative readings for these channels to 0.
This patch only works if the ADC resolution is lower than the sample
bit size. This is the case for 8, 10, 12 and 14 bit resolutions for
the nRF 52, 53 and 91 series which store readings in a int16_t.
The nRF 54H and 54L series store 8-bit resolution readings in a 8-bit
sample size. A check has been added to start_read() to prevent single
ended mode readings if the resolution is 8-bit for these platforms.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The DPSRAM ports can run at different clocks, this is the default
configuration, follow the advice in the datasheet and wait 3 nop
instructions before setting the AVAILABLE bit.
It can be observed that when the controller is continuously sending data
to the host, it rarely has a 0-byte transaction instead of a short
packet. The reason for this is not easy to find, it also seems to depend
on the runtime of individual components. This may fix the problem, but
there is no sure proof that this is the solution.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Don't provide __STDC_LIB_EXT1__ macro (Extensions to the C Library,
Part 1: Bounds-checking interfaces) if we use minimal libc - as we don't
have functions from this extension implemented in minimal libc.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/lib` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/l2` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/lib/lwm2m` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
It looks like sample called nrf53_cpunet_enable(false) before any
nrf53_cpunet_enable(true), resulting in asserts due to unbalanced calls
(error propagated from onoff service).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
When building `native_sim` with CPP & POSIX enabled, the
POSIX's `unistd.h` header causes a compilation error as
`sys/_timespec.h` doesn't exist in host gcc lib.
Remove the 'zephyr/posix' prefix, and rely on
`CMakeLists.txt`s to do the routing accordingly:
- zephyr/lib/CMakeLists.txt:L11
- zephyr/lib/posix/options/CMakeLists.txt:L8
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add more memory to dma region for cpurad as otherwise it fails
during initialization due to not enough memory for dmm heap.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
In function nrfs_backend_send_work tx_data buffer was
used in function ipc_service_send instead of
data_to_send. This is fixed and also tx_data and rx_data
are moved to coresponding functions preventing such
issues in future.
Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
This patch adds support for the rx-invert and tx-invert device-tree
properties to the uart_lpc11u6x driver for USARTs 1, 2, 3 and 4.
Note that this feature is not supported by USART 0.
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Add missing documentation for some defintions in tbs.h
Moved some internal definitions to tbs_internal.h
Removed invalid TBS technology BT_TBS_TECHNOLOGY_IP that
doesn't exist.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add missing documentation for some defintions in gmap.h
Also added missing C++ guards, group and version.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add missing documentation for some defintions in gmap_lc3_presets.h
Also added missing C++ guards, group and version.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add missing documentation for some defintions in bap_lc3_presets.h
Also added missing C++ guards, group and version.
Fixes some formatting.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add missing documentation for some defintions in audio.h
Makes formatting and placement of @brief consistent.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The sample will print a ping-pong message indefinitely on both,
application (or main) core and remote core. When twister is run in
device testing mode, only one terminal is evaluated (application), so
the regex just needs to account for the application core output, not
remote.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
When CONFIG_LOG_OUTPUT is enabled that indicates that logging
strings are used by the runtime logging processing so they should
not be stripped from the binary.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The CPP in ARC MWDT toolchain relies on TLS (THREAD_LOCAL_STORAGE)
so enable it if CPP is selected.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
When 'arch_switch()' switches though Ecall, 'exception_depth' is
incorrectly added to the next thread because the current thread is updated
before arch_switch().
Add 'exception_depth' back to the previous thread when Ecall is called from
'arch_switch()'.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
The `tests/posix/headers/portability.posix.headers.without_posix_api`
test fails to build in case of toolchain which uses minimal libc by
default (for example ARC MWDT toolchain).
It can be easily fixed by providing sighal.h handler in minimal libc
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
remove litex,sys-clock-frequency from litex,clk,
because we already define that in the clock-frequency of cpu0.
This can be accessed via
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
A recent commit fb53d2ef8d ("ace: power: replace pseudo-assembly
movi") contained a bug: the Xtensa "movi" assembly instruction must
be written with the immediate argument already shifted left by 8, the
compiler doesn't do that automatically. This still somehow worked on
MTL but failed on LNL. Fix both occurrences.
Fixes: #75700
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Many ztest macros were not indexed correctly as part of the ztest_test
group, for example ZTEST_SUITE was completely missing in the
documentation.
In addition, document a few macros that did not have any documentation.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add an extra workflow step to block PRs with an empty description so that
these gets flagged automatically and reviewers don't have to ask for it.
Add a message in the actual fail step as well so it's easier for the
user to figure out what went wrong, even in the existing compliance
check case.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
PR #63973 namespaced generated headers with zephyr/, including generated
syscall headers.
Since then, some new generated syscall header includes have been added
without the zephyr/ prefix, breaking builds when
CONFIG_LEGACY_GENERATED_INCLUDE_PATH is disabled.
This commit adds the zephyr/ prefix to includes for generated syscall
headers where it has been missed.
Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
Before this, stack protection would be effective only after switching to
the first thread.
Even before the first thread is created, the kernel init code uses the
IRQ stack to set things up. Let's make sure this is safeguarded as well.
This also fixes the incompatibility between CONFIG_RISCV_PMP and
CONFIG_RISCV_ALWAYS_SWITCH_THROUGH_ECALL, the later needing an exception
call to switch to the first thread and exception code assuming stack
guard is already set up in the PMP.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit unifies the `renesas,r7fa4m1ab3cfm` compatible string used in
various platforms by making it lowercase for the `arduino_uno_r4` target.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
SARADC was kept enabled to feed RNG entropy peripheral,
adding instability to Wi-Fi connection. So we disable it
before app runs as RNG driver already got initial entropy values.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
ESP32-S2 Wi-Fi clock is not initialized properly, causing
instability when scanning or connecting to a SSID.
Fixes#74899Fixes#74417
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
In case of minimal libc we have CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE = 0
by default. Some toolchains uses minimal libc by default (for example
ARC MWDT toolchain). Let's set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE
explicitly so we can allocate memory for environment variables.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
In case of minimal libc we have CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE = 0
by default. Let's set CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE explicitly
so we can allocate memory for environment variables.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
It was pointed out in a future PR that they should have
a corresponding experimental Kconfig entry.
See PR #73795.
This updates the APIs added in PR #73826 and PR #74295.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
In case no "Connection: close" header is present in the request, the
server should keep the connection open for the client. Hence, after
serving a request, we need to check if the header was present (the
parser sets a flag for it), and only close the connection immediately,
if the client requested it. In case the client remains silent, the
connection will be closed anyway after the inactivity timer kicks in.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Allocating FD before pulling the new connection from the fifo can lead
to busy looping in certain cases. If the application keeps calling
accept() on a listening socket after failing to allocate new FD for the
incoming connection, it'll start busy looping, as will report POLLIN in
such case (as the new connection is still on the queue), but it'll
consistently fail with ENFILE.
This can be avoided by trying to allocate new file descriptor only after
new connection has been pulled from the fifo. That way, if we fail to
allocate the file descriptor, the incoming connection will be dropped,
which seems correct given we don't have enough resources to service it.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case there were active connections when restarting the server, it
can't be re-initialized immediately, as binding to the server port will
fail. We need to wait for the TCP connection teardown, as even with
REUSEADDR socket option set, binding will fail if the sockets are not in
TCP TIMED_WAIT state (i. e. connections are active).
Because of this, add a configurable delay when restarting the server.
Additionally, make server initialization failures non-fatal, i. e. try
to restart the server again after the delay if the initialization fails.
It's been observed with Chromium, that it tends to keep connections open
even after closing them on the server side (socket lingers in FIN_WAIT_2
state), so the server re-initialization may fail even with delay, so
it's beneficial in such case to keep retrying the server
re-initialization.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case of fatal errors (during poll() or when handling listening
socket), the server operation is restarted. It was missed however, that
sockets opened for the server should be closed in such case.
Additionally, in case there were active client connections, it's needed
to cleanup related resources, otherwise running timers may trigger a
crash.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
MWDT toolchain adds additional suffix to sections name in case of
ffunction-sections / fdata-sections are enabled.
Let's pick a single set of rules and syntax that work for all
toolchain.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
MWDT toolchain adds additional suffix to sections name in case of
ffunction-sections / fdata-sections are enabled.
Let's pick a single set of rules and syntax that work for all
toolchain.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Since f3e5d9db3dca2421bd5b4015fbc270d3972376bd, one needs to define
`LL_EXTENSION_BUILD` to enable exporting symbols from extensions. That
patch added that for `add_llext_target`, but missed it for the EDK, thus
breaking it. This patch fixes that.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
In previous batch of fixes it was overlooked that streams are
HTTP2-specific concept. While for HTTP2 we need to track headers reply
state for each individual stream, at HTTP1 level we need to track this
at the client level. Hence, reintroduce respective flags to track
headers reply state, but only for HTTP1.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
find_package() already deals with finding ZEPHYR_BASE, so do not rely on
it being set in ENV, use the variable directly adter find_package() was
called.
Fixes#75387
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This patch improves the documentation for the llext subsystem, adding
information onhow to configure the llext subsystem, how to build
extensions using the Zephyr build system, and how to load and use these
in a Zephyr application.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The existing index.rst file contains a mix of information about the
llext subsystem and the LLEXT Extension Development Kit (EDK). This
commit splits the existing text into two separate files, index.rst and
build.rst, as a first step on improving the documentation.
No change in text is done in this commit.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Review and improve comments in source code to better describe the API
and the functionality provided by the llext library.
No actual code changes are performed in this commit.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
After configuration, the stream instance is valid and stream's
local_ep valid. bt_a2dp_stream_establish's parameter is stream
too. So in bt_a2dp_stream_establish, stream->local_ep should be
used to tell lower level (AVDTP) the sep.
set_config_param is used by copy-paste mistake.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
These properties are not used by the driver at all, but are
inconveniently marked as required. Lets just remove them.
Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
Profile names MBT and DFU are updated as MBTM and DFUM respectively,
according to TCRL 2024-1.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
Even just making minor edits to fcb, warnings are triggered
from Coding Guidelines of the form
Violation to rule 5.7 (Tag name should be unique) tag: fcb
Rename pointer variable names to fcbp.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
If the callbacks are not set, then we cannot do the requested actions
from the broadcast assistant. Since this is a significant issue,
that may prevent the role from working as intended,
LOG_WRN is used other LOG_DBG.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The scan_delegator_security_changed function had a few issues
that were addressed:
1) It used an internal field to check level rather than the
value provided by the API
2) It did not treat bt_addr_le_is_bonded as a boolean return value
3) It did not properly truncate the recv state (fixed by using the
proper function bass_notify_receive_state)
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add few missing button codes, these matches the ones used in Linux to
cover HID mouse buttons 1 to 8.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Seemingly newer versions of gcc wrongly detect a variable is used
when it is not set, this is not the case the compiler is wrong,
add a default set to null to prevent the fake warning appearing
as an error in CI
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Fixes an issue with using SMP on devices that do not support
unaligned memory access e.g. Cortex M0 which would result in a
hard fault
Signed-off-by: Jamie McCrae <spam@helper3000.net>
The 14/12-bit variants (AD5692R/AD5691R) require the data to be in the
upper bits of the two byte data field of the write command. See table 12
and the associated footnotes in the AD5693R/AD5692R/AD5691R/AD5693
datasheet.
Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
Fixes the Kconfig for dynamic service registration to make it depend
on dynamic database support instead of selecting it, which prevents
issues whereby it is not actually selected
Signed-off-by: Jamie McCrae <spam@helper3000.net>
DTS binding area was capturing everything under dts/bindings instead of
leaving those to the areas affected.
Remove general wildcard and add some of the missing file filteres in the
relevant areas.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Address the cases where submitter is also the maintainer of the code
changed and other areas are being changed. In this case, assign to the
next area maintainers instead of assigning to submitter.
Example: maintainer of component A introduced significant changes to
area A but also makes changes to other areas B and C. Right now
maintainers of B and C are added as reviewers.
This change will assign to the next area after A, i.e. B in cases where the
submitter is also the maintainer of area A.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fix a build error when CONFIG_SPI_ASYNC is set.
The issue was detected by CI
```
spi_xlnx_axi_quadspi.c: In function 'xlnx_quadspi_isr':
spi_xlnx_axi_quadspi.c:489:21: error: 'ctx' undeclared
489 | if (ctx->asynchronous) {
| ^~~
```
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix the busy wait in the MDIO driver that was causing timing
problems in systems with real time requirements performing tasks
more frequently than about a millisecond.
Restructure the code to be less redundant and change the busy wait
kconfig to microseconds instead of millliseconds. Also actually signal
to the mdio driver that it can use the interrupt instead of busy
waiting, this seems to have been forgotten.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Instead of including the boilerplate text and showing it in the created
issue, use comments that are still displayed when editing, but not shown
in the final issue, avoiding confusing and mixup between actual issue
and template text.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added a few missing CONFIG_ prefixes to Kconfig option references,
reshuffled the CAN release notes a bit to account for the
can_get_min_bitrate() being both introduced and deprecated within one
release cycle.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Set the remote address of received sockets.
This is necessary for services that rely on the remote address.
DNS relies on the remote address to be set properly.
Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
Added definition MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK
to fix timeout fault on the I2S_Speed test
using MIMXRT1170_evk/mimxrt1176/cm7.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Calls to other function may clobber ip & lr too so these register need to
be added to the clobberlist.
r3 is not actually used in z_arm_switch_to_main_no_multithreading so it is
also removed from the clobber list.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Add a diagram to illustrate a test application's project
components with relationships between Ztest and Twister
objects.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr/logging` and `mgmt`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `include/zephyr/arch` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `include/zephyr/net` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `include/zephyr/dt-bindings` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This tests shows that there is a problematic buffer configuration.
The host locks up when `CONFIG_BT_BUF_ACL_RX_COUNT` is smaller or equal
to the number of connected peers, and all those peers send an L2CAP PDU
that needs re-assembly at the same time.
Although this seems far-fetched, this bug has been observed in a
real-life situation on actual hardware.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Following changes in HCI drivers
(https://github.com/zephyrproject-rtos/zephyr/pull/72323) the build for
the snippet allowing to have the Bluetooth shell run with BabbleSim was
broken.
Fix the snippet by disabling the HCI UART driver.
Add a twister test case that will build the snippet in CI to avoid
silent breaking.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
When validating the flash runner configurations in `soc.yml`, the only
SoCs that were considered had to be defined under this structure:
family:
- series:
- socs:
- name: ...
However, the `family` and `series` keys are optional, so the `soc.yml`
files can also be arranged like this:
family:
- socs:
- name: ...
series:
- socs:
- name: ...
socs:
- name: ...
The solution is to move the validation code further down, so that it can
reuse the SoC data that was already correctly parsed while initializing
a `Systems` instance.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Getting the required alignment size for memory region node
and device node needs to be handled by a separate macro.
Otherwise alignment of single byte is reported for any region.
Add a test that checks for this particular issue.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Rework configuration so that it does not require special treatment
in testcase.yaml.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Rework configuration so that it does not require special treatment
in testcase.yaml.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
In `lib/posix/options/shm.c` we don't include stdio.h
header but use standard SEEK_xxx definitions (i.e. `SEEK_SET`)
which cause build issues (if the minimal libc is used).
Fix that.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Validate driver in CI by adding the `watchdog` tag to the `mps2/an385`
platform, which uses the driver.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The CMSDK watchdog hardware only supports a single timeout channel.
Return the documented error if more than one timeout is requested to be
installed.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The previous calculation was multiplying the timeout in milliseconds
by the clock frequency, giving a cycle count 1000x larger than it should
be.
Fix the calculation and rename `reload_s` to `reload_cycles`, as the
cycle count is what this actually contains.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fixed a few bad or missing documentation parts of iso.h
Also formatted some parts to be consistent with not just
the file itself, but also with bluetooth.h
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Remove references to new device APIs that are not supported by the
samples. Remove the reference to the UART API from the console sample
because it is not really used there, but add it to the CDC ACM sample.
Fix references in HID, MSC and UAC2 samples.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add missing documentation to USBD_DEVICE_DEFINE,
USBD_CONFIGURATION_DEFINE and USBD_DEFINE_CLASS macros.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.
If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See #74623 and #74428.
The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.
This commit defines PAGE_SIZE and PAGESIZE unconditionally.
Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
- Fix formatting in board_antenna.c by using the standard config in
Zephyr.
- Reduce diff with cc1352p1_launchxl/board_antenna.c as much as possible
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
- Use antenna switch sky13317 instead of hack
- Base the board_antenna file on cc1352p1_launchxl/board_antenna.c
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Remove an overlay with a wrong name not being picked up,
and change the "A" revision overlay to be used by all revisions.
Also fix the "clocks" property in the overlay causing a fault with sai4.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Updates the minimum version of imgtool to 2.1.0, which is one year
newer than the 2.0.0 release
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
A hard fault occurs when the `sample_echo_packet` function attempts
to print the average time per successful echo and no packets have
been sent, resulting in a division by zero error. This fix adds a check
to ensure that `packets_sent` is greater than 0 before performing
the division. This prevents the system from halting due to a usage fault.
Signed-off-by: Natalia Pluta <pluta.natalia.m@gmail.com>
As found in PR #75525, we should not modify the polled fd array
in multiple places. Because of this fix, the async version of
the socket service could start to trigger while it is being handled
by the async handler. This basically means that the async version
cannot work as intended so remove its support.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The symtab test should have the
`CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` enabled. This was not
caught in the CI previously as the regex was also wrong, '['
and ']' are regex syntax and should be escaped.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The intention here appears to be to return an error. Use an early return
to implement this.
Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
Implement the selection of the picolibc source in a Kconfig
choice as they are mutually exclusive.
The following table represents the possible choices, where 'X'
means that `PICOLIBC_SUPPORTED=n` and is guarded in the parent
level as `PICOLIBC=n`, so we do not need to care.
Module Toolchain C++ | Choice
0 0 0 | X
0 0 1 | X
0 1 0 | Toolchain only
0 1 1 | Toolchain only
1 0 0 | Module only
1 0 1 | X
1 1 0 | Toolchain/Module
1 1 1 | Toolchain only
The current implementation favors `PICOLIBC_USE_TOOLCHAIN` over
`PICOLIBC_USE_MODULE` whenever possible, that preference is
maintained in this implementation as well - the TOOLCHAIN
source will be the default choice when the toolchain supports
it or when the C++ is enabled. Otherwise, fallback to MODULE.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add maintainer and collaborator for DP drivers and DAP controller.
Followup on the commit 7c9259abbc
("dap: add CMSIS-DAP compatible controller")
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
There are instances where on hardware tests would result in
multiple dictionary logging blocks. This is usually due to
flashing and running via twister in separate steps. Once
flashing is done, the device starts running and sending
logging string to output, but twister is not ready to read
them, thus leaving the strings in the host's UART buffer.
Then twister starts its testing run by resetting the device
which results in another dictionary logging block to show
up. So the pytest script has to be updated to only look at
the last dictionay logging block.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Since only the UART backend supports output in hexidecimal form
with dictionary logging, so filter for that or else the pytest
would fail due to none, or wrong captured output.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit changes the adc_api test to use the proper printf
format specifier when printing the ADC samplings. This ensures
that all values are printed on 16-bit. Without this specifier,
negative values are sign-extended and printed on full integer
size (e.g., 0x8000 -> "0xFFFF8000").
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Remove the reset vector setting from driver layer,
the reset vector is more suitable to be set at the board layer.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
Adds ability to process synchronous requests in an asynchronous
fashion, relying on dedicated P4WQ's and pre-allocated work items.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
In order to support back-to-back readings, it's required that the
RTIO workq threads priority is higher than the caller issuing the
back-to-back requests, otherwise the requests will fail as P4WQ won't
have the opportunity to clear the is_done semaphore, and the subsequent
request will be rejected.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
In order to decouple the read request from its implementation, we need
to be able to yield to potential lower-priority threads, which is not
possible with k_yield() itself. As such, using RTIO Consume semaphore
enables us to achieve this.
This patch also refactors blocking API (sensor_read) to also block upon
consumption, so as not to require RTIO_SUBMIT_SEM enabled.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
- enabled GPT(PWM) peripheral for sleep/deepsleep mode in init_pwm()
- Fixed: undefined behaviour when using k_sleep()
Signed-off-by: Devansh Tanna <devansht0210@gmail.com>
c8d8dce755 introduced a regression whereby driver config should hold
module device pointer, except it didn't.
This commit adds module_dev to the driver config.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
When multiple devices are on the bus, and no slave matches
the sent rom, the master receives only ones.
This should be handled explicitly and the error reporting
should not rely on the crc mismatch of the scratchpad.
Note: Make sure that the sensor configuration is loaded to the
eeprom (copy scratchpad), otherwise the resolution will not match
the expectations in case a node looses power and recovers.
As in that case the configuration will not be applied again.
Also the sensor may still report the power on reset value
of +85°C just after the sensor powered up.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
After each read of the scratchpad the crc of the data
is checked and in case of a mismatch an error is returned.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
- Move the content of the header file into the source file,
and drop unnecessary includes.
- Also, drop the bus access function.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
An off by one error in the channel range check results in an out of
bound access to the channel lookup array.
Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
Thalley is not working with BT mesh nor BT classic
and shouldn't be assigned as reviewer for those.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The existing configuration of the ESP32 UART FIFO thresholds
was fixed, leading to inefficiencies in handling
Modbus RTU packages exceeding this size.
This commit introduces two new Kconfig options,
allowing users to adjust the esp32 fifo thresholds as needed.
fixes#74311
Signed-off-by: Omer Gozderesi <omer.gozderesi@enda.com>
config: esp32: configurable UART FIFO thresholds
The existing configuration of the ESP32 UART FIFO thresholds
was fixed, leading to inefficiencies in handling
Modbus RTU packages exceeding this size.
This commit introduces two new Kconfig options,
allowing users to adjust the esp32 fifo thresholds as needed.
fixes#74311
Signed-off-by: Omer Gozderesi <omer.gozderesi@enda.com>
Remove references to a timline for the coding guidelines enforcement
stages. Mark the current stage better and add notes about the
current stage.
Signed-off-by: Simon Hein <Shein@baumer.com>
DTC warning caused by reg address not matching unit address,
but SRAM node address is translated by ranges property anyways.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The unit address didn't match reg which causes the warning, but
flexspi should be part of the peripheral node space anyways.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The information about replied headers or END_OF_STREAM flag are
stream-specific and not general for a client. Hence, need to move them
to the stream context.
For the upgrade case, we need to allocate a new stream now when HTTP1
request /w upgrade field is received. The stream ID in such case is
assumed to be 1 according to RFC.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case client decides to send a trailing headers frame, the last data
frame will not carry END_STREAM flag. In result, with current logic
server would not include END_STREAM flag either, causing the connection
to stall. This commit fixes this logic, so that the server replies
accordingly in case END_STREAM flag is present in the trailing headers
frame.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
CONTINUATION frames are tricky, because individual header fields can be
split between HEADERS frame and CONTINUATION frame, or two CONTINUATION
frames. Therefore, some extra logic is needed when header parsing
returns -EAGAIN, as we may need to remove the CONTINUATION frame header
from the stream before proceeding with headers parsing.
This commit implements the above logic and additionally adds more checks
to detect when CONTINUATION frame is expected. Not receiving a
CONTINUATION frame when expect should be treated as a protocol error.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Frame printouts should not be done from the state handlers, but rather
during state transition, otherwise a single frame can be printed several
times as new data arrive. This also simplifies code a bit, as we just
print the frame in a single place, instead of duplicating code.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
There's really no good reason to have an upper bound on the buffer sizes
and this limits testing in some cases, so just remove them.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case RST_STREAM frame is received it should not be ignored, but the
corresponding stream should be closed.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case priority flag is present in the HTTP2 headers frame header, we
should expect additional priority fields before the actual frame
content.
The stream priority signalling has been deprecated by RFC 9113, however
we should still be able to handle this in case some implementation
(nghttp for instance) sends them.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Data and header frames can contain padding - we need to take this into
account when parsing them, otherwise the stream is broken.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Instead of multiplying function to check header flags, just have a
single one, with flag mask as parameter.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
For HTTP2-specific structures and enums, use "http2_" prefix to clearly
indicate the distinction from the generic HTTP stuff.
Additionally, some structures/enums describing HTTP2 protocol details
had "server" in the name, while in reality they describe nothing
server-specific. Hence, drop the "server" part where applicable.
Remove unused macros.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
* Remove unneeded variable.
* Use system utilities to read big endian numbers instead of parsing
manually.
* Remove `payload` member from the http_frame structure. It's not used
for anything useful, and could actually be misleading, as in case of
large frames, where not entire frame is parsed at once it will point
to incorrect location.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Those platfroms use rtt as debug port that conflicts with usermode, as
in 27d519b260.
Fixes#75617
Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
If newly introduced interface type is unset then return the first Wi-Fi
interface as a fallback, this fixes backward compatibility.
Also, add NM APIs and use them for type checks, rather than directly
using the type enumeration.
Fixes#75332.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
WPA supplicant as a network manager monitors interface events and
registers to the Wi-Fi NM module, so, adding a check for NM type before
registering the interface is wrong.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
BT_TBS_TECHNOLOGY_IP is not a valid technology value
for TBS since it's not defined by the spec.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Right now AT+CIPSTART command is called with both "remote port" and "local
port" being set to the same number. This means that for outgoing UDP
traffic (e.g. when resolving DNS or when reaching out some application
server with CoAP over UDP) always the same outgoing port is used. Such
behavior is wrong, since by default a random outgoing port should be used.
Reusing the same port confuses server implementation that is reached out,
since especially in context of DTLS over UDP, outgoing port defines TLS
context/session to be used. Such servers often ignore TLS packets from new
sessions (e.g. after device reboot) and result in failed DTLS connection
attempts.
Commit dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
UDP sockets") added support for "server-side listening" for incoming
traffic on UDP sockets, which introduced broken behavior of using the same
remote and local port.
In esp_bind() implementation assign newly intorduced 'src' member, instead
of reusing 'dst'. Don't call AT+CIPSTART yet at this stage, as in case of
connect() Zephyr syscall esp_bind() (via bind_default() helper function) is
called implicitly to assign random generated local port, so remote port is
yet to be assigned. Check in esp_recv() whether socket was already
connected (i.e. esp_connect() was called) and if not, invoke
AT+CIPSTART (via _sock_connect()) to start listening on "server-side" UDP
socket.
This patch fixes broken behavior of always reusing the same local port for
outgoing UDP traffic. Instead, randomly generated (by Zephyr net_context
subsys) local port is used. Additionally bind() and recvfrom()
implementation (to handle server-side UDP sockets) is improved, so that
binding to 0.0.0.0 (on any interface) is possible.
Fixes: dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
UDP sockets")
Fixes: 424ea9f5e4 ("drivers: wifi: esp_at: do not connect socket on
bind(INADDR_ANY)")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
The term "section" has a very specific meaning in the ELF file format.
After 709b2e4 ("llext: automatically merge sections by type"), some of
the code that was originally dealing with ELF sections is now handling
"memory regions" made of multiple ELF sections of the same type.
Make sure to use the term "region" consistently in the code and
log messages to avoid confusion with the original ELF sections.
Notable exception to this is the "ldr->sect" array, which is actively
used outside Zephyr and will need to be phased out in the future.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This patch changes the error codes returned by the ELF subsystem to be
more consistent with the standard error descriptions. In particular:
- issues with the ELF file are now reported as -ENOEXEC;
- valid but unsupported edge cases are reported as -ENOTSUP;
- failures in searching for an entry are reported as -ENOENT.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
llext_load() included a check to ensure that the ELF file contains all
the necessary tables, but it was not functional. Add the missing check
and rename the variable to avoid confusion with the total section count.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The rtc test suite uses timegm to convert a unix
timestamp to datetime, specifically struct tm which has no
nsec field, so the nsec field is not initialized properly.
Update tests to init nsec and isdst members of struct rtc_time.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Disable the pll2 when clearing the clock config prior to
testing the clock_control driver for the stm32h7
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Like in C test. If MAX STDDEV is lower than single clock cycle then
set it to a single clock cycle.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
If frequency of the system clock is lower then deviation may exceed
default value (10us). Instead of adjusting the default value, test is
rounding up expected standard deviation to a single clock cycle.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Currently, json array macros are passing the outer "container" struct
to the Z_JSON_ELEMENT_DESCR macro, causing the alignment to be calculated
from the outer struct which may be incorrect. Fix this by using the
biggest shift from the nested objects to calculate the alignment as the
struct size is calculated based on the biggest alignment of it's members.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Add test to check that alignment and offsets of object array elements
are calculated correctly.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Previous OpenOCD version finding would fail when additional tokens were
prepended to the 'openocd --version' output, as happens with some third-
party OpenOCD repackages (xPack for one).
Fixes: #71955
Signed-off-by: Nick Kraus <nick@nckraus.com>
This commit removes the "-vvv" argument from the SLID generation
scripts' command line when building Zephyr or an extension with
Kconfig CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID enabled. This removes
a lot of noise in the build log (usually ~250 lines) and is fine to
do because the printed information is also saved in build artifacts.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr/bluetooth` and `subsys/bluetooth`
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
pollfd array used with zsock_poll() should not be modified while inside
zsock_poll() function as this could lead to unexpected results. For
instance, k_poll already monitoring some kernel primitive could report
an event, but it will not be processed if the monitored socket file
descriptor in the pollfd array was set to -1. In result,
zsock_poll() may unexpectedly quit prematurely, returning 0 events, even
if it was requested to wait infinitely.
The pollfd arrays used by zsock_poll() (ctx.events) is reinitialized
when the service thread is restarted so modifying it directly when
registering/unregistering service is not really needed. It's enough if
those functions notify the eventfd socket used to restart the services
thread.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Increase the default TX thread stack size for the CAN loopback driver from
256 to 512 bytes as the former has shown to be too little when using the
loopback driver on real hardware.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
If we couldn't send all (or any data) via the socket,
invoke poll instead of blindly retrying and flooding the socket
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
If we couldn't send all (or any data) via the socket,
invoke poll instead of blindly retrying and flooding the socket.
Respect timeout through http_client_req
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
Iterating the observations can be simplified to a struct iterator instead
of first getting the count and looping afterwards.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Some of the A2DP interfaces are not defined if the corresponding feature
is not enabled, and therefore shall not be initialized.
This patchs include the interfaces/variables by the configurations to
go through the compiling stage.
Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
When NO_BACKENDS was not defined then log backends were
initialized (even though not used). During the initialization
filters for that backends were configured and because of that
messages were not filtered out as expected.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When userspace is used and frontend was used for logging then runtime
filtering was failing because in user context filtering data was
accessed and filtering data is in the kernel space. Fixing that and
adding runtime filtering to the pre frontend function which is
already executed in the kernel space and filter data can be
accessed.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Logging string stripping depends on LOG_DICTIONARY_SUPPORT being
enabled and it was not set in UART dictionary frontend.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Log frontend supports runtime filtering so it should be
allowed to enable it even when only frontend is used with
no backends.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Use the message queue to pass the new report from the input callback,
and use a semaphore to protect the report buffer until it is transferred
to the host.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Starting next week, I will no longer be active on this work account,
& I will no longer be available to contribute to STM32 in Zephyr.
I will be reachable on my personal account: @JarmouniA
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
From https://mails.dpdk.org/archives/dev/2021-December/231212.html:
Downcasting a void* to struct aesni_gcm_session* caused the session
data to be treated as tainted. Removing the void* temporary variable
and adding a cast avoids this issue.
Try the same approach here to prevent the ldr->sect_hdrs pointer from
being treated as tainted.
May fix#74817.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Previously both temperature and pressure were updated regardless of
which one was requested.
Fixes CID: 392519, GH: 74779.
Fixes CID: 392497, GH: 74777.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
If CONFIG_NET_MGMT_EVENT_DIRECT is enabled and CONFIG_NET_MGMT_EVENT_INFO
disabled it does not build because mgmt_push_event writes to non existing
struct members
Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
Fix system workqueue block caused by mgmt_event_work_handler
when CONFIG_NET_MGMT_EVENT_SYSTEM_WORKQUEUE is enabled.
Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
The series-specific Kconfig files were not included, leading
to RTT not being considered available.
Fixes#75511.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
During initialization, zero is returned if an unexpected device ID is
read because the returned variable is not written to after a previous
non-zero check. Return -EIO instead to indicate an error occurred.
Detected with the following Coccinelle script:
@@
identifier I;
@@
*if (I) {
...
return ...;
}
if (...) {
... when != I
when any
* return I;
}
Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
Currently we get the build error when building
'tests/subsys/logging/log_backend_uart':
error: static_assert expression is not an integral constant expression
BUILD_ASSERT(strlen(TEST_DATA) < SAMPLE_DATA_SIZE);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It can be easily workarounded by using sizeof instead of strlen
to calculate string size.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
In `tests/subsys/logging/dictionary` we don't include stdio.h
header but use standard stream definitions (i.e. `stdout`)
which cause build issues (if the minimal libc is used).
Fix that.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Disable branch coverage for the `__ASSERT` family of macros. Covering
all of the assertion branches by definition means triggering the
assertion, which can be either challenging or impossible to exercise,
and in either case results in the immediate termination of the test.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Multiple values for `--exclude-branches-by-pattern` will result in only
the last value taking effect. Resolve this by merging all the provided
regex patterns into a single pattern with the `|` operator.
Signed-off-by: Jordan Yates <jordan@embeint.com>
In case where the system is overloaded, net stack buffer
could fail to allocate next packet. That scenario requires
wifi internal Wi-Fi driver to free current rx buffer. This is
currently not being called. This fixes it by making sure
esp_wifi_internal_free_rx_buffer() is called in all scenarios.
Fixes#63043
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Converts the `<inf> i2c_ll_stm32_v2: I2C TIMING` message
displayed by the driver to a LOG_DBG. Also makes an actual
error message a LOG_ERR instead of a LOG_DBG.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Note CONFIG_PM_* affects device.h too. Even if not compiled, the more
code the pre-processor sees the better.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes the following error appearing in the test coverage added by the
next commit:
In file included from zephyr/tests/lib/cpp/cxx/src/main.cpp:18:
```
zephyr/include/zephyr/pm/device.h:275:9: error: designator order for
field 'pm_device_base::state' does not match declaration order
in 'pm_device_base'
275 | }
| ^
zephyr/include/zephyr/pm/device.h:315:17: note: in expansion of
macro 'Z_PM_DEVICE_INIT'
315 | Z_PM_DEVICE_INIT(Z_PM_DEVICE_NAME(dev_id), node_id,
```
Note this failure is observed with any g++ -std=c++NN standard value -
even before C++20.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This provides C++ build test coverage for device.h (notably:
Z_DEVICE_INIT() fixed in the previous commit) and for some other Device
Tree macros.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Conditionally remove braces for designated initializers of anonymous
unions. This makes it compatible with C++20 while not breaking pre-C11
gcc.
This does for device.h what commit c15f029a71 ("init.h: restore
designated initializers in SYS_INIT_NAMED()") did for init.h
See https://docs.zephyrproject.org/latest/develop/languages/cpp/ and
long discussion in #69411 for more obscure C/C++ compatibility details.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The minimum version of pyelftools is 0.29 to make it working
with scripts/footprint/size_report
Fixes#75605
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
RTIO expects the CHAINED flag to be set when ordering of operations is
important. The callbacks in the icm42688 stream handling were not
chained into, meaning the callbacks would have occured immediately
rather than *after* the SPI reads/writes.
Update all the spi transactions to chain into the desired callbacks in
the driver.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
When multithreading is off packet buffer should not use feature which
allows waiting for available buffer.
mpsc_pbuf is used by logging which can work in deferred mode in
no multithreading build.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Updated nxp lpadc driver, because the phandle type property
'nxp,reference-supply' was removed, and a new phandle-array
type property 'nxp,references' added.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add new property 'nxp,reference-cells' for vref node.
Remove lpadc nodes 'nxp,reference-supply' property.
Add new property 'nxp,references' for lpadc nodes.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add specifier cells for nxp vref, when some other
peripherals use the vref to provide reference voltage,
this cells can be used to pass-in vref target voltage.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
With new BT SIG Qualification Workspace it is no longer possible to
export/import full project. Only ICS export/import is possible.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Adds missing i2c_sleep pins configuration definition required
to properly support power management operations for
Smartbond I2C controller on da14695_dk_usb board.
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
When CONFIG_NET_STATISTICS=y is enabled, build fails
due to wrong interface pointer.
Fixes#75515
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fix build error due to cmake requiring a separate
overlay for each of this target's SOCs.
Error being fixed:
```
-- Board: sam_v71_xult, qualifiers: samv71q21
CMake Error at cmake/modules/extensions.cmake:2742 (message):
Board sam_v71_xult defines multiple SoCs.
Shortened file name (sam_v71_xult.overlay) not allowed, use
'<board>_<soc>.overlay' naming
```
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix build error due to cmake requiring a separate
overlay for each of this target's SOCs.
Error being fixed:
```
-- Board: sam_v71_xult, qualifiers: samv71q21
CMake Error at cmake/modules/extensions.cmake:2742 (message):
Board sam_v71_xult defines multiple SoCs.
Shortened file name (sam_v71_xult.overlay) not allowed, use
'<board>_<soc>.overlay' naming
```
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Make sure that the ATE metadata does not overflow the sector size.
Take into account the data length and also the mandatory reserved ATEs
in each sector.
Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
Instead of silently `#undef`ing PSA_CRYPTO_C when TF-M is in use,
enforce that rule at the Kconfig level.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Replace platform_allow with integration_platforms, what allow CI to
build samples on all platforms with test feature 'usbd' but still limits
number of platforms when it is invoked with the --integration option.
Replace/add some platforms that already have test feature 'usbd'.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The broadcast sink sample no longer treats the broadcast_code_received
semaphore as a boolean.
Fixes#75469
Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
risc-v idle call is being fetched from arch/ implementation.
This soc file is not used and can be removed.
Fixes#75540
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
- Added a flash runner configuration for rw, mcx, lpc, kinetis and imxrt,
used for sysbuild multi-image projects like MCUBoot.
- Solved the mass erase issue.
- The sysbuild project "west flash --erase" command caused
the mass_erase->flash_img1->reset->mass_erase->
flash_img2->reset sequence.
It was fixed to the mass_erase->flash_img1->
flash_img2->reset sequence.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
When using an encrypted broadcast, the previous value is no
longer enough and caused a stack overflow.
Slightly increased the value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Some public API functions do not modify the net_buf instances and can
declare these arguments as const.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Adding a semicolon after the do-while loop in the LV_DEV_INIT()
macro also supports multiple instantiation.
Signed-off-by: Stephan Linz <linz@li-pro.net>
This removes the prompts for the mt8195 and related kconfigs,
so these cannot be overridden from command line (though
technically they cannot be disabled as they are being selected).
This also prevents them from appearing in the build .config
file as not being set even when we are being for other SoCs.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Reorganize the EEPROM periheral documentation to make room for subpages
with additional details. Add a page describing the EEPROM shell module.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `kernel` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
exclude cyw920829m2evk_02 from build. For cyw920829m2evk_02
need `west bloobs fetch` (to get BT fw), which does not
allowed in CI.
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
Add document for boot M7 Core by using Linux remoteproc to address
some known issues when boot DDR Zephyr kernel.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Fixes: #75390
A wrong bit mask (wrong: IOMUXC_SW_PAD_CTL_PAD_PUS_MASK = 0x8) was used.
That bit mask is for PUE/PUS-type gpio registers, but this is the
section for registers with alternative PULL (PDRV) type layout.
Right bit mask: IOMUXC_SW_PAD_CTL_PAD_PULL_MASK
Signed-off-by: Nils Larsen <nils.larsen@posteo.de>
When syncing to a PA using PAST then the sync_info.recv_enabled
was always just set to true, regardless of what mode was set
during the subscribe parameters.
The mode(s) are now stored in an array (with the default value
as well) so that we can retrieve that information when the PA
has synced via PAST.
It was considered to put the `mode` value into the `bt_conn`
struct, but that would require an API change as the `bt_conn`
parameter for the subcribe function uses `const`.
This commit also modifies the guard for PAST to be the more
correct value CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER instead
of just CONFIG_BT_CONN.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Don't zero initialise the static data structure, as statics are
explicitly initialised to 0 per the C standard, and checkpatch normally
complains about the pattern.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Return the documented error if `wdt_install_timeout` is called after
`wdt_setup`, instead of triggering the state assertion inside of
`nrfx_wdt_channel_alloc`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Return an error code if `wdt_feed` is called before `wdt_setup`, instead
of triggering the state assertion inside of `nrfx_wdt_channel_feed`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `doc` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Some AMP native simulator targets (like the nrf5340bsim net core)
will not produce a final executable if only one of the core images
is built, when IPC is enabled, as those images require the other
core image to be able to link.
So this test cannot be run when targetting that core alone
(without using sysbuild to build the other).
Let's filter out these targets to avoid twister building
but finding itself with no executable and error out badly
as it cannot run the test.
The filter condition is effectively:
If building for a native target, there must be an .exe being
produced.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure that we call the host libC when allocating space
for a possible set of test arguments even if we are
building Zephyr with an embedded libC.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
native_posix (unlike native_sim) or its breathen (NATIVE_APPLICATION)
link together the "runner" code and the embedded code.
This means that when CONFIG_STATIC_INIT_GNU is set,
any host library code (like the llvm fuzzer) constructors will get
postponed to the Zephyr initialization.
These libraries are unlikely to work if we do this.
(the llvm fuzzer does not)
So let's instead not enable STATIC_INIT_GNU for these targets.
This means possible embedded library constructors will continue to be
picked during the link and be still called during the native runner
initialization instead of during the Zephyr OS initialization as they
were just before we introduced STATIC_INIT_GNU in
6e977ae2d5
Note that native_posix will be deprecated shortly and its users
are strongly encouraged to move to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `include/zephyr/drivers` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Increase the number of network packets and buffers for better TCP
performance in the sample out-of-the-box.
Decrease the network buffer data size for better buffer management in
the sample (less buffer space wasted for L2 header). The only drawback
of this is reduced TCP TX performance, but less than 2 Mbps in my case.
Finally, enable speed optimizations for another small performance boost.
As the RAM requirements of the sample now increase considerably in the
default configuration, add a note in the readme file about it, and how
to make it fit into smaller boards.
Tested on nucleo_h723zg:
Before (current defaults):
UDP TX RX
76.47 Mbps 93.48 Mbps
TCP TX RX
76.18 Mbps 67.75 Mbps
After (new defaults):
UDP TX RX
76.08 Mbps 93.62 Mbps
TCP TX RX
74.19 Mbps 85.51 Mbps
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The bug should be fixed now, so it possible to have it enabled as
long as OTS is not registered with the feature flag.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The checks for callbacks in bt_ots_init did not correctly take the
ots_init->features.oacp into account for all callbacks, which
caused some issues.
Slightly optimized the check for ots->cb->obj_read by moving the check
and reducing the number of places the code calls oacp_read_proc_cb.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Allocating a buffer in the system workqueue thread should never
be done wiht a K_FOREVER as that may block the thread forever.
Replace the K_FOREVER with a K_NO_WAIT and slightly modified
the function to handle this case.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Target SSID buffer might not be NULL terminated, so use memcpy() instead of
strncpy() for copying it from temporary (AT response fragment) buffer.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Close file descriptor returned by accept() in error path of
nsos_adapt_accept(), so that file descriptor is not leaked.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This commit fixes a bug with the declaration of the Kconfig option
MEMC_STM32.
The option is defined in two files:
- `drivers/memc/Kconfig.stm32`, wich depends on
- `MEMC`
- `DT_HAS_ST_STM32_FMC_ENABLED`
-`soc/st/stm32/Kconfig.defconfig`, wich depends on
- `MEMC`
- `SOC_FAMILY_STM32`
So, if you have `CONFIG_MEMC=y` in your Kconfig options and you are on a
STM32 SoC, `CONFIG_MEMC_STM32` will be enabled, even if there is no
STM32 FMC enabled.
This Kconfig option causes the driver for the STM32 FMC to be compiled,
regardless of the presence of an enabled node for the FMC.
However, the driver fails to compile if there is no FMC node in the
devicetree. So, if you compile a project with `CONFIG_MEMC=y` on a board
with an STM32 SoC and no enabled FMC, the build will fail.
This commit deletes the Kconfig declaration in the `Kconfig.defconfig`,
as it isn't useful and is the one provoking the bug.
It also add in the `Kconfig.stm32` the compatible `st,stm32h7-fmc`, wich
use the same driver and so need to be enabled by the same Kconfig
option.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
The subscribe parameters shall be a struct that has previously
been subscribed to, as it works as a linked list.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Currently the code in soc.c depends on the MMU of the CPU being enabled,
but this is not enforced. It is thus possible to cause a build error by
manually disabling it (as is required for some LLEXT tests, see #75289).
Make sure this is averted by explicitly selecting ARM_AARCH32_MMU in the
SoC Kconfig.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add the usbd test tag to few ST boards, this should be picking a board
for every variation of the HAL file (checked for #define USBD_FS_SPEED),
so it should catch any inconsistencies between HALs.
There should be one for each of: f0 f1 f2 f3 f4 f7 g0 g4 h5 h7 l0 l4
l5 u5 wb.
Nothing for l1, can't find any boards with a USB port.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fixes#71761
The `west boards` command parses extra BOARD_ROOTs from Zephyr modules,
so that the boards defined in those modules are automatically listed.
In HWMv2, OOT boards can be described in terms of OOT SoCs, which means
that extra SOC_ROOTs must also be provided. Otherwise, an error message
will be displayed when attempting to list all boards. Therefore, every
Zephyr module SOC_ROOT should be included as well.
In HWMv1 (deprecated), OOT boards can be defined in terms of OOT archs,
but module ARCH_ROOTs had never been included automatically. The fix for
this is long overdue, but it's included for symmetry.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Currently, `PICOLIBC_SUPPORTED` could be enabled even when
neither the toolchain has picolibc nor the picolibc module is
present, this can be the case when Zephyr is built with
external toolchain (non-Zephyr SDK) + external build system
where PICOLIBC module doesn't exist.
Fix this by having `PICOLIBC_SUPPORTED` depends on either
toolchain OR module, while taking the libc++ into
consideration.
Here's the full logic table of when the PICOLIBC should
be marked as supported.
libc++ TOOLCHAIN MODULE PICOLIBC_SUPPORTED
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
Co-authored-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Since `PICOLIBC_USE_TOOLCHAIN` is available only if
`PICOLIBC` is enabled, it doesn't need to depend on the latter
again.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
In case underlying TCP/TLS connection is already down, the
websocket_disconnect() call is expected to fail, as it involves
communication. Therefore, mqtt_client_websocket_disconnect() should not
quit early in such cases, as it could lead to an underlying socket leak.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Several log statements were using the regualar LOG_DBG,
but when ISO is actually used, those were called every TX
which at 10ms SDU intervals would fill up the log really fast
and not provided much value outside of some specific debugging.
Modified those logs to use BT_ISO_DATA_DBG which is another
log level for ISO data.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The top-level driver comment states that a uint16_t is used to store
changes if the EEPROM size is smaller than 64kB, or uint32_t otherwise.
However, the 64kB threshold is represented as 2^16 in the actual code,
which is a bitwise XOR instead of an exponent. This causes a uint16_t
to be used only if the size is less than or equal to 18 bytes. Correct
this by using KB(64) instead of 2^16.
Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
Sets the property `PROPERTY_OUTPUT_FORMAT` to `elf32-bigarm` when
`CONFIG_BIG_ENDIAN` is set to `y`.
Signed-off-by: Sigmund Klåpbakken <sigmundklaa@outlook.com>
When this bit is not set, it defaults to 0 (little endian). This
causes issues for big-endian devices, as data will be accessed using
little endian.
Signed-off-by: Sigmund Klåpbakken <sigmundklaa@outlook.com>
When switching off memory banks we cannot use movi with arbitrary
immediate arguments, they will be converted by the compiler to memory
accesses. Only constants within the allowed range should be used.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Some hardware takes longer to boot before any output is visible
from the app. So lengthen the initial timeout on waiting for
any output.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When doing device testing, there may be some other characters
being printed before the dictionary logging header string.
Also the delay boot banner may also be there. So change
the regex to ignore those them.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
With sysbuild, the test app is actually built under another
layer of directory where the dictionary JSON file will reside.
Instead of simply using dut.device_config.build_dir, use
dut.devive_config.app_build_dir instead, which takes into
account of that.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The rationale behind that change is that the Application can use the
`bt_conn_le_param_update()` API to signal the controller to reschedule
the link.
Even if the new connection params are within the old ones, the
controller would be free to choose an e.g. smaller interval. The host
API should not prevent this usage.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/74292
Co-authored-by: Knut Eldhuset <knut.eldhuset@nordicsemi.no>
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Fix missing CONFIG_ prefix for log format section strip check.
Logging was still operating on invalid flash addresses.
Fixes#75161
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.
That feature is going away, see #72567.
Prepare that work by removing this test that's in the way.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
EVENTFD is not anymore compatible with these targets so let's
disable them with this sample to avoid a failure in twister
otherwise.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Only disable TCP/UDP software checksum if the ethernet
driver enabled. This is to avoid interfere with net tests
which don't need the on board driver to function
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Remove d0i1 and change threshold for d0i2 to 10ms for pm setting
according to the requirements to pass CTS for chrome projects.
Signed-off-by: Leifu Zhao <leifu.zhao@intel.com>
I am the original author of the test that is being removed. The test was
added in https://github.com/zephyrproject-rtos/zephyr/pull/70670 to try
to specify the behavior of automatic advertiser resuming in the Host.
It turns out now that the behavior of this feature depends on which
Controller is in use and can fail incorrectly.
The test assumes the DUT will be able to create `CONFIG_BT_MAX_CONN`
peripheral connections. But this is not necessarily true. E.g. Some
Controllers, like the SoftDevice Controller, may reserve some Host
connection slots for central roles, making the max number of peripheral
connections smaller.
In conclusion, the test is not correct and should be removed.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Update zephyr-app-commands to generate "west build --shield ..." for west
invocations using shields while still generating "cmake .. -DSHIELD=..."
if the tool is set to "cmake".
Updated the various shield documentation pages to recommend using
"--shields" over "-DSHIELD" to match the results of the corresponding
zephyr-app-commands code snippets.
Add proper support to zephyr-app-commands for specifying multiple shields
(using a comma-separated list) and fix a few invocations to use this.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Solves two identical issues listed below:
Issue 1: I2C scanner example for DesignWare hardware gets stuck
indefenitely resulting in system hang up.This is because DW I2C driver
does not handle 0 byte transfer correctly which is the case for I2C
scan example.
Fixed it by overwriting the msg length to 1 if it is 0 and the
buffer is not NULL.
Issue 2: Similarly, if the I2C pins are not pulled up (nothing connected
to I2C pins), the DW hardware does not actually send the data
(assuming contention on the bus) hence not releasing the semaphore
resulting in calling thread waiting forever.
Fixed it by adding a timeout to k_sem_take call and return error if
cannot successfully acquire it.
Tested scenarios where nothing was connected on the bus and saw the
I2C scan example complete the whole scan command. Then connected
two different sensors on the I2C bus and saw both the address on the
console. Tested both the uses cases on Raspberry Pi Pico.
Fixes#70332.
Found that micropython tackles the same issue by implementing I2C scan
commands with Soft I2C because the same reason mentioned in Issue 1.
Signed-off-by: Dev Joshi <quic_devbhave@quicinc.com>
Fix ism330dhcx_gyro_fs_map[] and ism330dhcx_gyro_fs_sens[] arrays
initialization in order to be able to correctly convert from dps
to register raw value through the array index.
Fix: #72617
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Loop inside the odr array until we find the first
value which is "<=" (amd not "==") the argument.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
- Defined 'api_configure' function outside of
'CONFIG_UART_USE_RUNTIME_CONFIGURE' macro because it is the only
configuration function and used in device initialization function.
- Removed unnecessary 'IF_ENABLED' part.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Upgrade the CI image for x86 macos from 12 to 13, this is apparently the
latest "free" x86 macos runner that will be supported, let's switch to
it until it gets deprecated.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
There are 2-level switch statements (one switch inside another) which were
not properly terminated with 'break' statements, leading to implicit
fallthrough. Fix that.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
The first page frame index was reserved for head and tail ^pointers.
However there are cases where the first frame is actually made
evictable and would trigger the assertion guarding against that.
Fix this by applying an offset to actual frame indexes.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit makes the RV32M1 SoC rely on the default behavior of relying on
the `CONFIG_RISCV_ISA_EXT_*` config options, and removes the
`zephyr_compile_options` override when the standard toolchain is used.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
According to the RV32M1 Series Manual, Rev 1.1 RV32M1 series supports the C
extension, and doesn't support the A extension. Apply fixes accordingly.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Issue:
When there are two similar SSIDs (e.g. MySSID and MySSID_Guest),
the current implementation may use the wrong (truncated) SSID
for the connection. See issue#74910 for details.
Fix:
Updated airoc_wifi_scan_cb_search to filter all SSID where
length is different than the user-entered SSID.
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
This introduces a high-level summary of the most notable changes in 3.7.
This also tries to capture the most useful changes since previous LTS.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This reverts commit a9a909c558.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit 6f62292d42.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit 86b92934cc.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit 2d72966516.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit 93973e2ead.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit 49ac1912b2.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit 305ec62a6b.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit 581a0f56e6.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit 48dff5562c.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit 499a633976.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit d9855da483.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit b82b5b0734.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit be086f174c.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit b2243af32d.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit 308322e9b9.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit b10f1ca3a6.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This reverts commit b18cad15b9.
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
PR #73978 introduced a regression.
Unfortunately this PR cannot be reverted without reverting also
Let's revert both PRs to stabilize main again towards the 3.7 release.
For more details on the issue see
https://github.com/zephyrproject-rtos/zephyr/issues/75205
This reverts commit e9b676a9ab.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
We only need the interface to be administratively up, the operationl
status is managed by the WPA supplicant.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Due to recent changes to hostap, the stack usage is increased, so,
increase the stack size to fix SoF.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Fixes build issues when Wi-Fi security is enabled for default
implementation, the alternative implementation is managed separately,
and doesn't need these.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Fixes an issue whereby multiple boards would be grouped when using
a regex to group them, and adds missing nRF91 entries to the list
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The power_down() function attempts to lock the hpsram_mask on-stack
variable in data cache, which causes an exception. Moving it to .bss
by making it static fixes it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
During channel reads, zero is returned on CRC mismatches: the returned
error variable is not written to after a previous non-zero check. Return
-EIO to mirror other drivers' checksum validation behaviors.
Signed-off-by: Jared Kangas <kangas.jd@gmail.com>
The existing state checks for both the broadcast sink
and broadcast source only ever checked the first BIS.
This sort of made sense, since they are all linked by HCI
(i.e. they share the same state), but there is a race condition
in the ISO and BAP callbacks that could allow applications
to delete sinks and sources before all the ISO callbacks
had been handled.
By treating the sink and source states as the highest value
of the BIS, then we better treat all BIS the same.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit removes the const qualifier from TX (source) buffer
of the chan_blen_transfer DMA test to ensure it gets placed in
RAM rather than flash. This ensures the test can pass on hardware
where the DMA controller is unable to access flash.
Fixes#75125.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Make sure to check return values of mbedtls hmac APIs so that
the digest is calculated properly.
Fixes#75259Fixes#75260Fixes#75261
Coverity-CID: 366271
Coverity-CID: 366277
Coverify-CID: 366279
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The README "Testing CANopen Program Download" section needs a sysbuild
MCUboot option. Otherwise only the application is built and the test will
fail.
This has probably been missing since commit
238d113185.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Adds the icm42688 devicetree binding changes to the migration guide
noting that the previous bindings were not at all in use.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
The gTest harness asssumed that the lines end with the test name, but
some gTest implementations include the test duration in the line. Update
both the tests and regex to allow this and also avoid capturing
characters into the `test_name` that cannot be valid test name chars.
Fixes#72318
Signed-off-by: Yuval Peress <peress@google.com>
Add information about these missing Kconfig options:
CONFIG_NET_CONFIG_MY_IPV6_ADDR
CONFIG_NET_CONFIG_PEER_IPV6_ADDR
CONFIG_NET_CONFIG_MY_IPV4_ADDR
CONFIG_NET_CONFIG_MY_IPV4_NETMASK
CONFIG_NET_CONFIG_MY_IPV4_GW
CONFIG_NET_CONFIG_PEER_IPV4_ADDR
Fixes#75211
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This allows specifying the environment variable
ZEPHYR_DOXYGEN_OVERLAY pointing to a overlay file for
doxygen to override configs in the base zephyr.doxyfile.in
for local document builds.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Boards that use 1024 byte EEPROM buffers need 16-bit address widths
otherwise eeprom_target driver will cause build failure.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Existing tests fail when 16-bit address width is used. Adjust the code
to support 16-bit addresses as well.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Seems like not all stm32 devices define USBD_HS_SPEED in the HAL, only
check for USBD_HS_SPEED if defined. Fixes a build failure with the new
stack on F1 MCUs.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
In fixed-link mode, mdio remains unconfigured. This results in a null
pointer dereference, triggering a bus fault
Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
This is a bug-fix:
When upper layers want to send something, they add a `conn` object to a
list. They do so by adding a node on `struct conn` rather than the object
itself.
We forgot to increase the reference count of the connection object when
doing so. This means that there can be a scenario where the conn object is
destroyed and re-used while still being on the TX list/queue.
This is bad for obvious reasons.
This patch fixes that by:
- increasing the refcount when putting on the TX list
- decreasing the refcount *only* when popping off the TX list
- passing a new reference from `get_conn_ready` into `bt_conn_tx_processor`
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
The DHCP server can distribute DNS addresses, hence enable DNS resolver
in the sample to show this functionality.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Currently used DHCP server in the sample, dhcpd, is no longer maintained
and reached EOL. Therefore, update the sample's readme file with a
sample configuration for its successor, kea.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Macros like `BIT()` & `BIT64()` from the `util_macro.h` are
used, include their header to compile properly.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
If we have configured the DNS dispatcher to be only as a
responder but receive a query response, or if we are only
as a resolver but receive a query, then the dispatcher just
ignores the packet and returns -ENOENT.
Unfortunately we print an error message in this case
[00:10:18.818,000] <err> net_dns_dispatcher: DNS recv error (-2)
which is totally unnecessary and causes confusion so do not
print an error message in this case.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Update the description of the `INCLUDE_RESET_VECTOR` Kconfig so
that it is more clear to the user what it does.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
For SOCs that do not implement a custom `__reset` function,
select `INCLUDE_RESET_VECTOR` so that Zephyr provides a default
implementation that simply jumps to `__initialize`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Increase the default SDO timeout for the CANopen program download west
runner from 0.3 seconds to 1 second. Depending on the flash size and speed,
a full erase may take slightly longer than 300 ms.
The timeout can be customized by using the --sdo-timeout runner parameter.
Fixes: #73987
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Fix preprocessor expression for custom vector table due
to OS timer isr being needed. The parentheses are missing.
Also add RW6xx to the list which has the same isr needed for ostimer.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The current version of scipts do not consider OOT boards use cases and
the tests with robot now are strict to only one robot file, which is
not realistic for real environment. This address those issues and allow
multiple testsuits at command line and lists at tests entries. It add
another test parameter to allow configure robotframework options.
Fixes: #74563
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
cpuppr can only use slow peripherals and uses RAM3 as RAM so
it does not need to use DMM.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
After changing dmm to not apply data cache line alignment for all
regions test needs to be aligned.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
DMM was enforcing cache line alignment all memory regions, including
those which were not cacheable. Fixing it by using memory attribute
from the device tree to determine if alignment needs to be applied.
Because of that memory usage was significantly increased because
even 1 byte buffers (e.g. for uart_poll_out) was consuming 32 bytes
(cache line size).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Replace the condition-less `for` loop (`;;`) in `get_child_of` with
a `while (true)` loop and remove the redundant `return NULL;`
at the end, which is never reached.
This change aims to enhance readability since `while (true)` is better
suited for this scenario.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Update documentation, mainly to clarify use of onboard KitProg3 debug
adapter and Infineon custom OpenOCD.
Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
Test was using a configuration which enforces cache management in the
packet buffer. However it shall not be used if producer and consumer
is the same core. Testing this configuration on a single core does
not make sense as it actually fails on cores with data cache.
Making this configuration build_only so it is checked against
compilation errors.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Packet buffer can be used for sharing data between cores. In that
case when any core has data cache then data cache handling must
be enabled in the module. However, it shall never be enabled when
the packet buffer is used on a single core. Adding that information
to the documentation.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
A function, such as CDC ECM, can set the ZLP flag to handle a
class-specific protocol. This is not to be confused with the ZLP role in
control transfers.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Ignore changes to the CANopen program download west runner in CI.
This script is only executed when performing a DFU using the CANopen
protocol via CAN, which is never triggered in CI anyways.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remake the Zephyr Generic audio framework (GAF) figure to a graphviz
version.
This makes it easier to modify it directly in the .rst file.
This also adds the missing GMAP/GMAS.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Remake the Generic audio framework (GAF) figure to a graphviz version.
This makes it easier to modify it directly in the .rst file.
This also adds the missing GMAP/GMAS.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Remake the Bluetooth Audio Architecture figure to a graphviz
version. This makes it easier to modify it directly in the
.rst file.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If the metadata length is 0 in the mod source operation,
we set the length to 0 and memset the stored value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add cast to NSEC_PER_SEC macro to correctly check offset.
Prior to this commit, the would eval to true incorrectly.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Move the GitHub runners currently on macos-11 to macos-14 as the former is
no longer supported by GitHub.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Check if node identifier is valid to define and initialize device
metadata. Without this patch, "software devices", ie, DEVICE_DEFINE,
would fail to compile when enabling the device metadata feature.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Problem:
When flashing a multi-image project with STLink through sysbuild,
the flash utility is told to erase the whole flash between each
single image flash.
Resulting in a partial flash where only the last image is effectively
stored on flash...
Correction:
A `west flash` must not implicitly perform a mass erase on its own.
If a flash erase is required, the option has to be passed manually.
The problem is discussed in the following issue:
zephyrproject-rtos/zephyr#69582
Due to CI tests errors, the correction is not applied on
eval board `b_u585i_iot02a`.
See following issue:
zephyrproject-rtos/zephyr#75164
Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
For STM32H7, U5 and WBA, check the LDORDY bit of the ADC ISR register
after enabling the internal regulator. This method is safer than the
delay.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Previous commit 8defc560fe forgot
to add valeriosetti also in "West project: mbedtls". This commit
fixes this.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add missing pull-up for RX pin in nrf54h20dk dual uart configuration.
Lack of pull-up was causing test failures.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Currently imx8mm/n use pinctrl binding of nxp,imx8m-pinctrl.yaml which
is used for imx8mq series platforms, but imx8mm/n have different pinctrl
hardware module with imx8mq, so change imx8mm/n to use binding of
nxp,imx8mp-pinctrl.yaml as imx8mm, imx8mn and imx8mp have the same
pinctrl hardware module.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
As of recent update of stm32f7 HAL to cube version V1.17.2
the workaround for misspelled HAL_ETH_PTP_CONFIGURATED macro
is not needed anymore, and causes PTP support to fail to compile.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
SYSTEM_WORKQUEUE_STACK_SIZE increase is required to fix not
only BLE Ext Adv (70935), but also other BLE use cases according
STM32WBA HCI driver
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
STM32WBA55 BLE Extended Advertising issue (70935) fixed
using a correct BLE Controller configuration.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
The KBS_KSOH1 register contains both keyboard and GPIO output settings.
Not all bits are for the keyboard will be driven, so a critical section
is needed to prevent race conditions.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
List USB device and USB device "next" as supported on the NXP
LPCXpresso55S16 (which uses dedicated USB RAM) and LPCXpresso55S36 (which
does not use dedicated USB RAM).
This allows testing these two implementations during CI runs.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Make sure that captions (tables, figures, ...) can be properly
seen on both light and dark them by setting their text color
to the default "body" color.
Fixes#73190.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Setting the number of memory wait cycles must take place while the clock
is set to 32MHz or less. This patch ensure the MEMWAIT register is
changed before the clock is changed from its default value (of 8MHz).
Note that in order to set MEMWAIT to 1 the power control mode must be
set to high speed (which is why the lines of code interacting with the
OPCCR register have also been moved).
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Instead of mixing floats and doubles, convert the code to
use double so that we avoid float->double conversion warning
from compiler.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The txtime can be run manually with qemu_x86 but it is enough
to have native_sim compiled with twister.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When setting boolean options using setsockopt(), the option
type should be int as the size of the option type is checked
and only int is accepted.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Incremental builds for TF-M are not picked up by Zephyr linking stage.
Code changes to tf-m repository results in a rebuild of TF-M and thus
an updated tfm_s.hex (and other files).
tfm_s.hex is merged together with the zephyr hex to form a final merged
hex file for flashing. This is done as a post-build command, however
such as step cannot take extra dependencies. The Zephyr target can have
extra dependencies, however that will only ensure the dependency is
brought up-to-date when Zephyr re-link, not re-linking Zephyr when the
dependency changes.
Therefore an object dependency is placed on the interface.c file for
Zephyr TF-M interface implementation, which ensures the tfm_api library
is brought up-to-date whenever TF-M rebuilds, and this update again
ensures the Zephyr itself is re-linked whenever TF-M rebuilds.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Was getting the following error:
include/zephyr/sys/fdtable.h:150:38: warning: 'struct k_mutex'
declared inside parameter list will not be visible outside of
this definition or declaration
150 | struct k_mutex **lock);
| ^~~~~~~
(#51667) tried to fix this by including `zephyr/sys/mutex.h`,
but `struct k_mutex` is defined in `zephyr/kernel.h`, so
include the latter instead.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The flag won't work with sysbuild since there is no way to
reliably tell to a parser which data came from which image.
fixes: #74092
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
__z_clock_nanosleep function was getting current time in cycles, via
k_cycle_get_32(), to perform its time calculations. However, when calling
k_sleep() to actually sleep, times are measured in ticks.
This causes a problem when there's a big skew between the uptime
measured in cycles vs uptime measured in ticks: in some platforms, the
system clock maybe up for a long time already when Zephyr starts
counting ticks, for instance, while downloading an image via PXE. In
this case, the calculations done inside __z_clock_nanosleep end up
measuring a much bigger current time than expected, thus sleeping too
much, basically all the time since system clock initialization.
This patch fixes that by avoiding the cycle trip: stick to ticks,
instead. They start counting from Zephyr initialization instead, which
is the expected uptime.
Fixes#69608
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
ESP32 requires proper alignment between sections. There are some
scenarios, as reported in #74533, that the section can
get shifted, causing runtime failure.
Making sure SECTION_PROLOGUE is used with ALIGN_WITH_INPUT
will guarantee its consistency.
Fixes#74533
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The sscanf() is not available for minimal libc so it cannot be used.
Use the net_bytes_from_str() that is provided for this purposes.
Fixes#75029
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
RTCs support a variety of combinations of alarm time fields, set
by the alarm time mask. Until now, alarm tests have selected
only the minute and hour fields, as these are always supported,
but some RTCs require setting every supported field when setting
the alarm time, while other RTCs don't support setting every field.
To support all RTCs in the test suite, a configuration has been
added which makes the alarm time mask configurable. Boards can now
define the specific alarm time mask they want to test within
their boards .conf files.
Additionally, the alarm tests have been refactored to not depend
on the time.h library to determine the struct rtc_time times to
set as these are constant, so they are now provided as const
structs instead.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
When logging strings are stripped then addresses to log module
names are invalid. Do not store that address in the const
data structure associated with the logging module to avoid
someone accessing it. Store null instead.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
nRF54H20 USB device controller cannot be enabled without VBUS, but the
device should not be connected to the host during testing. Add it to
build_only section.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Do not halt control endpoint, control endpoint may not be enabled when
there no host is connected. Yield after buffer is queued to allow the
driver to work.
Tweak pool size and number of buffers to pass the test with high-speed
drivers.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Restore the default CAN bitrates after having tested setting bitrate and
timing. This ensures the arbitration phase bitrate is proportional to the
data phase bitrate, allowing CAN FD transmission tests to complete.
Fixes: #73723
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Uses the variable for the default image when adding sysbuild
dependencies so that they can be copied out-of-tree and still work
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
"ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0" observed on a few
supported platforms when using SD card disk. Increase main stack size
for next USB device stack configuration to prevent stack overflow.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
After #74682, any function with constructor attribution requires
additional configuration. Due to some left-over and not-used
code in hal_espressif with that attribution, some samples started failing.
This is an additional to ##75063
Fixes#75169
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
ZSR_DEPC_SAVE is being used to determine whether we are faulting
inside double exception if this is not zero. It is possible that
the boot ROM or custom startup code leaves this non-zero, which
would result in a fake triple fault. So clear it at boot. Note
that the zeroing is done in MMU init code as these triple
faults are not actual hardware ones but only semantics, and will
occur once MMU is enabled.
Fixes#75194
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit catch the return code of the spi_config function and
early returns on error so that high level spi transfer api gets
the error too.
Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
In case of thread failure, fix the registrations by properly managing
the synchronization i.e. use conditional wait only if thread is being
initialized or will be initialized, else check for success or failure
without waiting for conditional variables.
Fixes#73523.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add pytest to test the output of dictionary logging to make sure
the encoded logs can be decoded back into strings, and to also
make sure the decoded logs have the expected strings.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is in preparation for introducing pytest to test the output
of dictionary logging. Code is the same, but the testcase.yaml
is trimmed to only those that can be tested.
Note that a copy is made instead of moving the whole sample over
is simply due to various documentation having references to
the sample. Since RST files under tests/ are not parsed for
zephyr:code-sample:<name>, the linking would have been vanished.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
pylint keeps failing and complaining about arg_data_type is
used before assignment. So assign it to None to silence
the warning.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The package_len has been extended from 10 bits to 11 bits
in the log message header. So the format for dictionary
logging also needs to be updated.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Python does not really support long long double, so %llx cannot
be formatted correctly, so we replace it with a simple %lx.
There is another variant %#llx and we also need replace it to
%#lx.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
... and put them into the LogParser class file instead of
the verisoned parser. This is in preparation for introducing
a new parser version.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Printing long long requires alignment on 64-bit before parsing
the actual argument. Or else the parser would be looking at
some unrelated bits. So fix it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This extracts the DataTypes class into its own file. This is in
preparation to add a new version of parser which can reuse this
class.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
If logging packages need to be created at runtime, the format
strings need to be in memory for the packaging code to know
what to be packed. So prevent stripping the logging string
section if CONFIG_LOG_ALWAYS_RUNTIME is enabled.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Fix the dictionary database not being generated under some
situations even though CONFIG_LOG_DICTIONARY_DB_TARGET is
disabled. For example, build and run through QEMU via
west build -t run.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adjust error message so that it clearly states runners.yaml is
missing from <build_dir>/zephyr, instead of referencing CMake cache
variable ZEPHYR_RUNNERS_YAML, which is no longer used (since
3124c02987 ).
Also clean up that variable in CMake since it is no longer used
(0 other references in entire tree).
Fixes#70605
Signed-off-by: Louis Feller <louis.feller@st.com>
Terms like the west workspace or even west projects and modules were not
documented prominently enough, prompting users to ask for additional
clarification. This patch attempts to resolve this by adding terms and
explanation of concepts to the glossary and west doc pages.
Fixes#67376.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Move information about device power state constraints from device
to policy.
It slows down the constraints lookup since we now have to find the
constraints for a device in a global array, but it saves resources
because we don't need to add a reference to constraints in all devices
instances.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Print on what board/core sample is executing.
Print how many bytes of data can be sent
in the mbox message (show use of mbox_mtu_get_dt()).
Print how many channels are available for incoming and/or
outgoing messages (show use of mbox_max_channels_get_dt()).
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Add the sample application as existing for the CAP initiator
and CAP acceptor.
The samples are still in progress of being improved and
fully featured, but they exist and can be used already now.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Set the UNALIGNED_ACCESS_SUPPORTED only for MCU with cortex M
that are neither M0 nor M0plus
Cortex M0 or M0plus mcus do not support un-aligned address access
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add `CONFIG_REQUIRES_FLOAT_PRINTF=y` to tflite-micro samples as in the
past the module was using its own `printf` implementation, but now uses
our logging infrastructure.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add test cases for testing basic CFB functions.
These tests cannot run in CI because the CI environment has no display.
Mark these tests as `build_only`.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
I broke the rendering of the CFB_FONT_MSB_FIRST font in
the previously committed #53796.
I will correct the entire font rendering process to make it
easier to remove the restriction that the vertical size of
the font must be a multiple of 8.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
MWDT requires function to be declared with argument types.
This PR provides explisitly type cast for out routine
inside z_cbvprintf_impl().
This PR also actual to LLVM-based compilers with strict
rules of compilation. It covers warnings generated with
additional flag -Wincompatible-function-pointer-types-strict.
This fixes https://github.com/zephyrproject-rtos/zephyr/issues/74562
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Add validation of the number of ASEs in control point
write requests.
This validates that the number of ASEs
in the control point is not greater than the total number
of ASEs we support.
This also validates that the GATT MTU is large enough to
hold all the responses from the write since those can only be
sent as notifications and never be truncated.
Finally this validates and updates the size of the buffer used to
hold the responses, which may be an optimization for some builds.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add CANXL MRU handler, use the same RX, TX IRQ number.
Update the error priority that is lower priority than
the the tx_rx_mru priority incase the error interrupt
happens continuously, mru interrupt priority must be
higher to get report error counter. Otherwise the mru
interrupt can be delayed by error interrupt and
never call to MRU handler. This fixes#75022.
Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
Removed the declaration and assignment of `eth_ctx` variable from
`net_if_get_wifi_sta` and `net_if_get_wifi_sap` functions since
it was not being used.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
The macro was modified in a way that may cause issues for some.
See e.g. 15d66ccc23
for an example of it needing a change.
The migration guide GH PR number refers to the PR that modified
the macro.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Delay an ACK in case no PSH flag is present in the data packet. as
described in RFC 813. This allows to reduce the number of ACK packets
we send and thus improve the TCP download throughput.
The results achieved on `nucleo_h723zg` board and the zperf sample
are as follows:
Before: 77.14 Mbps
After: 93.14 Mbps
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The `type` parameter of `struct bt_le_scan_param` is documented as
taking a `BT_LE_SCAN_TYPE_*` value, not a `BT_HCI_LE_SCAN_*` value.
In practice this makes no difference as the values are defined as the
same integer, but does result in `<zephyr/bluetooth/hci.h>` not needing
to be included.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Check if the calculated package length exceeds the maximum possible
value.
Fixes#75015
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Implement the remaining functions from the POSIX_FD_MGMT Option
Group that are part of POSIX, and add the
CONFIG_REQUIRES_FULL_LIBC dependency to CONFIG_POSIX_FD_MGMT, to
pull in the remaining C89 functions.
The POSIX_FD_MGMT Option Group is required for PSE52, PSE53, and
PSE54 Subprofiling Option Groups.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Mark the POSIX_SIGNALS Option Group as supported to the extent
possible under Zephyr, as Zephyr does not yet support processes.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Since Zephyr itself does not currently support processes, but
conformant applications should still be able to link, add stubs
for the remaining POSIX functions in the POSIX_SIGNALS Option
Group.
The POSIX_SIGNALS Option Group is required for PSE51, PSE52,
PSE53, PSE54, and likely many other POSIX Subprofiles.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Newlib requires an alias for the getpid() function. There was
a Kconfig already present for doing so, but the actual alias
was missing.
So this is technically a bugfix.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
After RC1 (feature freeze), new tests for existing features are allowed.
Afterwards, only bug fixes and documentation to existing tests are
allowed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This update includes bugfixes related to esp_timer,
responsible for handling Wi-Fi thread events.
This also removes all constructor attributes from non-used
hal functions.
Fixes#74368Fixes#74277Fixes#75063
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The macro was changed to return a const pointer, but the
BTP use the returned pointer in a non-const way.
Modify the usage so that the macro is used to initialize
the adv_param instead, and then provide a non-const pointer
to tester_gap_create_adv_instance.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Check for existence of APPLICATION_CONFIG_DIR in sysbuild.
sysbuild.conf is an optional file, meaning that sysbuild will not fail
if APPLICATION_CONFIG_DIR points to a non-existing folder.
A normal Zephyr build already fails when passing an invalid
APPLICATION_CONFIG_DIR but only because it cannot find a required
prj.conf in the folder.
Checking the existence of APPLICATION_CONFIG_DIR in sysbuild and fail
the build when a non-existing folder is passed to sysbuild ensures
sysbuild behaves similar to a normal Zephyr build regarding a
non-existing folder, while still allow sysbuild.conf itself to be
optional.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Some controllers, like the SoftDevice Controller can miss the first few
advertisements after the host tells it to start scanning. The DUT would
assumes the first RPA advertisements report it gets is the first that
was sent, but it was actually not the first. This would skew the
tester's judgement about the timing of RPA rotations.
To remedy this, the tester will scan continuously and switch between
expecting the identity address and the RPA without stopping the scanner.
The tester will tell the DUT to switch to RPA after it has received the
identity address advertisement. This ensures that the tester will not
miss the first RPA advertisement.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Several help prompts for non-user-selectable Kconfig options
included the phrase "select 'y' here", which does not make
any sense in this situation.
Adjust the help sections to use more appropriate language.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Mark the POSIX_DEVICE_IO Option Group as commplete. This Option
Group is required for PSE51, PSE52, PSE53, PSE54, and most of
the interesting applications involving file descriptors and
sockets.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Move the implementation of zsock_select() to zvfs_select(). This
allows other types of file descriptors to also make use of
select() functionality even when the network subsystem is not
enabled.
Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Move the implementation of zsock_poll to zvfs_poll. This allows
other types of file descriptors to also make use of poll()
functionality even when the network subsystem is not enabled.
Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add pread() and pwrite() implementations, which are nearly
identical to read() and write() but differ in that they do not
update the file-descriptor offset and instead read from a
specific file offset.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Create a compatibility Kconfig option for libc's that provide
their own stdin, stdout, stderr variables.
These are POSIX variables, so eventually we may want to
consider defaulting this option to 'y' and maybe providing
some zvfs abstraction for them.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The POSIX_DEVICE_IO Option Group requires a number of c89
functions mainly from stdio.h .
Namely,
clearerr(), fclose(), feof(), ferror(), fflush(), fetc(),
fgets(), fprintf(), fputc(), fputs(), fread(), freopen(),
fscanf(), fwrite(), getc(), getchar(), gets(), perror(),
printf(), putc(), putchar(), puts(), scanf(), setbuf(),
setvbuf(), ungetc(), vfprintf(), vfscanf(), vfprintf(), and
vscanf().
These should be provided by any conformant C library
(not by the POSIX API).
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Only invoke vtable methods read, write, and close if they are
non-NULL.
The close() vtable method is optional, so that should not return
an error if zvfs_close() is called and that method is
unimplemented.
Otherwise, if zvfs_read() or zvfs_write() are called and the
corresponding vtable method is unimplemented, fail setting
errno to EIO.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
fixes an incorrect dma configuration. When lpc dma driver was extended
with gather/scatter support the spi dma driver stopped working.
Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
Remove address-of operator ('&') when assigning `clock_control_xxx_init`
function pointer in `DEVICE_DT_INST_DEFINE` macro.
This change aims to maintain consistency among the drivers in
`drivers/clock_control`, ensuring that all function pointer assignments
follow the same pattern.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This nucleo board inherit from the root `h5` dts some special nodes:
- `vbat` on adc1 channel 2
- `vref` on adc1 channel 17
- `die_temp` on adc1 channel 16
The issue is discussed here:
https://github.com/zephyrproject-rtos/zephyr/issues/72914
Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
1. Changing default ADC sens line for ch0 on PA0
- `adc1` was documented to be sensing ch14 on PB1.
- This seems impossible because of a conflict between ch14
and UART2.
- `adc1` node is not defined in the board's DTS.
2. Set SPI1 NSS pin to PA4
- hardware NSS signal was documented to output on PC9.
- PC9 cannot be assigned as HW NSS for SPI1.
- HW NSS on SPI1 is by default on PA4, and remapeable to PA15.
3. Update number of UART lines available
- There are a total of 7 U(S)ARTs available on this board.
Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
The two functions did not have unit tests, and at least one
issue with input validation have been indentified and fixed
prior to these.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The function did not check if the provided string had a zero
length before starting to truncate, which meant that last_byte_p
could possible have pointed to the value before the string.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Sockets service thread need to be cooperative for best performance.
Enable CACHE_MANAGEMENT as some boards don't do it by default, it has
devastating impact on the performance as well.
Finally, increase FDS count, so that uploads still work when both TCP
and UDP receiver are enabled.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The nvs_calc_free_space() function does not return 0 when the NVS
is considered full, because some special ATEs are not taken into account.
This commit takes into account the ATE that is reserved for deletion in
each sector, in addition of the 'GC done' ATE when present.
Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
When `buf->len` is 0, the function of the while-loop
will be returned with error code `-ENOTSUP`.
The code block after while-loop cannot be reached
event though it is a correct command.
Use `buf->len` as the end condition of the while-loop.
Fixes#74730.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add check for returned value from the call to spi_nor_cmd_write
in spi_nor_write.
Fixes#74775
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit reduces `CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE` from
2048 to 1024 for the SiFive HiFive1 board.
Otherwise, the test fails on the following assert from Newlib:
memory space available for newlib heap is less than the minimum required
size specified by CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE
Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
Microchip's PolarFire SoC has a system controller that utilizes an
external spi flash for performing "auto update" of the FPGA design. This
is not a feauture fully integrated into Zephyr as of yet, so in an
effort to not constantly fail the CI, add flash tag to the ignore list.
Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
The previous port acquire/release functions have been removed,
and a new IP acquire/release mechanism has been introduced.
Additionally, the RX FIFO clearing function for PTL has been corrected.
Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
Optee driver should handle GET_THREAD_COUNT call. This limitation is
set in Optee-OS during build and limits number of symultanious calls
to optee. Add sym to handle this limitation.
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Capabilities should be set correctly or optee will show error message:
[00:00:00.000,000] <err> optee: OPTEE does not support dynamic shared
memory
Test suite should set optee UID or the following error message should
be displayed:
[00:00:00.000,000] <err> optee: OPTEE API UID mismatch
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
During SMC_RPC_FUNC_ALLOC call optee driver puts new shm object to a4
and a5 variables and then expects this object to be in a1 and a2 from
OP-TEE OS. Fixed behaviour so normal_call callback will act the same
way as OP-TEE OS
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
This should test OP-TEE driver basic functionality without
communication with real OPTEE OS.
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
This includes the TEE driver api implementation for OP-TEE.
It provides an interface to the OP-TEE TrustZone from the Normal space
to start sessions and request functions of the TA.
- targets ARM and ARM64;
- use SMC to connect to OP-TEE;
- accepts requests on privileged and unprivileged device.
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Moved helper headers, needed to work with OP-TEE, which defines basic
defines, used during communication with Trust-Zone
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Implementation of the generic API Trusted Execution Environment driver.
This implements all basic syscalls, needed by tee driver, basic
defines and helpers to work with shared memory.
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
The board didn't have a proper overlay for the test and failed to build
the test case causing CI failures.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Fix the devicetree bindings to actually be used as the default
configuration, following the example set by various ST sensor devices.
This requires sadly dropping enums and using #defines for various
options as well as repeating many numbers, but presumably is the way to
do it given the precedent set by ST with sensors like the lsm6dso.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
The Renesas RA HAL isn't compatible with the C++98 standard so
skipping the test ek_ra8m1 on CI
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Add support for the EK RA8M1 board
This board is using Renesas RA8M1 MCU.
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
This is the initial commit to support for gpio driver
for RA8M1 MCU, the coding is base on renesas fsp hal
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Add initial support for the Cortex-M85 Core which is an implementation
of the Armv8.1-M mainline architecture.
The support is based on the Cortex-M55 support that already exists in
Zephyr.
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Make it easier for external C libraries, toolchains, and
integrators to override Zephyr's implementation of functions and
sybmols on a per-Option-Group basis.
This change adds a number of non-user-configurable Kconfig
options that block internal Cmake rules from building Zephyr's
C sources corresponding to the particular option.
This is useful, for example, if a specific C library has a smaller,
or faster, or more secure version of some symbols belonging to a
a particular option group.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
In device init phase, it will call _mbedtls_init before malloc_prepare
as mbedtls has higher priority defined in SYS_INIT..
_mbedtls_init() will call psa_crypto_init() and malloc buffer,
but z_malloc_heap is not initialized, which will cause device hang.
Should call malloc_prepare() before _mbedtls_init to fix this issue,
so decrease the priority of mbedtls to default 40.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
In device init phase, it will call _mbedtls_init before malloc_prepare
as mbedtls has higher priority defined in SYS_INIT..
_mbedtls_init() will call psa_crypto_init() and malloc buffer,
but z_malloc_heap is not initialized, which will cause device hang.
Should call malloc_prepare() before _mbedtls_init to fix this issue,
so add new Kconfig to increase the priority of libc to deafult 30.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Commit f7e11649fd ("arch/arm64/mmu: fix page table reference
counting") missed another case where the freeing of a whole table
"branch" didn't take into account the fact that some sub-tables might
be shared and therefore must be cleared only if the reference count is
down to 1.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
When a new stack is allocated successfully in pthread_attr_setstacksize,
the new address should be printed not the original one.
Signed-off-by: Paul He <pawpawhe@gmail.com>
This addresses the coverity issue ID 363724.
This issue seems to have been a false positive, but the root complaint
from coverity was that within the callstack of ENET_Up, some functions
use the buffer config pointer as an array, whereas in the zephyr driver
it is declared as a singleton. Address it by redeclaring this as an
array of size 1 instead of a singleton.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit fixes coverity issue 392512.
The issue was that the return value of clock_control_on was not being
checked. Fix by checking the return value.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
`bt_le_ext_adv_start` does not modify the `param` argument, which can
therefore be marked as `const`. This allows the struct to exist purely
in ROM.
Signed-off-by: Jordan Yates <jordan@embeint.com>
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Make sure we at least build test the network socket tracing
support. The tracing tests do not enable networking so do the
socket tracing tests here.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Commit b6b43c3ed7
("drivers: udc: implement udc_mcux_ehci and udc_mcux_ip3511")
introduced MCUX shim driver using UDC driver API. Add test feature
'usbd' to a few supported boards to allow Twister to select these boards
for testing during CI runs.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
OpenThread interfaces were not considered when default interface name
is assigned, so they ended up with a generic "netX" name. Since it
useful to have an option to identify interface easily by name, assign an
unique "threadX" name for OpenThread interfaces, just like it's done for
other interface types.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The cmux module does not properly cancel all work when it is
released from its modem pipe. Releasing CMUX must cancel all
work as the pipe is no longer available, as it is set to NULL.
If work remains which tries to transmit something to the now
released pipe, a NULL dereference occurs.
This exact issue occurs if a DLCI channel is trying to open
after the modem pipe has been released, as the CMUX component
will send an open request at a fixed interval.
The expected behavior is for the open request to be cancelled,
and further open requests to be prevented until cmux is again
attached to a pipe.
Lastly, added a check to ensure that the pipe is indeed released
when calling attach, to ensure all work is indeed stopped before
modifying the pipe and buffers.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
When the CMUX is released from its pipe, it must stop transmitting
data to it, and prevent starting any work which requires
transmitting data like connecting CMUX or opening a DLCI pipe.
This commit extends the CMUX test suite to validate this behavior.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Mask the DNS_CLASS_FLUSH value when checking if the DNS_CLASS_IN
is set when unpacking a query.
Fixes#74829
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit should deal with
fixing the way USB_MCTLR_REG
is zeroed in order to disable
the USB controller along with
its tranceiver.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
If the CIG only contains C to P CISes, then we should allow
setting the P to C interval and latency to 0, and vice versa.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- Fix the build issues with the insufficient memory for
the MCUboot.
- Fix the sysbuild with MCUboot tests on all ESP32xx SoCs.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
The current implementation does not work well when ARMFVP_BIN_PATH is a
colon separated list.
This lets `find_program` deal with the lists.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Update rx and tx ready function as per of its description.
For tx_ready if tx interrupt enabled AND tx fifo is not full
For rx_ready if rx interrupt enalbed AND rx fifo not empty
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Fetch hal_adi to get Wrap_MXC_UART_GetRegINTEN(...) function
This function is going to be used to update MAX32xxx UART driver
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Remove two casts since the type was already the same.
Otherwise, the casts caused a warning with IAR tools.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
Coverity reported that a formula used to calculate the next expected
block in case the block size from the request differs our own block size
has a bug. The expression used to calculate the block size diff would
evaluate to an unsigned integer, giving (wrongly) enormous results in
case block size from the request is smaller than the Zephyr's default.
It turns out however, that this formula is no longer needed at all.
Since commit d3081e2f30, Zephyr's LwM2M
implementation will no longer negotiate the block size in case of write
operation, but simply comply with the block size included in the
request. This means that calculating the diff makes no longer sense and
can be safely removed - the next expected block number should be simply
increased by 1.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case packet read fails for any reason, there's no point proceeding or
printing the byte, just break the loop in such case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
vec->iov_len is of type size_t, so the comparison was always true.
Additionally, doing the memcpy() when iov_len was 0 did not really make
sense, so do it only when the actual length is larger than 0.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
For each of the fdtable.h functions listed below, convert the
z_ prefixed semi-private functions to use the zvfs_ prefix.
ZVFS stands for Zephyr Virtual File System and
is intended to be a common library used by the C library,
POSIX API, Networking, Filesystem, and other areas.
There are already a few functions in fdtable.h that use the
zvfs_ prefix, so this change is mostly about unifying them in
a way that uses a suitable prefix ("namespace") so that it can
be considered a public API.
- z_alloc_fd
- z_fdtable_call_ioctl
- z_finalize_fd
- z_finalize_typed_fd
- z_free_fd
- z_get_fd_obj
- z_get_fd_obj_and_vtable
- z_get_obj_lock_and_cond
- z_reserve_fd
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A specific test case for STM32 RTC is needed because of the way Counter
node is selected in preprocessing.
Tests STM32 RTC_Alarm using counter_ll_stm32_rtc driver.
This also clarifies how STM32 RTC Alarm can be used in this test.
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
In practice this allocation is very unlikely to fail, however being
consistent with checking for a failure keeps Coverity happy.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
This is a follow-up to commit ff0f389d0b.
When the `zephyr,differential` property is used together with a driver
that selects `ADC_CONFIGURABLE_INPUTS`, the `differential` field is
initialized twice what causes a compilation error in C++. Fix this by
refactoring the logic around initialization of `.differential`.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Partial conditional compilation within tcpv4/6_init_isn() caused
errors in coverity, as hash variable seemed to be used w/o
initialization.
As those functions are not really used at all if
CONFIG_NET_TCP_ISN_RFC6528 is disabled, we can just conditionally
compile entire functions to avoid confusion.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The function llext_section_by_name() is used only in one place, and it
expects the caller to have the section headers cache available. This
cache is freed after the ELF file is loaded, so the function is not
usable in the context where it is called.
Remove the function and replace the call with a direct search in the
ELF file section headers array, as was done before 08eb314c35.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Currently, the code uses the section name to identify the target section
of a relocation. This is not reliable, as the section name is not
guaranteed to be in a specific format. Instead, use the sh_info field of
the relocation section header to identify the target section.
This is a tricky change, as it requires a workaround for the Xtensa
port, whose code path diverges here into the `link_plt` function and
ultimately different arch-specific code. Avoiding this divergence
will require additional refactorings.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The optimization in llext_load() to avoid using the generic path for
sections that are cached in memory was broken for two reasons:
- it was comparing an ELF section index to LLEXT_MEM_BSS, which is a
llext_mem enum, and
- it was using the wrong section address for the cached sections since
the "merged sections" feature was introduced in 709b2e44bf.
This patch fixes both issues using the new llext_loaded_sect_ptr()
helper function.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The recent changes to the loader code merged related sections together,
making sure the merged sections are self-coherent. This, however, did
not take into account that the original ELF sections are now a _subset_
of the merged section - and might not start from the beginning of the
merged section.
This patch converts the `sect_map` member of `struct llext_loader` to a
structure with two fields:
- mem_idx: the memory area index where the ELF section is mapped
- offset: the offset of the ELF section inside the memory area
The offset is calculated after all sections are merged and the final
groups are defined. This will allow the loader to correctly calculate
the address of symbols and relocations in the merged sections.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add a new test case that verifies that llext_find_section() returns the
correct offset for a symbol in a loadable extension. This exploits the
fact that in the STORAGE_WRITABLE cases, the symbol addresses will be
inside the ELF file buffer, so they can be easily compared.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This patch reworks the testcase.yaml and sample.yaml files for the llext
subsystem to further reduce the number of tests performed by CI while
improving overall coverage.
The following changes are introduced by this commit:
- Remove the arch_allow field from the common section to allow any arch
to be tested in the build_only test. All other tests explicitly narrow
down the arches they are applicable to.
- In addition to platforms with active issues, also exclude a number of
platforms that are always skipped by the runtime filter due to
RAM/Flash limitations.
- Add integration_platforms to limit the test count to a few selected
platforms which are representative of the different arches.
- Remove a number of duplicate SLID tests and group them into a single
test that covers both ARM and Xtensa architectures.
- Test the relocatable case on ARM as well.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This patch sets the default value for LLEXT_STORAGE_WRITABLE to 'y' on
the Xtensa architecture. This is necessary because it does not currently
support the read-only mode for the LLEXT storage.
Make sure the default reflects this instead of asking the user to
manually set it.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The ELF files should be aligned to at least sizeof(elf_word) to avoid
issues. Use a larger value to ease debugging, since it reduces the
differences in addresses between similar runs.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
When content validation fails it is rather difficult to figure out the
cause if some meaningless byte mismatches another meaningless byte.
Let's store each memory location with its own virtual address so if a
mismatch occurs when reading it back it is obvious where it comes from.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Setting a boolean Kconfig option default to "n" after having set it to "y"
does not make the option disabled. Instead, avoid setting default to "y"
for SoCs known not to have dedicated USB RAM.
Fixes: #73912
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the `subsys/net/ip` directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Recent PR turned on test case for twister which revieled a bug
with building the test case for RT1050 EVK. The touch_controller
DTS node was removed a by commit 57ad325e and further deprecated
by bde07beb5 when the platform was converted to tread displays as
shields.
Signed-off-by: David Leach <david.leach@nxp.com>
Update dts file to use the new HCI api of apollo3 blue.
Fixing wrongly define spi cs pins for rak11720.
Signed-off-by: Sercan Erat <sercanerat@gmail.com>
Make sure constructors are run even when not using C++.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
* Move ctors and init_array from the CPP library
to the kernel library, as this is common for both C
and C++ and it is the kernel who is running it.
* Rename the hidden kconfig option CPP_STATIC_INIT_GNU
STATIC_INIT_GNU instead.
* If STATIC_INIT_GNU is not selected verify there is
constructors left behind.
* Rename common-rom-cpp.ld to common-rom-init.ld
* Rename z_cpp_init_static to z_init_static,
and have the kernel always call it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Keith Packard <keithp@keithp.com>
When working with coredumps, it is useful to be able to modify base
registers. Adding this capability allows implementing scripts to
inspect backtrace of threads other than current the current thread.
Signed-off-by: Félix Turgeon <felixturgeon@meta.com>
The `SIGNO_WORD_IDX` & `SIGNO_WORD_BIT` macros should have
used its own argument `_signo` instead of `signo`. It didn't
cause and error because the function's argument has `signo`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The overlay was in the root of the sample folder instead of the boards
folder. This is clearly a mistake.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Rename uhc_dev parameter of USBD_DEVICE_DEFINE macro to udc_dev to
reflect that this is a USB Device Controller device and not a USB Host
Controller device.
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
As pointed out on #57586: `LM75_TRIGGER_GLOBAL_THREAD` can't be enabled
without the int-gpios being present in the DTS node. This commit
requires at least one LM75 instance featuring it, otherwise it won't
work.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Replace the MMU initialization call with the new MMU re-initialization
API during the core context restore process in the ACE power management
code.
The previous code was directly calling `xtensa_mmu_init()` upon
restoring the core context, which is not appropriate when the MMU
context may have been preserved during low-power states. The new
`xtensa_mmu_reinit()` API is designed to re-establish the MMU context
without overwriting the existing page table, ensuring that any runtime
changes to the MMU configuration are retained.
Changes made in this patch:
- Removed the call to `xtensa_mmu_init()` from the
`_restore_core_context()` function.
- Added a call to `xtensa_mmu_reinit()` after restoring the
miscellaneous registers.
This update aligns the ACE power management code with the correct MMU
handling procedures when recovering from low-power states, as per the
recent changes in the Xtensa MMU support.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch removes definitions of power domains from the ACE30 PTL DTS
file that do not exist in the actual hardware.
The following power domain nodes have been removed:
- 'ml1_domain' with a bit-position of <13>
- 'io3_domain' with a bit-position of <11>
- 'io2_domain' with a bit-position of <10>
These nodes were previously included in the DTS file but do not
correspond to any physical power domain in the ACE30 PTL hardware. Their
presence in the DTS could lead to confusion and misconfiguration, as the
software might attempt to interact with non-existent hardware features.
By removing these nodes, the DTS now accurately reflects the hardware
capabilities of the ACE30 PTL platform, ensuring that the power
management infrastructure within the firmware operates based on the
correct hardware configuration.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Remove the Audio Link Hub (ALH) nodes from the ACE 3.0 PTL DTS file.
This patch cleans up the Device Tree Source (DTS) for the ACE 3.0 PTL
platform by removing the definitions of the ALH DAI nodes. The ALH
interface is not utilized in the ACE 3.0 PTL architecture, making these
nodes redundant.
The following changes are made:
- Deleted the 'alh0' and 'alh1' nodes, which were previously defined
with FIXME comments indicating a problematic modeling of individual
ALH channels/instances using node labels.
This cleanup helps to prevent confusion and potential errors in device
configuration by ensuring that the DTS reflects the actual hardware
capabilities of the ACE 3.0 PTL platform.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Rearrange the power domain entries in the ACE30 PTL device tree source
file to be in ascending order according to their bit positions. This
reordering improves the readability of the device tree source by
grouping power domains logically according to their bit position within
the power management registers.
The changes in this patch include:
- Moving 'ml1_domain' and 'ml0_domain' to their correct positions
according to their bit-position values (13 and 12, respectively).
- Adjusting the order of 'io3_domain', 'io2_domain', 'io1_domain', and
'io0_domain' to reflect their bit positions (11, 10, 9, and 8).
- Placing 'hub_hp_domain' and 'hst_domain' at their new positions
according to their bit-position values (6 and 5).
No functional changes are introduced with this patch. It solely aims to
make the device tree source more intuitive and easier to navigate when
mapping power domains to their respective control bits.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch updates the power control and status register bitfield
definitions in the ACE30 PTL ADSP power management header to match the
documented hardware specifications. The previous definitions contained
discrepancies that did not align with the actual hardware layout,
potentially leading to incorrect assumptions and usage within the
firmware.
Changes made in this patch:
- Renamed 'rsvd0' to 'rsvd4' to accurately represent the reserved bits
starting at bit position 4.
- Removed the 'rsvd6' field, which was incorrectly defined and is not
present in the hardware register layout.
- Adjusted the bit widths for 'ioxpgs' and 'mlpgs' to correctly reflect
the number of bits these fields occupy in the hardware.
- Introduced a new 'rsvd15' field in both 'ace_pwrctl2' and
'ace_pwrsts2' structures to account for the remaining reserved bits,
ensuring the structure sizes accurately represent the full register
width.
By correcting these bitfield definitions, the firmware's power
management code will now be consistent with the actual hardware design,
improving reliability and maintainability of the codebase.
Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Recent POSIX changes caused that 3 file descriptors are now preallocated
for stdin/out/err. This caused file descriptor shortage in all-in TLS
configuration of the sample, hence increase the maximum FD count.
In the server sample this manifested itself as an accept() error. This
triggered a busy loop though in the sample, as in case of accept()
errors it'd just try again w/o any delay. This made this issue hard to
investigate, so to avoid such cases in the future, make the accept()
failure fatal in the echo_server sample.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Echo samples exchange data fragments longer than the default DTLS max
fragment length introduced in commit
f033cd5601. Hence, need to increase this
config value for the sample.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Commit 3046e95d85 introduced eventfd use
in the sample, increasing the pollfd array size, however the config
indicating maximum number of monitored events remained intact, so the
sample didn't really work.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
lld will produce warnings for the symtab, strtab, and shstrtab sections
if --orphan-handling=warn is specified and there are no matching rules
in the linker script for these sections.
Handle these sections when building with lld to prevent the warnings.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
The NRF91_SLM has no additional AT channel for the AT shell to
use. This commit disables the AT shell for boards which use
the NRF91_SLM.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The supported modems don't have the same number or assignment
of DLCI channels. For example, the NRF91_SLM only has DLCI
channel 3 assigned to GNSS tunneling, where the ublox sara r5
has DLCI 3 assigned to an additional AT channel, and DLCI 4
assigned to GNSS tunneling.
This commit updates the creation and assignment of DLCI
channels and pipelinks to match the capabilties of each modem.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/(common, crypto, service, shell).
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/mesh directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/host directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/controller directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/audio directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Update sha for hal_renesas to pull new CMAC library which fixes issue
with invalid setting for sleep clock accuracy. This enables CMAC to work
properly on RCX clock.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This basic guide only covers linting so far. It could be expanded in the
future to be more accurate and detailed. The current configuration
allows to navigate the code but some symbols are not recognized by the
linter, and the native compiler is always used.
Co-authored-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Co-authored-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
This commit fixes compilation warnings that are present when compiling
with CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY as can be seen in this
compiler log:
"""
In file included from /zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/
include/string.h:215,
from /zephyr/subsys/bluetooth/host/smp.c:15:
In function '__memcpy_ichk',
inlined from 'sc_send_public_key' at /zephyr/subsys/bluetooth/host/
smp.c:3006:2:
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/ssp/string.h:83:1:
warning: argument 2 null where non-null expected [-Wnonnull]
83 | __ssp_bos_icheck3_restrict(memcpy, void *, const void *)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/ssp/string.h:83:1:
note: in a call to built-in function '__builtin_memcpy'
/zephyr/subsys/bluetooth/host/smp.c: In function 'smp_public_key':
/zephyr/subsys/bluetooth/host/smp.c:4214:21: warning: argument 2
null where non-null expected [-Wnonnull]
4214 | memcmp(smp->pkey, sc_public_key, BT_PUB_KEY_COORD_LEN) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/string.h:62:10: note:
in a call to function 'memcmp' declared 'nonnull'
62 | int memcmp (const void *, const void *, size_t);
| ^~~~~~
"""
The warning is caused by the potential use of NULL "sc_public_key"
global pointer that is not assigned a value in "smp_init()" if
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is enabled. This commit
conditionally changes the behavior of function "smp_public_key()"
if CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is activated to simply return
and not use the "sc_public_key" variable. Other functions that are not
called anymore by "smp_public_key()" are also conditionally
deactivated when CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is enabled
Signed-off-by: Sebastian Panceac <sebastian.panceac@ext.grandcentrix.net>
Added tabs to the thrift doc so that building works for macos
and is consistent with the rest of the documentation in terms
of one tab per os.
Updated client and server makefiles to discover include paths
for boost and openssl.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
There was an error in calculation of LFXO INTCAP code that prevented
obtaining desired XTAL accuracy below 50PPM. The error was fixed
the accuracy should be within expected range.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The implementation of formula, to calculate HFXO INTCAP code,
had a rounding error. That may lead so small deviation of HFXO
clock accuracy.
The IPS formula uses capacitance values in piko Fartd units.
That requires use of floating point data types. To avoid that
implementation of the formula uses femto Farats (1000 smaller unit).
In the former implementation conversion from femto Farad to piko Farad
was done just after reading of the desired capacitance from DTS.
To make sure the calculations are correct the change of unit must be
done at very end. Also rounding must be applied.
Also the formula was split and more comments were added to make the
implementation clear.
The commit fixes the implementation of the IPS formula.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
There were two errors in calculations of LFXO INTCAP code:
- The value provided by DTS files is internal desired capacitance.
The value from DTS has to be "encoded" before use in INTCAP
calculations formula. The formula for encoding is:
CAPACITANCE_CODE = (<desired_value> - 4pF) / 0.5
Subtract of 4 is related with lowest value in the allowed range.
Division by 0.5 is related with change to steps size.
In former code the subtration of 4pF was missing.
- The mid_val calcuation was wrong due offset_k left shift by 4.
It should be left shift by 3 to get total left shift of 9.
That matches the left shift of former part of the equation.
Final integer value was calculated by right shift 10, it should
be right shift 9. Then rounding was done by use of mod by (1 << 10)
It should be mod by (1 << 9) and compared with (1 << 8), that is
half of 0-512 range.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Remove legacy use of 'test case' and replace with `test scenario` where
applicable.
Update terminology and some other parts of twister docs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a note about the thread priority requirements in the help string of
the Kconfig option enabling net_mgmt sockets.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
net_mgmt sockets do not implement internal queue but use
net_mgmt_event_wait() internally to receive events. As a consequence,
in case of events burst, some events may be lost if the receiving
thread has lower priority than the net_mgmt thread.
This was visible in the sample, where only DAD event was reported
properly, as IPv6 Add/Remove events were triggered in pair with
corresponding multicast events (from solicited-node multicast
address).
We can mitigate this by increasing main thread priority to be at the
same priority as net_mgmt thread, so that the receiving thread (main)
has a chance to run in between event reports.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
- Increase the test coverage of supported platforms.
- Fix test_flash_area_check_int_sha256 for platforms with
flash program size >32. Increase the supported flash program size
to 512 (maximum supported by Zephyr platforms now).
- Fix test_flash_area_get_sectors test for platforms
with maximum number of sectors per image slot >256.
Increase the support value to 1024.
- Fix possible stack size overflow.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Fix a build warning due to the enumerate for the trigger
polarity possibly being (from the point of the compiler)
also GPIO_INT_TRIG_WAKE.
We fix it by simply returning a not valid argument error
which is what most other drivers do if they do something
smart enough.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit introduces the `Microchip RISC-V Platforms` area. This area
coveres the following current Zephyr targets:
* `m2gl025_miv`
* `mpfs_icicle`
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit restores the pre-HWMv2 status of RISC-V boards being covered by
the RISC-V area of maintenance.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
The part that says "Always set CONFIG_BOARD here" is outdated. In HWMv2,
CONFIG_BOARD is set by the build system, and we don't want to encourage
users to set it manually.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Clang uses floating-point instructions by default, even if -mfpu is not
defined. Disable using FPU when CONFIG_FPU=n.
Using floating-point instructions when FPU is not enabled generates
Usage Fault.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
When running this test with multiple counter instances enabled that
support different capabilities, if one of the instances does not
support the test required capabilities, the test will be
immediately skipped not giving the chance to run to the subsequent
instances.
Fix this by marking the test as skipped, only of all counter instances
under test were skipped.
Fixes#74358
Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
Modified to check the length of the remaining data in buffer
before processing the next report. The length check is missing
in the cont routine.
Signed-off-by: Eunkyu Lee <mochaccino.00.00@gmail.com>
Fixes and simplifies the handling of how the dts watch file is
processed
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue in the code that processes the output file of a
compiler to see which files should be watched, the compiler can
combine multiple files into a single line instead of putting them
each on separate lines if the length of the file paths is short,
therefore account for this and split it up into multiple elements
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Burst mode enabled on an unused channel causes a freeze during a
conversion consisting of several channels (not including the one with
burst mode enabled).
Discovered on nRF52832 (nRF52-DK) using the following approach:
channels 0-3 are used for application purposes as a sequence
channel 4 is used for battery measurements with oversampling
After few successful conversions the sequence (channels 0-3) freezes the
thread while waiting for semaphore to end the conversion.
Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
Check whether the received frame is complete by
comparing the length of the received data with
the frame data.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Inform about newly added support for LoRaWAN fragmented transport and
firmware-upgrade over the air (FUOTA).
Signed-off-by: Martin Jäger <martin@libre.solar>
In i3c_ccc_do_getcaps(), there is a missing break statement
in the switch case for GETCAPS_FORMAT_2_CRCAPS. Add it.
Fixes#74764
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This board is not compatible with the Arduino pinout. Therefore,
this patch removes all Arduino references to avoid confusion and CI
failures.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
None of the moved definitions are meant to be used by any code outside
of arch/arm64/core/mmu.c. Move them away from global scope to the
private header where more such definitions already live.
This is especially relevant as the previous commit fixed some of those
definitions which then caused conflicts with some external SDK that
carries a copy of those original buggy definitions.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Inverting a mask whose type has only 32 bits doesn't produce the
expected result. Fix those to be 64-bit values.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Update test_lib_self_transition_smf.c to detect the bug that was in
smf_set_handled().
Also delete unneeded test state STATE_D_ENTRY
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
If both `smf_set_state()` and `smf_set_handled()` are called in
a run action, the `internal->handled` bit would not be reset.
This could cause an issue on the next run action by not
propagating events to parents.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
- Fix flash_fill() for lpc55 and mcxnx4.
- Set FLASH_FILL_BUFFER_SIZE to the minimal size of data
which can be written to a device (by default is only 32).
- Fix the [flash_map.test_flash_area_erase_and_flatten]
failed test of tests/subsys/storage/flash_map.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
When external PHY has crystal, ESP32 can be configured
to use custom GPIO as clock source for it. However, due to
latest clock subsystem and hal updates, current driver
fails to build and blocks its usage.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Both MDIO and Ethernet drivers share the same clock subsystem.
After clock control update in #73807, clock_control_on()
now returns -EALREADY for already initialized clock subsystem.
As a result, ethernet driver won't initialize as needed.
Fixes#74440
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fix Bluetooth initialization problem caused by PR#72090
for at least ST boards that are using BlueNRG BLE modules.
For more information, please refer to issue #74528.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Replace DIV_ROUND_CLOSEST() with a normal division to simplify
operation and avoid redundant handling of signed integer rounding
as the temp value is an unsigned value. The temp value is in nano
precision, so rounding is largely inconsequencial anyway compared
to the comparatively low precision sync prescaler.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The minimum length for the network interface buffer is 2 so that we
can have terminating null there.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The network interface name that is copied to if_req struct might
be missing terminating null.
Fixes#74795
Coverity-CID: 368797
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The zsock_close() is not needed as the fd is always <0 so
the close is never called.
Fixes#74791
Coverity-CID: 366273
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Define the configuration to run the test on the external memory
xspi flash of the stm32h573i_dk disco kit in MemoryMapped Mode
Reading is done with memcopy and erase/write are aborting operation
to send the appropriate command
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Define the configuration to run the code_relocation
application on the external memory xspi flash
of the stm32h573i_dk disco kit in XIP
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Configure the external NOR flash memory to be executable.
Change the board.cmake to add the external loader for
flashing (version that do not mass-erase the external flash).
The address of the external flash is not needed
when flashing a hex file.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Adding the support of the memoryMapped mode
to the flash_stm32_xspi driver through the CONFIG_STM32_MEMMAP
That will allow XiP from the external octo_flash
Erase and Write operation must Abort operations.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add pinmux pinmux_lpuart3_flowcontrol
and pinmux_lpuart3_sleep for HCI-UART.
Add a node m2_hci_uart for HCI_UART.
And add chosen `zephyr,bt-hci =
&bt_hci_uart;`
Update section `Supported Features`,
section `Connections and IOs` and
section `Serial Port` for this feature.
Add section `Fetch Binary Blobs` to
guide how to fetch binary blobs for
BT modules.
add section `Bluetooth Module` for
hardware rework.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Move OA-related TX and RX buffers out from the device data.
Don't define the buffers without the `spi-oa` property. That
saves ~32KB when using generic spi protocol.
Rearrange device data fields to reduce byte holes found with
Pahole.
Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
Added force unblock psoc6 bless rx thread to process controller
events (at the end of psoc6_bless_send function)
Internal case: SWINTEGRAT-1767
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
At least for nrf boards, the emulation timer settings generate
reading around -60 degrees. Verify that value with some threshold.
Delay the first reading to prevent 0 at the beginning.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
This commit should deal with fixing
various issues on the board's dts
overlay files:
1. PSRAM node was not enabled when
display buffers were stored in
psram and thus, raising linker
error (overflow memory section).
2. Remove MIPI DBI read operations
for the MIPI DBI driver. This is
because not all drivers support
read and most of the cases it does
not have any practical usage.
In addition, this might trigger
conflicts with SPI sensors.
If needed, users should explicitly
enable read operations by defining
an SPI device taking into consideration
conflicts with SPI devices connected
to the SPI bus.
3. Remove enabling the DMA driver.
It should be enabled by default.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should deal with updating
the way USBD was handling the DMA
engine. Based on the #73803 request
DMA should be handled via the DMA
driver API class and not directly.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should deal with fixing
the pending length value returned
upon requesting the status of a channel.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
The bt_mesh_cfg_srv structure was removed in ad2fd44d7a, no need to
keep this text here anymore.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Tests showed that mDNS responder needs slightly more stack on certain
platforms, hence increase the default for such case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
After enabled POSIX_API in the sample, not all headers were included in
the build due to #ifdefs around header inclusions. This commit fixes
this.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The multicast IPv6 address count was too low to create all
solicited-node multicast address, resulting in an error being
printed on boot:
Cannot join solicit node address ff02::1:ff00:1 for 1 (-12)
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Fix two issues with the current configuration:
* The log buffer was too small for the sample, causing part of the stats
printout to be dropped
* The sample set CONFIG_NET_CONFIG_NEED_IPV4 but did not actually set
any IPv4 address, nor enable DHCP, causing the NET_CONFIG
initialization failure.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
A few issues were identified with DNS_SD segment buffers, making it work
"by chance" (depending on memory layout):
- size check in dns_sd_query_extract() did not take NULL termination
into account, and in result could overflow provided buffer
- the proto_buf in send_sd_response() can either be used to parse
protocol or domain, depending on number of segments in the query.
It should therefore be large enough to hold either.
- Similarily, instance_buf should be able to hold
DNS_SD_INSTANCE_MAX_SIZE, not DNS_SD_SERVICE_MAX_SIZE.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The multicast IPv6 address count was too low to create all
solicited-node multicast address, resulting in an error being
printed on boot:
Cannot join solicit node address ff02::1:ff00:1 for 1 (-12)
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Commit renames deprecated key refresh field.
It still has to exist to allow backward compatibility
with previous versions when data are restored from
the persistent memory.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Extend Twister configuration for nrf54h20dk/nrf54h20/cpuppr.
Add counter and i2c to the list of supported peripherals.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
The family variable was not initialized and could potentially
be left like that. This could only affect error printout.
Fixes#74796
Coverity-CID: 368799
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The `VERSION` numeric fields are used to construct the `uint32_t`
`KERNELVERSION` and `APPVERSION` values, which only allocates a single
byte for each field.
The field in `app_version.h` is `APP_TWEAK`, not `APP_VERSION_TWEAK`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Time it takes to "erase" one "page" of rram is too low.
Where getting timeouts.
"erase" of rram is done by writing all the words.
one "page" is 4096 bytes meaning 1024 32bit words.
worstcase time it takes to write one 32bit word from
0x00000000 to 0xffffffff is about 42us, giving 42ms
to write 1024 words.
Signed-off-by: Martin Tverdal <martin.tverdal@nordicsemi.no>
Erasing rram is very similar to partial erase on flash.
So we should use the same multiplier as there, 1.5.
0.1 multipler is way to low and was causing timeouts.
Signed-off-by: Martin Tverdal <martin.tverdal@nordicsemi.no>
This patch is to fix issue #74594
The issue is caused by default stack size 1500 bytes of NET_RX_STACK_SIZE
is to small for ARM64 platform, then the stack of net_rx thread is overflow
and break the net_mgmt thread's stack, as a result net_mgmt thread is
crashed.
So this patch will enlarge all the stack size of net stack threads.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
If func:`bt_hci_cmd_send_sync` return no-zero value, indicate
that `cmd(buf)->status` not zero, in this condition, rsp not
to assign anything, so remove it.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
`cmd(buf)` depends on this since it uses `net_buf_id`, which would alias
multiple pools.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Explicitly ignore the return value of net_pkt_read_u8() as the
net_pkt is validated before being queued for transmit within
modem_ppp_ppp_api_send()
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Fix linking error due undefined tdata entry.
After #72642, tdata could be undefined due to
missing TLS check.
Fixed#74852
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This test explicity enables the POSIX_API which is
not compatible with native_posix.
Let's exclude this target.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This file uses strnlen() but the C library
is not require to expose its prototype unless
_POSIX_C_SOURCE is defined.
So let's define it to avoid an implicit function
declaration warning.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
After enabling interrupts, serial_esp32_usb_irq_tx_enable() calls the
interrupt handler to handle any old events that occurred while interrupts
were disabled. However, this happens in the callers context, so if an
interrupt arrives during the call, it will call the interrupt handler again
resulting in corruption if the interrupt handler is not reentrant.
Fixes#74569
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
Problem:
re-plug USB (e.g cy8cproto_062_4343w kit) can cause that
CY43xx device become unresponsive (cy8cproto_062_4343w).
As result we catch ASSERTION FAIL (timeout) on HCI_Reset command.
Fix: added delay (BT_POWER_CBUCK_DISCHARGE_TIME_MS) to be sure
that BT CBUCK regulator to discharge.
Tested on:
cy8cproto_062_4343w, cy8ckit_062s2_ai and cy8ckit_062s2_43012 kits.
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
Commit add extension of configuration server by large
composition data server.
Mesh Protocol v1.1 specification
4.4.21.1
The Large Composition Data Server is a main model
that extends the Configuration Server model.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit add extension of configuration server by private
beacon server.
Mesh Protocol v1.1 specification
4.4.11.1
The Mesh Private Beacon Server model is a main model
that extends the Configuration Server model.
Configuration server and private beacon server shall always
exist together since they have bound states.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This patch adds a kconfig option `LV_Z_MEMORY_POOL_CUSTOM_SECTION`
which allows to place the buffer the memory pool is backed by into a
section with the label ".lvgl_heap".
Resolves issue: #66494.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Adds a test to show that enabling IPI cascades
(CONFIG_SCHED_IPI_CASCADE=y) can correct an invalid set
of high priority threads on an N CPU system.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds a section providing additional information about IPI cascades
to the kernel's SMP documentation.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
When this new Kconfig option is enabled, preempted threads on an SMP
system may generate additional IPIs when they are switched out.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
According to "Arm A-profile Architecture Registers",
Interrupt Controller Software Generaated Interrupt
Group 1 Register (ICC_SGI1R), AFF is 8 bits width
and the mask should be 0xFF but not 0xF.
Cortex_a_r is okay and no need to be fixed.
Signed-off-by: Steven Shen <steven.shen@jaguarmicro.com>
Tested-by: Rex Nie <rex.nie@jaguarmicro.com>
The test `sample.sensor.shell.pytest` fails althought the output
is correct. Time to execution is not enough.
This change extend test execution timeout.
Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
Document the addition of pipelinks to the modem_cellular.c device
driver and the new modem at shell which uses the pipelinks to
communicate directly with the modems.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add modem pipelink header to doc group modem_pipelink and add
this group to the modem group.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
This commit adds a missing #ifdef check which prevents building the
'counter_basic_api' test for boards under the following conditions:
* RTC node is defined in device tree (compatible = "st,stm32-rtc")
* RTC node is disabled in device tree (status = "disabled")
* Kconfig "CONFIG_COUNTER_RTC_STM32=n" is specified
This check matches the ones done a few lines above for NXP MCUs.
Without this check, building the test under the conditions listed above
failed with the infamous `undefined reference to '__device_dts_ord_N'`
linker error, because the test attempts to obtain RTC's `struct device`
despite CONFIG_COUNTER_RTC_STM32=n, which ultimately fails because the
RTC driver is not built unless there is an enabled RTC node in DT.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
PAGESIZE definition from legacy.h conflicts with POSIX definition.
Since this definition comes from legacy.h file which is only there
for Cube backward compatibility that we don't maintain in Zephyr,
simply remove it.
Note:
This is a second fix for #73363 which wasn't sufficiently tested.
Legacy file is included in stm32yyxx_hal_def.h headers and actually
removing it generates build errors as we're relying on some of the
definitions. Removing this inclusion is necessary and will be done
but on next release.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
The introductory paragraph had a broken link and was arbitrarily
referencing a couple of files that will be described extensively later.
Instead, just present the content generically.
Fixes#69990.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit increases the size of the main stack for the LLEXT sample
subsys/llext/modules, which otherwise overflows the stack on several
platforms.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Zephyr's thread stack size is not fixed, in most cases we would
need the `thread` argument to obtain the `stack_info`, unless
we are unwinding the irq stack, since that is fixed.
Otherwise we can only safely print the current `mepc` register,
unwinding the esf without the stack info of a thread can
result in undefined behavior.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Pass the current thread to `walk_stackframe()`, so that we do
not need to hardcode `_current` in `in_fatal_stack_bound()`,
which will allow it to reuse the `in_stack_bound()`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The #73619 which fixes the atmel,sam-tc-qdec sensor implementation
introduced agregression on the sample test removing the harness
console. That changed the test to use the default ztest behaviour
which is incompatible with the test outpout. This restore the
harness to the default console value.
Fixes: #74531
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Removes the check for whether or not the kscan kconfig option is set to
change the GUI accordingly.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Removes the wrapper code of the kscan based pointer input device. It was
implemented during the transitioning phase until all intree drivers were
converted to the input subsystem.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Use K_WORK defined. This delayed work is never used with any
other timeout than K_NO_WAIT, so the "delayed" part of it
is never actually needed
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
In case of TCP upload error, zperf would leak a socket when running in
asynchronous mode. The upload work have to release the socket it
allocated in any case, regardless of the session result.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
During socket setup, if one of the setsockopt() calls failed, the
function would return an error w/o closing the socket. That's wrong, as
in case of errors the function should clean up any resources it
allocated, the socket file descriptor is lost otherwise and resources
are leaked.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Kconfig options in those drivers are visible and selectable
to any board/soc when it should not. This makes sure both
depends on proper family.
Fixes#74347
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Cleanup leading spaces found via the following regexes:
r" compatible ="
r"^ "
in:
zephyr/**/*.dts
zephyr/**/*.dtsi
Signed-off-by: Jordan Yates <jordan@embeint.com>
Change updates log level only if UART log backend is enabled in Kconfig
configuration. The log level update is not needed in case logs are
provided over other backend (e.g. RTT).
Change affects both USB stacks.
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Uart FIFO is useful in case of wakeup on serial as it will allow
to avoid losing chars.
Enable it systematically on all overlays for this sample.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Add tests suite covering HTTP2 HPACK header compression and Huffman
encoding.
Note - many HPACK encoding/decoding cases in tests look similar, but
there are subtle differences in HPACK header used. For decoding, we
should be able to decode all of them. For encoding, we only test what
we support (no dynamic indexing).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Current NET_SOCKETS_POLL_MAX and ZVFS_OPEN_MAX values were too low for
the sample after the DNS refactoring, making the sample unusable in
current state.
Bump those values accordingly to make the sample functional again.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
We should return the errno value in such case, as ret will always be -1
on failure, which might misleading, as it does not give any hint on what
failed.
Also bump the log level of the error message, so the failure is visible
w/o needing to enable debug logs. Such a failure is fatal for the DNS
subsystem, so error level is justified here.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The `dns_data` buffer, allocated by the DNS dispatcher was dereferenced
twice - once in registered DNS handler, second time in the dispatcher
itself.
Since the buffer was allocated by the dispatcher, and it's not really
guaranteed that the buffer will be freed in the registered handler (this
depends on the processing outcome, the function may return early w/o
freeing the net buf in case of errors), it makes most sense for the
dispatcher to keep ownership of the buffer. Hence, the registered
handlers will no longer release the buffer provided in any case, and the
dispatcher will free it on exit.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Some of the new max32 family boards were missing the vendor name in
their board yamls and not being tested by `twister --vendor adi`.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Let's provisionally disable the nrf54l15 BT tests in CI
due to instability issues in the controller for this
platform.
See https://github.com/zephyrproject-rtos/zephyr/issues/74635
This should be reverted once the underlaying issue is fixed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Remove obsolete workaround with conditional turning off "-g"
flag when Thread Local Storage used.
Recent versions of MetaWare have no issue with linking files with
TSL-related data.
Moreover, pointed workaround breaks userspace for recently added
ARC-V platforms, as they use both TLS and DWARF info while compilation
process.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/29920
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Most people would expect green_pwm_1 to go to LD1 on the dev board.
However it is routed to CN1 pin 2, since routing it to LD1 would
interfere with SPI SCK on the Arduino connector. This PR adds a
comment to tell users that LD1 won't light up as expected and to
fix the comments stating which PWM goes to which pin.
Also updated the documentation to note this.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Apply the workaround for the issue "BBRAM First Byte" in the
NPCX49nF_Errata. This bypass limits the access to the BBRAMs' first byte
(i.e., the offset 0). As a result, only 127 bytes are available in npcx4
chips.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Bits in the BBRAM status register (BKUP_STS) are write-1-to-clear bits.
The current driver writes 0 to clear those bits, which is incorrect.
Fix it in this commit.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
These 2 tests have been seen failing in CI due to
the real time timeout.
Let's increase their deadline so it does not happen.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The generic stack pointer checker in the architecture code is
enough so we can remove the platform specific one. Besides,
xtensa_dc233c_stack_ptr_is_sane() does not do much checking
either.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This checks for stack boundaries during backtrace to make sure
we are not stepping into invalid memory.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Check that the stack frame pointer is valid before dumping
any registers while handling exceptions. If the pointer is
invalid, anything it points to will probably be also be
invalid. Accessing them may result in another access
violation.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
It is observed that during logging in fatal exception,
it prints "FATAL EXCEPTION(null)". Exact reason is unknown
as debugging through GDB would make it all work again. So
separating it into two log statements to avoid this situation.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Input subystem tests and samples were failing to build on these max32
boards because the zephyr,code property was missing on gpio-keys child
nodes. The devicetree binding doesn't specify the property as required,
but the driver implements a build assert when the property isn't
defined.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
With the update of the Kconfig symbols to new naming scheme,
CONFIG_PTHREAD does not exist anymore.
Use the new CONFIG_POSIX_THREADS instead
Follow-up: #73047
Signed-off-by: Pierrick Guillaume <pierguill@gmail.com>
In size_report script, if the DWARF section of ELF file contains both
debug_loc and a debug_loclists sections, LocationListsPair class is
used to track locations. In that case, parse_from_attribute was missing
one argument which was causing the script to fail.
Signed-off-by: Zhani Baramidze <jbaramidze@meta.com>
When TLS is used, `__tdata_start` is PROVIDED by
"thread-local-storage.ld" using absolute address, which
makes it land in wrong flash address. This causes risc-v startup
code to fail during memcpy/memset.
This PR overrides `__tdata_start` to use ADDR, which will
make sure it is placed in DROM region due to AT keyword.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
GitHub labels were hard to visually parse so use guilabel role to make them
stand out more, and put them in tabular format.
Other minor cosmetic tweaks
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Achieve proper syntax highlighting using "console"
language when command snippets start with a prompt.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
config file snippets should use "cfg" pygment to get proper highlighting
This commit updates all occurences where "kconfig" or other languages
were used.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add `FILE` typedef in the `stdio.h` so that when doing
`FILE *file` definition checkpatch doesn't complain about
the position of the '*' and fail in CI.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
According to the nrfx peripheral resource sharing example in
samples/boards/nrf/nrfx_prs it should be possible to share a resource
and apply the pins on peripheral that share resource ID.
However the sample only works since it only demonstrates UART and SPIM,
and by enabling both another SPIM driver, and UART is enabled for the
console. It would not be possible to enable a TWIM driver in addition.
Instead allow the PSELs if the configuration for NRFX has been enabled.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Currently iterable sections as per the documentation are added with
zephyr_linker_sources(SECTIONS ...) after bss/noinit.
This commit allows putting sections after common-rom.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Use PDU_BIS_LLID_FRAMED in empty PDUs for framed BIS
Allocate room for header when calculating max_pdu for framed BIS
Set group_sync_delay, stream_sync_delay and framed properly for BIS
broadcaster
Add missing call to isoal_tx_event_prepare() for BIS
Signed-off-by: Troels Nilsson <trnn@demant.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- Assign sync_delay parameters for ISO-AL sink creation
- Store framing information from BIGinfo for use in sink creation
- Set max_octets for sink creation
Signed-off-by: Morten Priess <mtpr@oticon.com>
In order for the --recover option to work properly on the nRF54H20, it
requires executing it for both cores, the radio and the application one.
Extend the recover_target() function so that it does so for both 53 and
54H20.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Some functions in the bmm150 driver were depending on a define
that was never used. Changed it to the one that is actually defined.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Confirming the Proximity Integration is an integer, we don't need to
pre-apply the Scaling factor to then be accounted for when the actual
meas_timeout_us is calculated.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Coverity found this legitimate issue: the datasheet specifies PS_IT
being 2-bits long (1, 2, 4, 8) and this driver assumes more steps are
available. Remove extraneous fields so the Proximity integration
setting fits in the expected 16-bit value.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
drivers/serial/uart_async_to_irq.c: In function 'get_rx_timeout':
drivers/serial/uart_async_to_irq.c:51:26:
warning: 'cfg.baudrate' may be used uninitialized
51 | baudrate = cfg.baudrate;
| ~~~~~~~~~^~~~~~~~~~~~~~
drivers/serial/uart_async_to_irq.c:45:28: note: 'cfg' declared here
45 | struct uart_config cfg;
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
This can be useful if application developers
want to print them in the applications.
Later we can also use them in
the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
The function reuses the ATT implementation.
To make the function simpler to use, the function handles both positive
and negative values.
Unfortunately the APIs do not document if the API returns an
errno val or a GATT return value.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This API converts a SMP error code to a string.
This can be useful if application developers want
to print them in the applications.
BT_SMP_ERR_SUCCESS was added for completeness.
Later we can also use them in the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This can be useful if application developers
want to print them in the applications.
Later we can also use them in
the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
The Renesas RA ICU forcibly enables GEN_ISR_TABLES, and it remains
enabled even if it is disabled in prj.conf.
Adding `not CONFIG_GEN_ISR_TABLES` to the filter condition to skip
this case.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Renesas RA ICU driver requires to generate ISR tables.
Adding `select GEN_ISR_TABLES` to force enable it.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
i3c config need has i2x/i3c baudrate configured first.
so in i3c init we shall set the baudrate first
fixing: #65153
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
In ethernet_recv(), it will call ethernet_update_length() to check for
ipv4 or ipv6 packet if it needs to get rid of the padding in the
packets. But for EAPOL packets, no need to do this, which may modify
the packet length of EAP type packet wrongly and leads to EAPoL
packets dropped in supplicant.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Use select_network instead of enable_network, then can trigger sta
connection mutiple times. Also update the configuration in
add_interface().
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Split wifi interface into station mode and soft-AP mode, as there may be
station and soft-AP two interfaces that work concurrently.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
When getting gpio info for a specific device with no line
names, invalid memory was accessed.
The check for the length of the line name array has been
corrected to avoid this.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
The unreset of ACE PDM controllers is moved to beginning of
void dai_dmic_start() and done side-by-side. This change is done
for adhering to recommended hardware initialization flow to
avoid intermittent failures on ARL-S.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch removes the traces printed inside spinlock protected
code. The DMIC capture start code is timing critical. Traces
leave an unknown delay into start sequence, so it's better to not
produce them.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The dai_dmic_update_bits() function is used in start trigger
code dai_dmic_start() and in capture runtime to control DMIC
IP in unmute sequence. Especially the start sequence is timing
critical so it's better not produce additional delay in this
function.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
When using the FDCAN1, use the PLL2q clock source at 80MHz on the
nucleo_h743zi or nucleo_753zi boards, now that sysclck is 480MHz.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
When device was resumed from sleep OUT endpoints were most
likely not enabled due to condition that checked pending transfer.
Configured OUT endpoints should be enabled (ready for RX)
if they were enabled by interfaces.
Now separate bit field enabled is added and check to
see if OUT endpoint should be ready for reception after
sleep is done.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Callback with USB_DC_EP_DATA_OUT was called directly from
interrupt handler (handle_ep0_rx()) while rest of the interrupt
conditions were not checked yet.
Some interfaces started next transfer directly from this callback
resulting in case where TX endpoint was still marked as busy
and transfer was eventually abandoned.
Now message is sent from all affected endpoints after every USB
pending interrupt is handled.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Switching from write to read on EP0 is done when data is
transmitted.
Additionally receiver is enabled when NAK is created in
response to OUT token. This may happen when host sent
ZLP before everything was transmitted.
This case flushed receiver FIFO which could lead to
setup packet corruption.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Add support for automatic control of PLL for USB subsystem.
This utilized virtual USB clock present in clock control.
USB driver enables PLL when device is attached or USB
sends resume signaling.
PLL can be turned off (if application does not requested it)
when device is detached (application request)
or USB host sends suspend request.
When VBUS is not present or application did not started USB yet
PD_DOMAIN_SYS is also not acquired that allows for deep
sleep. When USB is active deep sleep will never be activated.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
When EP0 was disabled EP0 was setup to ignore setup and
out packets.
In usb_dc_ep_enable() function mask was never cleared.
It resulted in USB stop functioning after application
disabled endpoint (usb_disable()) and then tried
to enable usb again.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Smartbodn does not have dedicated USB clock.
For USB to work PLL needs to be turned on.
To allow for flexible configuration artificial USB clock
is added that can be operated via clock_control subsystem.
This new clock turns on PLL when USB subsystem is enabled.
PLL can also be request in DT if application requires
more speed.
PLL can be automatically turned off when USB enters suspend
state and application did not requested it.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Add support for NVS on the board by default. Using the simulated flash
driver is required as this board has no flash controller. Support is
desired as this is the ARM board used by coverage testing.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The documentation recommends to read and then write-back the entire
register, when ending interrupts.
Signed-off-by: Mateusz Karlic <mkarlic@antmicro.com>
The nrfutil device v2.4.x now supports the recover operation. Configure
run once to ensure that domains are not unnecessarily erased.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Commit aligns usage mesh and host PSA.
Since PSA crypto is supported in host then
there is no reason to switch off some of host
features to get rid of tinycrypt functions in
the final image.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
GNU ld since 2.39, produces more security related warnings.
Due to the way we ordered sections the linker may end up with
a segment in the elf which contains both executable code
and read and write data.
This results in this new versions of the linker warning us.
So, in the linker script,
let's move the executable native_sim_if section from
being placed with the other native port related segments
after .data to being placed after .text instead.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
With adding support for ARC-V architecture some additional
changes in section definitions are required.
This PR fixes https://github.com/zephyrproject-rtos/zephyr/issues/74421
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Reduce the spi1 clock freq to pass the testcase on the nucleo
_h753zi or nucleo_h743zi boards
Connect D11 & D12 pins on the board to pass the test
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Running the tests/subsys/lorawan/clock_sync/ requires a long timeout
to pass. Set a timeout: 500 to cover most of the usecase
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Validate the contents of `struct rtc_time` against the provided mask
when setting time or alarm.
Use the same names of function parameters as those in the RTC Interface.
Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
Similar to ISO connections, ACL connections are not serviced as fast as
possible. Change this, and try to send as much as we have resources for.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
ISO connections that were in the TX queue were not getting serviced in
time. This happens because `iso_data_pull()` returns `NULL` when that
particular connection (`conn`) is done sending.
But it doesn't trigger the TX processor again to process other channels in
the queue. This patch fixes that by calling `bt_tx_irq_raise()`.
We can't do this from `conn.c` as we don't know if the `NULL` returned is
because the current channel is out of data or because it has data but it
can't send it (e.g. the current buf is being "viewed" already).
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/74321
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This makes it more clear what is happening when the host cancels
connection creation where the controller raises
the connection complete event with status set to
"UNKNOWN CONNECTION IDENTIFIER (0x02)".
This is especially useful for developers not familiar with this
detail in the spec.
See also: Core_v5.4, Vol 4, Part E, Section 7.8.13,
LE Create Connection Cancel command.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add google_dragonclaw board definition and allow running the
drivers.counter.basic_api.stm32_subsec test on the board.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Add documentation about USB message notifications. Use literalinclude to
pull code snippets from the samples.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add doxygen group with MSC device API and document macro to create
mapping between disk access and MSC LUN.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Make example code most left-aligned.
Also use :samp: to format identification strings in the table.
Followup on commit 8739efe0fc
("doc: usb: add initial USB device configuraiton howto").
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Clock NXP_S32_FTMx_CLK reference the output of PCC_FTMx clocks, but
FTM has an internal clock mux to select the clock source of the
counter, which for ucans32k1sic board is set to system clock. Fix the
clock nodes to use the correct clock name. So far this was working
because both NXP_S32_FTMx_CLK and NXP_S32_CORE_CLK are configured to
the same frequency.
Fixes#74348
Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
Generally, we should avoid using reserved names in global
contexts.
subsys/net/lib/ptp/clock.c:58:25: \
error: 'clock' redeclared as different kind of symbol
58 | static struct ptp_clock clock = { 0 };
/opt/toolchains/zephyr-sdk-0.16.8/arm-zephyr-eabi/picolibc/ \
include/time.h💯12: \
note: previous declaration of 'clock' with type 'clock_t(void)' \
{aka 'long unsigned int(void)'}
100 | clock_t clock (void);
subsys/net/lib/ptp/clock.c:58:25: \
error: 'clock' defined but not used [-Werror=unused-variable]
58 | static struct ptp_clock clock = { 0 };
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The shell tries to decode all channel types and sequential channel
indexes. Unfortunately when swapping to channel specs we forgot to reset
the channel index for the next channel type to look at.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Noticing many PRs that wait too long in the queue although once of the
maintainers approved with asignees set to other maintainers.
This changes the current behavior of picking the first maintainer in the
list and assigning to them only, instead we assign to all maintainers of
the main area being changed.
Who ends up driving the PR to a mergeable state is then to the
maintainers and they can unassign/assign based on availability.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Created tracing APIs to trace the enter and (exit + result) of
SYS_INIT and DEVICE_DT_DEFINE (and friends).
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Removed PM device runtime support from drivers in PD_SYS domain.
Update the rest device drivers to call pm_device_runtime_get/put()
functions when CONFIG_PM_DEVICE_RUNTIME is enabled.
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
Add helper function which calculates the required calibration to
1 Hertz from the actual frequency of an RTC. This helper is both
functional and adds to the documentation of the RTC calibration
API.
The rtc.h header now includes zephyr/kernel.h instead of
zephyr/types.h as __ASSERT_NO_MSG is now referenced in the header.
The commit additionally extends the rtc_api_helpers test suite
with a test to validate the conversion function itself.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
If filesystem relies on zfp flags being set after open, this can lead to
inconsistency with the current implementation of FS_O_TRUNC.
Move the assignment of zfp->flags before any other call to fs api to avoid
such issues.
Signed-off-by: Pierrick Guillaume <pierguill@gmail.com>
Fix a few issues with the probes documentation for NXP boards:
- fix references to debug probe type in probes page introduction
- add an explicit "Install the host tools" step for the LPC-Link and
MCU-Link based debug probe update steps.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
RT1050 EVK rev A boards (with rev A silicon) are not well supported by
Zephyr. Update the documentation page to remove the reference to A0
silicon, as the page describes details specific to the RT1050 EVKB with
rev B silicon.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Update iMXRT10xx board debug sections to use common snippets, which
describe debug configuration settings shared between all these boards.
This should help avoid documentation falling out of date in the future.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The following heap-related Kconfigs shared by the picolibc &
minimal libc have been deprecated for more than 2 releases,
remove them and update the Kconfigs accordingly:
- `CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE`
- `CONFIG_MINIMAL_LIBC_REALLOCARRAY`
Cleanup the handling to support the deprecated malloc arena
size configuration values.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The following Kconfigs have been deprecated for more than 2
releases, remove them:
- `CONFIG_SUPPORT_MINIMAL_LIBC`
- `CONFIG_MINIMAL_LIBC_MALLOC`
- `CONFIG_MINIMAL_LIBC_CALLOC`
- `CONFIG_MINIMAL_LIBC_REALLOCARRAY`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The following Kconfigs have been deprecated for more than 2
releases, remove them:
- `IEEE802154_CC13XX_CC26XX_SUB_GHZ_RADIO_TX_RETRIES`
- `CONFIG_IEEE802154_2015`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
These Kconfigs should have been deprecated for more than 2
releases, remove them:
- `CONFIG_CPP_MAIN`
- `CONFIG_CPLUSPLUS`
- `CONFIG_LIB_CPLUSPLUS`
- `CONFIG_EXCEPTIONS`
- `CONFIG_RTTI`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`CONFIG_CONFIG_SETTINGS_FS` has been deprecated for
more than 2 releases, remove it and its associated source
code.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Selection of these GIC Kconfigs have been deprecated
for more than 2 releases, users should use the devicetree
method instead, update the Kconfigs.
The SOCs below have been updated to not select `GIC_V3`, since
their devicetree already have the required compatible:
- fvp_aemv8r
- rzt2m
- rk3658
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The following Kconfigs:
- `CONFIG_ETH_STM32_HAL_RANDOM_MAC`
- `CONFIG_ETH_STM32_HAL_USER_STATIC_MAC`
- `CONFIG_ETH_STM32_HAL_MAC3`
- `CONFIG_ETH_STM32_HAL_MAC4`
- `CONFIG_ETH_STM32_HAL_MAC5`
have been deprecated for more than 2 releases, user should
have switched to the devicetree method now, remove them.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`CONFIG_LOG_DOMAIN_ID` has been deprecated for years and
shouldn't be used according to its documentation, remove it.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`CONFIG_BT_DEBUG_LOG` has been deprecated for more than 2
releases, replace it with `CONFIG_BT` + `CONFIG_LOG`:
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
These clock selection Kconfigs should have been deprecated for
more than 2 releases, remove them:
- `CONFIG_COUNTER_RTC_STM32_CLOCK_SRC`
- `CONFIG_COUNTER_RTC_STM32_CLOCK_LSI`
- `CONFIG_COUNTER_RTC_STM32_CLOCK_LSE`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`lwm2m_engine_get_resource()` has been mark for deprecation for
more than 2 releases, but we are still using it in tree now,
because the `__deprecated` marker was probably forgotten in the
initial deprecation commit.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
These functions have been deprecated for more than 2 releases,
remove them:
- zephyr_smp_rx_req
- zephyr_smp_alloc_rsp
- zephyr_smp_free_buf
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
These token enums been deprecated for more than 2 releases,
remove them:
- JSON_TOK_LIST_START
- JSON_TOK_LIST_END
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Update airoc_wifi_host_buffer_get function to set final
buff size based on input “size” param.
Update airoc_mgmt_send to use airoc_wifi_host_buffer_get
instead net_buf_alloc_len.
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
Since b53a792ff0 Zephyr has the ability to define tristate Kconfig
options. When a tristate option FOO is selected as a "module", this
results in autoconf.h defining CONFIG_FOO_MODULE, not CONFIG_FOO.
This patch allows the check_compliance script to also accept references
to a Kconfig symbol ending in _MODULE if the prefix is defined.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Before merging the BIS specific codec configuration with the
subgroup codec configuration, we should ensure that the
BIS data is not empty, as that would trigger an error from
bt_audio_data_parse.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Execute 'zephyr.exe' in application build directory as 'current working
directory' (cwd). This makes sure that native_sim specific drivers (like
flash simulator with file backend in 'flash.bin') are using unique context
for external resources with relative paths.
This fixes executing native_sim tests in twister with flash simulator.
Previously a shared 'flash.bin' was used for all executed 'zephyr.exe'
processes in twister. After this patch a unique 'flash.bin' file is used
for each tested sample, since those 'flash.bin' is placed in application
build directory instead of twister root directory.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
The `orientation-flipped` dt property was dropped from the devicetree
binding for the ssd16xx display driver. Add a note to the migration
guide directing users to now set orientation at runtime.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Fixed#74370, the issue is caused by the update to introduce MMIO
mapping, after MMIO mapping, should use data->base for device
base memory address.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Some stm32 series, do not have a LL_DBGMCU_SetTracePinAssignment
function to enable trace IO port, this is the case with the
stm32h7 serie.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
For station and internal AP coexist case, station connected to
external AP, ping from station to external AP cause cpu hang.
Internal AP dhcpv4 server register handler echo_reply_handler
on icmp handler by net_icmp_init_ctx for dhcp server snoop
feature. Ping also register handler handle_ipv4_echo_reply on
icmp handler for ping cmd. If no external station connect to
internal AP, input parameter ‘user_data’ of function
echo_reply_handler is NULL. When we trigger ping process,
icmp_call_handlers fetch all handlers from icmp handler
if receive any ICMP packet, so echo_reply_handler be called,
but input parameter is NULL, cause CPU hang.
Add input parameters check to fix this issue.
Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
hci_uart_async/debug.mixin.conf is used to enable RTT logging
for hci_uart_async sample. RTT can be used to avoid conflict
between different serial interfaces because the sample uses
UART as an interface for HCI communication.
RTT_CONSOLE option enabled in the debug.mixin.conf depends on
CONFIG_USE_SEGGER_RTT so enabling CONFIG_USE_SEGGER_RTT by
default makes it easier to build the project with RTT enabled
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
Add isolated pool (static and dynamic) to the sample illustrating how to
use that and performing some testing in different scenarios.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
Currently, zbus uses a single global `net_buf`pool to publish messages to
msg_subscribers. It would be good to have a way to separate the pools for
channels related to critical parts of the systems to avoid publication
failure on these particular channels. These channels will not use the
global pool. They can set an isolated pool by calling the
`zbus_chan_set_msg_sub_pool.`
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
When CONFIG_X86_EXCEPTION_STACK_TRACE is enabled, also forcibly
enable CONFIG_THREAD_STACK_INFO. Without the thread stack info,
it is possible the stack unwinding would go out of the thread
stack and into unknown memory, resulting in hard fault.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The current atmel,sam-tc-qdec sensor implementation shared the timer
counter node. This create issues when users wants define both modes.
The current proposal changes the qdec dedinition to be a child of
tc and refactor all the chain of definitions.
Fixes#71312
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Replaced the software `reverse` function, used for bit reversal, with
the intrinsic `__RBIT` function.
This utilizes the hardware bit-reversal instruction for improved
efficiency.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Some extensions may be able to run faster if they can check if Doxygen
contents has changed from one build to the other
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The sysbuild part of sysbuild/application creates a sysbuild/application
folder under top-level build dir. However, having a sysbuild folder at
this level means that tab completion for sysbuild pre-fixed build
targets will stop after completing just `sysbuild` and then show several
subfolders, making it hard to see important build targets, such as:
`ninja sysbuild_menuconfig`.
As `sysbuild/application` is just a folder name, then move it to
`_sysbuild` instead to avoid impacting tab completion for ninja and
make.
Also strip the `application` part in the process, as the extra folder
doesn't provide any extra benefit, but is just one more level to enter
when browsing the build folder structure.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
If not defined by caller, then set APPLICATION_BINARY_DIR to
CMAKE_CURRENT_BINARY_DIR. This is normally be done by
`find_package(Zephyr)`, but due to the indirection introduced with
fc1884ecf5 to allow applications to
provide their own sysbuild entry point, then the APPLICATION_BINARY_DIR
is unexpectedly set to the bin dir of the entry point.
Restore the old behavior so that APPLICATION_BINARY_DIR per default
again points to top-level sysbuild binary dir.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Implementation erroneously used a mask from the ROUTEPEN register
when writing the ROUTELOC register.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Series 2 uses DBUS for alternate function control, which directly uses
port and pin numbers for location selection. Configure pinout as part
of the I2C_SDA/I2C_SCL case, rather than the separate _LOC case,
as the port and pin are not available at this point.
Configure route register prior to enabling the route, to ensure that
the wrong pin is not temporarily claimed.
Fixes an issue where DBUS was always configured to port A and
pin given by the GECKO_LOC() macro, rather than the correct port/pin
pair.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
`west build` can be invoked without specifying the source directory when
being invoked from the source directory itself.
When using `west build` for incremental builds, then the build command
will examine the CMake cache to determine the application dir by using
the value of CMAKE_HOME_DIRECTORY.
With sysbuild, this leads to the wrong assumption that the sysbuild
itself is the application to build.
Instead, have west build look for APP_DIR which points to the correct
source dir when sysbuild is used. Use APPLICATION_SOURCE_DIR when
APP_DIR is not set, as this indicates a no-sysbuild build.
Keep CMAKE_HOME_DIRECTORY behavior as last fallback mechanism.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit addresses the issue related to the rtc.h API returning ENOSYS
for a driver not implementing alarm_set_callback when the ALARM
functionality is enabled but interrupts, and thus alarm callbacks, are not
supported by the current configuration.
The following drivers have been modified to return correct code:
- rtc_pcf8523
- rtc_pcf8563
- rtc_rv3028
Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
Check for ENOTSUP on alarm callback test if ALARM functionality is
enabled but callbacks are not supported
Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
Printing event name during event processing caused unexpected delays on
slower platforms, making the tests fail. As according to the tests
author those prints were unintentional leftovers, just remove them.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Stop Twister if there are too many backup copies of the output
directory already.
Before this fix, Twister silently kept artifacts from the last run,
unless `--clobber-output` was explicitly given.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Use CAN_CALC_TDCO() macro to set TDCO. There is a minor change how the
tdco is calculated. In the macro the SYNC segement is taken into
account while it wasn't used before.
Fixes#73821.
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
If compiler optimizations are disabled, some compilers (especially
arm_cortex_m) are using unrealistic amounts of stack for dead code.
Currently, if CONFIG_LOG=y and CONFIG_NO_OPTIMIZATIONS=y,
CONFIG_LOG_ALWAYS_RUNTIME is enabled to reduce the stack used by the
logging code.
However, if CONFIG_LOG=n, CONFIG_LOG_ALWAYS_RUNTIME is not available
which causes the compiler to allocate lots of stack space for the (dead)
logging code.
This patch forces runtime message creation when CONFIG_LOG=n. Since all
logging code is dead code when logging is disabled, the behavior should
be unchanged.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
Function declaration does not match definition causing a compilation error
when CONFIG_TRACING_OBJECT_TRACKING is enabled.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
The async-io documentation was in need of some beautification.
Rather than repeating the same thing inside of the table, just
mention that the whole option is expected to fail enosys.
At this time, there does not seem to be sufficient need for
implementing async io, so it is only present so that conforming
applications can still link properly.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The following functions are not implemented:
- getc_unlocked()
- getchar_unlocked()
- putc_unlocked()
- putchar_unlocked()
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Modify the winstream code in cavstool.py to use the Regs helper
class and get rid of byte array access when reading and writing
to winstream headers. This brings the cavstool.py implementation
closer to the Zephyr C reference implementation and ensures
the header fields are read and written to with 32bit access.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Fill-in the mode field of the fd_entry so that the
implementation can be made aware that the specific file
descriptors created are sockets.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Implement absolute minimum necessary to get Buffer DMA working. Require
Data Cache to be disabled if DWC2 OTG has DMA enabled because the stack
does not currently guarantee cache line alignment for allocated buffers.
Set EPENA bit before disabling IN endpoints because it seems to be
necessary in Buffer DMA mode (without EPENA the wait for INEPNAKEFF does
time out). Setting EPENA should have no impact on Completer mode
operation (where EPENA is not necessary for INEPNAKEFF to trigger).
Programming Guide recommends programming SUPCnt to 3, but the only
advantage would be to be able to tell how many back-to-back SETUP packets
were received if there was no more than 3 back-to-back SETUPs. This
information doesn't seem to be useful. The disadvantage is that the
buffer needed for receiving SETUP packet must be able to hold SUPCnt
multiple of 8 bytes. Use SUPCnt 1 so the 8 bytes buffer is enough.
Make sure to clear StsPhseRcvd interrupt bit in Buffer DMA mode because
the DMA seems to prevent the SETUP Phase Done interrupt from triggering
if StsPhseRcvd is set. Clearing this bit doesn't seem to be necessary in
Completer mode. This bit is set on control transfers with data stage
from host to device.
Both Buffer DMA and Completer mode operation on nRF54H20DK was verified
using USB2CV Chapter 9 Tests and MSC Tests with Mass Storage sample.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Do not use sys_clear_bits() followed by sys_set_bits() on DCTL register
to avoid writing to DCTL register twice - first with zeroed out address,
and then with the new address. Change the code to write the address in
one DCTL register write.
Do not use sys_set_bits() to set test mode, but rather prepare the
correct value first.
Set DCFG and GUSBCFG registers in one go. There is no point in reading
back the value or doing multiple subsequent writes to these registers.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
- Allow more statical allocations by reordering the sections
in the mcuboot.ld and in default.ld.
- Reorder the ROM sections to cover the cases described in
the `common-rom-common-kernel-devices.ld`.
Changing the order of .rodata and .text we prevents to create an
overlapped segments issue.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
This driver could end up doing a great deal of work inside the ISR when
large SPI transfers were in use, which could cause significant IRQ
latency. For the normal, non-async SPI transfer case, use events to
signal the calling thread to complete the work rather than performing
FIFO transfers inside the ISR.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Add an optional DT property to specify the size of the RX/TX FIFO
implemented within the SPI core. The property name used is the same one
used by Xilinx's device tree generator.
When the FIFO is known to exist, we can use the RX FIFO occupancy register
to determine how many words can be read from the RX FIFO without checking
the RX FIFO empty flag after every read. Likewise with the TX FIFO, we can
use the FIFO size to avoid checking the FIFO full flag after every write.
This can increase overall throughput.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Add support for a workaround required when using the Xilinx Quad SPI core
with the USE_STARTUP option, which routes the core's SPI clock to the
FPGA's dedicated CCLK pin rather than a normal I/O pin. This is typically
used when interfacing with the same SPI flash device used for FPGA
configuration. In this mode, the SPI core cannot actually take control
of the CCLK pin until a few clock cycles are issued, which would break
the first transfer issued by the core. This workaround applies a dummy
command to the connected device to ensure that the clock signal is in the
correct state for subsequent commands.
See Xilinx answer record at:
https://support.xilinx.com/s/article/52626?language=en_US
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Normally the return code of `CodeChecker analyze` and `CodeChecker parse`
is suppressed, so all the enabled commands can execute instead of
crashing the build.
Add a new option, `CODECHECKER_PARSE_EXIT_STATUS`, to permit failing the
build if `CodeChecker parse` returns non-zero.
Signed-off-by: Noah Pendleton <noah.pendleton@gmail.com>
The deadline of deadline scheduler should lager than zero
because if deadline is negative, it menas the task should
be finished in past.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
intel_adsp_hda_set_buffer() asserts when the HDA buffer is
outside of RAM space. However, it uses CONFIG_SRAM_SIZE as
if it is bytes. In reality, CONFIG_SRAM_SIZE is in KB so
we need to multiply it by 1024, or simply use marco KB().
Fixes#74250
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
There actually is no triple faults on Xtensa. Once PS.EXCM is
set, it keeps going through double exception vector for any
new exceptions. However, our exception code needs to unmask
PS.EXCM to enable register window operations. So after that,
any new exceptions will go through the kernel or user vectors
depending on PS.UM. If there is continuous faults, it may
keep ping-ponging between double and kernel/user exception
vectors that may never get resolved. Since we stash DEPC
during double exception, and the stashed one is only cleared
once the double exception has been processed, we can use
the stashed DEPC value to detect if the next exception could
be considered a triple fault. If such a case exists, simply
jump to an infinite loop, or quit the simulator, or invoke
debugger.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
arch_user_string_nlen() did not exactly work correctly as any
invalid pointers being passed are de-referenced naively, which
results in DTLB misses (MMU) or access errors (MPU). However,
arch_user_string_nlen() should always return to the caller
with appropriate error code set, and should never result in
thread termination. Since we are usually going through syscalls
when arch_user_string_nlen() is called, for MMU, the DTLB miss
goes through double exception. Since the pointer is invalid,
there is a high chance there is not even a L2 page table
associated with that bad address. So the DTLB miss cannot be
handled and it just keeps looping in double exception until
there is another exception type where we get to the C handler.
However, the stack frame is no longer the frame associated
with the call to arch_user_string_nlen(), and the call return
address would be incorrect. Forcing this incorrect address as
the next PC would result in some other exceptions, e.g.
illegal instruction, which would go to the C handler again.
This time it will go to the end of handler and would result
in thread termination. For MPU systems, access errors would
simply result in thread terminal in the C handler. Because of
these reasons, change the arch_user_string_nlen() to check if
the memory region can be accessed under kernel mode first
before feeding it to strnlen().
Also remove the exception fixup arrays as there is nothing
there anymore.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a new function xtensa_mem_kernel_has_access() to
determine if a memory region can be accessed by kernel threads.
This allows checking for valid mapped memory before accessing
them to avoid relying on page faults to detect invalid access.
Also fixed an issue with arch_buffer_validate() on MPU where
it may return okay even if the incoming memory region has no
corresponding entry in the MPU table.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
arch_buffer_validate() is only to verify that user threads have
access to the memory region. It should not be used to verify
if kernel thread has access (which they should anyway). So
change the logic.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Introduce CONFIG_XTENSA_BREAK_ON_UNRECOVERABLE_EXCEPTIONS to
use BREAK instruction for unrecoverable exceptions. This
definitely requires debugger to be attached to the hardware
or simulator to catch that.
Also move the infinite loop to NOT result in an infinite
interrupt storm as the debug interrupt will be triggered over
and over again. Same for the simcall exit as it does not
need to be called repetitively.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
If there are any TLB misses during interrupt handling,
the user, kernel and double exception vector will be triggered
for the miss and the DEPC and EXCCAUSE overwritten as the TLB
missse are be handled in the assembly code and execution
returned to the original vector code. Because of this, both
DEPC and EXCCAUSE being read in the C handler are not the ones
that triggered the original exception (for example, level-1
interrupt). So stash both DEPC and EXCCAUSE such that
the original cause of exception is visible in the C handler.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Xtensa MPU code does not handle double exception in C. So there
is no need to clear DEPC on C handler exit.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
We have frame pointer struct and BSA struct to extract
the exception cause (exccause). There is no need to
resort to custom assembly to do that. Besides, given
that the BSA is different between different Xtensa cores,
there is no guarantee it is at the same place as what
the assembly assumes. So just do that without assembly.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Simple blinky example, but using STOP3 mode. When in STOP3 mode,
GPIOs are not driven, but only pull-up or pull-down can be enabled
based on value in PWR registers.
Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
LPTIM is not available in STOP3 mode, so RTC needs to be used instead.
This code usese similar approach as STM32WBAx for suspend to ram.
The STOP3 is disabled by default in device tree.
Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
Fix timing in suspend-to-ram when using STM32WBA.
Switch to use RTC timer should be done only when idle is set
and LPTIM clocks should be switched off
Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
Added check if ccc_values[i].attr != NULL,
before accessing to ccc_values[i].attr structure:
(handle == ccc_values[i].attr->handle)
On 20829 platform it's causing hard fault, not sure about
another platforms (in GAP testing).
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
- enable hw-flow-control for uart2
- added p3_0_scb2_uart_cts, p3_1_scb2_uart_rts in **-pinctrl.dtsi
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
This style is used in sensor drivers. It's more complicated than the
other way, which is used in different drivers that are not sensor
drivers.
Signed-off-by: Trent Piepho <tpiepho@gmail.com>
The existing code rounded the result to an integer, then multiplied that
integer by 1000000 to get micro-degrees or micro-percent, and then
divided by 1000000 to get whole degrees/percent and took the modulus to
get fractional degrees/percent.
Obviously, multiplying and then dividing an integer by the same value
has no effect!
The result is the humidity and temperature were always rounded down to
the nearest integer.
Fix this to properly keep the fractional component. This is done in a
way that avoids any integer divisions, which are slow on all CPUs, but
especially most microcontrollers, e.g. Cortex-M, lack any integer
division instruction.
Avoiding the base 10 math does not require more code. One just needs to
think in binary and use binary fractions instead of base 10 fractions.
Signed-off-by: Trent Piepho <tpiepho@gmail.com>
The low two bits are not part of the data, but rather "status" bits that
should be masked off.
This is documented in the HTU21D datasheet Edition 8, date 05/2017, pp.
15, and Sensirion SHT21 datasheet version 6, date 10/2022, §6 (wording
exactly the same):
"The two status bits, the last bits of LSB, must be set to ‘0’ before
calculating physical values."
Also Silicon Labs Si7006 example driver code:
/* Swap the bytes and clear the status bits */
return ((data.byte[0] * 256) + data.byte[1]) & ~3;
Since these are the LSBs, it has only a small effect and might not have
been noticed despite being wrong.
While editing this code, switch to using the Zephyr endian conversion
functions intead of a written out conversion.
Add error code to error log message.
Signed-off-by: Trent Piepho <tpiepho@gmail.com>
These three sensor types are all largely compatible. The SHT21 and
HTU21D can be supported by this driver by sending command 0xE3 instead
of 0xE0 to read the temperature.
Mention the sensor names in bindings and Kconfig to help those looking
for support to find it. There have been at least five PRs attempting to
add SHT21 and/or HTU21D support that did not realize the Si7006 is the
same.
As mentioned in PR #22862, the Sensirion SH21 is the original. The dts
bindings are adjusted (in a backward compatible way!) to make the sht21
the base binding and si7006 is derived from that.
Examples of dts compatibles:
TE Connectivity née Measurement Sepcialties HTU21D:
compatible = "meas,htu21d", "sensirion,sht21";
Sensirion SHT21:
compatible = "sensirion,sht21";
Silicon Labs Si7006
compatible = "silabs,si7006";
Silicon Labs Si7021
compatible = "silabs,si7021", "silabs,si7006";
Signed-off-by: Trent Piepho <tpiepho@gmail.com>
After changing the VEVIF and BELLBOARD names,
the dts for the individual boards must be aligned.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
Renaming 'LOCAL' to 'RX' and 'REMOTE' to 'TX'.
This seems more descriptive and intuitive to use.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
Add a mailbox driver for VEVIF events (VPR irq).
The driver can be built in either 'rx' or 'tx' configuration.
The VPR sends the event, so it uses the 'tx' configuration,
while the master core uses the 'rx' configuration of the driver
to receive the VPR events.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
Extend the coverage tool to handle applications that generate multiple
gcov dumps in a single execution. This can happen when the application
calls `sys_reboot`.
Handling multiple dumps enables coverage testing of exception handlers.
Signed-off-by: Jordan Yates <jordan@embeint.com>
If `sys_reboot` is called during testing, the standard dump when `main`
returns will never be executed. Failing to dump at this point means any
coverage information gathered will be lost upon reboot.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Don't attempt to lock the scheduler is trying to dump coverage
information from an ISR. The scheduler won't run while the ISR is in
progress.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The sample is added to demonstrate mspi_transceive asynchronously.
Apollo3 MSPI controller has hardware command queue and supports
scatter IO and callback management, so no additional software queue
is required.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The sample code is copied from spi_flash. To flash API, there is no
difference if the bus is spi or mspi.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The ATXP032 is a NOR flash device that supports up to ~100MHz
octal SDR/DDR with 4MB nonvolatile memory.
The device driver uses MSPI bus API and could be used across different
SoC controllers that implement the MSPI bus API.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The APS6404L psram is a quad SDR SPI device that runs up to 100MHz.
It can provide 8MB of external RAM for SoCs that supports XIP feature.
The device driver uses MSPI bus API and could be used across
different controllers that implement the MSPI bus API.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The Ambiq MSPI controller is implemented using the MSPI bus API.
The hardware supports up to 48MHz octal SDR with XIP, scrambling and
hardware command queue features.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The mspi flash test is intended to test mspi flash device driver
implementation on MSPI bus. The test requires the device to have at
least two sectors of memory with MSPI_FLASH_SECTOR_SIZE as size.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
Add a MSPI controller API test and run on native_sim board.
The API implementation within mspi_emul.c is the test target.
The stub device emulator is added for convenience to test controllers.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
Add bus emulator support for MSPI and the MSPI controller emulator.
The mspi_emul.c not only serves as an emulator but also provides an
example implementation of the MSPI API. It does not actually do anything
other than validating parameters and forwarding transceive request back
to the device driver emulators.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The MSPI(multi-bit SPI) is provided as a generic API to accommodate
advanced SPI peripherals and devices that typically require command,
address and data phases, and multiple signal lines during these phases.
While the API supports advanced features such as XIP eXecute In Place
and scrambling, it is also compatible with generic SPI.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
Added MAX32670EVKit board
For more information about this board please check
https://www.analog.com/
Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Fix BT_CTLR_ISOAL_PSN_IGNORE implementation when adjusting
Sequence Number during overlap with current CIG event.
Reuse the implementation from non-PSN ignore implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Troels Nilsson <trnn@demant.com>
Add RV PMP to the SoC configuration and to simulator options
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
__INT16_C, __UINT16_C, __INT8_C and __UINT8_C are not defined in
zephyr_stdint.h and have to be defined in llvm.h when
CONFIG_MINIMAL_LIBC is enabled.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
When CONFIG_MINIMAL_LIBC is enabled, __INTMAX_C and __UINTMAX_C
depend on int_c. Move the build guard to ensure that it is defined
when CONFIG_MINIMAL_LIBC is enabled.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Since `writer.py` is the one writting the SPDX file, it should normalize
the name field and not `walker.py` which generates the SBOM components.
Signed-off-by: Thomas Gagneret <thomas.gagneret@hexploy.com>
Improve the SPDX with the current values:
- URL: extracted from `git remote`. If more than one remote, URL is not
set.
- Version: extracted from `git rev-parse` (commit id).
- PURL and CPE for Zephyr: generated from URL and version.
For zephyr, the tag is extracted, if present, and replace the commit id for
the version field.
Since official modules does not have tags, tags are not yet extracted for
modules.
To track vulnerabilities from modules dependencies, a new SBOM,
`modules-deps.spdx` was created. It contains the `external-references`
provided by the modules. It allows to easily track vulnerabilities from
these external dependencies.
Signed-off-by: Thomas Gagneret <thomas.gagneret@hexploy.com>
Experimentally, -Oz seems to give size results closer to GCC's -Os
(though GCC does now support -Oz as well). Set -Oz as the default for
LLVM to give the better codesize.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
Both Clang [1] and (recently) GCC [2] support this flag to enable
additional codesize optimizations beyond -Os, possibly at the expense of
performance.
This tradeoff is worthwhile for some (and, Clang's -Oz seems to be
closer to GCC's -Os currently), so add a new abstraction for this flag
so users can select it as appropriate.
[1] https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-O0
[2] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-Oz
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
Add the ability to touch memory in the opposite direction from one loop
to the next so to exercize the LRU eviction algorithm.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This is a O(1) LRU eviction algorithm. A bit more complex but way more
scalable than the NRU algorithm.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Let eviction algorithms be notified when a given page frame:
- should be considered as possible candidate
- should no longer be considered as candidate
- has just been marked as "accessed"
The NRU algorithm is unchanged so it implements those as empty stubs.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Kconfig, .ld and comments fixing
Fixed address of UART1, WDT and RTC timer disabled by default
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Fix to properly allocate IRQs for interrupt sources over 60.
It also screens out non-allocatable IRQs used by the CPU.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Changes to bring support for esp32c6 SoC.
- clock control
- gpio
- pinctrl
- serial
- timer
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
In 0be0d2175b (cmake: modules: extensions: Revert using common
board files), the overlay for `native_sim/native/64` in the settings
functional file test was not recreated. Duplicate the overlay used for
the `native_sim` target to support this test correctly.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Removed `sdmmc_sdhc.`h header file from `drivers/disk` and updated
`CODEOWNERS` to reflect this.
At the point of pull-request, there are no references to this file
in the `codebase`, indicating it is no longer needed.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Add SENSOR_ATTR_ALERT and SENSOR_ATTR_HYSTERESIS attributes support.
The code is heavily inspired by the one for lm77 sensor.
Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
Assembly implementation for z_early_memset() and z_early_memcpy().
Otherwise the compiler will happily replace our C code with a direct
call to memset/memcpy which kind of defeats the purpose.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
We need those simple alternatives to be used during early boot when the
MMU is not yet enabled. However they don't have to be the slowest they
can be. Those functions are mainly used to clear .bss sections and copy
.data to final destination when doing XIP, etc. Therefore it is very
likely for provided pointers to be 64-bit aligned. Let's optimize for
that case.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Clean up register addresses for devices defined as children of the dummy
SPI bus, so that they start from zero. This ensures all SPI chip select
gpio indices will be used
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Convert galaxycore GC9X01 to MIPI DBI API. In tree boards and tests
using this display have also had their devicetrees updated to use the
new MIPI DBI SPI emulated device.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add add_by_broadcast_name command that scan for broadcast sources
has BT_DATA_BROADCAST_NAME that matches with whatever name is given
to the shell command.
Fixes#70836
Signed-off-by: Babak Arisian <bbaa@demant.com>
The Xilinx AXI Ethernet subsystem is capable of RX/Tx checksum
offloading. While it supports computing IP and UDP/TCP checksums, it
does not support computing ICMP checksums and only computes IP checksums
for ICMP messages. Thus, this patch adds an additional configuration for
ethernet drivers that indicates for which protocols checksum offloading
is (to be) supported. This flag is then considered by the IP subsystem
in determining when flags need to be computed in software.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
When both MCUBoot and application run, systimer is initialized twice.
As a consequence, application freezes as systimer new initialization
conflicts with previous.
This PR adds the systimer clock disable function, that shall be called
before mcuboot jump to application, making sure it will
work as expected.
Fixes#74189
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit refactors the SSP driver to support the Intel ACE30 PTL
platform. The changes include:
- Adding new structures ssp_rx_dir and ssp_tx_dir to hold the TDM
slot configuration for RX and TX directions
- Adjusting the dai_ssp_set_config_blob functions to work with
the new TDM slot configuration.
Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
The usb_serial node is referenced twice in the procpu dts file. The first
time the status is set to "okay", while the second it is set to "disabled".
Only the second status is honored, so the first is removed to eliminate
confusion.
Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
As part of ongoing work to move away from TinyCrypt and towards PSA
(#43712), introduce a PSA option and remove the TinyCrypt one for the
SHA-256 implementation.
The Mbed TLS implementation is modified to use `mbedtls_sha256`
directly for smaller code size.
As of now the implementation defaults to PSA only if TF-M is enabled
because a dependency loop happens if using `PSA_CRYPTO_CLIENT` as a
condition in `FLASH_AREA_CHECK_INTEGRITY_BACKEND`.
A test case is added for the PSA implementation, and an NS platform is
added to the base test case to verify the compilation on a TF-M-enabled
platform.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
As part of ongoing work to move away from TinyCrypt and towards PSA
(#43712), introduce a PSA option and remove the TinyCrypt one for the
SHA-256 implementation.
The Mbed TLS implementation is modified to use `mbedtls_sha256`
directly for smaller code size.
The reliance of mgmt/updatehub on storage/flash_map's configuration
(`FLASH_AREA_CHECK_INTEGRITY_BACKEND`) is removed.
The choice of which implementation to use is made automatically,
based on whether a PSA API provider is present (`PSA_CRYPTO_CLIENT`).
This commit also add a test case with PSA (based on Mbed TLS)
in samples/subsys/mgmt/updatehub/sample.yaml.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add a fixture to run the sample only when the DHT sensor
HX330x is present (shield) on the nucleo_f40re board
'fixture_i2c_hs300x'
The stm32f401 Nucleo board itself has no sensor mounted
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Mark _POSIX_MEMORY_PROTECTION as supported (i.e. a
conformant application will link). Zephyr's mm API does not
currently support modifying memory protection bits after
pages have been mapped, so use of this function may result
in undefined behaviour.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Provide a stub for mprotect() to satisfy the requirement for the
base definitions / system interfaces and subsequently PSE51,
PSE52, PSE52, etc.
Currently, Zephyr's virtual memory-management API does not seem
to support modifying memory protection bits after pages have
already been mapped.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Make POSIX_PAGE_SIZE_BITS not user-configurable and tie it to
CONFIG_MMU_PAGE_SIZE if there is an MMU. Otherwise, simply
default it to something small.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Implement shm_open() and shm_unlink() to complete support for
the _POSIX_SHARED_MEMORY_OBJECTS Option.
Since mmap() support is not yet implemented in Zephyr, I/O is
limited to read(), write(), ftruncate(), lseek(), close(), for now.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
File offset actually varies on a per-file-descriptor basis,
and not with the resource that is abstracted behind the file
descriptor.
This is consistent with both the POSIX model and also the
ISO C/C++ model, so Zephyr should follow suit.
This is very work-around-y, but it's necessary to ensure
that shared memory objects, block devices, files and
directories all behave consistently.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add a mode field for struct fd_entry, as well as a new
initializer, z_finalize_typed_fd().
The constants ZVFS_MODE_* may be used to differentiate
between fifo, character device, message queues, directories,
semaphores, block devices, shared memory objects, regular files,
symbolic links, and sockets.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Mark mlockall() and munlockall() as supported, as well as the
_POSIX_MEMLOCK Option.
These functions are currently expected to fail, but are
required so that conformant applications can still link
successfully.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add support for mlockall() and munlockall(). These two functions
comprise the _POSIX_MEMLOCK Option which is required by PSE51,
PSE52, PSE53, and PSE54.
Zephyr's on-demand paging API does not yet support pinning and
unpinning *all* virtual memory regions, so these functions are
expected to fail, setting errno to ENOSYS. Any other usage is
currently categorized as undefined behaviour.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Mark mlock() and munlock() as supported, as well as the
_POSIX_MEMLOCK_RANGE Option.
These functions are currently expected to fail, but are
required so that conformant applications can still link
successfully.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add support for mlock() and munlock(). These two functions
comprise the _POSIX_MEMLOCK_RANGE Option which is
required by PSE51, PSE52, PSE53, and PSE54.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add stubs for mmap(), msync(), and munmap() as required by the
_POSIX_MAPPED_FILES Option and POSIX_MAPPED_FILES and
Option Group of IEEE 1003.1-2017.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The ioctl() call should be a part of the _XOPEN_STREAMS
Option in posix, so move it there.
Create a zephyr-native zvfs_ioctl() in the layer below.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Move the zvfs_ftruncate() call from fs.c to fdtable.c, as file
types other than regular files can also be truncated.
Instead of hard-wiring zvfs_ftruncate() to fs_truncate(),
add a new ZVFS_IOCTL_TRUNCATE so that the operation can be
handled with other ioctl() operations.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The fstat() function is implemented as part of the
POSIX_FILE_SYSTEM Option Group, but it is implemented through
zvfs, as an ioctl, which allows other file descriptor types to
support queries of file descriptor status.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Route the fstat() call (part of POSIX_FILE_SYSTEM) to
zvfs_fstat() so that other types of file descriptors can also
supply file status information.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
An invalid feature test macro was found in in sysconf.h .
It should be corrected from _POSIX_XOPEN_STREAMS to
_XOPEN_STREAMS.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
With many tests having 10s or scenarios and variants, anytime we make a
change to a test right now, we end up building all scenarios on all
platforms which ends up in multiple 10s of the thousands of instances
that need to run on 30 or 40 runners blocking CI for hours. We do not
really need that, a test needs to be smart about its coverage and not
rely on boiling the ocean to catch, mostly build errors that are
platform specific.
Change this to do the normal coverage we get on push events.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add the list of supported features to the google_dragonclaw board
definition.
It allows running more tests.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Run the sample on the IWDG of stm32f4 nucleo boards
instead of WWDG because the APB1 prescaler cannot set
the WWDG input clock source to match the wd timeout.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add a driver for the National/TI LM95234 Quad Remote Diode and Local
Temperature Sensor with SMBus Interface and TruTherm Technology.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Add note for UC81xx displays, which have been migrated to the MIPI DBI
API. This note describes how to define the MIPI DBI wrapper device
needed for the UC81xx display
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Convert UC81XX display to use MIPI DBI API, as this display uses a SPI
3/4 wire bus. In tree shields using this driver have also had their
devicetrees updated to use the new MIPI DBI SPI driver
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Extern declaration of __stack_chk_guard added volatile to
the type while the declaration was non-volatile. This cause
type check errors with compilers that declares the
__stack_chk_guard variable in an internal pre-include
header file (IAR).
While I think the volatile keyword is unnecessary, I decided
on keep it and add it to the declaration in
kernel/compiler_stack_protect.c
Tested with IAR ICCARM and the Zephyr SDK GCC.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
This patch file updates the use of assertion macros
comparing strings.
Command line used:
```
./scripts/coccicheck --mode=patch \
--cocci=scripts/coccinelle/ztest_strcmp.cocci tests/
```
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
ztest now provides functionality to compare strings.
These are simpler to use than the strcmp ways.
The semantic patch transforms many of the commonly used patterns.
It does not handle variable length macros.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
We want to able to use cocinelle on ztest functions as
well when transforming APIs.
Provide a simple macro so that test functions are recognized.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
These tests are simple copies of the existing tests with the addition of
the CONFIG_MODULES=y option. This different Kconfig setting has no
practical effect on the code, and the tests are therefore redundant.
Remove them to halve the number of tests.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This adds a new sample to demonstrate the use of tristate symbols
in Kconfig to build a function as an llext module or as a built-in
part of Zephyr.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The LL_EXTENSION_SYMBOL macro is used to export a symbol to the base
image. When CONFIG_LLEXT is not defined, or the file is being compiled
outside of an llext, the macro is not useful and would leave orphan
sections in the final image instead.
This patch adds the LL_EXTENSION_BUILD definition to the llext build
process, and uses it to stub out the symbol-defining macro when not
building an llext.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Implement suspend and resume, just stop and restart the timer that kicks
the main thread update cycles.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Adding MMIO mapping support in ENET module driver before MDIO, MAC
and PTP drivers initialization, so that they can reuse this mapping.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Enable MMU direct mapping, so that driver can use it for MMIO mapping
as currently hal driver needs direct mapping (physical address and
virtual address 1:1 mapping).
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Improve the sample application by displaying the captured frames instead
of just discarding them.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
In order to be generic, use a chosen node for camera so that the sample
is not specific to NXP SoCs. Also, always favorite a real video device
unless it is unavailable.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
There are some compatibilty situations where carriage return does not
work (e.g. on Serial Monitor in VSCode). Moreover, keeping the
timestamps logs on the console would help to have an idea about the
frame rate. So, it's better to use line feed instead of carriage return
in this case.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The mt9m114 camera shield is now added. There are also some changes in
the mt9m114 camera driver, e.g. frame rate, default format, capabilities.
Update the sample document and test to reflect these changes.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
In some function in bitarray.c, we should check the pointer
of bitarry before taking bitarray lock.
In this patch, we move the null-check assert before the use of
the struct to provide better validation than a crash.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
This API converts a HCI error code to a string.
This can be useful if application developers want to print them
in the applications.
Later we can also use them in the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add initial documentation how to configure and enable new USB device
support. Use literalinclude to pull code snippets from the samples.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Fixes#72673
Follow-up to #70977 and #71590
The CMake linker generator doesn't have an API equivalent to `PROVIDE`,
but the existing `zephyr_linker_symbol()` function should do just fine.
It still lets us set `z_arm_platform_init = SystemInit` and thus keep
the reduced ROM space.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Currently, the NRU algorithm always picks the lowest (and very often the
same) clean unaccessed page over and over when e.g. doing large anonymous
memory mappings. Spread the eviction selection more uniformly by by
starting the search right after the last victim instead of always
restarting from 0.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Restart legacy advertising on ACL disconnect similar to when
using extended advertising in this sample.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The integer return of sensor_submit should be void as the call is
asynchronous and the response is meant to be delivered using RTIO APIs
signaling that the submission completed with error or success.
Change the function signature to void and fix all uses of the submit
API, fixing some bugs in the process.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
These headers have been deprecated for > 2 full releases,
let's remove them to keep them out of v3.7.0 LTS.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add support to select the nCS line for XSPI from the device tree.
Disable the nCS override.
This setting only works with series that have an XSPIM (so not H5)
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Pass Twister pytest plugin's log output, as well as output from
a test image running with pytest, up to Twister log irregardless
of the current verbosity level set at Twister.
This allows to collect full test output and also ensures that
recording data embedded in the test log is passed to the Twister
pytest harness for export.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Fix incomplete test log capture when the external tool is used
and Twister Pytest Harness script ends without reading output
from the last test case running on the device.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Additional logging of kernel.timer.timer_behavior_external test case
statistics for timer drift, variance, etc. as JSON-formatted records
to make easier data collection and its further analysis.
These log records will be processed by the Twister Harness recording
feature which captures and parses timer statistics from the log output,
then composes it into twister.json and recording.csv files.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Additional logging of kernel.timer.timer test case statistics for
timer drift, variance, etc. as JSON-formatted records to make easier
data collection and its further analysis.
These log records will be processed by the Twister Harness recording
feature which captures and parses timer statistics from the log output,
then composes it into twister.json and recording.csv files.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Extend Twister Harness recording feature to allow selected data fields,
extracted from the log by a regular expression, to be parsed into JSON
objects and eventually reported in `twister.json` as `recording` list
property of the test suite.
With this extension, log records can convey layered data structures
passed from a test image as summary results, traces, statistics, etc.
This extension also allows flexible recording structure: a test image
can output different types of data records incapsulated into a fixed
set of fields, so `recording.csv` file columns are respected, whereas
some of the columns keep strings with json-encoded semi-structured data.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Add a couple PSA overlay configs for the BT tests in order to evaluate
PSA API support introduced by CONFIG_BT_USE_PSA_API. These test are
performed on nrf52840dk platform.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit adds CONFIG_BT_USE_PSA_API to allow the end
user to prefer PSA APIs over TinyCrypt for crypto operations
in bluetooth. Of course, this is possible only if
a PSA provider is available on the system, i.e.
CONFIG_PSA_CRYPTO_CLIENT is set.
This commit also extends
tests/bluetooth/mesh/basic/bluetooth.mesh.gatt adding a specific
case using PSA.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Some bluetooth test were using BT_TINYCRYPT_ECC without also
setting BT_ECC. This means that BT_TINYCRYPT_ECC gets disabled
as it depends on BT_ECC.
This commit fix this by removing BT_TINYCRYPT_ECC in all test
for bluetooth mesh.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
By enabling CONFIG_BT_USE_PSA_API the user can specify to use
PSA APIs instead of TinyCrypt for crypto operations in bluetooth
host module.
This commit also extends tests/bluetooth/gatt in order to
add a PSA test.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit adds CONFIG_BT_USE_PSA_API to allow the end
user to prefer PSA APIs over TinyCrypt for crypto operations
in bluetooth. Of course, this is possible only if
a PSA provider is available on the system, i.e.
CONFIG_PSA_CRYPTO_CLIENT is set.
This commit also extends tests/bluetooth/bt_crypto adding
a test case for PSA.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
TF-M is a PSA API provider alternative to Mbed TLS one. As
a consequence when CONFIG_BUILD_WITH_TFM is set
CONFIG_PSA_CRYPTO_CLIENT should be set as well.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
As we start to use data memory barriers in SMP scheduler code
explicitly (not only internaly in the atomics implementation)
let's enable barriers for ARC HS.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Simple cosmetic change to convert all the source commands
to rsource so that includes are relative to driver/serial.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Fix offset read for verification and comparison of read to
erased value, where type mismatch has been causing fails in
comparisons.
Fixes#74066
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
At osc32k_init in the soc_samd5x.c file the start-up value of 7 which
is reserved. This fixes the startup timeout and control gain with the
correct values.
Signed-off-by: Marcel Birthelmer <marcel@carrietech.com>
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The RGMII specifies output TXC/RXC and TXD/RXD without any clock skew.
Need to add skew on clock line to make sure the other side sample
right data. This can also be done in PCB traces.
This patch is to enable RGMII TX/RX delay to ensure timing.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Allow DTLS handshake to be retried before the engine
drops into bootstrap. Otherwise any termporary failure,
for example DNS failure might drop us into bootstrap
without retrying.
Now all the retry logic should be in sm_do_network_error().
sm_do_registration() should only fall back to bootstrap
if there is configuration error.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Nordic devices are commonly used with the nRF Connect SDK.
There the SoftDevice Controller is set as the default
Bluetooth Controller. To avoid confusion when reading DTS
and Kconfig files, clarify this by adding a note.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add a babblesim test for the broadcast reception start procedure
from the CAP commander
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
If there is no tests in the test list, do not attempt to run
parallel.
This avoids parallel trying to attempt to read the input from
the terminal in that case.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Do not fail during results merge if
twister or the bsim workflows did not run
(or produce an xml).
Depending on what has changed in a PR
and therefore what tests are run this can happen.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Check if an address is in the thread stack only when
`CONFIG_THREAD_STACK_INFO` is enabled, since otherwise the
`stack_info` will not be available.
This fixes compilation error when `CONFIG_THREAD_STACK_INFO`
is explicitly disabled.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This patch adds documentation for the SWDP API.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Hardcode the lookup table for SWDP requests.
This is an optimization to save some space.
Documentation was added to understand the values.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Add CMSIS DAP sample using USB as interface.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
DAP SWD sequence command is a requirement to support CMSIS-DAPv2.
Raise supported version to "2.1.0".
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add ID_DAP_UART_* command definitions and react properly to
unsupported UART commands.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add API to read count bits from SWDIO into data LSB first.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move low-level GPIO functions to a separate file and use GPIO driver
API if low-level GPIO support is not available for the platform.
Allows alternative pin configuration using only two pins, clk and dio.
Improve binding description.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
If a host client crashes or fails to disconnect, the probe will
hang. Allow a new connection without raising errors.
Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add CMSIS-DAP compatible controller which is a handler between
the host interface and SWD driver. The controller follows CMSIS-DAP
reference implementation. It expects a request buffer from the host
interface, splits it to simple transfers and forwards to the DP driver,
and finally returns a response buffer to the host.
Interface to the host can be implemented with USB HID device support.
Controller implements only SW-DP support and is tested
with pyOCD and ADIv5.x.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add Serial Wire Debug Port interface driver API and bit-bang driver.
The driver requires a simple Hardware Interface Circuits (HICs),
where signals CLK, DOUT, DIN, ENn, OE_ENn, RESETn
are connected to board GPIOs and buffered signals SWD_CLK and SWD_DIO
to the target.
Signal OE_ENn controls the direction of the Serial Wire (SWD_DIO),
ENn the buffers SWD_CLK possibly others and enables/disables HIC.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
add the stm32h7s78_dk disco kit to run the tests drivers
This testcase is executed (XiP) from the external NOR
of the stm32h7s78_dk board.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the IWDG and WWDG watchdog peripherals
the ADC1 & 2 peripherals with sensor for die temperature and voltage
the RNG entropy generator
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the support of the stm32h7rs serie to the flash stm32h7 driver
Remap Flash registers to the stm32h7rs serie.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Introduce the stm32h7RS serie to the ADC driver,
based on the stm32h7: two ADC 12 resolution
For stm32h7rs ADC calibration, the
LL_ADC_SetCalibrationFactor is not used.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The section headers are now available in the loader structure, so we can
use those directly instead of reading them from the ELF file every time.
This commit contains no logic changes; it removes all copies of the
header loading code and replaces them with direct access to the cached
section headers.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This change reads all section headers at once, instead of reading them
one by one. This is more efficient and allows to further simplify the
code downstream.
The section headers are directly accessed from the file buffer if the
llext_peek() function is supported by the loader. Otherwise, they are
read into a buffer allocated on the heap and used only during the
llext_load() function.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The do_llext_load function is responsible for loading an extension from a
file, and for this purpose it calls a number of functions that a) allocate
memory, and b) can fail. This creates the opportunity for memory leaks if
the error paths are not handled correctly.
This commit adds a comment at the beginning of the function to document
the memory management policy that has to be followed in this file:
cleanup is not performed in the error paths, and all memory is freed at
the end of the do_llext_load() function, both in the case of error and of
successful loading.
As an improvement, the symbol table is not freed if the LLEXT log level
is set to debug, so that it can be used, for example, to inspect the
symbols of the loaded extension.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The recent llext_map_sections() rework changed the way debug messages
are output so that the names of most skipped sections are not printed
at all. This makes debugging harder since the section names are useful
to identify the contents at a glance.
Also print a few additional fields from the section header, and use 0x
prefixes for hex numbers.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Added support for the Rak11720 board. Rak11720 is a WisBlock Core module
with Apollo3 Blue SoC from Ambiq and a Semtech SX1262 LoRa® transceiver.
For more information about this board please check:
https://docs.rakwireless.com/Product-Categories/WisDuo/RAK11720-Module/Overview/#product-description
There are known issues that have been identified while communicating
with SX1262 transceiver:
- Gpio interrupt handling error: ambiq_gpio_pin_interrupt_configure
function is not able to configure SX1262 Dio1 interrupt pin correctly.
Please check issue 73958.
- Spi communication error: Rak11720 uses a custom CS pin.
Firstly, custom CS pin support is necessary. Secondly, spi_ambiq_xfer
function is not able to communicate with SX1262 transceiver.
Please check issue 73959.
These issues have been documented for future solutions. Despite these
limitations, the current support enables basic functionality.
Examples can be build by below command for Rak11720:
west build -b rak11720 samples/hello_world
Signed-off-by: Sercan Erat <sercanerat@gmail.com>
Fix issue where when building with TFM and PSA client
there is an error from want RSA key type not being
defined in mbedTLS library.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
LPC GPIO binding was wrong in that the reg address
on the simple soc bus was given as an index of the gpio ports
within a gpio controller. Fix this by putting the GPIO node
on the simple bus as a single node with the correct base address,
and make the ports children of this node.
Change the driver to get the port number from the reg address
instead of a custom property, and get base address from DT instead
of the SDK macro definition.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add versioning to the new HCI API so that it shows up officially as
unstable, and add a reference to the new API from the old API.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Mention the removal of the BT_NO_DRIVER option, and explain how drivers are
now expected to be enabled or disabled. Also group all bullet points
related to the HCI API changes as a dedicated sub list.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The stm32 flash driver returns success even though
writing failed when instruction cache was enabled.
Fix by not overriding error code when re-enabling
instruction cache.
Signed-off-by: Riku Karjalainen <riku.karjalainen@vaisala.com>
The reason is that this driver needs to call the function
'irq_connect_dynamic()' which is implemented with DYNAMIC_INTERRUPTS.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
Avoid warning and properly list memory management APIs in Doxygen
documentation by actually declaring the mem_mgmt doxygen group
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
On each reboot, this option causes the serial output to start top-left
on the users terminal, simplifying (human) parsing.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
This commit updates the missing retval from the underlying call of
`submit_to_queue_locked()` when the work was running and has been queued
to the queue that was running it.
Signed-off-by: Paulo Santos <pauloroberto.santos@edge.ufal.br>
Follow-up: #59076
The PR#59076 updated the board.cmake to use cmsis-dap instead of
picoprobe but without updating the documentation.
This commit updates the board documentation to match the code changes.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
TI Dual-Mode timer is used as the arch timer for systick on J721E R5
cores. Add DM Timer for systick timer support.
Signed-off-by: Prashanth S <slpp95prashanth@yahoo.com>
Signed-off-by: Andrew Davis <afd@ti.com>
The phyBOARD-Lyra AM62x is equipped with an XDS110 JTAG debugger. Add
missing OpenOCD configuration and some documentation to support
'west debug'.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
The SK AM62 EVM is equipped with an XDS110 JTAG debugger. Add
missing OpenOCD configuration and some documentation to support
'west debug'.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
By default, a post build step tries to fill gaps in the output
hex file. Since the AM62x, for example, has different,
non-contiguous memory sections, it tries to fill a gap over
multiple GBs. Disable this feature since the K3 architecture has no
dedicated flash for the firmware and stores it in a Linux rootfs.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
The gdb-port defines the GDB port and the openocd runner passes
this value to openocd as well as gdb. However, the TI AM62x board
provides multiple ports for each subsystem. For example, systick
appears at 3333, A53 as 3334-3337, R5F as 3338 and M4F as 3339.
If we want to connect to the M4F, we need to add another port which
is different to the to the gdb-port value.
This patch adds an additional argument --gdb-client-port to define
the port which GDB should connect to. It defaults to 3333, identical
to gdb-port.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
32-bit multiplication overflows for the 130000 ppm value used currently
on Nordic SoCs and the duration that is configured to 100000 us.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
On Nordic SoCs, the clock that drives the system timer and the one that
is used in busy-waiting may be significantly skewed, so the test cases
that compare durations derived from those two clocks need to take into
account a proper threshold. After the `z_timeout_expires` function was
corrected in 3d29c9fe54, it turned out
that the threshold was missing in one check and the related test case
started to fail on nRF platforms. This patch adds that threshold there.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
- If status == PROP_ERROR_RXBUF, that means rx buffer head is not empty.
In case of this, RF_EventRxEntryDone is never triggered and thus we
enter an infinite loop of nothing happening. Due to this, TCP socket
times out.
- To fix this, we need to free rx buffer current head. However, it seems
better to free all the elements that are already finished instead of
just head.
- Before 128354ae17, the buffer was reset
every time drv_rx_start was called. However, that also seems wrong for
a ring buffer. So I am freeing the finished buffers instead.
- Tested on Beagleconnect Freedom.
- Fixes https://github.com/zephyrproject-rtos/zephyr/issues/71191
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Add MAX32672EVKIT board files
For more information about this board please check
https://www.analog.com/
Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Added MAX32672FTHR board
For more information about this board please check
https://www.analog.com/
Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
This commit should deal with adding support
for asynchronous operations. It also adds
support for DMA acceleration via a Kconfig
variable (enaled by default as DMA should
be considered scales faster than the
interrupt-driven approach).
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
When brackets are used in macros, there may sometimes be a space in
front of them. The checkpatch script should allow this.
The change includes the example that triggered the need for this
change.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Do not give the path to the zephyr.hex when flashing with the
STM32CubeProgrammer in MemoryMapped mode.
West flash can retrieve the path and file correctly. Twister cannot
find the build directory, the hex file is found correctly, though.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Many boards/SoCs in-tree do this:
if !XIP
config FLASH_SIZE
default 0
config FLASH_BASE_ADDRESS
default 0
endif
And many other boards are missing this configuration (e.g. stm32 series).
Making this the default helps get non-XIP just working
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
First, do align the buffer. The slab code puts pointers in there and it
does not like it if those are not properly aligned.
And return the actual error code from k_mem_slab_alloc() even if errors
shouldn't happen (it did happen to me because of the above ... with
assertions disabled).
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Commit f7e11649fd ("arch/arm64/mmu: fix page table reference
counting") missed a case where the freeing of a table wasn't propagated
properly to all domains. To fix this, the page freeing logic was removed
from set_mapping() and a del_mapping() was created instead, to be usedby
both by remove_map() and globalize_table().
A test covering this case should definitely be created but that'll come
later. Proper operation was verified through manual debug log
inspection for now.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add note for SSD16XXX displays, which have been migrated to the MIPI DBI
API. This note describes how to define the MIPI DBI wrapper device
needed for the SSD16XXX display
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Convert SSD16XX display driver to use MIPI DBI API. This commit also
updates in tree board devicetrees to include the emulated MIPI DBI SPI
driver.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
In case of no SW ISR table, `_isr_wrapper` does not exist.
Do not use it for exception handling.
Future improvements might include setting it to a user-defined handler.
Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
`isr.S` depends on `CONFIG_GEN_SW_ISR_TABLE`.
Do not build it if SW ISR table is not present.
Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
Implement unit tests for the broadcast reception start procedure,
both with proper and with improper parameters.
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
NXP LCD-PAR-S035 LCD module will be used by FRDM-X evaluation
kits with a parallel LCD connector.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1. Add a property for panels where the RGB is displayed as BGR.
2. Add a check for 8080 8-bit mode and invert RGB and BGR for
this case.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
We have some other simpler CDC ACM and HID samples in the tree.
Providing multiple functions is a core functionality of USB device
support, and we have other samples to demonstrate this as well. This
sample does not really provide anything unique, but has a few issues
such as unsafe HID buffer handling and calling uart_fifo_fill() outside
of the UART driver's IRQ context.
Remove the hid-cdc sample, as there is no value in this sample, and to
avoid spending time fixing and cleaning up the code.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This covers the cases described in common-rom-common-kernel-devices.ld
Changing the order of .rodata and .text we prevents to create an
overlapped segments issue.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Change the MCUboot segments layout to incread the memory
available in the application.
Add missing symbols to mcuboot.ld
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Now that the unwind starts from mepc already, the symbol
name at the mepc reg is kinda redundant, so just remove it.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Created the `arch_stack_walk()` function out from the original
`z_riscv_unwind_stack()`, it's been updated to support
unwinding any thread.
Updated the stack_unwind test case accordingly.
Increased the delay in `test_fatal_on_smp`, to wait
for the the fatal thread to be terminated, as stacktrace can
take a bit more time.
Doubled the kernel/smp testcase timeout from 60 (default) to
120s, as some of the tests can take a little bit more than 60s
to finish.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
An architecture can indicate that it has an implementation for
the `arch_stack_walk()` function by selecting
`ARCH_HAS_STACKWALK`.
Set the default value of `EXCEPTION_STACK_TRACE_MAX_FRAMES` to
`ARCH_STACKWALK_MAX_FRAMES` if the latter is available.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Nrf54h's and nrf54l's targets are the first targets complex enough
that a sysbuild must be used on every build for them. This information
is reflected in their yamls. These entries tell twister to always use
sysbuild for those targets.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
More complex platforms require sysbuild to use always, even for
such "simple" samples like hello_world. Such platforms can have
`sysbuild: true` entry in their board_name.yaml used by twister.
Using such entry will tell twister, that sysbuild must always be used
on a given platform.
Twister is aligned to have information about need of sysbuild at
instance (platform + suite) level (was only at suite level before).
Instance.sysbuild is true whenever a test suite or a platform requires
sysbuild.
Twister pytest unit tests are aligned with changes.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
A collection of simple enablements to match some of the enablement
done for rd_rw612_bga as closely as possible on the frdm_rw612 board.
- i2c
- spi
- dma
- mrt
- ctimer
- os timer
- dac
- adc
- trng (alread was enabled but now listed support)
- watchdog
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The design of the pipe is overly complicated compared to the
in-tree and planned future use of the pipe module.
The pipe is currently designed to protect against multiple
threads calling any API simultaineously. This is not neccesary
as only one thread ever calls open/close/transmit/receive at
once, while the notification APIs are potentially called by a
different thread.
This commit removes the synchronization of calls to the open/
close/receive/transmit APIs. It also uses a k_event for thread
safe event and state handling instead of a k_mutex and k_condvar.
The callback is proteced by a k_sem as it modified using the
attach/release APIs, which can be called simultaneously to a
thread invoking the callback.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
With the ztest code added, tests were failing with -ENOMEM on the
mps2/an385/*_mpu platform due to alignment requirements.
Increase the llext test heap size to 32Kbytes to avoid this.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Some tests depend on global initialized variables, which are then
modified during the test. When enabling user mode, the functions are
called multiple times but the variables are not reinitialized, resulting
in a test failure.
This patch adds a run_id variable to the tests to reinitialize the
variables when the test is called multiple times. It is purposefully
initialized to 41 at startup to detect if the variable is not set up
properly by the llext loader.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Most of the current llext tests did not actually check the results of
the tests, so the CI reported a pass even if something was wrong when
looking at the logs. This patch adds the appropriate zassert_* macros to
all the tests, to ensure that they actually perform correctly.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Update the hal_espressif to include latest esptool version.
Improve support for new SoCs as such as ESP32-C6.
Fix bugs related to segment alignment.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Kconfig options need CONFIG_ prefix when tested for in CMakeLists.txt.
Fixes regression introduced in e90c89d453
that causes all apps to fail to initialize on Silabs socs.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
As display stuffs have been moved to a shield, the display chosen node
must be removed as well as chosen node requires the node to be enabled.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
DMM stands for Device Memory Management and its role is to streamline
the process of allocating DMA buffer in correct memory region
and managing the data cache.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Reduce RAM disk size from 192 sectors down to 1 sector to solve linking
issue due to qemu_cortex_m3 target having too little RAM. The RAM disk
size does not really matter in this test case and should be as small as
possible.
Enable test random generator to solve missing sys_rand_get() required by
networking subsystem.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Fix regression due to use of HAL_RADIO_TMR_START_DELAY_US
introduced in commit 11bae5cfa9 ("Bluetooth: Controller:
Fix missing radio timer comp and range delay").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
set DT node as Okay in board device tree;
add board level's d-cal, txcal45dp and txcal45dm to usbphy node;
enable usb clock; set USB_STACK_USE_DEDICATED_RAM for lpc55s69 and rt685;
load usb.ld for lpc55s69 and rt685.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
udc_mcux_ehci is based on the MCUX USB controller driver
(usb_device_ehci.c); udc_mcux_ip3511 is based on the
MCUX USB controller driver (usb_device_lpcip3511.c);
add related Kconfig and CMake; include the usb_phy.h path in
modules/hal_nxp/usb/CMakeLists.txt because udc_mcux.c use it;
add related macros to usb_device_config.h;
update CMakeLists for udc_mcux_ehci and udc_mcux_ip3511.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
define usbphy in DT and controller DT node ref to usbphy node.
define the usbphy yaml and update ehci and ip3511 yaml for usbphy.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Ensure --target and -mcpu/-mfpu/-mtune are set appropriately when building
with clang targeting arm64/aarch64.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
- Unify shell backends in a dedicated section.
- Add documentation for the following backends: USB, BLE, RTT.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Add the CAP initiator and acceptor samples to the files
for Bluetooth Audio.
This will also automatically support a future
CAP Commander sample.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds babblesim tests of the CAP Acceptor and the CAP Initiator
samples for unicast.
This simply checks if at least one stream is connected
and is sending (empty) data.
This modifies the samples to send data as well as counting the
receive ISO data packets.
Ideally the TX would be superflous to verify that ISO is working,
but a missing feature in the Zephyr LL makes it a requirement.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds a CAP acceptor unicast sample that simply
uses the CAP acceptor implementation to setup
streams with a CAP initiator.
To keep it simple no audio or encoding support
has been added.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds a CAP initiator unicast sample that simply
uses the CAP initiator unicast API to setup
streams with a CAP acceptor.
To keep it simple no audio or encoding support
has been added.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The current implementation of the BAP Broadcast Assistant only supports a
single connection. This PR makes broadcast assistant support multiple BAP
scan delegators.
Fixes: #67523
Signed-off-by: Ping Wang <pinw@demant.com>
Fixes an issue whereby the domains file in sysbuild projects
would be loaded and used with outdated information if sysbuild
configuration was changed then west flash was ran directly after
it
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add board support for the ADI AD-APARD32690-SL. The platform is based on
a MAX32690 microcontroller, it has an Arduino-Mega compatible header and
2 PMOD connectors. Also, a 10 Mbps single-pair Ethernet link is enabled
by using the ADIN1110 10BASE-T1L MAC/PHY.
Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
The uart-controller devicetree binding declares current-speed and
data-bits properties as optional, but the max32 uart driver failed to
build if they weren't defined. Fix the driver by falling back to
commonly used values for these properties.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Let's filter out escape sequences from the tests
output (for ex. color escapes) as those corrupt
the xml.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Also run the multiple_id test on the nrf54l15bsim target
to validate the controller when running on this
platform which has both a different RADIO and other
peripherals.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's merge the results and publish them as in the
twister workflow.
It is nicer to not select files by hand and produces
a nicer report.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Move the shell script filter to a single place,
and ignore also files starting with "ci."
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The gpio pin that will be used as a source for PWR wake-up pins does not
actually need to be configured as input, hence input_gpio_keys driver does
not need to be involved. As far as GPIO controller is concerned, the pin
can be in analog state.
Also, it's clearer & safer to call gpio_pin_configure_dt directly in the
application with the STM32_GPIO_WKUP flag, just before calling Poweroff,
instead of relying on a driver, like input_gpio_keys to do it just after
boot behind the scenes, & risk not having the correct wake-up pins config
when Poweroff is finally called.
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Sysbuild sets the EXTRA_CONF_FILE before loading kconfig.cmake.
This hides any user defined EXTRA_CONF_FILE added to the sysbuild cache.
Clear the local sysbuild EXTRA_CONF_FILE so that the hidden cache
variable re-enters current scope.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
In case no Renewal/Rebinding times have been provided the server via
DHCP options, we should reset their values on ACK, so that the client
can recalculate the defaults. This is important, as the lease time may
change, so we should recalculate default T1/T2 timeout based on the new
lease time value.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
DHCP Request retransmission in RENEW and REBIND states was not
compliant with RFC2131.
The retransmission interval should not be calculated as in REQUESTING
state in such case, but rather calculated based on the remaining T2
or lease time (depending on current state).
RFC doesn't also mention any retransmission count limit for those
states. The client should retransmit the REQUEST until T2 or lease
expiry time are reached.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Trying to start a chat script using either modem_chat_run_script()
or modem_chat_run_script_async() should result in returning -EBUSY
without affecting the currently running script and thread waiting
on the current script to stop.
The current behavior causes the thread waiting for the current
script to stop to return with error -EAGAIN, and the thread trying
to start the new script to return with error -EBUSY.
This commit moves the reset of the sem the current thread is
waiting on, to after the check of whether a script is currently
running, leaving the current thread unaffected as is intended.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Move it out of boot section because it's also called by none-boot function
'loapic_resume()' at runtime. Better to keep boot-only things in boot
section to avoid paging in boot section things at runtime.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
bt_audio_codec_cfg_get_chan_allocation() now takes an
extra parameter.
Let's set it to the value which keeps the old behaviour.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
PR #72571 added fallback functions to BT audio, but not all bsim
tests were properly updated to use new functions signatures. This
commit fixes a remaining error with the same pattern as the
original PR did for "bap_broadcast_sink_test.c".
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Do not run the samples/drivers/flash_shell application on the
stm32h745i_disco//m4 as the flash controller is not supported yet
on the M4 core (only M7). Just like the nucleo stm32h745//m4
is excluded.
Also exclude stm32h7rs disco at the moment (still TODO).
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The HCI command LE Read Supported States command returns
if the controller supports running the scanner and initiator
roles in parallel.
This commit utilizes this information in the host:
- It does not prevent initiating a connection when the scanner is
running
- It does not prevent the host from restarting the background
scanner when there the host wants to auto-initiate a connection.
- It does not stop the scanner when the host wants to auto-initiate
a connection.
To support this feature, the scanner and initiator
always have to use the same address.
This because the HCI command LE Set Random Address
cannot be issued after the initiator or scanner has started.
1. When privacy is disabled, the scanner has to use its identity
address to ensure it uses the same address as the initiator.
2. Only one identity is supported.
To simplify the implementation, it is a requirement to use
extended advertising commands to avoid interfering with
the random address used by the advertiser(s).
Also, it is a requirement to never use time-limited scanning,
as RPA this feature does not work when privacy is being used.
See https://github.com/zephyrproject-rtos/zephyr/issues/73634.
The changes in this commit will be tested out of tree as the
Zephyr Bluetooth Controller does not support this functionality.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
When creating a BAP broadcast source with bt_bap_broadcast_source_create
only the subgroup information is stored in the streams and the remaining
BIS specific information is not stored in the stream->codec_cfg,
which it should.
Fix is to store bis specific information also in stream codec config.
Updated broadcast source BSIM test to verify above usecase.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
Currently we launch qemu (well, "ninja run" usually) using Popen and
request stdout and stderr to be redirected into a pipe. However we never
read that pipe so the information is not captured.
Instead log directly into files that can be inspected after a failed
to to find out why qemu run failed.
Note that this is really only useful in cases where qemu either fails to
launch or crashes.
Regular test data is still handled via the qemu fifo.
Signed-off-by: Juha Kuikka <juha.kuikka@gmail.com>
The polling properties are a period in us but are named as "-rate" right
now, which would imply that that's a frequency. Rename them to
"period-us" to make that unambiguous.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Returning a status code will allow the application developer
to detect logic issues.
We consider this as not breaking the API.
If `-Werror -Wunused-result` is enabled, the application developer needs
to validate the return code.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Callbacks can only be registered once. Otherwise the slist
will become circular.
In this commit we have choosen to ignore the second registration
call if the callback has already been registed. The alternative
is to trigger an assertion. That doesn't work if the assertions
are turned off.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This allows us to use functionality provided by slist.
First use case: Avoid adding an element twice.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Writing headers compatible with both C and C++ _and_ a range of
toolchains can be very challenging, see for instance long discussions in
commit c15f029a71 ("init.h: restore designated initializers in
SYS_INIT_NAMED()"), PR #69411 and a few others linked from there.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
There are some hardcoded numbers in the test, which here are replaced
with the proper defines.
The test will now also FAIL if we go in an inapropriate state
A guard has been added around the call to bt_le_per_adv_sync_transfer,
so that it only gets called when PAST support is available
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
The CONFIG_NVS_DATA_CRC configuration item allows to enable a CRC-32
on the data part of the NVS items.
Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
Allow to protect the data part of each NVS item with a 32-bit CRC.
This uses 4 more bytes per NVS item.
Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
This code was never formally tested before... and without the preceding
commit it obviously didn't work either.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Existing code confused table usage and table reference counts together.
This obviously doesn't work. A table with one reference to it and one
populated PTE is not the same as a table with 2 references to it and
no PTe in use.
So split the two concepts and adjust the code accordingly. A page needs
to have its PTE usage count drop to zero before the last reference is
released. When both counts are 0 then the page is free.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Use zephyr_blobs_verify to check the blob file is valid
or not.
The function zephyr_blobs_verify will check if the file
exists. And it checks if the file is valid.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add Kconfig.nxp to support NXP Bluetooth Chipset.
Current only NXP IW612 Chipset (BT_NXP_NW612) has
been supported.
Add modules/hal_nxp/bt_controller/CMakeLists.txt to
determine whether any firmware is selected, and
check whether the firmware exists.
If the firmware exists, copy the firmware to the
temporary folder ${ZEPHYR_BINARY_DIR}/include/
generated/bt_nxp_ctlr_fw.h. OR, raise a fatal error.
In file hci_nxp_setup.c, includes the temporary file
bt_nxp_ctlr_fw.h.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Implement UART firmware download driver for NXP
BT module.
Only support Murata 2EL M.2 module on RT1170EVKB.
And only one instance can be supported now.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add documentation to point to the requirements repository
and give the contributors a guideline how to add requirements
to that repository.
Signed-off-by: Simon Hein <Shein@baumer.com>
While forwarding a multicast packet decrement hop limit in a common net
buffer. Also, packets with hop limit equal to 0 should not be forwarded.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
These test only test the basic functionality of
bt_cap_initiator_unicast_discover so far, but will be expanded.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cfg_meta_get_pref_context
as absence of pref context in BAP implicitly means a unspecified
for LC3.
In the case that it is absent BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED
is the returned value.
While the metadata for codec cfg and codec cap are similar,
this only applies for codec cfg as per BAP.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cap_get_max_codec_frames_per_sdu
as absence of max codec frames per SDU in BAP implicitly
means a single frame for LC3.
In the case that it is absent 1 is the returned value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cap_get_supported_audio_chan_counts
as absence of channel count in BAP implicitly means a single channel
for Lc3.
In the case that it is absent 1 is the returned value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cfg_get_chan_allocation as absence of
channel allocation in BAP implicitly means Mono.
In the case that it is absent,
BT_AUDIO_LOCATION_MONO_AUDIO is the returned value.
This commit also fixes the implementation of
bt_audio_codec_cfg_get_frame_blocks_per_sdu as it only applies to
LC3 (as per the BAP spec). It also adds additional testing of it
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add conditions to enable ptp_clock driver implementation
for native_posix when PTP subsystem is enabled.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Adding network interface status monitor function. Depending
on the interface operation state and change of the state
events are generated and handled by the function.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
This commit adds implementation of the PTP thread that will
poll sockets descriptors and PTP Port's timeres for timeouts,
generate events and handle them and trigger STATE_DECISION_EVENT
handling when needed.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
The STATE_DECISION_EVENT in PTP is a pivotal mechanism that
facilitates dynamic state management within the protocol,
allowing devices to adapt their operational states based on the BTCA's
recommendations and the health of the network.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Introduction of PTP stack's core functions responsible for
event generation and handling of these events. Events are generated
base on timeouts and/or PTP messages received via BSD sockets
assigned to a specific PTP Port. These function will be used
in PTP thread.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
The commit adds functions that enable and disable PTP Port.
This is going to be used by event handling routine.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Timers are used to trigger message transmission and detect
inactivity of other PTP Clocks what should result in an action
of the PTP Port.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
This commit introduces routines for PTP message transmission.
It includes transmission of three types of messages (Announce,
Sync, Delay_Req) that should be send periodically depending
on the PTP Port's state.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Introduction of routines processing received PTP Management messages.
The processing is split into clock-oriented and port-oriented parts.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Add handler for STATE_DECISION_EVENT it consists of following routines:
- state decision algorithm
- best timeTransmitter clock algorithm
- data sets comparison algorithm
Based on IEEE 1588-2019 section 9.3.3
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
This commit adds routines for handling incoming messages
needed for correct operation of the PTP stack in end to end
mode with multicast operation mode.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Initial implementation of the clock adjustment and delay calculation.
Timestamp values used for calculations will be obtained from
proper PTP messages (Sync, Follow_Up, Delay_Req, and Delay_Resp)
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Foreign timeTransmitters are other PTP Clocks in a domain. They announce
their parameters via announce messages. PTP Ports should record
these foreign timeTransmitters.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
This commit introduces module responsible for sending and receiving
messages. It is based on BSD Sockets API.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Add allocation of container used for TLVs and dummy functions for
preparing correct byte order of data. TLV stands for Type, Length,
Value, and it is extension of PTP messages that's used to transmit
extra information. This data is attached at the end of PTP message.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Add functions preparing messages to network byte order before sending
and changing to host byte order after reception and before processing
by PTP stack.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Add dynamic memory allocation for PTP messages. Memory allocation
is done with Zephyr's memory slab. It's size can be configured
with `PTP_MSG_POLL_SIZE` Kconfig symbol.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Introduces definition of structures for all types of PTP messages
defined in the IEEE 1588-2019 standard.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Based on IEEE 1588-2019 some of PTP Port states might not be used
if the option of 17.7 is implemented. This patch prepares state
machine implementation for such scenario.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Implement possibility to configure PTP stack in TIME_RECEIVER_ONLY mode.
This restrics stack behaviour and doesn't allow for any PTP Port
of the PTP Clock become a TimeTransmitter Clock.
The change includes:
- Kconfig option
- Additional field in `struct ptp_port` structure
- New state machine function for a timeReceiver-only PTP Port.
- Extra steps in PTP Clock and PTP Port initialization.
New finite state machine is based on the figure 31
in section 9.2.5 of the IEEE 1588-2019.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
This commit introduces PTP Clock and PTP Port structures
and API for initializing PTP Clock and PTP Ports. Configuration
options has been added as Kconfig symbols to configure parameters
of the Clock and Ports at compile time.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Datasets defined in the header file are going to be used
in PTP Clock's structure and PTP Port's structure. They
gather data into structures defined in IEEE 1588-2019.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
The patch brings implementationof a state machine for full
PTP implementation. It returns new PTP Port's state based
on event that occured and previous state.
Based on the figure 30 in section 9.2.5 of the IEEE 1588-2019.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
The header's file content is based on 5.3 section of
the IEEE 1588-2019 standard describing Precise Time Protocol (PTP)
used to synchronize devices in the network.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
This is an initial commit that introduces PTP library in the Zephyr.
It adds basic Kconfig symbols for enabling library, CMakeLists.txt
for compiling it, public header file, and initial PTP thread definition
and library initialization. Implementation of the functional PTP stack
will be introduced in following commits.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Add returning timestamp of received packet in ancillary data buffer
in `msghdr` structure. This commit enables getting timestamp of
the received packet by calling `recvmsg()` function. The function
returns in the `msg_control` field timestamp if following criteria
are met:
- `CONFIG_NET_CONTEXT_TIMESTAMPING` is set
- `SO_TIMESTAMPING` socket option has `SOF_TIMESTAMPING_RX_HARDWARE`
option enabled for that socket
- driver used by sockets supports packet timestamping
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Add handling of net_pkt flags that can be used to indicate that the
network packet should be timestamped.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
This is the last commit of the set of patches that introduces
`SO_TIMESTAMPING` socket level optino in Zephyr. The patch
adds `SOF_TIMESTAMPING_RX_HARDWARE` and `SOF_TIMESTAMPING_TX_HARDWARE`
bitmasks. It can be extedned in the future to cover more timestamping
features. Currently the feature can be used with ptp_clock driver.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
This is next commit from the set of patches that brings to the
Zephyr, SO_TIMESTAMPING socket level option. It stores timestamping
option bitmask that can be transfered to the net_pkt.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
This is the first commit from the set of patches that brings to the
Zephyr, SO_TIMESTAMPING socket level option. This enables to pass to
the network driver information whether given network packet should
be timestamped or not.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Added incrementation of the packet reference count when puting
the packet on the queue used in tx timestamping thread. This fixes
an issue when user wants to access the packet data in the timestamp
callback context. Before the fix was introduced if sockets were used
packet has been unreferenced before execution reached timestamp callback
context.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Rather than defining _XOPEN_STREAMS to -1 when not configured,
simply do not define it. This is consistent with other libcs.
This minor bit was overlooked in a recent commit.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This documentation was a bit unappealing. Add a
paragraph at the top to describe the level of support.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The putpmsg() function was left unimplemented when other
functions in the _XOPEN_STREAMS Option.
Add a stub to complete the Option.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Refactor the `QSPI_CommandTypeDef cmd_write_en` definition to
a `static const` local variable to eliminate redundant definitions.
This change enhances performance by reducing runtime overhead associated
with initializing `cmd_write_en` in multiple functions.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
The same way as `bt_hci_get_adv_handle` and `bt_hci_get_conn_handle` add
a function to get the handle of a periodic advertising sync.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
kconfig_soc_root was mistakenly set to value of BOARD_ROOT.
Fix this by correctly set kconfig_soc_root to the value of SOC_ROOT.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Enable testing of all CiA recommended bitrates on the nucleo_h563zi,
where I can test, and the stm32h573i_dk, which is the testing platform
for the stm32h5 series.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Enable the FDCAN1 using pll1_q as clock source on pins TX/RX PD1/PD0.
Using 160MHz pll1_q output with an additional can clk-divider, to allow
other peripheral to use such a high clock source and to increase test
coverage.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
In preparation for CAN support, this commit changes the q divier of PLL1
from 2 to 3 to result in a output frequency of 160MHz.
Using a can clk-divider of 2 a 80MHz Core clock frequency can be configured
which is recommended for can bit rates over 2MHz for good interoperability
between nodes.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
In the parse_recv_state we did not verify that we can handle all
the subgroups before we started parsing them.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fixes an issue whereby strings are placed in UTF-8 format but the
application doesn't read them in when configured using sysbuild
and another issue whereby sysbuild then reads the application's
cache and did not treat them as UTF-8
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add support for ILI9340 to display_read_write test. This support was
verified with the adafruit_2_8_tft_touch_v2 shield.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add support for display_read API with ili9xxx controller. This
functionality is opt-in, since the required bitshifting makes the
read not very performant, and the implementation adds otherwise unused
code overhead.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Convert ST7789V display driver to use MIPI DBI API. This commit also
updates in tree boards to use the new devicetree syntax needed to enable
this display with the MIPI DBI API.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Make sure k_mem_unmap() completes successfully on memory that is half
paged-out and such memory is no longer accessible afterwards.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
If a page is paged out or paged in but unaccessible for the purpose of
tracking the "accessed" flag then k_mem_unmap() may fails. Add the code
needed to support those cases.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add proper PSA_WANT kconfigs for TLS sockets and RSA key exchanges
when CONFIG_PSA_CRYPTO_CLIENT is set.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit add the proper PSA_WANT kconfigs which are required
to perform an RSA signature when a PSA crypto provider is
available in the system (i.e. CONFIG_PSA_CRYPTO_CLIENT is set).
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Replace reference to separate USB config to use the HWMv2 board variant
instead.
Fixes#74041
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
When testing https://github.com/zephyrproject-rtos/zephyr/pull/72090/,
there is an issue found.
The change in the previous commit is to put all data sending
operations into the work queue context, and lock the current
AG before sending data.
And in change of #72090, the HCI TX thread is removed. All
sending sequence are happened in work queue context.
There is a possible problem when AG creates a SCO connection
by calling the function bt_conn_create_sco. Before the
function bt_conn_create_sco is called, AG will be locked to
avoid creating repeated SCO connection.
And the execution of the function bt_conn_create_sco
depends on the work queue. Because the HCI command of
function bt_conn_create_sco is sent in work queue context.
In the normal case, there is not any issue.
But there is a case that when the function
bt_conn_create_sco is being executed, there is a pending AG
TX waiting to be executed.
Once the work queue starts executing the handler, the AG TX
handler is executed first. Since the lock has been acquired
by other threads, the AG TX handler cannot acquire the lock.
As a result, the SCO connection creation fails.
Remove the AG lock from SCO creating. Instead, use a flag
to mark whether a SCO connection is be created.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Due to the sent callback of RFCOMM is changed, the
sending buf need to be primed waiting for the
previous one to be completed. Add a worker for
this purpose.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Due to the parameter `buf` has been removed by rfcomm,
update the prototype of channel sent callback hfp_hf_sent.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Due to the sending buf cannot be referred
by sending layer.
It is unsafe to use `buf` identification
for a transmission, because the buf may
have been newly transmitted when the
sent callback is triggered.
Now instead, when the send completion
callback is received, the upper layer
is notified that a transfer is completed.
If multiple bufs are sent at the same
time, there is no guarantee which buf
is completed when the sent callback
triggered. Therefore, it is recommended
that the caller transfers the next data
block after the previous transfer is
completed.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
There is a change (commit no.: 93d0eac834) that if
the `ref` of sending buf is not 1, the error code
`-EINVAL` will be returned from bt_conn_send_cb.
It causes the RFCOMM functionality cannot work
properly.
Remove the ref operation from the buf to be sent
to fix the issue.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This is part of a series of moving memory management related
stuff out of the Z_ namespace and into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is part of a series of move memory management related
stuff out of Z_ namespace into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The board defconfig forces CONFIG_USERSPACE to be disabled
due to small number of available MPU regions which are not
enough for userspace testing.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Also any demand paging and page frame related bits are
renamed.
This is part of a series to move memory management related
stuff out of the Z_ namespace into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Renames:
Z_KERNEL_VIRT_START to K_MEM_KERNEL_VIRT_START
Z_KERNEL_VIRT_SIZE to K_MEM_KERNEL_VIRT_SIZE
Z_KERNEL_VIRT_END to K_MEM_KERNEL_VIRT_END
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Renames:
Z_VIRT_RAM_START to K_MEM_VIRT_RAM_START
Z_VIRT_RAM_SIZE to K_MEM_VIRT_RAM_SIZE
Z_VIRT_RAM_END to K_MEM_VIRT_RAM_END
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Renames:
Z_PHYS_RAM_START to K_MEM_PHYS_RAM_START
Z_PHYS_RAM_SIZE to K_MEM_PHYS_RAM_SIZE
Z_PHYS_RAM_END to K_MEM_PHYS_RAM_END
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is part of a series to move memory management related
stuff from the Z_ namespace into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Rename Z_BOOT_VIRT_TO_PHYS() and Z_BOOT_PHYS_TO_VIRT() to
K_MEM_BOOT_VIRT_TO_PHYS() and K_MEM_BOOT_PHYS_TO_VIRT()
respectively. This is part of a series to move memory management
functions away from the Z_ namespace and into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is part of a series to move memory management functions
away from the z_ namespace and into its own namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is part of a series to move memory management functions
away from the z_ namespace and into its own namespace. Also
make documentation available via doxygen.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is part of a series to move memory management functions
away from the z_ namespace and into its own namespace. Also
make documentation available via doxygen.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This renames z_phys_map() and z_phys_unmap() to
k_mem_map_phys_bare() and k_mem_unmap_phys_bare()
respectively. This is part of the series to move memory
management functions away from the z_ namespace.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
These functions were introduced alongside with the memory mapped
stack feature, and are currently only being used there only.
To avoid potential confusion with k_mem_un/map(), remove them
and use k_mem_map/unmap_phys_guard() directly instead.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The internal functions k_mem_map_impl() and k_mem_unmap_impl()
are renamed to k_mem_map_phys_guard() and
k_mem_unmap_phys_guard() respectively to better clarify
their usage.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
I/O Devices were meant to be handles of sorts and had a built in mpsc queue
as this made sense initially. As time has gone on it turned out that often
we wanted the mpsc queue to be an implementation detail hidden in a driver.
In fact pretty much all drivers work this way now.
Keeping the struct mpsc queue as a member of rtio_iodev meant wasted memory
in cases where it wasn't used. It also meant a bit of confusion as the
queue might be accidently used in places where it shouldn't be.
Remove the mpsc queue member from struct rtio_iodev and the last remaining
usages of it. Will ensure RTIO for 3.7 LTS avoids causing unneeded churn
for future users.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
we use reason for a failure to indicate state and then set the status
later and reason for the failure, in case of the failure is taken from
the handler status. Clean this up by setting status and reason coming
from the handler very early, so we do not have to go through replacing
meaning later.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As their stacks are defined by zephyr's kernel/thread stack definition
macro, better use zephyr's kernel/thread stack size macro for their stack
size, ensuring consistency and preventing potenial issues related to stack
size misconfiguration.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
isr_wrapper has been converted to C but this inline comment was not
updated. This fixes the out-of-sync comment.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
These files have been moved/renamed as the project grew but this part of
the documentation has gotten out of sync.
This fixes the most obvious discrepancies.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Fix invalid cast in SHELL_ADSP_MEMORY_WINDOW_DEFINE(). The type used in
the cast (struct shell_memwindow) refers to a non-existant type. As the
initialized struct field is of type "void *", compiler does not complain
about it, so there were no build warning/errors seen.
Reported-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Adds a tag to the sysbuild application configuration section so it
can be referenced in other documentation
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Enable ethernet on the NXP board RD_RW612_BGA.
This requires a variant because it requires a board rework,
which will disable some other features. The variant allows
us to use an overlay to represent this.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Move compatible property and model to dtsi file
of rd_rw612_bga board since it will be the same
for all variants.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Move this to a call in the init process. arch_* calls are no services
and should be called consistently during initialization.
Place it between PRE_KERNEL_1 and PRE_KERNEL_2 as some drivers
initialized in PRE_KERNEL_2 might depend on SMP being setup.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove display definition from MIMXRT1064 EVK, and document the shields
that can be used with the board's FPC 40+6 pin parallel display
interface.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add display support for the RT1040 EVK, using the RK043* series panels
defined as shields in Zephyr.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Adds calls to the set_src_ctrl of TCPC driver to enable and disable
the VBUS sourcing. If the TCPC doesn't support these functions,
no errors should be printed.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Add set_snk_ctrl and set_src_ctrl functions to TCPC API to allow
controlling the sourcing and sinking vbus.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
While all in-tree SoCs have been ported to HWMv2, Zephyr still supports
out-of-tree SoCs in HWMv1 format, including boards. Add a clear
deprecation message so that users get notified that this is a deprecated
feature to be removed in the future.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add Kconfig option for enabling high speed USB support for the native posix
USB controller driver.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
When validating the parameters for broadcast reception start some
return statements were missing, they have been added, as well as
proper initialisation of a variable
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
During HWMv2 migration, non-ported SoCs were placed in a 'soc_legacy'
folder and sourced from there instead of 'soc' folder.
Remove the no-longer needed soc_legacy folder.
CMake oot SoCs in old hardware model are sourced from
'<soc-root>/soc/<arch>/<soc-path>' which has always been the case, also
before HWMv2.
Remove the 'osource "soc/soc_legacy/...' generation in Kconfig, because
the source is relative to Zephyr base.
All SoCs in Zephyr repository has been ported to the new hardware model
and therefore there is no need for this line.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
If we are merging subgroup and BIS codec configuration data
for a codec other than LC3, then we just append them, but
did not properly update the length.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
A naive implementation would look like
```c
void bt_init()
{
bt_le_conn_cb_register();
bt_enable();
}
```
When the app later adds the possibility to enable and disable
Bluetooth, it may happen that the application developer calls
`bt_init()` instead of `bt_enable()`. This results in invalid
behavior. This kind of bug is currently a bit harder to debug
as the callback register APIs do not reject registering a
callback twice.
Improving the API documentation is the first step towards making
this a bit more user friendly.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
get the address of a memory mapped
jedec,spi-nor flash by name and as a fallback
use the second register.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add tests for
DT_REG_HAS_NAME,
DT_REG_ADDR_BY_NAME_OR,
DT_REG_SIZE_BY_NAME_OR,
DT_INST_REG_HAS_NAME,
DT_INST_REG_SIZE_BY_NAME_OR and
DT_INST_REG_ADDR_BY_NAME_OR.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
In the 32-bit bitfield pinctrl, the bits from b31 to b24 are representing
the PIN function. The correct mask value then must be 0xFFu.
Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
Add a prompt to ROMSTART_RELOCATION_ROM configs to allow
projects config file selection.
This simplifies the usage in samples/app for board porting.
Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
This commit enables ISH boards to use APIC timer with TSC time source as
their system timer by replacing CONFIG_HPET with CONFIG_APIC_TIMER_TSC.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
The ram-console snippet disabled UART console and enabled the
RAM console with the option link the RAM console buffer to a
dedicate section in a new added memory-region.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Currently, the ram_console buffer is defined as a global var, its
address is determined during the building and may be changed when
code update. This is not a problem if the ram_console is just used
in debug purpose.
While in the heterogeneous SoCs, there can be multiple MPU Cores
and several MCU cores, it can run multiple OS/bare-metal instances
on these cores, but the UART ports may be not enough, so the
ram_console can be leveraged. To make it easy to use, it's better
make the console buffer fixed and predefined.
This patch adds a option to link the console buffer to a given
section, through the "zephyr,memory-region" device tree node, then
the address can be known from the device tree node and easy to
check from other cores running Linux/U-Boot.
To use this option, the chosen property 'zephyr,ram-console' must
be added, the following is a example:
chosen {
zephyr,ram-console = &ram_console;
};
ram_console: memory@93d00000 {
compatible = "zephyr,memory-region";
reg = <0x93d00000 DT_SIZE_K(4)>;
zephyr,memory-region = "RAM_CONSOLE";
};
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
In arm64 linker script, create a memory region and section for each
device tree node with compatible string "zephyr,memory-region".
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
The 3-byte value suits the assigned number much better,
and also allows for less memory copies when getting and
setting the values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Remove the "stream" part of the value and functions to
better fit with the name in the assigned numbers document.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This PR adds support for new Synopsys nSIM RMX100 platform.
New platform based on RISC-V ISA instead of classic ARC.
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Change source tree organization for Synopsys nSIM platform.
Classical ARC architectures arc_v2 arc_v3 moved to arc_classic
SoC and boards family.
nSIM SoCs were separated regarding series: EM, HS, SEM, VPX2.
This PR sould be seeing as the preparation for
addition new nSIM platform based on the RISC-V architecture.
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
The stm32 xspi node is another possible multi-spi for connecting
with gpDMA channels for Rx and Tx, same request.
Channels 4 and 5 are preferred for AHB periph to/from ext. Mem.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the commands to read and write to/from the xSPI with gpDMA
On the stm32h5 device, the one request for xspi instance
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Configure the xspi clocks domain by the clock domain
as defined by the DTS
Up to 3 possible clock confg : xspix, xspi_ker, xspi_mgr
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This patch add device tree node for ism330dhcx
3D accelerometer and 3D gyroscope sensor.
Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
Update Sphinx documentation to explain how Silicon Labs boards
are named in Zephyr, now that all boards are consistently
named.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Rename all Silicon Labs starter kits to always use the official kit name
as board target name. Previous kit names used various naming schemes,
including putting part of the SoC name in the board name. With HWMv2,
SoC names (if needed) should go in the SoC board qualifier.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Rename all Silicon Labs radio boards to always use the official kit name of
the kit containing only the radio board as board target name. Disentangle
boards using Series 1 and Series 2 SoCs that have almost nothing in common
in terms of devicetree content, but still occupied the same directory.
As part of the initial HWMv2 port, all radio boards were merged into a
single target efr32_radio, using the SoC as a board qualifier to target
specific boards. This was unfortunate, as the SoC name is not sufficient
to identify a specific board -- the same SoC may be used on multiple
different boards. This commit reinstates every radio board as an individual
board target.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Rename all Silicon Labs dev kits to always use the official kit name
as board target name. Previous kit names used various naming schemes,
including putting part of the SoC name in the board name. With HWMv2,
SoC names (if needed) should go in the SoC board qualifier.
Use HWMv2 revisions for the two variants of SLTB010A.
Split the xG27 Dev Kit from the EFR32BG22 Thunderboard. This attempt
at deduplication is confusing due to the very different kit names
and use of different ICs (BG22 vs BG27), and was not continued with
the xG24 Dev Kit, meaning that it wasn't consistent.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Introduce three subcategories for Silabs boards: dev_kits, radio_boards
and starter_kits. The dev_kits category contains small form-factor
standalone boards branded as "Dev Kit" or "Thunderboard". The
radio_boards category contains radio boards to be used with a wireless
mainboard, and the starter_kits category contains larger form-factor
standalone boards branded as "Starter Kit".
Structure the Sphinx documentation the same way as the directory tree.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
This commit adds support for configuring SPI frequency per transaction.
The "clock-frequency" devicetree property is used as the default
frequency unless the peripheral being communicated with has a lower
"max-spi-frequency" (passed to the driver as spi_config::frequency).
An error is returned if the requested frequency is higher than the
hardware can support. This limit is half the peripheral clock (PCLK on
Series 2, HFPERCLK on Series 0/1) for SPI in controller mode.
Previously, the driver hard-coded 1 MHz operation. For backwards
compatibility, default to 1 MHz if the "clock-frequency" property is not
set in devicetree.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
This commit adds support for devices such as EFR32xG24 in the SPI
driver, as these devices only have a single USART peripheral.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
View buffers are now also a limited resource. Acquire them before
attempting to pull data. `CONFIG_BT_CONN_FRAG_COUNT` should be tuned on
a per-application basis to avoid this.
A possible optimization, that was present before, is to not create a
frag when the original buffer fits the controller's HCI size.
I prefer deferring this optimization to a future patchset.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
We can get rid of the view pool for SDU segments :)
We have to make the code slightly more complex :'(
The basic idea is always giving the original SDU buffer to `conn.c` for it
to pull ACL fragments from.
In order to do this, we need to add the PDU headers just-in-time.
`bt_l2cap_send_pdu()` does not add them before putting the PDU on the queue
anymore. They are added by `l2cap_data_pull()` right before the data leaves
`l2cap.c` for `conn.c`.
We also have to inform `conn.c` "out of band" of the real L2CAP PDU size so
it doesn't fragment across segment boundaries. This oob is the new `length`
parameter to the `.pull()` method.
This is the added complexity mentioned above.
Since SDU segmentation concerns only LE-L2CAP, ISO and Classic L2CAP don't
need this extra logic.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
We don't need the TX thread anymore.
Generalizing the pull-based architecture (ie. `tx_processor`) to HCI
commands makes it possible to run the whole TX path from the the system
workqueue, or any workqueue really.
There is an edge-case, where we call `bt_hci_cmd_send_sync()` from the
syswq, stalling the system. The proposed mitigation is to attempt to drain
the command queue from within `bt_hci_cmd_send_sync()`.
My spidey sense tingles however, and it would be better to just remove the
capability of calling this fn from the syswq. But doing this requires
refactoring a bunch of synchronous procedures in the stack (e.g. stack
init, connection establishment, address setting etc), dragging in more
work. I will do it, but in a later patch.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This API replaces `bt_l2cap_send()` and `bt_l2cap_send_cb()`.
The difference is that it takes the `struct bt_l2cap_le_chan` object
directly instead of a connection + CID.
We need the channel object in order to put the PDU on the TX queue. It
is inefficient to do a search for every PDU when the caller knows the
channel object's address and can just pass it down.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
The current TX pattern in the host is to try to push a buffer through all
the layers up until it is ingested by the controller.
Since sending can fail at any layer, we need error-handling and separate
retry logic on pretty much all layers. That logic obscures the "happy path"
for people trying ot understand the code.
This commit inverts the control, in a way that doesn't require changing the
host or HCI driver API (yet):
Layers don't send buffers synchronously, they instead put their buffer in a
private queue of their own and raise a TX flag on the lower layer. Think of
it as a `READY` interrupt line that has to be serviced by the lower layer.
Sending is now non-blocking, rate depends on the size of buffer pools.
There is a single TX processing function. This can be thought as the
Interrupt Service Routine that will handle the `READY` interrupt from the
layers above.
That `tx_processor()` will then attempt to allocate enough resources in
order to send the buffer through to the controller. This allocation logic
does not block.
After acquiring all the resources, the TX processor will attempt to pull
data from the upper layer. The upper layer has to figure out which buffer
to pass to the controller. This is a good spot to put scheduling or QoS
logic in the upper layer.
Notes:
- user-facing API for tuning QoS will be implemented in a future patch
- this scheme could (and probably will) be extended to upper layers (e.g.
ATT, L2CAP CoC segmentation).
- this patch removes the `pending_no_cb()` memory optimization for
clarity/correctness. It might get re-implemented after a stabilization
period. Hopefully with more documentation.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Instead of allocating segments/fragments and copying data into them, we
allocate segments as "views" (or slices) into the original buffer.
The view also gives access to the headroom of the original buffer, allowing
lower layers to push their headers.
We choose not to allow multiple views into the same buffer as the headroom
of a view would overlap with the data of the previous view.
We mark a buffer as locked (or "in-view") by temporarily setting its
headroom to zero. This effectively stops create_view because the requested
headroom is not available.
Each layer that does some kind of fragmentation and wants to use views for
that needs to maintain a buffer pool (bufsize 0, count = max views) and a
metadata array (size = max views) for the view mechanism to work.
Maximum number of views: number of parallel buffers from the upper layer,
e.g. number of L2CAP channels for L2CAP segmentation or number of ACL
connections for HCI fragmentation.
Reason for the change:
1. prevent deadlocks or (ATT/SMP) requests timing out
2. save time (zero-copy)
3. save memory (gets rid of frag pools)
L2CAP CoC: would either allocate from the `alloc_seg` application callback,
or worse _steal_ from the same pool, or allocate from the global ACL pool.
Conn/HCI: would either allocate from `frag_pool` or the global ACL pool.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
`bt_conn_send_cb` used to allocate a TX context (K_FOREVER).
Instead, we now put the context in the userdata of the buffer.
This means that now this fn will never block and always succeed since the
tx_queue is a FIFO (infinite size). It just puts the buf on the queue.
The metadata is stored safely in there until we have acquired all the
necessary resources to send it to the controller without failing: TX
context and controller buffer.
I.e. when `bt_conn_process_tx` is called, that's when a TX context is
try-allocated and the contents of `buf->userdata` is moved into it.
The buffer is now ready to be sent to the lower layer.
`bt_conn_process_tx` will return -EWOULDBLOCK if it's not able to acquire a
TX context, this PR modifies `bt_conn_prepare_events` to respond to this by
also waiting on the TX context pool.
Unfortunately, this increases the required userdata size for any buffers
handed to `bt_conn_send_cb`. This will be fixed in a later commit.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Fix compilation error when reset-gpios is enabled.
Undefined reference to dev_cfg variable.
Reset gpio duration needs to be defined, but is not in binding file.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
In case we want to immediately send empty Ack to server,
we should bypass all send queues.
This is required when we try to send Ack from callbacks
that happen from socket-loop context. On those cases
the Ack would have not been send because the callback
might be blocking the socket-loop while processing
a request (like write callbacks).
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Instead of blindly using the module names provided by the user via
command-line arguments, check if those actually exist in the current
manifest, and error out if any of them does not.
Fixes#73901.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Use some new kernel features to make the experience of finding and
dealing with GPIO devices much more ergonomic by allowing the use of
devicetree node labels to identify GPIO devices by default.
Users who wish to avoid the associated footprint penalty can set
CONFIG_DEVICE_DT_METADATA=n by hand, but I think the convenience is
worth the price as a default. If we're running a shell, then we've
already paid a heavy footprint penalty.
Example output for qemu_cortex_m3:
uart:~$ gpio devices
Device Other names
gpio@40004000 gpio0
gpio@40005000 gpio1
gpio@40006000 gpio2
gpio@40007000 gpio3
gpio@40024000 gpio4
gpio@40025000 gpio5
gpio@40026000 gpio6
Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
This option allows you to look up a struct device from any of the
node labels that were attached to the devicetree node used to create
the device, etc.
This is helpful because node labels are a much more human-friendly set
of unique identifiers than the node names we are currently relying on
for use with device_get_binding(). Adding this infrastructure in the
device core allows anyone to make use of it without having to
replicate node label storage and search functions in various places in
the tree. The main use case, however, is for looking up devices by
node label in the shell.
Since there is a footprint penalty associated with storing the node
label metadata, leave this option disabled by default.
Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
Add the following new macros:
- DT_FOREACH_NODELABEL
- DT_FOREACH_NODELABEL_VARGS
- DT_INST_FOREACH_NODELABEL
- DT_INST_FOREACH_NODELABEL_VARGS
These are for-each helpers for iterating over the node labels of a
devicetree node. Since node labels are unique in the entire
devicetree, their token representations can be useful as unique IDs in
code as well.
As a first user of these, add:
- DT_NODELABEL_STRING_ARRAY
- DT_INST_NODELABEL_STRING_ARRAY
The motivating use case for these macros is to allow looking up a
struct device by devicetree node label in Zephyr shell utilities.
The work on the shells themselves is deferred to other patches.
To make working with the string array helpers easier, add:
- DT_NUM_NODELABELS
- DT_INST_NUM_NODELABELS
Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
The `LOG_BACKEND_FORMAT_TIMESTAMP` Kconfig currently depends on
a list of hardcoded backends.
Let's modify it to depend on an intermediary Kconfig
`LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP` instead, which can be
selected by a OOT log backend.
Updated all exisitng supported backends to select this new
Kconfig.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Release buffer allocated in dwc2_ctrl_feed_dout() on endpoint deactivate
to prevent the buffer from leaking on USB stack disable.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Set the bootloader choice for the
sample.modules.canopennode.program_download test case in the sample.yaml
file instead of sysbuild.conf. The reason for this change is to avoid
building MCUboot by default when using the --sysbuild option, as it may
not be compatible with all platforms. This is currently causing issues
on platforms like nRF54H20 where sysbuild is always used.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This change marks each instance of the `gnss_xxx_config` and
`gnss_driver_api` as `const`.
By using `const`, we ensure immutability, leading to usage of only
`.rodata` and a reduction in the `.data` area.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This sample reports the I2C configuration of the selected I2C node
from the board DTS : bitrate property of the I2C node
In case of I2C V2, it also gives the TIMINGS which has to be written
in the DTS <timings> property of the I2C V2 node.
Uses the i2c_get_config function with CONFIG_I2C_STM32_V2_TIMING.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Change the get_config API for the stm32 I2C V2 driver.
It will also return the value of the content of TIMING register
for the I2C V2 bus.
This is hold by a i2c_config_timing structure of the device data
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Define Macro to fix the compliance check warning :
"DEEP_INDENTATION: Too many leading tabs - consider code refactoring
in the i2c_compute_scll_sclh() function
in the i2c_compute_presc_scldel_sdadel() function
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This PR is implementing a new formula to calculate the I2C timing
value from the I2C clock source and the bit rate.
This is done under flag CONFIG_I2C_STM32_V2_TIMING.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This adds a basic example demonstrating how to enable and use the CMSIS-DSP
module in Zephyr.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
`irq0-channels` defines even-numbered channels as the default value.
Since 6 was dropped from this definition, it is added.
Also, since the maximum number of channels is 12,
remove the ones that are exceeded.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Restructures the latency_measure benchmark configurations. Most of them
do not need to be executed by default by CI. However, we still want to
make it easy to run the benchmark with various configurations so that
they can be easily compared against the default.
The updated documentation shows how this can be done.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Add an option to reset gcov counters before running tests.
This ensures that only code lines triggered by test itself are counted in
the coverage report and all the board initialization code and pre-test
bootstrap is not counted. This is useful when, for example, you are
testing code that is also executed during bootup
Test Plan:
west build -p always -b qemu_x86_64 tests/ztest/base/ -- \
-DCONFIG_COVERAGE=y -DCONFIG_COVERAGE_GCOV=y -DCONFIG_COVERAGE_DUMP=y \
-DCONFIG_ZTEST_COVERAGE_RESET_BEFORE_TESTS=y
ninja -Cbuild run | tee log.log
Signed-off-by: Roman Studenikin <srv@meta.com>
Ability to reset gcov counters allows better isolation of tests
coverage. Specifically it allows to:
1. Not include counters for any code that was executed prior running the
test, which includes all the code executed during the board boot.
2. Run multiple tests without firmware reload by resetting counters
between each.
Signed-off-by: Roman Studenikin <srv@meta.com>
If the length of the string literal reserved for the serial number
descriptor is odd, the string is not used because its length is always
even and therefore one character longer. Fix this by using the shortest
length for the copy.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
I also added an overlay file for the nucleo_h563zi board to the
samples/boards/stm32/backup_sram example.
Signed-off-by: Thorsten Spätling <thorsten.spaetling@vierling.de>
Add an option to specify particular folders to pull bindings from
when generating documentation. This is useful for downstream projects
that may want to document their own bindings, but don't want to pull in
every Zephyr binding.
This is not currently possible as almost every binding depends on
`base.yaml`, which exists in the Zephyr repository. This is now enabled
by adding the following to `DTS_ARGS` in the downstream `CMakeLists.txt`
file: `--dts-folder ${ZEPHYR_BASE}/dts/bindings/base`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Don't create output sections for vendors without bindings. This only
affects the `Unknown vendor` and `Generic or vendor-independent`
vendors, which are populated by default but do not necessarily contain
any entries.
Signed-off-by: Jordan Yates <jordan@embeint.com>
According to the Zephyr documentation, the number of bytes available
for read should be returned if the input data and length parameters are
NULL and zero, respectively. This commit corrects this behavior.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Since the fifo control register and ready bit are checked in ISR
function, this commit locks IRQ when accessing these registers to
prevent racing conditions.
Tested with: Google spikyrock project
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
This commit addresses some issues during the extended endpoint(ep
number is larger than 4) access. There are enable and ready bits for
each endpoint on the IT82xx2 chip. The transaction completion should be
determined by the ready and enable bits of the corresponding endpoint.
Additioinally, for non-control endpoint, the FIFO control register is
selected before writing data and cleared when the IN transaction is
completed. When an IN token interrupts, the FIFO control register
should be checked if it's selected to prevent fake tokens.
Tested with: Google spikyrock project
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Update stm32f0 to cube version V1.11.5
Update stm32f3 to cube version V1.11.5
Update stm32f7 to cube version V1.17.2
Update stm32wb to cube version V1.19.1
Update of lib/stm32/stm32wb package to version V1.19.1
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Remove ABOSTM as not active anymore.
Remove erwango and FRASTM as already in MAINTAINERS files so we'll
be added in reviews anyway.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Adds get_status API for clock_stm32_ll_u5 driver
Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Make sure to feed control OUT endpoint with at least 8 bytes buffer to
make it possible to always receive SETUP data. This solves the assertion
failure in net_buf_add() called inside dwc2_handle_evt_setup() when a
host decides to start new control transfer immediately after it has
issued control transfer with Data Stage from host to device with wLength
less than 8.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The original intention was that the audio buffers supplied by
application to the UAC2 API can be directly used by UDC driver.
The buffer alignment requirement was explicitly stated with regards
to the receive buffer, but was mistakenly omitted on transmit buffer.
While the missing comment is added, mention also that the buffer has to
be otherwise suitable for use by UDC driver, because alignment might not
be the only UDC driver requirement. For example, the UDC driver can
require the buffer to reside in memory region that it can access with
DMA.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Set RTS/CTS flow control pins as NC in cyhal
UART object so cyhal will skip to try initialize
those pins.
Initialization of RTS/CTS is done via
PINCNTRL driver.
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
For sake of memory footprint it might be required to shrink
down the memory footprint as much as possible. Unfortunately Mbed TLS
PSA interface brings in some extra code for key management which makes
it larger than the TinyCrypt counterpart when it comes to p256-m
interfacing. For this reason it might be useful to directly access
the p256-m driver directly.
This commit adds this support and it also updates the corresponding
test in order to make use of this condition.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Update release-notes document in order to present the new Kconfig
symbol used to enable p256-m driver support.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add a simple test to compare the footprint of MbedTLS vs
TinyCrypt for the secp256r1 curve. On the MbedTLS side
the test uses the P256M driver developed by the MbedTLS
team. This is an optimized implementation which targets
the secp256r1 curve.
The example itself is pretty easy:
- generate 2 EC keys
- perform key agreement
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Ensure psa_crypto_init() is called during initialization when
Mbed TLS acts as a PSA crypto client. This will setup the PSA
crypto server for further calls.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add support for the CortexM optimized implementation of secp256r1
code. It supports:
- import & export
- key agreement
- sign & verify
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since commit 0c23cf94a4 ("include/kernel: check type of object passed
to K_POLL_EVENT_INITIALIZER") it is no longer possible to use arbitrary
type literals with the initializer macro. Misconstructing a k_poll_event
type for test purpose must be done explicitly.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
If POSIX_TIMERS is not configured, there is no reason to
generate syscall headers from posix_clock.h .
Make header generation conditional on POSIX_TIMERS in
this case.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
If an immediate return on error is used, an additional result check in
sample_fetch can be neglected. Since they are now treated as errors,
also changed logging type.
Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
When invoking cmake/llext-edk.cmake, CMakeLists.txt was sending the list
of includes as a colon separated list. On Windows, this list was
actually a single item, so it wasn't being parsed properly.
This patch sends the list as a cmake list and uses separate_arguments()
on the receiving side to fix it.
Fixes#73069
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
A variable called llext_cflags was mixed up with another called
LLEXT_CFLAGS, and that caused some host directories to end up leaking
unnecessarily into the EDK.
Fix by using only the lower case version.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Remove unused includes and gpio pins from st7796s driver, which were
leftover from before this driver used the MIPI DBI API class.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Indicate KConfig and enum value changes with respect to new inclusive
term in eSPI specification 1.5.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Replace CONFIG_ESPI_SLAVE by CONFIG_ESPI_TARGET
Replace CONFIG_ESPI_SAF by CONFIG_ESPI_TAF
Replace ESPI_BUS_SAF_NOTIFICATION with ESPI_TAF_BUS_NOTIFICATION in API
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Update NXP flash debug probes section, to attempt to clarify the
differences between OpenSDA, LPC-Link2, and MCU-Link probes.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
If the new encryption state is the same as the old one, there's no point in
doing additional processing or callbacks. Simply log a warning and ignore
the HCI event in such a case.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
I just wasted dozens of failed build attempts and more than 5 minutes
staring at this cryptic build error:
```
Traceback (most recent call last):
File "scripts/build/parse_syscalls.py", line 216, in <module>
main()
File "scripts/build/parse_syscalls.py", line 194, in main
syscalls, tagged = analyze_headers(args.include, args.scan,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "scripts/build/parse_syscalls.py", line 118, in analyze_headers
with open(one_file, "r", encoding="utf-8") as fp:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory:
'zephyr/include/zephyr/pm/.#device.h'
```
Because this file didn't show in `git status`, I kept believing that
building from scratch would make it go away.
`git status` should never hide source files that the build system uses.
Maybe `parse_syscalls.py` should be "Emacs-aware"? Or maybe not. As long
as it's not, `git status` must show every spurious file that might
affect the build and break it.
This is the first time that I see an error like this; so Emacs does not
leave files like this behind on a regular basis. Only when there
is a some sort of glitch; and then we definitely want to know about it.
More generally speaking, the choice of an editor is a personal
preference. So patterns matching Emacs files belong to personal
$HOME/.gitignore files; they shouldn't be mass-duplicated into every
single git repo instead. Stuffing every project with editor-specific
configuration of every editor obviously does not scale. But that's
probably for another day.
This is a partial revert of commit 3f4159c5c7 ("gitignore: Ignore
emacs temporary edit files")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Removed the unnecessary initialization of the `ret` variable in
`gpio_stm32_clock_request` where its value is guaranteed to be
overwritten by subsequent operations, then simply returned `ret`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Introduced `GPIO_DEVICE_INIT_STM32_IF_OKAY` which utilizes `COND_CODE_1`
to reduce the chain of #if DT_NODE_HAS_STATUS(...) #endif
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
My students are using a disco_l475_iot1 board with HTS221 sensor.
When logging is enabled, the following log message is always emitted:
"HTS221: Cannot enable trigger without drdy-gpios"
This message is confusing to my students as they are not using the
HTS221 sensor in their projects. However since HTS221 is enabled in
the devicetree it gets initialized on boot and the log message
appears.
It doesn't seem necessary to tell people that they haven't enabled
CONFIG_HTS221_TRIGGER at log level INF. I'd be amenable to changing
this to LOG_DBG, but I don't think it needs to exist at all.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Document the changes coming with the new HCI driver API, and provide
information for how to migrate existing drivers.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Update references to devicetree chosen properties and how devicetree nodes
should be defined in order to enable the new HCI drivers.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Deprecate the bt_recv() and bt_hci_driver_register() APIs. There are no
more users in the tree itself, but we should let any out of tree users
migrate before removing these APIs completely.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Convert the slz_hci.c HCI driver to use the new HCI driver API. This also
fixes the HCI bus type to correctly indicate VIRTUAL instead of UART.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the hci_nxp.c HCI driver to use the new HCI driver API. Also move
the driver binding under dts/bindings/bluetooth, like all other HCI driver
bindings.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the hci_stm32wba.c driver to the new HCI API. Unlike in most cases,
the devicetree node is already enabled on the SoC level (rather than board
level). This is in order to mirror how the Kconfig option was originally
enabled, i.e. on the SoC level.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the spi.c and hci_spi_st.c drivers to use the new HCI driver API.
Both drivers are converted in one go since one derives from the other's
devicetree binding.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
These samples were enabled for an nRF board, even though there is no
upstream support for the feature. Additionally the sample.yaml files
were forcefully disabling any in-tree HCI drivers, making it impossible
to use e.g. qemu with an external HCI controller. Simply remove the nRF
board from the list, as well as the odd Kconfig HCI driver options.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
The CONFIG_BT_NO_DRIVER option will be going away. Use the
CONFIG_BT_UART option instead (selected by UART HCI drivers) to
determine whether to enable the qemu serial port for Bluetooth.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert all Bluetooth tests that define dummy HCI driver instances to use
the new HCI driver API. This requires both a custom DTS binding as well
as an app-specific overlay file.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
With the new HCI driver model it's not always critical if a single
instance fails to initialize. This is especially true for many test
applications which provide their own HCI drivers. Instead of causing a
complete failure, simply fail to initialize the driver instance.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Add support for using an UART instead of the native controller. This is
accomplished with a custom DTS overlay for the tests that require it.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
The drivers should be independent after the move to the new HCI driver
API. Having them as a choice also has unexpected consequences with some
drivers being unexpectedly enabled.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Apps shouldn't try to call bt_recv() since that's not a public API and
is going completely away with the new HCI driver API. Just inject the
buffer directly into the k_fifo which we anyway have access to in this
app.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Update the native controller to the new HCI driver API. The devicetree
node is placed under existing `radio` nodes, which seemed like the most
intuitive option.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the H4 driver to the new HCI driver API. This includes updating
also any boards that use the driver, i.e. adding the appropriate
devicetree node and chosen property to them.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Add support for HCI drivers which use the newly defined HCI driver API.
Since Zephyr (currently) only supports a single HCI driver instance,
boards are expected to indicate the instance using a new devicetree
chosen property `zephyr,bt_hci`.
In order to maintain compatibility with not-yet-converted drivers the
code has been placed behind `#if DT_HAS_CHOSEN(zephyr_bt_hci)`
conditionals.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Add the initial HCI driver header file and driver API definition. This
is distinct from drivers/bluetooth/hci_driver.h in order to support
legacy (unconverted) drivers for the time being.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Add a base binding for Bluetooth HCI drivers. All HCI drivers should
extend this binding (through an include directive) to create their own
binding files.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Update the hal_silabs version. The only change is an added explicit name
for the module, so that it behaves consistently with other HAL modules.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
- Define TSC member role and add rights & responsibilities section.
- Document elected TSC member process
- Document working groups, membership and decision making processes in
TSC working groups.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove display definition from MIMXRT1050 EVK, and document the shields
that can be used with the board's FPC 40+6 pin parallel display
interface.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add a shield for NXP ov5640 camera modules. This shield uses a 44-pin
board-to-board connector which is supported on NXP RT1170 and RT1160 EVKs.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
This prevents accidentally passing the wrong pointer type (e.g. one level
of indirection too many) as the object `void *`.
Co-authored-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
nxp,unique-mac actually is not meant to be universally
unique, the LAA bit should therefore be set, and fix the
description of the property in the binding to clarify
the intended usage of this property.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
- Tests that the API of the uart-emul also works with the async API
- Tests that `uart_emul_set_release_buffer_on_timeout()` configures the
behavior as expected
- The tests are now splited into three different configurations: only
polling API enabled, additionally interrupt driven API enabled and
additionally async API enabled
- Enabled `native_sim` board
Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>
As it is up to a driver implementation if a partial filled buffer is
released, this behavior can be configured during runtime to allow testing
for this edge case.
Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>
This structure is bad style and not needed. Instead get the surrounding
`struct uart_emul_data` with `CONTAINER_OF()` directly.
Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>
Microchip MEC5 HAL version 0.2 standardizes HAL API and register
define names. Updated the SoC common initialization code using
new HAL API names.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Customers requested MEC5 HAL naming standardization.
Version 0.2 of MEC5 HAL completes majority part of
HAL API and register define renaming.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Remove nSIM platform filter for tests/lib/heap. The filter is no
longer needed as nSIM performence was improved and test timeout
was increased because of another platforms.
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Use `do { ... } while (false)' instead of `do { ... } while (0)'.
Use comparisons with zero instead of implicitly testing integers.
Use comparisons with NULL instead of implicitly testing pointers.
Use comparisons with NUL instead of implicitly testing plain chars.
Use `bool' instead of `int' to represent Boolean values.
Use `while (true)' instead of `while (1)' to express infinite loops.
Signed-off-by: frei tycho <tfrei@baumer.com>
Refactored the unicast audio client sample to use a
separate thread for TXing, rather than the system workqueue.
This allows us to do blocking waiting operations like
buf = net_buf_alloc(&tx_pool, K_FOREVER);
and also splits the responsibility of TXing to a new
file as well.
LC3 handling have also been moved to a new file, so
that it does not pollute the source code for non-LC3
supported builds. This also fixes various issues and
improves the LC3 handling in the sample.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The unicast audio server is actually decoding in the RX
thread, and not the system workqueue.
This is a temporary fix, as ideally it would do the
decoding in a separate thread to avoid taking too much
time in the system threads.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
https://github.com/zephyrproject-rtos/zephyr/pull/72674 fixed
a bug where this configuration did not work.
Now that this configuration is tested, we should mark it
as supported.
The timeout check that was present in the code before
was useless and was not working because the check was
run before a default timeout of 0 was converted to a timeout.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Updated the driver to start with a value to compare the counter
with otherwise the counter will not start until the user sets
the top value manually, an issue that will occur inside the counter
test.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Added a single instance lptmr node on the
mcxn947 soc dts. Updated counter lptmr to
have max value property.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
- Optimize slot sizes for MCUBoot swap move algorithm
for mimxrt595/685_evk boards.
- Use DT_SIZE_K/M macros for slot sizes.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
ull_adv_sync_pdu_set_clear does pretty much everything, causing
it to be very complex and awkward to use. In addition, it only handles
a single PDU, meaning callers have to handle the chain.
It has been replaced with simpler, more complete functions for handling
the relevant operations
Fixed issues include:
- Fragmentation of adv data over HCI is now decoupled from PDU
fragmentation, fixing HCI/DDI/BI-13-C, LL/DDI/ADV/BV-26-C and
LL/DDI/ADV/BV-55-C
- Adding BigInfo now preserves the PDU chain
- Enabling periodic advertising with ADI on would sometimes fail
due to insufficient space in a single PDU to add ADI
Signed-off-by: Troels Nilsson <trnn@demant.com>
When dumping logs from the `--inline-logs` option, remove any coverage
information that may be contained in those logs. Coverage dumps are
unrelated to any test failures and make it harder to find the failing
test information. In extreme cases the relevant information is lost due
to terminal scrollback limits.
If the raw dump information is required, it is still present in the
original `handler.log` file.
Signed-off-by: Jordan Yates <jordan@embeint.com>
These macros tend to be defined by too many headers.
Let's guard these definition with ifdefs to avoid
redefining them to practically the same.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
that utilizes the fact that the ldpc recovery matrix is triangular and only
stores the half with non-zero values.
This implementation is hopefully going to make forward error correction
usable on lower memory devices.
Signed-off-by: Lucas Romero <luqasn@gmail.com>
to no longer be a long-lived status variable because we already map it into
is_active and this reduces the number of states the transport can be in.
It also helps us prepare for being able to plug in more decoders by
removing implementation specific bits from the general transport interface.
Signed-off-by: Lucas Romero <luqasn@gmail.com>
Erase and reset must run only once during flashing.
This prevents a situation, where the next flashed image erases the
previous one.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Add support for GPIO controlled disconnect pullups. This is used in F1
based devices, copied from the legacy driver.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
For slow processors it is possible that setting 1 ms alarm and
then canceling it could lead to alarm expiring before it is canceled
and that was not expected in the test. Increasing timeout to 1.5ms.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This driver can be used for both mcux and
s32k series SoCs which have flexio IP.
PWM channel is automatically allocated by
flexio driver based on the available timers.
Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
Enable the mac node along with the necessary pinmuxing to enable the
ethernet and usb hs peripheral. I additionally defined the
`ethernet_phy_en` node the uses a fixed regulator to release
the PHY reset.
Additionally an usb_cdc_acm node was defined to enable serial over usb for
the console.
Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
Enabled the QuadSPI node and necessary pin muxing to enable interfacing
with the external flash chip on the Portenta H7 board. The jedec data was
validated with the samples/drivers/jesd216 project to extract the
JEDEC data.
Additionally added `flash` to the list of ignored tags as the flash driver
should not be built on the M4 CPU domain.
Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
Enabled the flash memory controller node along with the necessary pin
muxing. This allows us to interface with the additional 8MB of external
SDRAM available on the Portenta H7 board.
This has been tested minimally with the tests/drivers/memc/ram test.
Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
Previous clock frequencies were taken directly from the arduino example
and were limited to 96 MHz and 48 Mhz for the CM7 and CM4 respectively.
Updated the clock tree to take advantage of the faster clock speeds.
Introduced two board revisions as revision 1 of the portenta board does
not have the external LSE oscillator populated (default) and version 4.1
onwards does have the external oscillator populated. The user can choose
to build support for the required clock configuration using the revision
scheme built in to west. Updated the docs to reflect the same.
Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
Distinguish between test case dependencies where a board has a test
feature "usbd" and where no dependency is required other than the
devicetree overlay file, as here to build the UDC skeleton driver.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
We have recently added a new platform where the USB controller is only
supported in the new USB device support. This forces us to introduce a
new supported feature tag to distinguish the dependency. Use "usbd",
which is also the prefix of the new device support.
There are many boards that already have new driver support, but we will
replace the "usb_device" feature when the old device support is
deprecated.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Expands driver to cover nRF54L15 features like AIN as GPIO configuration,
new reference voltage, different set of supported gain options.
Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
Fix KSZ8081 binding properties:
- reset-gpios and interrupt-gpios are generally standard
properties and therefore should not be using a special name
- mc, is not the correct vendor prefix for microchip
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Fix simple bus reg / ranges warning from GPIO
nodes by giving the parent nodes addresses
and describing a ranges other than empty.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Clarify eSPI reset bus event convention, which follows eSPI
physical reset pin.
Clarify eSPI OOB packet length expectations for eSPI driver
clients and eSPI drivers implementation
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Updates the `platform: ADI` area to match max32 drivers, dts, and soc
files that were recently introduced.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
On STM32G0, the backup memory is defined as part of the TAMP peripheral.
Use the same workaround as on STM32WL to add the node as part of the
RTC.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
On devices where the backup memory is part of the TAMP peripheral, the
Backup Domain Protection prevents write to the backup registers. This
fix disables the protection before writing registers and re-enables it
afterwards.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Until now, the support for Silicon Labs SoCs is limited to the Gecko
families.
This commit allows upstreaming support for non-Gecko based SoCs produced
by Silicon Labs (i.e. SiM3U1xx).
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Include new AT shell alongside the PM device shell to allow
for powering back up the modem after the sample has completed
to test out the at shell.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add AT shell which uses the newly exposed pipes to
send/receive at commands from the modem identified by the
chosen node zephyr,at-shell.
To send an AT command, the shell command at is used, followed
by the command to send, and an optional response which
overwrites the default "OK"
For example, sending "AT", which returns "OK"
modem at at <- command
OK <- response
Enabling echo, then sending "AT" which will now return "AT" + "OK"
modem at ati1 <- command
OK <- response
at at <- command
at <- response
OK <- response
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add two DLCI channels to the cellular modem driver, and expose
them using the modem pipelink module.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add modem pipelink module which exposes modem pipes globally.
The pipelink module implements a callback to inform when a
pipe becomes available to use by whichever modem is attached
to it. This could be a shell, or a network interface.
The module aims to allow modem drivers to be split into modules,
and allowing applications to implement their own custom logic
without altering the modem drivers.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The preprocessor gives this error when calling zsock_sendto
in user mode when there is a mismatch with amount of parameters
to the sendto wrapper call.
tests/net/socket/udp/src/main.c: In function ‘comm_sendto_recvfrom’:
tests/net/socket/udp/src/main.c:125:46: error: macro "zsock_sendto" \
requires 6 arguments, but only 5 given
125 | 0, &addr, addrlen);
| ^
In file included from include/zephyr/net/socket.h:1381,
from tests/net/socket/udp/src/main.c:15:
include/generated/zephyr/syscalls/socket.h:266: note: \
macro "zsock_sendto" defined here
266 | #define zsock_sendto(sock, buf, len, flags, dest_addr, addrlen)
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If network socket tracing is enabled, then the system will track
various socket API calls for usage.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The clock should be initialised only once at the
drivers init function.
Check wether the subsys needs to be disabled in
peripheral initialization according to reset reason
in clock control.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
Add a __ASSERT_ON guard around slab_ptr_is_good, as that is only used in
assertions and leaving it on seems to generate a build warning with some
clang versions:
kernel/mem_slab.c:207:20: error: unused function 'slab_ptr_is_good'
207 | static inline bool slab_ptr_is_good(struct k_mem_slab *slab,...
| ^~~~~~~~~~~~~~~~
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Handle MPI and root manifest for radio core separately from the main
build system logic.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Introduce a sample for BlueNRG-based devices to support interaction with
ST BlueNRG GUI application based on U(S)ART protocol.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Add API to perform hardware reset optionally entering firmware updater
mode.
Remove redundant declaration for bt_spi_send_aci_config; otherwise, we will
have compiler warning if CONFIG_BT_BLUENRG_ACI is not set.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
this commit introduces a usart pinctrl node to enable the spi functionality
in the efr32_radio board. the location* properties have been deprecated
so pinctrl support has been added in the device tree included file.
Before this commit (using deprecated location properties):
- usart@40010400 (DISABLED)
After this commit (using pinctrl properties):
- usart@40010400 (READY)
Signed-off-by: Arunmani Alagarsamy <arunmani.a@capgemini.com>
This commit fix the mismatch between flash partition labels and node
roles on the efr32xg24_dk2601 board.
Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
Adding bt_tester support.
Adding bt_tester app build
with Twister for frdm_rw612 board
Fix failing tests/samples due to unsufficent MPU ressources
by releasing unnecessary MPU regions.
Twister builds added on peripheral/central ht and
enabled Power manager on those examples to cover
the CI builds with PM enabled.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
- Update Doc with BLE info
- Configure board for BLE
- Add pinctrl for flexcomm0 in usart mode
needed for BLE tester application
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Add build check that would detect unwanted calls
from the `iram0.loader_text`, which is the last
bootloader segment to be alive.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Improve ETSI 303645 layout both for HTML (use more appropriate column
widths) and PDF (use landscape orientation).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
- Optimize slot sizes for MCUBoot swap move algorithm
for frdm_k22f/k64f/k82f, twr_ke18f/kv58f220m,
hexiwear_mk64f12 and rddrone_fmuk66 boards.
- Use DT_SIZE_K/M macros for slot sizes.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
EXPORT_SYMBOL() isn't needed when CONFIG_LLEXT is deselected, it only
needlessly creates objects, that make the resulting image larger.
Make it a NOP when CONFIG_LLEXT=n.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When BCM4 bit is set to zero, the hardware semaphore clock is never
enabled on startup. The hardware semaphores might still randomly work,
but very unreliably, and the locking procedure will need several retries
despite no competition on the hardware semaphores. This leads to wasted
clock cycles on the M4 and sometimes even random kernel panics.
This can be solved by always enabling the hardware semaphore clock in
the init procedure of the M4, regardless of whether it is used within
the initialization or not. On the M7, it is already always enabled.
Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
Replaced tcp_out() with tcp_out_ext() when sending
SYN during tcp connect, so we can intercept error value,
beacuse in such case the packet would not be sent at all
and the stack would not trigger any mechanism to flush
this context so it ends up leaking. These scenarios can
arise when the underlaying interface is not properly
configured or is disconnected. The conn is marked to be
closed and is closed before exiting tcp_in().
Since we can now identify this case we can also exit
early in the net_tcp_connect() function and not wait
for any timeout.
Signed-off-by: Daniel Nejezchleb <dnejezchleb@hwg.cz>
This commit updates migration-guide and release-notes docs with
the changes introduces by PR 71827 and PR 72243.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Found via static analysis. Two separate error paths where failing to
check the return code leads to undefined behavior:
1. In `litex_clk_get_phase`, the divider stays set to 0 when
`litex_clk_get_clkout_divider` errors out, which leads to a division
by 0.
2. In `litex_clk_calc_duty_normal`, the `duty` struct is used
uninitialized if `litex_clk_get_duty_cycle` errors out.
In both case, checking the return code and returning early resolves the
issue.
Signed-off-by: François Baldassari <francois@memfault.com>
Use BLE.ADDR to create unique (to some extent) EUI64
on nRF54H20 in some cases inside the IEEE 802.15.4 driver.
The amount of EUI64-s available in such a way is very limited
(~16 million).
However, currently there does not seem to be another feasible way to
get device identifiers on nRF54H20 (such are kept in SICR, to which the
radio core has no access).
Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
Adds an appropriate condition to the Kconfig as
the temperature driver is not supported for nRF54H20 devices yet.
Without this change, a build with NRF 802.15.4 libraries produces
Kconfig error.
Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
This commit fixes the issue where a serialization
error was reported after properly sending a data with 'icbmsg' backend.
The icbmsg send function's return code is set to
the sent data's len as in other backends.
The related docs were fixed and updated.
Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
Clock_control is currently not supported on nRF54H20.
This commit adds new way of handling the hfclk targeted for nRF54H20.
This solution shall be replaced once the clock_control is supported
for nRF54H20.
Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
Adds channel 15 to the pool of grtc channels available
for allocation (i.e. with 'z_nrf_grtc_timer_chan_alloc')
on nRF54H20.
The change is motivated by lack of available channels
for the nrf_802154_timestamper when building for nRF54H20.
Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
Move STM32_MEMMAP outside of SOC_FLASH_STM32.
That allows memory-mapped application to
be built without internal flash controller.
Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
This commit should deal with adding a missing
direction case as memory-to-peripheral
and peripheral-to-memory transfers
should be considered the same.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should address the #73803 issue
where the DMA node does not provide support
for the #dma-cells binding. Peripherals should
specify one or more DMA channels via the dmas
and optionally dma-names DT properties.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Our documentation uses image formats such as WebP that are not supported
by LaTeX. This commit enables Sphinx's sphinx.ext.imageconverter
extension, and updates the documentation to indicate ImageMagick is
required to build docs.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update the status to maintained, add a maintainer and collaborators, and
also update the label to match the recent spelling change ("SiLabs" ->
"Silabs").
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Add Johan, Jérôme and Aksel to Silabs Platforms. Also update the subsystem
and GitHub label name from "SiLabs" to "Silabs", since this is the more
usual spelling.
Signed-off-by: Aksel Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
In new hardware model, the arch subfolder is no more: updating cmake config
documentation to reflect this change
Signed-off-by: Eve Redero <eve.redero@gmail.com>
Add descriptions for recently introduced IPv4 and IPv6
connectivity events to the net event monitor.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Modify the test cycle routines to verify recently added IPv4- and
IPv6-specific events.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
conn_mgr now fires:
- NET_EVENT_L4_IPV4_CONNECTED
- NET_EVENT_L4_IPV4_DISCONNECTED
- NET_EVENT_L4_IPV6_CONNECTED
- NET_EVENT_L4_IPV6_DISCONNECTED
These events track whether there are any ready ifaces offering
specifically IPv4 or specifically IPv6 connectivity.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Don't track up/down blame separately.
Instead, track a single last-blame iface.
Don't track blame iface inside set_ready.
Instead, track directly inside handle_update.
These two changes will simplify the addition
of blame for IPv4- and IPv6-specific events.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Instead of incrementing and decrementing global counter,
just recompute the ready-count from scratch every time
conn_mgr_mon_handle_update is called.
This will simplify the introduction of additional ready count types.
This should have no externally observable impact on the behavior of
conn_mgr.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
In case of ACD Probe/Announcement, all we need is to generate ARP
packet, we don't really want any cache entries to be created or searched
for. There was a bug, that a cache entry was created for the
Announcement sent, resulting in skipped ARP packet generation and
malformed packet being sent by the ACD module.
Therefore, simplify all this, by simply returning early in case of
conflict detection packets.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The autoconf module can now reuse generic address conflict detection,
which was added for all address types.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case a conflict was detected on a DHCP-assigned address, send a
Decline message to the server and start over.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case IPv4 conflict detection is enabled, monitor network events to
determine whether IPv4 address is ready to use or not, so that the
library returns only after the network setup is fully complete.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Connection manager needs to monitor ACD events as well to determine
whether a preferred IPv4 address is available.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add support for IPv4 conflict detection, as specified in RFC 5227.
The new feature is optional and disabled by default.
Address conflict detection was implemented as a part of the IPv4
autoconf feature can be generalized to be available for all address
types.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When the CONFIG_BOOT_BANNER flag is set to "n", but CONFIG_BOOT_DELAY
is enabled, there is a delay message printed at boot time.
This allows for the whole boot banner to be disabled.
Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
The VDED was adding the channel information per clone. But it could be
done in the original buffer. This commit fixes that by adding the
channel information to the original buffer and not for each clone. As a
result, we have a more straightforward VDED execution with fewer copies.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
Move the audio related files to a new subdirectory called
audio.
The purpose of this is to clean up the file structure a bit,
and also allow for better filtering of the files.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When low power mode is enabled then whenever UARTE is not active,
driver attempts to put the peripheral into the lowest power state
by stopping and disabling UARTE. However, it did not put pins into
sleep state which could lead to increased current consumption.
Adding pins state handling to the low power mode.
Pins are put into sleep state only if CONFIG_PM_DEVICE=y.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
In function pcal64xxa_process_input, lock was not released in case of
error when calling inputs_read.
This was causing an infinite wait in the following calls of functions
using I2C bus.
Signed-off-by: Vincent Geneves <vgeneves@kalray.eu>
Add a symbol to enable device power state constraints this
saves resources when this feature is not needed.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Test that device pm state constraints work as expected.
It declares a device in DT that specify that two pm states cause
power loss and use this information when the device is in the middle
of an action.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Declare power state constraints for a device in devicetree.
It allows a map between device instances and power states that disable
their power. This information is used by a new API
(pm_policy_device_power_lock_put/get) that automically set/release
pm state constraints.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Removed an unnecessary cast to void * from a function that already
had the correct signature.
This makes for more portable code as casting between code and data
pointers are frowned upon by the C standard.
Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
Remove pre hardware model v2 overlays present for RT11xx boards, that
were missed in the HWMv2 migration
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
In commit a30c5731ae (tests: drivers: can: api:
support numaker_m2l31ki, 2024-05-31), CONFIG_USERSPACE was disabled for
the numaker_m2l31ki. This fix is valid to support running the CAN API
testsuite, but Zephyr's infrastructure does not properly support
disabling userspace at the board level.
As a temporary workaround, reenable userspace to fix failing CI tests
on this board.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Replace the leftover `&&` operator with UTIL_AND(), so that this DT API
can be evaluated at C preprocessor time.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Abstract slab pointer validation and apply it to block dequeue during
allocation in addition to the existing block freeing. This should help
catching some buffer overflow induced corruptions.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
As it is, blocks are allocated going backward within the buffer.
There is nothing fundamentally wrong with that, but it makes debugging
unnatural with the successively descending addresses. Create the free
list so pointers are oriented forward, at least initially.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This macro allows to know the size of a struct member at compile time.
Several parts of the Zephyr code are currently using directly the macro
code.
Also added a unit test.
Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
Unmount and remount filesystem during init, to verify that filesystem
remount works as expected.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Make call to de-initialize disk in fatfs_unmount(). This will permit the
disk to be reinitialized when it is mounted with fatfs_mount().
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add DISK_IOCTL_CTRL_DEINIT ioctl command to disk subsystem. When
disk_access_ioctl() is called with this command, the disk will be
de-initialized. After this IOCTL completes, the disk can safely be
reinitialized.
Fixes#60628
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add DISK_IOCTL_CTRL_INIT IOCTL to initialize a disk. This IOCTL is
intended to replace disk_access_init() for new applications, but
disk_access_init() is kept for legacy compatibility. The INIT IOCTL is
added to better match the path that will be used for disk
de-initialization. Like the disk_access_init() calls,
DISK_IOCTL_CTRL_INIT calls are reference counted
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Reference count initialization calls for disks. This changes the
behavior of the disk_access_init() function, such that disks will no
longer be initialized again if the first disk access init call
succeeds.
Disk access is reference counted in preparation for supporting disk
de-initialization, where a balanced number of disk de-initialization
calls with disk initialization calls will de-initialize the disk.
Also, remove code in disk drivers that was already checking against
duplicate disk_access_init() calls.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit moves ELF loading and linking code to separate files. This
is done to make the code more manageable and to make it easier to add
new features in the future.
No functional changes are introduced by this commit, except for a few
static functions now made public to allow this file split to occur.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Move all memory management code to a separate file, llext_mem.c, to
allow for better separation of concerns and to make the code more
readable.
No functional changes are introduced by this commit.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This patch moves the initial checks performed on the ELF file, that were
split between llext_load() and do_llext_load(), to the newly defined
llext_load_elf_data() function.
This way:
- only one function deals with ELF internal data checks;
- do_llext_load() is reduced to a list of tasks;
- llext_load() only focuses on the extension management.
One totally misplaced line initializing the number of symbols has been
moved to llext_count_export_syms().
No functional change except that the `struct llext` allocation may be
performed unnecessarily if the ELF file is not valid.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add llext_alloc(), llext_aligned_alloc() and llext_free() wrapper
functions to manage memory allocation and deallocation from the llext
heap. Also add a helper to free all memory regions allocated by an
extension.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Use lower IRQ proirities for SoC peripherals, example UART,
to reduce ISR latencies on the IRQs processed by the
Controller.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use the compatible kconfig option so that for the simulated
nRF54L15 we build the same code as for the real platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the Nordic HW, the BT_CTLR_DATA_LEN_UPDATE_SUPPORT
does not require CCM HW enabled, hence support Data Length
Update if Encryption Support is disabled.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
In some nRF54 devices, DATAWHITEIV was renamed to
DATAWHITE,
and the CRCCNF SKIADDR field was renamed OFFSET.
The nrf HAL hid this change internally,
so let's use it so we don't need to ifdef these
in the Bluetooth Controller HAL code.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add preliminary support for nRF54L15 SoC. This commit does
not support Controller Random Number Generation and
Controller Cryptography (AES-128 encryption) commands, nor
does it support encrypted connections.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use NRF_RTC and NRF_RADIO_SHORTS_TRX_END_DISABLE_Msk instead
to prepare towards using configurable use of RTC and Radio
hardware defines.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add unit tests to cover explicit LLCP error code check and
cover the same in the Controller implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
A Host shall consider any error code that it does not
explicitly understand equivalent to the error code
Unspecified Error (0x1F).
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Introduce BT_CTLR_CRYPTO_SUPPORT so that preliminary port to
support nRF54L15 SoC can be upstreamed without encryption
support.
ENTROPY_GENERATOR now selected when BT_CTLR_CRYPTO enabled.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Does not make much sense to ship the project with a config that by
default print a warning for a not-yet-deprecated feature. Let's drop it
for now, we can reintroduce it once the default is changed.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
fixed usage of wrong C roles (e.g. `:c:struct:` instead of `:c:type:`)
which Breathe tolerates but can cause trouble when using other systems.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
When CP has a secure channel active, it should never receive a
REPLY_CCRYPT or REPLY_RMAC_I. Since these responses change the SC state,
let's also make sure that they are accepted only when they are
expected: in response to commands CMD_CHLNG and CMD_SCRYPT respectively.
Reported-by: Eran Jacob <eran.jacob@otorio.com>
Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
Adds support for WaveShare's 2.13in epaper display
with the ssd1680 display driver.
Good Display part number gdey0213b74
Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
Update SPI documentation for longan_nano. In longan_nano board, spi1
is connected to sdhc0. Verified the functionality using
"samples/subsys/fs/fs_sample".
Fixes: #64759
Signed-off-by: Maxin John <maxin.john@gmail.com>
BT_GAP_ADV_SLOW_INT_MIN and BT_GAP_ADV_SLOW_INT_MAX represent 1s and 1.2s,
respectively, in the extended advertising context, where the bit interval
is 0.625 ms. Using them for periodic advertising will result in a range
of [2s, 2.4s], as the bit interval for periodic advertising is 1.25ms.
Instead, BT_GAP_PER_ADV_SLOW_INT_MIN and BT_GAP_PER_ADV_SLOW_INT_MAX
should be used in this sample, and the range will become [1s, 1.2s].
Signed-off-by: Yuxuan Cai <yuxuan.cai@nordicsemi.no>
Configure the DTS to increase the sysclock to its max value
480MHz for the nucleo_h743zi and nucleo_h753zi boards
Max Hclock is 240MHz
The Pll source is HSE is 8MHz clock source from the STLink.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The sample won't build with PSA crypto enabled on non-secure platform,
causing disturbances in the CI.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
A few samples were not limiting the CI execution scope in any reasonable
way, they should at least limit the execution to platforms that support
netif capability.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
While Breathe seems to not care and creates hyperlinks either way, the
proper role to mention a C enumerator is :c:enumerator:. :c:enum: is to
be used to refer to the enum itself.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update the EDTT module to:
8d7b543d4d2f2be0f78481e4e1d8d73a88024803
Including the following:
* 8d7b543 Fix some issues found during CIS Central testing
* fb426f1 Fix crash due to race when creating simulation folder
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Includes just changes for the phy dump conversion scripts,
to add support in the csv2pcap conversion for coded phy.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Channels owned by a child core shall also be included in the mask of
used channels (channels that cannot be allocated by the GPIOTE channel
allocator).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Adds a note that these instructions have been removed and list
the available replacement tools
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Removes references to old tool documentation and refers users to
the list of supported applications instead
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The go tool documentation is very old, and the tool is not
recommended for use, therefore remove all documentation relating
to it to prevent people from using it
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
While Breathe seems to not care and creates hyperlinks either way, the
proper role to mention a C enumerator is :c:enumerator:. :c:enum: is to
be used to refer to the enum itself.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Allow changing the target server address on interoperability
tests.
This allows running same testcases against public Leshan
instance. It is a first requirement to run same tests
on a real HW.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When the broadcast source unexpectedly disappears then the broadcast
sink does a remove source command and resets.
Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
This commit adds host support for the Path Loss Monitoring
feature see Bluetooth Core specification, Version 5.4,
Vol 6, Part B, Section 4.6.32.
Limited logic is required, just adding a wrapper around the
HCI command and callback for HCI event.
Add new zone - BT_CONN_LE_PATH_LOSS_ZONE_UNAVAILABLE, to
convert 0xFF path loss to a useful zone.
Add new Kconfigs and functionality to the bt shell.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Restructure the Contribution Guidelines page in the documentation.
Create the 'Pull Request Guidelines' section containing the best
practices for creating Pull Requests.
Improve commit message guidelines: instruct contributors to refer to
GitHub issue in the PR message instead of commit message when
submitting a fix; add a description of `Link:` tags for refering to
other relevant information.
Move 'clang-format' and 'twister' subsections to the new PR
Guidelines section.
Delete outdated/incorrect information about how to run tests locally
with twister.
Describe the `check_compliance.py` script as the recommended tool for
checking compliance of changes and how to run the script locally.
Remove 'gitlint' subsection.
Add a list of recommended steps for getting a new PR accepted quickly.
Signed-off-by: Gustavo Silva <gustavograzs@gmail.com>
Enable execution of ADC driver tests on nrf54l15.
Overlay file for nrf54l15 already exists.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
A custom reset scheme is required for the nRF54H20 SoC so that debug
works out of the box. This magic will eventually be part of JLink.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Fix Doxygen comment for shell_mqtt_get_devid which contained a funky
Unicode char (U+FF08) for a left parenthesis that can cause issues with
some documentation tools.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The existing code in the cap_stream.c that handled the
check before calling CAP initiator unicast functions
seemingly did not work for x86 targets such as native_sim
or native_posix.
Modified the check so that IS_ENABLED is used directly.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Align the name of the ETH PTP Config Status values
depending on the stm32HAL serie
to be the HAL_ETH_PTP_NOT_CONFIGURATED/HAL_ETH_PTP_CONFIGURATED
or HAL_ETH_PTP_NOT_CONFIGURED/HAL_ETH_PTP_CONFIGURED
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Update the HW models module to:
6c389b9b5fa0a079cd4502e69d375da4c0c289b7
Including the following:
* 6c389b9 PPI (52): Connect CCM TASK_RATEOVERRIDE
* 2056253 CCM: Change TASK RATEOVERRIDE warning to info
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The following configuration options:
SYS_CLOCK_HW_CYCLES_PER_SEC
SYS_CLOCK_TICKS_PER_SEC
should get their values according to lp_clock node's
clock-src property.
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
Introduced temporary variables `buf0_xor` and `buf1_xor` to store
XOR results and added an explicit cast to `uint16_t` for
the `*len` variable.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Correct the boundary condition in `fcb_put_len` function to
properly include `FCB_MAX_LEN` and change the #define to address
the potential flaw where `CHAR_MAX` might be treated as unsigned by
the compiler flag `-funsigned-char`, which would yield `FCB_MAX_LEN`
to 0x7fff instead of 0x3fff.
Fixes#73868
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
adsp_memory.h is pretty much the same for all ace platforms.
Generalize it getting register address from devicetree and
and move it to a common place.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The assert was verifying that the current sensor address was greater
or equal than the start of the iterable section - 1 which isn't quite
right as the start is inclusive.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Adjusted the board's device tree after ENET_1G compatible changed
from "nxp,kinetis-ethernet" to "nxp,enet1g".
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Support NXP ENET_1G on mimxrt1170_evk/mimxrt1176/cm7 platform.
Added test configuration sample.net.zperf.nxp_enet1g and
documented the usage of the ethernet driver with ENET_1G
peripheral.
Fixes: #66348
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Add driver for Realtek RTL8211F 10/100/1000M ethernet PHY.
This driver implements vendor specific behaviour like
detecting link state change by GPIO interrupt, which is not
present in the generic MII driver.
Fixes: #66348
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Add a kconfig preprocessor function to check if
any node of a certain compatible has a specific property in DT.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
- Added nxp,enet1g compatible to distinguish between ENET (nxp,enet)
and ENET_1G (nxp,enet1g) peripherals within the same driver.
- Added config ETH_NXP_ENET_1G to enable 1G mode of operation on ENET_1G.
- Support RGMII mode of connection between MDIO and PHY to be
able to work with ENET_1G peripheral and support 1000M speed.
- Removed performing of PHY reset before configuring link - it is
not desirable for RTL8211F PHY connected to ENET_1G on RT1170.
Reset of other PHYs can be performed by PHY driver itself if required.
Fixes: #66348
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Add option for RGMII connection type between the MAC and the PHY
device into the ethernet controller binding.
Fixes: #66348
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Add ENET_1G clock value to the RT11XX CCM version.
Implemented enabling ENET_1G clock and getting its frequency.
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
New Twister option `--footprint-report` is introduced to collect and
write detailed memory footprint results for symbols as an additional
JSON file. By default, the new option is disabled.
The new option implies and extends `--create-rom-ram-report`, so there
are three choices: 'ROM', 'RAM', and 'all' to select what memory area
symbols to report in `twister_footprint.json`.
In case of the custom report name, or per-platform report, it is always
composed with the rightmost '_footprint.json' suffix.
The memory footprint report has similar structure as `twister.json`
and compelements it having reduced set of test suite properties:
- instead of `testcases` it contains `footprint` object with
`rom.json` and `ram.json` artifacts embedded there;
- other properites are limited to represent only the essential test
suite context, thus to allow further data processing consistently
and independently from the `twister.json`.
- 'filtered' test instances are not included into the footprint report.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
When Twister composes resulting twister.json reports, add optional
filtering by a test instance resulting status and/or its individual
properties to be allowed/denied on output to the JSON file.
This internal feature is introduced to facilitate JSON reports with
a custom data schema.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Introduce driver for ov7670 camera, supporting QCIF,QVGA,CIF, and VGA
resolution in YUV and RGB mode.
Support was verified on the FRDM-MCXN947, using the SmartDMA camera
engine, which is enabled in the following PR:
https://github.com/zephyrproject-rtos/zephyr/pull/72827
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Remove CONFIG_NO_PBKDF2 and CONFIG_NO_CONFIG_BLOBS definition
and let them be decided in kconfig.
CONFIG_NO_PBKDF2 is default y when crypto backend is
WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE.
CONFIG_NO_CONFIG_BLOBS is default y when both DPP and enterprise disable.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Add Platform Secure Architecture support support to use
HW acceleration, which needs to be called under PSA driver wrapper
in mbedtls 3.x.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Add kconfig CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT to get more mbedtls
functionality for enterprise and DPP.
Split cmake sources related to hostap SME and crypto backend.
Default backend CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO use internal crypto
and some mbedtls apis.
Backend CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT use most mbedtls apis
and PSA apis, except some apis no longer supported in mbedtls 3.x,
or called in the middle of hostap and mbedtls.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Clarification of reviewer expectations and role. Emphasis
on clarifying when a PR can be closed.
Highlighting reviewers and assignee objective to guide PR
to a mergeable state, if possible.
Signed-off-by: David Leach <david.leach@nxp.com>
Previously, one-line changes were tagged as "Trivial".
The description of the "Trivial" label states:
"Changes that can be reviewed by anyone, i.e. doc changes, minor build
system tweaks, etc.".
Just because a change only affects a single line of code, it does not
mean that it is a trivial change. It may have difficult to understand
implications which require approval of the responsible maintainer.
For this reason, change the label to "size: XS" and let humans judge
if a PR is trivial or not.
Signed-off-by: Martin Jäger <martin@libre.solar>
This reverts commit 99aa65c725.
With this change, various simulators fail with no output with this
change.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This sets CONFIG_MAX_THREAD_BYTES to 3 as the tests need a few
more bits to build for board intel_adsp/ace30_ptl.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This sets CONFIG_MAX_THREAD_BYTES to 3 as the tests need a few
more bits to build for board intel_adsp/ace30_ptl.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This sets CONFIG_MAX_THREAD_BYTES to 3 as the tests need a few
more bits to build for board intel_adsp/ace30_ptl.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This sets CONFIG_MAX_THREAD_BYTES to 3 as the tests need a few
more bits to build for board intel_adsp/ace30_ptl.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The byteSENSI-L is a fun LoRa device based on nRF52 MCU that integrates
many sensors.
Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
Define the configuration to run the code_relocation
application on the external memory dual quad flash
of the stm32h745i/stm32h750b disco kits in XIP
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Change the board.cmake to add the external loader option
to the STM32CubeProgrammer to flash the external NOR
flash and internal memory
The address of the external flash is not needed
when flashing a hex file.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Change the board.cmake to add the external loader option
to the STM32CubeProgrammer to flash the external NOR
flash and internal memory
The address of the external flash is not needed
when flashing a hex file.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Configure the quad-spi in DualFlash Mode when enabling the MemoryMapped
then reading is possible with memcopy.
DUAL flash mode is possible on stm32 series with QUADSPI_CR_DFM
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Configure the quad-spi in DualFlash Mode
This property of the stm32 boards will access simultaneously
two identical quad-flash external memories connected to
2 quad-spi banks (pins).
Dual Flash Mode is possible on stm32 series with QUADSPI_CR_DFM
Signed-off-by: Francois Ramu <francois.ramu@st.com>
A single trigger of the TASK_FREQ_CHANGE task might not be enough, so
trigger twice to make sure the frequency gets updated.
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Get the flash device from the node compatible, instead of an alias.
This removes the need for the `spi-flash0` alias on every board with one
of these drivers.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Update the sample to use a camera shield with a camera chosen node.
This is not only because the camera nodes in the mimxrt1064 device
tree has been now moved to a separate mt9m114 shield but also to
make the sample more generic.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The default resolution of mt9m114 camera is now changed to 480x272.
Update the sample documentation to reflect this change.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Use poll() to wait for connect attempt to complete or timeout. That way
connect() does not block Native Simulator on host syscall.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
So far only a single blocking API could be handled simultaneously, due to
epoll_ctl(..., EPOLL_CTL_ADD, ...) returning -EEXIST when same file
descriptor was added twice.
Follow 'man epoll' advice about using dup() syscall to create a duplicate
file descriptor, which can be used with different events masks. Use such
duplicate for each blocking API except ioctl() (for handling Zephyr poll()
syscall).
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Introduce nsos_poll_if_blocking(), which replaces common code in:
* nsos_accept_with_poll()
* nsos_recvfrom_with_poll()
This will allow to introduce similar behavior for other blocking APIs in
subsequent commits.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Add devicetree nodes for the two FlexCAN instances present on the
MCXN94x. Only CAN classic is enabled for now due to issues with FlexCAN FD
in relation to the implementation on this SoC.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
When the encoder button was pressed, it would send a LV_KEY_LEFT/RIGHT
instead of a LV_KEY_ENTER event.
This clears the enc_diff field, and set the key field to LV_KEY_ENTER
for button events.
Fixes#73529
Signed-off-by: Lorenz Clijnen <lorenz_reclame@outlook.be>
On nRF54H20DK the USB PHY is powered from VBUS. When the USB cable is
not connected, the PHY is not powered and the PHY clock disappears.
Because the GOUTNAKEFF and INEPNAKEFF can only ever be set when PHY
clock is active, the waits for these bits do timeout if cable is
disconnected. Workaround the issue by aborting the wait if vendor quirk
indicates that PHY clock has abruptly vanished.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The original driver has two defects: 1. When setting the next timeout
value the original implementation simply sets a delta value equal to
ticks * CYC_PER_TICK. This operation is reckless and may incorrectly
"reset" the fractional tick, causing clock skew. 2. The original
implementation doesn't handle the counter overflow situation. When the
counter overflows from 0xffffffff to 0x0, the uptimer counter becomes
incorrect. We have fixed above issue by rewriting most of the functions in
this driver and verified it by running all tests under
tests/kernel/timer folder.
Signed-off-by: Zhengwei Wang <zwang@ambiq.com>
- Optimize slot sizes for MCUBoot swap move algorithm
for mimxrt1160/70 boards.
- Use DT_SIZE_K/M macros for slot sizes.
- Limit mcuboot max size to 128KB.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
As far as I can tell it appears that the hardware
does not support acceleration of ICMPV6 checksums.
For now, the easiest way to fix the runtime failure of
IPV6 is just to disable the hardware acceleration if
IPV6 is expected to be used.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Handling of board changes was broken and did not support v2 boards, fix
this to optimize CI execution on localized changes of board files.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The test is broken in CI because the emulated spi bus is not built in,
adding an explicit CONFIG_EMUL=y to the test config.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add devicetree nodes for the Reset Information registers on nRF54H20,
along with a new binding.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Remove dead code that cannot be enabled.
Kconfig prevents us from enabling PM_S2RAM on 53 because it is not
supported any more.
But we still have some dead code left over in soc.c, so we delete this
code.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The doc comment relating to mpsc atomics was worded poorly. Remove
the poorly worded doc comment related to atomics and caches.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Moves the rtio_ prefixed lockfree queues to sys alongside existing
mpsc/spsc pbuf, ringbuf, and similar queue-like data structures.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Previously, dtlib would fail to parse the following:
/delete-node/ &{/};
This is accepted by dtc, so dtlib should be aligned.
The expected behavior is that the contents of the "deleted" root node
are emptied, but the node itself remains in the tree. This means that
it's possible to put that statement at the end of a DTS file and still
get a valid output. A small test case for this scenario is included.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Add the test cases for Sensing(Sensing Subsystem) to verify the
functionality of sensing portion of subsystem.
The test cases are based on native_sim platform.
Signed-off-by: Qianru Huang <qianru.huang@intel.com>
Introduce the stm32h7s78_dk disco kit from STMicroelectronics
Based on the stm32H7S7 mcu
Use STM32CubeProgrammer v2.16.0 as runner.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Introduce the stm32h7RS serie to the gpio driver,
based on the stm32h7
The SBS controller is used to configure the EXTI line among
the different GPIO port.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Introduce the stm32h7RS serie to the pin control driver,
New GPIO port M, N, O, P
Then add the complete list and from A to P (16 port
coded on 5 bits)
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Introduce the stm32h7RS serie to the clock_controller,
based on the stm32h7 clock driver
Datasheet DS14359 rev 1 gives CPU max freq of 500MHz
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the new stm32h7rs serie with stm32H7R3, stm32H7R7,
stm32H7S3, stm32H7S7 devices from STMicroelectronics
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the support of the STM32H7RSX to the
include/zephyr/dt-bindings/reset/stm32h7_reset.h
which differs from the stm32h7 with an APB5 bus
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Introduce the stm32h7RS serie to the clock rcc controller,
and the exti interrupt controller based on the stm32h7 rcc bindings.
Three PLL clocks are available.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the new STM32HRSX serie with stm32H7R3, stm32H7R7,
stm32H7S3, stm32H7S7 devices from STMicroelectronics
Same MPU regions as stm32h7 device.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the property of drive-strength to drive a high or low current
selection. If this property is not configured, it is the default
setting. According to the SPEC, the default drive current selection
varies from different pins.
Define the high level 0b: 8mA
low level 1b: 4mA or 2mA
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Add support for configuration of the ARM PLL on the iMXRT1170/1160
series SOCs. This PLL is used to generate the M7 core frequency, and is
an integer pll. Provide default configurations for the RT1160 and RT1170
targeting 600MHz and 1GHz respectively.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
RW612 board overlay should remove the MIPI DBI nodes defined at the
board and at the shield level, because the LCDIC peripheral on this SOC
can support the MIPI DBI protocol directly without the emulated Zephyr
driver.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Previously the schedule_next_timeout() function was feeding the hardware
watchdog irrespective of whether or not it was started. This is now
fixed.
Signed-off-by: Balaji Srinivasan <balaji.srinivasan@nordicsemi.no>
Calculate and set a proper Transceiver Delay Compensation Offset (TDCO)
based on FlexCAN FD timing.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add testcases for rk043fn02h_ct and rk043fn66hs_ctg shields to display
and LVGL samples, so these testcases will be built by CI.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Remove display definition for the RT1060 EVK. This display panel is now
supported as the RK043FN02H-CT shield. Add this information to the
documentation for the board, along with other tested shields.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add a shield for the RK043FN66HS-CTG panel, a Rocktech display panel with
an GT911 touch controller. This panel uses a 40+6 FPC interface for
parallel displays, which is supported by many NXP iMX RT EVKs.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add a shield for the RK043FN02H-CT panel, a Rocktech display panel with
an FT5336 touch controller. This panel uses a 40+6 FPC interface for
parallel displays, which is supported by many NXP iMX RT EVKs.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Define parallel and i2c FPC display interfaces for the RT1060 EVK. These
interfaces are used by multiple displays for the EVK.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add bindings for nxp display interfaces. These bindings describe the 6
and 40 pin FPC connectors used for displays on several NXP EVKs using
gpio nexus nodes.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Rename the POSIX_RWLOCK_INITIALIZER back to PTHREAD_RWLOCK_INITIALIZER.
This was changed in 70e2b02c8e, but PTHREAD_RWLOCK_INITIALIZER is the
standard name used by external libraries.
Change it back to restore compatibility.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Looking to expand the sensor docs and break out significant sections.
First though to move this to a directory to allow for multiple sensor
related rst docs.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Make sure Twster DeviceHandler serial-pty process is terminated
with all its remaining children to avoid Twister hanging on it
infinitely.
The reolved issue occurs sometimes, for example when serial-pty
script is used for serial port tunneling over network.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
The simulated targets support the same power levels as the
real targets. Let's correct the kconfig dependencies
accordingly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Adds necessary overlay nucleo_h533re in rtc_api test case
to enables the board.
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
This sample demonstrates how gpio pins can be used to power on
the system after a Poweroff, just like a reset pin.
The user only needs to add the STM32_GPIO_WKUP flag to the gpio pin
in "gpios" property of a DT device such a button or a sensor.
The samples Powers off the system after a delay then the user can power it
on with the user button that has the STM32_GPIO_WKUP flag in DT.
Only works on STM32 boards that support Zephyr POWEROFF
(U5, WL, WB, & L4 SoC series), & also have a user button whose GPIO pin
is associated with a wake-up pin (see PWR node in SoC dtsi file).
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Complete wake-up pins configuration before powering off
the system when the CONFIG_STM32_WKUP_PINS flag is enabled.
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Introduce a custom STM32_GPIO_WKUP GPIO flag.
Use the newly introduced stm32_pwr_wkup_pin_cfg_gpio() public
function to configure GPIO pins, that have the STM32_GPIO_WKUP
flag in DT, as sources for STM32 PWR wake-up pins, on the condition
that there is a wake-up pin that corresponds to each of them.
These GPIO pins can then be used to power on the system after Poweroff
like a reset pin.
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Introduce public functions for GPIO pins configuration as sources for
STM32 PWR wake-up pins, in stm32 drivers & routines such gpio_stm32
& poweroff.
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Implement GPIO pins configuration as sources for STM32 PWR wake-up pins
behind the scenes exclusively from devicetree information for all series
using the public stm32_pwr_wkup_pin_cfg_gpio() function.
Introduce macros for parsing & storing DT wake-up pins config in C structs.
Introduce user-configurable STM32_WKUP_PINS Kconfig flag.
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Add devicetree node of stm32 PWR peripheral that controlls wake-up pins.
The new node includes child nodes for wake-up pins configuration.
We only add these nodes for STM32 SoC series that support Poweroff.
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
Add DT binding for stm32 PWR peripheral that controlls wake-up pins.
This binding primarily introduces wake-up pins configuration in
a unifed way that takes into consideration the variations between
STM32 SoC series & facilitates the association of GPIO pins with
their corresponding wake-up pins.
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
This change removes the BT_LE_PER_ADV_OPT_USE_TX_POWER option for
extended advertisement in BLE Audio PTS tests.
The Broadcaster setup options was hardcoded to include the
BT_LE_PER_ADV_OPT_USE_TX_POWER option. This causes incompabilities
for any controller not support it, and since the option is not
required for the audio tests it should not be used here.
signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
CI reports error:
kconfigfunctions.py:143:11: E0601: Using variable 'edtlib' before
assignment (used-before-assignment)
Initialize edtlib to none when there is no edt.
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
Introduce dt_node_ph_prop_path function.
It takes a node 'path' and a phandle property name
and returns the path to the pointed-to node.
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
Remove the deprecated CAN controller properties "bus-speed" and
"bus-speed-data" and rely on the Kconfig defaults.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
When we receive CoAP packets, it is in input buffer
that is size of NET_IPV6_MTU.
So in reality, we can handle bigger Block-Wise writes
than CONFIG_LWM2M_COAP_BLOCK_SIZE.
So if parsing of CoAP packet has passed, continue
with the same block-size instead of going to default.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Rename the "bus_speed" and "bus_speed_data" fields of struct
can_driver_config to "bitrate" and "bitrate_data" to match the
corresponding devicetree properties and the terminology used in the rest of
the CAN subsystem API.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Deprecate the CAN controller bus-speed/bus-speed-data properties and rename
them to bitrate/bitrate-data to match the terminology used in other CAN
devicetree properties and the CAN subsystem API.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
SPIM12x instances can perform DMA only from memory region
that is cacheable by default.
SPIM12x instances pins are configured via CTRLSEL mechanism,
which prevents the GPIO registers from ensuring correct bus
state when peripheral does not drive the bus lines.
External configuration of SPIM12x ENABLE register fixes this issue.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Updated hal_nordic revision brings update to nrfx SPIM driver,
allowing external configuration of ENABLE register needed
to mitigate SPI bus glitches when using CTRLSEL pins.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Chip Select signal must be deactivated only after transaction
is finalized. In async case this means it cannot be done from
`transceive` call context, as this context is left as soon as
transfer is initialized.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
In test cases checking async API, use async API
for both controller and peripheral devices.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
This memory region is used for not only but also DMA transfers
of the fast peripherals.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Memory region defined in devicetree can have attributes
that are not intended to be parsed by MPU library,
but might be valid for other components.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Fix error due to compatible string changing in DT and
forgetting to update this driver with the change.
Also make the counter symbol hidden.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
As of Mbed TLS 3.6 (which is the currently used version in Zephyr)
Blowfish, ARC4 and MD4 are no more supported so existing kconfigs
have no effect at all. Moreover they are not even used anywhere
in Zephyr.
This commit just removes them all and it also updates the migration
guide document.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
DMA_INTEL_ADSP_HDA_TIMING_L1_EXIT should be set by default
for both Intel ACE15 and ACE20 platforms.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Filtered testcases are removed by default from Twister tests.
Older functionality is preserved via a new Twister flag:
--report-filtered.
Old tests were adjusted and a new test for that flag added.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Minutes and hour values are incorrectly compared with MAX_SEC.
Compare minutes and hour to MAX_MIN and MAX_HOUR respectively.
Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
Legacy shim takes less flash so it should be a first choice on cores
with less code memory (like RISCV cores on nrf54h20). Adding new
instances support to the legacy shim.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit updates the CI workflows to use the CI image v0.26.13, which
includes Zephyr SDK 0.16.8.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Before that fix, the SOC was unable to boot properly.
Starting turned directly into z_arm_usage_fault().
Fixes zephyrproject-rtos#73485
Signed-off-by: Sven Ginka <sven.ginka@gmail.com>
This commit reduces the parallel job count for building the documentation
from the default value of 16 (i.e. `-j auto` aka. the vCPU count) to 14
because the total available RAM in the runners is 32GiB and each
sphinx-build process may use more than 2GiB of RAM, which can lead to
out-of-memory conditions.
Note that the HTML doc build process was parallelised prior to this change
in spite of the lack of `-j auto` in the CI workflow because the default
`SPHINXOPTS` includes `-j auto` and only `SPHINXOPTS_EXTRA` was specified
-- this commit explicitly adds the `SPHINXOPTS` for it with the default
value specified in doc/CMakeLists.txt to make the job count configurable
while ensuring the previous behaviour is preserved.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Updates the sof revision. This is needed for it to pick up a
change to the arch_sched_ipi() which has been renamed to
arch_sched_broadcast_ipi().
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Platforms that support IPIs allow them to be broadcast via the
new arch_sched_broadcast_ipi() routine (replacing arch_sched_ipi()).
Those that also allow IPIs to be directed to specific CPUs may
use arch_sched_directed_ipi() to do so.
As the kernel has the capability to track which CPUs may need an IPI
(see CONFIG_IPI_OPTIMIZE), this commit updates the signalling of
tracked IPIs to use the directed version if supported; otherwise
they continue to use the broadcast version.
Platforms that allow directed IPIs may see a significant reduction
in the number of IPI related ISRs when CONFIG_IPI_OPTIMIZE is
enabled and the number of CPUs increases. These platforms can be
identified by the Kconfig option CONFIG_ARCH_HAS_DIRECTED_IPIS.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
The CONFIG_IPI_OPTIMIZE configuration option allows for the flagging
and subsequent signaling of IPIs to be optimized.
It does this by making each bit in the kernel's pending_ipi field
a flag that indicates whether the corresponding CPU might need an IPI
to trigger the scheduling of a new thread on that CPU.
When a new thread is made ready, we compare that thread against each
of the threads currently executing on the other CPUs. If there is a
chance that that thread should preempt the thread on the other CPU
then we flag that an IPI is needed for that CPU. That is, a clear bit
indicates that the CPU absolutely will not need to reschedule, while a
set bit indicates that the target CPU must make that determination for
itself.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
1. The flagging of IPIs is moved out of k_thread_priority_set() into
z_thread_prio_set(). This allows for an IPI to be done for a thread
that had its priority bumped due to the handling of priority
inheritance from a mutex.
2. k_thread_priority_set()'s check for sched_locked only applies to
non-SMP builds that are using the old arch_swap() framework to switch
between threads.
Incidentally, nearly all calls to flag_ipi() are now performed with
sched_spinlock being locked. The only exception is in slice_timeout().
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Allow specifying the python-can configuration context to use along with the
"can" fixture. This opens up for specifying board-specific contexts in the
twister hardware map file.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Allow twister fixtures to contain extra information, which can be used for
test suite configuration. The extra information can be appended to existing
fixtures separated by a colon (i.e. <fixture>:<configuration>).
This is especially useful for the pytest harness, where a fixture of a
given type may need to refer to an instance of a particular piece of host
hardware needed by the pytest suite (e.g. a network interface, a UART, or a
CAN interface connected to the device under test).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Pass the list of supported twister fixtures for a given platform to pytest
via DeviceConfig. This allows for the pytest suites to use knowledge of the
fixtures for test suite configuration.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add pinctrl for flexcan2
Add EXP_SEL gpio hog for board mux selection during boot.
Add TJA1057 CAN PHY driver.
Update supported features in board document
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
Check that a power state that has system-managed device power
management disabled does not trigger device power management
when the system sleeps.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add new information about new property to
enable/disable device power management per
power state.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
PM_DEVICE is not attached to system managed device power management.
It is a very common use case targets with device runtime power
management that don't want system device power management enabled.
We introduce a new symbol (PM_DEVICE_SYSTEM_MANAGED) to explicit
control whether or not system device power management should be
globally enabled.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Remove device pm path when there is no is no power state in DT with
device pm enabled. This basically does the same thing that was done
by PM_DEVICE_RUNTIME_EXCLUSIVE.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Make it possible to disble device power management individually per
power state. This allows targets tuning which states should
(and which should not) trigger device power management.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
That is option has shown confusing on it is attempt to prevent
system pm doing device power management. Lets address this
problem properly.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Zephyr's transition to PSA Crypto API and demoting TinyCrypt.
Lets not promote TinyCrypt in the overview.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The driver writes the scan entry mode to the display controller on each
set_window call. Multiple calls to set_window can be needed to update
a single frame buffer in the controller.
There's a performance improvement by only setting the scan mode when
the orientation is changed (set_orientation, see previous commit)
and when the profile has changed.
For the latter the scan_mode is lost on the controller
due to a software reset.
Signed-off-by: Sven Depoorter <svndepoorter@gmail.com>
I chose this approach instead of software rotation because I need it for
an ultra low power project.
Rotation in steps of 0, 90, 180, 270 degrees is done by changing
the data entry modes.
This commit removes the orientation-flipped property as it is redundant.
I made the assumption that the current driver implementation is right
about controller X/Y versus display width/height. The display controller X
parameter matches with the display height (dts) and display controller Y
parameter matches with the display width (dts). It looks like display
manufacturers choose to have it like this because a wider screen probably
makes more sense.
Tested on the reel_board with a 250x122 display (ssd1673 controller)
and a custom PCB with a 200x200 display (ssd1681 controller).
Also tested all orientations with various width/height dts overrides.
Signed-off-by: Sven Depoorter <svndepoorter@gmail.com>
Monolithic build is enabled by default and it
requires the presence of the binary blobs.
CI will fail since it doesn't fetch them
to the environment. To avoid this
monolithic for BT app is disabled.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
When building with monolithic feature enabled, the firmwares binaries
will be linked during the build with the application. This means we can
remove the application size limit due to the firmware storage in flash
not useful anymore.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Enable monolithic build for all BLE apps.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
The monolithic feature allows to link the binary blobs with
the application during the build.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Added MAX32680EVKit board
For more information about this board please check
https://www.analog.com/
Co-authored-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Updates the pipes documentation to generate a link to CONFIG_PIPES
Kconfig option description instead of merely listing the name of
this option.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Updates the CONFIG_PIPES Kconfig description to add a note that
enabling it will cause a slight increase to the thread structure.
This mirrors a similar comment in CONFIG_EVENTS.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
The processing of CONFIG_FILE_SYSTEM_MAX_FILE_NAME override for
MAX_FILE_NAME has been improved to limit possibility to set it to
value that is not allowed by any of the in-tree subsystems, when
such subsystem is enabled.
When no in-tree subsystem is allowed the value is still not limited.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Fix MAX_FILE_NAME for LittleFS, which was set to 255, while currently
allowed is 255.
Fixes#72394
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Some vendor specific setup was done inside
the open() HCI function, those should be
inside setup() function instead.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
- The MK22FN512VLH12 chip, installed on frdm_k22f,
has 512 KB of Program Flash and 128KB SRAM
according to the K22P121M120SF7RM.pdf manual (page 55).
- Fix the flash size to 512KB (was 1MB).
- Add nxp_k22fn512.dtsi with correct flash size value.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Incorrectly placed preprocessor conditions caused exit_dpd
when there has been no instance of a device with
dpd_wakeup_sequence parameter.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
With power managment is enabled, depending on the SoC power state
used when idle, the MMU may lose context and may need to be re-initialized.
When re-initializing the MMU, we must not re-create the page table
because it may overwrite changes done during the execution, but we still
need to set the asid and page table for the current context.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add release notes for the deprecation of a number of POSIX
Kconfig options. These have been deprecated so that we can
use more normative Kconfig variable identifiers, based on
the Options and Option Groups of IEEE 1003.1-2017.
To simplify migration, use
python $ZEPHYR_BASE/scripts/utils/migrate_posix_kconfigs.py \
-r root_path
Additionally, document the removal of PTHREAD_BARRIER_DEFINE(),
EFD_IN_USE, EFD_FLAGS_SET, which were previously deprecated
>= 2 release cycles before.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Until recently, the posix api was purely a consumer of the
network subsystem. However, a dependency cycle was added as
a stop-gap solution for challenges with the native platform.
Specifically,
1. eventfd symbols conflict with those of the host
2. eventfd was excluded from native libc builds via cmake
If any part of the posix were then to select the network
subsystem (which is a legitimate use case, given that networking
is a part of the posix api), we would get a build error due to
the Kconfig dependency cycle.
As usual, with dependency cycles, the cycle can be broken
via a third, mutual dependency.
What is the third mutual dependency? Naturally, it is ZVFS
which was planned some time ago. ZVFS will be where we
collect file-descriptor and FILE-pointer APIs so that we can
ensure consistency for Zephyr users.
This change deprecates EVENTFD_MAX in favour of
ZVFS_EVENTFD_MAX.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Remove the EFD_IN_USE and EFD_FLAGS_SET macros as they were not
part of the public API.
Rename the internal versions, accordingly.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add a link to the Kconfig option CONFIG_POSIX_NETWORKING in
the documentation.
Additionally, add Kconfig options for other Network
dependencies in an effort to make POSIX Kconfig options
consistent with the specification.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add links to POSIX-related Kconfig options that are related to
POSIX Options and Option Groups.
These include limits that might not have an associated standard
name and related Kconfig variables in other subsystems.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Create a Kconfig option for POSIX_MULTI_PROCESS Option Group
and mark it as experimental.
Currently, Zephyr has two functions that belong to this
Option Group:
- sleep()
- getpid()
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The asynchronous I/O and (process) scheduling options needed
minor rewording.
Additionally, add the experimental flag to each of them since
they are not yet supported.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This change deprecates CONFIG_POSIX_SIGNAL in favour of
the plural CONFIG_POSIX_SIGNALS, which maps directly to the
name of the standard POSIX Option Group POSIX_SIGNALS.
Additionally, mark signals as experimental.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
While event file descriptors (eventfd) are extremely useful, the
API has still not been formalized as part of the POSIX
specification.
Therefore, move this to a separate Kconfig menu for "compat"
(compatibility) features.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Zephyr's POSIX API is moving toward using the standard
nomenclature from IEEE 1003.1-2017 for as much as possible. In
particular, we want to have consistent naming between Zephyr's
POSIX API Kconfig options and the naming for POSIX Options and
Option Groups.
The Kconfig option CONFIG_PTHREAD_IPC has been (ab)used for a
very long time for a variety of different purposes. However,
the standard Option / feature test macro for POSIX Threads is,
intuitively _POSIX_THREADS. There is a corresponding sysconf()
key named _SC_POSIX_THREADS.
Annoyingly, the POSIX Option Group that corresponds to the
Option is POSIX_THREADS_BASE, which is a minor inconsistency
in the standard.
The _POSIX_THREADS Option already includes mutexes, condition
variables, and thread-specific storage (keys). So with this
change, we also deprecate the redundant Kconfig variables that
do not have a corresponding match in the standard.
- CONFIG_PTHREAD_IPC
- CONFIG_PTHREAD
- CONFIG_PTHREAD_COND
- CONFIG_PTHREAD_MUTEX
- CONFIG_PTHREAD_KEY
Additionally, create Kconfig variables for those configurables
which we are lacking:
- CONFIG_POSIX_THREADS_EXT
- CONFIG_POSIX_THREAD_ATTR_STACKSIZE
- CONFIG_POSIX_THREAD_ATTR_STACKADDR
- CONFIG_POSIX_THREAD_PRIORITY_SCHEDULING
- CONFIG_POSIX_THREAD_PRIO_INHERIT
- CONFIG_POSIX_THREAD_PRIO_PROTECT
- CONFIG_POSIX_THREAD_SAFE_FUNCTIONS
Some Kconfig variables were renamed to more properly match the spec:
- CONFIG_MAX_PTHREAD_COUNT -> CONFIG_POSIX_THREAD_THREADS_MAX
- CONFIG_MAX_PTHREAD_KEY_COUNT -> CONFIG_POSIX_THREAD_KEYS_MAX
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This change deprecates CONFIG_POSIX_PUTMSG and introduces a new
Kconfig option CONFIG_XOPEN_STREAMS which maps directly to the
standard POSIX Option, _XOPEN_STREAMS.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This change deprecates the CONFIG_POSIX_SYSLOG Kconfig
variable for CONFIG_XSI_SYSTEM_LOGGING, which has a
direct mapping to the POSIX Option Group XSI_SYSTEM_LOGGING.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Update documentation so that there is a link to
CONFIG_POSIX_ASYNCHRONOUS_IO as it was previously missing.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This change deprecates CONFIG_SEM_VALUE_MAX in favour of
CONFIG_POSIX_SEM_VALUE_MAX which maps directly to
_POSIX_SEM_VALUE_MAX.
Additionally, we add the Kconfig option
CONFIG_POSIX_SEMAPHORES which maps directly to the
POSIX Option _POSIX_SEMAPHORES.
For consistence, deprecate CONFIG_SEM_NAMELEN_MAX
in favour of CONFIG_POSIX_SEM_NAMELEN_MAX.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This change deprecates CONFIG_POSIX_FS in favour of
CONFIG_POSIX_FILE_SYSTEM, which maps directly to the name of the
standard POSIX Option Group.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The functions fnmatch(), getopt(), getentropy()
and others are grouped into the standard Option Group
POSIX_C_LIB_EXT.
The getentropy() function is currently in-draft for
Issue 8 as of 2021.
https://www.opengroup.org/austin/docs/austin_1110.pdf
Not surprisingly, the POSIX_C_LIB_EXT Option Group
also includes the highly debated strnlen() function.
Moving that function will be deferred until later.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This change deprecates CONFIG_PTHREAD_RWLOCK in favour of
CONFIG_POSIX_READER_WRITER_LOCKS, which maps directly to the
name of the standard POSIX Option.
Annoyingly, the POSIX_RW_LOCKS Option Group is inconsistently
named. However, it is more convenient for us to use the Option
name since it is also the format used by the sysconf() variable
(_SC_READER_WRITER_LOCKS).
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This change deprecates CONFIG_POSIX_MQUEUE in favour of
CONFIG_POSIX_MESSAGE_PASSING, which maps directly to the name of the
standard POSIX Option.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This change deprecates CONFIG_PTHREAD_SPINLOCK in favour of
CONFIG_POSIX_SPIN_LOCKS, which maps directly to the name of the
standard POSIX Option Group.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This change deprecates the following Kconfig options
* CONFIG_POSIX_ENV
* CONFIG_POSIX_CONFSTR
* CONFIG_POSIX_SYSCONF
* CONFIG_POSIX_UNAME
and instead groups them into a single Kconfig option that maps
directly to the standard. Namely, CONFIG_POSIX_SINGLE_PROCESS.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The standard specifies _POSIX_BARRIERS as an Option so let's
use CONFIG_POSIX_BARRIERS for consistence.
This change deprecates CONFIG_PTHREAD_BARRIER. Users should
instead choose CONFIG_POSIX_BARRIERS.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The POSIX_MAX_FDS option does not correspond to any standard
POSIX option. It was used to define the size of the file
descriptor table, which is by no means exclusively used by
POSIX (also net, fs, ...).
POSIX_MAX_FDS is being deprecated in order to ensure that
Zephyr's POSIX Kconfig variables correspond to those defined in
the specification, as of IEEE 1003.1-2017. Namely,
POSIX_OPEN_MAX. CONFIG_POSIX_MAX_OPEN_FILES is being deprecated
for the same reason.
To mitigate any possible layering violations, that option is
not user selectable. It tracks the newly added
CONFIG_ZVFS_OPEN_MAX option, which is native to Zephyr.
With this deprecation, we introduce the following Kconfig
options that map directly to standard POSIX Option Groups by
simply removing "CONFIG_":
* CONFIG_POSIX_DEVICE_IO
Similarly, with this deprecation, we introduce the following
Kconfig options that map directly to standard POSIX Options by
simply removing "CONFIG":
* CONFIG_POSIX_OPEN_MAX
In order to maintain parity with the current feature set, we
introduce the following Kconfig options.
* CONFIG_POSIX_DEVICE_IO_ALIAS_CLOSE
* CONFIG_POSIX_DEVICE_IO_ALIAS_OPEN
* CONFIG_POSIX_DEVICE_IO_ALIAS_READ
* CONFIG_POSIX_DEVICE_IO_ALIAS_WRITE
Gate open(), close(), read(), and write() via the
CONFIG_POSIX_DEVICE_IO Kconfig option and move
implementations into device_io.c, to be conformant with the
spec.
Lastly, stage function names for upcoming ZVFS work, to be
completed as part of the LTSv3 Roadmap (e.g. zvfs_open(), ..).
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
With this change, we collect implementations of functions that are
part of the POSIX_FD_MGMT Option Group into one compilation unit
(fd_mgmt.c) and provide a matching Kconfig symbol that is
reflective of the standard.
Additionally, provide Kconfig options for aliases of those functions
since Newlib-based toolchains internally use an underscore-prefixed
alias for many POSIX functions (in this case _lseek).
Prefix Zephyr-native implementations with zvfs_ to prepare for the
up-coming changes in that area.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The POSIX_CLOCK option does not correspond to any standard
option. It was used to active features of several distinct
POSIX Options and Option Groups, which complicated API and
application configuration as a result.
POSIX_CLOCK is being deprecated in order to ensure that Zephyr's
POSIX Kconfig variables correspond to those defined in the
specification, as of IEEE 1003.1-2017.
Additionally, CONFIG_TIMER is being deprecated because it does
not match the corresponding POSIX Option (_POSIX_TIMERS).
With this deprecation, we introduce the following Kconfig
options that map directly to standard POSIX Option Groups by
simply removing "CONFIG_":
* CONFIG_POSIX_TIMERS
Similarly, we introduce the following Kconfig options that
map directly to standard POSIX Options by simply removing
"CONFIG":
* CONFIG_POSIX_CLOCK_SELECTION
* CONFIG_POSIX_CPUTIME
* CONFIG_POSIX_DELAYTIMER_MAX
* CONFIG_POSIX_MONOTONIC_CLOCK
* CONFIG_POSIX_TIMEOUTS
* CONFIG_POSIX_TIMER_MAX
In order to maintain parity with the current feature set, we
introduce the following Kconfig options that map directly to
standard POSIX Option Groups by simply removing "CONFIG_":
* CONFIG_POSIX_MULTI_PROCESS - sleep()
Similarly, in order to maintain parity with the current feature
set, we introduce the following additional Kconfig options that
map directly to standard POSIX Options by simply removing
"CONFIG":
* CONFIG_XSI_SINGLE_PROCESS - gettimeofday()
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
There were two Kconfig constants defined for (effectively) the
same thing in Zephyr. Namely, RTSIG_MAX - the highest valued
real-time signal.
Deprecate CONFIG_POSIX_LIMITS_RTSIG_MAX in favour of
CONFIG_POSIX_RTSIG_MAX since the latter more closely matches
convention.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
There will be some POSIX Kconfig symbols that will be deprecated
in favour of Kconfig symbols that are exact matches for those in
the POSIX specification (1003.1-2017).
Create the empty Kconfig file now, and then incrementally add to
it as non-standard POSIX Kconfig options are replaced with
standard-like POSIX Kconfig options.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
It's sort of more conventient to do the opposite of what was
done with the __z_sysconf_ macros, and use them for both the
full implementation and the macro implementation.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Rather than forcing the macro to -1, simply leave it undefined
if the particular feature in question is unimplemented. This is
the convention used by external libcs.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
For some reason, even though confstr() is implemented in Zephyr,
the header tests were not checking for the existence of _CS_
constants.
Uncomment the tests so that they can be run regularly.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
For some reason, even though sysconf() has multiple
implementations in Zephyr, the header tests were not checking
for the existence of _SC_ constants.
Uncomment the checks - they should be run on a regular basis.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The standard macro is plural - so _SC_MAPPED_FILES - which
corresponds to _POSIX_MAPPED_FILES.
In Zephyr, we previously had _SC_MAPPED_FILE and
_POSIX_MAPPED_FILE, so it's a simple correction.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Some POSIX header tests assumed that various structures would be
declared even if POSIX_API=n. Actually most meaningful POSIX
structures are guarded by feature test macros defined by
the implementation (i.e. implementation conformance macros).
So only run tests on those structures when CONFIG_POSIX_API=y.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The header tests for the existence of constants like
_POSIX_SPIN_LOCKS are bound to fail in one circumstance or
another because each of those options are (theoretically)
features which can be enabled or disabled.
Moreover, some implementations (e.g. external libc) might
not implement one particular subset or option group.
These tests are poorly conditioned, so remove them.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Set the latest version for nanopb.
This fixes searching for the nanopb_generator.py script in the module
instead of system wide.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add missing call to LV_MEM_CUSTOM_FREE when closing a file to prevent
memory from leaking.
Resolves issue #73148.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Fixes: #73132
Add a subsection on tracking Kconfig symbols whose default values is
obtained from another Kconfig symbol.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Set the radio status as ok as the SOC/CPU DT include
does not do it for us.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
As now we have a sufficient model of the CLOCK peripheral,
let's mention it in the docs, and correct the warning
about not supporting the BLE stack.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Default the clock accuracy for the simulated 54L15 target
just as for the real target.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update the HW models module to:
4447a22aea5e791c9bd18e7d71cc092623ddd2bb
Including the following:
* 4447a22a CLOCK,POWER,RESET: Add stubs for the 54L
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix linker error caused by the smartbond timer driver
being enabled at the same time as the smartbond timer counter
driver. For some reason putting SMARTBOND_TIMER=n in a conf
file does not fix this, this change has to be made to the
Kconfig.defconfig to not add this default y case in order
to fix the error. At least that is all I could figure out,
and not sure why the .conf doesn't override it.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Fix the warning about control reaching end of non void
function by adding a default to the switch statement.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
x86 32bit defines `CONFIG_X86` while its 64bit counterpart
defines an additional `CONFIG_X86_64`, by reordering the
include order we can make it look a bit cleaner.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Created `GEN_OFFSET_STRUCT` & `GEN_NAMED_OFFSET_STRUCT` that
works for `struct`, and remove the use of `z_arch_esf_t`
completely.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Make `struct arch_esf` compulsory for all architectures by
declaring it in the `arch_interface.h` header.
After this commit, the named struct `z_arch_esf_t` is only used
internally to generate offsets, and is slated to be removed
from the `arch_interface.h` header in the future.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`fatal.h` has 2 functions that use the `z_arch_esf_t` type.
Include `exception.h`, which should have the `z_arch_esf_t`
defined.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Create `zephyr/include/zephyr/arch/exception.h`, which will
redirect to the corrent architecture-specific exception header
based on Kconfig.
Some of the architectures define their esf struct in
architecture-specific `arch.h`, refactor them out into a
separate `exception.h`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add the possibility to fetch specific sensor channels independently,
either pressure data with SENSOR_CHAN_PRESS or temperature data
with SENSOR_CHAN_AMBIENT_TEMP.
Additionally, the option to fetch both channels simultaneously remains
available using SENSOR_CHAN_ALL, thus not breaking any samples.
Signed-off-by: Chris Braissant <chrisbraissant@gmail.com>
Added board nucleo_h7a3zi_q overlay file to permit testing the STM32
Digital Temperature Sensor.
Also added the board as integration platform to the sample.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Add a digi_dietemp node for the STM32 Digital Temperature Sensor into
stm32h723.dtsi (used as a base for H723, H725, H730 and H735) and
stm32h7a3.dtsi (used as a base for H7A3, H7B0 and H7B3).
The sensor is not available on other H7 SoCs.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This add basic support for the STM32 Digital Temperature Sensor found
notably on the STM32H7 series. It work in interrupt mode and support
basic power device management.
It does not support the more advanced features like using the
temperature threshold, triggers from LPTIM or using the LSE clock in
during sleep or stop.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The AD5593 conversion result also contains the channel read and not just a
value:
| adc channel (3 bits) | adc value (12 bits) |
This value was not removed from the result before using it as an adc value.
Reuse the AD5592 code to fix the issue.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Update the manifest SHA to point to the HAL PR
that removes the USB check from the DIV1 clock
evaluation. This is because the USB block should
be evaluated explicitly by the clock manager
as a virtual USB clock is introduced in #73458.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Fixes issue where PB GATT Server will drop
advertising device name if optional provisioning
URI is not provided.
Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
The control and data settings are set improperly for packet filter
operation for sniffer operation. The change sets them properly.
Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
The CLIC requires that mtvec.base is aligned to 64 bytes.
_isr_wrapper is used as mtvec.base, so align it to 64 bytes.
Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Added MAX32655FTHR boards.
For more information about this board please check
https://www.analog.com/MAX32655FTHR
Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Added MAX32655EVKit boards.
For more information about this board please check
https://www.analog.com/
Co-authored-by: Kevin Townsend <kevin.townsend@analog.com>
Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Add more specific compatible strings to existing atmel,at24 compatible I2C
EEPROMs where known. This is strictly for documentation purposes, no
functional changes introduced.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Improve the Kconfig descriptions for the atmel,at2x EEPROM driver. This
driver works for a number of different EEPROM families manufactured by
vendors other than Atmel.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Improve the binding descriptions for the atmel,at24 and atmel,at25 EEPROM
compatibles. These compatibles work for a number of different EEPROM
families manufactured by vendors other than Atmel.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit refactors the Intel SSP DAI driver to support dynamic
management of SSP IP. This change additionally separates the
management of the DAI part from the management part of the SSP IP.
Key changes:
- Add new static functions to manage SSP IP power.
- Update the DAI SSP configuration functions to use the new management
approach.
- Update device tree bindings and instances to reflect the new SSP IP
management mechanism.
- ace30 (PTL) support.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
In the Intel platforms most of HPSRAM is used by modules when
are required. By default all these banks are powered off and are
enabled by L2 MM driver only when needed.
At the driver initialisation each unused page is unmaped and
when whole HPSRAM bank is unused the power is switched off.
Since mapping memory in MMU TLB and flushing it at system start is
not needed and time consuming, this patch modifies the init
sequence to avoid it.
Additionally it adds MMU maping and unmaping for pages allocated
from unused pool.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
headers for dmic are now part of the SoC and maintained per generation,
so create one header for PTL and build the code for PTL in some of the
drivers (dmic_nhlt).
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit adds definition of ACE 3.0 Panther Lake board.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Before sending packet to controller the host needs to poll the status of
controller to know it's ready, or before reading packets from controller
the host needs to get the payload size of coming packets by sending
specific command and putting the status or size to the rx buffer, the CS
should be held at this moment to continue to send or receive packets.
This change is needed for the based SPI driver update.
Signed-off-by: Aaron Ye <aye@ambiq.com>
This commit adds support for the SPI which
can be found in Apollo3 SoCs, it can work in
both DMA and non-DMA modes
Signed-off-by: Hao Luo <hluo@ambiq.com>
Add ADC prescaler values in the RCC nodes to check that compilation with
these properties works. The values set in the dts are the default values
of the registers.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Fix a compilation error occurring when a prescaler was set for ADC on F1
and F3 family.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Due to the recent changes in mbed TLS area, and due to adding new
certificates to the sample, the mbed TLS configuration has to be update
to be able to support them all.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Baltimore certificate expires in 2025 and Azure is in the transition
period for the time being to the new certificates. Add support for all
certificates needed in the sample.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Re-enable enet on mimxrt1020 board using the new devicetree.
Build and execution of zperf sample on this board is successful.
Signed-off-by: Adam Matus <adam.matus@nxp.com>
Adds, removes and modifies includes in all LE audio
files.
Fixes any found spelling mistakes as well.
Fixes a few places where incorrect types were used.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This patch changes the way sections are mapped to memories. Instead of
looking at the section name, each section in the ELF file is mapped to
the llext_mem enum by looking at the section type and flags.
This allows for a more generic mapping that works for both the ARM and
Xtensa cases, and also allows for sections to be merged if they are
contiguous and non-overlapping in the ELF file.
This patch also fixes a number of corner cases, such as in the logging
test where a section with read-only data was being ignored (not copied
and not relinked).
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add a semaphore to protect the disable access to the RNG peripheral
when the PM is going to suspend mode.
The change does not affect other stm32 than CONFIG_SOC_SERIES_STM32WBX
or CONFIG_STM32H7_DUAL_CORE
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The commit adds nrf54l15pdk/nrf54l15/cpuapp to list of allowed
platforms for default test configuration.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit replaces flash_area_erase with flash_area_flatten,
as it allows to emulate erase and scramble data stored
on devices that do not provide erase callback.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit replaces flash_area_erase with flash_area_flatten,
as it allows to emulate erase and scramble data stored
on devices that do not require explicit erase before write
or do not provide erase callback.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The sample has been modified to work with devices that have
no explicit erase capability.
For that purpose printf messages have been modified to use
"Internal storage" rather than "Flash" when reporting status.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The flash_area_erase is replaced with flash_area_flatten that
is also able to erase/scramble devices that do not require
explicit call to erase procedure before write.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Use flash_area_flatten instead of flash_area_erase; this allows
to run tests on devices that do not require explicit erase
before write or do not provide the callback.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The invocation of flash_area_erase, in boot_erase_img_bank,
has been replaced by flash_area_flatten.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit replaces flash_area_erase with flash_area_flatten.
The function is used in to places:
1) in image management commands IMG_MGMT_ID_UPLOAD
and IMG_MGMT_ID_ERASE: to erase an image in secondary slot
or to scramble trailer part of image, which could be misunderstood
by MCUboot as valid image operation request;
2) in command ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE to
erase/scramble data partition.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The Settings test wipe out areas to have a start clean,
so flash_arae_flatten will do that form them for program-erase
and no-erase devices.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Test of file systems use flash_area_erase to erase device
to have a clear start for tests; switching to flash_area_flatten
allows them to do the same with devices that do not explicit
call to erase procedure before write.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The NVS currently requires explict erase capability of
a device to work, so usage of flash_erase has been replaced
with flash_flatten.
There has been additional LOG_WRN added to warn user that
NVS may not efficiently work with device that do not really
have erase.
Currently NVS relies on devices that require erase.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
LittleFS is based on program-erase devices and require that
characteristics to work; the commit replaces flash_area_erase
with flash_area_flatten to allow LFS work on devices that
do not provide erase callback.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Replace usage of flash_area_erase with flash_area_flatten to
allow code to work with devices that do not provide erase
callback.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Replace flash_area_erase with flash_area_flatten to allow FCB
Settings backend to work on devices that do not provide erase
callback.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The flash_area_erase has been replaced with flash_area_flatten,
allowing code to work with devices that do not provide
erase callback.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit adds overlay for native_posix and modifies testcase.yaml
to allow testing CONFIG_DISK_DRIVER_FLASH with device that
do not have erase requirement.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit selects HAS_NO_EXPLICIT_ERASE for Apollo4,
with MRAM, and HAS_EXPLICIT_ERASE for Apollo3 which has Flash,
for a driver that shares code between SoCs.
In case of Apollo4 the no_explicit_erase capability is set to
true, while it remains false for Apollo3.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Add explicit_erase capability and set proper value to it,
depending on type of a device.
Select FLASH_HAS_EXPLICIT_ERASE by devices that have program-erase
characteristics and FLASH_HAS_NO_EXPLICIT_ERASE, where needed.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit adds support for testing non-explicite-erase
device on Flash Simulator. This is addition to already supported
explicit erase before write, aka Flash, type of device behaviour.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Add equivalent of flash_erase, from Flash API, to Flash Map API;
idea is the same: function tries to erase area if driver provides
erase function, otherwise writes erase_value across the defined
area.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit adds two new API calls:
- flash_fill - that allows to fill selected part of device with
specified value;
- flash_flatten - that allows to erase or fill device with
erase_value, depending on whether driver for the device provides
erase callback.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Test now check whether device has requirement for explicit erase
before call or not, before performing various actions.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit adds and no_explicit_erase capability to flash_parameters,
that indicates whether device is program-erase type device; such
devices, like Flash type devices, require erase prior to writing
random data at any previously programmed location.
This capability should only be set by drivers.
The flash_params_get_erase_cap() function has been added, for parsing
flash_parameters object to obtain erase capabilities of device.
The function returns capabilities as combination of bits representing
them. Currently it will return:
0 -- no erase capabilities
FLASH_ERASE_C_EXPLICIT -- erase required before write of random data.
Additional capabilities have been reserved but are not yet used.
There are following Kconfig options added:
FLASH_HAS_EXPLICIT_ERASE
FLASH_HAS_NO_EXPLICIT_ERASE
that should be selected by device driver to indicate whether
devices served by driver needs erase prior to write.
The above Kconfigs are used to figure out whether app is built
for hardware that requires erase prior to write.
They can be also used to detect that it is attempted to build
some subsystem that will not work with provided hardware, for example
file system that has not been prepared to work with devices that
do not require erase.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Some drivers do not support dual mode testcase. It would be great to test
both signle and dual mode, even when the drivers do support this feature.
Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
When something goes wrong with execution, due to twister issues and
bugs, do not continue with execution and abort the process and report
and return an error code.
Fixes#72807
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The irq_offload mechanism was using the same entry of the IDT vector for
all CPUs on SMP systems. This caused race conditions when two CPUs were
doing irq_offload() calls.
This patch addresses that by adding one indirection layer: the
irq_offload() now sets a per CPU entry with the routine and parameter to
be run. Then a software interrupt is generated, and a default handler
will do the appropriate dispatching.
Finally, test "kernel/smp_abort" is enabled for x86 as it should work
now.
Fixes#72172.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
After the get_report() callback, we need to determine how many bytes the
HID device wrote to the report buffer. Use the callback return value to
do this, and modify the net_buf data length value if get_report was
successful.
Reported-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
APIs for enabling and disabling the scanner may take larger time than
expected and scheduling of the lpn state machine is affected by it.
Since these type of latencies are factored into timeouts and scheduling
times, we need to call scan enable/disable APIs after scheduling the
next event time for LPN state machine to be more accurate.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
Virtual UART over ARC hostlink channel driver is used on
Synopsys platforms and maintained by Synopsys.
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
The `Remote wakeup feature not enabled or not suspended` log is not
related to an actual error (connected host might not enable USB remote
wakeup feature). Use warning log level.
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
PR #72475 disabled default enabling of many Mbed TLS features
including AES. This means that now it must be explicitly added
when required.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Enable PM by default for rd_rw612_bga
on peripheral_ht and central_ht
samples
Those are the BLE samples running on
the CI, so it will be better to also
check the builds with PM and also
have some BLE apps to try PM with.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
i2c_ram expects that a ram-like part is connected to an i2c bus and
therefore requires a hardware fixture setup much like spi_loopback.
Adds a fixture that must be designated when running twister tests on a
board with -X i2c_ram.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
power_down() expects a cached pointer. Fix the sparse annotation
to match the implementation (sys_cache_cached_ptr_get() returns a cached
pointer so this is correct).
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This sample app cycles several colors on an RGB LED forever using the LED
API. It can be built and executed on an Arduino Nicla Sense ME, or on any
board where the devicetree has a similar compatible I2C device node.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This patch enables the user to control the RGB LED on the Arduino Nicla
Sense ME board. The RGB LED is controlled by the IS31FL3194 LED driver
and is connected to the I2C0 bus.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add support for the IS31FL3194 3-channel LED driver. This driver can be
configured to handle its outputs as either a single RGB LED or (up to)
three independent LEDs.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit introduces support for an alternate linking method in the
LLEXT subsystem, called "SLID" (short for Symbol Link Identifier),
enabled by the CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID Kconfig option.
SLID-based linking uses a unique identifier (integer) to identify
exported symbols, instead of using the symbol name as done currently.
This approach provides several benefits:
* linking is faster because the comparison operation to determine
whether we found the correct symbol in the export table is now an
integer compare, instead of a string compare
* binary size is reduced as symbol names can be dropped from the binary
* confidentiality is improved as a side-effect, as symbol names are no
longer present in the binary
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This test checks that the pre_located feature works as expected. It
creates a new extension that is manually relocated to a specific address
via the add_llext_command() CMake function invoking a custom linker
command. The test then loads the extension setting the pre_located
option and checks that the symbol is resolved properly.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Provide a replacement for CMSIS' NVIC_GetEnableIRQ()
as some applications use it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The native Linux CAN driver supports CAN FD. Change the binding to reflect
this. No functional changes.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The CAN loopback driver supports CAN FD. Change the binding to reflect
this. No functional changes.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Removes the CIS connection establishment from bt_bap_stream_start
and move the behavior to a new funciton bt_bap_stream_connect.
This has 2 advantages:
1) The behavior of bt_bap_stream_start is much more clear and more aligned
with the spec's behavior for the receiver start ready opcode.
2) It is possible to connect streams in both the enabling
and the QoS configured state with bt_bap_stream_connect as
per the spec. This allows us to pass additional PTS test cases.
To implement this new behavior, samples and tests have been updated.
The CAP Initiator implementation has also been updated
to accomodate for the change in BAP, but the CAP
initiator implementation should work the same for application, except
that it's now possible to do unicast start on ASEs in any order
(https://github.com/zephyrproject-rtos/zephyr/issues/72138).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit should deal with the followings:
1. PLL requires that VDD level be changed to 1V2 and then released
to 0V9 when it's turned off. Changing the VDD level should be
done when the regulator driver is available. Otherwise, the VDD
level will be fixed to 1V2 (reset value).
2. Check if PLL is allowed to be turned off as it might happen that
USB is enabled which is clocked by PLL.
3. Do not wait for the PLL to lock. This is now performed silently
when PLL is requested.
4. Before switching to PLL we should check if PLL is already enabled
as it might happen that PLL node is initially disabled.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should deal with the followings:
1. Change regulator's driver priority as it should now
be used by the clock control driver.
2. Check if the VDD level is permitted to change when PLL
is the system clock. This is because the PLL requires
that VDD be 1.2V.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Update the manifest SHA to point to the HAL PR
that introduces the PLL clock handling updates.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should add all the functionality needed for the counter
driver to work when PM is enabled. The sleep state is bound to the
counter start/stop functionality. TIMER3/4 block instances are
powered by PD_SYS and so sleep should be constrained when they are
up and running. On the other hand TIMER1/2 block instances are
powered by PD_TMR which is always on (used to generate the os tick).
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
We're not supposed to rely on symbols provided by these files.
In case it is required stm32 zephyr code base should be updated rather
than relying on legacy definitions.
Additionally:
Fixes#70136
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
When reading the error message:
"ASSERTION_FAIL: command opcode 0x0c03 timeout with err -11" it may not be
obvious what is wrong with their setup unless you are very familiar
with HCI.
This commit adds some more documentation to make this more obvious.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
The chunked response was not sent properly. There were extra
"\r\n" before the chunk lenght and the length of the string
to be sent was calculated incorrectly.
Fixes#72887
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
In some cases CAN-Bus communication may be
disturbed by other parts of SoC. For example USB
may disturb CAN communication if electircal wiring
of the board is not done properly or the system is
in development stage.
This change adds debug-prints s.t. CAN-Bus protocol
errors in arbitration or data phases can be
detected while in CAN-Bus ISR.
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
Explicitly initialize bNumDeviceCaps to 0 because the bos descriptor is
stored on stack.
Fixes: b0d7d70834 ("usb: device_next: add initial BOS support")
Coverity-CID: 368798
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The VMURT1170 board configures the FLEXSPI to run at 200MHz serial clock
in DDR mode, via the flash configuration block passed to the ROM API.
Per the datasheet of the MX25UM51345G flash present on the board, 20
dummy cycles are required before reading data in OPI DTR mode. Correct
the dummy cycle value used for read commands to 0x28 (40 DDR dummy
cycles, equivalent to 20 dummy cycles of the clock) to resolve this
issue.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
When calculating the offset for blockwise writes,
we should not advance the block_ctx->current field
past the block boundary.
It causes CoAP layer to reply with the next NUM field
instead of the current one being processed.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Changes to contents of boards directory for the board cause duplicate
definitions when combined with test overlay; the commit removes
duplicate partitions from overlay in test.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Make the generated json file match the contents generated with:
* nrfutil device erase --uicr --core Application --x-operation-id 1
--x-family nrf54h --x-append-batch batch.json
* nrfutil device program --firmware uicr_merged.hex
--options chip_erase_mode=ERASE_NONE,verify=VERIFY_READ
--core Application --x-operation-id 2 --x-family nrf54h
--x-append-batch batch.json
* nrfutil device reset --reset-kind RESET_PIN --x-operation-id 3
--x-append-batch batch.json
The erase options are supposed to be placed under "option" subkey.
Without the "option" subkey, nrfutil defaulted to ERASE_ALL.
Remove the firmware file format field because it is auto detected by
nrfutil when executing the batch script.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The ring buffer API is explicitly not thread safe, with users needing to
implement their own locking. As `poll_out` and `fifo_fill` are operating
on the same ringbuffer, these locks are needed.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This patch adds a timeout to the clock_control_on() implementation. The
reason for this timeout is to prevent system freezes when the PLL is
configured incorrectly, or, if BICR is wrong. The locking time of the
AUXPLL is <30us, however, when it starts it also starts other
dependencies which take much longer to become ready. The locking time
has been experimentally measured to be around 2ms, so a 10x bound has
been added.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The RTC shell get command displays the time according to the ISO8601
standard. Fix the milliseconds field to be displayed on 3 digits instead
of 6 like if they were microseconds. In addition change the separator
between seconds and milliseconds to a dot like specified in the ISO8601
standard.
Before:
2024-06-02T22:33:10:000667
After:
2024-06-02T22:33:10.667
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Removes the requirement that CAS is found on the remove
device for ad-hoc sets. This makes the CAP API more
versatile as it allows applications to use it with
remote non-CAP devices.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix the dependencies of `CONFIG_EXCEPTION_STACK_TRACE`:
- Architecture-specific Kconfig, i.e.
`X86_EXCEPTION_STACK_TRACE`, will be enabled automatically
when all the dependencies are met.
- `EXCEPTION_STACK_TRACE` depends on architecture-specific
Kconfig to be enabled.
- The stack trace implementations should be compiled only if
user enables `CONFIG_EXCEPTION_STACK_TRACE`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Currently, the stack trace in ARM64 implementation depends on
frame pointer Kconfigs combo to be enabled. Create a dedicated
Kconfig for that instead, so that it is consistent with x86 and
riscv, and update the source accordingly.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The `DEBUG_INFO` in the `EXCEPTION_STACK_TRACE` is only
required by x86. Move that to `X86_EXCEPTION_STACK_TRACE`
instead.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The `PRINTK` was required for `EXCEPTION_STACK_TRACE` because
it's initial implementation for x86 in #6653 uses `printk()`.
We are using `LOG_ERR()` now, so this is not required anymore.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Changes twister tests and nrf samples from using legacy adv to ext adv
since this is the default for Mesh. Legacy adv is still tested in bsim.
Removes redundant test configuration testing ext adv.
Removes redundant config for ext_adv in `multi_ext_adv.conf`.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
It is not correctly to call Zephyr API from bsim
HW thread.
Commit moves friendship test suite semaphores
initialization into test bodies.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Select the newly introduced nrf54lx compatible kconfig
option.
This is common both for real HW and for simulated HW,
allowing SW to behave appropriately for both.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Align interrupt numbering with RM0436 for STM32MP157.
This will allow EXTI interrupt for line 6, 7, 8, 9, 10 and 11.
Fixes: ff231fa20a ("dts: stm32: Populate new properties for exti nodes")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
can_mcan_send/can_mcan_get_message issued a message ram write/read even
when data length was 0. This caused some issues on systems where data
cache is enabled, because the cache invd/flushing calls present in the
mcan driver can fail if provided length is 0.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
PR #72475 disabled default enabling of most Mbed TLS features.
This means that:
- CONFIG_MBEDTLS_CIPHER_AES_ENABLED needs to be manually enabled
when required;
- CONFIG_PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC does not need to
be (almost) always added because there is no default RSA
key-exchange enabled, so PSA can be built without RSA support.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The struct and its fields were poorly documented.
The new documentation should she some light on when the fields
can be modified.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for Nuvoton numaker board numaker_m2l31ki.
m2l31x has 4 MPU regions and can't afford one more region
for USERSPACE, so set CONFIG_USERSPACE=n in m2l31ki_defconfig.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
The number of suitable network IPv6/4 configurations in interfaces
affect the number of pollable sockets. So need to increase the value
from the default value of 3.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Instead of printing either A or AAAA resource query type,
print the correct query type value.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Do not depend on init level but start the socket service
already in net core init because DNS init code depends on
socket service API to be ready to serve. And we call DNS
init at the net core init.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Allow mDNS resolver and responder to to be used at the same
time so that both can use the port 5353. This requires
a DNS traffic dispatcher which affects also the normal DNS
resolver.
Fixes#72553
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The function is useful for application to lookup set
members from bt_conn pointers, e.g. when iterating on
connected devices.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Supplicant create AF_PACKET proto ETH_P_PAE socket but receive other
frames like ICMP, UDP and causes following issues.
1. When frame len exceeds MTU, net_pkt_clone cannot clone pkt.
Thus dropped it and print warning log.
2. It will lower throughput performance as every packet is cloned.
Fix it by conn_raw_socket does not deliver pkts protocol not macted,
after l2 processed, unless conn is all packets.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
test_packet_sockets_dgram create ETH_P_TSN sockets but
send and recv ETH_P_IP packet.
Fix it by sending ETH_P_TSN packet.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
according to the latest build log, we need increase the MAX_THREEED
/usr/bin/python3 scripts/build/gen_kobject_list.py \
--kernel twister-out/frdm_k64f/samples/net/mqtt_publisher/\
sample.net.mqtt_publisher.userspace/zephyr/zephyr_pre0.elf \
--gperf-output kobject_prebuilt_hash.gperf --include-subsystem-list \
twister-out/frdm_k64f/samples/net/mqtt_publisher/\
sample.net.mqtt_publisher.userspace/zephyr/misc/generated/struct_tags.json
Too many thread objects (17)
Increase CONFIG_MAX_THREAD_BYTES to 3
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Decoder api was not defined and lead to build error
if it is used in userland.
Fix that by adding necessary DT_DRV_COMPAT #define
in akm09918c sensor decoder.
Signed-off-by: Florian Weber <florian.weber@live.de>
Updated sample to test DFU with mcumgr.
Use paths to default domain build dir from device_config.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Read default domain from domains.yaml file and update
paths to proper build directory. It fixes native and qemu
pytest scenarios, when application is build with sysbuild.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The nxp,imx-csi node was removed from dts in a previous commit
which caused a build failure / regression in CI.
Use DEVICE_DT_GET_ANY() instead of DEVICE_DT_GET_ONE(), since
the latter requires a DT node present, while the former does
not and returns NULL if no such compat exists.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This is a soc/board integration for the MediaTek Audio DSP device on
the MT8195 SOC, along with a Zephyr mtk_adsp soc integration that will
work to support similar 8186 and 8188 device shortly.
A python loader (similar to cavsload.py) is included that will run in
developer mode on current chromebooks (an HP x360 13b-ca000 was
tested) with an unmodified kernel.
Signed-off-by: Andy Ross <andyross@google.com>
These devices have a somewhat odd hybrid design, with a free-running
64 bit up counter but no comparator. Instead interrupts are triggered
by (one of an array of) 32 bit down counters with reset (a-la SysTick,
but without the 24 bit precision issues). The combination actually
results in a fairly simple driver as we can skip the comparator
rounding math.
Signed-off-by: Andy Ross <andyross@google.com>
Add an interrupt controller driver for this device. This is an
extremely simple second level controller with per-interrupt-bit
registers for "enable" and "status". There is no internal latching,
so no "clear/ACK" process is needed.
Signed-off-by: Andy Ross <andyross@google.com>
Add a shield for DVP FPC 24-pins mt9m114 camera modules. These camera
modules are supported on i.MX RT10xx series, for example.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The mt9m114 camera module is not always attached to this board. Camera
stuffs should go into a seperate overlay / shield. Also, the CSI should
be enabled only if there is a camera sensor attached to it.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Add RISC-V architecture specific atomic instructions, not present in
atomic_builtin.h
Signed-off-by: Aleksandar Cecaric <aleksandar.cecaric@nextsilicon.com>
- Optimize slot sizes for MCUBoot swap move algorithm
for mimxrt1010/15/20/24/40/50/60/64 boards.
- Save up to 64 wasted sectors.
- Use DT_SIZE_K/M macros for slot sizes.
- Fix partition size errors.
- Limit mcuboot max size to 128KB (was 256KB).
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
When RxOnWhenIdle is set to False, turn the radio off
if no operation is ongoing in order to save power.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
This account is my corporate account which I will lose access to. Change
to my personal account instead.
Signed-off-by: Robert Zieba <robertzieba@google.com>
Add test suite using python-can for testing Controller Area Network (CAN)
communication between a host PC and a device under test running Zephyr.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Optionally bypass the shell when printing received CAN frames in order not
to break up the line containing the frame. This allows for parsing the
printed CAN frames using Twisters pytest and console harnesses with the
cost of the shell ignoring input while the frame is being printed.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
In the current implementation, the LLEXT linker will only apply
relocations targeting a given symbol if it has a specfic symbol type.
This is overzealous and causes issues on some platforms, as some symbols
that need to be relocated are skipped due to being of a "bad" type.
Ignore the symbol type when performing relocation to solve this problem,
but also add checks to ensure we don't attempt to relocate symbols with
an invalid section index. If such a relocation is found, return an error
instead of ignoring the relocation entry to ensure that it is impossible
to execute code from a (partially) unrelocated LLEXT.
Also remove all hacks added to circumvent this issue:
* qemu_cortex_r5 exclusion from test cases
* unnecessary exclusion of some flags when building with LLEXT EDK
Fixes#72832.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
The RA4M1 Clicker is a basic development board for the Renesas RA4M1
Microcontroller. The board contains J-Link on board, two LEDs and push
buttons and several headers for interfacing with external devices.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
- Adds -U upgrade flag to the install requirements command.
- Fixes a possible documentation generation issue,
reported in https://github.com/zephyrproject-rtos/zephyr/issues/73082
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
In an effort to shave off code size, remove out-of-the-box
enabling of crypto features (except SHA-256).
Configurations are adjusted to enable what they need.
Bonuses:
- When enabled, AES now defaults to using a smaller version
(`CONFIG_MBEDTLS_AES_ROM_TABLES` isn't default enabled anymore,
and if enabled, `CONFIG_MBEDTLS_AES_FEWER_TABLES` defaults to y).
- Conditions around Mbed TLS Kconfig options have been improved
to reflect the reality of the dependencies.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Included the nxp_ke1xz.dtsi file to use the same peripheral info,
and overwrite it for different peripherals
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
This PR corrects the base addresses and region names of some memories
present in the MPS3-AN547 hardware.
Fixes#71920
Signed-off-by: Manuel Loew <manuel.loew.infineon@gmail.com>
Add DMA channels at SOC level for the LPC55S6x series SOCs, as the dma
requests are SOC specific properties and do not need to be modified at
the board level. Remove any DMA request definitions present at the board
level for the LPC55S69 evaluation board.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Some IPv4/IPv6 functions were ifdef-sliced internally, despite being
compiled in conditionally in top-level #ifdef block under the same
condition.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In some cases the comment after #endif did not match the opening #if, in
some cases it was missing.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Allow user to specify resource string using wildcard characters
so that multiple URL paths can be served with just one handler.
Fixes#73367
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Modify the BAP and PBP samples to start with the profile name
(BAP or PBP) and the role of the sample.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The BAP broadcast source sample did not properly use
parentheses for the macro, potentially causing issues.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There is no point in having heap validation enabled but without asserts,
as nothing is reported to the user.
Add this dependency to make sure this option is useful.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Currently calls to these two functions fail unnecessarily when
CONFIG_BT_SMP is disabled. This fix allows identity resets
without having the BT_SMP stack enabled. The primary use case
is enabling random mac address rotation for privacy in memory
constrained SOCs. Fixes#73313
Signed-off-by: Patrick Patel <ppatel@micro-design.com>
Define the configuration to run the code_relocation
application on the external memory octo flash
of the stm32u585 or stm32h7b3i disco kit in XIP
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Declare a sub-region of the whole ext_memory with attributes
ATTR_MPU_IO so that XiP becomes possible on this external
octo- NOR flash. Use the STM32CubeProgrammer runner
with the external loader for flashing.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Declare a sub-region of the whole ext_memory with attributes
ATTR_MPU_IO so that XiP becomes possible on this external
octo- NOR flash. Use the STM32CubeProgrammer runner
with the external loader for flashing.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This change is aborting the memoryMapped mode of the octo-flash
before erasing or writing the NOR. Operations are performed in
command mode.
Reading is always performed in MemoryMapped mode (memcopy)
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Enable the MemoryMapped Mode for the stm32 octoFlash driver
Configure the Flash in MemoryMapped to use in XiP mode.
With this mode the erase and write are not supported.
Address and size are given by the DTS register property.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Fix missing validation of Connection Update Ind PDU. Ignore
invalid connection update parameters and force a silent
local connection termination.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Pin thread to a specific cpu. Once thread gets cpu, check
the cpu id is correct and then thread will give up cpu.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
Adds useful context to the charger sample README to help readers
understand what the sample application is doing.
Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
Adds some introductory context to the charger documentation. This
is being aided to help developers understand what a charger device
is and how the charger_driver_api is relevant to system operation.
Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
Create a pseudo-terminal to access Zephyr shell on the audio DSP.
The shell terminal is enabled with "-p" command-line option.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add a new shell backend implemented over a shared memory window
on the Intel audio DSPs. The implementation uses the Zephyr winstream
to manage the data streaming.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This duplicates the functionality of device_is_ready.
Calls for z_device_is_ready are being done in kernel mode, so it is
safe to call its implementation directly.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Refactored vendor-specific duplicates of uart tx/rx invert properties
into a common dts file uart-controller-pin-inversion.yaml
Signed-off-by: Anuj Pathak <anuj@croxel.com>
This commit has added new flag FS_O_TRUNC to support truncation
during file open. Modified fs_open to handle truncation based on
provided flags. Included unit tests for flag behavior with common
filesystems.
Signed-off-by: RAJAGOPALAN GANGADHARAN <g.raju2000@gmail.com>
Before #72243 Mbed TLS was not using
USE_PSA and all PSA features were not enabled. After #72243
if BUILD_WITH_TFM is set:
- USE_PSA in Mbed TLS is enabled by default and
- all PSA features are enabled.
This commits reverts both changes for tests/crypto/mbedtls
test case.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This WDT is responsible for monitoring the external
32.728 Hz crystal connected to pins XTAL_32K_P and
XTAL_32K_N. If an oscillation failure is detected
the hardware automatically switch to RTC_RC_SLOW
clock source and triggers an interrupt.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
Employs the same linkonce magic of sw_isr_table to fix the
multiple definition of the symtab variables issue that I
get in my application build that doesn't use `west`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`start_addr` is the address of the first symbol, rename it to
`first_addr` instead as it seems more intuitive and relatable
to the comments.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Append new entry to the symtab list only if it has unique
address.
Added a bit more comments and move the debug print to after
the list is sorted.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The `symtab_find_symbol_name()` is using an adapted binary
search function to get the entry between 2 addresses, we need
to add a dummy entry at the end so that the search function
can remain simple and straightforward without doing
out-of-bound checks:
20 \
|
|
50 x
|
|
90 x
. |
. |
. |
dummy /
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Update dts to use ST7735R via MIPI DBI API.
Also, remove the reset-gpios, as on this board the LCD RESET pin is
directly connected to the system reset. And add LCD backlight pin
connected to PE10.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
This commit should fix the followings:
1. Suppress compiler warnings
2. Cryptographic mode should first be exercised before
applying the secure key
3. In-memory word swap operations should be omitted as
the key should reside in the flash memory and so any
write access should raise a busfault exception
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Random number generator is a subsystem and although it is mostly used
in crypto, this is not its only utility.
Move the current random number generator test to it is own space
(tests/subsys/random) and rename it to rng.
We need more and better tests for rng, this is an initial commit
to organize it and get ready for further tests.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Various SoCs have different limitations when it comes to DMA buffer
sizes. This change allows to chose a suitable value for them.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Use an existing variable instead of re-calculating and fix swapped
space and a paranthesis.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When building partially linked / relocatable objects no ELF segments
are created and it becomes more difficult to predict which sections
the compiler will build and use. In this case a .data.rel.local
section is created by the compiler and it is needed to link .rodata
strings in a twister test. We can handle arbitrary sections at run-
time if .peek() is supported. If it isn't we need to allocate and
copy the section. For now we simply error out in such cases. Fixing
that would represent a larger change and can be done incrementally.
This also fixes the relocation calculation to point to the correct
symbol address instead of the memory location, where it's currently
residing, because that can be a temporary buffer as is the case with
SOF.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The controller should be considered
inactive when TX/RX FIFOs are empty
and there is no data in SPI_RX_TX_REG.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
STM32 MCU shall set voltage regulator level with respect to set clock
frequency to reach optimal power consumption.
Voltage regulator is set prior to clock setting based on configuration
from dts/overlay file. Config_regulator_voltage is set as weak in
clock_stm32_ll_common - config_regulator_voltage can be
extended to other STM32 families without need to rewrite heavily
family clock driver, default one can be still used.
Signed-off-by: Lubos Koudelka <lubos.koudelka@st.com>
Add build-time assert to check if the size defined is actually addressable.
i.e: if address-width is set to 8, the maximum addressable size is 256
bytes.
Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
Fix the tests before a build time check is added to validate the
addressable size. Most tests have an eeprom size of 1024 defined but width
8-bit addressing, the majority of the eeprom cannot be addressed
Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
Add a parameter to allow the configuration of the number of address
bytes used by the I2C master. This allows the driver to expose larger
buffer sizes.
Tested with standard linux at24 driver.
Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
Building for this target ensures we keep in mind resource-constrained
microcontrollers when making changes in Bluetooth.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Configure CAN120 MCAN core registers as non-cachable to prevent D-Cache
from inhibiting volatile accesses to the CAN120 MCAN registers. Also
apply non-cachable attribute to the message ram region. Even though the
MCAN driver handles cache invalidation/flushing, MPU faults are still
triggered (to be investigated).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Mention that we have the RADIO peripheral,
but no encryption accelerators yet.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The RADIO models now contain the radio,
let's stop removing it, but as they do not support DFE,
let's disable DFE.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update the HW models module to:
53635212495e4575955fc717369be4362126456a
Including the following:
* 53635212 nRF54L15 MDK: Redefine NRF_RADIO_*_BASE to point to model
* 4a92c424 NHW_IPC: Fix out of bounds read
* 2dae79b5 RADIO: Add nRF54 support
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The cap_initiator unicast_stop shell command had the wrong
minimum parameter count (as it defaults to all).
Some indentation had also gone wrong for it in the
documentation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Exclude the Apollo4 platform from LLEXT tests for now,
as they currently break CI due to #72775.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Add option for setting a random MAC address to
the net iface set_mac command. With random option
a random MAC address can be assigned to an interface.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
The flasher was unconditionally cleaning the UICR area, even when the
application didn't have a new configuration generated. This can happen,
when CONFIG_NRF_REGTOOL_GENERATE_UICR=n. In such case, keep the old UICR
configuration on the device.
A real scenario where we should set CONFIG_NRF_REGTOOL_GENERATE_UICR=n
is when building multiple firmware images that are meant to run one
domain. The primary application build generates the UICR configuration
and secondary images don't. Before this change, the flashing process of
the primary application would write new UICR configuration, but the
flashing process of secondary images would erase it.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Fixes: #73066
Introduce sysbuild_root CMake module similar to the Zephyr root CMake
module. The sysbuild_root CMake module works similar to existing root
module, but with the difference that root paths are adjusted relative to
APP_DIR which is the main image, instead of relative to sysbuild.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Since the introduction of zephyr_file() then the minimum required CMake
version has become 3.20.
Update zephyr_file() to use cmake_path insteasd of set().
This allows us to normalize the path and thereby also remove duplicates
in the list as paths are normalized.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
When using the post_init_f to initialize the `bst_result`,
it is not possible to mark the test as
passed immediately as the `bst_result` will be
initialized after the test completes.
This change should overcome this limitation.
Bluetooth mesh tests are kept as is as we are not
sure if this will change the behavior.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
In some cases, the `fp` will never be `NULL` and the stack
unwinding can go on and on forever, limit the max depth so that
this will not happen.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit should deal with optimizing device's
operation in terms of power consumption. In this
context:
1. Power and rail managers are enabled so that the
device can enter the sleep state and power
rails be set to the min. required levels.
2. Peripheral blocks should be enabled only when
there is need to do so.
3. Define the internal RCX oscillator as default
low power clock. RC32K should not be used as
it drifts significantly due to temperature and
voltage variations. Thus, affecting the whole
system stability regardless of its calibration.
4. PLL should be enabled only when requested and
on board level LP clock should be switched to
XTAL32K to avoid overhead due to RCX calibration.
Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
Read less data from the sensor and use standard zephyr functions for
extracting integers from byte arrays.
Signed-off-by: Jordan Yates <jordan@embeint.com>
`sensor_sample_fetch` is documented to read all of a sensor's active
channels and block until complete. The previous implementation read
the result from the previous call and triggered the next sample.
As a result the first call always failed, and subsequent calls would
return data one sampling period old.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add possibility to test all four SPI modes (CPOL, CPHA).
Add possibility to test different bitrates.
Add tests that checks handling of zero length buffers on master.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Keep reading from the HCI socket when a packet is incomplete. The other
end may not write entire packets, or TCP could fragment in the middle of a
packet.
Also fix a potential infinite loop by advancing to the next packet before
any continue statements.
Signed-off-by: Patrick Stewart <patrick@rfcreations.com>
Add overlay file for nrf54h20.
Align code and DTS between spi_error_cases and spi_controller_peripheral.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Rename the current sensor_read to sensor_read_async_pool and create a
new blocking sensor_read helper.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
The driver isn't currently buildable due to "west blobs" support never
having been added for hal_telink. Furthermore, even if the blob
dependency is manually made available it turns out the code has
bitrotten to the point where it doesn't build anymore. This situation
has continued for several years without anyone taking action, so I think
it's safe to assume this is unmaintained and should be removed.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Fixes: #73065
Update APPLICATION_CONFIG_DIR is Zephyr CMake and sysbuild to follow
the common principle in Zephyr for relative paths.
This means that relative paths are taken from the application source
directory when specified on command line, and require local scoped
defined APPLICATION_CONFIG_DIR to be given as absolute, for example by
using CMAKE_CURRENT_LIST_DIR.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>