Commit graph

495 commits

Author SHA1 Message Date
Lukasz Maciejonczyk abc89c497f net: openthread: add option for optimizing large packet transmission
If enabled the optimization is done at the expense of power consumption
on SED/SSED devices.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2022-08-30 10:26:02 +02:00
Carles Cufi d800ccc644 blobs: Introduce TAINT and TAINT_BLOBS Kconfig options
In order to ensure that builds properly reflect the use of binary blobs,
it is important to markt the build as tainted. For that purpose
introduce two new Kconfig options that ultimately will be reflected in
the build image itself.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-29 15:57:59 +02:00
Carles Cufi 4c26b8518e modules: liblc3: Rename the module for consistency
The old project, liblc3codec, is not used anymore. Rename the Zephyr
module name, folders, and Kconfig options based on the new name, liblc3.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-22 20:40:59 +02:00
Gerard Marull-Paretas a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Mariusz Skamra ba109548a8 liblc3: Determine language starndard for compilation
The code makes use of alignas() specifier which has been introduced on
ISO C11.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-08-22 10:21:48 +02:00
Gerard Marull-Paretas e0125d04af devices: constify statically initialized device pointers
It is frequent to find variable definitions like this:

```c
static const struct device *dev = DEVICE_DT_GET(...)
```

That is, module level variables that are statically initialized with a
device reference. Such value is, in most cases, never changed meaning
the variable can also be declared as const (immutable). This patch
constifies all such cases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Henrik Brix Andersen 590cd5cb72 drivers: can: rename can_state enumerations
Rename the can_state enumerations to contain the word STATE to make their
meaning more clear:
- CAN_ERROR_ACTIVE  => CAN_STATE_ERROR_ACTIVE
- CAN_ERROR_WARNING => CAN_STATE_ERROR_WARNING
- CAN_ERROR_PASSIVE => CAN_STATE_ERROR_PASSIVE
- CAN_BUS_OFF       => CAN_STATE_BUS_OFF

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 21:41:11 +00:00
Torsten Rasmussen 9871a05a67 kconfig: optional sourcing of $(KCONFIG_BINARY_DIR)/Kconfig.modules
Change sourcing of generated Kconfig.module to be optional.

It should be possible to run parse the Zephyr Kconfig tree even if the
Kconfig.modules file has not been generated.

This can be useful in testing where you may wish to run without Zephyr
modules present, and thus not load the Zephyr module CMake module.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-18 14:29:14 +02:00
Måns Nilsson 2b0e820d02 modules: add support for optimized CMSIS-NN kernels
Updates TensorFlow Lite Micro module with option for CMSIS-NN optimized
kernels.

Signed-off-by: Måns Nilsson <mans.nilsson@arm.com>
2022-08-18 12:26:51 +02:00
Henrik Brix Andersen 13c75417ba drivers: can: remove z prefix from public CAN API types
Remove the "z" prefix from the public CAN controller API types as this
makes them appear as internal APIs.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Marcin Niestroj fa5937aaed modules: mbedtls: support stripping newline from debug log messages
Debug log messages generated by mbedTLS library contain newline at the end
of log string. Remove this newline, if it exists, so that log output is
much more user friendly.

Add a dedicated Kconfig option for that, so it can be disabled on request.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Marcin Niestroj af37c09440 modules: mbedtls: convert mbedTLS log levels to Zephyr log levels
So far LOG_DBG() was used inside debug hook for mbedTLS library. This meant
that it was hard to distinct log messages by simply looking at the log
level number, even though Zephyr logging subsystem supports colorful logs
depending on log level.

Choose an appropriate Zephyr LOG_*() macro based on log level coming from
mbedTLS library. Remove log level number from formatted log messages, as it
is now redundant.

One controversial thing about this change is that mbedTLS' "2 State change"
log level is mapped to Zephyr's "warning" log level. Those are not really
warnings in real life, but rather informational messages. However, using
"warning" log level for those allows to clearly distinguish between "2
State change" and "3 Informational" debug messages from mbedTLS.
Additionally, mbedTLS debug message implementation does not seem to be safe
to use in production, so keeping in mind MBEDTLS_DEBUG will be enabled just
during debugging phase, printing "2 State change" logs as warnings should
not be a big deal.

Set default MBEDTLS_DEBUG_LEVEL value depending on selected Zephyr logging
module level, so that only single option needs to be configured in
application project.

Remove prompt for MBEDTLS_DEBUG_LEVEL, so that interactively (e.g. via
menuconfig) adjusting MBEDTLS_LOG_LEVEL will always result in automatically
updating MBEDTLS_DEBUG_LEVEL option. This is to prevent so called "stuck
symbol syndrome".

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Marcin Niestroj e4c11fd8aa modules: mbedtls: support extracting __FILE__ basename at buildtime
So far there was a runtime basename extraction of filenames passed to
mbedTLS debug hook. This has both runtime penalty as well as code size
penalty.

Introduce a buildtime support of extracting basename of source filenames
logged using logging subsystem, so that there is no need to do it at
runtime.

Provide Kconfig options for both buildtime and runtime basename extraction,
as in some cases the buildtime basename extraction might not work,
depending on toolchain used for building Zephyr. Default to buildtime when
using Zephyr SDK, as that is proven to work. Use runtime basename
extraction in other cases (other toolchains used).

This saves approximately 204 bytes of code footprint for sample
application with native TLS sockets built for nRF52840.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Marcin Niestroj 6653fd945f modules: mbedtls: set mbedTLS debug threshold during module initialization
mbedTLS library threshold initialization was done in native TLS socket
implementation (which tends to use mbedTLS now) and inside mbedTLS
benchmark test. Move that to mbedTLS module initialization, as this is a
global setting.

Update description of CONFIG_MBEDTLS_DEBUG_LEVEL to clarify when
mbedtls_debug_set_threshold() is called.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Marcin Niestroj a418ad4bb4 modules: mbedtls: move debug log hook implementation to modules/mbedtls/
So far there was a debug log hook installed in TLS socket implementation.
However, mbedTLS (with debug enabled) might be used outside from TLS socket
and even outside from networking context.

Add new module, which implements debug log hook and makes it available
whenever CONFIG_MBEDTLS_DEBUG is enabled.

Note that debug hook needs to be installed for each mbedTLS context
separately, which means that this requires action from mbedTLS users, such
as TLS sockets implementation.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Marcin Niestroj 6b386336ba modules: mbedtls: convert tabs to spaces in CMakeLists.txt
This is just a whitespace cleanup.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Kumar Gala 5fa1909141 modules: hal_nordic: Remove Kconfig.dt
Remove modules/hal_nordic/Kconfig.dt as we now autogenerate the
contents of this file based on the dts bindings in tree.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-17 08:06:55 +00:00
Felipe Neves 6ba5b21337 soc: xtensa: esp32_net: update kconfig
specific of soc to make it compatible to the new toolchain.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Eugene Cohen 03cfd130a8 modules: mbedtls: update flags to suppress unused var and func
Add module specific compiler flags to suppress reporting unused
variables and unused functions in mbedtls building.

Signed-off-by: Eugene Cohen <quic_egmc@quicinc.com>
Signed-off-by: Dave Aldridge <quic_daldridg@quicinc.com>
2022-08-15 14:32:23 +02:00
Kumar Gala 8eead50071 manifest: Update lvgl
Update lvgl for devicetree updates to use zephyr,keyboard-scan.

Remove Kconfig symbol (LV_Z_POINTER_KSCAN_DEV_NAME) that don't exist
anymore since these values are coming from devicetree.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:54:03 -05:00
Robert Lubos ab024565f0 modules: mbedtls: Update Kconfig defaults for OSCORE/EDHOC
Set proper Kconfig defaults for mbed TLS if OSCORE/EDHOC is enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Robert Lubos 633e7e4533 modules: Add uoscore-uedhoc repository
Introduce uoscore-uedhoc repository, providing OSCORE and EDHOC
libraries as a new Zephyr module.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Robert Lubos c7327f5f70 modules: mbedtls: Add mbed TLS entropy source based on Zephyr entropy
Add entropy source for mbed TLS based on Zephyr entropy driver.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Robert Lubos 1c1bb51730 modules: mbedtls: Add separate configs for EC algorithms
Instead of relying on selected ciphesuite to enable mbed TLS EC configs,
add separate config entries to enable them. This allows to use EC
functionality w/o TLS/DTLS enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Robert Lubos fc81f67e9a modules: mbedtls: Add Kconfig entry for PSA API
Add Kconfig option to enable PSA API in mbed TLS.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Robert Lubos d288e24c6c modules: mbedtls: Workaround for incorrect inclusion in mbedtls
psa_crypto_cipher.c includes an internal header with <>, causing
complication errors in Zephyr (header not found).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Gerard Marull-Paretas 05b26df660 modules: hal_gigadevice: add support for CMP, TMU and SHRTIMER
The CMP, TMU and SHRTIMER modules were not compiled. Add them now that
GD32E50X series support is being added (this SoC has such units).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-12 14:13:49 +01:00
Gerard Marull-Paretas 184fb42957 modules: hal_gigadevice: add support for gd32e50x
Add some compile definitions necessary for the gd32e50x HAL and select
default crystal clock.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-12 14:13:49 +01:00
Eduardo Montoya ee2a8d9a64 net: openthread: allow to configure OPENTHREAD_MESSAGE_BUFFER_SIZE
Add `OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE` to Kconfig.

Also set the number of children to minumum possible for MTD builds
in order to save some resources (~512B of RAM).

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2022-08-10 12:01:18 +02:00
Gerard Marull-Paretas 8faa7b8891 modules: openthread: use zephyr,ieee802154 choice
Use chosen ieee802154 device from DT since
CONFIG_NET_CONFIG_IEEE802154_DEV_NAME is being phased out.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Joakim Andersson c51505f661 modules: tfm: Exclude non-secure TF-M application from build
Exclude the non-secure TF-M application from being built by TF-M.
This also stops the building of the tfm_ns_api library that we were
linking against.
This library is defined by the tf-m regression tests.
Add the installed interface source files exported by the TF-M build
system compile them in the zephyr build system.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-08-09 13:59:02 +02:00
Pieter De Gendt 584d1966e4 modules: openthread: Fix building with picolibc
The OpenThread module should not explicitly link with libc in case of
minimal libc or picolibc.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-08-04 13:46:08 +02:00
Kumar Gala 433e42d470 modules: lvgl: Remove Kconfig symbols that dont exist
LV_Z_DISPLAY_DEV_NAME, LV_Z_HOR_RES_MAX, & LV_Z_VER_RES_MAX
Kconfig symbols don't exist anymore.  They got removed in
recent devicetree update of lvgl module.  So remove them from
modules/Kconfig.lvgl.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-03 18:45:13 +02:00
Bartosz Bilas bcf64d382c modules: lvgl: add missing stubs for Kconfig symbols
Add missing `LV_Z_HOR_RES_MAX`, `LV_Z_VER_RES_MAX`
and `LV_Z_DISPLAY_DEV_NAME`
Kconfig symbols to fix the following Kconfig warnings:

warning: LV_Z_DISPLAY_DEV_NAME defined without a type
warning: LV_Z_HOR_RES_MAX defined without a type
warning: LV_Z_VER_RES_MAX defined without a type

Fixes
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-08-03 05:01:03 +01:00
Fabio Baltieri def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Christoph Coenen 81694a25ed segger: Resolve circular include dependencies
Zephyr kernel is dependent on trace.
Trace is dependent on segger rtt.
Segger rtt MUST NOT be dependent on zephyr kernel.

Move lock functions from header into c file to avoid circular
dependency. This fix needs an update of the segger repository.

Fixes #43887.

Signed-off-by: Christoph Coenen <ccoenen@baumer.com>
2022-08-02 13:09:21 +02:00
Benjamin Björnsson f5073e461e modules: segger: Update header to use guard macros
Remove usage of pragma once for consistency across all headers.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-20 13:39:23 -05:00
Gerard Marull-Paretas 2cfb5012db drivers: spi: nrfx_spim: move rx delay to DT
Move the RX (MISO) delaying capability information to Devicetree. It is
done using 2 properties:

- rx-delay-supported: enabled on SPI nodes that support delaying RX.
  This property can be used by the driver to determine if this
  capability is supported or not on a given instance.
- rx-delay: the actual RX delay value

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Torsten Rasmussen 39a7381bb9 cmake: remove deprecation_warnings.cmake
With support for deprecating Kconfig symbols within the Kconfig tree
itself, there is no reason to have a secondary location to maintain
for information that is based on a Kconfig setting in first place.

Better to directly do `select DEPRECATED` on the symbol itself, than to
maintain a secondary list with messages in CMake.

Hence removing this feature in CMake.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-07-15 09:53:08 -05:00
Anas Nashif 72e7fa8176 scripts: move mergehex.py to scripts/build
Move scripts needed by the build system and not designed to be run
individually or standalone into the build subfolder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-12 10:03:45 +02:00
Robert Lubos 815ebc316e net: openthread: Move glue code into module directory
Move OpenThread's glue code along with the Kconfig files that configure
OpenThread stack itself into module directory.

Update the maintainers file to reflect this change.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-07-11 11:00:12 +02:00
Kumar Gala b296abd605 modules: hal_nordic: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 10:18:24 +02:00
Joep Buruma 7e0fff24c7 drivers: pwm: add pwm driver for rpi_pico
Add pwm driver implementation for rpi pico family.
Adds myself as codeowner of drivers/pwm/*rpi_pico*

Signed-off-by: Joep Buruma <burumaj50@gmail.com>
2022-07-07 15:17:26 +02:00
Marcin Niestroj 48a9334826 modules: mbedtls: remove MBEDTLS_ECP_MAX_BITS from mbedTLS configs
According to mbedTLS' Changelog "Mbed TLS 3.0.0 branch released
2021-07-07" -> "Removals":

   MBEDTLS_ECP_MAX_BITS is no longer a configuration option because it
   is now determined automatically based on supported curves.

Hence remove MBEDTLS_ECP_MAX_BITS from configuration files to fix build
issues with Zephyr when there is unfortunate order of include
statements.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-07-02 14:13:45 +02:00
Bartosz Bilas 9c251fc9ac nxp_imx: rt: add XBARA Inter-Peripheral Crossbar Switch Kconfig option
Add missing MCUX XBARA module Kconfig option.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-07-01 16:23:11 +00:00
Joakim Andersson 3ccf5d03ff tfm: Add option for implementation custom reset handler with TF-M
Zephyr adds a custom handler that overrides the weak function
sys_arch_reset when TF-M platform partition is enabled.

This takes away the option for the application to override the weak
definition for their platform or use-case.

Add an option that control whether this default reset handling is added
to the build.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-06-30 13:00:09 +00:00
Joakim Andersson cb32d8e8e9 modules: tfm: Allow enabling FPU in the application with TF-M enabled
Allow the application to enable the FPU when TF-M has been enabled.
Pass the correct compilation flags according to the TF-M integration
guide.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-06-29 14:45:39 +00:00
Filip Zajdel fb8c86c59a modules: hal_nordic: Don't get DT Node when temp update is disabled
Avoid getting DT Node of temperature sensor when temperature update
is disabled.

Signed-off-by: Filip Zajdel <filip.zajdel@nordicsemi.no>
2022-06-29 10:26:36 +02:00
Gerard Marull-Paretas 166d013311 modules: lvgl: disable for CPU_CORTEX_M0/M0PLUS
There is a compiler bug in the current Zephyr SDK (GCC 10.3.0) that
prevents using LVGL on ARM Cortex M0/M0+. Disable LVGL on such CPU until
the next SDK is deployed (GCC 12.1), as the issues does not appear
anymore.

Ref. https://github.com/lvgl/lvgl/issues/3425

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-28 15:53:10 +02:00
Qingsong Gou 389992bc8d modules: lvgl: fix a minor issue
change Kconfig logic when lvgl not enabled, but
still configured in .config file

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2022-06-27 12:45:29 +02:00
Yonatan Schachter 2bfc245576 rpi_pico: Fix bootloader linking
A recent change to hal_rpi_pico's cmake, intended to fix the
compilation via Unix Makefiles, ended up not linking the BL
to the final ELF. This commit fixes both problems.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-06-23 09:10:10 +02:00
Martí Bolívar f49d11d310 civetweb: remove obsolete code
This code has gone unmaintained and bugs continue to be reported
against it. We do not have the resources as a project to maintain this
in "odd fixes" mode, and nobody has stepped up to maintain it [1], so
sadly this must be removed for now.

If anyone would like to see civetweb supported in upstream Zephyr
again, they are welcome to add it back, as long as they promise to
maintain it going forward.

Many thanks to everyone who has contributed to civetweb support in
Zephyr while it was here. So long and thanks for all the fish.

Fixes: #45807
Fixes: #43910
Fixes: #34226
Fixes: #46743

[1] https://lists.zephyrproject.org/g/devel/message/8466

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-22 08:26:13 -07:00
Gerard Marull-Paretas 4946a15f15 soc: arm: gigadevice: use common API headers
Stop relying on <soc.h> to access HAL APIs. Use generic, per-API headers
instead. Note that <soc.h> has been left as is for now, since ARM MPU
relies on a fragile chain of includes/type definitions.

This change should improve compilation efficiency, as we no longer pull
APIs that are not needed. A similar approach is followed by STM32
drivers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-06-22 18:41:19 +09:00
Andrzej Głąbek c08442c85a modules: hal_nordic: Adapt nrfx_busy_wait() for !SYS_CLOCK_EXISTS case
When the SYS_CLOCK_EXISTS Kconfig option is not enabled, k_busy_wait()
has no implementation, so in such case, call nrfx_coredep_delay_us()
directly.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-15 17:04:30 -05:00
Marcin Niestroj dfe9a91da2 modules: mbedtls: bring back SHA384 support
Before mbedTLS 3.0 there was just SHA512 option, which enabled both SHA384
and SHA512 support. mbedTLS 3.0 introduced SHA384 specific option, which
means that SHA384 got unsupported after merging
commit 4e6cfb67f9 ("modules: mbedTLS: Bump mbedTLS to 3.0").

Introduce SHA384 Kconfig options, so that support for it can be selected in
project configuration if needed. Since SHA384 still depends on SHA512 to be
selected, add such dependency in Kconfig.

Select SHA384 support in non-generic (not configured by Kconfig) mbedTLS
config headers, so that previous (before mbedTLS 3.0 was merged) behavior
is regained.

Fixes: 4e6cfb67f9 ("modules: mbedTLS: Bump mbedTLS to 3.0")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-06-15 09:11:09 +02:00
Bartosz Bilas c343da5161 nxp_imx: rt: add ADC External Trigger Control Kconfig option
Add missing ADC External Trigger Control module Kconfig option.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-06-10 09:48:50 +02:00
Pete Skeggs 6a9854e2ca modules: mbedtls: Add Kconfig option to enable Extended Master Secret
Add Kconfig option for `config-tls-generic.h` to enable the Extended
Master Secret extension.

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
2022-06-05 14:26:48 +02:00
Martí Bolívar 013a0034c9 cmake: modules: deprecate civetweb
This module has gone unmaintained and we do not have the resources to
respond to bug reports for it.

The TSC has decided to deprecate it for Zephyr v3.1 and remove it
entirely in Zephyr v3.2 unless a maintainer volunteers to keep this
module up to date and fix bugs.

This commit generates a warning at CMake time if this module is
compiled in. The warning will appear in the cmake output in the same
place that deprecated board or SoC warnings would.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-05-27 15:32:31 -07:00
Martí Bolívar dcec8d028a cmake: add a mechanism for deprecating modules
We currently have mechanisms for deprecating both boards and SoCs.
However, we lack one for deprecating modules. This is inconvenient,
because we would like to do exactly that.

Handle this in a simple way by adding a new CMake file in the modules
directory which is responsible for warning the user about any
deprecated modules they may be using. See the source code comments for
more details about the approach.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-05-27 15:32:31 -07:00
Fabio Baltieri 33cc6827ba modules: rpi_pico: fix boot_stage2 generation when using Makefiles
RPi Pico second stage bootloader generation seems to fail when using
Makefiles with:

gmake[2]: *** No rule to make target 'bootloader/boot_stage2.S'...

Changing the ExternalProject_Add byproduct to the actual generated file
and not the .S seems to fix the problem.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-05-27 11:58:37 -07:00
Stephanos Ioannidis 4b111c1ee8 Revert "modules: zcbor: kconfig: Disallow ZCBOR_VERBOSE with MINIMAL_LIBC"
This reverts commit 619fce9e0f now that
the missing PRIuFAST32 and PRIxFAST32 macros are defined by the minimal
libc.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-26 17:38:50 +02:00
Nazar Palamar 90a0dd6d6f modules: hal_infineon: fix CMake Warning when build non Infineon device
Problem:
pull/43494 is causing the CMake warning
No SOURCES given to Zephyr library: modules_hal_infineon

modules_hal_infineon library was defined even if none of the
below subdirectories is added; so, when not building for
Infineon/Cypress devices, the source list for this library
will be empty.

Fix:
Added 'zephyr_library_named(modules_hal_infineon)' under condition
'if(CONFIG_HAS_XMCLIB OR CONFIG_SOC_FAMILY_PSOC6)'

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2022-05-16 10:17:29 +02:00
Nazar Palamar d940d23c10 modules: hal_infineon: added initial Kconfig and CMakeLists.txt
- added initial Kconfig
- added initial CMakeLists.txt (root, core-lib,  mtb-pal-cat1)
- updated module, driver and soc to use CONFIG_USE_INFINEON_xx
  defines from modules/hal_infineon/Kconfig

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2022-05-13 21:34:59 +02:00
Daniel DeGrasse bc841e1fb7 drivers: pinctrl: refactor pin control support for imx rt
Refactor iMX RT pin control support to use more generic names, as the
IOMUXC peripheral is present on non RT iMX application cores.
Additionally, make selection of the pin control driver occur at the SOC
level.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-12 16:57:17 -05:00
Francois Ramu bb2cdc5966 module: Kconfig stm32 includes the DELAYBLOCK (DLYB)
add the config to support the DELAYBLOCK LL driver
for stm32 mcus like stm32U5x.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-05-12 14:56:25 -05:00
Mahesh Mahadevan 19a71887cb modules: NXP: Add MIPI DSI support
Add support for the MXRT MIPI DSI controller

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-05-12 09:26:50 -05:00
Rajkumar Kanagaraj 8920f43639 modules: trusted-firmware-m: update val, pal, test static lib path
Previously val_nspe.a, pal_nspe.a, test_combine.a created under tfm binary
directory (${TFM_BINARY_DIR}/app/psa_api_tests/) now from TFM 1.6 it is
generated to the respective tfm binary directory with parent directory
(${TFM_BINARY_DIR}/tf-m-tests/app/psa_api_tests), update the CMake
accordingly.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2022-05-12 10:33:52 +02:00
Jimmy Brisson 2e6cd2550c modules: Update dependencies for TFM 1.6 release
This includes updates for the tfm deps:
 * tf-m-tests
 * psa-arch-tests

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-05-12 10:33:52 +02:00
Joakim Andersson 82600f4a6a boards: Refactor comment on default and identation on help text
Refactor help text for TFM_FLASH_MERGED_BINARY to use the standard
indentation of tab plus 2 spaces.
Reword BUILD_WITH_TFM default comment, TF-M is enabled by default, not
forced enabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-05-12 09:21:36 +02:00
Henrik Brix Andersen 3f97d11afd drivers: can: convert enum can_mode to a bit field
Convert the can_mode enum to a bit field to prepare for future extensions
(CAN-FD mode, transmitter delay compensation, one-shot mode, 3-samples
mode, ...).

Rename the existing modes:
- CAN_NORMAL_MODE   -> CAN_MODE_NORMAL
- CAN_SILENT_MODE   -> CAN_MODE_LISTENONLY
- CAN_LOOPBACK_MODE -> CAN_MODE_LOOPBACK

These mode names align with the Linux naming for CAN control modes.

The old CAN_SILENT_LOOPBACK_MODE can be set with the bitmask
(CAN_MODE_LISTENONLY | CAN_MODE_LOOPBACK).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-05-11 10:47:54 +02:00
Henrik Brix Andersen 18890828b8 drivers: can: split CAN classic and CAN-FD syscalls
Split CAN classic and CAN-FD syscalls into two:
- can_set_timing() -> can_set_timing() + can_set_timing_data()
- can_set_bitrate() -> can_set_bitrate() + can_set_bitrate_data()

Fixes: #45303

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-05-11 10:47:54 +02:00
Sylvio Alves c9f6d18dfc soc: esp32: add Espressif HAL config
Current Espressif porting requires standard include as
part of hal implementation. compiler_flags.cmake checks for
variant name to keep those stdinc in build.
Instead of using variant name as check, use this new CONFIG
to make it clear and to allow having toolchain integrated
in zephyr-sdk package.
stdinc dependency in hal_espressif will be worked out and removed
soon.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-05-11 10:47:27 +02:00
Gerard Marull-Paretas 5f5a905784 modules: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all modules code to the
new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:57:47 +02:00
Daniel DeGrasse 58a2b15972 drivers: hwinfo: implemented hardware info support for RT11xx SOC
RT11xx SOC uses same system reset controller as RT10xx series. Add
support for SRC on RT11xx

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-06 11:33:26 +02:00
Peter McShane 41dc7db2d3 modules: Add entry for Microchip mpfs hal
Adding entry in kconfig for Microchip mpfs hal

Signed-off-by: Peter McShane <peter.mcshane@microchip.com>
2022-05-06 11:32:54 +02:00
Yonatan Schachter 29677da91f rpi_pico: Fix compilation for non Linux systems
On non Linux system, the compilation failed because the main
CMake did not pass the CMAKE_SYSTEM_NAME to the bootloader's
CMake. This caused the variable to be empty, instead of being
"Generic".

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-05-05 14:47:23 -05:00
Stephanos Ioannidis 0fb4a3566b modules: cmsis_dsp: Fix missing common tables dependency for SVM
This commit adds the missing common tables dependency for the SVM
functions.

The `exp_tab` and `exp_tab_f16` tables are required by the SVM
functions when the MVE is enabled.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-05 11:58:11 +09:00
Stephanos Ioannidis 2c47a919af modules: cmsis_nn: Move Kconfig prompt out of CMSIS-DSP menu
The `CMSIS_NN` Kconfig previously depended on the `CMSIS_DSP` Kconfig,
and this placed the "CMSIS-NN Library Support" prompt under the "CMSIS-
DSP Library Support" menu (note that CMSIS-DSP is a menuconfig).

Since the CMSIS-NN library, although it requires the CMSIS-DSP library,
is not a subordinate component of the CMSIS-DSP library, remove its
dependency on `CMSIS_DSP` and make it select the Kconfig symbol
instead.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-04 18:57:41 -04:00
Jan Peters 253cec5c95 drivers: counter: add driver for NXP QTMR counters
The driver is implemented using the MCUXpresso SDK.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2022-05-03 20:41:23 -05:00
Øyvind Rønningstad 619fce9e0f modules: zcbor: kconfig: Disallow ZCBOR_VERBOSE with MINIMAL_LIBC
Because Minimal LIBC doesn't have PRIuFAST32 and PRIxFAST32 which is
needed when printing traces in zcbor.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2022-04-28 16:18:28 +02:00
Robert Lubos bbba7c951d modules: mbedtls: Extend generic config with SSL cache
Add Kconfig configuration options which allow to configure
session caching in mbed TLS.

Note, that mbed TLS only takes care of server-side caching, the
application (socket layer) needs to implement a session storage for
client.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-04-28 11:31:07 +02:00
Carles Cufi ac6a8e791f modules: zcbor: Add Kconfig options to match the zcbor ones
Add Kconfig options to enable/disable features that are exposed in zcbor
via ZCBOR_ macros that are typically set via -D statements to the
toolchain.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-04-20 09:50:37 +02:00
Henrik Brix Andersen 38ee953547 modules: canopennode: can_get_max_filters() is optional
Support for the can_get_max_filters() API function is optional and may
not be supported by all drivers.

The check for an adequate amount of filters is just there in order to
fail early. If the driver does not support can_get_max_filters(),
reporting of a failure will be delayed until a filter addition fails.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-19 11:47:40 +02:00
Rui Sousa e5848129be modules: cmsis: fix Cortex-A support
CMSIS Cortex-A only supports AARCH32, remove dependency on
AARCH64 Cortex-A.

Signed-off-by: Rui Sousa <rui.sousa@nxp.com>
2022-04-18 17:22:51 -07:00
Yuval Peress aaf0c6e827 modules: chre
Add initial build rules for CHRE. This change includes a Kconfig and
CMakeLists.txt to begin compiling code from the CHRE module.
Additional files are included to bridge the APIs from CHRE's to
Zephyr's. These can be found in modules/chre/include and
modules/chre/src.

Additionally, add a sample to make sure that the module builds. It can
be built via:

```
$ west build -b native_posix -p=always samples/application_development/chre
```

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-18 13:21:52 -05:00
Jimmy Brisson e7e78cba14 tfm: Kconfig: Configure MCUBOOT_DATA_SHARING explicitly
Previously, MCUBOOT_DATA_SHARING was enabled when BL2 was built
and when the firmware update partition was present. This is not
the only situation that you might be interested in this data
sharing. The data sharing now has it's own Kconfig.

Further, use of the firmware update partition requires data
sharing, so it selects it.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Jimmy Brisson 0dcd6bd58a modules-tfm: Configure image versions with KConfig
Previously, you were required to set the image versions through the
CMake variables TFM_IMAGE_VERSION_{S,NS}. For better integration with
the rest of the zephyr build system, these are now KConfig variables
with the same name.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Kevin Townsend eacae5e4e9 samples: tfm: PSA firmware update sample
This commit adds a sample application demonstrating how to use
the PSA Firmware Update API from TF-M. It also enables the
`FIRMWARE_UPDATE` partition to be included at build time.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Eduardo Montoya b25de879e8 modules: mbedTLS: deselect unneeded hashes for OpenThread
SHA256 and SHA512 hashes are not needed for OpenThread.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2022-04-08 15:50:53 -07:00
Yuval Peress 1ec0c6f530 build: make non zephyr/ include prefix configurable
Add a Kconfig to disable non prefixed includes. By setting
`CONFIG_LEGACY_INCLUDE_PATH=n` developers can disable having
`include/zephyr` in the search path. This means that includes such
as `#include <kernel.h>` will no longer work.

Internally, every header should be updated to add the `zephyr/`
prefix to the headers. Only then, will developers be able to use
this config value for their applications.

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Yuval Peress 53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Carles Cufi 8257b0e3f5 modules: tinycbor: Deprecate the module
See #40591 for details, TinyCBOR (or rather the fork of TinyCBOR that we
had) is being replaced by zcbor.

Closes #40591.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-04-08 15:58:49 +02:00
Dominik Ermel 22c32cfbb4 modules: Add zcbor Kconfig and cmake recipe
The commit adds files for the zcbor to be built as module.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-04-06 10:59:45 +02:00
Joakim Andersson dcaf8dab14 tfm: Add configuration for BL2 not supported
Add configuration for BL2 not supported. In some configurations
BL2 will not be supported. Provide a way to deselect BL2 support.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-04-04 18:16:41 +02:00
Andrzej Głąbek 451a6ed6ab modules: hal_nordic: Refactor nrfx related Kconfig options
Change dependencies of the Kconfig options that enable particular nrfx
drivers so that the drivers and their instances are available when
a devicetree node with a corresponding compatible property exists,
no matter if it is enabled or not.
Change the options that enable compilation of multi-instance drivers
to be promptless helpers only (not directly configurable for users),
as they need to be enabled only together with some options that enable
particular instances of a given driver, and those options select them
as needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Joakim Andersson 201433892c tfm: Fix crash in TF-M when non-secure IRQ is using FPU
Fix crash in TF-M when non-secure IRQ is interrupting the secure
processing and using the FPU.

The FPU context must be saved when
ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is disabled since an IRQ handler
can still access the FPU registers.

Fixes: #43587

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-04-01 12:38:01 -05:00
Casper Bonde d03d2d854b Bluetooth: LC3: Addition of liblc3codec for LE-Audio as a module
Initial addition of the LC3 codec as a module. Usage of the module
will be seperate commits.

Even though this codec is a generic audio codec, it is tagged with
Bluetooth: as it can only be used for LE-Audio. Using the codec for
other purposes is a violation of the granted rights for the codec.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
2022-03-30 14:18:01 +02:00
Emil Obalski d877e1dded ipc_service: Automatically include source files for backends
The purpose of this change is to allow to enable more than one
backend at once by removing choice from ipc-service backend Kconfig
and depending backend Kconfig option on existing of correct compatible.

Overwriting IPC_SERVICE_BACKEND option in some places is removes
as no longer needed.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-03-29 12:30:50 -07:00
Joakim Andersson f8fc1f5b72 tfm: Fix TF-M nonsecure interface disptach handling in pre kernel
Fix TF-M nonsecure interface dispatch handling when calling secure
service before the kernel is fully active.

This fixes crash in nordicsemi_nrf53_init, which is called with
PRE_KERNEL_1, when calling soc_secure_gpio_pin_mcu_select.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-03-28 12:47:27 +02:00
Henrik Brix Andersen 2f43226b3d modules: canopennode: CANopenNode does not support CAN-FD
The CANopenNode stack does not support CAN-FD. Depend on it being
disabled and explicitly disable it in the CANopenNode sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-25 15:35:10 -07:00