Commit Graph

1114 Commits

Author SHA1 Message Date
Simone Orru
7caed78e47 modules: mbedtls: Enable PEM writing when PEM cert format is selected
Enable the `MBEDTLS_PEM_WRITE_C` mbedtls configuration option when
`CONFIG_MBEDTLS_PEM_CERTIFICATE_FORMAT` is selected.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
(cherry picked from commit ad208e1e7c)
2024-10-15 19:07:02 -04:00
Erik Tamlin
2d75520b66 modules: percepio: Fix python executable name
Fix python executable name in percepio module's CMakeLists.txt

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
(cherry picked from commit bb784c45dd)
2024-09-02 18:28:30 -04:00
Tomi Fontanilles
45ae95241a modules: tf-m: fix git clone during build
As of v2.1.0 TF-M has updated to CMSIS v6 and switched from hosting
the sources to depending on the upstream repository, cloning it at
build time.

To prevent a download from happening during the build, CMSIS v6 sources
are pushed to Zephyr's fork of TF-M and the `CMSIS_PATH` CMake variable
is set to point to them.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-25 12:25:32 +02:00
Tomi Fontanilles
50c03e9bbe modules: mbedtls: fix MBEDTLS_PSA_P256M_DRIVER_RAW Kconfig option
Make it depend on MBEDTLS_PSA_P256M_DRIVER_ENABLED instead of
selecting it.

This fixes the build of
tests/crypto/secp256r1/crypto.secp256r1.p256-m_raw on filtered-out
platforms since PR #75441 (83cd9f5a01).

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-15 10:36:58 -04:00
Jordan Yates
1bbfbef88d modules: tfm: fix TFM_MCUBOOT_IMAGE_NUMBER == 1
Fix builds with `CONFIG_TFM_MCUBOOT_IMAGE_NUMBER=1`. The merged binary
should be signed with the same argumements as a secure build, not a
non-secure build, except with a different layout file generated by the
TF-M build system.

Fixes #68345.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-12 20:38:49 -04:00
Stefan Schwendeler
5feb028512 modules: hal_nordic: defines NRF_CONFIG_NFCT_PINS_AS_GPIOS for nRF54L15
Currently, the NFCT pins cannot be used as GPIOs on the nRF54L15 MCU
because the Nordic HAL for this MCU uses the new upcoming `NRF_CONFIG_`
style configuration settings for this MCU.
To support all nRF5x MCUs, the old configuration is still required
because Nordic didn't update their MDK entirely to the new style.

Signed-off-by: Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
2024-07-12 16:11:44 -04:00
Lukasz Stepnicki
f71d848c14 modules: hal_nordic: nrfs: fix buffer used in nrfs send
In function nrfs_backend_send_work tx_data buffer was
used in function ipc_service_send instead of
data_to_send. This is fixed and also tx_data and rx_data
are moved to coresponding functions preventing such
issues in future.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-07-12 09:12:25 -04:00
Declan Snyder
5fa17a8d39 modules: hal_nxp: Fix i2s define mistake
The commands should be within the if command checking
for CONFIG_HAS_MCUX, fix.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-11 16:13:35 +02:00
Emilio Benavente
33a9e4b088 modules: hal_nxp: CMakeLists: Added SAI definition to fix I2S.
Added definition MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK
to fix timeout fault on the I2S_Speed test
using MIMXRT1170_evk/mimxrt1176/cm7.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-07-10 16:15:49 -04:00
Chaitanya Tata
0e6db9c918 modules: hostap: Fix interface addition
WPA supplicant as a network manager monitors interface events and
registers to the Wi-Fi NM module, so, adding a check for NM type before
registering the interface is wrong.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-09 13:07:11 -04:00
Tomi Fontanilles
83cd9f5a01 modules: mbedtls: properly guard PSA_CRYPTO_C
Instead of silently `#undef`ing PSA_CRYPTO_C when TF-M is in use,
enforce that rule at the Kconfig level.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-08 12:14:49 -04:00
Stephan Linz
e823cc5fb4 modules: lvgl: fix initialization macro syntax
Adding a semicolon after the do-while loop in the LV_DEV_INIT()
macro also supports multiple instantiation.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2024-07-08 15:53:46 +02:00
Chaitanya Tata
650227d8c4 modules: hostap: Fix check for iface up
We only need the interface to be administratively up, the operationl
status is managed by the WPA supplicant.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
176a47c2df modules: hostap: Fix SoF
Due to recent changes to hostap, the stack usage is increased, so,
increase the stack size to fix SoF.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
f4e0a1abea modules: hostap: Fix MbedTLS config issue
Fixes build issues when Wi-Fi security is enabled for default
implementation, the alternative implementation is managed separately,
and doesn't need these.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Chaitanya Tata
515f1fee48 modules: hostap: Fix MbedTLS TLS
TLS is only for Enterprise, so, move to enterprise macro.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-07-03 09:33:41 -04:00
Jan Zyczkowski
b737598dcf boards: nordic: Change NRFS logs to debug level
Change NRFS logs to debug level not to break tests.

Signed-off-by: Jan Zyczkowski <jan.zyczkowski@nordicsemi.no>
2024-07-01 16:07:15 -04:00
Torsten Rasmussen
2bfea20d70 cmake: tf-m: create tfm_api dependency on tfm_s.hex
Incremental builds for TF-M are not picked up by Zephyr linking stage.
Code changes to tf-m repository results in a rebuild of TF-M and thus
an updated tfm_s.hex (and other files).

tfm_s.hex is merged together with the zephyr hex to form a final merged
hex file for flashing. This is done as a post-build command, however
such as step cannot take extra dependencies. The Zephyr target can have
extra dependencies, however that will only ensure the dependency is
brought up-to-date when Zephyr re-link, not re-linking Zephyr when the
dependency changes.

Therefore an object dependency is placed on the interface.c file for
Zephyr TF-M interface implementation, which ensures the tfm_api library
is brought up-to-date whenever TF-M rebuilds, and this update again
ensures the Zephyr itself is re-linked whenever TF-M rebuilds.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-29 05:24:49 -04:00
Jordan Yates
f4d09c9791 modules: cmsis-nn: add *_s4.c sources
Add new sources for 4 bit function variants to build system.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
Jordan Yates
afdbb3b94b submanifests: update tflite-micro
Update `tflite-micro` to the latest version.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-28 07:50:12 -04:00
The Thanh. Nguyen
f93f801c65 driver: serial: Add serial driver support for Renesas RA8 devices
Add implementation of sci_b_uart for Renesas RA device

Signed-off-by: The Thanh. Nguyen <the.nguyen.yf@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
7195f0de0f soc: renesas: ra: Add initial support for RA8M1 SOC series
Add minimal support for RA8M1 SOC series.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-06-26 13:36:14 -04:00
Duy Nguyen
259b3d0095 arch: arm: Add initial support for Cortex-M85 Core
Add initial support for the Cortex-M85 Core which is an implementation
of the Armv8.1-M mainline architecture.

The support is based on the Cortex-M55 support that already exists in
Zephyr.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-06-26 13:36:14 -04:00
Maochen Wang
b7ed82c060 modules: mbedtls: Fix init hang issue
In device init phase, it will call _mbedtls_init before malloc_prepare
as mbedtls has higher priority defined in SYS_INIT..
_mbedtls_init() will call psa_crypto_init() and malloc buffer,
but z_malloc_heap is not initialized, which will cause device hang.
Should call malloc_prepare() before _mbedtls_init to fix this issue,
so decrease the priority of mbedtls to default 40.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-26 13:07:02 -04:00
Fabian Blatz
b7b1a56124 modules: lvgl: support linking memory pool to custom section
This patch adds a kconfig option `LV_Z_MEMORY_POOL_CUSTOM_SECTION`
which allows to place the buffer the memory pool is backed by into a
section with the label ".lvgl_heap".

Resolves issue: #66494.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-06-22 05:39:41 -04:00
Fabian Blatz
5a62c1137c modules: lvgl: Remove LVGL pointer kscan
Removes the wrapper code of the kscan based pointer input device. It was
implemented during the transitioning phase until all intree drivers were
converted to the input subsystem.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-06-21 11:54:11 -04:00
Maochen Wang
c116c9faf8 hostap: Add macro to wrap the interface monitoring code
Add macro to wrap the interface monitoring code and user can choose if
enable it.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Maochen Wang
1726aa4345 hostap: fix wifi sta connection not triggerred issue
Use select_network instead of enable_network, then can trigger sta
connection mutiple times. Also update the configuration in
add_interface().

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Maochen Wang
001ac3976a modules: hostap: fix hostap compile error and support enterprise
Fix compile error when enable enterprise security mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Maochen Wang
762169034b net: wifi: split wifi interface into STA and uAP
Split wifi interface into station mode and soft-AP mode, as there may be
station and soft-AP two interfaces that work concurrently.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-06-20 12:47:18 +02:00
Yong Cong Sin
19e4cb8f89 libc: cleanup deprecated heap-related Kconfigs
The following heap-related Kconfigs shared by the picolibc &
minimal libc have been deprecated for more than 2 releases,
remove them and update the Kconfigs accordingly:

- `CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE`
- `CONFIG_MINIMAL_LIBC_REALLOCARRAY`

Cleanup the handling to support the deprecated malloc arena
size configuration values.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Christoph Schnetzler
3c9e05959b logging: cmsis: prevent wundef warnings
If -Werror is used compilation fails due to wundef warning.

Signed-off-by: Christoph Schnetzler <christoph.schnetzler@husqvarnagroup.com>
2024-06-17 15:29:39 +02:00
Jonathon Penix
d6041d62b3 cmake: kconfig: Add new abstraction for -Oz optimization level
Both Clang [1] and (recently) GCC [2] support this flag to enable
additional codesize optimizations beyond -Os, possibly at the expense of
performance.

This tradeoff is worthwhile for some (and, Clang's -Oz seems to be
closer to GCC's -Os currently), so add a new abstraction for this flag
so users can select it as appropriate.

[1] https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-O0
[2] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-Oz

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-06-14 19:05:50 -04:00
Valerio Setti
a9f7788f9f trusted-firmware-m: select PSA_CRYPTO_CLIENT when BUILD_WITH_TFM
TF-M is a PSA API provider alternative to Mbed TLS one. As
a consequence when CONFIG_BUILD_WITH_TFM is set
CONFIG_PSA_CRYPTO_CLIENT should be set as well.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 15:41:34 +02:00
Mark Wang
b6b43c3ed7 drivers: udc: implement udc_mcux_ehci and udc_mcux_ip3511
udc_mcux_ehci is based on the MCUX USB controller driver
(usb_device_ehci.c); udc_mcux_ip3511 is based on the
MCUX USB controller driver (usb_device_lpcip3511.c);
add related Kconfig and CMake; include the usb_phy.h path in
modules/hal_nxp/usb/CMakeLists.txt because udc_mcux.c use it;
add related macros to usb_device_config.h;
update CMakeLists for udc_mcux_ehci and udc_mcux_ip3511.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-13 17:59:31 +02:00
Erik Tamlin
157c364f6e manifest: update percepio
Update the percepio module to use TraceRecorder v4.9.1.hotfix1

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
2024-06-13 17:50:29 +02:00
Nazar Palamar
17889d23b9 driver/bluetooth: Added initial version of hci cyw208xx driver
Added initial version of hci cyw208xx driver

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-13 05:52:19 -04:00
Lyle Zhu
6c01c0c13a module: hal_nxp: bt_controller: Verify if Blob is valid
Use zephyr_blobs_verify to check the blob file is valid
or not.

The function zephyr_blobs_verify will check if the file
exists. And it checks if the file is valid.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00
Lyle Zhu
d74698a36b driver: bluetooth: hci: Support NXP BT CTLR FW blobs
Add Kconfig.nxp to support NXP Bluetooth Chipset.
Current only NXP IW612 Chipset (BT_NXP_NW612) has
been supported.

Add modules/hal_nxp/bt_controller/CMakeLists.txt to
determine whether any firmware is selected, and
check whether the firmware exists.

If the firmware exists, copy the firmware to the
temporary folder ${ZEPHYR_BINARY_DIR}/include/
generated/bt_nxp_ctlr_fw.h. OR, raise a fatal error.

In file hci_nxp_setup.c, includes the temporary file
bt_nxp_ctlr_fw.h.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00
Valerio Setti
30c9f5eaa5 net: add proper PSA_WANT kconfigs for TLS sockets and RSA key exchanges
Add proper PSA_WANT kconfigs for TLS sockets and RSA key exchanges
when CONFIG_PSA_CRYPTO_CLIENT is set.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-13 09:22:20 +02:00
Valerio Setti
41389fbb81 mbedtls: add a kconfig to use the p256-m directly (without PSA interface)
For sake of memory footprint it might be required to shrink
down the memory footprint as much as possible. Unfortunately Mbed TLS
PSA interface brings in some extra code for key management which makes
it larger than the TinyCrypt counterpart when it comes to p256-m
interfacing. For this reason it might be useful to directly access
the p256-m driver directly.

This commit adds this support and it also updates the corresponding
test in order to make use of this condition.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-12 01:53:58 -07:00
Valerio Setti
69fa93bb79 mbedtls: add psa_crypto_init() when Mbed TLS acts a PSA crypto client
Ensure psa_crypto_init() is called during initialization when
Mbed TLS acts as a PSA crypto client. This will setup the PSA
crypto server for further calls.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-12 01:53:58 -07:00
Valerio Setti
185ec2bf78 mbedtls: add support for the P256M driver
Add support for the CortexM optimized implementation of secp256r1
code. It supports:
- import & export
- key agreement
- sign & verify

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-12 01:53:58 -07:00
Lucas Romero
69c5ef9665 lorawan: services: frag transport: prepare for pluggable decoder
by wrapping decoder implementation specific bits in #ifdefs

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-06-11 16:09:23 +03:00
Przemyslaw Bida
7dc830e9db net: openthread: Add new kconfig OT options.
Adding:
	- `OPENTHREAD_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`
	- `OPENTHREAD_CHANNEL_MANAGER_CSL`
	- `OPENTHREAD_PLATFORM_LOG_CRASH_DUMP`
	- `OPENTHREAD_MULTICAST_DNS`
	- `OPENTHREAD_VERHOEFF_CHECKSUM`

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-06-11 10:05:04 +02:00
Przemyslaw Bida
4c34e95904 net: openthread: Add implementation of TCAT advertisement.
Adds implementation of tcat advertisement API.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-06-11 10:05:04 +02:00
Reto Schneider
d92e1e709e modules: Move away from SOC_VENDOR_SILABS
This allows to remove SOC_VENDOR_SILABS in a later commit.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-06-10 15:15:34 -05:00
Piotr Koziar
17a3c6dc24 modules: hal_nordic: turn off temperature update by default for nRF54H20.
Adds an appropriate condition to the Kconfig as
the temperature driver is not supported for nRF54H20 devices yet.

Without this change, a build with NRF 802.15.4 libraries produces
Kconfig error.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Piotr Koziar
89c4afa3b8 modules: hal_nordic: implement hfclk start/stop for nRF54H20.
Clock_control is currently not supported on nRF54H20.
This commit adds new way of handling the hfclk targeted for nRF54H20.

This solution shall be replaced once the clock_control is supported
for nRF54H20.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Daniel DeGrasse
7981ea0056 fs: fat_fs: make IOCTL call to de-initialize disk in fatfs_unmount()
Make call to de-initialize disk in fatfs_unmount(). This will permit the
disk to be reinitialized when it is mounted with fatfs_mount().

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-07 18:16:01 +01:00