Commit graph

1091 commits

Author SHA1 Message Date
Ioannis Glaropoulos 81e9ea5cad config: using CONFIG_MBEDTLS_USER_CONFIG_FILE as safeguard
Now using CONFIG_MBEDTLS_USER_CONFIG_FILE instead of
CONFIG_MBEDTLS_USER_CONFIG_ENABLE for inclusion of user config file.

The Kconfig MBEDTLS_USER_CONFIG_ENABLE setting now now determines if
MBEDTLS_USER_CONFIG_FILE is visible.

This removes the problem of MBEDTLS_USER_CONFIG_FILE to be stuck on its
first value.

Users can use MBEDTLS_USER_CONFIG_ENABLE to get the prompt and define
their own value.

As the CONFIG_MBEDTLS_USER_CONFIG_FILE is default promptless then we can
use this setting directly as it will only be defined if another Kconfig
file specifies a default value to use, or user enables:
MBEDTLS_USER_CONFIG_ENABLE.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 15:24:23 -05:00
Torsten Rasmussen 5888428541 mbedtls: kconfig: created MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE
Introducing MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE settings.
The MBEDTLS_PROMPTLESS can be set to true whenever configuration of
mbedTLS is done from a subsystem or module.

Such an example is OpenThread, which selects mbedTLS for some predefined
crypto settings using OPENTHREAD_MBEDTLS=y.

Unfortunately, extensive use of select can easily cause stuck symbol
syndrome making it harder than neccesarry for users to later reconfigure
as they easily get stuck in incompatible configurations.

Providing a MBEDTLS_PROMPTLESS allows such configurations to disable the
MBEDTLS prompt itself when selected but avoid stuck symbol if user
select another security configuration.

Similar with CUSTOM_MBEDTLS_CFG_FILE which ensures that user must
explicitly select this symbol before providing a custom mbedTLS config
file.

Today, other parts the Kconfig tree may set a default value for
MBEDTLS_CFG_FILE but that value is stuck and thus changed Kconfig
selections elsewhere in the tree will not adjust the value.

Introducing CUSTOM_MBEDTLS_CFG_FILE ensures it is known when the user
has provided the value.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 15:24:23 -05:00
Torsten Rasmussen c5097101f3 mbedtls: kconfig: MBEDTLS_USER_CONFIG_FILE default without a prompt
This commit removes the prompt from MBEDTLS_USER_CONFIG_FILE unless
MBEDTLS_USER_CONFIG_ENABLE is true.

This fixes issues where other parts would specify a default value for
MBEDTLS_USER_CONFIG_FILE that would become stuck and not updated if
user re-configured the system using menuconfig.

Disabling the prompt ensures that only when a user specifically enables
MBEDTLS_USER_CONFIG_ENABLE and specify a custom user value in
MBEDTLS_USER_CONFIG_FILE the setting will be fixed.

Also updates the manifest with related change in the mbedtls project.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 15:24:23 -05:00
David Brown 4164b17034 modules: mbedtls: Enable PKCS1 v2.1
This Mbed TLS configuration option was being selected based on a
non-existent Kconfig option, and hence would never be defined.  v2.1 of
PKCS1 was published in 2003.  Use of v1.5 has been deprecated since
2016, and should not be used in new or existing designs.

Enable the v2.1 version in any situation where RSA is used for
signatures.  In the future, we should disable v1.5 entirely, but only
after all uses have been determined and possibly corrected.

No significant weaknesses have been found in v1.5, however v2.1 has a
significant security proof.  However, v2.1 does require an entropy
source, which may be an issue in some embedded device situations (which
likely are problematic for other cryptographic reasons).

Signed-off-by: David Brown <david.brown@linaro.org>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos c5b4094cfb modules: tf-m: do not expose TF-M NS interface include directories publicly
Instead of exposing publicly the TF-M NS interface include
directories, we include them when we build relevant projects.
This is required, as the TF-M include directories contains
psa crypto sources that are also provided by the mbedtls
crypto module. The downside of this solution is that the
TF-M includes need to be added explicitly in each application
that uses TF-M APIs.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos d0073fdf7e modules: trusted-firmware-m: add path for mbedcrypto
Define the MBEDCRYPTO_PATH variable for the TF-M build,
so the latter can used a checked-out version of mbedtls,
instead of pulling an external tree during build time.
This will make Zephyr builds with TF-M must faster.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos 1a7f9598ba modules: mbedtls: updates to reflect module directory restructuring
Updates in CMakeLists.txt to reflect the restructuring
in the module directory. This also bumps mbetls version
to 2.26.0.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos 1eccc71cc2 modules: mbedtls: move the configs into the main tree
Move the mbedtls configs directory in the main tree.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos 67aadc2ef4 modules: mbedtls: add name for implementation choice symbol
Add a name for the Kconfig choice symbol
indicating the mbedtls implementation.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos c48c50db42 modules: mbedtls: move CMakeLists.txt. into the main tree
We move the Zephyr-specific CMakeLists.txt file into
the main Zephyr tree. We also move the zephyr_init.c
source file.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos 39c917788f Revert "mbedtls: kconfig: created MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE"
This reverts commit 1ad1acd7c9.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos 505b03018c Revert "mbedtls: kconfig: MBEDTLS_USER_CONFIG_FILE default without a prompt"
This reverts commit 47fb09210b.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Anas Nashif 0e3771bc82 modules: add segger module locally, and update to 3.30
Move Zephyr related files into modules/ and update to 3.30

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-08 17:06:24 -04:00
Torsten Rasmussen 47fb09210b mbedtls: kconfig: MBEDTLS_USER_CONFIG_FILE default without a prompt
This commit removes the prompt from MBEDTLS_USER_CONFIG_FILE unless
MBEDTLS_USER_CONFIG_ENABLE is true.

This fixes issues where other parts would specify a default value for
MBEDTLS_USER_CONFIG_FILE that would become stuck and not updated if
user re-configured the system using menuconfig.

Disabling the prompt ensures that only when a user specifically enables
MBEDTLS_USER_CONFIG_ENABLE and specify a custom user value in
MBEDTLS_USER_CONFIG_FILE the setting will be fixed.

Also updates the manifest with related change in the mbedtls project.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-08 07:11:00 +02:00
Torsten Rasmussen 1ad1acd7c9 mbedtls: kconfig: created MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE
Introducing MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE settings.
The MBEDTLS_PROMPTLESS can be set to true whenever configuration of
mbedTLS is done from a subsystem or module.

Such an example is OpenThread, which selects mbedTLS for some predefined
crypto settings using OPENTHREAD_MBEDTLS=y.

Unfortunately, extensive use of select can easily cause stuck symbol
syndrome making it harder than neccesarry for users to later reconfigure
as they easily get stuck in incompatible configurations.

Providing a MBEDTLS_PROMPTLESS allows such configurations to disable the
MBEDTLS prompt itself when selected but avoid stuck symbol if user
select another security configuration.

Similar with CUSTOM_MBEDTLS_CFG_FILE which ensures that user must
explicitly select this symbol before providing a custom mbedTLS config
file.

Today, other parts the Kconfig tree may set a default value for
MBEDTLS_CFG_FILE but that value is stuck and thus changed Kconfig
selections elsewhere in the tree will not adjust the value.

Introducing CUSTOM_MBEDTLS_CFG_FILE ensures it is known when the user
has provided the value.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-08 07:11:00 +02:00
Anas Nashif 1af037f477 modules: enable percepio tracerecorder for tracing
Add support for percepio tracealyzer.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-07 22:10:21 -04:00
Torsten Rasmussen b671cf7279 cmake: tfm: support for custom CMake args when building TF-M
This commit allows a subsystem to specify additional CMake flags to be
given to the TF-M build.

The additional CMake flags can be provided through the TFM_CMAKE_OPTIONS
property on the zephyr_property_target.
Using the zephyr_property_target allows Zephyr modules to append extra
TFM_CMAKE_OPTIONS regardless of the CMake processing order.

It splits the ExternalProject_Add into a two step process with the CMake
invocation executed using add_custom_target() and the build process
using ExternalProject_Add(). The reason for this split is because CMake
generator expressions passed through ExternalProject_Add to CMake will
quoted so that `$<TARGET_PROPERTY:<tgt>,<prop>>` becomes
`"-DFOO=bar -DBAR=foo"` instead of `-DFOO=bar -DBAR=foo` which again
results in CMake failures.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-07 13:09:54 +02:00
Jamie McCrae f4350a9303 boards: arm: Add Laird Connectivity BL5340 DVK platform
This adds initial support for the Laird Connectivity BL5340
development kit hardware

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-05-07 09:06:27 +02:00
Øyvind Rønningstad 0500d75c3a tfm: Fix cmake library handling
Make tfm_api a proper Zephyr library and add all sources to it.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-05-05 15:36:32 +02:00
Øyvind Rønningstad aed0643705 trusted-firmware-m: Store FP context before entering secure calls
When ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is enabled, if FPU is
being used (CONTROL.FPCA == 1), store all FP registers before
entering the secure function, and restore them afterwards.

This is needed if any NS thread or ISR that interrupts the secure
function uses FP registers. If they do, a secure UsageFault occurs
unless this change is applied.

This allows k_sched_lock() and k_sched_unlock() to be dropped when
ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is enabled.

Enable ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS by default when
building TF-M.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-05-05 13:00:31 +02:00
Lauren Murphy a010d9152d modules: add tensorflow
Adds Kconfig option enabling TensorFlow Lite Micro support.
Updates manifest with TensorFlow module.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-04-29 08:35:57 -04:00
Mahesh Mahadevan bc0e3492c1 modules: Add OS timer support
OS Timer support

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-21 20:40:24 -04:00
Andreas Vibeto 0cf2753fa3 CMakeLists.txt: Add support for TF-M Non-Secure regression tests
Add new kconfigs
Include the ns-app built by TF-M build system for regression tests
Update tfm_ipc sample to use new kconfig

Signed-off-by: Andreas Vibeto <andreas.vibeto@nordicsemi.no>
2021-04-21 23:18:30 +02:00
Øyvind Rønningstad b220374633 CMakeLists.txt: Add support for running PSA tests
Add necessary libs and files to the build
Add support for new kconfigs
Add Zephyr-only implementations of tfm_log and tfm_ns_interface.
Add zephyr_tfm_psa_test.c for easily running PSA tests.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-04-20 16:13:40 +02:00
Øyvind Rønningstad a0eecfd7f4 tfm: Kconfig: Add configs for PSA tests
Allow adding a PSA test suite to the NS app.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-04-20 16:13:40 +02:00
Ioannis Glaropoulos e75ff8f7fb modules: trusted-firmware-m: fix dependencies for isolation level
Do not allow the TFM_ISOLATION_LEVEL to be non-hidden option,
if the TFM_IPC (PSA_API) option is not set, since, in that case,
only Isolation Level 1 is supported.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-16 13:33:32 +02:00
Pieter De Gendt b6979736ca modules: nanopb: introduce new module
Add the nanopb library and generator tools as a module.
Nanopb is a small code-size Protocol Buffers implementation in ansi C.
It is especially suitable for use in microcontrollers,
but fits any memory restricted system.

Nanopb home: https://jpa.kapsi.fi/nanopb/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-04-08 14:57:55 +02:00
Ioannis Glaropoulos b80ad4c4b3 modules: tf-m: add TF-M profile choice
We add a Kconfig choice for the TF-M profile, in
TF-M's Kconfig file. The reason for that is to be
able to easily enable additional configurations,
depending on the profile type being selected. We
also enhance the documentation of TFM_PROFILE,
stressing that there is now also profile_large
available as an option. TFM_PROFILE is now made
hidden, forcing the users to select one of the
available choice symbols. IF the TFM_PROFILE is
set to something other than "none", then certain
options shall be made hidden, namely, IPC and
isolation level, as they are determined by the
profile setting.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-08 13:26:14 +02:00
Ioannis Glaropoulos 79c1019e85 modules: tf-m: correct dependencies for audit log service
Add a dependency on IPC for the Audit Log secure service,
since the service is not compliant with the IPC model.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-08 13:26:14 +02:00
Ioannis Glaropoulos 70272266f7 Revert "modules: tf-m: disable audit log partition with medium profile"
This reverts commit 6da3d7020e7d2a2ac2d1ed1a6ece9dca3c150339.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-08 13:26:14 +02:00
Jedrzej Ciupis 0a75e0551f modules: hal_nordic: nrf_802154: Fix RADIO IRQ handling configuration
This commit fixes nRF 802.15.4 radio driver IRQ management
configuration.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2021-04-07 14:17:22 +02:00
Rafał Kuźnia 9638876bde modules: hal_nordic: change the SL type prompt
The SL type choice option prompt was renamed to be short and concise.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2021-04-01 14:08:08 +02:00
Rafał Kuźnia 859952f590 modules: hal_nordic: add new nrf-802154 glue cmake
Update revision of hal_nordic which introduces new radio driver
integration scheme.

The glue cmake has been updated to use the new integration scheme
for the nrf-802154 component.

Added config option to exclude radio driver in hal_nordic from the
build process. This allows the radio driver to be supplied from
other sources.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-04-01 14:08:08 +02:00
Rafał Kuźnia 88b1d1f047 modules: hal_nordic: Remove default from SL type choice
The default value is not needed because there is only one choice.
This allows the default choice to be set in a different module.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2021-04-01 14:08:08 +02:00
Ioannis Glaropoulos edd4ab5bf0 modules: tf-m: disable audit log partition with medium profile
When compiling TF-M with profile_medium, disable the support
for Audit Log due to an upstream bug.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Ioannis Glaropoulos 9b9a6a3f52 modules: trusted-firmware-m: lock scheduler around secure calls
Prevent a thread from being preempted, while executing a Secure
function. This is required to prevent system crashes that could
occur if a thead context switch is triggered in the middle of a
Secure call.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Øyvind Rønningstad 6fa608b191 modules: tf-m: Add zephyr native NS interface and logging function
To allow using TFM NS interface without enabling
CMSIS_RTOS V2 support. And to allow using TFM NS
code that uses logging.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Ioannis Glaropoulos e6965b37f0 modules: trusted-firmware-m: initialize the TF-M NS interface
The TF-M NS interface needs to be initialized before
it is used. We add an initialization function that
calls tfm_ns_interface_init(), at boot time, so then
we can use TF-M interface calls (veneers).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Ioannis Glaropoulos 261a659899 trusted-firmware-m: override sys_arch_reboot for non-secure builds
In ARM Non-Secure builds with TF-M it is not, generally,
possible to issue system reset requests from Non-Secure
domain. When the Platform SPM Partition is enabled, the
tfm_platform_system_reset(.) API can be used to request
system resets from TF-M. This commit overrides the weak
sys_arch_reboot() implementation in scb.c so Non-Secure
code is able to issue system resets.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Ioannis Glaropoulos 3fde19ec26 trusted-firmware-m: include interface sources to the build
Instruct CMake to include interface libraries when
building a Non-Secure ARM target with TF-M. In
particular, include the reboot.c source file, which
overrides the sys_arch_reboot implementation.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Øyvind Rønningstad 869978ab0d tfm: Fix TFM_BOARD for MUSCA_B1
Also add it to tfm_ipc so it is built by CI

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-03-26 11:20:10 -05:00
Øyvind Rønningstad 41eedf8ae5 tfm: Adapt to changes upstream
Rename lib.
Disable AUDIT_LOG in regression sample because of a bug upstream.
Update stm32l562e_dk_ns overlay.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-03-26 09:32:56 +01:00
Krzysztof Chruscinski ab49673bc8 drivers: timer: nrf_rtc_timer: Change type of channel argument
There was an inconsistency in the API as z_nrf_rtc_timer_chan_alloc
returned int but other function were using uint32_t for channel
argument. Updated api to use int32_t everywhere.

Update nrf_802154 driver which was using this api to use int32_t.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-03-25 15:54:49 +01:00
Yestin Sun 46cab056bc boards: stm32l562e_dk: Enable TF-M IPC application
This commit enables the TF-M IPC sample application on stm32l562e_dk
board.
It provides device tree flash partition as an overlay in order to
configure and flash the bl2, secure/non secure firmwares.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Yestin Sun 4215955e84 modules: trusted-firmware-m: Allow to adjust hex file base address
This commit allows to append an optional --hex-addr argument to
the wrapper script if speficied. This can adjust the base address
of the output hex file when signing the non-secure or secure
firmware images.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Eduardo Montoya d8932d607d crypto: mbedtls: add enablers for public key layer
Kconfig support for `MBEDTLS_PK_WRITE_C`.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2021-03-17 09:25:04 +02:00
Jukka Rissanen 51beb28ac9 modules: civetweb: Add proper dependency to Kconfig
Make sure that CONFIG_NET_TCP_ISN_RFC6528 is not set when compiling
Civetweb. There are compile issues in Civetweb if both mbedtls and
POSIX API option are set, and this happens if the TCP ISN option is
enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-03-10 14:53:15 -05:00
Rafał Kuźnia ff1594cf05 drivers: ieee802154: Fix problem with binding IRQ handlers in shim layer
The shim layer could in some circumstances not be properly
configured which would result in an unbound radio interrupt
handler.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2021-03-05 12:56:15 +01:00
Rafał Kuźnia dbd66c8096 modules: hal_nordic: move nRF 802.15.4 Radio Driver glue to Zephyr
This commit moves all hal_nordic radio driver code that is
strictly dependent on Zephyr into the Zephyr repository.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2021-03-05 12:56:15 +01:00
Ioannis Glaropoulos 96b1c33cb9 modules: tf-m: introduce option to configure flash binary
Introduce an option to instruct the build system
to flash the Non-Secure (Zephyr) firmware image
together with the TF-M (Secure) firmware image
as a single merged binary, instead of just flashing
the Non-Secure application.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-04 11:26:23 +03:00
Ilya Tagunov 7e4509215d modules: loramac-node: add SX1272 support
Add Kconfig option enabling Semtech-provided SX1272 driver.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2021-02-28 16:36:35 -05:00
Øyvind Rønningstad 5137135ead boards: Consolidate all TFM signing code
Place the new signing code in the TFM module CMakeLists.txt.
Make some small tweaks and add a sentence to the docs.

In the process, make a few changes to the signing code:
- Change some names of files created.
- Minimize the number of files created.
- Use hex files instead of bin files. This is so we don't need to know
  the offset when creating hex files from bin files.

Also add signing for MCUBOOT_IMAGE_NUMBER=1 based on the code from the
v2m_musca_b1 board, though, this board does not build with =1 now
because of (I assume) some flash aliasing which places the S and NS
images 0x10000000 apart, where the manual algorithm places them next to
each other. It builds with =2, though.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-21 18:44:18 +03:00
Ioannis Glaropoulos 007c8539f6 dts: arm: nordic: add QDEC nodes for nrf5340
Add device tree nodes for QDEC peripheral instances
for nRF5340 Application core.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-17 22:34:20 +03:00
Øyvind Rønningstad edfaa3998b tfm: Change TFM_BL2 config from a choice to a bool
The choice allowed for using TFM's own default. We now need full
knowledge over whether BL2 is enabled or not (e.g. to do signing),
so remove this option and simplify to a bool.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-17 19:42:44 +03:00
Håkon Øye Amundsen f52debbd8e modules: trusted-firmware-m: fix incorrect check of <option> args
'IPC' and 'REGRESSION' are passed to the <option>
argument of cmake_parse_arguments, hence they are always defined,
and 'if (DEFINED)' would always return TRUE.

Use 'if' directly instead of 'if DEFINED' to check if these
options are set or not.

Ref: NCSDK-7702

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2021-02-17 15:04:58 +03:00
Håkon Øye Amundsen c097690f2a modules: trusted-firmware-m: add kconfig to enable/disable partitions
Also update tfm module cmake to pass them to the trusted-firmware-m
build system.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2021-02-17 15:04:58 +03:00
Øyvind Rønningstad b49e395277 Kconfig.tfm: Add TFM_MCUBOOT_IMAGE_NUMBER config
Controlling the number of images in TFM's BL2/mcuboot.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-17 10:07:17 +03:00
Øyvind Rønningstad 5f1610eeff Kconfig.tfm: Add TFM_CMAKE_BUILD_TYPE config
Controlling the build type of the TFM build system.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-16 22:58:49 +03:00
Torsten Rasmussen dfa52a3ba7 module: moving TFM CMakeLists.txt into Zephyr repo
This commit moves TFM CMakeLists.txt into Zephyr and relocates the
Kconfig.tfm file under the modules/tfm folder.

Updates the manifest to point to related TFM changes.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-02-16 10:01:36 +01:00
Jedrzej Ciupis bbff645e90 west.yml: Update hal_nordic revision
This commit brings in several latest bugfixes for the hal_nordic repo.
It also removes a Kconfig entry that these changes yield deprecated.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Pawel Kwiek b9c1903d24 modules: Change serialized radio init priority
This commit changes serialized radio initialization
priority. This fixes race condition where serialization
backend would boot earlier than the radio driver itself.

Signed-off-by: Pawel Kwiek <pawel.kwiek@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Adam Zelik 3f2b07fc2f modules: nrfx_glue: Reserve PPI/DPPI resources used by 802.15.4 drv
Mark the PPI/DPPI channels and groups used by the 802.15.4 driver
as occupied and thus unavailable for allocation through nrfx_ppi.

Signed-off-by: Adam Zelik <adam.zelik@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Ioannis Glaropoulos 1e49cccb81 modules: tf-m: remove nRF5340 PDK from the supported TF-M targets
nRF5340 PDK is removed so there is no reason to keep it
in the list of supported tf-m targets.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-15 07:59:43 -05:00
Shlomi Vaknin cca4e89c1f modules: cmsis-dsp: Support compiling on native posix
Support compiling cmsis-dsp on native posix
architectures, as cmsis-dsp allows that.

Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com>
2021-01-27 14:48:37 -05:00
Andrei Gansari c450130446 modules: mcux: HAS_MCUX_IAP_LEGACY config
Adds HAS_MCUX_IAP_LEGACY configuration for legacy LPC IAP flash driver.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2021-01-23 08:01:00 -05:00
Maureen Helm 1883c85abd modules: nxp_imx: Add HAS_MCUX_FLEXSPI
Adds a hidden config symbol HAS_MCUX_FLEXSPI selected by NXP SoCs when
the FlexSPI peripheral is present. It will be used as a dependency for a
new FlexSPI flash driver to prevent users from accidentally enabling the
driver on platforms that don't have the necessary hardware.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-01-22 11:11:54 -05:00
Henrik Brix Andersen c9e02cd394 modules: mcux: add support for indicating the presence of PWT
Add Kconfig option for indicating that a given SoC contains the NXP
Kinetis Pulse Width Timer (PWT).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-20 08:05:57 -06:00
Torsten Rasmussen 3d88083bf1 cmake: zephyr modules: sanitize all module name when used as variable
The introduction of Zephyr module glue code in the Zephyr repository
introduces a Kconfig variable in the form of:
`config ZEPHYR_<MODULE_NAME>_MODULE`.

All Kconfig variables go into `autoconf.h`, therefore it is necessary
to sanitize the Kconfig variable, so that it does not contain special
characters. To ensure consistent variable name, then the module name
will be sanitized in all variable use in both Kconfig and CMake.
The sanitization is done be replacing all special characters with an
underscore, `_`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-20 12:59:19 +01:00
Hubert Miś 6d3cdf5b4a west: hal_nordic: Use RPMsg Service for 802.15.4 serialization
This patch updates hal_nordic module revision to start using RPMsg
Service for serialization of 802.15.4. The serialization module is
implemented in the hal_nordic module.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-01-19 22:07:09 +01:00
Andrzej Głąbek 251648afb4 modules: Move nrfx glue code to main Zephyr repository
Move nrfx glue code (nrfx integration files, related Kconfig entries,
and related part of CMakeLists.txt taken from the hal_nordic module)
to modules/hal_nordic/nrfx/ directory.
CMakeLists.txt located in modules/hal_nordic/ is now the main cmake
file for the hal_nordic module. It points back to cmake stuff related
to the nRF IEEE 802.15.4 driver that still remains in that module and
it adds the extracted nrfx part as a subdirectory.
Kconfig.nordic is renamed to Kconfig and moved to modules/hal_nordic/.
It sources nrfx related entries from that separate file.

Update also the manifest to point to accordingly modified hal_nordic
revision.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-01-19 17:35:04 +01:00
Torsten Rasmussen 3673e288bd modules: introducing MODULE_EXT_ROOT to allow glue code in Zephyr repo
This commit introduces MODULE_EXT_ROOT which allows CMake and Kconfig
glue code to be placed outside of the Zephyr module repository.

This allows for placing glue code in Zephyr, but also allows users to
specify custom MODULE_EXT_ROOTs for glue code using either
`-DMODULE_EXT_ROOT` or `zephyr/module.yml` with
`build:settings:module_ext_root` settings.

MODULE_EXT_ROOT' is a list of directories, similar to other roots such
as BOARD_ROOT, DTS_ROOT, etc.
The Zephyr repo folder ${ZEPHYR_BASE} is always to the MODULE_EXT_ROOT
list as lowest priority.
For each MODULE_EXT_ROOT, the file
`<module_ext_root>/modules/modules.cmake` will be processed.

In Zephyr repo, the folder `modules/<module>/` contains CMakeLists.txt
and Kconfig glue code for the Zephyr module.

A Zephyr module can specify that CMakeLists.txt and Kconfig glue code is
placed in an external module root by specifying:
```
build:
  cmake-ext: True
  kconfig-ext: True
```

It is still possible to place the CMakeLists.txt and Kconfig files
directly in the Zephyr module using the existing:
```
build:
  cmake: <path>
  kconfig: <file>
```.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-18 18:02:46 +01:00
Andrzej Puzdrowski 049dac2a8a modules: introduce MCUBOOT_BOOTUTIL module
Some parts of subsys/dfu/boot code are re-implementations of
what is implemented in the MCUBoot repository.

Mcuboot's repository already provide implementation of function
required for application for interact with the MCUboot.

This patch introduces new MCUBOOT_BOOTUTIL module which covers
common code which is used in the bootloader and the chainnloaded
application.

dfu/boot: use MCUBoot's source code

Module was reworked so it start using MCUBoot's
bootutil_public API instead of copied code.

Reworked boot_is_img_confirmed() used MCUBoot's API
for determine image_ok flag.

mcuboot_shell switchd to use MCUboot's boot_read_swap_state_by_id()
This is MCUBoot function, use it for avoid linking conflict.

test/subsys/mcuboot: fix `test_write_confirm`

dfu/boot library was reworked so it uses MCUboot's bootutil_public
library whenever it can.
The library required that image was marked as copy-done before it
can be pending.
This patch adds such mark which fixes the test.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-01-14 18:03:38 +01:00
Andy Ross 0c80862eb0 modules: Add Sound Open Firmware module
Add the Sound Open Firmware project as a Zephyr module under
modules/audio/sof.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-06 07:53:46 -06:00
David Vincze 79cac4e58d arm: V2M Musca-S1: Add Musca-S1 SoC and board support
Musca-S1 is a Cortex-M33 based SoC. It's similar to the
Musca-B1, but among other things the embedded flash has
been replaced with embedded MRAM (eMRAM) memory.

The Musca-S1 files have been created based on the Musca-B1
SoC and board files.

Add the Musca-S1 board to the list of allowed platforms
for the TF-M integration examples.

Change-Id: I4f517d28d0a5b8c4a3fc3fab73adb5519acfc3c2
Signed-off-by: David Vincze <david.vincze@linaro.org>
2020-12-20 13:03:49 -05:00
Henrik Brix Andersen 060d815978 modules: mcux: add support for NXP MCUX ACMP
Add support for indicating that a SoC contains the NXP MCUX Analog
Comparator (ACMP) IP.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-12-17 08:54:33 -06:00
Hubert Miś d35d26d250 drivers: ieee802154: Reserve TIMER used by 802.15.4 driver
Use new Kconfig structure to marks which TIMER peripheral is reserved by
802.15.4 radio driver. It prevents peripheral usage collisions.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2020-12-15 11:22:56 +01:00
Czeslaw Makarski 44751a1063 modules/Kconfig.nordic: Allow using direct 802.15.4 calls for nRF53
This PR allows the use of direct IEEE 802.15.4 nRF Driver calls
in case a serialized (nRF53) version of the Radio Driver is used.

Signed-off-by: Czeslaw Makarski <Czeslaw.Makarski@nordicsemi.no>
2020-12-08 10:49:28 -06:00
Andrei Gansari 8f7d73900d modules: tfm: BL2 default comment
Adds a comment regarding the effect of TFM_BL2_CONFIG_FILE_DEFAULT on
building TFM images.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-12-04 15:06:56 +02:00
Ioannis Glaropoulos 060f17a5af modules: tfm: add required selection and dependencies
BUILD_WITH_TFM needs to depend on
ARM_TRUSTZONE_M, which is selected
by the SoC or Board definition. In
addition to that we add an imply
statement for INIT_ARCH_HW_AT_BOOT
because Zephyr will be chain-loaded
by TF-M, and needs to cleanup its
core ARCH registers that might be
left in non-reset state.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-12-01 14:19:03 +02:00
Ioannis Glaropoulos 0924cb55df modules: tfm: cleanup redundant Kconfig symbol selection
When we select BUILD_WITH_TFM we do not
really need to enable by default the
options THREAD_NAME, THREAD_STACK_INFO,
INIT_STACKS and THREAD_MONITOR, so we can
clean them up. We also remove CMSIS_RTOS_V2
for the same reason.

We also cleanup the default value for
NUM_PREEMPT_PRIORITIES, which does not
seem to be needed.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-12-01 14:19:03 +02:00
Wentong Wu c85d353ca4 logging: add STP transport and raw data output support for syst
Add STP transport support for MIPI SyS-T with Kconfig MIPI_SYST_STP,
this is following SyS-T spec Section 7.
And with Kconfig MIPI_SYST_RAW_DATA, add raw data output support for
MIPI SyS-T protocol stack.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-11-17 10:09:19 -06:00
Marcin Niestroj 480a682220 modules: mbedtls: introduce MBEDTLS_MEMORY_DEBUG option
This option allows enable mbed TLS debugging of buffer allocator memory
issues.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-11-17 10:02:17 -06:00
Andrei Gansari a0aa6e085e modules: tfm isolation and profile
Add TFM_PROFILE and TFM_ISOLATION_LEVEL options. Options are used to set
up custom board configurations, i.e. LPC55S69 uses medium_profile to fit
TFM images in a small flash area.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-11-17 17:26:20 +02:00
Ioannis Glaropoulos 30b44e276b tf-m: Add help text in some un-documented TF-M Kconfig options
Add help text in some newly introduced and un-documented
TF-M Kconfig options: REGRESSION and IPC.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-17 14:39:52 +02:00
Øyvind Rønningstad a28da5118d tfm: Configure TFM via Kconfig instead of Cmake
Add Kconfig options that will be used by the module
to call the function with the desired parameters.
Refactor the tfm_integration samples and
the supported boards.

Update west.yml to bring in Cmake changes that use the new KConfigs.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-11-17 14:39:52 +02:00
Hubert Miś 9ec8aec794 samples: boards: nrf: ieee802154: New serialization sample
A new sample exposing IEEE 802.15.4 radio controller using serialization
over IPM drivers.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2020-11-17 09:56:25 +01:00
Jedrzej Ciupis 15fdd7175b drivers: ieee802154: Add support for IEEE 802.15.4 for nRF5340
This commit introduces support for IEEE 802.15.4 on nRF5340.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2020-11-16 15:24:03 +01:00
Czeslaw Makarski b6b613d4db modules: nordic: Introduce nRF IEEE 802.15.4 Service Layer selection
This patch introduces the nRF IEEE 802.15.4 Service Layer configuration.

Signed-off-by: Czeslaw Makarski <Czeslaw.Makarski@nordicsemi.no>
2020-11-16 15:24:03 +01:00
Øyvind Rønningstad cb3ec9d759 Kconfig.tfm: Improvements and fixes
Make it easier to add TF-M in an app by selecting and implying the
necessary configs so the app doesn't have to specify the configs itself.
Remove unneeded configs from the prj.conf files in the tfm samples.

Also, fix case in key file name.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-11-13 21:23:57 +02:00
Alexandre Bourdiol d9798b9022 modules: Delete switches USE_STM32_HAL_RCC and USE_STM32_HAL_RCC_EX
With STM32Cube updates
https://github.com/zephyrproject-rtos/hal_stm32/pull/75
'..._hal_rcc.c' and '..._hal_rcc_ex.c' are now systematically
compiled, due to more and more dependencies from HAL IP on rcc.
So USE_STM32_HAL_RCC and USE_STM32_HAL_RCC_EX becomes useless.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-28 09:28:15 -05:00
Jakub Pegza 3292b50be9 modules: Add nrf 802.15.4 radio drv buffer config
Add configuration options for chaning number of buffers used by nRF
802.15.4 radio driver.

Signed-off-by: Jakub Pegza <Jakub.Pegza@nordicsemi.no>
2020-10-23 13:20:45 +02:00
Maureen Helm 7bebab862c soc: arm: Refactor i.mx rt device configuration data default
Refactors the i.mx rt soc series to enable device configuration data
(DCD) by default when the smart external memory controller (SEMC) is
present. This is in preparation for removing the DATA_LOCATION Kconfig
symbol and using a device tree chosen node instead.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-10-22 09:32:11 -05:00
Emil Hammarstrom ec00feef35 net: lib: sockets: added ALPN extension option to TLS
Adds the socket option TLS_ALPN_LIST for SOL_TLS sockets

Passes the configured alpn list to the mbedtls config
on mbedtls init

Signed-off-by: Emil Hammarstrom <emil.hammarstrom@assaabloy.com>
2020-10-22 11:35:43 +03:00
Ioannis Glaropoulos 64ecac692c modules: trusted-firmware-m: update default RSA keys
Update the default paths to private keys used
for signing the Secure and the Non-Secure firmware,
when building Zephyr together with TF-M. The update
is done to match the default configuration in
the upstream TF-M project.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Mahesh Mahadevan a3341dd347 modules: Add config for LPC clock control
Add a config for MCUX LPC clock control

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Armando Visconti de5135b05e modules/hal_st: Align sensor drivers to stmemsc HAL i/f v1.03
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v1.03.

Requires https://github.com/zephyrproject-rtos/hal_st/pull/5
(merged as b52fdbf4b62439be9fab9bb4bae9690a42d2fb14)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-10-13 09:46:08 -05:00
Toby Firth dc37f988e0 drivers: adc: added support adc driver for lpcexpresso55s69
Added shim driver for the LPADC for lpcexpresso55s69 board.

Fixes #22703.

Signed-off-by: Toby Firth <tobyjfirth@gmail.com>
2020-10-12 14:59:40 -05:00
Manivannan Sadhasivam 3ce8540f3a lorawan: Add initial support for LoRaWAN
Add initial support for LoRaWAN based on Semtech's loramac-node
library. Current implementation only supports OTAA config and
sending data to LoRaWAN server like ThingsNetwork.

While at it, this commit also moves the "loramac-node" library
definition from drivers/lora to subsys/lorawan. This is required
because, subsys/lorawan gets processed before drivers/lora and
that creates issue while building.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Andrzej Głąbek 8d7fee4e4a modules/Kconfig.nordic: Do not select HAS_CMSIS_CORE through HAS_NRFX
The HAS_NRFX Kconfig option is selected also for the nrf52_bsim board,
where the nrfx drivers are compiled for a simulated target, without
CMSIS. Thus, selecting HAS_CMSIS_CORE in such case is inappropriate.
This patch removes then the selection of the HAS_CMSIS_CORE option from
HAS_NRFX. When the nrfx drivers are built for a real SoC, where CMSIS
is actually used, the option will get selected by the CPU_CORTEX_M one.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-09-23 17:12:01 +02:00
Ioannis Glaropoulos 3758b3328c modules: tfm: make BL2 header in non-secure image configurable
When we build Zephyr for a Non-Secure image, using TFM
as the Secure counterpart, we may or may not use BL2 (e.g.
MCUboot in TFM). If we build with BL2 we need to account
for a ROM offset before the start of the non-secure image
where TFM BL2 expects the BL2 header. This offset is not
needed when TFM is built without BL2. We use the existing
Kconfig options to determine whether we need a ROM offset
or not. We use the value of 0x400 for the BL2 header,
which is the default value used in TFM, but the option is
non-hidden, allowing the user to overwrite the default
value if needed.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-09-22 19:38:51 +02:00
Jukka Rissanen eb3288d5b1 modules: mbedtls: Allow to enable server name indication option
Allow user to enable RFC 6066 server name indication (SNI) in SSL.

Fixes #27783

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-09-15 09:52:44 -05:00
Jan Kowalewski 44bbd1ea3d modules: add Kconfig for QuickLogic EOS S3 module
Add proper Kconfig for external QuickLogic module.

Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
2020-09-04 14:48:49 -04:00
Andrei Gansari 37d2ad68e8 modules: tfm BL2 configurable
Make BL2 setting configurable via Kconfig choice.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-09-04 10:36:42 -05:00
Andrzej Głąbek 76745bc085 modules/Kconfig.nordic: Enable NRFX_USBREG together with NRFX_POWER
On SoCs featuring the USBREG peripheral, the nrfx_power driver uses
the nrfx_usbreg one internally, so enable the latter when the former
is enabled.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-09-03 21:52:52 +02:00
Mahesh Mahadevan f75f8bec20 MXRT600: Add DMA support
Add DMA support for MCUX LPC SoC's

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-08-28 14:24:21 -05:00
Karol Lasończyk b740d3bdd9 modules: hal_nordic: Update nrfx to version 2.3.0
This PR updates the hal_nordic module revision, to switch to nrfx 2.3.0
and adds new configuration option to enable two stage LFCLK start
sequence.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2020-08-25 09:29:38 +02:00
Hake Huang f976de4767 counter: enable pit support for k8x series
enable PIT in k8x series

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-08-21 14:27:59 -05:00
Manivannan Sadhasivam 75449602bc modules: Add RDC module for MCUX family
RDC module is used by i.MX8MM SoC, so let's create a Kconfig symbol
which will be used to enable the module in SDK.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-08-14 14:51:50 -05:00
Jedrzej Ciupis af0b1098e4 modules: nordic: add 802.15.4 multiprotocol support
This commit adds a NRF_802154_MULTIPROTOCOL_SUPPORT Kconfig switch
that makes it possible to use nRF 802.15.4 radio driver in
a multi-protocol scenario.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2020-08-13 10:44:36 +02:00
Jiří Keresteš 3a87517c5e drivers: watchdog: mcux_wwdt: add driver for NXP LPC 55xxx WWDT
Adds shim driver for LPC 55xxx Windowed Watchdog Timer (WWDT).

Also updates the "Supported features" table in LPCXpresso55S69
board documentation page.

Fixes #22704.

Signed-off-by: Jiří Keresteš <jiri@kerestes.cz>
2020-08-04 15:13:25 -05:00
Andreas Sandberg 6a4ebe5949 drivers: lora: Add SX126x LoRa radio support
Add support for the SX126x series of LoRa radios using the
LoRaMAC-Node HAL.

This driver currently makes the following assumptions:

  * DIO1 is used as an interrupt line.

  * There is an RF switch selecting between the TX and RX ports and
    that switch is controlled by DIO2.

  * There is either no TCXO or the TCXO is controlled by DIO3.

Specifically, the limitations above mean that modules that use GPIOs
to control the RF switch are currently not supported. Support for such
modules would need changes to the LoRaMAC-Node code.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-07-02 08:32:37 -04:00
Saravanan Sekar 4a5a165e0c soc: arm: add support for nuvoton numicro m48x series
Add initial support for nuvoton numicro m48x SoC series, basic
init and uart functionality are covered with gpio and clock
directly relies on HAL.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2020-07-01 21:09:25 +02:00
Marek Porwisz 81e0a05285 net: openthread: Simplify openthread enabling
Currently user needs to specify quite much additional options to enable
OpenThread support. He also needs to set ip address count,
heap size, etc depending on features enabled.
Nade changes to automatically select/set some of the options on
enabling OpenThread

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
2020-06-30 07:48:08 -04:00
Hake Huang 10fc7a38cc dma: add EDMA MCUX support for RT and k6s
tested on mimxrt1060_evt
  MEMORY_NOCACHE is needed
test on frdmk64f
  special test slot need configure with
  CONFIG_DMA_TEST_SLOT_START

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-06-12 13:03:28 -05:00
Robert Lubos bc5b05f223 modules: mbedtls: Add Kconfig entry for MBEDTLS_MD and MBEDTLS_CIPHER
Due to new checks in mbedTLS config sanitizer, TLS option can no longer
be left enabled, when TLS is not used. OpenThread needs MBEDTLS_MD_C
and MBEDTLS_CIPHER_C even without TLS being used, so we need an option
to enable them manually.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-06-02 15:24:36 +02:00
Karl Zhang fec5ed6077 trusted-firmware-m: Add initial plumbing for TFM
This commits adds a config option to build a PSA trusted-firmware-m
(TF-M) application image for the secure processing environment, and
configures the Zephyr application image for the non-secure processing
environment. The secure and non-secure environment images will be
linked together via the veneer function table that is produced as an
artifact of the TF-M build process.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2020-05-09 16:21:51 +02:00
Parthiban Nallathambi b687d76d09 soc: arm: add infineon_xmc series support
Add infineon xmc series with XMC4500 support. XMC series comes with,
- CPU operates upto 120MHz
- 3 RAM (PSRAM1 - code, DSRAM1 - data and DSRAM2 - communiation)
- upto 1MB flash

init: clock control & gpio is not done, so SoC initialization directly
relies on HAL. Core operating clock is stored in no_init section, which
is kept under DSRAM1. Only DSRAM1 is used until clock support. Using
PSRAM1 and DSRAM1 needs adaptation in linker script - planned for next
revision.

Note: SystemInit cannot be consumed directly due to vector table +
HAL linker dependency.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-05-09 14:21:44 +02:00
Erwan Gouriou 6ea53792f4 modules: stm32: Rename lib Kconfig symbol
Both ST and STM32 modules where using same HAS_STLIB Kconfig
symbol.
Now that each module is createing is own lib, we need to be able
to distinguish libs.

Depends on zephyrproject-rtos/hal_stm32/pull/52

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-09 13:08:42 +02:00
Robert Lubos 2c2771970e modules: mbedtls: Update mbedTLS commit and apply fixes
Update mbedTLS commit along with the following fixes:

* Fix naming inconsistencies in some cipher modes, to match core mbedTLS
  configs
* Add Kconfig to enable CTR cipher mode

Fixes #22421

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-05-07 23:46:08 -05:00
Andrei Gansari 97d940cf33 modules: adds HAS_MCUX_RNG
New RNG module used by LPC family devices as random number generator.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Alex Porosanu 7187d624a7 soc: kinetis: add support for TPM PWM module
Some Kinetis SoCs have an instance of the the TPM module
that can be used for PWM control. As such, add the necessary
configurations to enable it on the SoCs that support it, as well as
enable the clock for the module to function.

In this case, the enablement is done only for the KW41Z SoCs,
but there are other SoCs that support it, f.i. KW38Z

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2020-05-06 11:33:37 -05:00
Henrik Brix Andersen 1a59239880 modules: mcux: add option for indicating presense of a DAC module
Add option for indicating that a NXP Kinetis SoC contains a
Digital-to-Analog (DAC) module.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen b8fad5b8f8 modules: mcux: add option for indicating presense of a DAC32 module
Add option for indicating that a NXP Kinetis SoC contains a
Digital-to-Analog (DAC32) module.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Stephanos Ioannidis b0041fc58c modules: cmsis: Add CMSIS-DSP configurations
This commit introduces the Kconfig configurations for the CMSIS-DSP
digital signal processing library.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-22 12:08:28 -05:00
Stephanos Ioannidis f40fc4a3bf modules: cmsis: Add CMSIS-Core(A) configurations
This commit updates the west.yml to point to the commit that adds the
CMSIS-Core(A) and defines the configurations to enable it, in
preparation for the AArch32 Cortex-A architecture support in Zephyr.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-09 16:24:05 +02:00
Robert Lubos d657c6bf57 drivers: ieee802154_nrf5: Add CSMA CA transmit capability
Add CSMA CA capability for the `ieee802154_nrf5` radio driver along with
appropriate implementation in the `nrf5_tx` function.

Introduce 802.15.4 radio driver with CSMA/CA support enabled. Add help
text, mentioning a list of peripherals occupied by the radio driver.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-04-03 14:07:41 +03:00
Kumar Gala 12ca04b31f ipc: openamp: Expose config options for MASTER/SLAVE builds
We can build the openamp library configured with VirtIO master
support, VirtIO slave support, or both.  By default both master
and slave code is enabled.  We can reduce code footprint by only
build master or slave as needed.

Expose Kconfig options for Master & Slave and set them accordingly in
the sample.

Here's the code reduction we see:

For the total image we see as 1260 byte reduction:
Memory region         Used Size  Region Size  %age Used
 FLASH [Master & Slave]:       30308 B       256 KB     11.56%
 FLASH [Master only]   :       29048 B       256 KB     11.08%

On the remote side we see a 828 byte reduction:

Memory region         Used Size  Region Size  %age Used
 FLASH [Master & Slave]:       11564 B        64 KB     17.65%
 FLASH [Slave only]    :       10736 B        64 KB     16.38%

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-27 15:20:25 -05:00
Henrik Brix Andersen 4dd1151b48 modules: mcux: add support for NXP Kinetis LPTMR
Add support for indicating that a SoC contains the NXP Kinetis Low
Power Timer (LPTMR) module.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-03-27 11:17:58 -05:00
Francois Ramu b5ae23e97b modules: stm32: define new symbol for ETH extended
This add the new symbol CONFIG_USE_STM32_HAL_DMA_EX

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-03-27 08:34:19 -05:00
Francois Ramu 97e333d4c3 modules: stm32: define new symbol for PSSI
This add the new symbol CONFIG_USE_STM32_HAL_PSSI
for the Parallel Synchronous Slave Interface

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-03-27 08:34:19 -05:00
Carles Cufi 3f6078ec41 ext: crypto: Remove TinyCrypt from the tree and use a module
Use an external TinyCrypt repo instead of keeping a copy in
ext/hal.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-20 17:29:48 +01:00
Carles Cufi 4181d41643 ext: hal: Remove Altera HAL from the tree and use a module
Use an external Altera HAL repo instead of keeping a copy in ext/hal.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-20 09:07:16 -04:00
Carles Cufi ba0aea3cd3 arm: Remove CMSIS from the tree and use a module
Use an external CMSIS repo instead of keeping a copy in ext/hal.

Closes #23373

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-19 22:32:38 +01:00
Dominik Ermel 08c8dc7e27 subsys/mgmt: Enabling mynewt-core version of tinycbor
This PR provides changes that are required after replacing Tinycbor
with copy of source code from mynewt-core.
The Tinycbor has been replaced with mynewt-core version to reduce
maintenance effort; by replacing it the Zephy specific changes have been
reduced to small patch over mynewt codebase.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-03-17 11:58:18 +01:00
Paul Sokolovsky 29493fdf9b modules: mbedtls: Better help for MBEDTLS_BUILTIN vs MBEDTLS_LIBRARY
More clear and detailed description of choices, and explicit
recommendations for users. Based on a question on the mailing list.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2020-03-10 15:10:15 +02:00
Ulf Magnusson 378d6b137a kconfig: Replace non-defconfig single-symbol 'if's with 'depends on'
Same deal as in commit eddd98f811 ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for the remaining cases outside defconfig
files. See that commit for an explanation.

Will do the defconfigs separately in case there are any complaints
there.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-12 10:32:34 -06:00
Ulf Magnusson 9a6d6a0862 kconfig: modules: Avoid including Kconfig.tls-generic twice
The glob in modules/Kconfig accidentally picked up Kconfig.tls-generic,
which is only supposed to be included from modules/Kconfig.mbedtls.

Replace the globbing with explicit 'source's to fix it. Best to avoid
globbing unless absolutely necessary, because it tends to pick up random
non-checked-in files as well.

Use 'source' instead of 'osource' since the files are known to exists.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-07 17:47:00 +01:00
Ulf Magnusson 7be9972b52 kconfig: modules: Remove redundant MBEDTLS dep on. TLS menu
Kconfig.tls-generic is already 'source'd within an 'if MBEDTLS' in
modules/Kconfig.mbedtls (the 'if' covers most of the file).

Flagged by https://github.com/zephyrproject-rtos/ci-tools/pull/128.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-07 11:50:18 +01:00
Andrzej Głąbek 7899b1f5b6 modules: hal_nordic: Update nrfx to version 2.1.0
Update the hal_nordic module revision, to switch to nrfx 2.1.0.

Because the list of peripherals for nRF5340 has changed as follows:
- SPIM2 has been renamed to SPIM4
- SPIM2-3, SPIS2-3, TWIM2-3, TWIS2-3, and UARTE2-3 have been added
a couple of related corrections needed to be applied in dts and Kconfig
files, plus the spi_nrfx_spim driver has been extended with the support
for SPIM4.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-01-29 15:00:45 +01:00
Robert Lubos 7e7f05546d modules: nordic: Allow separate nRF 802.15.4 radio driver build
So far, nRF 802.15.4 radio driver build was dependent on the 802.15.4
subsystem in Zephyr. While this was a reasonable approach for samples,
it prevented the radio driver from being built as a standalone entity,
which could be useful in some applications (e. g. running core nRF
802.15.4 radio driver tests with Zephyr).

Resolve this, by providing a separate set of Kconfigs for the radio
driver, therefore allowing to build it as a separate entity. The 802154
subsystem simply enables the radio driver module in this case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-28 15:18:42 +01:00
Henrik Brix Andersen ef33cb6d43 modules: add CANopenNode
Include the CANopenNode CANopen stack as a module in Zephyr.
CANopenNode is licensed under the Apache-2.0 license.

This fixes #15278.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-20 17:17:23 +01:00
Andrei Gansari d9a15132bf modules: HAS_MCUX_IAP config
In Application Programming of flash specific to LPC SoCs.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Henrik Brix Andersen ce9141236b modules: vega: add option for indicating the presence of RV32M1 TPM
Add Kconfig option for indicating that a given SoC contains the
OpenISA RV32M1 Timer/PWM module (TPM).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-13 09:12:34 -06:00
Ulf Magnusson 0d6e853edc kconfig: NXP IMX: Remove unused HAS_IMX_{RDC,CCM} symbols
The HAS_IMX_{RDC,CCM} symbols were added to ext/hal/nxp/imx/Kconfig in
commit 3afc2b6c61 ("ext/hal/nxp/imx: Import the nxp imx7 freertos bsp"),
and later copied over to modules/Kconfig.imx in commit 12438e1047 ("ext:
hal: Make NXP HALs a Zephyr module").

Never used.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-03 07:25:49 -06:00
Ulf Magnusson 6ef29c0250 kconfig: Remove some redundant single-item menus and ifs
A single menu within an if like

    if FOO

    menu "blah"

    ...

    endmenu

    endif

can be replaced with

    menu "blah"
            depends on FOO

    ...

    endmenu

Fix up all existing instances.

Also remove redundant extra menus underneath 'menuconfig' symbols.
'menuconfig' already creates a menu.

Also remove the menu in arch/arm/core/aarch32/Kconfig around the
"Floating point ABI" choice. The choice depends on FLOAT, which depends
on CPU_HAS_CPU, so remove the 'depends on CPU_HAS_FPU' too.

Piggyback removing a redundant 'default n' for BME280.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-21 10:26:54 -05:00
Manivannan Sadhasivam 27873977f9 modules: Add LoRaMac Stack and drivers
Add LoRaMac module support for building the LoRaWAN stack and LoRa
drivers provided by Semtech.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-12-21 12:20:24 +01:00
Daniel Leung b61f448a3f xtensa: add support to build HAL as part of build process
This adds the necessary bits to build the Xtensa HAL as
a module, and removes the bits to use the HAL built with
the Zephyr SDK.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-12-18 20:24:18 -05:00
Kamil Piszczek 067351ec13 modules: nordic: pick proper timer for nfct on nrf5340
Added the NFC Timer default for nRF5340.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-12-16 15:44:09 +01:00
Erwan Gouriou ce14186a07 modules: modules: stm32 hal: Provide help section to HAL/LL symbols
Provide a help section for each STM32Cube API Kconfig symbols


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-12-10 12:44:10 -05:00
Erwan Gouriou f5080ce015 modules: stm32 hal: Rename USE_STM32_HAL_CRYPT and _CRYPT_EX
Cf https://github.com/zephyrproject-rtos/hal_stm32/pull/29

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-12-10 12:44:10 -05:00
Maureen Helm a63676761b drivers: spi: Add mcux flexcomm driver
Adds a shim layer around the mcux lpc flexcomm driver to adapt it to the
zephyr spi interface. It leverages heavily from the existing mcux dspi
shim driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-12-10 08:48:56 -06:00
Anas Nashif 28af508552 mbedtls: make all options depend on MBEDTLS
MBEDTLS options were showing up when no mbedtls was used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-15 17:00:13 -05:00
Andrzej Głąbek cf92c31e02 modules: hal_nordic: Update nrfx to version 2.0.0
Update the hal_nordic module revision to switch to nrfx 2.0.0.
Add Kconfig options that enable to use the newly introduced nrfx
drivers in Zephyr.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-11-08 14:54:12 +01:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Karsten Koenig ee2dd7322f drivers: spi: rv32m1: Add driver for RV32M1 LPSPI
Add SPI driver and bindings for LPSPI peripheral for the RV32M1 SOC.
Based heavily on the existing mcux LPSPI driver.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-11-04 14:11:18 -06:00
Sebastian Bøe c03ebe142c libc: Use select REQUIRES_FULL_LIBC instead of select NEWLIB_LIBC
Changed select NEWLIB_LIBC to select REQUIRES_FULL_LIBC.

This fixes #20247

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-11-01 16:40:21 +01:00
Ulf Magnusson 975de21858 kconfig: Global whitespace/consistency cleanup
Clean up space errors and use a consistent style throughout the Kconfig
files. This makes reading the Kconfig files more distraction-free, helps
with grepping, and encourages the same style getting copied around
everywhere (meaning another pass hopefully won't be needed).

Go for the most common style:

 - Indent properties with a single tab, including for choices.

   Properties on choices work exactly the same syntactically as
   properties on symbols, so not sure how the no-indentation thing
   happened.

 - Indent help texts with a tab followed by two spaces

 - Put a space between 'config' and the symbol name, not a tab. This
   also helps when grepping for definitions.

 - Do '# A comment' instead of '#A comment'

I tweaked Kconfiglib a bit to find most of the stuff.

Some help texts were reflowed to 79 columns with 'gq' in Vim as well,
though not all, because I was afraid I'd accidentally mess up
formatting.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-01 15:53:23 +01:00
Jan Van Winkel 9555f82d28 libc: Use select REQUIRES_FULL_LIBC instead of select NEWLIB_LIBC
Changed select NEWLIB_LIBC to select REQUIRES_FULL_LIBC

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-11-01 14:18:36 +01:00
David B. Kinder 241044f178 doc: fix misspellings in Kconfig files
Fix misspellings in Kconfig files missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-30 10:24:30 +01:00
Wentong Wu dd9480913e logging: add syst format output
Add syst format output support for existing logging system.

Fixes: #19841.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-10-29 10:18:51 +01:00
Loic Poulain a019e92d23 soc: nxp: rt: Add CSI video support
Add CSI node to generic nxp rt dtsi.
Add corresponding dts binding.
Add CSI capability for rt MCUs.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-25 15:13:53 -05:00
Ulf Magnusson 677f1e6db9 kconfig: Turn pointless/confusing 'menuconfig's into 'config's
Defining a symbol with 'menuconfig' just tells the menuconfig to display
any dependent symbols that immediately follow it in a separate menu.
'menuconfig' has no effect on symbol values.

Making a symbol that doesn't have any dependent symbols after it a
'menuconfig' should be avoided, because then you end up with an empty
menu, which is shown as e.g.

    [*] Enable foo ---

This is how it would be shown if there were children but they all
happened to be invisible as well.

With a regular 'config', it turns into

    [*] Enable foo

Change all pointless 'menuconfig's to 'config's.

See the section on 'menuconfig' on the Kconfig - Tips and Best Practices
page as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-22 13:53:06 -05:00
Stephanos Ioannidis 5eb71b45b4 soc: arm: Clean up HAS_CMSIS_CORE usage.
For nordic_nrf, this commit relocates HAS_CMSIS_CORE selection from
SoC Kconfig to the HAL module Kconfig, as done for other SoCs.

For nxp_kinetis, remove redundant HAS_CMSIS_CORE selection in SoC
Kconfig, as it is already selected by the HAL Kconfig.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-10-18 14:01:07 -05:00
Stephanos Ioannidis bb14d8c5e5 ext: hal: cmsis: Update references to HAS_CMSIS to HAS_CMSIS_CORE.
This commit updates all references to HAS_CMSIS to use HAS_CMSIS_CORE
instead. With the changes introduced to allow multiple CMSIS variants
to be specified, the latter is semantically equivalent to the former.

For more details, see issue #19717.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-10-18 14:01:07 -05:00
Armando Visconti dc9e297e09 modules/hal_st: Align sensor drivers to stmemsc HAL i/f v1.02
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v1.02.

Requires https://github.com/zephyrproject-rtos/hal_st/pull/3

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-10-17 13:07:50 -05:00
Kumar Gala 698898098b modules/hal_st: Drop newlib requirement.
It seems that the ST sensor hal expects <math.h> for float_t and
double_t definitions.  Now that we have those for minlibc we don't need
to require newlib.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-27 04:30:07 -07:00
Vincent Wan 17d0d8e1b3 modules: Kconfig.simplelink: Remove POSIX_API, use fine-grained opts
PR #18780 introduces a way to decouple pthread support from the general
CONFIG_POSIX_API global switch. This commit modifies the build of
SimpleLink components to take advantage of it, since SimpleLink
libraries only require pthread, sem, clock, and sleep support, not
entire POSIX API.

This fixes the build errors in the http_get sample introduced
by the merge of #18736. As such, this patch also removes
cc3220sf_launchxl exclude from sample.yaml of that sample.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-25 20:56:29 -07:00
Tom Burdick 6a708e625d arch: kinetis: Add support for k2x
This adds support for Kinestis K22

Co-authored-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Co-authored-by: Oliver Stäbler <oliver.staebler@bytesatwork.ch>
Co-authored-by: Tom Burdick <thomas.burdick@gmail.com>
Signed-off-by: Tom Burdick <thomas.burdick@gmail.com>
2019-09-25 02:18:38 -07:00
Anas Nashif 075794cc78 west: remove qmsi module
No users of this module after dropping quark platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-18 11:06:18 -05:00
Robert Lubos 063fefd15d net: openthread: Use Zephyr's mbedTLS instead of compiling own
So far OpenThread compiled it's own, internal copy of mbedTLS library.
This commit changes this behavior by using Zephyr's mbedTLS instance
appropriately configured for OpenThread needs.

Generic mbedTLS config file was used in this case, so that application
can still configure remaining parts of mbedTLS for it's own needs.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-09-17 20:07:58 +08:00
Robert Lubos 1c8c775502 modules: mbedtls: Allow to enable OpenThread optimizations
OpenThread tweaks some specific mbedTLS configs for it's own need, that
allows to save some RAM/ROM. Allow to set these in generic config file
if OpenThread is enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-09-17 20:07:58 +08:00
Paul Sokolovsky fb4e1da114 modules: Kconfig.tls-generic: Add CONFIG_MBEDTLS_ECDSA_DETERMINISTIC
From mbedTLS's description:

Enable deterministic ECDSA (RFC 6979).
Standard ECDSA is "fragile" in the sense that lack of entropy when
signing may result in a compromise of the long-term signing key. This
is avoided by the deterministic variant.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-11 15:02:48 +02:00
Andrzej Głąbek 60e7364c09 modules: Kconfig: Add missing options enabling nrfx drivers
Quite a few nrfx drivers are missing corresponding Kconfig options
that would enable their use in Zephyr applications.
Add such options, to facilitate the use of nRF peripherals for which
there are no Zephyr driver shims or even suitable APIs.

Jira: NCSDK-2744

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-10 13:23:44 +02:00
Andrzej Głąbek aeb1a7d76d modules: Kconfig: Make options enabling nrfx drivers easier to access
The options are given prompts, so that they become accessible from
application configuration files and visible in menuconfig, and they
are complemented with proper dependencies, so that only the relevant
ones for the selected SoC are made available.

Jira: NCSDK-2744

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-10 13:23:44 +02:00
Andrzej Głąbek 70d426bd33 modules: Kconfig: Unify the way of enabling instances in nrfx drivers
Use a consistent way of enabling particular instances of peripherals
in nrfx drivers through options defined in modules/Kconfig.nordic,
to make the usage of nrfx drivers in Zephyr, especially the ones for
which there are no Zephyr driver shims (yet), easier.

Jira: NCSDK-2744

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-10 13:23:44 +02:00
Vincent Wan af30b5cee2 ext: simplelink: Update comment for HAS_CC3220SDK
This Kconfig option applies to the TI CC32xx SDK in general, given it is
the same as the CC3220 SDK.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Ulf Magnusson 270d535fb4 kconfig: modules: Trivial cleanup
A lot of the Kconfig stuff gets copied around, so encourage a clean
compact style:

 - Reduce license header spam

 - Fix some broken indentation

 - Turn a meaningless 'menuconfig' into a 'config'

 - Remove a redundant QMSI menu

 - Unscrunch comments: #Foo -> # Foo

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:04:04 -04:00
Anas Nashif 12438e1047 ext: hal: Make NXP HALs a Zephyr module
Moved to an external repo, https://github.com/zephyrproject-rtos/hal_nxp

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 21:05:23 -04:00
Anas Nashif 975b47132a ext: hal: make microchip HAL a zephyr module
Move Microchip hal to its own git repo:

https://github.com/zephyrproject-rtos/hal_microchip

and use west.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 18:45:22 -04:00
Anas Nashif 2804f59d3b ext: hal: make openisa HAL a zephyr module
Maintain this HAL in its own repo:
git@github.com:zephyrproject-rtos/hal_openisa.git

and manage using west.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 15:26:22 -04:00
Carles Cufi cf3af6af5f ext: hal: Make Nordic HALs a Zephyr module
Moved to an external repo,
https://github.com/zephyrproject-rtos/hal_nordic.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-08-21 14:18:19 -04:00
Anas Nashif 2d9d898cc6 ext: hal: atmel: move atmel HAL to external module
Move the HAL to an external repo to be used with west:

https://github.com/zephyrproject-rtos/hal_atmel

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 14:17:43 -04:00
Anas Nashif f156e95bbd ext: hal: make TI HAL a zephyr module
Move TI HAL to a module repository:
https://github.com/zephyrproject-rtos/hal_ti

managed by west.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-21 12:46:39 -05:00
Paul Sokolovsky d479534b90 modules: Kconfig.tls-generic: Remove duplicate "select"
"select MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED" was repeated 2 times
in row.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-08-21 19:08:15 +02:00
Tomasz Gorochowik f2bf9a17c5 samples: net: Add civetweb HTTP sample
This commit adds civetweb as a west module and a sample that uses it.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2019-07-30 13:17:55 +03:00
Erwan Gouriou 28d6d75f26 modules: update stm32cube Kconfig with H7
Following introduction of STM32H7 series, update STM32 module
Kconfig with stm32cube H7 additions.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-07-04 08:50:04 -04:00
Armando Visconti fe74224e43 modules/hal_st: Add stmemsc HAL library
Add stmemsc (STdC) HAL i/f module reference.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-06-26 15:41:40 -04:00
Anas Nashif faa398f078 ext: hal: st: move to modules
split ext/hal/st into two modules:

- hal_stm32: For the code meant to run on STM32
- hal_st: For the code meant to drive ST components

Fixes #16316

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-18 13:08:07 -04:00
Anas Nashif 6e27d6d3d1 mbedtls: move to external module
Use external module from https://github.com/zephyrproject-rtos/mbedtls

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-11 08:33:53 -04:00
Anas Nashif 083617e2c0 modules: move kconfig into tree
Move Kconfig from modules to the main zephyr tree to allow depenedency
resolution.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-30 19:39:35 -04:00
Anas Nashif 8017c59cb0 modules: move module kconfig to main tree
Due to in-tree dependencies on Kconfig options defined in modules we end
up having warnings and errors when those modules are not part of the
manifest.

Users should be able to remove unwanted modules from their downstream
manifest and still build any board configurations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-30 17:50:37 -04:00