diff --git a/CODEOWNERS b/CODEOWNERS index ad0feff96b4..7774e4a48c3 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -514,6 +514,7 @@ /samples/wifi/softap/ @D-Triveni @krish2718 /samples/wifi/monitor/ @D-Triveni /samples/wifi/promiscuous/ @D-Triveni +/samples/wifi/offloaded_raw_tx/ @kapbh @sachinthegreen /samples/zigbee/ @nrfconnect/ncs-zigbee /samples/app_event_manager/*.rst @nrfconnect/ncs-si-muffin-doc @nrfconnect/ncs-si-bluebagel-doc diff --git a/Jenkinsfile b/Jenkinsfile index cb83d266db0..7f33f08c206 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -@Library("CI_LIB") _ +@Library("CI_LIB@v2.8-branch") _ def pipeline = new ncs.sdk_nrf.Main() diff --git a/VERSION b/VERSION index cd6e69d54ef..8bcb125234b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.8.0-preview1 +2.8.99 diff --git a/applications/asset_tracker_v2/Kconfig.sysbuild b/applications/asset_tracker_v2/Kconfig.sysbuild index 39426561f59..458e26593c6 100644 --- a/applications/asset_tracker_v2/Kconfig.sysbuild +++ b/applications/asset_tracker_v2/Kconfig.sysbuild @@ -16,6 +16,10 @@ config SECURE_BOOT_APPCORE config WIFI_NRF70 default y if BOARD_THINGY91X_NRF9151_NS +choice WIFI_NRF70_OPER_MODES + default WIFI_NRF70_SCAN_ONLY if BOARD_THINGY91X_NRF9151_NS +endchoice + config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY default y if BOARD_NRF9151DK_NRF9151_NS || BOARD_NRF9161DK_NRF9161_NS default y if BOARD_NRF9160DK_NRF9160_NS \ diff --git a/applications/nrf5340_audio/sample.yaml b/applications/nrf5340_audio/sample.yaml index 3a01e1029ee..2a678b0950b 100644 --- a/applications/nrf5340_audio/sample.yaml +++ b/applications/nrf5340_audio/sample.yaml @@ -22,3 +22,5 @@ tests: extra_args: FILE_SUFFIX=release CONFIG_AUDIO_DEV=2 CONFIG_TRANSPORT_BIS=y applications.nrf5340_audio.headset_unicast_sd_card: extra_args: FILE_SUFFIX=release CONFIG_AUDIO_DEV=1 CONFIG_SD_CARD_PLAYBACK=y + applications.nrf5340_audio.headset_dfu: + extra_args: FILE_SUFFIX=release CONFIG_AUDIO_DEV=1 FILE_SUFFIX=fota diff --git a/applications/nrf5340_audio/src/bluetooth/bt_management/dfu/bt_mgmt_dfu.c b/applications/nrf5340_audio/src/bluetooth/bt_management/dfu/bt_mgmt_dfu.c index 388c6db0ab4..a6bece89c98 100644 --- a/applications/nrf5340_audio/src/bluetooth/bt_management/dfu/bt_mgmt_dfu.c +++ b/applications/nrf5340_audio/src/bluetooth/bt_management/dfu/bt_mgmt_dfu.c @@ -23,19 +23,21 @@ LOG_MODULE_REGISTER(bt_mgmt_dfu, CONFIG_BT_MGMT_DFU_LOG_LEVEL); #define DEVICE_NAME_DFU CONFIG_BT_DFU_DEVICE_NAME #define DEVICE_NAME_DFU_LEN (sizeof(DEVICE_NAME_DFU) - 1) -/* Advertising data for SMP_SVR UUID */ -static struct bt_le_adv_param adv_param; static const struct bt_data ad_peer[] = { BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)), BT_DATA_BYTES(BT_DATA_UUID128_ALL, 0x84, 0xaa, 0x60, 0x74, 0x52, 0x8a, 0x8b, 0x86, 0xd3, 0x4c, 0xb7, 0x1d, 0x1d, 0xdc, 0x53, 0x8d), }; +/* Set aside space for name to be in scan response */ +static struct bt_data sd_peer[1]; + static void smp_adv(void) { int ret; - ret = bt_le_adv_start(&adv_param, ad_peer, ARRAY_SIZE(ad_peer), NULL, 0); + ret = bt_le_adv_start(BT_LE_ADV_CONN, ad_peer, ARRAY_SIZE(ad_peer), sd_peer, + ARRAY_SIZE(sd_peer)); if (ret) { LOG_ERR("SMP_SVR Advertising failed to start (ret %d)", ret); return; @@ -63,26 +65,46 @@ static struct bt_conn_cb dfu_conn_callbacks = { static void dfu_set_bt_name(void) { - char name[CONFIG_BT_DEVICE_NAME_MAX] = {0}; + int ret; + static char name[CONFIG_BT_DEVICE_NAME_MAX]; strlcpy(name, CONFIG_BT_DEVICE_NAME, CONFIG_BT_DEVICE_NAME_MAX); - strlcat(name, "_", CONFIG_BT_DEVICE_NAME_MAX); + ret = strlcat(name, "_", CONFIG_BT_DEVICE_NAME_MAX); + if (ret >= CONFIG_BT_DEVICE_NAME_MAX) { + LOG_ERR("Failed to set full BT name, will truncate"); + } + #if (CONFIG_AUDIO_DEV == GATEWAY) - strlcat(name, GW_TAG, CONFIG_BT_DEVICE_NAME_MAX); + ret = strlcat(name, GW_TAG, CONFIG_BT_DEVICE_NAME_MAX); + if (ret >= CONFIG_BT_DEVICE_NAME_MAX) { + LOG_ERR("Failed to set full BT name, will truncate"); + } #else enum audio_channel channel; channel_assignment_get(&channel); if (channel == AUDIO_CH_L) { - strlcat(name, CH_L_TAG, CONFIG_BT_DEVICE_NAME_MAX); + ret = strlcat(name, CH_L_TAG, CONFIG_BT_DEVICE_NAME_MAX); + if (ret >= CONFIG_BT_DEVICE_NAME_MAX) { + LOG_ERR("Failed to set full BT name, will truncate"); + } } else { - strlcat(name, CH_R_TAG, CONFIG_BT_DEVICE_NAME_MAX); + ret = strlcat(name, CH_R_TAG, CONFIG_BT_DEVICE_NAME_MAX); + if (ret >= CONFIG_BT_DEVICE_NAME_MAX) { + LOG_ERR("Failed to set full BT name, will truncate"); + } } #endif - strlcat(name, "_DFU", CONFIG_BT_DEVICE_NAME_MAX); - bt_set_name(name); + ret = strlcat(name, "_DFU", CONFIG_BT_DEVICE_NAME_MAX); + if (ret >= CONFIG_BT_DEVICE_NAME_MAX) { + LOG_ERR("Failed to set full BT name, will truncate"); + } + + sd_peer[0].type = BT_DATA_NAME_COMPLETE; + sd_peer[0].data_len = strlen(name); + sd_peer[0].data = name; } void bt_mgmt_dfu_start(void) @@ -90,7 +112,6 @@ void bt_mgmt_dfu_start(void) LOG_INF("Entering SMP server mode"); bt_conn_cb_register(&dfu_conn_callbacks); - adv_param = *BT_LE_ADV_CONN_NAME; dfu_set_bt_name(); smp_adv(); diff --git a/applications/nrf_desktop/CMakeLists.txt b/applications/nrf_desktop/CMakeLists.txt index 24a87d4fe9b..ec87ef38844 100644 --- a/applications/nrf_desktop/CMakeLists.txt +++ b/applications/nrf_desktop/CMakeLists.txt @@ -8,6 +8,9 @@ cmake_minimum_required(VERSION 3.20.0) ################################################################################ +# The application uses the configuration/ scheme for configuration files. +set(APPLICATION_CONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}/configuration/\${NORMALIZED_BOARD_TARGET}") + find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project("nRF52 Desktop" VERSION 0.1) diff --git a/applications/nrf_desktop/src/modules/Kconfig.dvfs b/applications/nrf_desktop/src/modules/Kconfig.dvfs index e702f9ff18c..8d83b5c6a93 100644 --- a/applications/nrf_desktop/src/modules/Kconfig.dvfs +++ b/applications/nrf_desktop/src/modules/Kconfig.dvfs @@ -5,8 +5,9 @@ # menuconfig DESKTOP_DVFS - bool "DVFS module" + bool "DVFS module [EXPERIMENTAL]" depends on SOC_NRF54H20_CPUAPP + select EXPERIMENTAL select NRFS_DVFS_SERVICE_ENABLED select CLOCK_CONTROL select CLOCK_CONTROL_NRF2 diff --git a/applications/nrf_desktop/sysbuild/CMakeLists.txt b/applications/nrf_desktop/sysbuild/CMakeLists.txt index 119d1ea1350..04f7dc8905d 100644 --- a/applications/nrf_desktop/sysbuild/CMakeLists.txt +++ b/applications/nrf_desktop/sysbuild/CMakeLists.txt @@ -7,11 +7,9 @@ # The application uses the configuration/ scheme for configuration files. set(SB_APPLICATION_CONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}/../configuration/\${NORMALIZED_BOARD_TARGET}") -# Redirect images' configuration directories to use those in the board configuration directory -set(nrf_desktop_APPLICATION_CONFIG_DIR - "${CMAKE_CURRENT_LIST_DIR}/../configuration/\${NORMALIZED_BOARD_TARGET}" - CACHE INTERNAL "Application configuration dir controlled by sysbuild" -) +# The main application configuration directory is defined by the main application's +# `CMakeLists.txt` file (this allows to avoid dependency on main application name). +# Redirect other images' configuration directories to redefine configuration. set(mcuboot_APPLICATION_CONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}/../configuration/\${NORMALIZED_BOARD_TARGET}/images/mcuboot" CACHE INTERNAL "Application configuration dir controlled by sysbuild" diff --git a/applications/sdp/gpio/CMakeLists.txt b/applications/sdp/gpio/CMakeLists.txt index ae182d38491..61dff4f4a7c 100644 --- a/applications/sdp/gpio/CMakeLists.txt +++ b/applications/sdp/gpio/CMakeLists.txt @@ -10,9 +10,13 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(emulated_gpio) sdp_assembly_generate("${CMAKE_SOURCE_DIR}/src/hrt/hrt.c") +sdp_assembly_check("${CMAKE_SOURCE_DIR}/src/hrt/hrt.c") +sdp_assembly_prepare_install("${CMAKE_SOURCE_DIR}/src/hrt/hrt.c") target_sources(app PRIVATE src/main.c) target_sources(app PRIVATE src/hrt/hrt.s) target_sources_ifdef(CONFIG_GPIO_NRFE_EGPIO_BACKEND_ICMSG app PRIVATE src/backend/backend_icmsg.c) target_sources_ifdef(CONFIG_GPIO_NRFE_EGPIO_BACKEND_ICBMSG app PRIVATE src/backend/backend_icmsg.c) target_sources_ifdef(CONFIG_GPIO_NRFE_EGPIO_BACKEND_MBOX app PRIVATE src/backend/backend_mbox.c) + +add_dependencies(app asm_check) diff --git a/cmake/sdp.cmake b/cmake/sdp.cmake index 599ed872d30..bbe5100533d 100644 --- a/cmake/sdp.cmake +++ b/cmake/sdp.cmake @@ -49,3 +49,41 @@ function(sdp_assembly_generate hrt_srcs) add_dependencies(asm_gen syscall_list_h_target) endfunction() + +function(sdp_assembly_check hrt_srcs) + set(asm_check_msg "Checking if ASM files for Hard Real Time have changed.") + + if(TARGET asm_check) + message(FATAL_ERROR "sdp_assembly_check() already called, please note that + sdp_assembly_check() must be called only once with a list of all source files." + ) + endif() + + string(REPLACE ";" "$" hrt_srcs_semi "${hrt_srcs}") + + add_custom_target(asm_check + COMMAND ${CMAKE_COMMAND} -D hrt_srcs="${hrt_srcs_semi}" -P ${ZEPHYR_NRF_MODULE_DIR}/cmake/sdp_asm_check.cmake + COMMENT ${asm_check_msg} + ) + + add_dependencies(asm_check asm_gen) + +endfunction() + +function(sdp_assembly_prepare_install hrt_srcs) + set(asm_install_msg "Updating ASM files for Hard Real Time.") + + if(TARGET asm_install) + message(FATAL_ERROR "sdp_assembly_prepare_install() already called, please note that + sdp_assembly_prepare_install() must be called only once with a list of all source files." + ) + endif() + + string(REPLACE ";" "$" hrt_srcs_semi "${hrt_srcs}") + + add_custom_target(asm_install + COMMAND ${CMAKE_COMMAND} -D hrt_srcs="${hrt_srcs_semi}" -P ${ZEPHYR_NRF_MODULE_DIR}/cmake/sdp_asm_install.cmake + COMMENT ${asm_install_msg} + ) + +endfunction() diff --git a/cmake/sdp_asm_check.cmake b/cmake/sdp_asm_check.cmake new file mode 100644 index 00000000000..8af14542546 --- /dev/null +++ b/cmake/sdp_asm_check.cmake @@ -0,0 +1,30 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +function(asm_check) + + foreach(hrt_src ${hrt_srcs}) + get_filename_component(asm_filename ${hrt_src} NAME_WE) # filename without extension + get_filename_component(src_dir ${hrt_src} DIRECTORY) + + execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol + ${src_dir}/${asm_filename}.s ${asm_filename}-temp.s + RESULT_VARIABLE compare_result) + + if( compare_result EQUAL 0) + message("File ${asm_filename}.s has not changed.") + elseif( compare_result EQUAL 1) + message(WARNING "${asm_filename}.s ASM file content has changed.\ + If you want to include the new ASM in build, \ + please run `ninja asm_install` in FLPR build directory and build again") + else() + message("Something went wrong when comparing ${asm_filename}.s and ${asm_filename}-temp.s") + endif() + endforeach() + +endfunction(asm_check) + +asm_check() diff --git a/cmake/sdp_asm_install.cmake b/cmake/sdp_asm_install.cmake new file mode 100644 index 00000000000..42d823db4da --- /dev/null +++ b/cmake/sdp_asm_install.cmake @@ -0,0 +1,25 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +function(asm_install) + + foreach(hrt_src ${hrt_srcs}) + get_filename_component(asm_filename ${hrt_src} NAME_WE) # filename without extension + get_filename_component(src_dir ${hrt_src} DIRECTORY) + + file(RENAME ${asm_filename}-temp.s ${src_dir}/${asm_filename}.s RESULT rename_result) + + if (rename_result EQUAL 0) + message("Updated ${asm_filename}.s ASM file.") + else() + message(WARNING "${asm_filename}.s cannot be updated, new ASM does not exist. Please run ninja asm_gen to create one.") + endif() + + endforeach() + +endfunction(asm_install) + +asm_install() diff --git a/cmake/sysbuild/nrf700x.cmake b/cmake/sysbuild/nrf700x.cmake index 740e7d9349c..35faa4d617b 100644 --- a/cmake/sysbuild/nrf700x.cmake +++ b/cmake/sysbuild/nrf700x.cmake @@ -16,6 +16,8 @@ function(setup_nrf700x_xip_data) set(NRF70_PATCH ${NRF70_FW_BINS}/radio_test/nrf70.bin) elseif(SB_CONFIG_WIFI_NRF70_SCAN_ONLY) set(NRF70_PATCH ${NRF70_FW_BINS}/scan_only/nrf70.bin) + elseif(SB_CONFIG_WIFI_NRF70_OFFLOADED_RAW_TX) + set(NRF70_PATCH ${NRF70_FW_BINS}/offloaded_raw_tx/nrf70.bin) elseif(SB_CONFIG_WIFI_NRF70_SYSTEM_WITH_RAW_MODES) set(NRF70_PATCH ${NRF70_FW_BINS}/system_with_raw/nrf70.bin) else() diff --git a/doc/nrf/app_dev/device_guides/nrf54l/index.rst b/doc/nrf/app_dev/device_guides/nrf54l/index.rst index e6b774007b3..44e8bfa0e6b 100644 --- a/doc/nrf/app_dev/device_guides/nrf54l/index.rst +++ b/doc/nrf/app_dev/device_guides/nrf54l/index.rst @@ -47,6 +47,7 @@ Ensure to check the revision of your nRF54L15 device to see if it is supported: :caption: Subpages: features + zms cryptography testing_dfu snippets diff --git a/doc/nrf/app_dev/device_guides/nrf54l/zms.rst b/doc/nrf/app_dev/device_guides/nrf54l/zms.rst new file mode 100644 index 00000000000..701d1533cc3 --- /dev/null +++ b/doc/nrf/app_dev/device_guides/nrf54l/zms.rst @@ -0,0 +1,78 @@ +.. _memory_storage: + +Enabling Zephyr Memory Storage +############################## + +.. contents:: + :local: + :depth: 2 + +For nRF54L Series, you should use the :ref:`Zephyr Memory Storage (ZMS) `. +ZMS utilizes a flexible data management system that reduces write and erase cycles, extending the lifespan of non-volatile memory. + +.. note:: + + If you are using the :ref:`Non-Volatile Storage (NVS) `, ensure to switch to the ZMS solution. + +Enabling the ZMS module +*********************** + +You can enable the ZMS module for your application in two ways - directly through ZMS or through the :ref:`Settings subsystem `. +Additionally, you can optimize the application performance using caching mechanism: + +.. tabs:: + + .. group-tab:: Using storage directly through ZMS + + 1. Enable the :kconfig:option:`CONFIG_ZMS` Kconfig option in your project's configuration file. + #. Optionally, enable the lookup cache to increase the application performance: + + a. Enable the :kconfig:option:`CONFIG_ZMS_LOOKUP_CACHE` Kconfig option. + #. Set the lookup cache size in :kconfig:option:`CONFIG_ZMS_LOOKUP_CACHE_SIZE` depending on your application needs. + + .. group-tab:: Using storage through Settings subsystem + + 1. Enable the :kconfig:option:`CONFIG_ZMS` Kconfig option in your project's configuration file. + #. Enable ZMS within the Settings subsystem with the :kconfig:option:`CONFIG_SETTINGS_ZMS` Kconfig option. + #. Optionally, enable the lookup cache to increase the application performance: + + a. Enable the :kconfig:option:`CONFIG_ZMS_LOOKUP_CACHE` Kconfig option. + #. Set the lookup cache size in :kconfig:option:`CONFIG_ZMS_LOOKUP_CACHE_SIZE` depending on your application needs. + #. Ensure the lookup cache is configured to support the Setting subsystem by enabling the :kconfig:option:`CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS` Kconfig option. + + #. To further enhance the performance, enable the :kconfig:option:`CONFIG_SETTINGS_ZMS_NAME_CACHE` Kconfig option, and configure its size with :kconfig:option:`CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE` according to your application needs. + +Optimizing ZMS in your application +********************************** + +When integrating ZMS through the Settings subsystem in your application, you might need to optimize its performance. +The following sections include the best practices to enhance ZMS performance. + +Sector size and count +===================== + +To ensure optimal performance from ZMS, consider the following: + +* Storage partition sizing - The total storage partition size and the sector size should be carefully dimensioned to optimize ZMS performance. + For detailed instructions on managing free space effectively within ZMS, refer to the :ref:`ZMS ` documentation. + You should choose a storage partition capable of holding double the size of the key-value pairs expected to be written. + +* Entry management - In subsystems like Settings, all path-value pairs are split into two ZMS entries (ATEs). + You should include the extra header needed by these entries in your total storage space calculations. + +* Optimizing data storage - Storing small data directly in the ZMS entry headers can significantly enhance performance. + For instance, in the Settings subsystem, using a path name of 8 bytes or less can speed up read and write operations. + +Dimensioning cache +================== + +Proper cache sizing is critical for maintaining high performance and efficient memory usage in ZMS: + +* Cache size determination - Ideally, the cache size should match the number of different entries that could be written to the storage. + This ensures efficient data retrieval and storage operations. + +* Memory considerations - Each cache entry consumes an additional 8 bytes of RAM. + Therefore, you should choose the cache size to balance performance with memory usage effectively. + +* Settings subsystem specifics - When using ZMS through the Settings subsystem, remember that each entry translates into two ZMS entries. + Consequently, the optimal cache size should be twice the number of Settings entries to accommodate this division effectively. diff --git a/doc/nrf/app_dev/device_guides/nrf70/features.rst b/doc/nrf/app_dev/device_guides/nrf70/features.rst index 7a3083818b0..6f29ff720f5 100644 --- a/doc/nrf/app_dev/device_guides/nrf70/features.rst +++ b/doc/nrf/app_dev/device_guides/nrf70/features.rst @@ -49,6 +49,8 @@ The nRF70 Series devices also support the following functionalities: * :ref:`ug_nrf70_developing_raw_ieee_80211_packet_transmission`: Allows the injection of raw IEEE 802.11 frames in Station and Monitor modes. * :ref:`Promiscuous reception `: Allows the reception of IEEE 802.11 packets from a connected BSSID when operating in Station mode. +* :ref:`Offloaded raw transmission `: Allows the offloading of raw IEEE 802.11 frame transmission to the nRF Wi-Fi driver. +* :ref:`Wi-Fi advanced security modes `: Allows the use of advanced security modes, certificate-based Wi-Fi security, and the Platform Security Architecture (PSA) security framework. Peer-to-peer support in the form of Wi-Fi Direct® will be available in the future. diff --git a/doc/nrf/app_dev/device_guides/nrf70/index.rst b/doc/nrf/app_dev/device_guides/nrf70/index.rst index 50a2ec8bb55..2da21e014de 100644 --- a/doc/nrf/app_dev/device_guides/nrf70/index.rst +++ b/doc/nrf/app_dev/device_guides/nrf70/index.rst @@ -130,3 +130,4 @@ The following subpages cover topics related to developing applications with the power_profiling nrf7002ek_dev_guide nrf7002eb_dev_guide + wifi_advanced_security_modes diff --git a/doc/nrf/app_dev/device_guides/nrf70/wifi_advanced_security_modes.rst b/doc/nrf/app_dev/device_guides/nrf70/wifi_advanced_security_modes.rst new file mode 100644 index 00000000000..aa220e1feeb --- /dev/null +++ b/doc/nrf/app_dev/device_guides/nrf70/wifi_advanced_security_modes.rst @@ -0,0 +1,86 @@ +.. _ug_nrf70_wifi_advanced_security_modes: + +nRF70 Series advanced security modes +#################################### + +.. contents:: + :local: + :depth: 2 + +Enterprise security +******************* + +The nRF70 Series devices support Wi-Fi® enterprise security, which is a more secure form of Wi-Fi security compared to Wi-Fi personal security. +Wi-Fi enterprise security is used in corporate environments where the security requirements are more stringent. +It is based on the IEEE 802.1X standard, which defines the port-based network access control. + +The nRF70 Series devices support the following Wi-Fi enterprise security mode, ``WPA2-EAP-TLS``. +This mode uses the Extensible Authentication Protocol (EAP) with Transport Layer Security (TLS) for authentication. +The client and the authentication server exchange certificates to authenticate each other. + + +Enterprise testing: X.509 certificate headers generation +======================================================== + +Wi-Fi enterprise security requires use of X.509 certificates. +Test certificates in PEM format are available at :zephyr_file:`samples/net/wifi/test_certs/` repository. +During the build process, the certificates are converted to a C header file that is included in the Wi-Fi shell module or the :ref:`Wi-Fi credentials ` library. + +To use custom certificates, use the following commands: + +.. code-block:: bash + + $ cp client.pem samples/net/wifi/test_certs/ + $ cp client-key.pem samples/net/wifi/test_certs/ + $ cp ca.pem samples/net/wifi/test_certs/ + $ cp client.pem samples/net/wifi/test_certs/client2.pem + $ cp client-key.pem samples/net/wifi/test_certs/client-key2.pem + $ cp ca.pem samples/net/wifi/test_certs/ca2.pem + + $ west build -p -b samples/net/wifi -- -DEXTRA_CONF_FILE=overlay-enterprise.conf + +.. note:: + The EAP phase2 certificates (suffixed with 2) are unused in ``WPA2-EAP-TLS`` but are mandatory for building the sample application. + The phase1 certificates are copied as phase2 certificates to avoid build errors as a temporary workaround. + +To establish a Wi-Fi connection, use the following command: + +.. code-block:: console + + uart:~$ wifi connect -s -k 7 -a anon -K + +.. code-block:: console + + uart:~$ wifi_cred add -s -k 7 -a anon -K + + +.. note:: + + The Wi-Fi credentials only support 16characters for the anonymous identity and the key passphrase. + +The server certificate is also provided in the same directory for testing purposes. +You can use any AAA server for testing purposes, such as FreeRADIUS or hostapd. + +.. note:: + + The certificates are for testing purposes only and should not be used for production. + +.. _ug_nrf70_developing_wifi_psa_support: + +Platform Security Architecture (PSA) crypto support +*************************************************** + +The nRF70 Series devices support the `Platform Security Architecture (PSA)`_ security framework. +This framework provides a set of APIs for cryptographic operations, which are used by the nRF70 Series. +This improves the security of the nRF70 device compared to the non-PSA mode. + +.. note:: + + Currently, the PSA crypto support is only applicable to the WPA2™-personal security profile. + +Enable PSA support +================== + +To enable the nRF70 PSA crypto support in your applications, use the :kconfig:option:`CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT_NCS_PSA` Kconfig option. + +The Wi-Fi connection process is similar to the non-PSA mode, however, the only difference is that the cryptographic operations are performed using PSA crypto APIs. diff --git a/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_architecture_memory.rst b/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_architecture_memory.rst index c2e3d43ae78..15d8017dbd0 100644 --- a/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_architecture_memory.rst +++ b/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_architecture_memory.rst @@ -42,18 +42,22 @@ Local RAM is present in each of local domains Application core RAM -------------------- -.. image:: images/nrf54h20_memory_map_app.svg - :width: 300 px - The application core contains 32 KB of local RAM. Accessing this memory from the application core CPU has minimal latency, but accessing it from any other core adds significant latency. Because of this property, the local RAM in the application domain should be used mainly to store data frequently accessed by the application core, or to store timing-critical parts of the code executed by the application core. -Address range - 0x22000000 - 0x22008000 +.. table:: Application core RAM layout in the nRF54H20 -Size - 32 KB + +-------------+-----------+---------+----------+-----------------------------+ + |Start Address|End Address|Size (KB)|Total (KB)|Content | + +=============+===========+=========+==========+=============================+ + |config |0x22008000 |config |32 |Application's Non-Secure data| + +-------------+-----------+---------+ +-----------------------------+ + |0x22000000 |config |config | |Application's Secure data | + +-------------+-----------+---------+----------+-----------------------------+ + +.. note:: + *Config* means that you can configure the address to meet the specific needs of the application. Access control Application domain local RAM is accessible by the application core. @@ -70,16 +74,22 @@ Access control Radio core RAM -------------- -The radio core contains 96 KB of local RAM. Any access to this memory has minimal latency if originated either from radio core CPU or from peripherals with EasyDMA located in the radio core. Any access from any other core has a significant latency. Because of this property, local RAM in the radio core should be used mainly to store data frequently accessed by the radio core CPU or the radio protocol frames to be accessed by CCM or RADIO peripherals, or to store timing critical parts of the code executed by the radio core CPU. -Address range - 0x23000000 - 0x23030000 +.. table:: Radio core RAM layout in the nRF54H20 -Size - 192 KB + +-------------+-----------+---------+----------+-----------------------------+ + |Start Address|End Address|Size (KB)|Total (KB)|Content | + +=============+===========+=========+==========+=============================+ + |config |0x23030000 |config |192 |Radio's Non-Secure data | + +-------------+-----------+---------+ +-----------------------------+ + |0x23000000 |config |config | |Radio's Secure data | + +-------------+-----------+---------+----------+-----------------------------+ + +.. note:: + *Config* means that you can configure the address to meet the specific needs of the application. Access control The radio core local RAM is accessible by the radio core. @@ -291,8 +301,6 @@ Each of the cores has full control on the data layout and management in the assi There is also a Device Firmware Upgrade partition used to store firmware images used during the upgrade procedure. If code and data for the application core do not fit in MRAM_10, it can be partially or fully placed in MRAM_11. -.. to review - Address range 0x0E100000 - 0x0E200000 diff --git a/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_suit_external_memory.rst b/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_suit_external_memory.rst index 76255941e5e..0aabbe26a28 100644 --- a/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_suit_external_memory.rst +++ b/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_suit_external_memory.rst @@ -137,16 +137,69 @@ Common steps for both push and fetch models In this example, the component index is ``3``. In the following steps, the companion image component is selected with ``suit-directive-set-component-index: 3``. - #. Modify the ``suit-install`` sequence in the application manifest file (:file:`app_envelope.yaml.jinja2`) to boot the companion image before accessing the candidate images stored in the external memory: + #. Append directives to the ``suit-shared-sequence`` sequence in the application manifest file (:file:`app_envelope.yaml.jinja2`) to set the expected digest of the companion application: + + .. code-block:: yaml + + suit-shared-sequence: + - suit-directive-set-component-index: 3 + - suit-directive-override-parameters: + suit-parameter-image-digest: + suit-digest-algorithm-id: cose-alg-sha-256 + suit-digest-bytes: + file: {{ flash_companion['binary'] }} + + #. Modify the ``suit-install`` sequence in the application manifest file (:file:`app_envelope.yaml.jinja2`) to load into RAM and boot the companion image before accessing the candidate images stored in the external memory: .. code-block:: yaml suit-install: + # Use CAND_IMG component to access flash companion binary, stored as one of the integrated payloads. + - suit-directive-set-component-index: 1 + - suit-directive-override-parameters: + suit-parameter-uri: "#{{ flash_companion['name'] }}" + suit-parameter-image-digest: + suit-digest-algorithm-id: cose-alg-sha-256 + suit-digest-bytes: + file: {{ flash_companion['binary'] }} + - suit-directive-fetch: + - suit-send-record-failure + # Verify integrity of the companion binary in the envelope. + - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + # Copy companion into local RAM. - suit-directive-set-component-index: 3 + - suit-directive-override-parameters: + suit-parameter-source-component: 1 + - suit-directive-copy: + - suit-send-record-failure + # Verify integrity of the companion binary in the local RAM. + - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + # Boot the companion application. - suit-directive-invoke: - - suit-send-record-failure + - suit-send-record-failure + + To further improve the update procedure robustness, you can copy all integrity checks from the ``suit-install`` to the ``suit-candidate-verification`` sequence. - The companion image can be optionally upgraded and have its integrity checked. + #. Append the flash companion binary as integrated payload inside SUIT envelope: + + .. code-block:: yaml + + SUIT_Envelope_Tagged: + suit-authentication-wrapper: { ... } + suit-manifest: { .. } + + suit-integrated-payloads: + "#{{ flash_companion['name'] }}": {{ flash_companion['binary'] }} + + The flash companion binary must be available before the driver of the external memory is booted, so it must be transferred as part of the update candidate envelope and fit within the DFU partition inside the internal MRAM memory. Steps specific for the push model ================================= @@ -157,7 +210,7 @@ Steps specific for the push model #. Modify the manifest files for all domains by completing the following steps: - a. Ensure that the URI used by the ``suit-payload-fetch`` sequence to fetch a given image matches the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI` Kconfig option. + a. Ensure that the URI used by the ``suit-directive-fetch`` command to fetch a given image matches the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI` Kconfig option. #. Ensure that the envelope integrates the specified image within the envelope integrated payloads section. This is ensured by default if you use the provided SUIT envelope templates. @@ -193,7 +246,79 @@ Steps specific for the fetch model - suit-directive-fetch: - suit-send-record-failure - This snippet assumes that ``CACHE_POOL`` is the third component on the manifest's components list (so its component index is 2) + This snippet assumes that ``CACHE_POOL`` is the third component on the manifest's components list (so its component index is ``2``) + +#. If your application uses the radio core, complete the following steps to modify the radio core manifest file :file:`rad_envelope.yaml.jinja2`: + + a. Modify the ``CACHE_POOL`` identifier in the SUIT manifest: + + .. code-block:: yaml + + suit-components: + ... + - - CACHE_POOL + - 1 + + The ``CACHE_POOL`` identifier must match the identifier of the cache partition defined in the DTS file. + + #. Add the ``suit-payload-fetch`` sequence: + + .. code-block:: yaml + + suit-payload-fetch: + - suit-directive-set-component-index: 2 + - suit-directive-override-parameters: + suit-parameter-uri: 'file://{{ radio['binary'] }}' + - suit-directive-fetch: + - suit-send-record-failure + + This snippet assumes that ``CACHE_POOL`` is the third component on the manifest's components list (so its component index is ``2``) + +#. Complete the following steps to modify the root manifest file :file:`root_with_binary_nordic_top_extflash.yaml.jinja2`: + + a. Add the ``suit-payload-fetch`` sequence: + + .. code-block:: yaml + + suit-payload-fetch: + - suit-directive-set-component-index: 0 + - suit-directive-override-parameters: + suit-parameter-uri: "#{{ application['name'] }}" + - suit-directive-fetch: + - suit-send-record-failure + - suit-condition-dependency-integrity: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - suit-directive-process-dependency: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + + This snippet assumes that ``CAND_MFST`` is the first component on the manifest's components list (so its component index is ``0``). + + #. If your application uses the radio core, append the following to the ``suit-payload-fetch`` sequence: + + .. code-block:: yaml + + suit-payload-fetch: + - suit-directive-set-component-index: 0 + - suit-directive-override-parameters: + suit-parameter-uri: "#{{ radio['name'] }}" + - suit-directive-fetch: + - suit-send-record-failure + - suit-condition-dependency-integrity: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - suit-directive-process-dependency: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure Testing the application with external flash support =================================================== @@ -242,4 +367,5 @@ Limitations * The Secure Domain, System Controller and companion image update candidates must always be stored in the MRAM. Trying to store those candidates in external memory will result in a failure during the installation process. -* The companion image needs a dedicated area in the executable region of the MRAM that is assigned to the application domain. +* The companion image needs either a dedicated area in the executable region of the MRAM or it needs to fit within the local RAM that is assigned to the application domain. + The default flash companion application uses local RAM, so there is no need to reserve additional area in the main application memory map. diff --git a/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_suit_push.rst b/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_suit_push.rst index 4ccbc9f4993..8e136a3afa2 100644 --- a/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_suit_push.rst +++ b/doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_suit_push.rst @@ -87,14 +87,14 @@ To reconfigure the sample to allow for pushing images into DFU cache partitions, * Optionally, modify :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_PARTITION` to select the partition where the image will be pushed (default is partition 1). * Optionally, modify the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI` to modify the URI used as key for the given image in the DFU cache. -#. Ensure that the URI used by the ``suit-payload-fetch`` sequence to fetch a given image matches the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI` Kconfig option. +#. Ensure that the URI used by the ``suit-directive-fetch`` command to fetch a given image matches the :kconfig:option:`CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI` Kconfig option. This is done by default when using the manifest templates provided by Nordic Semiconductor. For the application image URI, you can do that as follows (assuming the target name ``application`` for the image): .. code-block:: yaml - suit-directive-override-parameters: - suit-parameter-uri: '{{ application['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}' + suit-parameter-uri: "{{ application['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}" - suit-directive-fetch: - suit-send-record-failure diff --git a/doc/nrf/index.rst b/doc/nrf/index.rst index b67c337c79d..6431725f87d 100644 --- a/doc/nrf/index.rst +++ b/doc/nrf/index.rst @@ -4,11 +4,6 @@ Introduction ############ -.. important:: - - |NCS| v2.8.0-preview1 is a development tag used for development purposes but is not recommended to use in a production environment. - This tag may be replaced by a release in the future. - The |NCS| is a modern, unified software development kit for building low-power wireless applications based on the Nordic Semiconductor nRF52, nRF53, nRF54, nRF70, and nRF91 Series wireless devices. It supports :ref:`Microsoft Windows, Linux, and macOS ` for development. diff --git a/doc/nrf/libraries/nfc/rpc/index.rst b/doc/nrf/libraries/nfc/rpc/index.rst new file mode 100644 index 00000000000..4c9bbef12ac --- /dev/null +++ b/doc/nrf/libraries/nfc/rpc/index.rst @@ -0,0 +1,95 @@ +.. _nfc_rpc: + +NFC Remote Procedure Call +######################### + +.. contents:: + :local: + :depth: 2 + +The :ref:`NFC ` Remote Procedure Call (RPC) solution is a set of libraries that allows using the NFC stack running entirely on a separate device or CPU. + +Overview +******** + +The solution allows calling the NFC API (both :ref:`Type 2 Tag ` and :ref:`Type 4 Tag `) on a different CPU or device. +This is accomplished by running the full NFC functionality on one device and serializing the API from another device. +Use this solution when you do not want your firmware to include the NFC stack, for example to offload the application CPU, save memory, or to be able to build your application in a different environment. + +Implementation +============== + +The NFC RPC solution consists of the following components: + + * NFC RPC Client and common software libraries. + These libraries serialize the NFC API and enable RPC communication, and need to be part of the user application. + * NFC RPC Server, common libraries, and the Type 4 Tag library, Type 2 Tag library, or both. + These libraries enable communication with NFC RPC Client, and need to run on a device or CPU that has an NFC radio hardware peripheral. + +You can add support for serializing NFC-related custom APIs by implementing your own client and server procedures. +You can use the following files as examples: + + * :file:`subsys/nfc/rpc/client/nfc_rpc_t2t_client.c` + * :file:`subsys/nfc/rpc/server/nfc_rpc_t2t_server.c` + +Requirements +************ + +These configuration options must be enabled to use the library: + + * :kconfig:option:`CONFIG_NFC_RPC` + * :kconfig:option:`CONFIG_NFC_RPC_CLIENT` - for the NFC RPC client + * :kconfig:option:`CONFIG_NFC_RPC_SERVER` - for the NFC RPC server + +These configuration options related to NFC Data Exchange Format must be enabled on the client for the Type 4 Tag: + + * :kconfig:option:`CONFIG_NFC_NDEF` + * :kconfig:option:`CONFIG_NFC_NDEF_MSG` + * :kconfig:option:`CONFIG_NFC_NDEF_RECORD` + * :kconfig:option:`CONFIG_NFC_NDEF_TEXT_RECORD` + +These configuration options related to NFC must be enabled on the server: + + * :kconfig:option:`CONFIG_NFC_T2T_NRFXLIB` - for Type 2 Tag + * :kconfig:option:`CONFIG_NFC_T4T_NRFXLIB` - for Type 4 Tag + +Samples using the library +************************* + +The following |NCS| samples use this library: + +* :ref:`nrf_rpc_protocols_serialization_client` +* :ref:`nrf_rpc_protocols_serialization_server` + +Limitations +*********** + +The library currently supports serialization of the following: + + * :ref:`nrfxlib:type_2_tag` + * :ref:`nrfxlib:type_4_tag` + +The behavior of NFC with RPC is almost the same as without it, with the following exceptions: + + * Some NFC API functions get data by pointer, for example :c:func:`nfc_t4t_ndef_rwpayload_set`. + After calling the functions on the client, the data is sent to the server. + Any manipulation of data over the pointer will not affect the server's data instance. + * Even though the maximum payload for Type 4 Tag can be 65520 bytes, the real length is limited by :c:macro:`NDEF_FILE_SIZE`. + +Dependencies +************ + +The library has the following dependencies: + + * :ref:`nrf_rpc` + * :ref:`nfc` + +.. _nfc_rpc_api: + +API documentation +***************** + +This library does not define a new NFC API. + +| Header files: :file:`nrfxlib/nfc/include/nfc_t2t_lib.h`, :file:`nrfxlib/nfc/include/nfc_t4t_lib.h` +| Source files: :file:`subsys/nfc/rpc/` diff --git a/doc/nrf/links.txt b/doc/nrf/links.txt index 6e41d658bd5..8ca6aec3321 100644 --- a/doc/nrf/links.txt +++ b/doc/nrf/links.txt @@ -912,6 +912,8 @@ .. _`Testing the nRF Connect platform with Apple, Google and Samsung ecosystems`: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/matter-testing-nrf-connect-sdk-platform-with-apple-google-and-samsung-ecosystems-218911247#mcetoc_1gkq24ojdf +.. _`Online Power Profiler for Wi-Fi`: https://devzone.nordicsemi.com/power/w/opp/14/online-power-profiler-for-wi-fi + .. ### Source: App stores (play.google.com & apps.apple.com) .. _`Fast Pair Validator app`: https://play.google.com/store/apps/details?id=com.google.location.nearby.apps.fastpair.validator diff --git a/doc/nrf/protocols/thread/overview/memory_tables/nrf52840.txt b/doc/nrf/protocols/thread/overview/memory_tables/nrf52840.txt index bd6c9988bc5..c569aae4965 100644 --- a/doc/nrf/protocols/thread/overview/memory_tables/nrf52840.txt +++ b/doc/nrf/protocols/thread/overview/memory_tables/nrf52840.txt @@ -2,45 +2,45 @@ .. group-tab:: Single protocol - .. table:: nRF52840 single protocol Thread 1.3 memory requirements + .. table:: nRF52840 single protocol Thread 1.4 memory requirements - +-----------------------------+----------+-------+-------+ - | | master | FTD | MTD | - +=============================+==========+=======+=======+ - | ROM OT stack + App [kB] | 443 | 358 | 303 | - +-----------------------------+----------+-------+-------+ - | ROM Bluetooth LE stack [kB] | 0 | 0 | 0 | - +-----------------------------+----------+-------+-------+ - | Persistent storage [kB] | 32 | 32 | 32 | - +-----------------------------+----------+-------+-------+ - | Free ROM [kB] | 549 | 634 | 689 | - +-----------------------------+----------+-------+-------+ - | RAM OT stack + App [kB] | 102 | 93 | 83 | - +-----------------------------+----------+-------+-------+ - | RAM Bluetooth LE stack [kB] | 0 | 0 | 0 | - +-----------------------------+----------+-------+-------+ - | Free RAM [kB] | 154 | 163 | 173 | - +-----------------------------+----------+-------+-------+ + +-----------------------------+-------+-------+ + | | FTD | MTD | + +=============================+=======+=======+ + | ROM OT stack + App [kB] | 359 | 304 | + +-----------------------------+-------+-------+ + | ROM Bluetooth LE stack [kB] | 0 | 0 | + +-----------------------------+-------+-------+ + | Persistent storage [kB] | 32 | 32 | + +-----------------------------+-------+-------+ + | Free ROM [kB] | 633 | 688 | + +-----------------------------+-------+-------+ + | RAM OT stack + App [kB] | 93 | 83 | + +-----------------------------+-------+-------+ + | RAM Bluetooth LE stack [kB] | 0 | 0 | + +-----------------------------+-------+-------+ + | Free RAM [kB] | 163 | 173 | + +-----------------------------+-------+-------+ .. group-tab:: Multiprotocol - .. table:: nRF52840 multiprotocol Thread 1.3 memory requirements + .. table:: nRF52840 multiprotocol Thread 1.4 memory requirements - +-----------------------------+----------+-------+-------+ - | | master | FTD | MTD | - +=============================+==========+=======+=======+ - | ROM OT stack + App [kB] | 443 | 358 | 303 | - +-----------------------------+----------+-------+-------+ - | ROM Bluetooth LE stack [kB] | 75 | 75 | 76 | - +-----------------------------+----------+-------+-------+ - | Persistent storage [kB] | 32 | 32 | 32 | - +-----------------------------+----------+-------+-------+ - | Free ROM [kB] | 474 | 559 | 613 | - +-----------------------------+----------+-------+-------+ - | RAM OT stack + App [kB] | 102 | 93 | 83 | - +-----------------------------+----------+-------+-------+ - | RAM Bluetooth LE stack [kB] | 12 | 13 | 13 | - +-----------------------------+----------+-------+-------+ - | Free RAM [kB] | 142 | 150 | 160 | - +-----------------------------+----------+-------+-------+ + +-----------------------------+-------+-------+ + | | FTD | MTD | + +=============================+=======+=======+ + | ROM OT stack + App [kB] | 359 | 304 | + +-----------------------------+-------+-------+ + | ROM Bluetooth LE stack [kB] | 75 | 76 | + +-----------------------------+-------+-------+ + | Persistent storage [kB] | 32 | 32 | + +-----------------------------+-------+-------+ + | Free ROM [kB] | 558 | 612 | + +-----------------------------+-------+-------+ + | RAM OT stack + App [kB] | 93 | 83 | + +-----------------------------+-------+-------+ + | RAM Bluetooth LE stack [kB] | 13 | 13 | + +-----------------------------+-------+-------+ + | Free RAM [kB] | 150 | 160 | + +-----------------------------+-------+-------+ diff --git a/doc/nrf/protocols/thread/overview/memory_tables/nrf5340.txt b/doc/nrf/protocols/thread/overview/memory_tables/nrf5340.txt index 0331a3c0daf..683aa512fd6 100644 --- a/doc/nrf/protocols/thread/overview/memory_tables/nrf5340.txt +++ b/doc/nrf/protocols/thread/overview/memory_tables/nrf5340.txt @@ -2,45 +2,45 @@ .. group-tab:: Single protocol - .. table:: nRF5340 single protocol Thread 1.3 memory requirements + .. table:: nRF5340 single protocol Thread 1.4 memory requirements +-----------------------------+-------+-------+ | | FTD | MTD | +=============================+=======+=======+ - | ROM OT stack + App [kB] | 329 | 275 | + | ROM OT stack + App [kB] | 330 | 276 | +-----------------------------+-------+-------+ | ROM Bluetooth LE stack [kB] | 0 | 0 | +-----------------------------+-------+-------+ | Persistent storage [kB] | 32 | 32 | +-----------------------------+-------+-------+ - | Free ROM [kB] | 663 | 717 | + | Free ROM [kB] | 662 | 716 | +-----------------------------+-------+-------+ - | RAM OT stack + App [kB] | 101 | 90 | + | RAM OT stack + App [kB] | 101 | 91 | +-----------------------------+-------+-------+ | RAM Bluetooth LE stack [kB] | 0 | 0 | +-----------------------------+-------+-------+ - | Free RAM [kB] | 411 | 422 | + | Free RAM [kB] | 411 | 421 | +-----------------------------+-------+-------+ .. group-tab:: Multiprotocol - .. table:: nRF5340 multiprotocol Thread 1.3 memory requirements + .. table:: nRF5340 multiprotocol Thread 1.4 memory requirements +-----------------------------+-------+-------+ | | FTD | MTD | +=============================+=======+=======+ - | ROM OT stack + App [kB] | 329 | 275 | + | ROM OT stack + App [kB] | 330 | 276 | +-----------------------------+-------+-------+ | ROM Bluetooth LE stack [kB] | 30 | 30 | +-----------------------------+-------+-------+ | Persistent storage [kB] | 32 | 32 | +-----------------------------+-------+-------+ - | Free ROM [kB] | 633 | 687 | + | Free ROM [kB] | 632 | 686 | +-----------------------------+-------+-------+ - | RAM OT stack + App [kB] | 101 | 90 | + | RAM OT stack + App [kB] | 101 | 91 | +-----------------------------+-------+-------+ - | RAM Bluetooth LE stack [kB] | 13 | 14 | + | RAM Bluetooth LE stack [kB] | 13 | 13 | +-----------------------------+-------+-------+ | Free RAM [kB] | 398 | 408 | +-----------------------------+-------+-------+ diff --git a/doc/nrf/protocols/thread/overview/memory_tables/nrf54l15.txt b/doc/nrf/protocols/thread/overview/memory_tables/nrf54l15.txt index 566f7ee16bb..0781040f25e 100644 --- a/doc/nrf/protocols/thread/overview/memory_tables/nrf54l15.txt +++ b/doc/nrf/protocols/thread/overview/memory_tables/nrf54l15.txt @@ -2,45 +2,45 @@ .. group-tab:: Single protocol - .. table:: nRF54L15 single protocol Thread 1.3 memory requirements + .. table:: nRF54L15 single protocol Thread 1.4 memory requirements +-----------------------------+----------+-------+-------+ | | master | FTD | MTD | +=============================+==========+=======+=======+ - | ROM OT stack + App [kB] | 453 | 366 | 313 | + | ROM OT stack + App [kB] | 478 | 368 | 315 | +-----------------------------+----------+-------+-------+ | ROM Bluetooth LE stack [kB] | 0 | 0 | 0 | +-----------------------------+----------+-------+-------+ | Persistent storage [kB] | 32 | 32 | 32 | +-----------------------------+----------+-------+-------+ - | Free ROM [kB] | 1039 | 1126 | 1179 | + | Free ROM [kB] | 1014 | 1124 | 1177 | +-----------------------------+----------+-------+-------+ - | RAM OT stack + App [kB] | 104 | 97 | 87 | + | RAM OT stack + App [kB] | 107 | 98 | 87 | +-----------------------------+----------+-------+-------+ | RAM Bluetooth LE stack [kB] | 0 | 0 | 0 | +-----------------------------+----------+-------+-------+ - | Free RAM [kB] | 152 | 159 | 169 | + | Free RAM [kB] | 149 | 158 | 169 | +-----------------------------+----------+-------+-------+ .. group-tab:: Multiprotocol - .. table:: nRF54L15 multiprotocol Thread 1.3 memory requirements + .. table:: nRF54L15 multiprotocol Thread 1.4 memory requirements +-----------------------------+----------+-------+-------+ | | master | FTD | MTD | +=============================+==========+=======+=======+ - | ROM OT stack + App [kB] | 453 | 366 | 313 | + | ROM OT stack + App [kB] | 478 | 368 | 315 | +-----------------------------+----------+-------+-------+ | ROM Bluetooth LE stack [kB] | 91 | 91 | 91 | +-----------------------------+----------+-------+-------+ | Persistent storage [kB] | 32 | 32 | 32 | +-----------------------------+----------+-------+-------+ - | Free ROM [kB] | 948 | 1035 | 1088 | + | Free ROM [kB] | 923 | 1033 | 1086 | +-----------------------------+----------+-------+-------+ - | RAM OT stack + App [kB] | 104 | 97 | 87 | + | RAM OT stack + App [kB] | 107 | 98 | 87 | +-----------------------------+----------+-------+-------+ | RAM Bluetooth LE stack [kB] | 14 | 14 | 14 | +-----------------------------+----------+-------+-------+ - | Free RAM [kB] | 138 | 145 | 155 | + | Free RAM [kB] | 135 | 144 | 155 | +-----------------------------+----------+-------+-------+ diff --git a/doc/nrf/protocols/thread/overview/ot_memory.rst b/doc/nrf/protocols/thread/overview/ot_memory.rst index 27dd0ba905c..0807157a7b2 100644 --- a/doc/nrf/protocols/thread/overview/ot_memory.rst +++ b/doc/nrf/protocols/thread/overview/ot_memory.rst @@ -38,7 +38,7 @@ See :ref:`thread_device_types` for more information on device types, and :ref:`t .. _thread_ot_memory_54l15: -nRF5340 DK RAM and flash memory requirements +nRF54L15 DK RAM and flash memory requirements ********************************************* The following tables present memory requirements for samples running on the :ref:`nRF54L15 DK ` (:ref:`nrf54l15dk `) with the software cryptography support provided by the :ref:`nrfxlib:nrf_oberon_readme` module. diff --git a/doc/nrf/protocols/wifi/advanced_modes/index.rst b/doc/nrf/protocols/wifi/advanced_modes/index.rst index ad57cd8ce86..fe1d9c4d44c 100644 --- a/doc/nrf/protocols/wifi/advanced_modes/index.rst +++ b/doc/nrf/protocols/wifi/advanced_modes/index.rst @@ -13,3 +13,4 @@ The following subpages cover topics related to the transmission and reception of raw_tx_operation sniffer_rx_operation promiscuous_operation + offloaded_raw_tx diff --git a/doc/nrf/protocols/wifi/advanced_modes/offloaded_raw_tx.rst b/doc/nrf/protocols/wifi/advanced_modes/offloaded_raw_tx.rst new file mode 100644 index 00000000000..320b238025a --- /dev/null +++ b/doc/nrf/protocols/wifi/advanced_modes/offloaded_raw_tx.rst @@ -0,0 +1,62 @@ +.. _ug_nrf70_developing_offloaded_raw_tx: + +Offloaded raw transmit operation +################################ + +.. contents:: + :local: + :depth: 2 + +The nRF70 Series ICs can be used as offloaded raw transmit devices, where the nRF70 Series device can transmit frames at regular intervals utilizing very low power. +The contents of the frame as well as parameters such as frequency and channel of transmission are programmable. + +The major functionality of transmitting the frames is offloaded to the nRF70 device, thereby placing minimal requirements on the host (mainly programming capability). +This results in minimal host memory requirements (RAM and flash memory). + +This can be used for applications such as indoor navigation and tracking, where it is essential for anchor nodes to perform low-power beaconing. +Anchor devices can transmit beacon-compliant packets containing tracking or location information inside the BSSID or SSID fields. +Devices scanning for these beacon-compliant packets can use this information. + +Offloaded raw TX mode in Wi-Fi driver +************************************* + +The offloaded raw transmit operation is supported as a separate stand-alone compile-time mode of operation in the nRF Wi-Fi driver and is exclusive to the following existing modes of operation: + +* Wi-Fi mode +* Radio Test mode + +In addition to providing start or stop control over the offloaded raw transmit operation, the driver supports the update of the following configuration parameters: + +* Frame contents +* Channel of operation +* Data rate +* Rate flags +* Periodicity of transmission +* Transmit power + +.. _ug_nrf70_developing_enabling_offloaded_raw_tx: + +Offloaded raw transmit API +************************** + +The offloaded raw transmit functionality of nRF70 Series ICs can be utilized by using the APIs provided by the driver. +The API reference can be found at: + +| Header file: :file:`zephyr/drivers/wifi/nrfwifi/off_raw_tx/off_raw_tx_api.h` + + +See the :ref:`Offloaded raw transmit sample ` to know more about the offloaded raw transmit API. + +.. _ug_nrf70_developing_offloaded_raw_tx_power_consumption: + +Power consumption +***************** + +The power consumed by the nRF70 Series device during the offloaded raw TX operation depends on the following parameters: + +* Operating data rate (for example, 6 Mbps, MCS0) : Power consumption decreases as the data rate increases. +* Payload length : Power consumption increases with the payload length. +* Periodicity of transmission : Power consumption increases as the period between successive transmissions decreases. +* Transmit power : Power consumption increases as the transmit power increases. + +For optimizing the power consumption of your application, you can use the `Online Power Profiler for Wi-Fi`_ tool. diff --git a/doc/nrf/releases_and_maturity.rst b/doc/nrf/releases_and_maturity.rst index b492d6eda2d..1f2f92ae00d 100644 --- a/doc/nrf/releases_and_maturity.rst +++ b/doc/nrf/releases_and_maturity.rst @@ -28,3 +28,4 @@ If an issue is found in a release after it has taken place, those issues are lis releases_and_maturity/repository_revisions releases_and_maturity/software_maturity releases_and_maturity/abi_compatibility + releases_and_maturity/known_issues diff --git a/doc/nrf/releases_and_maturity/known_issues.rst b/doc/nrf/releases_and_maturity/known_issues.rst index 1d0b3f6795c..a50e6e7929b 100644 --- a/doc/nrf/releases_and_maturity/known_issues.rst +++ b/doc/nrf/releases_and_maturity/known_issues.rst @@ -1,5 +1,3 @@ -:orphan: - .. _known_issues: Known issues diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_1.x_to_2.x.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_1.x_to_2.x.rst index a70e4ccbabe..d58b1e5db81 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_1.x_to_2.x.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_1.x_to_2.x.rst @@ -1,5 +1,3 @@ -:orphan: - .. _ncs_2.0.0_migration: Migration notes for |NCS| v2.0.0 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.4.99-cs3_to_2.6.99-cs2.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.4.99-cs3_to_2.6.99-cs2.rst index 2fb0f641351..a5791574fac 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.4.99-cs3_to_2.6.99-cs2.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.4.99-cs3_to_2.6.99-cs2.rst @@ -1,5 +1,3 @@ -:orphan: - .. _migration_cs3_to_2_6_99_cs2: Migration notes for |NCS| v2.6.99_cs2 for v2.4.99-cs3 users diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.5.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.5.rst index b2cac995fd0..b7f4539c88b 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.5.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.5.rst @@ -1,5 +1,3 @@ -:orphan: - .. _migration_2.5: Migration guide for |NCS| v2.5.0 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.6.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.6.rst index a74ee2b8c93..86f04155e70 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.6.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.6.rst @@ -1,5 +1,3 @@ -:orphan: - .. _migration_2.6: Migration guide for |NCS| v2.6.0 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.7.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.7.rst index fea0e6e69ba..6921ef6bee6 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.7.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.7.rst @@ -1,5 +1,3 @@ -:orphan: - .. _migration_2.7: Migration guide for |NCS| v2.7.0 diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_2.8.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_2.8.rst index 65ceecc9665..dec82afe43e 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_2.8.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_2.8.rst @@ -1,5 +1,3 @@ -:orphan: - .. _migration_2.8: Migration guide for |NCS| v2.8.0 (Working draft) @@ -125,6 +123,19 @@ Libraries This section describes the changes related to libraries. +Wi-Fi® +------ + +.. toggle:: + + * For :ref:`lib_wifi_credentials` library: + + * Syntax for ``add`` command has been modified to support ``getopt`` model. + For example, the following command with old syntax: + ``wifi_cred add SSID WPA2-PSK password`` should be replaced with the following command with new syntax: + ``wifi_cred add -s SSID -k 1 -p password``. + ``wifi_cred add --help`` command will provide more information on the new syntax. + LTE link control library ------------------------ diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7.rst index 74fe158b274..faeeff027ef 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7.rst @@ -1,5 +1,3 @@ -:orphan: - .. _migration_nrf54h20_to_2.7: Migration notes for |NCS| v2.7.0 and the nRF54H20 DK diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs1.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs1.rst index 1885f9f2a44..615f6086bf7 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs1.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs1.rst @@ -1,5 +1,3 @@ -:orphan: - .. _migration_nrf54h20_to_2.7.99-cs1: Migration notes for |NCS| v2.7.99-cs1 and the nRF54H20 DK diff --git a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs2.rst b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs2.rst index 882d359fac3..fdc471bc30c 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs2.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs2.rst @@ -1,5 +1,3 @@ -:orphan: - .. _migration_nrf54h20_to_2.7.99-cs2: Migration notes for |NCS| v2.7.99-cs2 and the nRF54H20 DK diff --git a/doc/nrf/releases_and_maturity/migration/migration_hwmv2.rst b/doc/nrf/releases_and_maturity/migration/migration_hwmv2.rst index a0e50e87b66..c8721e98a06 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_hwmv2.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_hwmv2.rst @@ -1,5 +1,3 @@ -:orphan: - .. _hwmv1_to_v2_migration: Migrating to the current hardware model diff --git a/doc/nrf/releases_and_maturity/migration/migration_sysbuild.rst b/doc/nrf/releases_and_maturity/migration/migration_sysbuild.rst index c191a9593a5..8196089eeb7 100644 --- a/doc/nrf/releases_and_maturity/migration/migration_sysbuild.rst +++ b/doc/nrf/releases_and_maturity/migration/migration_sysbuild.rst @@ -1,5 +1,3 @@ -:orphan: - .. _child_parent_to_sysbuild_migration: Migrating from multi-image builds to sysbuild diff --git a/doc/nrf/releases_and_maturity/migration_guides.rst b/doc/nrf/releases_and_maturity/migration_guides.rst index 19be4b4d05a..d169e313c88 100644 --- a/doc/nrf/releases_and_maturity/migration_guides.rst +++ b/doc/nrf/releases_and_maturity/migration_guides.rst @@ -9,17 +9,10 @@ Migration guides are also provided for major functionality updates. .. note:: |migration_contact_devzone| -* `Migrating from multi-image builds to sysbuild`_ -* `Migrating to the current hardware model`_ -* `Migration guide for nRF Connect SDK v2.8.0 (Working draft) `_ -* `Migration guide for nRF Connect SDK v2.7.0`_ -* `Migration guide for nRF Connect SDK v2.6.0`_ -* `Migration guide for nRF Connect SDK v2.5.0`_ -* `Migration guide for nRF Connect SDK v2.0.0`_ +.. toctree:: + :maxdepth: 1 + :glob: + :reversed: + :caption: Subpages: -For nRF54H20 customer sampling participants: - -* `Migration notes for nRF Connect SDK v2.7.99-cs2 and the nRF54H20 DK`_ -* `Migration notes for nRF Connect SDK v2.7.99-cs1 and the nRF54H20 DK`_ -* `Migration notes for nRF Connect SDK v2.7.0 for nRF54H20 DK users`_ -* `Migration guide for nRF Connect SDK v2.6.99_cs2 for v2.4.99-cs3 users`_ + migration/* diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst index 3cb0cc84baf..ec5da3499ba 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst @@ -1,7 +1,7 @@ .. _ncs_release_notes_changelog: -Changelog for |NCS| v2.8.0-preview1 -################################### +Changelog for |NCS| v2.7.99 +########################### .. contents:: :local: diff --git a/dts/bindings/wifi/nordic,nrf7000-coex.yaml b/dts/bindings/wifi/nordic,nrf7000-coex.yaml deleted file mode 100644 index 94dcc2181d3..00000000000 --- a/dts/bindings/wifi/nordic,nrf7000-coex.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -description: This is a representation of the nRF7000 Wi-Fi chip with COEX interface. - -compatible: nordic,nrf7000-coex - -include: - - "nordic,nrf70-coex.yaml" diff --git a/dts/bindings/wifi/nordic,nrf7001-coex.yaml b/dts/bindings/wifi/nordic,nrf7001-coex.yaml deleted file mode 100644 index d58afe7d44c..00000000000 --- a/dts/bindings/wifi/nordic,nrf7001-coex.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -description: This is a representation of the nRF7001 Wi-Fi chip with COEX interface. - -compatible: nordic,nrf7001-coex - -include: - - "nordic,nrf70-coex.yaml" diff --git a/dts/bindings/wifi/nordic,nrf7002-coex.yaml b/dts/bindings/wifi/nordic,nrf7002-coex.yaml deleted file mode 100644 index 1df61d0bf98..00000000000 --- a/dts/bindings/wifi/nordic,nrf7002-coex.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -description: This is a representation of the nRF7002 Wi-Fi chip with COEX interface. - -compatible: nordic,nrf7002-coex - -include: - - "nordic,nrf70-coex.yaml" diff --git a/dts/bindings/wifi/nordic,nrf700x-qspi.yaml b/dts/bindings/wifi/nordic,nrf700x-qspi.yaml deleted file mode 100644 index 10a8f67182e..00000000000 --- a/dts/bindings/wifi/nordic,nrf700x-qspi.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - - -description: This is a representation of the nRF700x Wi-Fi chip. - -compatible: "nordic,nrf700x-qspi" - -include: "nordic,nrf700x.yaml" - -on-bus: qspi - -properties: - sck-frequency: - type: int - required: true - description: | - Maximum clock speed (in Hz) supported by the device. - - reg: - required: true - - quad-mode: - type: boolean - description: | - If specified, Use QSPI in quad mode (4 IO lines) otherwise in - SPI mode (2 IO lines - MOSI & MISO). - - rx-delay: - type: int - description: | - Number of clock cycles from the rising edge of the SPI clock - until the input serial data is sampled. - - cpha: - type: boolean - description: | - Set to indicate phase starts with asserted half-phase (CPHA=1). - The driver using this property must also use `cpol`. - - cpol: - type: boolean - description: | - Set to indicate that the clock leading edge is falling (CPOL=1). - The driver using this property requires also use `cpha`. diff --git a/dts/bindings/wifi/nordic,nrf700x-spi.yaml b/dts/bindings/wifi/nordic,nrf700x-spi.yaml deleted file mode 100644 index 8d6b846e1cd..00000000000 --- a/dts/bindings/wifi/nordic,nrf700x-spi.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - - -description: This is a representation of the nRF700x Wi-Fi chip. - -compatible: "nordic,nrf700x-spi" - -include: ["nordic,nrf700x.yaml", "spi-device.yaml"] diff --git a/dts/bindings/wifi/nordic,nrf700x-tx-power.yaml b/dts/bindings/wifi/nordic,nrf700x-tx-power.yaml deleted file mode 100644 index cdbb30ff25b..00000000000 --- a/dts/bindings/wifi/nordic,nrf700x-tx-power.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - -description: This is a representation of the nRF70 series transmit power ceilings - i.e., maximum transmit power allowed. - -compatible: "nordic,nrf700x-tx-power-ceiling" - -include: base.yaml - -properties: - max-pwr-2g-dsss: - type: int - required: true - description: 8-bit values for max tx power in 2.4GHz band for DSSS/CCK rates - max-pwr-2g-mcs0: - type: int - required: true - description: 8-bit values for max tx power in 2.4GHz band for MCS0 - max-pwr-2g-mcs7: - type: int - required: true - description: 8-bit values for max tx power in 2.4GHz band for MCS7 - max-pwr-5g-low-mcs0: - type: int - description: 8-bit values for max tx power in 5GHz band MCS0 low sub-band - max-pwr-5g-low-mcs7: - type: int - description: 8-bit values for max tx power in 5GHz band MCS7 low sub-band - max-pwr-5g-mid-mcs0: - type: int - description: 8-bit values for max tx power in 5GHz band MCS0 mid sub-band - max-pwr-5g-mid-mcs7: - type: int - description: 8-bit values for max tx power in 5GHz band MCS7 mid sub-band - max-pwr-5g-high-mcs0: - type: int - description: 8-bit values for max tx power in 5GHz band MCS0 high sub-band - max-pwr-5g-high-mcs7: - type: int - description: 8-bit values for max tx power in 5GHz band MCS7 high sub-band diff --git a/dts/bindings/wifi/nordic,nrf700x.yaml b/dts/bindings/wifi/nordic,nrf700x.yaml deleted file mode 100644 index f5b23b2edc9..00000000000 --- a/dts/bindings/wifi/nordic,nrf700x.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - - -# GPIO lines for controlling the nRF700x Wi-Fi chip. -include: base.yaml - -properties: - iovdd-ctrl-gpios: - type: phandle-array - required: true - description: | - GPIO of the SOC controlling IO VDD Control pin of the nRF700x - bucken-gpios: - type: phandle-array - required: true - description: | - GPIO of the SOC controlling BUCK_EN pin of the nRF700x - host-irq-gpios: - type: phandle-array - required: true - description: | - GPIO of the SOC controlling the HOST IRQ pin of the nRF700x diff --git a/include/net/wifi_credentials.h b/include/net/wifi_credentials.h index 28e4b664da8..5e313f532da 100644 --- a/include/net/wifi_credentials.h +++ b/include/net/wifi_credentials.h @@ -29,10 +29,16 @@ extern "C" { #define WIFI_CREDENTIALS_FLAG_2_4GHz BIT(2) /* this entry can use the 5 GHz band */ #define WIFI_CREDENTIALS_FLAG_5GHz BIT(3) +/* this entry can use the 6 GHz band */ +#define WIFI_CREDENTIALS_FLAG_6GHz BIT(4) /* this entry requires management frame protection */ -#define WIFI_CREDENTIALS_FLAG_MFP_REQUIRED BIT(4) +#define WIFI_CREDENTIALS_FLAG_MFP_REQUIRED BIT(5) /* this entry disables management frame protection */ -#define WIFI_CREDENTIALS_FLAG_MFP_DISABLED BIT(5) +#define WIFI_CREDENTIALS_FLAG_MFP_DISABLED BIT(6) +/* this entry has anonymous identity configured */ +#define WIFI_CREDENTIALS_FLAG_ANONYMOUS_IDENTITY BIT(7) +/* this entry has key password configured */ +#define WIFI_CREDENTIALS_FLAG_KEY_PASSWORD BIT(8) #define WIFI_CREDENTIALS_MAX_PASSWORD_LEN\ MAX(WIFI_PSK_MAX_LEN, CONFIG_WIFI_CREDENTIALS_SAE_PASSWORD_LENGTH) @@ -53,6 +59,10 @@ struct wifi_credentials_header { uint32_t flags; uint8_t channel; uint32_t timeout; + char anon_id[16]; + uint8_t aid_length; + char key_passwd[16]; + uint8_t key_passwd_length; }; /** diff --git a/lib/identity_key/Kconfig b/lib/identity_key/Kconfig index dc3d03ea9c8..9c3d2ad6b3a 100644 --- a/lib/identity_key/Kconfig +++ b/lib/identity_key/Kconfig @@ -10,7 +10,6 @@ menuconfig IDENTITY_KEY depends on NRF_SECURITY depends on !TRUSTED_EXECUTION_NONSECURE depends on MAIN_STACK_SIZE >= 2048 - depends on ASSERT help This option adds support for an identity key stored in the KMU. The key is stored in an encrypted form and is decrypted diff --git a/samples/bluetooth/fast_pair/locator_tag/CMakeLists.txt b/samples/bluetooth/fast_pair/locator_tag/CMakeLists.txt index 8a6afba1c88..510b15a98d8 100644 --- a/samples/bluetooth/fast_pair/locator_tag/CMakeLists.txt +++ b/samples/bluetooth/fast_pair/locator_tag/CMakeLists.txt @@ -18,6 +18,9 @@ if(NOT DEFINED FP_MODEL_ID AND NOT DEFINED FP_ANTI_SPOOFING_KEY AND NOT SYSBUILD set(FP_ANTI_SPOOFING_KEY "rie10A7ONqwd77VmkxGsblPUbMt384qjDgcEJ/ctT9Y=") endif() +# The sample uses a separate directory for configuration files. +set(APPLICATION_CONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}/configuration") + find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(locator_tag) diff --git a/samples/bluetooth/fast_pair/locator_tag/sysbuild/CMakeLists.txt b/samples/bluetooth/fast_pair/locator_tag/sysbuild/CMakeLists.txt index a6194ab3ff1..0b620c62743 100644 --- a/samples/bluetooth/fast_pair/locator_tag/sysbuild/CMakeLists.txt +++ b/samples/bluetooth/fast_pair/locator_tag/sysbuild/CMakeLists.txt @@ -4,11 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -set(locator_tag_APPLICATION_CONFIG_DIR - "${CMAKE_CURRENT_LIST_DIR}/../configuration" - CACHE INTERNAL "Application configuration dir controlled by sysbuild" -) - # The sample uses the sysbuild/configuration/ scheme for the sysbuild configuration files. set(SB_APPLICATION_CONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}/configuration/\${NORMALIZED_BOARD_TARGET}") diff --git a/samples/cellular/nrf_cloud_multi_service/overlay-nrf7002ek-wifi-scan-only.conf b/samples/cellular/nrf_cloud_multi_service/overlay-nrf7002ek-wifi-scan-only.conf index 10c74be48f1..a03c368de23 100644 --- a/samples/cellular/nrf_cloud_multi_service/overlay-nrf7002ek-wifi-scan-only.conf +++ b/samples/cellular/nrf_cloud_multi_service/overlay-nrf7002ek-wifi-scan-only.conf @@ -50,3 +50,7 @@ CONFIG_NET_MAX_CONTEXTS=5 # Disable LED patterns, enabling WiFi scanning takes control of two LEDs CONFIG_LED_INDICATION_DISABLED=y + +# Temporary tweak: Disable wifi_mgmt buffer offload; It causes scans to fail in scan-only mode. +# To be removed when SHEL-3213 is resolved +DCONFIG_NRF_WIFI_MGMT_BUFF_OFFLOAD=n diff --git a/samples/cellular/nrf_cloud_rest_fota/CMakeLists.txt b/samples/cellular/nrf_cloud_rest_fota/CMakeLists.txt index 3469216e476..035ad1e382d 100644 --- a/samples/cellular/nrf_cloud_rest_fota/CMakeLists.txt +++ b/samples/cellular/nrf_cloud_rest_fota/CMakeLists.txt @@ -12,4 +12,8 @@ zephyr_compile_definitions(PROJECT_NAME=${PROJECT_NAME}) # NORDIC SDK APP START target_sources(app PRIVATE src/main.c) + +if(CONFIG_NRF_CLOUD_FOTA_SMP AND CONFIG_BOARD_NRF9160DK_NRF9160_NS) + target_sources(app PRIVATE src/smp_reset.c) +endif() # NORDIC SDK APP END diff --git a/samples/cellular/nrf_cloud_rest_fota/README.rst b/samples/cellular/nrf_cloud_rest_fota/README.rst index 3ccbf00bb8a..355390c2ced 100644 --- a/samples/cellular/nrf_cloud_rest_fota/README.rst +++ b/samples/cellular/nrf_cloud_rest_fota/README.rst @@ -115,6 +115,19 @@ To enable full modem FOTA, add the following parameter to your build command: Also, if you are using an nRF9160 DK, specify your development kit version by appending it to the board name. For example, if you are using version 1.0.1, use the board name ``nrf9160dk@1.0.1/nrf9160/ns`` in your build command. +To enable SMP FOTA (nRF9160 DK only), add the following parameters to your build command: + +* ``-DEXTRA_CONF_FILE=overlay_smp_fota.conf`` +* ``-DEXTRA_DTC_OVERLAY_FILE=nrf9160dk_mcumgr_client_uart2.overlay`` + +The nRF52840 device on your DK must be running an SMP compatible firmware, such as the :ref:`smp_svr` sample. +Build the :ref:`smp_svr` sample for the ``nrf9160dk/nrf52840`` board with the following parameters: + +* ``-DEXTRA_CONF_FILE=overlay_smp_fota.conf`` +* ``-DEXTRA_DTC_OVERLAY_FILE=nrf9160dk_mcumgr_client_uart2.overlay`` + +To change :ref:`smp_svr` sample's application version, set the :kconfig:option:`CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION` Kconfig option. + Dependencies ************ diff --git a/samples/cellular/nrf_cloud_rest_fota/nrf9160dk_mcumgr_client_uart2.overlay b/samples/cellular/nrf_cloud_rest_fota/nrf9160dk_mcumgr_client_uart2.overlay new file mode 100644 index 00000000000..3cba07b8d98 --- /dev/null +++ b/samples/cellular/nrf_cloud_rest_fota/nrf9160dk_mcumgr_client_uart2.overlay @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/* Generic PIN definition for UART2 or UART1 to nRF52840 */ +&pinctrl { + mcumgr_uart_default: mcumgr_uart_default { + group1 { + psels = , + ; + }; + group2 { + psels = , + ; + bias-pull-up; + }; + }; + + mcumgr_uart_sleep: mcumgr_uart_sleep { + group1 { + psels = , + , + , + ; + low-power-enable; + }; + }; +}; + +&uart2 { + compatible = "nordic,nrf-uarte"; + current-speed = <1000000>; + status = "okay"; + pinctrl-0 = <&mcumgr_uart_default>; + pinctrl-1 = <&mcumgr_uart_sleep>; + pinctrl-names = "default", "sleep"; + hw-flow-control; +}; + +/ { + chosen { + zephyr,uart-mcumgr = &uart2; + }; +}; diff --git a/samples/cellular/nrf_cloud_rest_fota/overlay_smp_fota.conf b/samples/cellular/nrf_cloud_rest_fota/overlay_smp_fota.conf new file mode 100644 index 00000000000..9e385ee7e05 --- /dev/null +++ b/samples/cellular/nrf_cloud_rest_fota/overlay_smp_fota.conf @@ -0,0 +1,12 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +CONFIG_NRF_CLOUD_FOTA_SMP=y +CONFIG_NRF_MCUMGR_SMP_CLIENT=y +CONFIG_MCUMGR_GRP_IMG=y +CONFIG_MCUMGR_GRP_OS=y +CONFIG_MCUMGR_TRANSPORT_UART=y +CONFIG_UART_MCUMGR_RX_BUF_COUNT=4 +CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y diff --git a/samples/cellular/nrf_cloud_rest_fota/src/main.c b/samples/cellular/nrf_cloud_rest_fota/src/main.c index 8645cfd349e..722ab9d9a0e 100644 --- a/samples/cellular/nrf_cloud_rest_fota/src/main.c +++ b/samples/cellular/nrf_cloud_rest_fota/src/main.c @@ -18,6 +18,7 @@ #include #include #include +#include "smp_reset.h" LOG_MODULE_REGISTER(nrf_cloud_rest_fota, CONFIG_NRF_CLOUD_REST_FOTA_SAMPLE_LOG_LEVEL); @@ -81,7 +82,10 @@ static void sample_reboot(enum nrf_cloud_fota_reboot_status status); static struct nrf_cloud_fota_poll_ctx fota_ctx = { .rest_ctx = &rest_ctx, .device_id = device_id, - .reboot_fn = sample_reboot + .reboot_fn = sample_reboot, +#if SMP_FOTA_ENABLED + .smp_reset_cb = nrf52840_reset_api +#endif }; #if defined(CONFIG_REST_FOTA_DO_JITP) @@ -219,7 +223,8 @@ static void send_device_status(void) .bootloader = 1, .modem = 1, .application = 1, - .modem_full = fota_ctx.full_modem_fota_supported + .modem_full = fota_ctx.full_modem_fota_supported, + .smp = SMP_FOTA_ENABLED }; struct nrf_cloud_svc_info svc_inf = { diff --git a/samples/cellular/nrf_cloud_rest_fota/src/smp_reset.c b/samples/cellular/nrf_cloud_rest_fota/src/smp_reset.c new file mode 100644 index 00000000000..304ac95df47 --- /dev/null +++ b/samples/cellular/nrf_cloud_rest_fota/src/smp_reset.c @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ +#include +#include +#include +#include +#include +#include + +LOG_MODULE_REGISTER(nrf_cloud_rest_fota_smp, CONFIG_NRF_CLOUD_REST_FOTA_SAMPLE_LOG_LEVEL); + +#define RESET_NODE DT_NODELABEL(nrf52840_reset) +#define HAS_RECOVERY_MODE (DT_NODE_HAS_STATUS(RESET_NODE, okay)) + +int nrf52840_reset_api(void) +{ + int err; + const struct gpio_dt_spec reset_pin_spec = GPIO_DT_SPEC_GET(RESET_NODE, gpios); + + if (!device_is_ready(reset_pin_spec.port)) { + LOG_ERR("Reset device not ready"); + return -EIO; + } + + /* Configure pin as output and initialize it to inactive state. */ + err = gpio_pin_configure_dt(&reset_pin_spec, GPIO_OUTPUT_INACTIVE); + if (err) { + LOG_ERR("Pin configure err: %d", err); + return err; + } + + /* Reset the nRF52840 and let it wait until the pin is inactive again + * before running to main to ensure that it won't send any data until + * the H4 device is setup and ready to receive. + */ + err = gpio_pin_set_dt(&reset_pin_spec, 1); + if (err) { + LOG_ERR("GPIO Pin set to 1 err: %d", err); + return err; + } + + /* Wait for the nRF52840 peripheral to stop sending data. + * + * It is critical (!) to wait here, so that all bytes + * on the lines are received and drained correctly. + */ + k_sleep(K_MSEC(10)); + + /* We are ready, let the nRF52840 run to main */ + err = gpio_pin_set_dt(&reset_pin_spec, 0); + if (err) { + LOG_ERR("GPIO Pin set to 0 err: %d", err); + return err; + } + + LOG_DBG("Reset Pin %d", reset_pin_spec.pin); + + return 0; +} diff --git a/samples/cellular/nrf_cloud_rest_fota/src/smp_reset.h b/samples/cellular/nrf_cloud_rest_fota/src/smp_reset.h new file mode 100644 index 00000000000..2d3893fe5ed --- /dev/null +++ b/samples/cellular/nrf_cloud_rest_fota/src/smp_reset.h @@ -0,0 +1,20 @@ +/* Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#ifndef _SMP_RESET_H_ +#define _SMP_RESET_H_ + +#if defined(CONFIG_NRF_CLOUD_FOTA_SMP) && defined(CONFIG_BOARD_NRF9160DK_NRF9160_NS) +#define SMP_FOTA_ENABLED 1 +#else +#define SMP_FOTA_ENABLED 0 +#endif + +/** + * @brief Reset the nRF52840 for SMP FOTA. + */ +int nrf52840_reset_api(void); + +#endif /* _SMP_RESET_H_ */ diff --git a/samples/debug/memfault/Kconfig.sysbuild b/samples/debug/memfault/Kconfig.sysbuild new file mode 100644 index 00000000000..4517d14bd62 --- /dev/null +++ b/samples/debug/memfault/Kconfig.sysbuild @@ -0,0 +1,10 @@ +# +# Copyright (c) 2024 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +config WIFI_NRF70 + default y if BOARD_NRF7002DK_NRF5340_CPUAPP + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf b/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf index 24269e040bc..0ac559d2885 100644 --- a/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf +++ b/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf @@ -6,35 +6,38 @@ # General CONFIG_POSIX_CLOCK=y -CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 -CONFIG_HEAP_MEM_POOL_SIZE=153600 CONFIG_HW_STACK_PROTECTION=y CONFIG_HW_ID_LIBRARY=y CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC=y # Heap and stacks -CONFIG_HEAP_MEM_POOL_SIZE=8192 +CONFIG_HEAP_MEM_POOL_SIZE=153600 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 CONFIG_MAIN_STACK_SIZE=8192 -CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 CONFIG_NET_TX_STACK_SIZE=4096 CONFIG_NET_RX_STACK_SIZE=4096 +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=4096 -# Network -CONFIG_NET_SOCKETS=y +# Network and NET sockets CONFIG_NET_L2_ETHERNET=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NET_SOCKETS_OFFLOAD=n CONFIG_NET_DHCPV4=y +CONFIG_NET_SOCKETS_OFFLOAD=n CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_SYNC_RECV=y +CONFIG_NET_SOCKETS_ENABLE_DTLS=n CONFIG_NET_SOCKETS_SOCKOPT_TLS=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_SOCKETS_POLL_MAX=20 CONFIG_NET_STATISTICS=y CONFIG_NET_STATISTICS_WIFI=y CONFIG_NET_STATISTICS_USER_API=y CONFIG_NET_PKT_RX_COUNT=8 CONFIG_NET_PKT_TX_COUNT=8 CONFIG_NET_MAX_CONTEXTS=5 -CONFIG_NET_CONTEXT_SYNC_RECV=y +CONFIG_ZVFS_OPEN_MAX=25 # DNS CONFIG_DNS_RESOLVER=y @@ -44,19 +47,18 @@ CONFIG_NET_SOCKETS_DNS_TIMEOUT=30000 # design in net_mgmt. So, use a typical number of networks in a crowded # environment as the queue depth. CONFIG_NET_MGMT_EVENT_QUEUE_SIZE=150 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 # Below section is the primary contributor to SRAM and is currently # not optimized for size. CONFIG_NET_BUF_RX_COUNT=16 CONFIG_NET_BUF_TX_COUNT=64 CONFIG_NET_BUF_DATA_SIZE=128 -CONFIG_HEAP_MEM_POOL_SIZE=153600 CONFIG_NET_TC_TX_COUNT=1 # Wi-Fi CONFIG_WIFI=y CONFIG_WIFI_NRF70=y -CONFIG_WIFI_NRF70_LOG_LEVEL_ERR=y CONFIG_WIFI_MGMT_EXT=y CONFIG_NET_L2_WIFI_SHELL=y CONFIG_NET_SHELL=y @@ -75,18 +77,15 @@ CONFIG_NVS=y CONFIG_SETTINGS=y CONFIG_SETTINGS_NVS=y -# Native network stack +# mbedTLS CONFIG_NRF_SECURITY=y CONFIG_MBEDTLS=y CONFIG_MBEDTLS_ENABLE_HEAP=y -CONFIG_MBEDTLS_HEAP_SIZE=120000 +CONFIG_MBEDTLS_HEAP_SIZE=81920 CONFIG_MBEDTLS_RSA_C=y +CONFIG_MBEDTLS_TLS_LIBRARY=y CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y - -# PSA -CONFIG_PSA_CRYPTO_DRIVER_CC3XX=n -CONFIG_PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY=y -CONFIG_PSA_WANT_RSA_KEY_SIZE_2048=y +CONFIG_MBEDTLS_X509_CRT_PARSE_C=y # Certificate management CONFIG_MEMFAULT_ROOT_CERT_STORAGE_TLS_CREDENTIAL_STORAGE=y @@ -101,5 +100,3 @@ CONFIG_PM_SINGLE_IMAGE=y CONFIG_L2_WIFI_CONNECTIVITY=y CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=n CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n - -CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=4096 diff --git a/samples/debug/memfault/prj.conf b/samples/debug/memfault/prj.conf index 3e25a4f3100..4263167372f 100644 --- a/samples/debug/memfault/prj.conf +++ b/samples/debug/memfault/prj.conf @@ -6,6 +6,7 @@ # General config CONFIG_FPU=y +CONFIG_ASSERT=y # Logging CONFIG_LOG=y diff --git a/samples/debug/memfault/sample.yaml b/samples/debug/memfault/sample.yaml index d44e1f7aee3..fe753b43a98 100644 --- a/samples/debug/memfault/sample.yaml +++ b/samples/debug/memfault/sample.yaml @@ -11,6 +11,7 @@ tests: - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns + - thingy91x/nrf9151/ns - nrf7002dk/nrf5340/cpuapp platform_allow: - nrf9160dk/nrf9160/ns @@ -32,10 +33,12 @@ tests: - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns - thingy91x/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp platform_allow: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns - thingy91x/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp tags: ci_build sysbuild ci_samples_debug diff --git a/samples/keys/identity_key_generation/prj.conf b/samples/keys/identity_key_generation/prj.conf index 566caa64a01..947f7dc8573 100644 --- a/samples/keys/identity_key_generation/prj.conf +++ b/samples/keys/identity_key_generation/prj.conf @@ -15,7 +15,6 @@ CONFIG_HW_UNIQUE_KEY_RANDOM=y CONFIG_IDENTITY_KEY=y CONFIG_IDENTITY_KEY_RANDOM=y -CONFIG_ASSERT=y # NRF_SECURITY is needed to generate a random identity key CONFIG_NRF_SECURITY=y diff --git a/samples/keys/identity_key_usage/prj.conf b/samples/keys/identity_key_usage/prj.conf index 76a5d5e95a9..84c045174c8 100644 --- a/samples/keys/identity_key_usage/prj.conf +++ b/samples/keys/identity_key_usage/prj.conf @@ -5,7 +5,6 @@ # CONFIG_IDENTITY_KEY=y -CONFIG_ASSERT=y CONFIG_HW_UNIQUE_KEY=y CONFIG_MPU_ALLOW_FLASH_WRITE=y CONFIG_RESET_ON_FATAL_ERROR=n diff --git a/samples/matter/light_bulb/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/light_bulb/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 4024aad7f9f..86a6b3286ef 100644 --- a/samples/matter/light_bulb/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/light_bulb/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -14,10 +14,6 @@ CONFIG_MPSL_WORK_STACK_SIZE=2048 # Set the ZMS sector count to match the settings partition size that is 40 kB for this application. CONFIG_SETTINGS_ZMS_SECTOR_COUNT=10 -# Workaround: Disable MBEDTLS threading, as in the Mbed TLS 3.6.x the mutexes were added, what sometimes -# leads to bus faults when OpenThread calls psa_get_and_lock_key_slot on SRP service removal. -# This brings back the behavior that was proven to work before. -CONFIG_MBEDTLS_THREADING_C=n # Workaround required as Zephyr L2 implies usage of NVS backend for settings. # It should be removed once the proper fix will be applied in Zephyr. CONFIG_NVS=n diff --git a/samples/matter/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.conf index dd415a88a3d..892132f2383 100644 --- a/samples/matter/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -19,8 +19,3 @@ CONFIG_NVS=n # Low Power mode CONFIG_POWEROFF=y - -# Workaround: Disable MBEDTLS threading, as in the Mbed TLS 3.6.x the mutexes were added, what sometimes -# leads to bus faults when OpenThread calls psa_get_and_lock_key_slot on SRP service removal. -# This brings back the behavior that was proven to work before. -CONFIG_MBEDTLS_THREADING_C=n diff --git a/samples/matter/lock/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/lock/boards/nrf54l15dk_nrf54l15_cpuapp.conf index dd415a88a3d..892132f2383 100644 --- a/samples/matter/lock/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/lock/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -19,8 +19,3 @@ CONFIG_NVS=n # Low Power mode CONFIG_POWEROFF=y - -# Workaround: Disable MBEDTLS threading, as in the Mbed TLS 3.6.x the mutexes were added, what sometimes -# leads to bus faults when OpenThread calls psa_get_and_lock_key_slot on SRP service removal. -# This brings back the behavior that was proven to work before. -CONFIG_MBEDTLS_THREADING_C=n diff --git a/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l15_cpuapp.conf index dd415a88a3d..892132f2383 100644 --- a/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/smoke_co_alarm/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -19,8 +19,3 @@ CONFIG_NVS=n # Low Power mode CONFIG_POWEROFF=y - -# Workaround: Disable MBEDTLS threading, as in the Mbed TLS 3.6.x the mutexes were added, what sometimes -# leads to bus faults when OpenThread calls psa_get_and_lock_key_slot on SRP service removal. -# This brings back the behavior that was proven to work before. -CONFIG_MBEDTLS_THREADING_C=n diff --git a/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 562395b1fe2..ded51c671d3 100644 --- a/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -14,10 +14,6 @@ CONFIG_MPSL_WORK_STACK_SIZE=2048 # Set the ZMS sector count to match the settings partition size that is 40 kB for this application. CONFIG_SETTINGS_ZMS_SECTOR_COUNT=10 -# Workaround: Disable MBEDTLS threading, as in the Mbed TLS 3.6.x the mutexes were added, what sometimes -# leads to bus faults when OpenThread calls psa_get_and_lock_key_slot on SRP service removal. -# This brings back the behavior that was proven to work before. -CONFIG_MBEDTLS_THREADING_C=n # Workaround required as Zephyr L2 implies usage of NVS backend for settings. # It should be removed once the proper fix will be applied in Zephyr. CONFIG_NVS=n diff --git a/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp_internal.conf b/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp_internal.conf index 89dc4581e1c..28743cf2e3f 100644 --- a/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp_internal.conf +++ b/samples/matter/template/boards/nrf54l15dk_nrf54l15_cpuapp_internal.conf @@ -52,8 +52,3 @@ CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=y # Enable LTO CONFIG_LTO=y CONFIG_ISR_TABLES_LOCAL_DECLARATION=y - -# Workaround: Disable MBEDTLS threading, as in the Mbed TLS 3.6.x the mutexes were added, what sometimes -# leads to bus faults when OpenThread calls psa_get_and_lock_key_slot on SRP service removal. -# This brings back the behavior that was proven to work before. -CONFIG_MBEDTLS_THREADING_C=n diff --git a/samples/matter/thermostat/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/thermostat/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 4024aad7f9f..86a6b3286ef 100644 --- a/samples/matter/thermostat/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/thermostat/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -14,10 +14,6 @@ CONFIG_MPSL_WORK_STACK_SIZE=2048 # Set the ZMS sector count to match the settings partition size that is 40 kB for this application. CONFIG_SETTINGS_ZMS_SECTOR_COUNT=10 -# Workaround: Disable MBEDTLS threading, as in the Mbed TLS 3.6.x the mutexes were added, what sometimes -# leads to bus faults when OpenThread calls psa_get_and_lock_key_slot on SRP service removal. -# This brings back the behavior that was proven to work before. -CONFIG_MBEDTLS_THREADING_C=n # Workaround required as Zephyr L2 implies usage of NVS backend for settings. # It should be removed once the proper fix will be applied in Zephyr. CONFIG_NVS=n diff --git a/samples/matter/window_covering/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/matter/window_covering/boards/nrf54l15dk_nrf54l15_cpuapp.conf index dd415a88a3d..892132f2383 100644 --- a/samples/matter/window_covering/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/matter/window_covering/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -19,8 +19,3 @@ CONFIG_NVS=n # Low Power mode CONFIG_POWEROFF=y - -# Workaround: Disable MBEDTLS threading, as in the Mbed TLS 3.6.x the mutexes were added, what sometimes -# leads to bus faults when OpenThread calls psa_get_and_lock_key_slot on SRP service removal. -# This brings back the behavior that was proven to work before. -CONFIG_MBEDTLS_THREADING_C=n diff --git a/samples/mpsl/timeslot/README.rst b/samples/mpsl/timeslot/README.rst index a425ee0b543..3b3b68296a6 100644 --- a/samples/mpsl/timeslot/README.rst +++ b/samples/mpsl/timeslot/README.rst @@ -18,6 +18,7 @@ The sample supports any one of the following development kits: .. note:: For the nRF5340 DK, this sample is only supported on the network core (``nrf5340dk_nrf5340_cpunet``), and the :ref:`nrf5340_empty_app_core` sample must be programmed to the application core. + For the nRF54H20 DK, this sample is only supported on the radio core (``nrf54h20dk_nrf4h20_cpurad``). Overview ******** @@ -30,10 +31,15 @@ The sample opens a timeslot session and starts requesting timeslots when a key i The first timeslot is always of type "earliest". Any following timeslots are of type "normal". In each timeslot callback, the signal type of the callback is posted to a message queue. -Upon reception of the timeslot start signal, ``timer0`` is configured to be triggered before the timeslot ends. +Upon reception of the timeslot start signal, ``mpsl timer0`` is configured to be triggered before the timeslot ends. A separate thread reads the message queue and prints the timeslot signal type. The timeslot session is closed when any key is pressed in the terminal. +.. note:: + For the nRF52 and nRF53 Series ``mpsl_timer0`` is the ``timer0`` instance. + For the nRF54L Series ``mpsl_timer0`` is the ``timer10`` instance. + For the nRF54H Series ``mpsl_timer0`` is the ``timer020`` instance. + Building and running ******************** diff --git a/samples/mpsl/timeslot/sample.yaml b/samples/mpsl/timeslot/sample.yaml index f950643692b..f740860ed72 100644 --- a/samples/mpsl/timeslot/sample.yaml +++ b/samples/mpsl/timeslot/sample.yaml @@ -9,5 +9,8 @@ tests: - nrf52dk/nrf52832 - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpunet + - nrf54l15pdk/nrf54l15/cpuapp + - nrf54h20dk/nrf54h20/cpurad platform_allow: nrf52dk/nrf52832 nrf52840dk/nrf52840 nrf5340dk/nrf5340/cpunet + nrf54l15pdk/nrf54l15/cpuapp nrf54h20dk/nrf54h20/cpurad tags: ci_build sysbuild ci_samples_mpsl diff --git a/samples/mpsl/timeslot/src/main.c b/samples/mpsl/timeslot/src/main.c index 8be64d6f2ad..09791617702 100644 --- a/samples/mpsl/timeslot/src/main.c +++ b/samples/mpsl/timeslot/src/main.c @@ -29,9 +29,17 @@ LOG_MODULE_REGISTER(main, LOG_LEVEL_INF); #if defined(CONFIG_SOC_SERIES_NRF53X) #define LOG_OFFLOAD_IRQn SWI1_IRQn + #define MPSL_TIMER0 NRF_TIMER0 #elif defined(CONFIG_SOC_SERIES_NRF52X) #define LOG_OFFLOAD_IRQn SWI1_EGU1_IRQn -#endif + #define MPSL_TIMER0 NRF_TIMER0 +#elif defined(CONFIG_SOC_SERIES_NRF54LX) + #define LOG_OFFLOAD_IRQn EGU10_IRQn + #define MPSL_TIMER0 NRF_TIMER10 +#elif defined(CONFIG_SOC_SERIES_NRF54HX) + #define LOG_OFFLOAD_IRQn EGU020_IRQn + #define MPSL_TIMER0 NRF_TIMER020 +#endif /* CONFIG_SOC_SERIES_NRF53X */ static bool request_in_cb = true; @@ -127,9 +135,9 @@ static mpsl_timeslot_signal_return_param_t *mpsl_timeslot_callback( /* Setup timer to trigger an interrupt (and thus the TIMER0 * signal) before timeslot end. */ - nrf_timer_cc_set(NRF_TIMER0, NRF_TIMER_CC_CHANNEL0, + nrf_timer_cc_set(MPSL_TIMER0, NRF_TIMER_CC_CHANNEL0, TIMER_EXPIRY_US); - nrf_timer_int_enable(NRF_TIMER0, NRF_TIMER_INT_COMPARE0_MASK); + nrf_timer_int_enable(MPSL_TIMER0, NRF_TIMER_INT_COMPARE0_MASK); input_data_len = ring_buf_put(&callback_high_priority_ring_buf, &input_data, 1); if (input_data_len != 1) { LOG_ERR("Full ring buffer, enqueue data with length %d", input_data_len); @@ -139,8 +147,8 @@ static mpsl_timeslot_signal_return_param_t *mpsl_timeslot_callback( case MPSL_TIMESLOT_SIGNAL_TIMER0: /* Clear event */ - nrf_timer_int_disable(NRF_TIMER0, NRF_TIMER_INT_COMPARE0_MASK); - nrf_timer_event_clear(NRF_TIMER0, NRF_TIMER_EVENT_COMPARE0); + nrf_timer_int_disable(MPSL_TIMER0, NRF_TIMER_INT_COMPARE0_MASK); + nrf_timer_event_clear(MPSL_TIMER0, NRF_TIMER_EVENT_COMPARE0); if (request_in_cb) { /* Request new timeslot when callback returns */ diff --git a/samples/net/aws_iot/Kconfig.sysbuild b/samples/net/aws_iot/Kconfig.sysbuild index b6dfe440522..1681fbe65ce 100644 --- a/samples/net/aws_iot/Kconfig.sysbuild +++ b/samples/net/aws_iot/Kconfig.sysbuild @@ -5,13 +5,13 @@ # choice BOOTLOADER - default BOOTLOADER_MCUBOOT if !BOARD_NATIVE_SIM + default BOOTLOADER_MCUBOOT if !BOARD_NATIVE_SIM && !BOARD_NRF54L15DK_NRF54L15_CPUAPP && !BOARD_NRF54L15PDK_NRF54L15_CPUAPP endchoice config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS config WIFI_NRF70 - default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS + default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L15_CPUAPP || BOARD_NRF54L15PDK_NRF54L15_CPUAPP source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/samples/net/aws_iot/README.rst b/samples/net/aws_iot/README.rst index a4709705c14..617fcf42339 100644 --- a/samples/net/aws_iot/README.rst +++ b/samples/net/aws_iot/README.rst @@ -7,7 +7,7 @@ AWS IoT :local: :depth: 2 -The Amazon Web Services Internet-of-Things (AWS IoT) sample demonstrates how to connect an nRF91 Series or nRF70 Series device to the `AWS IoT Core`_ service over MQTT to publish and receive messages. +The Amazon Web Services Internet-of-Things (AWS IoT) sample demonstrates how to connect an nRF91 Series, nRF70 Series, or nRF54L15 with nRF7002 EB device to the `AWS IoT Core`_ service over MQTT to publish and receive messages. This sample showcases the use of the :ref:`lib_aws_iot` library, which includes support for FOTA using the :ref:`lib_aws_fota` library. .. |wifi| replace:: Wi-Fi® @@ -152,6 +152,7 @@ The sample includes pre-configured configuration files for the development kits * :file:`boards/nrf9160dk_nrf9160_ns.conf` - Configuration file for the nRF9160 DK. * :file:`boards/thingy91_nrf9160_ns.conf` - Configuration file for the Thingy:91. * :file:`boards/nrf7002dk_nrf5340_cpuapp_ns.conf` - Configuration file for the nRF7002 DK. +* :file:`boards/nrf54l15dk_nrf54l15_cpuapp.conf` - Configuration file for the nRF54L15 DK. * :file:`boards/native_sim.conf` - Configuration file for the native simulator board. The following configuration and DTS overlay files are included to host the MCUboot secondary image slot on external flash for the nRF7002 DK: diff --git a/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf new file mode 100644 index 00000000000..0ea1650e744 --- /dev/null +++ b/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -0,0 +1,89 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# MQTT +CONFIG_MQTT_HELPER_PROVISION_CERTIFICATES=y + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_POSIX_MAX_FDS=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# TLS +CONFIG_NET_SOCKETS_SOCKOPT_TLS=y +CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=1 +CONFIG_NRF_SECURITY=y +CONFIG_MBEDTLS=y +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=n +CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y +CONFIG_TLS_CREDENTIALS=y +CONFIG_TLS_CREDENTIALS_BACKEND_VOLATILE=y + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=2048 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=1024 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4400 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_MBEDTLS_HEAP_SIZE=50000 +CONFIG_HEAP_MEM_POOL_SIZE=87000 + +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 00000000000..0681c0dbb9e --- /dev/null +++ b/samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +&rram_controller { + /delete-node/ cpuflpr_sram; + /delete-node/ cpuflpr_rram; +}; + +/* Adjust the cpuapp_sram to include the freed up cpuflpr_sram */ +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 0x20040000>; +}; + +/* Adjust the cpuapp_rram to include the freed up cpuflpr_rram */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; +}; diff --git a/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index efa830f60a6..5739a8ac6f8 100644 --- a/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -11,11 +11,12 @@ # General CONFIG_POSIX_CLOCK=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 -CONFIG_HEAP_MEM_POOL_SIZE=81920 -CONFIG_LOG_MODE_IMMEDIATE=y +CONFIG_HEAP_MEM_POOL_SIZE=120000 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_HW_STACK_PROTECTION=y CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC=y CONFIG_ZVFS_OPEN_MAX=25 +CONFIG_MAIN_STACK_SIZE=6144 # Optimize Wi-Fi stack to save some memory CONFIG_NRF70_RX_NUM_BUFS=16 diff --git a/samples/net/aws_iot/sample.yaml b/samples/net/aws_iot/sample.yaml index bff98553c81..4c201cdadbf 100644 --- a/samples/net/aws_iot/sample.yaml +++ b/samples/net/aws_iot/sample.yaml @@ -11,6 +11,8 @@ tests: - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns + - thingy91x/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim platform_allow: - nrf9160dk/nrf9160/ns @@ -18,4 +20,15 @@ tests: - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns - thingy91x/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim + sample.net.aws_iot.nrf54l15.wifi: + sysbuild: true + tags: ci_build sysbuild ci_samples_net + build_only: true + build_on_all: true + integration_platforms: + - nrf54l15dk/nrf54l15/cpuapp + platform_allow: + - nrf54l15dk/nrf54l15/cpuapp + extra_args: aws_iot_SHIELD="nrf7002eb_interposer_p1;nrf7002eb" diff --git a/samples/net/aws_iot/sysbuild/mcuboot/app.overlay b/samples/net/aws_iot/sysbuild/mcuboot/app.overlay index 74d3dfbfd22..6d0f92ab5d7 100644 --- a/samples/net/aws_iot/sysbuild/mcuboot/app.overlay +++ b/samples/net/aws_iot/sysbuild/mcuboot/app.overlay @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + / { chosen { zephyr,code-partition = &boot_partition; diff --git a/samples/net/aws_iot/sysbuild/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/net/aws_iot/sysbuild/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf new file mode 100644 index 00000000000..29bfe06f598 --- /dev/null +++ b/samples/net/aws_iot/sysbuild/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -0,0 +1,40 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# TODO: Workaround, disable memory guard to avoid false faults in application after boot +CONFIG_HW_STACK_PROTECTION=n + +CONFIG_BOOT_WATCHDOG_FEED=n + +# nRF54L15PDK uses SPI NOR external flash +CONFIG_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_NOR=y +CONFIG_SPI_NOR_SFDP_DEVICETREE=y +CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 + +# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to +# test protecting Matter factory data. It can be enabled while there is a support +# for protection more than one region. +CONFIG_FPROTECT=n + +# required by SPI driver +CONFIG_MULTITHREADING=y + +# Partition mamager +CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y +CONFIG_PM_PARTITION_SIZE_MCUBOOT=0xF000 +CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y + +# Adjust the maximum sectors to the app image size of ~1.4MB +CONFIG_BOOT_MAX_IMG_SECTORS=512 + +# Currently, without tickless kernel, the SYSCOUNTER value after the software +# reset is not set properly and due to that the first system interrupt is not called +# in the proper time - the SYSCOUNTER value is set to the value from before +# reset + 1. Hence, the reboot time increases more and more. +# To avoid it enable tickles kernel for mcuboot. +CONFIG_TICKLESS_KERNEL=y diff --git a/samples/net/aws_iot/sysbuild/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/samples/net/aws_iot/sysbuild/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay new file mode 100644 index 00000000000..2dabe38016f --- /dev/null +++ b/samples/net/aws_iot/sysbuild/mcuboot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + /* Configure the partition manager to use the mx25r64 external flash memory. */ + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&mx25r64 { + status = "okay"; +}; + +/* Restore full RRAM and SRAM space - by default some parts are dedicated to VPR */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; +}; + +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 0x40000>; +}; diff --git a/samples/net/aws_iot/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf b/samples/net/aws_iot/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf index e321e5d72f6..2f57ff772a6 100644 --- a/samples/net/aws_iot/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf +++ b/samples/net/aws_iot/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf @@ -10,6 +10,7 @@ CONFIG_FLASH=y CONFIG_MULTITHREADING=y CONFIG_MAIN_STACK_SIZE=4096 +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0 # Serial Peripheral Interface (SPI) CONFIG_SPI=y diff --git a/samples/net/aws_iot/sysbuild/mcuboot/boards/thingy91_nrf9160.conf b/samples/net/aws_iot/sysbuild/mcuboot/boards/thingy91_nrf9160.conf index 1bf2e424d0d..a4cc121d8b2 100644 --- a/samples/net/aws_iot/sysbuild/mcuboot/boards/thingy91_nrf9160.conf +++ b/samples/net/aws_iot/sysbuild/mcuboot/boards/thingy91_nrf9160.conf @@ -1,7 +1,14 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + # Disable Zephyr console CONFIG_CONSOLE=n CONFIG_CONSOLE_HANDLER=n CONFIG_UART_CONSOLE=n +CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0 # Disable Flash protection CONFIG_FPROTECT=n diff --git a/samples/net/aws_iot/sysbuild/mcuboot/boards/thingy91x_nrf9151.conf b/samples/net/aws_iot/sysbuild/mcuboot/boards/thingy91x_nrf9151.conf index 7c2042de649..078fade6d76 100644 --- a/samples/net/aws_iot/sysbuild/mcuboot/boards/thingy91x_nrf9151.conf +++ b/samples/net/aws_iot/sysbuild/mcuboot/boards/thingy91x_nrf9151.conf @@ -1,3 +1,9 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + # MCUBoot settings CONFIG_BOOT_MAX_IMG_SECTORS=512 diff --git a/samples/net/aws_iot/sysbuild/mcuboot/prj.conf b/samples/net/aws_iot/sysbuild/mcuboot/prj.conf index f36162ea34d..2a2bd1fe926 100644 --- a/samples/net/aws_iot/sysbuild/mcuboot/prj.conf +++ b/samples/net/aws_iot/sysbuild/mcuboot/prj.conf @@ -1,3 +1,9 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + CONFIG_PM=n CONFIG_MAIN_STACK_SIZE=10240 @@ -26,18 +32,19 @@ CONFIG_FPROTECT=y # CONFIG_BT_CTLR is not set # CONFIG_I2C is not set -CONFIG_LOG=y -CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL +# CONFIG_LOG=y +# CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL ### Ensure Zephyr logging changes don't use more resources -CONFIG_LOG_DEFAULT_LEVEL=0 -### Use info log level by default -CONFIG_MCUBOOT_LOG_LEVEL_INF=y +# CONFIG_LOG_DEFAULT_LEVEL=0 +# ### Use info log level by default +# CONFIG_MCUBOOT_LOG_LEVEL_INF=y ### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y CONFIG_CBPRINTF_NANO=y -CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0 + ### Use the minimal C library to reduce flash usage CONFIG_MINIMAL_LIBC=y # Disable serial output -CONFIG_SERIAL=n -CONFIG_UART_CONSOLE=n +# CONFIG_SERIAL=n +# CONFIG_UART_CONSOLE=n +CONFIG_WIFI_NRF70=n diff --git a/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 82396c1d11b..68dc74ed261 100644 --- a/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -12,9 +12,10 @@ CONFIG_DK_LIBRARY=y CONFIG_ZVFS_OPEN_MAX=25 # Heap and stacks -CONFIG_MAIN_STACK_SIZE=4096 +CONFIG_MAIN_STACK_SIZE=6144 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 -CONFIG_HEAP_MEM_POOL_SIZE=81920 +CONFIG_HEAP_MEM_POOL_SIZE=120000 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_NET_RX_STACK_SIZE=2048 # Optimize Wi-Fi stack to save some memory diff --git a/samples/net/azure_iot_hub/prj.conf b/samples/net/azure_iot_hub/prj.conf index d3e70e89a2e..db3dbaabfec 100644 --- a/samples/net/azure_iot_hub/prj.conf +++ b/samples/net/azure_iot_hub/prj.conf @@ -6,6 +6,7 @@ # General config CONFIG_REBOOT=y +CONFIG_ASSERT=y # Logging CONFIG_LOG=y diff --git a/samples/net/azure_iot_hub/sample.yaml b/samples/net/azure_iot_hub/sample.yaml index 27955163bc9..f42394ee589 100644 --- a/samples/net/azure_iot_hub/sample.yaml +++ b/samples/net/azure_iot_hub/sample.yaml @@ -8,11 +8,13 @@ tests: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim platform_allow: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim tags: ci_build sysbuild ci_samples_net sample.net.azure_iot_hub.dps: @@ -22,10 +24,12 @@ tests: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns platform_allow: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns extra_args: OVERLAY_CONFIG=overlay-dps.conf extra_configs: - CONFIG_AZURE_IOT_HUB_DPS_ID_SCOPE="test-scope" diff --git a/samples/net/coap_client/Kconfig.sysbuild b/samples/net/coap_client/Kconfig.sysbuild index 8def8b2271b..ae4c9494eb5 100644 --- a/samples/net/coap_client/Kconfig.sysbuild +++ b/samples/net/coap_client/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config WIFI_NRF70 - default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS + default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L15_CPUAPP source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf new file mode 100644 index 00000000000..b187b12b31d --- /dev/null +++ b/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -0,0 +1,78 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Logging +CONFIG_LOG=y +CONFIG_LOG_MODE_IMMEDIATE=y + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_POSIX_MAX_FDS=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=2048 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4400 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_HEAP_MEM_POOL_SIZE=87000 + +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 00000000000..0681c0dbb9e --- /dev/null +++ b/samples/net/coap_client/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +&rram_controller { + /delete-node/ cpuflpr_sram; + /delete-node/ cpuflpr_rram; +}; + +/* Adjust the cpuapp_sram to include the freed up cpuflpr_sram */ +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 0x20040000>; +}; + +/* Adjust the cpuapp_rram to include the freed up cpuflpr_rram */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; +}; diff --git a/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 38676b40e7f..13a147d4464 100644 --- a/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -12,6 +12,9 @@ CONFIG_POSIX_CLOCK=y CONFIG_LOG_BUFFER_SIZE=4096 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_MAIN_STACK_SIZE=6144 +CONFIG_HEAP_MEM_POOL_SIZE=120000 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y # Optimize TF-M CONFIG_TFM_PROFILE_TYPE_SMALL=y @@ -41,7 +44,6 @@ CONFIG_SHELL_STACK_SIZE=6144 # WPA CONFIG_WIFI_NM_WPA_SUPPLICANT=y -CONFIG_MBEDTLS_HEAP_SIZE=16384 # NET sockets CONFIG_NET_L2_ETHERNET=y diff --git a/samples/net/coap_client/sample.yaml b/samples/net/coap_client/sample.yaml index b1e7676207f..001124129f9 100644 --- a/samples/net/coap_client/sample.yaml +++ b/samples/net/coap_client/sample.yaml @@ -10,11 +10,22 @@ tests: - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim platform_allow: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim tags: ci_build sysbuild ci_samples_net + sample.net.coap_client.nrf54l15.wifi: + sysbuild: true + build_only: true + integration_platforms: + - nrf54l15dk/nrf54l15/cpuapp + platform_allow: + - nrf54l15dk/nrf54l15/cpuapp + tags: ci_build sysbuild ci_samples_net + extra_args: coap_client_SHIELD="nrf7002eb_interposer_p1;nrf7002eb" diff --git a/samples/net/download/Kconfig.sysbuild b/samples/net/download/Kconfig.sysbuild index 8def8b2271b..ae4c9494eb5 100644 --- a/samples/net/download/Kconfig.sysbuild +++ b/samples/net/download/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config WIFI_NRF70 - default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS + default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L15_CPUAPP source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf new file mode 100644 index 00000000000..f9affc9a21d --- /dev/null +++ b/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -0,0 +1,91 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Logging +CONFIG_LOG=y +CONFIG_LOG_MODE_IMMEDIATE=y + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_POSIX_MAX_FDS=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# TLS +CONFIG_NET_SOCKETS_SOCKOPT_TLS=y +CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=1 +CONFIG_NRF_SECURITY=y +CONFIG_MBEDTLS=y +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=n +CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y +CONFIG_TLS_CREDENTIALS=y +CONFIG_TLS_CREDENTIALS_BACKEND_VOLATILE=y +CONFIG_MBEDTLS_RSA_C=y + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=2048 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4400 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_MBEDTLS_HEAP_SIZE=70000 +CONFIG_HEAP_MEM_POOL_SIZE=87000 + +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 00000000000..0681c0dbb9e --- /dev/null +++ b/samples/net/download/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +&rram_controller { + /delete-node/ cpuflpr_sram; + /delete-node/ cpuflpr_rram; +}; + +/* Adjust the cpuapp_sram to include the freed up cpuflpr_sram */ +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 0x20040000>; +}; + +/* Adjust the cpuapp_rram to include the freed up cpuflpr_rram */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; +}; diff --git a/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 2e83d7217f7..0b588e594f6 100644 --- a/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -5,12 +5,13 @@ # # General +CONFIG_LOG=y +CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_POSIX_CLOCK=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 -CONFIG_LOG_BUFFER_SIZE=3072 -CONFIG_HEAP_MEM_POOL_SIZE=81920 -CONFIG_MAIN_STACK_SIZE=4096 -CONFIG_LOG=y +CONFIG_HEAP_MEM_POOL_SIZE=120000 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_MAIN_STACK_SIZE=6144 # Optimize Wi-Fi stack to save some memory CONFIG_NRF70_RX_NUM_BUFS=16 diff --git a/samples/net/download/sample.yaml b/samples/net/download/sample.yaml index 5e3e400bbb1..3967f89e0fa 100644 --- a/samples/net/download/sample.yaml +++ b/samples/net/download/sample.yaml @@ -6,9 +6,11 @@ tests: build_only: true integration_platforms: - nrf9161dk/nrf9161/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim platform_allow: - nrf9161dk/nrf9161/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim tags: ci_build sysbuild ci_samples_net sample.net.download_client.ci: @@ -23,8 +25,19 @@ tests: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns platform_allow: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns tags: ci_build sysbuild ci_samples_net + sample.net.download_client.nrf54l15.wifi: + sysbuild: true + tags: ci_build sysbuild ci_samples_net + build_only: true + integration_platforms: + - nrf54l15dk/nrf54l15/cpuapp + platform_allow: + - nrf54l15dk/nrf54l15/cpuapp + extra_args: download_SHIELD="nrf7002eb_interposer_p1;nrf7002eb" diff --git a/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 6188099bacd..289d624ccf7 100644 --- a/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/http_server/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -10,7 +10,8 @@ CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000 CONFIG_PM_PARTITION_SIZE_TFM=0x20000 # Optimize Wi-Fi stack to save some memory -CONFIG_HEAP_MEM_POOL_SIZE=81920 +CONFIG_HEAP_MEM_POOL_SIZE=120000 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_NRF70_RX_NUM_BUFS=16 CONFIG_NRF70_MAX_TX_AGGREGATION=4 @@ -36,10 +37,10 @@ CONFIG_POSIX_UNAME=n CONFIG_L2_WIFI_CONNECTIVITY=y CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=n CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n +CONFIG_MAIN_STACK_SIZE=6144 # mbedTLS and sockets CONFIG_ZVFS_OPEN_MAX=25 -CONFIG_MBEDTLS_HEAP_SIZE=16384 # DHCPv4 CONFIG_NET_DHCPV4=y diff --git a/samples/net/http_server/sample.yaml b/samples/net/http_server/sample.yaml index 039c254b97d..f9eda281f0c 100644 --- a/samples/net/http_server/sample.yaml +++ b/samples/net/http_server/sample.yaml @@ -4,11 +4,15 @@ tests: sample.net.http_server.wifi: sysbuild: true build_only: true + integration_platforms: + - nrf7002dk/nrf5340/cpuapp/ns platform_allow: nrf7002dk/nrf5340/cpuapp/ns tags: ci_build sysbuild ci_samples_net sample.net.http_server.wifi.tls: sysbuild: true build_only: true + integration_platforms: + - nrf7002dk/nrf5340/cpuapp/ns platform_allow: nrf7002dk/nrf5340/cpuapp/ns extra_args: OVERLAY_CONFIG=overlay-tls-nrf7002dk.conf tags: ci_build sysbuild ci_samples_net diff --git a/samples/net/https_client/Kconfig.sysbuild b/samples/net/https_client/Kconfig.sysbuild index 8def8b2271b..ae4c9494eb5 100644 --- a/samples/net/https_client/Kconfig.sysbuild +++ b/samples/net/https_client/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config WIFI_NRF70 - default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS + default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L15_CPUAPP source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf new file mode 100644 index 00000000000..a34e0d3fab3 --- /dev/null +++ b/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -0,0 +1,87 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_POSIX_MAX_FDS=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# TLS +CONFIG_NET_SOCKETS_SOCKOPT_TLS=y +CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=1 +CONFIG_NRF_SECURITY=y +CONFIG_MBEDTLS=y +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=n +CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y +CONFIG_TLS_CREDENTIALS=y +CONFIG_TLS_CREDENTIALS_BACKEND_VOLATILE=y +CONFIG_MBEDTLS_RSA_C=y + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=2048 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4400 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_MBEDTLS_HEAP_SIZE=70000 +CONFIG_HEAP_MEM_POOL_SIZE=87000 + +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 00000000000..0681c0dbb9e --- /dev/null +++ b/samples/net/https_client/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +&rram_controller { + /delete-node/ cpuflpr_sram; + /delete-node/ cpuflpr_rram; +}; + +/* Adjust the cpuapp_sram to include the freed up cpuflpr_sram */ +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 0x20040000>; +}; + +/* Adjust the cpuapp_rram to include the freed up cpuflpr_rram */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; +}; diff --git a/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index bf7a8ddb35c..9eb362cb168 100644 --- a/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -7,8 +7,10 @@ # General CONFIG_POSIX_CLOCK=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 -CONFIG_HEAP_MEM_POOL_SIZE=81920 +CONFIG_HEAP_MEM_POOL_SIZE=120000 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_MAIN_STACK_SIZE=6144 # Optimize Wi-Fi stack to save some memory CONFIG_NRF70_RX_NUM_BUFS=16 diff --git a/samples/net/https_client/sample.yaml b/samples/net/https_client/sample.yaml index f13e5921053..7600b0d0314 100644 --- a/samples/net/https_client/sample.yaml +++ b/samples/net/https_client/sample.yaml @@ -8,11 +8,13 @@ tests: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim platform_allow: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim tags: ci_build sysbuild ci_samples_net sample.net.https_client.lte.tfm-mbedtls: @@ -40,3 +42,12 @@ tests: - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns tags: ci_build sysbuild ci_samples_net + sample.net.https_client.nrf54l15.wifi: + sysbuild: true + build_only: true + integration_platforms: + - nrf54l15dk/nrf54l15/cpuapp + platform_allow: + - nrf54l15dk/nrf54l15/cpuapp + tags: ci_build sysbuild ci_samples_net + extra_args: https_client_SHIELD="nrf7002eb_interposer_p1;nrf7002eb" diff --git a/samples/net/mqtt/Kconfig.sysbuild b/samples/net/mqtt/Kconfig.sysbuild index 8def8b2271b..ae4c9494eb5 100644 --- a/samples/net/mqtt/Kconfig.sysbuild +++ b/samples/net/mqtt/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config WIFI_NRF70 - default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS + default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L15_CPUAPP source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf new file mode 100644 index 00000000000..f6610f0184b --- /dev/null +++ b/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -0,0 +1,79 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Logging +CONFIG_LOG=y +CONFIG_LOG_MODE_IMMEDIATE=y + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_POSIX_MAX_FDS=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=2048 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4400 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_MBEDTLS_HEAP_SIZE=70000 +CONFIG_HEAP_MEM_POOL_SIZE=87000 + +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 00000000000..0681c0dbb9e --- /dev/null +++ b/samples/net/mqtt/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +&rram_controller { + /delete-node/ cpuflpr_sram; + /delete-node/ cpuflpr_rram; +}; + +/* Adjust the cpuapp_sram to include the freed up cpuflpr_sram */ +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 0x20040000>; +}; + +/* Adjust the cpuapp_rram to include the freed up cpuflpr_rram */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; +}; diff --git a/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 7bdc5993e58..e826936d516 100644 --- a/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -11,12 +11,14 @@ # General CONFIG_POSIX_CLOCK=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 -CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_MAIN_STACK_SIZE=4096 CONFIG_LOG_BUFFER_SIZE=3072 -CONFIG_HEAP_MEM_POOL_SIZE=81920 +CONFIG_HEAP_MEM_POOL_SIZE=115000 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_HW_STACK_PROTECTION=y CONFIG_HW_ID_LIBRARY_SOURCE_NET_MAC=y CONFIG_DK_LIBRARY=y +CONFIG_MQTT_SAMPLE_NETWORK_THREAD_STACK_SIZE=6144 # Optimize Wi-Fi stack to save some memory CONFIG_NRF70_RX_NUM_BUFS=16 @@ -41,7 +43,6 @@ CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n # WPA CONFIG_WIFI_NM_WPA_SUPPLICANT=y CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_ERR=y -CONFIG_MBEDTLS_HEAP_SIZE=16384 # NET sockets CONFIG_NET_L2_ETHERNET=y diff --git a/samples/net/mqtt/doc/description.rst b/samples/net/mqtt/doc/description.rst index 172b2a6ba67..2782dd16482 100644 --- a/samples/net/mqtt/doc/description.rst +++ b/samples/net/mqtt/doc/description.rst @@ -7,7 +7,7 @@ Sample description :local: :depth: 2 -The MQTT sample communicates with an MQTT broker either over LTE using an nRF91 Series device, or over Wi-Fi® using an nRF70 Series device. +The MQTT sample communicates with an MQTT broker either over LTE using an nRF91 Series device, or over Wi-Fi® using an nRF70 Series device or an nRF54L15 DK connected with nRF7002 EB as a shield. .. |wifi| replace:: Wi-Fi @@ -109,6 +109,7 @@ The sample provides predefined configuration files for the following development * :file:`boards/thingy91_nrf9160_ns.conf` - Configuration file for the Thingy:91. * :file:`thingy91x_nrf9151_ns.conf` - Configuration file for the Thingy:91 X. * :file:`boards/nrf7002dk_nrf5340_cpuapp.conf` - Configuration file for the nRF7002 DK. +* :file:`nrf54l15dk_nrf54l15_cpuapp.conf` - Configuration file for the nRF54L15 DK. * :file:`boards/native_sim.conf` - Configuration file for the native simulator board. Files that are located under the :file:`/boards` folder is automatically merged with the :file:`prj.conf` file when you build for corresponding target. @@ -117,6 +118,7 @@ In addition, the sample provides the following overlay configuration files, whic * :file:`overlay-tls-nrf91.conf` - TLS overlay configuration file for nRF91 Series devices. * :file:`overlay-tls-nrf70.conf` - TLS overlay configuration file for nRF70 Series devices. +* :file:`overlay-tls-nrf54l15-nrf70.conf` - TLS overlay configuration file for nRF54L15 DK. * :file:`overlay-tls-native_sim.conf` - TLS overlay configuration file for the native simulator board. They are located in :file:`samples/net/mqtt` folder. diff --git a/samples/net/mqtt/overlay-tls-nrf54l15-nrf70.conf b/samples/net/mqtt/overlay-tls-nrf54l15-nrf70.conf new file mode 100644 index 00000000000..0c86afdd27d --- /dev/null +++ b/samples/net/mqtt/overlay-tls-nrf54l15-nrf70.conf @@ -0,0 +1,34 @@ +# +# Copyright (c) 2023 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Overlay file that enables TLS for nRF70 Series builds + +# MQTT TLS +CONFIG_MQTT_LIB_TLS=y +CONFIG_MQTT_HELPER_PORT=8883 +CONFIG_MQTT_KEEPALIVE=30 +CONFIG_MQTT_SAMPLE_TRANSPORT_THREAD_STACK_SIZE=3072 + +# Credentials located under /src/modules/transport/credentials/ will be automatically +# provisioned prior to connecting to the server by the MQTT helper library. +CONFIG_MQTT_HELPER_SEC_TAG=955 +CONFIG_MQTT_HELPER_PROVISION_CERTIFICATES=y +CONFIG_MQTT_HELPER_CERTIFICATES_FOLDER="src/modules/transport/credentials" +CONFIG_TLS_CREDENTIALS=y +CONFIG_TLS_CREDENTIALS_BACKEND_VOLATILE=y + +# NET Sockets +CONFIG_NET_SOCKETS_SOCKOPT_TLS=y + +# nRF Security and mbedTLS +CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=1 +CONFIG_NRF_SECURITY=y +CONFIG_MBEDTLS=y +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=n +CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y +CONFIG_MBEDTLS_RSA_C=y +CONFIG_MBEDTLS_HEAP_SIZE=60000 diff --git a/samples/net/mqtt/overlay-tls-nrf70.conf b/samples/net/mqtt/overlay-tls-nrf70.conf index 448f52a917b..cf71b608428 100644 --- a/samples/net/mqtt/overlay-tls-nrf70.conf +++ b/samples/net/mqtt/overlay-tls-nrf70.conf @@ -29,7 +29,3 @@ CONFIG_NET_SOCKETS_SOCKOPT_TLS=y # TLS credentials CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y - -# Temporarily disable Wi-Fi conn_mgr integration; -# Memory allocations required for it will be adjusted in a later commit -CONFIG_L2_WIFI_CONNECTIVITY=n diff --git a/samples/net/mqtt/sample.yaml b/samples/net/mqtt/sample.yaml index 57cb5354c19..059c4523a05 100644 --- a/samples/net/mqtt/sample.yaml +++ b/samples/net/mqtt/sample.yaml @@ -11,21 +11,41 @@ tests: - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns - thingy91x/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns + - native_sim platform_allow: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns - thingy91x/nrf9151/ns + - nrf7002dk/nrf5340/cpuapp/ns - native_sim tags: ci_build sysbuild ci_samples_net sample.net.mqtt.nrf70.tls: sysbuild: true build_only: true build_on_all: true + integration_platforms: + - nrf7002dk/nrf5340/cpuapp/ns platform_allow: nrf7002dk/nrf5340/cpuapp/ns tags: ci_build sysbuild ci_samples_net extra_args: EXTRA_CONF_FILE=overlay-tls-nrf70.conf + sample.net.mqtt.nrf54l15.wifi: + sysbuild: true + build_only: true + platform_allow: nrf54l15dk/nrf54l15/cpuapp + tags: ci_build sysbuild ci_samples_net + extra_args: + - mqtt_SHIELD="nrf7002eb_interposer_p1;nrf7002eb" + sample.net.mqtt.nrf54l15.wifi.tls: + sysbuild: true + build_only: true + platform_allow: nrf54l15dk/nrf54l15/cpuapp + tags: ci_build sysbuild ci_samples_net + extra_args: + - mqtt_SHIELD="nrf7002eb_interposer_p1;nrf7002eb" + - mqtt_EXTRA_CONF_FILE=overlay-tls-nrf54l15-nrf70.conf sample.net.mqtt.nrf91.tls: sysbuild: true build_only: true @@ -35,11 +55,13 @@ tests: - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns + - thingy91x/nrf9151/ns platform_allow: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns + - thingy91x/nrf9151/ns tags: ci_build sysbuild ci_samples_net extra_args: EXTRA_CONF_FILE=overlay-tls-nrf91.conf sample.net.mqtt.native_sim.tls: diff --git a/samples/net/mqtt/src/modules/network/Kconfig.network b/samples/net/mqtt/src/modules/network/Kconfig.network index ec0d7ae2182..0fb21f2bc57 100644 --- a/samples/net/mqtt/src/modules/network/Kconfig.network +++ b/samples/net/mqtt/src/modules/network/Kconfig.network @@ -5,7 +5,7 @@ # menu "Network" - depends on NRF_MODEM_LIB_NET_IF || (WIFI_NRF70 && WIFI_MGMT_EXT) || BOARD_NATIVE_SIM + depends on NRF_MODEM_LIB_NET_IF || WIFI_NRF70 || BOARD_NATIVE_SIM config MQTT_SAMPLE_NETWORK_THREAD_STACK_SIZE int "Thread stack size" diff --git a/samples/net/udp/Kconfig.sysbuild b/samples/net/udp/Kconfig.sysbuild index 8def8b2271b..ae4c9494eb5 100644 --- a/samples/net/udp/Kconfig.sysbuild +++ b/samples/net/udp/Kconfig.sysbuild @@ -5,6 +5,6 @@ # config WIFI_NRF70 - default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS + default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || BOARD_NRF54L15DK_NRF54L15_CPUAPP source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/samples/net/udp/README.rst b/samples/net/udp/README.rst index c6a798a143d..156d391d81c 100644 --- a/samples/net/udp/README.rst +++ b/samples/net/udp/README.rst @@ -8,7 +8,7 @@ UDP :depth: 2 The UDP sample demonstrates how to perform sequential transmissions of UDP packets to a server using an IP-connected device. -The sample connects to an LTE network using an nRF91 Series DK or a Thingy:91, or to Wi-Fi® using the nRF7002 DK. +The sample connects to an LTE network using an nRF91 Series DK or a Thingy:91, or to Wi-Fi® using an nRF7002 DK or an nRF54L15 DK connected with nRF7002 EB as a shield. .. |wifi| replace:: Wi-Fi @@ -74,6 +74,7 @@ The sample provides predefined configuration files for the following development * :file:`boards/nrf9160dk_nrf9160_ns.conf` - Configuration file for the nRF9160 DK. * :file:`boards/thingy91_nrf9160_ns.conf` - Configuration file for the Thingy:91. * :file:`boards/nrf7002dk_nrf5340_cpuapp.conf` - Configuration file for the nRF7002 DK. +* :file:`nrf54l15dk_nrf54l15_cpuapp.conf` - Configuration file for the nRF54L15 DK. * :file:`boards/native_sim.conf` - Configuration file for the native simulator emulation. Building and running diff --git a/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf new file mode 100644 index 00000000000..b187b12b31d --- /dev/null +++ b/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -0,0 +1,78 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Logging +CONFIG_LOG=y +CONFIG_LOG_MODE_IMMEDIATE=y + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y + +# WPA supplicant +CONFIG_WIFI_NM_WPA_SUPPLICANT=y +CONFIG_WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_DHCPV4=y +CONFIG_DNS_RESOLVER=y +CONFIG_DNS_RESOLVER_AI_MAX_ENTRIES=4 + +# NET sockets +CONFIG_NET_UDP=y +CONFIG_NET_TCP=y +CONFIG_NET_MAX_CONN=6 +CONFIG_NET_MAX_CONTEXTS=5 +CONFIG_NET_SOCKETS_POLL_MAX=8 +CONFIG_NET_SOCKETS_OFFLOAD=n +CONFIG_NET_DHCPV4=y +CONFIG_NET_CONTEXT_SNDTIMEO=y +CONFIG_NET_CONTEXT_RCVTIMEO=y +CONFIG_NET_MAX_CONTEXTS=3 + +# NET buffers +CONFIG_NET_PKT_TX_COUNT=6 +CONFIG_NET_PKT_RX_COUNT=6 +CONFIG_NET_BUF_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=6 +CONFIG_NRF70_RX_NUM_BUFS=6 +CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=4096 +CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=4096 +CONFIG_NRF70_MAX_TX_AGGREGATION=1 + +# Kernel options +CONFIG_POSIX_NETWORKING=y +CONFIG_POSIX_MAX_FDS=21 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n +CONFIG_NET_L2_WIFI_SHELL=y + +# Stack sizes +CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=2048 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3100 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF70_BH_WQ_STACK_SIZE=2300 +CONFIG_SHELL_STACK_SIZE=4400 +CONFIG_ISR_STACK_SIZE=512 + +# Heap sizes +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_HEAP_MEM_POOL_SIZE=87000 + +# POSIX API memory optimizations +CONFIG_POSIX_FD_MGMT=n +CONFIG_POSIX_MESSAGE_PASSING=n +CONFIG_POSIX_THREAD_THREADS_MAX=0 diff --git a/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 00000000000..0681c0dbb9e --- /dev/null +++ b/samples/net/udp/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +&rram_controller { + /delete-node/ cpuflpr_sram; + /delete-node/ cpuflpr_rram; +}; + +/* Adjust the cpuapp_sram to include the freed up cpuflpr_sram */ +&cpuapp_sram { + reg = <0x20000000 DT_SIZE_K(256)>; + ranges = <0x0 0x20000000 0x20040000>; +}; + +/* Adjust the cpuapp_rram to include the freed up cpuflpr_rram */ +&cpuapp_rram { + reg = <0x0 DT_SIZE_K(1524)>; +}; diff --git a/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index b2ce9a977de..a74c6f1af18 100644 --- a/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -6,7 +6,9 @@ # General CONFIG_POSIX_CLOCK=y -CONFIG_HEAP_MEM_POOL_SIZE=81920 +CONFIG_HEAP_MEM_POOL_SIZE=120000 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y +CONFIG_MAIN_STACK_SIZE=6144 # Wi-Fi CONFIG_WIFI=y @@ -24,7 +26,6 @@ CONFIG_SHELL_STACK_SIZE=6144 # WPA CONFIG_WIFI_NM_WPA_SUPPLICANT=y -CONFIG_MBEDTLS_HEAP_SIZE=16384 # NET sockets CONFIG_NET_L2_ETHERNET=y diff --git a/samples/net/udp/sample.yaml b/samples/net/udp/sample.yaml index b423ce2bd39..9d9583abc71 100644 --- a/samples/net/udp/sample.yaml +++ b/samples/net/udp/sample.yaml @@ -9,11 +9,13 @@ tests: - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns + - nrf7002dk/nrf5340/cpuapp/ns platform_allow: - nrf9160dk/nrf9160/ns - nrf9161dk/nrf9161/ns - nrf9151dk/nrf9151/ns - thingy91/nrf9160/ns + - nrf7002dk/nrf5340/cpuapp/ns tags: ci_build sysbuild ci_samples_net sample.net.udp.emulation: sysbuild: true @@ -23,3 +25,12 @@ tests: platform_allow: - native_sim tags: ci_build sysbuild ci_samples_net + sample.net.udp.nrf54l15.wifi: + sysbuild: true + build_only: true + integration_platforms: + - nrf54l15dk/nrf54l15/cpuapp + platform_allow: + - nrf54l15dk/nrf54l15/cpuapp + tags: ci_build sysbuild ci_samples_net + extra_args: udp_SHIELD="nrf7002eb_interposer_p1;nrf7002eb" diff --git a/samples/nrf_rpc/protocols_serialization/client/README.rst b/samples/nrf_rpc/protocols_serialization/client/README.rst index 4d35b4ccb5e..9da0fa14c9b 100644 --- a/samples/nrf_rpc/protocols_serialization/client/README.rst +++ b/samples/nrf_rpc/protocols_serialization/client/README.rst @@ -49,7 +49,7 @@ The following snippets are available: * ``debug`` - Enables debugging the sample by enabling :c:func:`__ASSERT()` statements globally and verbose logging. * ``log_rpc`` - Enables logging over RPC. * ``openthread`` - Enables the client part of the OpenThread RPC. -* ``nfc`` - Enables the client part of the NFC RPC. +* ``nfc`` - Enables the client part of the :ref:`NFC RPC `. Building and running ******************** diff --git a/samples/nrf_rpc/protocols_serialization/client/sample.yaml b/samples/nrf_rpc/protocols_serialization/client/sample.yaml index dac0ab45574..de0cdfb7aa8 100644 --- a/samples/nrf_rpc/protocols_serialization/client/sample.yaml +++ b/samples/nrf_rpc/protocols_serialization/client/sample.yaml @@ -7,37 +7,31 @@ tests: platform_allow: > nrf52840dk/nrf52840 nrf54l15dk/nrf54l15/cpuapp - nrf54l15pdk/nrf54l15/cpuapp tags: ci_build ci_samples_nrf_rpc extra_args: > SNIPPET="ble" integration_platforms: - nrf52840dk/nrf52840 - nrf54l15dk/nrf54l15/cpuapp - - nrf54l15pdk/nrf54l15/cpuapp samples.nrf_rpc.protocols_serialization.client.rpc_ot: build_only: true platform_allow: > nrf52840dk/nrf52840 nrf54l15dk/nrf54l15/cpuapp - nrf54l15pdk/nrf54l15/cpuapp tags: ci_build ci_samples_nrf_rpc extra_args: > SNIPPET="openthread" integration_platforms: - nrf52840dk/nrf52840 - nrf54l15dk/nrf54l15/cpuapp - - nrf54l15pdk/nrf54l15/cpuapp samples.nrf_rpc.protocols_serialization.client.rpc: build_only: true platform_allow: > nrf52840dk/nrf52840 nrf54l15dk/nrf54l15/cpuapp - nrf54l15pdk/nrf54l15/cpuapp tags: ci_build ci_samples_nrf_rpc extra_args: > SNIPPET="ble;openthread;debug;coex;log_rpc" integration_platforms: - nrf52840dk/nrf52840 - nrf54l15dk/nrf54l15/cpuapp - - nrf54l15pdk/nrf54l15/cpuapp diff --git a/samples/nrf_rpc/protocols_serialization/client/snippets/nfc/nfc.conf b/samples/nrf_rpc/protocols_serialization/client/snippets/nfc/nfc.conf index c8e99f2dba9..321b764219b 100644 --- a/samples/nrf_rpc/protocols_serialization/client/snippets/nfc/nfc.conf +++ b/samples/nrf_rpc/protocols_serialization/client/snippets/nfc/nfc.conf @@ -4,7 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Enable and configure Bluetooth LE CONFIG_NFC_RPC=y CONFIG_NFC_RPC_CLIENT=y diff --git a/samples/nrf_rpc/protocols_serialization/server/Kconfig b/samples/nrf_rpc/protocols_serialization/server/Kconfig index 11f00349cf3..74d14b56012 100644 --- a/samples/nrf_rpc/protocols_serialization/server/Kconfig +++ b/samples/nrf_rpc/protocols_serialization/server/Kconfig @@ -22,6 +22,20 @@ config LOG_BACKEND_RTT config LOG_BACKEND_UART default n +if SOC_NRF54L15 + +config BT_CTLR_ECDH + default n + +config BT_USE_PSA_API + default y if BT_TINYCRYPT_ECC + select PSA_WANT_ALG_ECB_NO_PADDING + +config BT_LONG_WQ_STACK_SIZE + default 2048 if BT_USE_PSA_API + +endif + config NRF_PS_SERVER_FATAL_ERROR_TRIGGER bool "Fatal error trigger" help diff --git a/samples/nrf_rpc/protocols_serialization/server/README.rst b/samples/nrf_rpc/protocols_serialization/server/README.rst index 55ef2c3da58..3b89d072f5e 100644 --- a/samples/nrf_rpc/protocols_serialization/server/README.rst +++ b/samples/nrf_rpc/protocols_serialization/server/README.rst @@ -46,7 +46,7 @@ The following snippets are available: * ``debug`` - Enables debugging the sample by enabling :c:func:`__ASSERT()` statements globally and verbose logging. * ``log_rpc`` - Enables logging over RPC. * ``openthread`` - Enables the server part of the OpenThread RPC. -* ``nfc`` - Enables the server part of the NFC RPC. +* ``nfc`` - Enables the server part of the :ref:`NFC RPC `. User interface ************** diff --git a/samples/nrf_rpc/protocols_serialization/server/sample.yaml b/samples/nrf_rpc/protocols_serialization/server/sample.yaml index a57cafa02ba..6353513543b 100644 --- a/samples/nrf_rpc/protocols_serialization/server/sample.yaml +++ b/samples/nrf_rpc/protocols_serialization/server/sample.yaml @@ -7,37 +7,31 @@ tests: platform_allow: > nrf52840dk/nrf52840 nrf54l15dk/nrf54l15/cpuapp - nrf54l15pdk/nrf54l15/cpuapp tags: ci_build ci_samples_nrf_rpc extra_args: > SNIPPET="ble" integration_platforms: - nrf52840dk/nrf52840 - nrf54l15dk/nrf54l15/cpuapp - - nrf54l15pdk/nrf54l15/cpuapp samples.nrf_rpc.protocols_serialization.server.rpc_ot: build_only: true platform_allow: > nrf52840dk/nrf52840 nrf54l15dk/nrf54l15/cpuapp - nrf54l15pdk/nrf54l15/cpuapp tags: ci_build ci_samples_nrf_rpc extra_args: > SNIPPET="openthread" integration_platforms: - nrf52840dk/nrf52840 - nrf54l15dk/nrf54l15/cpuapp - - nrf54l15pdk/nrf54l15/cpuapp samples.nrf_rpc.protocols_serialization.server.rpc: build_only: true platform_allow: > nrf52840dk/nrf52840 nrf54l15dk/nrf54l15/cpuapp - nrf54l15pdk/nrf54l15/cpuapp tags: ci_build ci_samples_nrf_rpc extra_args: > SNIPPET="ble;openthread;debug;coex;log_rpc" integration_platforms: - nrf52840dk/nrf52840 - nrf54l15dk/nrf54l15/cpuapp - - nrf54l15pdk/nrf54l15/cpuapp diff --git a/samples/nrf_rpc/protocols_serialization/server/snippets/nfc/nfc.conf b/samples/nrf_rpc/protocols_serialization/server/snippets/nfc/nfc.conf index 8a0382b8fba..b59b29062e4 100644 --- a/samples/nrf_rpc/protocols_serialization/server/snippets/nfc/nfc.conf +++ b/samples/nrf_rpc/protocols_serialization/server/snippets/nfc/nfc.conf @@ -4,7 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -# Enable and configure Bluetooth LE CONFIG_NFC_RPC=y CONFIG_NFC_RPC_SERVER=y diff --git a/samples/openthread/cli/harness-thci/nRF_Connect_SDK_11_12.py b/samples/openthread/cli/harness-thci/nRF_Connect_SDK_11_12.py index c6af43649e2..1c914e8f0dd 100644 --- a/samples/openthread/cli/harness-thci/nRF_Connect_SDK_11_12.py +++ b/samples/openthread/cli/harness-thci/nRF_Connect_SDK_11_12.py @@ -3085,11 +3085,8 @@ def setCSLperiod(self, period=500): Args: period: csl period in ms - note: OT command 'csl period' accepts parameter in unit of 10 symbols, - period is converted from unit ms to ten symbols (160us per 10 symbols). - """ - cmd = "csl period %u" % (period * 6.25) + cmd = "csl period %u" % (period * 1000) return self.__executeCommand(cmd)[-1] == "Done" @staticmethod diff --git a/samples/openthread/cli/harness-thci/nRF_Connect_SDK_13_14.py b/samples/openthread/cli/harness-thci/nRF_Connect_SDK_13_14.py index 2e375fbd67f..087282378db 100644 --- a/samples/openthread/cli/harness-thci/nRF_Connect_SDK_13_14.py +++ b/samples/openthread/cli/harness-thci/nRF_Connect_SDK_13_14.py @@ -3139,7 +3139,7 @@ def setCSLchannel(self, ch=11): return self.__executeCommand(cmd)[-1] == "Done" @API - def setCSLperiod(self, period=3125): + def setCSLperiod(self, period=500): """set Csl Period Args: period: csl period in ms @@ -3148,7 +3148,7 @@ def setCSLperiod(self, period=3125): period is converted from unit ms to ten symbols (160us per 10 symbols). """ - cmd = "csl period %u" % (period * 160) + cmd = "csl period %u" % (period * 1000) return self.__executeCommand(cmd)[-1] == "Done" @staticmethod diff --git a/samples/suit/smp_transfer/suit/nrf54h20/app_envelope_extflash.yaml.jinja2 b/samples/suit/smp_transfer/suit/nrf54h20/app_envelope_extflash.yaml.jinja2 index 4aa5c7a6776..670f83541a0 100644 --- a/samples/suit/smp_transfer/suit/nrf54h20/app_envelope_extflash.yaml.jinja2 +++ b/samples/suit/smp_transfer/suit/nrf54h20/app_envelope_extflash.yaml.jinja2 @@ -54,12 +54,6 @@ SUIT_Envelope_Tagged: - suit-send-record-failure - suit-send-sysinfo-success - suit-send-sysinfo-failure - - suit-directive-set-component-index: 1 - - suit-directive-override-parameters: - suit-parameter-image-digest: - suit-digest-algorithm-id: cose-alg-sha-256 - suit-digest-bytes: - file: {{ application['binary'] }} {%- if flash_companion is defined %} - suit-directive-set-component-index: 3 - suit-directive-override-parameters: @@ -70,11 +64,21 @@ SUIT_Envelope_Tagged: {%- endif %} suit-validate: - suit-directive-set-component-index: 0 - - suit-condition-image-match: - - suit-send-record-success - - suit-send-record-failure - - suit-send-sysinfo-success - - suit-send-sysinfo-failure + # In the case of streaming operations it is worth to retry them at least once. + # This increases the robustness against bit flips on the transport, + # for example when storing the data on an external memory device. + # The suit-directive-try-each will complete on the first successful subsequence. + - suit-directive-try-each: + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure suit-invoke: - suit-directive-set-component-index: 0 - suit-directive-invoke: @@ -90,7 +94,7 @@ SUIT_Envelope_Tagged: suit-payload-fetch: - suit-directive-set-component-index: 2 - suit-directive-override-parameters: - suit-parameter-uri: 'file://{{ application['filename'] }}' + suit-parameter-uri: "file://{{ application['filename'] }}" - suit-directive-fetch: - suit-send-record-failure {%- endif %} @@ -104,7 +108,7 @@ SUIT_Envelope_Tagged: {%- if flash_companion is defined %} - suit-directive-set-component-index: 1 - suit-directive-override-parameters: - suit-parameter-uri: '#{{ flash_companion['name'] }}' + suit-parameter-uri: "#{{ flash_companion['name'] }}" suit-parameter-image-digest: suit-digest-algorithm-id: cose-alg-sha-256 suit-digest-bytes: @@ -119,22 +123,36 @@ SUIT_Envelope_Tagged: - suit-directive-set-component-index: 3 - suit-directive-override-parameters: suit-parameter-source-component: 1 - - suit-directive-copy: - - suit-send-record-failure - - suit-condition-image-match: - - suit-send-record-success - - suit-send-record-failure - - suit-send-sysinfo-success - - suit-send-sysinfo-failure + # When copying the data it is worth to retry the sequence of + # suit-directive-copy and suit-condition-image-match at least once. + # If a bit flip occurs, it might be due to a transport issue, not + # a corrupted candidate image. In this case the bit flip is recoverable + # and it is worth retrying the operation. + # The suit-directive-try-each will complete on the first successful subsequence. + - suit-directive-try-each: + - - suit-directive-copy: + - suit-send-record-failure + - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - - suit-directive-copy: + - suit-send-record-failure + - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure - suit-directive-invoke: - suit-send-record-failure {%- endif %} - suit-directive-set-component-index: 1 - suit-directive-override-parameters: {%- if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI' in application['config'] and application['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] != '' %} - suit-parameter-uri: '{{ application['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}' + suit-parameter-uri: "{{ application['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}" {%- else %} - suit-parameter-uri: 'file://{{ application['filename'] }}' + suit-parameter-uri: "file://{{ application['filename'] }}" {%- endif %} suit-parameter-image-digest: suit-digest-algorithm-id: cose-alg-sha-256 @@ -142,23 +160,112 @@ SUIT_Envelope_Tagged: file: {{ application['binary'] }} - suit-directive-fetch: - suit-send-record-failure - - suit-condition-image-match: - - suit-send-record-success - - suit-send-record-failure - - suit-send-sysinfo-success - - suit-send-sysinfo-failure + - suit-directive-try-each: + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure - suit-directive-set-component-index: 0 - suit-directive-override-parameters: suit-parameter-source-component: 1 - - suit-directive-copy: + # When copying the data it is worth to retry the sequence of + # suit-directive-copy and suit-condition-image-match at least once. + # If a bit flip occurs, it might be due to a transport issue, not + # a corrupted candidate image. In this case the bit flip is recoverable + # and it is worth retrying the operation. + # The suit-directive-try-each will complete on the first successful subsequence. + - suit-directive-try-each: + - - suit-directive-copy: + - suit-send-record-failure + - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - - suit-directive-copy: + - suit-send-record-failure + - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + suit-text: + suit-digest-algorithm-id: cose-alg-sha-256 + + suit-candidate-verification: +{%- if flash_companion is defined %} + - suit-directive-set-component-index: 1 + - suit-directive-override-parameters: + suit-parameter-uri: "#{{ flash_companion['name'] }}" + suit-parameter-image-digest: + suit-digest-algorithm-id: cose-alg-sha-256 + suit-digest-bytes: + file: {{ flash_companion['binary'] }} + - suit-directive-fetch: - suit-send-record-failure - suit-condition-image-match: - suit-send-record-success - suit-send-record-failure - suit-send-sysinfo-success - suit-send-sysinfo-failure - suit-text: - suit-digest-algorithm-id: cose-alg-sha-256 + - suit-directive-set-component-index: 3 + - suit-directive-override-parameters: + suit-parameter-source-component: 1 + # When copying the data it is worth to retry the sequence of + # suit-directive-copy and suit-condition-image-match at least once. + # If a bit flip occurs, it might be due to a transport issue, not + # a corrupted candidate image. In this case the bit flip is recoverable + # and it is worth retrying the operation. + # The suit-directive-try-each will complete on the first successful subsequence. + - suit-directive-try-each: + - - suit-directive-copy: + - suit-send-record-failure + - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - - suit-directive-copy: + - suit-send-record-failure + - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - suit-directive-invoke: + - suit-send-record-failure +{%- endif %} + - suit-directive-set-component-index: 1 + - suit-directive-override-parameters: +{%- if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI' in application['config'] and application['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] != '' %} + suit-parameter-uri: "{{ application['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}" +{%- else %} + suit-parameter-uri: "file://{{ application['filename'] }}" +{%- endif %} + suit-parameter-image-digest: + suit-digest-algorithm-id: cose-alg-sha-256 + suit-digest-bytes: + file: {{ application['binary'] }} + - suit-directive-fetch: + - suit-send-record-failure + - suit-directive-try-each: + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + suit-manifest-component-id: - INSTLD_MFST - RFC4122_UUID: @@ -175,6 +282,6 @@ SUIT_Envelope_Tagged: suit-text-component-version: v1.0.0 suit-integrated-payloads: { {%- if flash_companion is defined %} - '#{{ flash_companion['name'] }}': {{ flash_companion['binary'] }} + "#{{ flash_companion['name'] }}": {{ flash_companion['binary'] }} {%- endif %} } diff --git a/samples/suit/smp_transfer/suit/nrf54h20/rad_envelope_extflash.yaml.jinja2 b/samples/suit/smp_transfer/suit/nrf54h20/rad_envelope_extflash.yaml.jinja2 index b711ebc76f3..912507d4c35 100644 --- a/samples/suit/smp_transfer/suit/nrf54h20/rad_envelope_extflash.yaml.jinja2 +++ b/samples/suit/smp_transfer/suit/nrf54h20/rad_envelope_extflash.yaml.jinja2 @@ -35,8 +35,8 @@ SUIT_Envelope_Tagged: RFC4122_UUID: {{ mpi_radio_vendor_name }} suit-parameter-class-identifier: RFC4122_UUID: - namespace: {{ mpi_radio_vendor_name }} - name: {{ mpi_radio_class_name }} + namespace: {{ mpi_radio_vendor_name }} + name: {{ mpi_radio_class_name }} suit-parameter-image-digest: suit-digest-algorithm-id: cose-alg-sha-256 suit-digest-bytes: @@ -53,19 +53,23 @@ SUIT_Envelope_Tagged: - suit-send-record-failure - suit-send-sysinfo-success - suit-send-sysinfo-failure - - suit-directive-set-component-index: 1 - - suit-directive-override-parameters: - suit-parameter-image-digest: - suit-digest-algorithm-id: cose-alg-sha-256 - suit-digest-bytes: - file: {{ radio['binary'] }} suit-validate: - suit-directive-set-component-index: 0 - - suit-condition-image-match: - - suit-send-record-success - - suit-send-record-failure - - suit-send-sysinfo-success - - suit-send-sysinfo-failure + # In the case of streaming operations it is worth to retry them at least once. + # This increases the robustness against bit flips on the transport, + # for example when storing the data on an external memory device. + # The suit-directive-try-each will complete on the first successful subsequence. + - suit-directive-try-each: + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure suit-invoke: - suit-directive-set-component-index: 0 - suit-directive-invoke: @@ -95,29 +99,80 @@ SUIT_Envelope_Tagged: - suit-directive-set-component-index: 1 - suit-directive-override-parameters: {%- if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI' in radio['config'] and radio['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] != '' %} - suit-parameter-uri: '{{ radio['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}' + suit-parameter-uri: "{{ radio['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}" {%- else %} - suit-parameter-uri: 'file://{{ radio['filename'] }}' + suit-parameter-uri: "file://{{ radio['filename'] }}" {%- endif %} + suit-parameter-image-digest: + suit-digest-algorithm-id: cose-alg-sha-256 + suit-digest-bytes: + file: {{ radio['binary'] }} - suit-directive-fetch: - suit-send-record-failure - - suit-condition-image-match: - - suit-send-record-success - - suit-send-record-failure - - suit-send-sysinfo-success - - suit-send-sysinfo-failure + - suit-directive-try-each: + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure - suit-directive-set-component-index: 0 - suit-directive-override-parameters: suit-parameter-source-component: 1 - - suit-directive-copy: - - suit-send-record-failure - - suit-condition-image-match: - - suit-send-record-success - - suit-send-record-failure - - suit-send-sysinfo-success - - suit-send-sysinfo-failure + # When copying the data it is worth to retry the sequence of + # suit-directive-copy and suit-condition-image-match at least once. + # If a bit flip occurs, it might be due to a transport issue, not + # a corrupted candidate image. In this case the bit flip is recoverable + # and it is worth retrying the operation. + # The suit-directive-try-each will complete on the first successful subsequence. + - suit-directive-try-each: + - - suit-directive-copy: + - suit-send-record-failure + - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - - suit-directive-copy: + - suit-send-record-failure + - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure suit-text: suit-digest-algorithm-id: cose-alg-sha-256 + + suit-candidate-verification: + - suit-directive-set-component-index: 1 + - suit-directive-override-parameters: +{%- if 'CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI' in radio['config'] and radio['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] != '' %} + suit-parameter-uri: "{{ radio['config']['CONFIG_SUIT_DFU_CACHE_EXTRACT_IMAGE_URI'] }}" +{%- else %} + suit-parameter-uri: "file://{{ radio['filename'] }}" +{%- endif %} + suit-parameter-image-digest: + suit-digest-algorithm-id: cose-alg-sha-256 + suit-digest-bytes: + file: {{ radio['binary'] }} + - suit-directive-fetch: + - suit-send-record-failure + - suit-directive-try-each: + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + - - suit-condition-image-match: + - suit-send-record-success + - suit-send-record-failure + - suit-send-sysinfo-success + - suit-send-sysinfo-failure + suit-manifest-component-id: - INSTLD_MFST - RFC4122_UUID: diff --git a/samples/suit/smp_transfer/suit/nrf54h20/root_with_binary_nordic_top_extflash.yaml.jinja2 b/samples/suit/smp_transfer/suit/nrf54h20/root_with_binary_nordic_top_extflash.yaml.jinja2 index bbf3263af79..82dd6b83a2c 100644 --- a/samples/suit/smp_transfer/suit/nrf54h20/root_with_binary_nordic_top_extflash.yaml.jinja2 +++ b/samples/suit/smp_transfer/suit/nrf54h20/root_with_binary_nordic_top_extflash.yaml.jinja2 @@ -121,10 +121,10 @@ SUIT_Envelope_Tagged: {%- endif %} suit-payload-fetch: -{%- if application is defined %} +{%- if radio is defined %} - suit-directive-set-component-index: 0 - suit-directive-override-parameters: - suit-parameter-uri: '#{{ application['name'] }}' + suit-parameter-uri: "#{{ radio['name'] }}" - suit-directive-fetch: - suit-send-record-failure - suit-condition-dependency-integrity: @@ -138,10 +138,10 @@ SUIT_Envelope_Tagged: - suit-send-sysinfo-success - suit-send-sysinfo-failure {%- endif %} -{%- if radio is defined %} +{%- if application is defined %} - suit-directive-set-component-index: 0 - suit-directive-override-parameters: - suit-parameter-uri: '#{{ radio['name'] }}' + suit-parameter-uri: "#{{ application['name'] }}" - suit-directive-fetch: - suit-send-record-failure - suit-condition-dependency-integrity: @@ -156,16 +156,16 @@ SUIT_Envelope_Tagged: - suit-send-sysinfo-failure {%- endif %} -{%- if application['dt'].label2node['suit_storage_partition'].regs[0].size == 24576 %} - # Application DTS contains larger SUIT storage - use legacy encoding +{%- if main_config['dt'].label2node['suit_storage_partition'].regs[0].size == 24576 %} + # Main DTS contains larger SUIT storage - use legacy encoding suit-install-legacy: {%- else %} suit-install: {%- endif %} - suit-directive-set-component-index: 0 -{%- if application is defined %} +{%- if radio is defined %} - suit-directive-override-parameters: - suit-parameter-uri: '#{{ application['name'] }}' + suit-parameter-uri: '#{{ radio['name'] }}' - suit-directive-fetch: - suit-send-record-failure - suit-condition-dependency-integrity: @@ -179,9 +179,9 @@ SUIT_Envelope_Tagged: - suit-send-sysinfo-success - suit-send-sysinfo-failure {%- endif %} -{%- if radio is defined %} +{%- if application is defined %} - suit-directive-override-parameters: - suit-parameter-uri: '#{{ radio['name'] }}' + suit-parameter-uri: '#{{ application['name'] }}' - suit-directive-fetch: - suit-send-record-failure - suit-condition-dependency-integrity: @@ -214,13 +214,13 @@ SUIT_Envelope_Tagged: suit-candidate-verification: - suit-directive-set-component-index: 0 -{%- if application is defined %} +{%- if radio is defined %} - suit-directive-override-parameters: - suit-parameter-uri: '#{{ application['name'] }}' + suit-parameter-uri: '#{{ radio['name'] }}' suit-parameter-image-digest: suit-digest-algorithm-id: cose-alg-sha-256 suit-digest-bytes: - envelope: {{ artifacts_folder ~ application['name'] }}.suit + envelope: {{ artifacts_folder ~ radio['name'] }}.suit - suit-directive-fetch: - suit-send-record-failure - suit-condition-image-match: @@ -239,13 +239,13 @@ SUIT_Envelope_Tagged: - suit-send-sysinfo-success - suit-send-sysinfo-failure {%- endif %} -{%- if radio is defined %} +{%- if application is defined %} - suit-directive-override-parameters: - suit-parameter-uri: '#{{ radio['name'] }}' + suit-parameter-uri: '#{{ application['name'] }}' suit-parameter-image-digest: suit-digest-algorithm-id: cose-alg-sha-256 suit-digest-bytes: - envelope: {{ artifacts_folder ~ radio['name'] }}.suit + envelope: {{ artifacts_folder ~ application['name'] }}.suit - suit-directive-fetch: - suit-send-record-failure - suit-condition-image-match: diff --git a/samples/tfm/provisioning_image/prj.conf b/samples/tfm/provisioning_image/prj.conf index 5941920f1f5..2ba6ebf1872 100644 --- a/samples/tfm/provisioning_image/prj.conf +++ b/samples/tfm/provisioning_image/prj.conf @@ -15,7 +15,6 @@ CONFIG_HW_UNIQUE_KEY_RANDOM=y CONFIG_IDENTITY_KEY=y CONFIG_IDENTITY_KEY_RANDOM=y -CONFIG_ASSERT=y # NRF_SECURITY is needed to generate a random identity key CONFIG_NRF_SECURITY=y diff --git a/samples/wifi/ble_coex/prj.conf b/samples/wifi/ble_coex/prj.conf index f4f714b4e2e..b52485d1a7c 100644 --- a/samples/wifi/ble_coex/prj.conf +++ b/samples/wifi/ble_coex/prj.conf @@ -36,7 +36,7 @@ CONFIG_NET_CONFIG_INIT_TIMEOUT=0 CONFIG_NET_SOCKETS_POLL_MAX=10 # Memories -CONFIG_MAIN_STACK_SIZE=4300 +CONFIG_MAIN_STACK_SIZE=5200 CONFIG_NET_TX_STACK_SIZE=4096 CONFIG_NET_RX_STACK_SIZE=4096 @@ -64,8 +64,7 @@ CONFIG_NET_PKT_RX_COUNT=2 CONFIG_NET_PKT_TX_COUNT=24 CONFIG_NET_BUF_RX_COUNT=2 CONFIG_NET_BUF_TX_COUNT=48 -CONFIG_HEAP_MEM_POOL_SIZE=200000 -CONFIG_NET_BUF_DATA_SIZE=1100 +CONFIG_HEAP_MEM_POOL_SIZE=230000 CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y diff --git a/samples/wifi/monitor/prj.conf b/samples/wifi/monitor/prj.conf index 519ec2fc3dd..1c0fa0061a2 100644 --- a/samples/wifi/monitor/prj.conf +++ b/samples/wifi/monitor/prj.conf @@ -27,8 +27,7 @@ CONFIG_NET_PKT_TX_COUNT=3 # tuned for performance, but this will be revisited in the future. CONFIG_NET_BUF_RX_COUNT=60 CONFIG_NET_BUF_TX_COUNT=6 -CONFIG_NET_BUF_DATA_SIZE=1500 -CONFIG_HEAP_MEM_POOL_SIZE=200000 +CONFIG_HEAP_MEM_POOL_SIZE=230000 CONFIG_NET_TC_TX_COUNT=1 CONFIG_INIT_STACKS=y diff --git a/samples/wifi/offloaded_raw_tx/CMakeLists.txt b/samples/wifi/offloaded_raw_tx/CMakeLists.txt new file mode 100644 index 00000000000..6f380dd8076 --- /dev/null +++ b/samples/wifi/offloaded_raw_tx/CMakeLists.txt @@ -0,0 +1,14 @@ +# +# Copyright (c) 2022 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(nrf_wifi_offloaded_raw_tx) + +target_sources(app PRIVATE + src/main.c +) diff --git a/samples/wifi/offloaded_raw_tx/Kconfig b/samples/wifi/offloaded_raw_tx/Kconfig new file mode 100644 index 00000000000..50765aa06bd --- /dev/null +++ b/samples/wifi/offloaded_raw_tx/Kconfig @@ -0,0 +1,24 @@ +# +# Copyright (c) 2024 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +source "Kconfig.zephyr" + +menu "Offloaded Raw TX sample" + +config GENERATE_MAC_ADDRESS + bool "Random Wi-Fi MAC address" + depends on ENTROPY_GENERATOR + help + The option specifies the MAC address to be used by the sample. + This is only used when the nRF7002 OTP is not programmed with a MAC address. + +config BEACON_INTERVAL + int "Beacon interval in milliseconds" + default 100 + range 20 10000 + help + The option sets the time Time interval (in ms) between beacon transmissions. +endmenu diff --git a/samples/wifi/offloaded_raw_tx/README.rst b/samples/wifi/offloaded_raw_tx/README.rst new file mode 100644 index 00000000000..fd4a032bf83 --- /dev/null +++ b/samples/wifi/offloaded_raw_tx/README.rst @@ -0,0 +1,121 @@ +.. _wifi_offloaded_raw_tx_packet_sample: + +Wi-Fi: Offloaded raw TX +####################### + +.. contents:: + :local: + :depth: 2 + +The Offloaded raw TX sample demonstrates how to use the offloaded raw transmit APIs provided by the nRF Wi-Fi driver for transmitting raw packets. + +Requirements +************ + +The sample supports the following development kits: + +.. table-from-sample-yaml:: + +Overview +******** + +The sample generates and broadcasts 802.11 beacon frames as raw TX packets. +As a result, the nRF70 Series device can be identified as a Wi-Fi® beaconing device. + +For more information on the offloaded raw transmit operation, see :ref:`ug_nrf70_developing_offloaded_raw_tx`. + +Configuration +************* + +|config| + +Configuration options +===================== + +.. options-from-kconfig:: + +Building and running +******************** + +.. |sample path| replace:: :file:`samples/wifi/offloaded_raw_tx` + +.. include:: /includes/build_and_run_ns.txt + +To build for the nRF7002 DK, use the ``nrf7002dk/nrf5340/cpuapp`` board target. +The following is an example of the CLI command: + + .. code-block:: console + + west build -p -b nrf7002dk/nrf5340/cpuapp + +To generate and transmit beacons, use the following commands: + +.. tabs:: + + .. group-tab:: Generate beacons + + To generate beacons with random source MAC address and BSSID, run the following command: + + .. code-block:: console + + west build -p -b nrf7002dk/nrf5340/cpuapp -- -DCONFIG_GENERATE_MAC_ADDRESS=y -DCONFIG_ENTROPY_GENERATOR=y + + .. group-tab:: Transmit beacons + + To transmit beacons at a specified interval, run the following command: + + .. code-block:: console + + west build -p -b nrf7002dk/nrf5340/cpuapp -- -DCONFIG_BEACON_INTERVAL=200 + +Change the board target as given below for the nRF7002 EK. + +.. code-block:: console + + west build -p -b nrf5340dk/nrf5340/cpuapp -- -DSHIELD=nrf7002ek + +Testing +======= + +|test_sample| + +1. |connect_kit| +#. |connect_terminal| + + The sample shows the following output: + + .. code-block:: console + + *** Booting nRF Connect SDK v2.7.99-cb26b7c84971 *** + *** Using Zephyr OS v3.7.99-9056bece3e70 *** + ----- Initializing nRF70 ----- + ----- Starting to transmit beacons with the following configuration ----- + SSID: nRF70_off_raw_tx_1 + Period: 200000 + TX Power: 15 + Channel: 1 + Short Preamble: 0 + Number of Retries: 10 + Throughput Mode: Legacy + Rate: 54M + HE GI: 1 + HE LTF: 1 + ----- Statistics ----- + Packet sent: 150 + ----- Updating configuration to ----- + SSID: nRF70_off_raw_tx_2 + Period: 200000 + TX Power: 11 + Channel: 36 + Short Preamble: 0 + Number of Retries: 10 + Throughput Mode: Legacy + Rate: 12M + HE GI: 1 + HE LTF: 1 + ----- Statistics ----- + Packet sent: 299 + ----- Stopping transmission ----- + ----- Deinitializing nRF70 ----- + +#. Observe the packets that are sent out, in a sniffer capture, by filtering the packets based on their transmit MAC address or SSID. diff --git a/samples/wifi/offloaded_raw_tx/prj.conf b/samples/wifi/offloaded_raw_tx/prj.conf new file mode 100644 index 00000000000..57fef3aa958 --- /dev/null +++ b/samples/wifi/offloaded_raw_tx/prj.conf @@ -0,0 +1,8 @@ +CONFIG_WIFI=y +CONFIG_WIFI_NRF70=y +CONFIG_NRF70_OFFLOADED_RAW_TX=y + +# Memories +CONFIG_MAIN_STACK_SIZE=5200 +CONFIG_HEAP_MEM_POOL_SIZE=18000 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y diff --git a/samples/wifi/offloaded_raw_tx/sample.yaml b/samples/wifi/offloaded_raw_tx/sample.yaml new file mode 100644 index 00000000000..1c61df2051b --- /dev/null +++ b/samples/wifi/offloaded_raw_tx/sample.yaml @@ -0,0 +1,20 @@ +sample: + description: Wi-Fi Offloaded Raw Tx Packet sample + application + name: Wi-Fi Offloaded Raw Tx Packet sample +tests: + sample.nrf7002.offloaded_raw_tx: + sysbuild: true + build_only: true + integration_platforms: + - nrf7002dk/nrf5340/cpuapp + platform_allow: nrf7002dk/nrf5340/cpuapp + tags: ci_build sysbuild ci_samples_wifi + sample.nrf7002_eks.offloaded_raw_tx: + sysbuild: true + build_only: true + extra_args: SHIELD=nrf7002ek + integration_platforms: + - nrf5340dk/nrf5340/cpuapp + platform_allow: nrf5340dk/nrf5340/cpuapp + tags: ci_build sysbuild ci_samples_wifi diff --git a/samples/wifi/offloaded_raw_tx/src/main.c b/samples/wifi/offloaded_raw_tx/src/main.c new file mode 100644 index 00000000000..5595ebbb6b1 --- /dev/null +++ b/samples/wifi/offloaded_raw_tx/src/main.c @@ -0,0 +1,256 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/** @file + * @brief Wi-Fi Offloaded raw tx sample + */ + +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_GENERATE_MAC_ADDRESS +#include + +#define UNICAST_MASK GENMASK(7, 1) +#define LOCAL_BIT BIT(1) +#endif /* CONFIG_GENERATE_MAC_ADDRESS */ + +uint8_t bcn_extra_fields[] = { +0x03, 0x01, 0x01, 0x05, 0x04, 0x00, 0x01, 0x00, 0x00, 0x07, 0x06, 0x55, 0x53, 0x04, 0x01, 0x0b, +0x1e, 0x23, 0x02, 0x1c, 0x00, 0x2a, 0x01, 0x04, 0x32, 0x04, 0x0c, 0x12, 0x18, 0x60, 0x0b, 0x05, +0x00, 0x00, 0xd4, 0x00, 0x00, 0x46, 0x05, 0x32, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x1a, 0xad, 0x09, +0x17, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x16, 0x01, 0x08, 0x11, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x7f, 0x09, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xdd, 0x18, 0x00, 0x50, 0xf2, +0x02, 0x01, 0x01, 0x8c, 0x00, 0x03, 0xa4, 0x00, 0x00, 0x27, 0xa4, 0x00, 0x00, 0x42, 0x43, 0x5e, +0x00, 0x62, 0x32, 0x2f, 0x00 +}; + + +struct bcn_frame { + uint8_t frame[NRF_WIFI_OFF_RAW_TX_FRAME_SIZE_MAX]; + uint16_t len; +} bcn; + +unsigned char bssid[6] = {0xf4, 0xce, 0x36, 0x00, 0x10, 0xaa}; + +unsigned char bcn_supp_rates[] = {0x02, 0x04, 0x0b, 0x16}; + +/* Example function to build a beacon frame */ +static int build_wifi_beacon(unsigned short beacon_interval, + unsigned short cap_info, + const char *ssid, + unsigned char *supp_rates, + unsigned int supp_rates_len, + unsigned char *extra_fields, + unsigned int extra_fields_len) +{ + unsigned int ssid_len = strlen(ssid); + unsigned int pos = 0; + unsigned char *bcn_frm = bcn.frame; + unsigned int len = 0; + + len = sizeof(beacon_interval) + sizeof(cap_info) + ssid_len + extra_fields_len; + + if (len < NRF_WIFI_OFF_RAW_TX_FRAME_SIZE_MIN) { + printf("Beacon frame exceeds maximum size\n"); + return -1; + } + + if (len > NRF_WIFI_OFF_RAW_TX_FRAME_SIZE_MAX) { + printf("Beacon frame exceeds maximum size\n"); + return 0; + } + + /* Frame Control */ + bcn_frm[pos++] = 0x80; /* Beacon frame */ + bcn_frm[pos++] = 0x00; + + /* Duration */ + bcn_frm[pos++] = 0x00; + bcn_frm[pos++] = 0x00; + + /* Destination Address (Broadcast) */ + memset(&bcn_frm[pos], 0xff, 6); + pos += 6; + + if (nrf70_off_raw_tx_mac_addr_get(bssid)) { + printf("Failed to get MAC address\n"); + return -1; + } + + /* Source Address */ + memcpy(&bcn_frm[pos], bssid, 6); + pos += 6; + + /* BSSID */ + memcpy(&bcn_frm[pos], bssid, 6); + pos += 6; + + /* Sequence Control */ + bcn_frm[pos++] = 0x00; + bcn_frm[pos++] = 0x00; + + /* Timestamp */ + memset(&bcn_frm[pos], 0x00, 8); + pos += 8; + + /* Beacon Interval */ + bcn_frm[pos++] = beacon_interval & 0xff; + bcn_frm[pos++] = (beacon_interval >> 8) & 0xff; + + /* Capability Information */ + bcn_frm[pos++] = cap_info & 0xff; + bcn_frm[pos++] = (cap_info >> 8) & 0xff; + + /* SSID Parameter Set */ + bcn_frm[pos++] = 0x00; /* SSID Element ID */ + bcn_frm[pos++] = ssid_len; /* SSID Length */ + memcpy(&bcn_frm[pos], ssid, ssid_len); + pos += ssid_len; + + /* Supported Rates */ + bcn_frm[pos++] = 0x01; /* Supported Rates Element ID */ + bcn_frm[pos++] = supp_rates_len; /* Supported Rates Length */ + memcpy(&bcn_frm[pos], supp_rates, supp_rates_len); + pos += supp_rates_len; + + /* Extra fields */ + memcpy(&bcn_frm[pos], extra_fields, extra_fields_len); + pos += extra_fields_len; + + return pos; +} + + +int main(void) +{ + struct nrf_wifi_off_raw_tx_conf conf; + struct nrf_wifi_off_raw_tx_stats stats; + int len = -1; + uint8_t *mac_addr = NULL; + unsigned char *country_code = NULL; + char rate[RATE_MAX][10] = {"1M", "2M", "5.5M", "11M", "6M", "9M", "12M", "18M", + "24M", "36M", "48M", "54M", "MC0", "MC1", "MC2", "MC3", + "MC4", "MC5", "MC6", "MC7"}; + char tput_mode[TPUT_MODE_MAX][10] = {"Legacy", "HT", "VHT", "HE SU", "HE ER SU", "HE TB"}; + + printf("----- Initializing nRF70 -----\n"); + +#ifdef CONFIG_GENERATE_MAC_ADDRESS + mac_addr = malloc(6); + if (!mac_addr) { + printf("Failed to allocate memory for mac_addr\n"); + return -ENOMEM; + } + sys_rand_get(mac_addr, 6); + mac_addr[0] = (mac_addr[0] & UNICAST_MASK) | LOCAL_BIT; +#endif /* CONFIG_GENERATE_MAC_ADDRESS */ + + country_code = (unsigned char *)malloc(3 * sizeof(unsigned char)); + if (!country_code) { + printf("Failed to allocate memory for country_code\n"); + return -ENOMEM; + } + + strncpy((char *)country_code, "US", NRF_WIFI_COUNTRY_CODE_LEN + 1); + nrf70_off_raw_tx_init(mac_addr, country_code); + + /* Build a beacon frame */ + len = build_wifi_beacon(CONFIG_BEACON_INTERVAL, + 0x431, + "nRF70_off_raw_tx_1", + bcn_supp_rates, + sizeof(bcn_supp_rates), + bcn_extra_fields, + sizeof(bcn_extra_fields)); + + memset(&conf, 0, sizeof(conf)); + conf.pkt = bcn.frame; + conf.pkt_len = len; + conf.period_us = CONFIG_BEACON_INTERVAL * USEC_PER_MSEC; + conf.tx_pwr = 15; + conf.chan = 1; + conf.short_preamble = false; + conf.num_retries = 10; + conf.tput_mode = TPUT_MODE_LEGACY; + conf.rate = RATE_54M; + conf.he_gi = 1; + conf.he_ltf = 1; + + printf("----- Starting to transmit beacons with the following configuration -----\n"); + printf("\tSSID: nRF70_off_raw_tx_1\n"); + printf("\tPeriod: %d\n", conf.period_us); + printf("\tTX Power: %d\n", conf.tx_pwr); + printf("\tChannel: %d\n", conf.chan); + printf("\tShort Preamble: %d\n", conf.short_preamble); + printf("\tNumber of Retries: %d\n", conf.num_retries); + printf("\tThroughput Mode: %s\n", tput_mode[conf.tput_mode]); + printf("\tRate: %s\n", rate[conf.rate]); + printf("\tHE GI: %d\n", conf.he_gi); + printf("\tHE LTF: %d\n", conf.he_ltf); + nrf70_off_raw_tx_start(&conf); + + k_sleep(K_SECONDS(30)); + + memset(&stats, 0, sizeof(stats)); + nrf70_off_raw_tx_stats(&stats); + printf("----- Statistics -----\n"); + printf("\tPacket sent: %u\n", stats.off_raw_tx_pkt_sent); + + /* Build a beacon frame */ + len = build_wifi_beacon(CONFIG_BEACON_INTERVAL, + 0x431, + "nRF70_off_raw_tx_2", + bcn_supp_rates, + sizeof(bcn_supp_rates), + bcn_extra_fields, + sizeof(bcn_extra_fields)); + conf.pkt = bcn.frame; + conf.pkt_len = len; + conf.tx_pwr = 11; + conf.chan = 36; + conf.short_preamble = false; + conf.num_retries = 10; + conf.rate = RATE_12M; + + printf("----- Updating configuration to -----\n"); + printf("\tSSID: nRF70_off_raw_tx_2\n"); + printf("\tPeriod: %d\n", conf.period_us); + printf("\tTX Power: %d\n", conf.tx_pwr); + printf("\tChannel: %d\n", conf.chan); + printf("\tShort Preamble: %d\n", conf.short_preamble); + printf("\tNumber of Retries: %d\n", conf.num_retries); + printf("\tThroughput Mode: %s\n", tput_mode[conf.tput_mode]); + printf("\tRate: %s\n", rate[conf.rate]); + printf("\tHE GI: %d\n", conf.he_gi); + printf("\tHE LTF: %d\n", conf.he_ltf); + nrf70_off_raw_tx_conf_update(&conf); + + k_sleep(K_SECONDS(30)); + + nrf70_off_raw_tx_stats(&stats); + printf("----- Statistics -----\n"); + printf("\tPacket sent: %u\n", stats.off_raw_tx_pkt_sent); + + printf("----- Stopping transmission -----\n"); + nrf70_off_raw_tx_stop(); + + printf("----- Deinitializing nRF70 -----\n"); + nrf70_off_raw_tx_deinit(); + + if (mac_addr) { + free(mac_addr); + } + + return 0; +} diff --git a/samples/wifi/offloaded_raw_tx/sysbuild.conf b/samples/wifi/offloaded_raw_tx/sysbuild.conf new file mode 100644 index 00000000000..cce82009028 --- /dev/null +++ b/samples/wifi/offloaded_raw_tx/sysbuild.conf @@ -0,0 +1,8 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +SB_CONFIG_WIFI_NRF70=y +SB_CONFIG_WIFI_NRF70_OFFLOADED_RAW_TX=y diff --git a/samples/wifi/promiscuous/prj.conf b/samples/wifi/promiscuous/prj.conf index 7b28b7410ee..80b3e1efd15 100644 --- a/samples/wifi/promiscuous/prj.conf +++ b/samples/wifi/promiscuous/prj.conf @@ -40,8 +40,7 @@ CONFIG_NET_PKT_TX_COUNT=3 # tuned for performance, but this will be revisited in the future. CONFIG_NET_BUF_RX_COUNT=60 CONFIG_NET_BUF_TX_COUNT=6 -CONFIG_NET_BUF_DATA_SIZE=1500 -CONFIG_HEAP_MEM_POOL_SIZE=200000 +CONFIG_HEAP_MEM_POOL_SIZE=230000 CONFIG_NET_TC_TX_COUNT=1 CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=1 diff --git a/samples/wifi/provisioning/ble/prj.conf b/samples/wifi/provisioning/ble/prj.conf index 6cbc451cfdc..b2f27e40f2a 100644 --- a/samples/wifi/provisioning/ble/prj.conf +++ b/samples/wifi/provisioning/ble/prj.conf @@ -31,8 +31,7 @@ CONFIG_NET_PKT_TX_COUNT=8 # tuned for performance, but this will be revisited in the future. CONFIG_NET_BUF_RX_COUNT=16 CONFIG_NET_BUF_TX_COUNT=16 -CONFIG_NET_BUF_DATA_SIZE=128 -CONFIG_HEAP_MEM_POOL_SIZE=153600 +CONFIG_HEAP_MEM_POOL_SIZE=183600 CONFIG_NET_TC_TX_COUNT=1 CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=1 @@ -52,7 +51,7 @@ CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.165.100.1" CONFIG_NET_SOCKETS_POLL_MAX=10 # Memories -CONFIG_MAIN_STACK_SIZE=4096 +CONFIG_MAIN_STACK_SIZE=5200 CONFIG_NET_TX_STACK_SIZE=4096 CONFIG_NET_RX_STACK_SIZE=4096 diff --git a/samples/wifi/provisioning/softap/prj.conf b/samples/wifi/provisioning/softap/prj.conf index 1d2b4212cea..694e0a8e87a 100644 --- a/samples/wifi/provisioning/softap/prj.conf +++ b/samples/wifi/provisioning/softap/prj.conf @@ -10,7 +10,7 @@ CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xa000 CONFIG_PM_PARTITION_SIZE_TFM=0x20000 # Optimize Wi-Fi stack to save some memory. -CONFIG_HEAP_MEM_POOL_SIZE=81920 +CONFIG_HEAP_MEM_POOL_SIZE=120000 CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_NRF70_RX_NUM_BUFS=16 CONFIG_NRF70_MAX_TX_AGGREGATION=4 @@ -88,10 +88,6 @@ CONFIG_POSIX_UNAME=n CONFIG_NET_DHCPV4=y CONFIG_NET_DHCPV4_SERVER=y -# MBed TLS heap size, required by WPA supplicant and MBed TLS. -CONFIG_MBEDTLS_HEAP_SIZE=81920 -CONFIG_MBEDTLS_RSA_C=y - # Store TLS credentials to protected storage. CONFIG_TLS_CREDENTIALS=y CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y diff --git a/samples/wifi/radio_test/prj.conf b/samples/wifi/radio_test/prj.conf index 00a4d3a310b..b9a69b44c84 100644 --- a/samples/wifi/radio_test/prj.conf +++ b/samples/wifi/radio_test/prj.conf @@ -10,8 +10,8 @@ CONFIG_NRF70_RADIO_TEST=y #CONFIG_INIT_STACKS=y # Memories -CONFIG_MAIN_STACK_SIZE=4096 -CONFIG_SHELL_STACK_SIZE=4096 +CONFIG_MAIN_STACK_SIZE=5200 +CONFIG_SHELL_STACK_SIZE=5200 #64K memory needed for IQ sample captures. CONFIG_HEAP_MEM_POOL_SIZE=98304 CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y diff --git a/samples/wifi/raw_tx_packet/prj.conf b/samples/wifi/raw_tx_packet/prj.conf index f8774ab1e92..e0ebcd5a0ff 100644 --- a/samples/wifi/raw_tx_packet/prj.conf +++ b/samples/wifi/raw_tx_packet/prj.conf @@ -33,8 +33,7 @@ CONFIG_NET_PKT_TX_COUNT=8 # tuned for performance, but this will be revisited in the future. CONFIG_NET_BUF_RX_COUNT=16 CONFIG_NET_BUF_TX_COUNT=16 -CONFIG_NET_BUF_DATA_SIZE=1500 -CONFIG_HEAP_MEM_POOL_SIZE=153600 +CONFIG_HEAP_MEM_POOL_SIZE=183600 CONFIG_NET_TC_TX_COUNT=1 CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=1 diff --git a/samples/wifi/scan/sample.yaml b/samples/wifi/scan/sample.yaml index a1c78c66cae..830991aae18 100644 --- a/samples/wifi/scan/sample.yaml +++ b/samples/wifi/scan/sample.yaml @@ -41,8 +41,10 @@ tests: sample.thingy91x_nrf7000.scan: sysbuild: true build_only: true + integration_platforms: + - thingy91x/nrf9151/ns platform_allow: thingy91x/nrf9151/ns - extra_args: SHIELD=nrf7002ek_nrf7000 + extra_args: SB_CONFIG_WIFI_NRF70=y SB_CONFIG_WIFI_NRF70_SCAN_ONLY=y tags: ci_build sysbuild ci_samples_wifi sample.nrf7002eb_interposer_p1.nrf7002eb.scan: sysbuild: true diff --git a/samples/wifi/shell/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/wifi/shell/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 05929c57fdc..8c7fb4e8416 100644 --- a/samples/wifi/shell/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/wifi/shell/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -22,7 +22,6 @@ CONFIG_NET_PKT_TX_COUNT=4 ## tuned for performance, but this will be revisited in the future. CONFIG_NET_BUF_RX_COUNT=8 CONFIG_NET_BUF_TX_COUNT=8 -CONFIG_NET_BUF_DATA_SIZE=128 CONFIG_NET_TC_TX_COUNT=1 CONFIG_NET_TX_STACK_SIZE=2048 CONFIG_NET_RX_STACK_SIZE=2048 diff --git a/samples/wifi/shell/overlay-enterprise.conf b/samples/wifi/shell/overlay-enterprise.conf new file mode 100644 index 00000000000..3062cabdf27 --- /dev/null +++ b/samples/wifi/shell/overlay-enterprise.conf @@ -0,0 +1,16 @@ +CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE=y +# Use variable data size to reduce memory usage for small data packets +CONFIG_NET_BUF_VARIABLE_DATA_SIZE=y +# For TLS and X.509 processing MbedTLS needs large heap size and using separate heap +# for MbedTLS gives us more control over the heap size. +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_HEAP_SIZE=70000 + +CONFIG_NET_PKT_RX_COUNT=12 +CONFIG_NET_PKT_TX_COUNT=12 +CONFIG_NET_BUF_RX_COUNT=36 +CONFIG_NET_BUF_TX_COUNT=36 + +# Need default heap by driver and hostap which is higher than prj.conf +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=n +CONFIG_SHELL_STACK_SIZE=5400 diff --git a/samples/wifi/shell/overlay-sap.conf b/samples/wifi/shell/overlay-sap.conf index 22f85ec4283..94ffff3a0f6 100644 --- a/samples/wifi/shell/overlay-sap.conf +++ b/samples/wifi/shell/overlay-sap.conf @@ -8,8 +8,7 @@ CONFIG_NET_PKT_RX_COUNT=10 CONFIG_NET_PKT_TX_COUNT=10 CONFIG_NET_BUF_RX_COUNT=10 CONFIG_NET_BUF_TX_COUNT=20 -CONFIG_HEAP_MEM_POOL_SIZE=180000 -CONFIG_NET_BUF_DATA_SIZE=1500 +CONFIG_HEAP_MEM_POOL_SIZE=210000 CONFIG_NRF70_QSPI_LOW_POWER=n CONFIG_NET_ZPERF_MAX_PACKET_SIZE=1500 diff --git a/samples/wifi/shell/overlay-zperf.conf b/samples/wifi/shell/overlay-zperf.conf index 5e1cccfb9a1..243901763ea 100644 --- a/samples/wifi/shell/overlay-zperf.conf +++ b/samples/wifi/shell/overlay-zperf.conf @@ -12,8 +12,7 @@ CONFIG_NET_PKT_RX_COUNT=28 CONFIG_NET_PKT_TX_COUNT=27 CONFIG_NET_BUF_RX_COUNT=28 CONFIG_NET_BUF_TX_COUNT=54 -CONFIG_HEAP_MEM_POOL_SIZE=230000 -CONFIG_NET_BUF_DATA_SIZE=1100 +CONFIG_HEAP_MEM_POOL_SIZE=260000 CONFIG_NRF70_QSPI_LOW_POWER=n # To enable optimization configuration options CONFIG_PICOLIBC_USE_MODULE=y diff --git a/samples/wifi/shell/prj.conf b/samples/wifi/shell/prj.conf index d9966b8aa1b..fc27d8b7c1a 100644 --- a/samples/wifi/shell/prj.conf +++ b/samples/wifi/shell/prj.conf @@ -32,11 +32,10 @@ CONFIG_NET_PKT_TX_COUNT=8 # tuned for performance, but this will be revisited in the future. CONFIG_NET_BUF_RX_COUNT=16 CONFIG_NET_BUF_TX_COUNT=16 -CONFIG_NET_BUF_DATA_SIZE=128 CONFIG_NRF70_RX_NUM_BUFS=16 CONFIG_NRF70_MAX_TX_AGGREGATION=4 # nRF700x is main consumer: (16 + 8) * 1600 = ~40KB + ~40KB control path (experimental) -CONFIG_HEAP_MEM_POOL_SIZE=90000 +CONFIG_HEAP_MEM_POOL_SIZE=100000 CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_NET_TC_TX_COUNT=1 diff --git a/samples/wifi/shell/sample.yaml b/samples/wifi/shell/sample.yaml index 2b16ca4c5a7..daec30d2270 100644 --- a/samples/wifi/shell/sample.yaml +++ b/samples/wifi/shell/sample.yaml @@ -275,7 +275,7 @@ tests: sysbuild: true build_only: true extra_args: - nrf_wifi_shell_SNIPPET="nrf70-driver-verbose-debug;wpa-supplicant-debug" + shell_SNIPPET="nrf70-driver-verbose-debug;wpa-supplicant-debug" EXTRA_CONF_FILE=overlay-zperf.conf CONFIG_NRF70_UTIL=y CONFIG_WPA_CLI=y @@ -285,6 +285,14 @@ tests: - nrf7002dk/nrf5340/cpuapp platform_allow: nrf7002dk/nrf5340/cpuapp tags: ci_build_superset sysbuild ci_samples_wifi + sample.nrf7002.enterprise_mode: + sysbuild: true + build_only: true + extra_args: EXTRA_CONF_FILE=overlay-enterprise.conf + integration_platforms: + - nrf7002dk/nrf5340/cpuapp + platform_allow: nrf7002dk/nrf5340/cpuapp + tags: ci_build sysbuild ci_samples_wifi sample.nrf7002.ap: sysbuild: true build_only: true diff --git a/samples/wifi/shutdown/prj.conf b/samples/wifi/shutdown/prj.conf index 0c6221a0ce7..eb88df4e26f 100644 --- a/samples/wifi/shutdown/prj.conf +++ b/samples/wifi/shutdown/prj.conf @@ -18,7 +18,7 @@ CONFIG_NET_OFFLOAD=y CONFIG_INIT_STACKS=y # Memories -CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_MAIN_STACK_SIZE=5200 # Debugging CONFIG_STACK_SENTINEL=y diff --git a/samples/wifi/softap/prj.conf b/samples/wifi/softap/prj.conf index 32a3c08e17c..b0020910f61 100644 --- a/samples/wifi/softap/prj.conf +++ b/samples/wifi/softap/prj.conf @@ -31,8 +31,7 @@ CONFIG_NET_PKT_TX_COUNT=8 # tuned for performance, but this will be revisited in the future. CONFIG_NET_BUF_RX_COUNT=16 CONFIG_NET_BUF_TX_COUNT=16 -CONFIG_NET_BUF_DATA_SIZE=1500 -CONFIG_HEAP_MEM_POOL_SIZE=153600 +CONFIG_HEAP_MEM_POOL_SIZE=183600 CONFIG_NET_TC_TX_COUNT=1 CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=1 @@ -52,7 +51,7 @@ CONFIG_NET_SOCKETS_POLL_MAX=10 CONFIG_MAIN_STACK_SIZE=5200 CONFIG_NET_TX_STACK_SIZE=4096 CONFIG_NET_RX_STACK_SIZE=4096 -CONFIG_SOFTAP_SAMPLE_START_WIFI_THREAD_STACK_SIZE=4300 +CONFIG_SOFTAP_SAMPLE_START_WIFI_THREAD_STACK_SIZE=5200 # Debugging CONFIG_STACK_SENTINEL=y diff --git a/samples/wifi/sta/prj.conf b/samples/wifi/sta/prj.conf index a7a83796000..4d313e4f7b6 100644 --- a/samples/wifi/sta/prj.conf +++ b/samples/wifi/sta/prj.conf @@ -33,9 +33,8 @@ CONFIG_NET_PKT_TX_COUNT=8 # tuned for performance, but this will be revisited in the future. CONFIG_NET_BUF_RX_COUNT=8 CONFIG_NET_BUF_TX_COUNT=16 -CONFIG_NET_BUF_DATA_SIZE=128 CONFIG_NRF70_RX_NUM_BUFS=16 -CONFIG_HEAP_MEM_POOL_SIZE=90000 +CONFIG_HEAP_MEM_POOL_SIZE=120000 CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_NET_TC_TX_COUNT=1 diff --git a/samples/wifi/sta/src/main.c b/samples/wifi/sta/src/main.c index bb2f586d699..a8196f69394 100644 --- a/samples/wifi/sta/src/main.c +++ b/samples/wifi/sta/src/main.c @@ -26,7 +26,10 @@ LOG_MODULE_REGISTER(sta, CONFIG_LOG_DEFAULT_LEVEL); #include #include +#if defined(CONFIG_BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP) || \ + defined(CONFIG_BOARD_NRF7002DK_NRF5340_CPUAPP) #include +#endif #include "net_private.h" diff --git a/samples/wifi/thread_coex/prj.conf b/samples/wifi/thread_coex/prj.conf index c709a864975..ce4d8c92d72 100644 --- a/samples/wifi/thread_coex/prj.conf +++ b/samples/wifi/thread_coex/prj.conf @@ -32,7 +32,7 @@ CONFIG_NET_CONFIG_SETTINGS=y CONFIG_NET_CONFIG_INIT_TIMEOUT=0 # Memories -CONFIG_MAIN_STACK_SIZE=4500 +CONFIG_MAIN_STACK_SIZE=5200 CONFIG_NET_TX_STACK_SIZE=4096 CONFIG_NET_RX_STACK_SIZE=4096 @@ -56,8 +56,7 @@ CONFIG_ZVFS_OPEN_MAX=16 # Optimized networking settings for performance CONFIG_NET_TC_TX_COUNT=1 -CONFIG_HEAP_MEM_POOL_SIZE=200000 -CONFIG_NET_BUF_DATA_SIZE=1100 +CONFIG_HEAP_MEM_POOL_SIZE=230000 # Below Wi-Fi configs need to be modified based on security CONFIG_WIFI_MGMT_EXT=y diff --git a/samples/wifi/throughput/overlay-high-performance.conf b/samples/wifi/throughput/overlay-high-performance.conf index d56b014b923..8bdc17ed7c1 100644 --- a/samples/wifi/throughput/overlay-high-performance.conf +++ b/samples/wifi/throughput/overlay-high-performance.conf @@ -4,8 +4,7 @@ CONFIG_NET_PKT_TX_COUNT=30 CONFIG_NET_PKT_RX_COUNT=27 CONFIG_NET_BUF_TX_COUNT=60 CONFIG_NET_BUF_RX_COUNT=27 -CONFIG_NET_BUF_DATA_SIZE=1100 -CONFIG_HEAP_MEM_POOL_SIZE=230000 +CONFIG_HEAP_MEM_POOL_SIZE=260000 CONFIG_SPEED_OPTIMIZATIONS=y CONFIG_NRF70_QSPI_LOW_POWER=n CONFIG_NRF70_UTIL=n @@ -14,6 +13,6 @@ CONFIG_NRF70_MAX_TX_TOKENS=12 CONFIG_ZVFS_OPEN_MAX=20 CONFIG_NET_SOCKETS_POLL_MAX=20 # Sockets: select + poll take up more stack -CONFIG_MAIN_STACK_SIZE=4200 -CONFIG_SHELL_STACK_SIZE=4700 +CONFIG_MAIN_STACK_SIZE=5200 +CONFIG_SHELL_STACK_SIZE=5200 CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600 diff --git a/samples/wifi/throughput/overlay-iot-devices.conf b/samples/wifi/throughput/overlay-iot-devices.conf index 9f2df60a365..ff46b09f68a 100644 --- a/samples/wifi/throughput/overlay-iot-devices.conf +++ b/samples/wifi/throughput/overlay-iot-devices.conf @@ -5,8 +5,7 @@ CONFIG_NET_PKT_RX_COUNT=6 CONFIG_NET_BUF_TX_COUNT=12 CONFIG_NET_BUF_RX_COUNT=6 CONFIG_NRF70_RX_NUM_BUFS=6 -CONFIG_NET_BUF_DATA_SIZE=800 -CONFIG_HEAP_MEM_POOL_SIZE=230000 +CONFIG_HEAP_MEM_POOL_SIZE=260000 CONFIG_SPEED_OPTIMIZATIONS=y CONFIG_NRF70_QSPI_LOW_POWER=n CONFIG_NRF70_UTIL=n diff --git a/samples/wifi/throughput/overlay-memory-optimized.conf b/samples/wifi/throughput/overlay-memory-optimized.conf index 74027fa6218..ff46b09f68a 100644 --- a/samples/wifi/throughput/overlay-memory-optimized.conf +++ b/samples/wifi/throughput/overlay-memory-optimized.conf @@ -5,8 +5,7 @@ CONFIG_NET_PKT_RX_COUNT=6 CONFIG_NET_BUF_TX_COUNT=12 CONFIG_NET_BUF_RX_COUNT=6 CONFIG_NRF70_RX_NUM_BUFS=6 -CONFIG_NET_BUF_DATA_SIZE=500 -CONFIG_HEAP_MEM_POOL_SIZE=230000 +CONFIG_HEAP_MEM_POOL_SIZE=260000 CONFIG_SPEED_OPTIMIZATIONS=y CONFIG_NRF70_QSPI_LOW_POWER=n CONFIG_NRF70_UTIL=n diff --git a/samples/wifi/throughput/overlay-rx-prio.conf b/samples/wifi/throughput/overlay-rx-prio.conf index cdaff412555..566acb2f13d 100644 --- a/samples/wifi/throughput/overlay-rx-prio.conf +++ b/samples/wifi/throughput/overlay-rx-prio.conf @@ -5,8 +5,7 @@ CONFIG_NET_PKT_RX_COUNT=64 CONFIG_NET_BUF_TX_COUNT=10 CONFIG_NET_BUF_RX_COUNT=64 CONFIG_NRF70_RX_NUM_BUFS=64 -CONFIG_NET_BUF_DATA_SIZE=1100 -CONFIG_HEAP_MEM_POOL_SIZE=230000 +CONFIG_HEAP_MEM_POOL_SIZE=260000 CONFIG_SPEED_OPTIMIZATIONS=y CONFIG_NRF70_QSPI_LOW_POWER=n CONFIG_NRF70_UTIL=n diff --git a/samples/wifi/throughput/overlay-tx-prio.conf b/samples/wifi/throughput/overlay-tx-prio.conf index 6afd165a5fb..0fa8eaba6f5 100644 --- a/samples/wifi/throughput/overlay-tx-prio.conf +++ b/samples/wifi/throughput/overlay-tx-prio.conf @@ -5,8 +5,7 @@ CONFIG_NET_PKT_RX_COUNT=10 CONFIG_NET_BUF_TX_COUNT=64 CONFIG_NET_BUF_RX_COUNT=10 CONFIG_NRF70_RX_NUM_BUFS=10 -CONFIG_NET_BUF_DATA_SIZE=1100 -CONFIG_HEAP_MEM_POOL_SIZE=230000 +CONFIG_HEAP_MEM_POOL_SIZE=260000 CONFIG_SPEED_OPTIMIZATIONS=y CONFIG_NRF70_QSPI_LOW_POWER=n CONFIG_NRF70_UTIL=n diff --git a/samples/wifi/throughput/prj.conf b/samples/wifi/throughput/prj.conf index ea2d21bb53a..b30da5bbd5f 100644 --- a/samples/wifi/throughput/prj.conf +++ b/samples/wifi/throughput/prj.conf @@ -34,11 +34,10 @@ CONFIG_NET_PKT_TX_COUNT=8 # tuned for performance, but this will be revisited in the future. CONFIG_NET_BUF_RX_COUNT=16 CONFIG_NET_BUF_TX_COUNT=16 -CONFIG_NET_BUF_DATA_SIZE=128 CONFIG_NRF70_RX_NUM_BUFS=16 CONFIG_NRF70_MAX_TX_AGGREGATION=4 # nRF700x is main consumer: (16 + 8) * 1600 = ~40KB + ~40KB control path (experimental) -CONFIG_HEAP_MEM_POOL_SIZE=80000 +CONFIG_HEAP_MEM_POOL_SIZE=110000 CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_NET_TC_TX_COUNT=1 @@ -54,8 +53,8 @@ CONFIG_NET_SHELL=y CONFIG_NET_SOCKETS_POLL_MAX=12 # Memories -CONFIG_MAIN_STACK_SIZE=4200 -CONFIG_SHELL_STACK_SIZE=4444 +CONFIG_MAIN_STACK_SIZE=5200 +CONFIG_SHELL_STACK_SIZE=5200 CONFIG_NET_TX_STACK_SIZE=4096 CONFIG_NET_RX_STACK_SIZE=4096 diff --git a/samples/wifi/twt/prj.conf b/samples/wifi/twt/prj.conf index 2506b0d7d75..3aa53e680e6 100644 --- a/samples/wifi/twt/prj.conf +++ b/samples/wifi/twt/prj.conf @@ -30,8 +30,7 @@ CONFIG_NET_PKT_TX_COUNT=8 CONFIG_NET_PKT_RX_COUNT=16 CONFIG_NET_BUF_TX_COUNT=16 CONFIG_NET_BUF_RX_COUNT=16 -CONFIG_NET_BUF_DATA_SIZE=1500 -CONFIG_HEAP_MEM_POOL_SIZE=180000 +CONFIG_HEAP_MEM_POOL_SIZE=210000 #CONFIG_SPEED_OPTIMIZATIONS=y #CONFIG_NRF70_MAX_TX_AGGREGATION=9 #CONFIG_NRF70_MAX_TX_TOKENS=12 diff --git a/samples/wifi/wfa_qt_app/prj.conf b/samples/wifi/wfa_qt_app/prj.conf index 10ce00d753f..a80a33e48c8 100644 --- a/samples/wifi/wfa_qt_app/prj.conf +++ b/samples/wifi/wfa_qt_app/prj.conf @@ -42,8 +42,7 @@ CONFIG_NET_PKT_TX_COUNT=8 # tuned for performance, but this will be revisited in the future. CONFIG_NET_BUF_RX_COUNT=16 CONFIG_NET_BUF_TX_COUNT=16 -CONFIG_NET_BUF_DATA_SIZE=1500 -CONFIG_HEAP_MEM_POOL_SIZE=153600 +CONFIG_HEAP_MEM_POOL_SIZE=183600 CONFIG_NET_TC_TX_COUNT=1 CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=4 @@ -57,8 +56,8 @@ CONFIG_NET_L2_ETHERNET=y CONFIG_NET_SHELL=y # Memories -CONFIG_MAIN_STACK_SIZE=4096 -CONFIG_SHELL_STACK_SIZE=4300 +CONFIG_MAIN_STACK_SIZE=5200 +CONFIG_SHELL_STACK_SIZE=5200 CONFIG_NET_TX_STACK_SIZE=4096 CONFIG_NET_RX_STACK_SIZE=4096 diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 2f26be41045..f6d3e7992a8 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y wget ca-certificates qemu-system-arm gi && rm -rf /var/lib/apt/lists/* RUN wget https://developer.nordicsemi.com/.pc-tools/nrfutil/x64-linux/nrfutil -q -O /usr/local/bin/nrfutil \ && chmod +x /usr/local/bin/nrfutil \ - && nrfutil install device=2.6.4 \ + && nrfutil install device=2.7.2 \ && nrfutil install toolchain-manager=0.15.0 RUN nrfutil toolchain-manager install --toolchain-bundle-id $VERSION \ && nrfutil toolchain-manager env --as-script > /opt/toolchain-env.sh \ diff --git a/scripts/quarantine.yaml b/scripts/quarantine.yaml index 16a1a717111..18395876b67 100644 --- a/scripts/quarantine.yaml +++ b/scripts/quarantine.yaml @@ -13,17 +13,9 @@ - scenarios: - ".*nrf7002eb.*" - ".*nrf7002_eb.*" - - ".thingy91x_nrf700.*" - - ".thingy91x_wifi.*" - applications.matter_bridge.lto.br_ble.nrf54h20.wifi - applications.matter_bridge.release.br_ble.nrf54h20.wifi - comment: "nRF7002EB, Thingy91x are not support in the upstream nRF70 driver yet" - -- scenarios: - - applications.asset_tracker_v2.nrf_cloud - - ".*thingy.*nrf70.*" - - ".*thingy.*wifi.*" - comment: "Thingy is not supported in the upstream nRF70 driver yet" + comment: "nRF7002EB not support in the upstream nRF70 driver yet" - scenarios: - sample.cellular.modem_shell.location_service_ext_pgps_nrf7002ek_wifi diff --git a/snippets/nrf70-driver-verbose-debug/overlay-nrf70-driver-verbose-debug.conf b/snippets/nrf70-driver-verbose-debug/overlay-nrf70-driver-verbose-debug.conf index 7b294884434..077a179e5d2 100644 --- a/snippets/nrf70-driver-verbose-debug/overlay-nrf70-driver-verbose-debug.conf +++ b/snippets/nrf70-driver-verbose-debug/overlay-nrf70-driver-verbose-debug.conf @@ -9,7 +9,7 @@ CONFIG_SHELL_STACK_SIZE=4600 CONFIG_NET_SHELL=y CONFIG_SHELL_GETOPT=y CONFIG_SHELL_CMDS_RESIZE=n -CONFIG_NRF700X_UTIL=y +CONFIG_NRF70_UTIL=y CONFIG_NET_L2_WIFI_SHELL=y CONFIG_NET_STATISTICS=y CONFIG_NET_STATISTICS_WIFI=y @@ -20,4 +20,3 @@ CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_PRINTK=y CONFIG_WIFI_NRF70_LOG_LEVEL_DBG=y CONFIG_WIFI_NRF70_BUS_LOG_LEVEL_DBG=y -CONFIG_NRF_WIFI_LOG_LEVEL_DBG=y diff --git a/snippets/nrf70-wifi/nrf54l15_cpuapp.conf b/snippets/nrf70-wifi/nrf54l15_cpuapp.conf index be36b80119b..0f1ee685cff 100644 --- a/snippets/nrf70-wifi/nrf54l15_cpuapp.conf +++ b/snippets/nrf70-wifi/nrf54l15_cpuapp.conf @@ -3,7 +3,7 @@ CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_NET_SOCKETPAIR_HEAP=y -CONFIG_SHELL_STACK_SIZE=2048 +CONFIG_SHELL_STACK_SIZE=5200 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 CONFIG_ISR_STACK_SIZE=512 CONFIG_HEAP_MEM_POOL_SIZE=138000 diff --git a/subsys/net/lib/nrf70_fw_ext/CMakeLists.txt b/subsys/net/lib/nrf70_fw_ext/CMakeLists.txt index 6bb6051f55e..0ddd59c62ea 100644 --- a/subsys/net/lib/nrf70_fw_ext/CMakeLists.txt +++ b/subsys/net/lib/nrf70_fw_ext/CMakeLists.txt @@ -32,6 +32,8 @@ if(DEFINED CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_DISABLED OR set(NRF70_PATCH ${FW_BINS_BASE}/scan_only/nrf70.bin) elseif (CONFIG_NRF70_SYSTEM_WITH_RAW_MODES) set(NRF70_PATCH ${FW_BINS_BASE}/system_with_raw/nrf70.bin) + elseif(CONFIG_NRF70_OFFLOADED_RAW_TX) + set(NRF70_PATCH ${FW_BINS_BASE}/offloaded_raw_tx/nrf70.bin) else() # Error message(FATAL_ERROR "Unsupported nRF70 patch configuration") diff --git a/subsys/net/lib/wifi_credentials/Kconfig b/subsys/net/lib/wifi_credentials/Kconfig index ee95d01ff9f..1507da4583f 100644 --- a/subsys/net/lib/wifi_credentials/Kconfig +++ b/subsys/net/lib/wifi_credentials/Kconfig @@ -57,6 +57,8 @@ config WIFI_CREDENTIALS_SHELL bool "Shell commands to manage Wi-Fi credentials" default y depends on SHELL + select SHELL_GETOPT + select GETOPT_LONG depends on !WIFI_CREDENTIALS_BACKEND_NONE endif # WIFI_CREDENTIALS diff --git a/subsys/net/lib/wifi_credentials/wifi_credentials.c b/subsys/net/lib/wifi_credentials/wifi_credentials.c index 6017702d01f..b61b91a114e 100644 --- a/subsys/net/lib/wifi_credentials/wifi_credentials.c +++ b/subsys/net/lib/wifi_credentials/wifi_credentials.c @@ -136,6 +136,7 @@ int wifi_credentials_get_by_ssid_personal_struct(const char *ssid, size_t ssid_l buf->header.type != WIFI_SECURITY_TYPE_PSK && buf->header.type != WIFI_SECURITY_TYPE_PSK_SHA256 && buf->header.type != WIFI_SECURITY_TYPE_SAE && + buf->header.type != WIFI_SECURITY_TYPE_EAP_TLS && buf->header.type != WIFI_SECURITY_TYPE_WPA_PSK) { LOG_ERR("Requested WiFi credentials entry is corrupted"); ret = -EPROTO; diff --git a/subsys/net/lib/wifi_credentials/wifi_credentials_shell.c b/subsys/net/lib/wifi_credentials/wifi_credentials_shell.c index a61e1da05f2..c8a5560a62f 100644 --- a/subsys/net/lib/wifi_credentials/wifi_credentials_shell.c +++ b/subsys/net/lib/wifi_credentials/wifi_credentials_shell.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -19,6 +20,8 @@ #include #include +#define MAX_BANDS_STR_LEN 64 + /* Ensure 'strnlen' is available even with -std=c99. */ size_t strnlen(const char *buf, size_t bufsz); @@ -27,36 +30,51 @@ size_t strnlen(const char *buf, size_t bufsz); static void print_network_info(void *cb_arg, const char *ssid, size_t ssid_len) { int ret = 0; - struct wifi_credentials_personal creds = { 0 }; - const struct shell *shell = (const struct shell *) cb_arg; + struct wifi_credentials_personal creds = {0}; + const struct shell *shell = (const struct shell *)cb_arg; ret = wifi_credentials_get_by_ssid_personal_struct(ssid, ssid_len, &creds); if (ret) { shell_error(shell, "An error occurred when trying to load credentials for network \"%.*s\"" - ". err: %d", ssid_len, ssid, ret); + ". err: %d", + ssid_len, ssid, ret); return; } shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, - " network ssid: \"%.*s\", ssid_len: %d, type: %s", - ssid_len, ssid, ssid_len, + " network ssid: \"%.*s\", ssid_len: %d, type: %s", ssid_len, ssid, ssid_len, wifi_security_txt(creds.header.type)); - if (creds.header.type == WIFI_SECURITY_TYPE_PSK || creds.header.type == WIFI_SECURITY_TYPE_PSK_SHA256 || creds.header.type == WIFI_SECURITY_TYPE_SAE || creds.header.type == WIFI_SECURITY_TYPE_WPA_PSK) { shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, - ", password: \"%.*s\", password_len: %d", - creds.password_len, creds.password, creds.password_len); + ", password: \"%.*s\", password_len: %d", creds.password_len, + creds.password, creds.password_len); + } + +#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE + if (creds.header.type == WIFI_SECURITY_TYPE_EAP_TLS) { + if (creds.header.key_passwd_length > 0) { + shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, + ", key_passwd: \"%.*s\", key_passwd_len: %d", + creds.header.key_passwd_length, creds.header.key_passwd, + creds.header.key_passwd_length); + } + if (creds.header.aid_length > 0) { + shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, + ", anon_id: \"%.*s\", anon_id_len: %d", + creds.header.aid_length, creds.header.anon_id, + creds.header.aid_length); + } } +#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ if (creds.header.flags & WIFI_CREDENTIALS_FLAG_BSSID) { shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, ", bssid: " MACSTR, - creds.header.bssid[0], creds.header.bssid[1], - creds.header.bssid[2], creds.header.bssid[3], - creds.header.bssid[4], creds.header.bssid[5]); + creds.header.bssid[0], creds.header.bssid[1], creds.header.bssid[2], + creds.header.bssid[3], creds.header.bssid[4], creds.header.bssid[5]); } if (creds.header.flags & WIFI_CREDENTIALS_FLAG_2_4GHz) { @@ -92,178 +110,178 @@ static void print_network_info(void *cb_arg, const char *ssid, size_t ssid_len) shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, "\n"); } -static enum wifi_security_type parse_sec_type(const char *s) -{ - if (strcmp("OPEN", s) == 0) { - return WIFI_SECURITY_TYPE_NONE; - } - if (strcmp("WPA2-PSK", s) == 0) { - return WIFI_SECURITY_TYPE_PSK; - } - if (strcmp("WPA2-PSK-SHA256", s) == 0) { - return WIFI_SECURITY_TYPE_PSK_SHA256; - } - if (strcmp("WPA3-SAE", s) == 0) { - return WIFI_SECURITY_TYPE_SAE; - } - if (strcmp("WPA-PSK", s) == 0) { - return WIFI_SECURITY_TYPE_WPA_PSK; - } - return WIFI_SECURITY_TYPE_UNKNOWN; -} - -static enum wifi_frequency_bands parse_band(const char *s) -{ - if (strcmp("2.4GHz", s) == 0) { - return WIFI_FREQ_BAND_2_4_GHZ; - } - if (strcmp("5GHz", s) == 0) { - return WIFI_FREQ_BAND_5_GHZ; - } - if (strcmp("6GHz", s) == 0) { - return WIFI_FREQ_BAND_6_GHZ; - } - return WIFI_FREQ_BAND_UNKNOWN; -} - static int cmd_add_network(const struct shell *shell, size_t argc, char *argv[]) { - int ret; - - if (argc < 3) { - goto help; - } - - if (strnlen(argv[1], WIFI_SSID_MAX_LEN + 1) > WIFI_SSID_MAX_LEN) { - shell_error(shell, "SSID too long"); - goto help; - } - - struct wifi_credentials_personal creds = { - .header.ssid_len = strlen(argv[1]), - .header.type = parse_sec_type(argv[2]), - }; - - memcpy(creds.header.ssid, argv[1], creds.header.ssid_len); - - if (creds.header.type == WIFI_SECURITY_TYPE_UNKNOWN) { - shell_error(shell, "Cannot parse security type"); - goto help; - } - - size_t arg_idx = 3; - if (creds.header.type == WIFI_SECURITY_TYPE_PSK || - creds.header.type == WIFI_SECURITY_TYPE_PSK_SHA256 || - creds.header.type == WIFI_SECURITY_TYPE_SAE || - creds.header.type == WIFI_SECURITY_TYPE_WPA_PSK) { - /* parse passphrase */ - if (argc < 4) { - shell_error(shell, "Missing password"); - goto help; - } - creds.password_len = strlen(argv[3]); - if (creds.password_len < WIFI_PSK_MIN_LEN) { - shell_error(shell, "Passphrase should be minimum %d characters", - WIFI_PSK_MIN_LEN); - goto help; - } - if ( - (creds.password_len > CONFIG_WIFI_CREDENTIALS_SAE_PASSWORD_LENGTH && - creds.header.type == WIFI_SECURITY_TYPE_SAE) || - (creds.password_len > WIFI_PSK_MAX_LEN && - creds.header.type != WIFI_SECURITY_TYPE_SAE) - ) { - shell_error(shell, "Password is too long for this security type"); - goto help; - } - memcpy(creds.password, argv[3], creds.password_len); - ++arg_idx; - } - - if (arg_idx < argc) { - /* look for bssid */ - ret = sscanf(argv[arg_idx], MACSTR, - &creds.header.bssid[0], &creds.header.bssid[1], - &creds.header.bssid[2], &creds.header.bssid[3], - &creds.header.bssid[4], &creds.header.bssid[5]); - if (ret == 6) { + int opt; + int opt_index = 0; + struct getopt_state *state; + static const struct option long_options[] = { + {"ssid", required_argument, 0, 's'}, {"passphrase", required_argument, 0, 'p'}, + {"key-mgmt", required_argument, 0, 'k'}, {"ieee-80211w", required_argument, 0, 'w'}, + {"bssid", required_argument, 0, 'm'}, {"band", required_argument, 0, 'b'}, + {"channel", required_argument, 0, 'c'}, {"timeout", required_argument, 0, 't'}, + {"identity", required_argument, 0, 'a'}, {"key-passwd", required_argument, 0, 'K'}, + {"help", no_argument, 0, 'h'}, {0, 0, 0, 0}}; + char *endptr; + bool secure_connection = false; + uint8_t band; + struct wifi_credentials_personal creds = {0}; + + const uint8_t all_bands[] = {WIFI_FREQ_BAND_2_4_GHZ, WIFI_FREQ_BAND_5_GHZ, + WIFI_FREQ_BAND_6_GHZ}; + bool found = false; + char bands_str[MAX_BANDS_STR_LEN] = {0}; + size_t offset = 0; + long channel; + + while ((opt = getopt_long(argc, argv, "s:p:k:w:b:c:m:t:a:K:h", long_options, &opt_index)) != + -1) { + state = getopt_state_get(); + switch (opt) { + case 's': + creds.header.ssid_len = strlen(state->optarg); + if (creds.header.ssid_len > WIFI_SSID_MAX_LEN) { + shell_warn(shell, "SSID too long (max %d characters)\n", + WIFI_SSID_MAX_LEN); + return -EINVAL; + } + memcpy(creds.header.ssid, state->optarg, creds.header.ssid_len); + break; + case 'k': + creds.header.type = atoi(state->optarg); + if (creds.header.type) { + secure_connection = true; + } + break; + case 'p': + creds.password_len = strlen(state->optarg); + if (creds.password_len < WIFI_PSK_MIN_LEN) { + shell_warn(shell, "Passphrase should be minimum %d characters\n", + WIFI_PSK_MIN_LEN); + return -EINVAL; + } + if (creds.password_len > WIFI_PSK_MAX_LEN) { + shell_warn(shell, "Passphrase too long (max %d characters)\n", + WIFI_PSK_MAX_LEN); + return -EINVAL; + } + memcpy(creds.password, state->optarg, creds.password_len); + break; + case 'c': + channel = strtol(state->optarg, &endptr, 10); + if (*endptr != '\0') { + shell_error(shell, "Invalid channel: %s\n", state->optarg); + return -EINVAL; + } + + for (band = 0; band < ARRAY_SIZE(all_bands); band++) { + offset += snprintf(bands_str + offset, sizeof(bands_str) - offset, + "%s%s", band ? "," : "", + wifi_band_txt(all_bands[band])); + if (offset >= sizeof(bands_str)) { + shell_error(shell, + "Failed to parse channel: %ld: " + "band string too long\n", + channel); + return -EINVAL; + } + + if (wifi_utils_validate_chan(all_bands[band], channel)) { + found = true; + break; + } + } + + if (!found) { + shell_error(shell, "Invalid channel: %ld, checked bands: %s\n", + channel, bands_str); + return -EINVAL; + } + + creds.header.channel = channel; + break; + case 'b': + switch (atoi(state->optarg)) { + case 2: + creds.header.flags |= WIFI_CREDENTIALS_FLAG_2_4GHz; + break; + case 5: + creds.header.flags |= WIFI_CREDENTIALS_FLAG_5GHz; + break; + case 6: + creds.header.flags |= WIFI_CREDENTIALS_FLAG_6GHz; + break; + default: + shell_error(shell, "Invalid band: %d\n", atoi(state->optarg)); + return -EINVAL; + } + break; + case 'w': + if (creds.header.type == WIFI_SECURITY_TYPE_NONE || + creds.header.type == WIFI_SECURITY_TYPE_WPA_PSK) { + shell_error(shell, "MFP not supported for security type %s\n", + wifi_security_txt(creds.header.type)); + return -EINVAL; + } + if (!strncmp(state->optarg, "disabled", 8)) { + creds.header.flags |= WIFI_CREDENTIALS_FLAG_MFP_DISABLED; + } else if (!strncmp(state->optarg, "required", 8)) { + creds.header.flags |= WIFI_CREDENTIALS_FLAG_MFP_REQUIRED; + } else { + shell_error(shell, "Invalid IEEE 802.11w value: %s\n", + state->optarg); + return -EINVAL; + } + break; + case 'm': + if (net_bytes_from_str(creds.header.bssid, sizeof(creds.header.bssid), + state->optarg) < 0) { + shell_warn(shell, "Invalid MAC address\n"); + return -EINVAL; + } creds.header.flags |= WIFI_CREDENTIALS_FLAG_BSSID; - ++arg_idx; + break; + case 'a': + creds.header.aid_length = strlen(state->optarg); + if (creds.header.aid_length > WIFI_ENT_IDENTITY_MAX_LEN) { + shell_warn(shell, "anon_id too long (max %d characters)\n", + WIFI_ENT_IDENTITY_MAX_LEN); + return -EINVAL; + } + memcpy(creds.header.anon_id, state->optarg, creds.header.aid_length); + creds.header.flags |= WIFI_CREDENTIALS_FLAG_ANONYMOUS_IDENTITY; + break; + case 'K': + creds.header.key_passwd_length = strlen(state->optarg); + if (creds.header.key_passwd_length > WIFI_ENT_PSWD_MAX_LEN) { + shell_warn(shell, "key_passwd too long (max %d characters)\n", + WIFI_ENT_PSWD_MAX_LEN); + return -EINVAL; + } + memcpy(creds.header.key_passwd, state->optarg, + creds.header.key_passwd_length); + creds.header.flags |= WIFI_CREDENTIALS_FLAG_KEY_PASSWORD; + break; + case 'h': + shell_help(shell); + return -ENOEXEC; + default: + shell_error(shell, "Invalid option %c\n", state->optopt); + return -EINVAL; } } - - if (arg_idx < argc) { - /* look for band */ - enum wifi_frequency_bands band = parse_band(argv[arg_idx]); - - if (band == WIFI_FREQ_BAND_2_4_GHZ) { - creds.header.flags |= WIFI_CREDENTIALS_FLAG_2_4GHz; - ++arg_idx; - } - if (band == WIFI_FREQ_BAND_5_GHZ) { - creds.header.flags |= WIFI_CREDENTIALS_FLAG_5GHz; - ++arg_idx; - } + if (creds.password_len > 0 && !secure_connection) { + shell_warn(shell, "Passphrase provided without security configuration\n"); } - if (arg_idx < argc) { - /* look for channel */ - char *end; - - creds.header.channel = strtol(argv[arg_idx], &end, 10); - if (*end == '\0') { - ++arg_idx; - } - } - - if (arg_idx < argc) { - /* look for favorite flag */ - if (strncmp("favorite", argv[arg_idx], strlen("favorite")) == 0) { - creds.header.flags |= WIFI_CREDENTIALS_FLAG_FAVORITE; - ++arg_idx; - } - } - - if (arg_idx < argc) { - /* look for mfp_disabled flag */ - if (strncmp("mfp_disabled", argv[arg_idx], strlen("mfp_disabled")) == 0) { - creds.header.flags |= WIFI_CREDENTIALS_FLAG_MFP_DISABLED; - ++arg_idx; - } else if (strncmp("mfp_required", argv[arg_idx], strlen("mfp_required")) == 0) { - creds.header.flags |= WIFI_CREDENTIALS_FLAG_MFP_REQUIRED; - ++arg_idx; - } - } - - if (arg_idx < argc) { - /* look for timeout */ - char *end; - - creds.header.timeout = strtol(argv[arg_idx], &end, 10); - if (*end == '\0') { - ++arg_idx; - } - } - - if (arg_idx != argc) { - for (size_t i = arg_idx; i < argc; ++i) { - shell_warn(shell, "Unparsed arg: [%s]", argv[i]); - } + if (creds.header.ssid_len == 0) { + shell_error(shell, "SSID not provided\n"); + shell_help(shell); + return -EINVAL; } return wifi_credentials_set_personal_struct(&creds); -help: - shell_print(shell, "Usage: wifi_cred add \"network name\"" - " {OPEN, WPA2-PSK, WPA2-PSK-SHA256, WPA3-SAE, WPA-PSK}" - " [psk/password]" - " [bssid]" - " [{2.4GHz, 5GHz}]" - " [channel]" - " [favorite]" - " [mfp_disabled|mfp_required]" - " [timeout]"); - return -EINVAL; } static int cmd_delete_network(const struct shell *shell, size_t argc, char *argv[]) @@ -278,23 +296,39 @@ static int cmd_delete_network(const struct shell *shell, size_t argc, char *argv return -EINVAL; } - shell_print(shell, "\tDeleting network ssid: \"%s\", ssid_len: %d", - argv[1], strlen(argv[1])); + shell_print(shell, "\tDeleting network ssid: \"%s\", ssid_len: %d", argv[1], + strlen(argv[1])); return wifi_credentials_delete_by_ssid(argv[1], strlen(argv[1])); } static int cmd_list_networks(const struct shell *shell, size_t argc, char *argv[]) { - wifi_credentials_for_each_ssid(print_network_info, (void *) shell); + wifi_credentials_for_each_ssid(print_network_info, (void *)shell); return 0; } -SHELL_SUBCMD_SET_CREATE(sub_wifi_cred, (wifi_cred)); -SHELL_SUBCMD_ADD((wifi_cred), - add, NULL, "Add network to storage.", cmd_add_network, 0, 0); -SHELL_SUBCMD_ADD((wifi_cred), - delete, NULL, "Delete network from storage.", cmd_delete_network, 0, 0); -SHELL_SUBCMD_ADD((wifi_cred), - list, NULL, "List stored networks.", cmd_list_networks, 0, 0); + +SHELL_SUBCMD_SET_CREATE(sub_wifi_cred, (nwifi_cred)); +SHELL_SUBCMD_ADD((nwifi_cred), add, NULL, + "Add network to storage.\n" + "<-s --ssid \"\">: SSID.\n" + "[-c --channel]: Channel that needs to be scanned for connection. 0:any channel.\n" + "[-b, --band] 0: any band (2:2.4GHz, 5:5GHz, 6:6GHz]\n" + "[-p, --psk]: Passphrase (valid only for secure SSIDs)\n" + "[-k, --key-mgmt]: Key Management type (valid only for secure SSIDs)\n" + "0:None, 1:WPA2-PSK, 2:WPA2-PSK-256, 3:SAE-HNP, 4:SAE-H2E, 5:SAE-AUTO, 6:WAPI," + " 7:EAP-TLS, 8:WEP, 9: WPA-PSK, 10: WPA-Auto-Personal, 11: DPP\n" + "[-w, --ieee-80211w]: MFP (optional: needs security type to be specified)\n" + ": 0:Disable, 1:Optional, 2:Required.\n" + "[-m, --bssid]: MAC address of the AP (BSSID).\n" + "[-t, --timeout]: Timeout for the connection attempt (in seconds).\n" + "[-a, --anon-id]: Anonymous identity for enterprise mode.\n" + "[-K, --key-passwd]: Private key passwd for enterprise mode.\n" + "[-h, --help]: Print out the help for the connect command.\n", + cmd_add_network, 2, 12); +SHELL_SUBCMD_ADD((nwifi_cred), delete, NULL, "Delete network from storage.", cmd_delete_network, 0, + 0); +SHELL_SUBCMD_ADD((nwifi_cred), list, NULL, "List stored networks.", cmd_list_networks, 0, 0); + SHELL_CMD_REGISTER(wifi_cred, &sub_wifi_cred, "Wi-Fi Credentials commands", NULL); diff --git a/subsys/net/lib/wifi_mgmt_ext/CMakeLists.txt b/subsys/net/lib/wifi_mgmt_ext/CMakeLists.txt index 46b80854a98..a91041aa7b3 100644 --- a/subsys/net/lib/wifi_mgmt_ext/CMakeLists.txt +++ b/subsys/net/lib/wifi_mgmt_ext/CMakeLists.txt @@ -9,3 +9,32 @@ zephyr_library_sources(wifi_mgmt_ext.c) zephyr_library_sources_ifdef( CONFIG_WIFI_CREDENTIALS_SHELL_AUTOCONNECT wifi_cred_shell_autoconnect.c) + +if(DEFINED CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE AND NOT DEFINED CONFIG_NET_L2_WIFI_SHELL) + # Wi-Fi Enterprise test certificates handling + set(gen_inc_dir ${ZEPHYR_BINARY_DIR}/misc/generated) + set(gen_dir ${gen_inc_dir}/wifi_enterprise_test_certs) + # Create output directory for test certs + file(MAKE_DIRECTORY ${gen_dir}) + + # convert .pem files to array data at build time + zephyr_include_directories(${gen_inc_dir}) + + generate_inc_file_for_target( + app + ${ZEPHYR_BASE}/samples/net/wifi/test_certs/client.pem + ${gen_dir}/client.pem.inc + ) + + generate_inc_file_for_target( + app + ${ZEPHYR_BASE}/samples/net/wifi/test_certs/client-key.pem + ${gen_dir}/client-key.pem.inc + ) + + generate_inc_file_for_target( + app + ${ZEPHYR_BASE}/samples/net/wifi/test_certs/ca.pem + ${gen_dir}/ca.pem.inc + ) +endif() diff --git a/subsys/net/lib/wifi_mgmt_ext/wifi_cred_shell_autoconnect.c b/subsys/net/lib/wifi_mgmt_ext/wifi_cred_shell_autoconnect.c index eeef0843a95..b62c7f2a9f1 100644 --- a/subsys/net/lib/wifi_mgmt_ext/wifi_cred_shell_autoconnect.c +++ b/subsys/net/lib/wifi_mgmt_ext/wifi_cred_shell_autoconnect.c @@ -27,5 +27,5 @@ static int cmd_auto_connect(const struct shell *shell, size_t argc, char *argv[] return 0; } -SHELL_SUBCMD_ADD((wifi_cred), +SHELL_SUBCMD_ADD((nwifi_cred), auto_connect, NULL, "Connect to any stored network.", cmd_auto_connect, 0, 0); diff --git a/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c b/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c index 09db23a2640..41d78cebdc0 100644 --- a/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c +++ b/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c @@ -21,15 +21,44 @@ size_t strnlen(const char *buf, size_t bufsz); LOG_MODULE_REGISTER(wifi_mgmt_ext, CONFIG_WIFI_MGMT_EXT_LOG_LEVEL); #if defined(CONFIG_WIFI_CREDENTIALS_STATIC) - BUILD_ASSERT(sizeof(CONFIG_WIFI_CREDENTIALS_STATIC_SSID) != 1, - "CONFIG_WIFI_CREDENTIALS_STATIC_SSID required"); +BUILD_ASSERT(sizeof(CONFIG_WIFI_CREDENTIALS_STATIC_SSID) != 1, + "CONFIG_WIFI_CREDENTIALS_STATIC_SSID required"); #endif /* defined(CONFIG_WIFI_CREDENTIALS_STATIC) */ +#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE +static const char ca_cert_test[] = { +#include + '\0'}; + +static const char client_cert_test[] = { +#include + '\0'}; + +static const char client_key_test[] = { +#include + '\0'}; + +static const char ca_cert2_test[] = { + #include + '\0'}; + +static const char client_cert2_test[] = { + #include + '\0'}; + +static const char client_key2_test[] = { + #include + '\0'}; +#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ + static int __stored_creds_to_params(struct wifi_credentials_personal *creds, - struct wifi_connect_req_params *params) + struct wifi_connect_req_params *params) { char *ssid = NULL; char *psk = NULL; +#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE + char *key_passwd = NULL; +#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ int ret; /* SSID */ @@ -58,7 +87,7 @@ static int __stored_creds_to_params(struct wifi_credentials_personal *creds, goto err_out; } memset(psk, 0, creds->password_len + 1); - ret = snprintf(psk, creds->password_len + 1, "%s", creds->password); + ret = snprintf(psk, creds->password_len + 1, "%s", creds->password); if (ret > creds->password_len) { LOG_ERR("PSK string truncated\n"); ret = -EINVAL; @@ -70,11 +99,33 @@ static int __stored_creds_to_params(struct wifi_credentials_personal *creds, /* Defaults */ params->security = creds->header.type; +#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE + if (params->security == WIFI_SECURITY_TYPE_EAP_TLS) { + if (creds->header.key_passwd_length > 0) { + key_passwd = (char *)k_malloc(creds->header.key_passwd_length + 1); + if (!key_passwd) { + LOG_ERR("Failed to allocate memory for key_passwd\n"); + ret = -ENOMEM; + goto err_out; + } + memset(key_passwd, 0, creds->header.key_passwd_length + 1); + ret = snprintf(key_passwd, creds->header.key_passwd_length + 1, "%s", + creds->header.key_passwd); + if (ret > creds->header.key_passwd_length) { + LOG_ERR("key_passwd string truncated\n"); + ret = -EINVAL; + goto err_out; + } + params->key_passwd = key_passwd; + params->key_passwd_length = creds->header.key_passwd_length; + } + } +#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ /* If channel is set to 0 we default to ANY. 0 is not a valid Wi-Fi channel. */ params->channel = (creds->header.channel != 0) ? creds->header.channel : WIFI_CHANNEL_ANY; - params->timeout = (creds->header.timeout != 0) ? creds->header.timeout : - CONFIG_WIFI_MGMT_EXT_CONNECTION_TIMEOUT; + params->timeout = (creds->header.timeout != 0) ? creds->header.timeout + : CONFIG_WIFI_MGMT_EXT_CONNECTION_TIMEOUT; /* Security type (optional) */ if (creds->header.type > WIFI_SECURITY_TYPE_MAX) { @@ -108,6 +159,12 @@ static int __stored_creds_to_params(struct wifi_credentials_personal *creds, k_free(psk); psk = NULL; } +#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE + if (key_passwd) { + k_free(key_passwd); + key_passwd = NULL; + } +#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ return ret; } @@ -128,6 +185,33 @@ static inline const char *wpa_supp_security_txt(enum wifi_security_type security } } +#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE +static int wifi_set_enterprise_creds(struct net_if *iface) +{ + struct wifi_enterprise_creds_params params = {0}; + + params.ca_cert = (uint8_t *)ca_cert_test; + params.ca_cert_len = ARRAY_SIZE(ca_cert_test); + params.client_cert = (uint8_t *)client_cert_test; + params.client_cert_len = ARRAY_SIZE(client_cert_test); + params.client_key = (uint8_t *)client_key_test; + params.client_key_len = ARRAY_SIZE(client_key_test); + params.ca_cert2 = (uint8_t *)ca_cert2_test; + params.ca_cert2_len = ARRAY_SIZE(ca_cert2_test); + params.client_cert2 = (uint8_t *)client_cert2_test; + params.client_cert2_len = ARRAY_SIZE(client_cert2_test); + params.client_key2 = (uint8_t *)client_key2_test; + params.client_key2_len = ARRAY_SIZE(client_key2_test); + + if (net_mgmt(NET_REQUEST_WIFI_ENTERPRISE_CREDS, iface, ¶ms, sizeof(params))) { + LOG_ERR("Set enterprise credentials failed\n"); + return -1; + } + + return 0; +} +#endif + static int add_network_from_credentials_struct_personal(struct wifi_credentials_personal *creds, struct net_if *iface) { @@ -139,8 +223,14 @@ static int add_network_from_credentials_struct_personal(struct wifi_credentials_ goto out; } - if (net_mgmt(NET_REQUEST_WIFI_CONNECT, iface, - &cnx_params, sizeof(struct wifi_connect_req_params))) { +#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE + /* Load the enterprise credentials if needed */ + if (cnx_params.security == WIFI_SECURITY_TYPE_EAP_TLS) { + wifi_set_enterprise_creds(iface); + } +#endif + if (net_mgmt(NET_REQUEST_WIFI_CONNECT, iface, &cnx_params, + sizeof(struct wifi_connect_req_params))) { LOG_ERR("Connection request failed\n"); return -ENOEXEC; @@ -170,7 +260,7 @@ static void add_stored_network(void *cb_arg, const char *ssid, size_t ssid_len) if (ret) { LOG_ERR("Loading WiFi credentials failed for SSID [%.*s], len: %d, err: %d", - ssid_len, ssid, ssid_len, ret); + ssid_len, ssid, ssid_len, ret); return; } @@ -183,40 +273,38 @@ static int add_static_network_config(struct net_if *iface) struct wifi_credentials_personal creds = { .header = { - .ssid_len = strlen(CONFIG_WIFI_CREDENTIALS_STATIC_SSID), - }, + .ssid_len = strlen(CONFIG_WIFI_CREDENTIALS_STATIC_SSID), + }, .password_len = strlen(CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD), }; int ret = wifi_credentials_get_by_ssid_personal_struct( - CONFIG_WIFI_CREDENTIALS_STATIC_SSID, - strlen(CONFIG_WIFI_CREDENTIALS_STATIC_SSID), - &creds - ); + CONFIG_WIFI_CREDENTIALS_STATIC_SSID, strlen(CONFIG_WIFI_CREDENTIALS_STATIC_SSID), + &creds); if (!ret) { LOG_WRN("Statically configured WiFi network was overridden by storage."); return 0; } -#if defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_OPEN) +#if defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_OPEN) creds.header.type = WIFI_SECURITY_TYPE_NONE; -#elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_PSK) +#elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_PSK) creds.header.type = WIFI_SECURITY_TYPE_PSK; -#elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_PSK_SHA256) +#elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_PSK_SHA256) creds.header.type = WIFI_SECURITY_TYPE_PSK_SHA256; -#elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_SAE) +#elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_SAE) creds.header.type = WIFI_SECURITY_TYPE_SAE; #elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_WPA_PSK) creds.header.type = WIFI_SECURITY_TYPE_WPA_PSK; #else - #error "invalid CONFIG_WIFI_CREDENTIALS_STATIC_TYPE" +#error "invalid CONFIG_WIFI_CREDENTIALS_STATIC_TYPE" #endif memcpy(creds.header.ssid, CONFIG_WIFI_CREDENTIALS_STATIC_SSID, - strlen(CONFIG_WIFI_CREDENTIALS_STATIC_SSID)); + strlen(CONFIG_WIFI_CREDENTIALS_STATIC_SSID)); memcpy(creds.password, CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD, - strlen(CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD)); + strlen(CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD)); LOG_DBG("Adding statically configured WiFi network [%s] to internal list.", creds.header.ssid); @@ -227,8 +315,7 @@ static int add_static_network_config(struct net_if *iface) #endif /* defined(CONFIG_WIFI_CREDENTIALS_STATIC) */ } -static int wifi_ext_command(uint32_t mgmt_request, struct net_if *iface, - void *data, size_t len) +static int wifi_ext_command(uint32_t mgmt_request, struct net_if *iface, void *data, size_t len) { int ret = 0; diff --git a/subsys/nrf_security/src/utils/nrf_security_mutexes.c b/subsys/nrf_security/src/utils/nrf_security_mutexes.c index 20c4a2a8ef9..0552ba21e51 100644 --- a/subsys/nrf_security/src/utils/nrf_security_mutexes.c +++ b/subsys/nrf_security/src/utils/nrf_security_mutexes.c @@ -19,7 +19,7 @@ void nrf_security_mutex_init(mbedtls_threading_mutex_t * mutex) { - if((mutex->flags & NRF_SECURITY_MUTEX_FLAGS_INITIALIZED) != 0) { + if ((mutex->flags & NRF_SECURITY_MUTEX_FLAGS_INITIALIZED) == 0) { k_mutex_init(&mutex->mutex); } @@ -33,7 +33,7 @@ void nrf_security_mutex_free(mbedtls_threading_mutex_t * mutex) int nrf_security_mutex_lock(mbedtls_threading_mutex_t * mutex) { - if((mutex->flags & NRF_SECURITY_MUTEX_FLAGS_INITIALIZED) != 0) { + if ((mutex->flags & NRF_SECURITY_MUTEX_FLAGS_INITIALIZED) != 0) { return k_mutex_lock(&mutex->mutex, K_FOREVER); } else { return -EINVAL; @@ -42,7 +42,7 @@ int nrf_security_mutex_lock(mbedtls_threading_mutex_t * mutex) int nrf_security_mutex_unlock(mbedtls_threading_mutex_t * mutex) { - if((mutex->flags & NRF_SECURITY_MUTEX_FLAGS_INITIALIZED) != 0) { + if ((mutex->flags & NRF_SECURITY_MUTEX_FLAGS_INITIALIZED) != 0) { return k_mutex_unlock(&mutex->mutex); } else { return -EINVAL; diff --git a/subsys/suit/memory_layout/include/suit_memory_layout.h b/subsys/suit/memory_layout/include/suit_memory_layout.h index b456c81545b..d20dd353099 100644 --- a/subsys/suit/memory_layout/include/suit_memory_layout.h +++ b/subsys/suit/memory_layout/include/suit_memory_layout.h @@ -145,6 +145,17 @@ bool suit_memory_global_address_to_external_memory_offset(uintptr_t address, uin */ const struct device *suit_memory_external_memory_device_get(void); +/** + * @brief Get allowed address range for placement of SDFW Update Candidate + * + * @param[out] address Start address of NVM area capable to store SDFW update candidate + * @param[out] size Size of NVM area capable to store SDFW update candidate + * + * @return True for SoCs where SDFW Update Candidate shall be placed in + * dedicated address rande, false otherwise. + */ +bool suit_memory_sdfw_update_area_info_get(uintptr_t *address, size_t *size); + #ifdef __cplusplus } #endif diff --git a/subsys/suit/memory_layout/src/suit_memory_layout.c b/subsys/suit/memory_layout/src/suit_memory_layout.c index 99c831a9737..9e7ff7cef02 100644 --- a/subsys/suit/memory_layout/src/suit_memory_layout.c +++ b/subsys/suit/memory_layout/src/suit_memory_layout.c @@ -10,11 +10,10 @@ /* Definitions for SOC internal nonvolatile memory */ #if (DT_NODE_EXISTS(DT_NODELABEL(mram1x))) /* nrf54H20 */ -#define INTERNAL_NVM_START (DT_REG_ADDR(DT_NODELABEL(mram1x))) -#define INTERNAL_NVM_SIZE DT_REG_SIZE(DT_NODELABEL(mram1x)) -#elif (DT_NODE_EXISTS(DT_NODELABEL(mram10))) /* nrf54H20 */ -#define INTERNAL_NVM_START (DT_REG_ADDR(DT_NODELABEL(mram10))) -#define INTERNAL_NVM_SIZE DT_REG_SIZE(DT_NODELABEL(mram10)) + DT_REG_SIZE(DT_NODELABEL(mram11)) +#define INTERNAL_NVM_START (DT_REG_ADDR(DT_NODELABEL(mram1x))) +#define INTERNAL_NVM_SIZE DT_REG_SIZE(DT_NODELABEL(mram1x)) +#define SDFW_UPDATE_AREA_ADDR (INTERNAL_NVM_START + INTERNAL_NVM_SIZE / 2) +#define SDFW_UPDATE_AREA_SIZE (INTERNAL_NVM_SIZE / 2) #elif (DT_NODE_EXISTS(DT_NODELABEL(flash0))) /* nrf52 or flash simulator */ #define INTERNAL_NVM_START DT_REG_ADDR(DT_NODELABEL(flash0)) #define INTERNAL_NVM_SIZE DT_REG_SIZE(DT_NODELABEL(flash0)) @@ -85,13 +84,13 @@ static struct ram_area ram_area_map[] = { .ra_start = DT_REG_ADDR(DT_NODELABEL(cpuapp_ram0x_region)), .ra_size = DT_REG_SIZE(DT_NODELABEL(cpuapp_ram0x_region)), }, -#endif /* ram0x */ +#endif /* ram0x */ #if (DT_NODE_EXISTS(DT_NODELABEL(cpuapp_ram0))) /* nrf54H20 */ { .ra_start = DT_REG_ADDR(DT_NODELABEL(cpuapp_ram0)), .ra_size = DT_REG_SIZE(DT_NODELABEL(cpuapp_ram0)), }, -#endif /* cpuapp_ram0 */ +#endif /* cpuapp_ram0 */ #if (DT_NODE_EXISTS(DT_NODELABEL(shared_ram20_region))) /* nrf54H20 */ { .ra_start = DT_REG_ADDR(DT_NODELABEL(shared_ram20_region)), @@ -302,3 +301,19 @@ const struct device *suit_memory_external_memory_device_get(void) { return EXTERNAL_NVM_DEV; } + +bool suit_memory_sdfw_update_area_info_get(uintptr_t *address, size_t *size) +{ +#if defined SDFW_UPDATE_AREA_ADDR && defined SDFW_UPDATE_AREA_SIZE + if (address) { + *address = SDFW_UPDATE_AREA_ADDR; + } + if (size) { + *size = SDFW_UPDATE_AREA_SIZE; + } + + return true; +#else + return false; +#endif +} diff --git a/subsys/suit/platform/include/suit_plat_ipuc.h b/subsys/suit/platform/include/suit_plat_ipuc.h index 5b2b4e744c1..ebd48977d0a 100644 --- a/subsys/suit/platform/include/suit_plat_ipuc.h +++ b/subsys/suit/platform/include/suit_plat_ipuc.h @@ -17,6 +17,7 @@ #define SUIT_PLAT_IPUC_H__ #include +#include #ifdef __cplusplus extern "C" { @@ -26,28 +27,64 @@ extern "C" { * * @param[in] handle Handle to the updateable component. * - * @retval SUIT_ERR_UNSUPPORTED_COMPONENT_ID if component handle is invalid. - * @retval SUIT_ERR_OVERFLOW if the maximum number of updateable components has been reached. - * @retval SUIT_SUCCESS if updateable component was successfully declared. + * @retval SUIT_PLAT_ERR_INVAL component handle is invalid or component is not supported. + * @retval SUIT_PLAT_ERR_NOMEM the maximum number of updateable components has been reached. + * @retval SUIT_PLAT_SUCCESS updateable component was successfully declared. */ -int suit_plat_ipuc_declare(suit_component_t handle); +suit_plat_err_t suit_plat_ipuc_declare(suit_component_t handle); /** @brief Revoke declaration of updateable component. * * @param[in] handle Handle to the component that is no longer updateable. * - * @retval SUIT_ERR_UNSUPPORTED_COMPONENT_ID if component handle is invalid. - * @retval SUIT_SUCCESS if declaration of updateable component was successfully revoked. + * @retval SUIT_PLAT_ERR_NOT_FOUND component is not declared as IPUC + * @retval SUIT_PLAT_SUCCESS declaration of updateable component was successfully revoked. */ -int suit_plat_ipuc_revoke(suit_component_t handle); +suit_plat_err_t suit_plat_ipuc_revoke(suit_component_t handle); -/** @brief Find an updateable component ID, which is not smaller than specified size. +/** @brief Writes a chunk of data to IPUC * - * @param[in] min_size Minimal size of the updateable component. + * @note offset parameter equal to 0 resets the data transfer. That allows to restart a image + * transfer, or even to transfer a new image. * - * @returns Pointer to the updateable component ID, NULL otherwise. + * @param[in] handle Handle to the updateable component. + * @param[in] offset Offset to write data chunk. Discontinuous writes are not supported. + * @param[in] buffer Pointer to source data chunk. + * @param[in] chunk_size Size of data chunk. + * @param[in] last_chunk True if this is the last chunk of image. + * + * @retval SUIT_PLAT_ERR_NOT_FOUND component is not declared as IPUC + * @retval SUIT_PLAT_ERR_INCORRECT_STATE discontinued write attempt + * @retval SUIT_PLAT_ERR_IO sink not found, sink does not support seek operation, seek operation + * failed, streaming to sink failed + * @retval SUIT_PLAT_SUCCESS opration completed successfully + * + */ +suit_plat_err_t suit_plat_ipuc_write(suit_component_t handle, size_t offset, uintptr_t buffer, + size_t chunk_size, bool last_chunk); + +/** @brief Gets size of image written to IPUC + * + * @param[in] handle Handle to the updateable component. + * @param[out] size Size of image stored in IPUC + * + * @retval SUIT_PLAT_ERR_INVAL invalid parameter + * @retval SUIT_PLAT_ERR_NOT_FOUND component is not declared as IPUC + * @retval SUIT_PLAT_ERR_INCORRECT_STATE writing to IPUC is still in progress + * @retval SUIT_PLAT_SUCCESS opration completed successfully + */ +suit_plat_err_t suit_plat_ipuc_get_stored_img_size(suit_component_t handle, size_t *size); + +/** @brief Find an updateable component which is capable to store SDFW update candidate. + * + * @details Since Secure ROM imposes requirements related to SDFW candidate location, returned + * pointer does not necessarily points to the begin of updateable component. + * + * @param[in] required_size Required size of area capable to store SDFW candidate. + * + * @returns Pointer to area capable to store SDFW candidate, 0 otherwise. */ -struct zcbor_string *suit_plat_find_sdfw_mirror_ipuc(size_t min_size); +uintptr_t suit_plat_ipuc_sdfw_mirror_addr(size_t required_size); #ifdef __cplusplus } diff --git a/subsys/suit/platform/sdfw/src/suit_plat_ipuc.c b/subsys/suit/platform/sdfw/src/suit_plat_ipuc.c index 58483745331..03073cd65b5 100644 --- a/subsys/suit/platform/sdfw/src/suit_plat_ipuc.c +++ b/subsys/suit/platform/sdfw/src/suit_plat_ipuc.c @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include #include #include @@ -17,6 +19,7 @@ LOG_MODULE_REGISTER(suit_ipuc, CONFIG_SUIT_LOG_LEVEL); typedef struct { struct zcbor_string component_id; size_t write_offset; + bool last_chunk_stored; } suit_plat_ipuc_entry_t; @@ -45,49 +48,164 @@ static struct zcbor_string *ipuc_component_id_from_handle(suit_component_t handl return component_id; } -int suit_plat_ipuc_revoke(suit_component_t handle) +static suit_plat_ipuc_entry_t *ipuc_entry_from_handle(suit_component_t handle) { struct zcbor_string *component_id = ipuc_component_id_from_handle(handle); if (component_id == NULL) { - return SUIT_ERR_UNSUPPORTED_COMPONENT_ID; + return NULL; } - k_mutex_lock(&ipuc_mutex, K_FOREVER); for (size_t i = 0; i < CONFIG_SUIT_IPUC_SIZE; i++) { suit_plat_ipuc_entry_t *p_entry = &components[i]; if (suit_compare_zcbor_strings(component_id, &p_entry->component_id)) { + return p_entry; + } + } -#ifdef CONFIG_SUIT_LOG_LEVEL_INF - intptr_t slot_address = 0; - size_t slot_size = 0; + return NULL; +} - if (suit_plat_decode_address_size(&p_entry->component_id, &slot_address, - &slot_size) == SUIT_PLAT_SUCCESS) { - LOG_INF("Revoking IPUC, address: %p, size: %d bytes", - (void *)slot_address, slot_size); - } -#endif - p_entry->component_id.value = NULL; - p_entry->component_id.len = 0; - p_entry->write_offset = 0; - break; +suit_plat_err_t suit_plat_ipuc_write(suit_component_t handle, size_t offset, uintptr_t buffer, + size_t chunk_size, bool last_chunk) +{ + suit_plat_err_t plat_ret = SUIT_PLAT_SUCCESS; + struct stream_sink ipuc_sink; + bool sink_allocated = false; + + k_mutex_lock(&ipuc_mutex, K_FOREVER); + suit_plat_ipuc_entry_t *ipuc_entry = ipuc_entry_from_handle(handle); + + if (ipuc_entry == NULL) { + plat_ret = SUIT_PLAT_ERR_NOT_FOUND; + } + + if (plat_ret == SUIT_PLAT_SUCCESS) { + + if (offset == 0) { + ipuc_entry->write_offset = 0; + ipuc_entry->last_chunk_stored = false; + } + + if (offset != ipuc_entry->write_offset || ipuc_entry->last_chunk_stored) { + plat_ret = SUIT_PLAT_ERR_INCORRECT_STATE; + } + } + + if (plat_ret == SUIT_PLAT_SUCCESS) { + plat_ret = suit_sink_select(handle, &ipuc_sink); + if (plat_ret != SUIT_PLAT_SUCCESS) { + plat_ret = SUIT_PLAT_ERR_IO; + } else { + sink_allocated = true; + } + } + + if (plat_ret == SUIT_PLAT_SUCCESS) { + if (ipuc_sink.seek == NULL) { + plat_ret = SUIT_PLAT_ERR_IO; + } + } + + if (plat_ret == SUIT_PLAT_SUCCESS) { + if (offset == 0 && ipuc_sink.erase != NULL) { + ipuc_sink.erase(ipuc_sink.ctx); + } + + plat_ret = ipuc_sink.seek(ipuc_sink.ctx, offset); + if (plat_ret != SUIT_PLAT_SUCCESS) { + plat_ret = SUIT_PLAT_ERR_IO; + } + } + + if (plat_ret == SUIT_PLAT_SUCCESS && chunk_size > 0) { + plat_ret = suit_generic_address_streamer_stream((uint8_t *)buffer, chunk_size, + &ipuc_sink); + if (plat_ret != SUIT_PLAT_SUCCESS) { + plat_ret = SUIT_PLAT_ERR_IO; + } + } + + if (plat_ret == SUIT_PLAT_SUCCESS) { + ipuc_entry->write_offset = offset + chunk_size; + if (last_chunk) { + ipuc_entry->last_chunk_stored = true; + } + } + + if (sink_allocated) { + if (ipuc_sink.release != NULL) { + ipuc_sink.release(ipuc_sink.ctx); } } k_mutex_unlock(&ipuc_mutex); + return plat_ret; +} + +suit_plat_err_t suit_plat_ipuc_get_stored_img_size(suit_component_t handle, size_t *size) +{ + if (size == NULL) { + return SUIT_PLAT_ERR_INVAL; + } - return SUIT_SUCCESS; + k_mutex_lock(&ipuc_mutex, K_FOREVER); + suit_plat_ipuc_entry_t *ipuc_entry = ipuc_entry_from_handle(handle); + + if (ipuc_entry == NULL) { + k_mutex_unlock(&ipuc_mutex); + return SUIT_PLAT_ERR_NOT_FOUND; + } + + if (ipuc_entry->last_chunk_stored == false) { + k_mutex_unlock(&ipuc_mutex); + return SUIT_PLAT_ERR_INCORRECT_STATE; + } + + *size = ipuc_entry->write_offset; + k_mutex_unlock(&ipuc_mutex); + return SUIT_PLAT_SUCCESS; +} + +suit_plat_err_t suit_plat_ipuc_revoke(suit_component_t handle) +{ + + k_mutex_lock(&ipuc_mutex, K_FOREVER); + suit_plat_ipuc_entry_t *ipuc_entry = ipuc_entry_from_handle(handle); + + if (ipuc_entry == NULL) { + k_mutex_unlock(&ipuc_mutex); + return SUIT_PLAT_ERR_NOT_FOUND; + } + +#ifdef CONFIG_SUIT_LOG_LEVEL_INF + intptr_t slot_address = 0; + size_t slot_size = 0; + + if (suit_plat_decode_address_size(&p_entry->component_id, &slot_address, &slot_size) == + SUIT_PLAT_SUCCESS) { + LOG_INF("Revoking IPUC, address: %p, size: %d bytes", (void *)slot_address, + slot_size); + } +#endif + + ipuc_entry->component_id.value = NULL; + ipuc_entry->component_id.len = 0; + ipuc_entry->write_offset = 0; + ipuc_entry->last_chunk_stored = false; + + k_mutex_unlock(&ipuc_mutex); + return SUIT_PLAT_SUCCESS; } -int suit_plat_ipuc_declare(suit_component_t handle) +suit_plat_err_t suit_plat_ipuc_declare(suit_component_t handle) { suit_plat_ipuc_entry_t *allocated_entry = NULL; struct zcbor_string *component_id = ipuc_component_id_from_handle(handle); if (component_id == NULL) { - return SUIT_ERR_UNSUPPORTED_COMPONENT_ID; + return SUIT_PLAT_ERR_INVAL; } k_mutex_lock(&ipuc_mutex, K_FOREVER); @@ -105,7 +223,7 @@ int suit_plat_ipuc_declare(suit_component_t handle) if (allocated_entry == NULL) { k_mutex_unlock(&ipuc_mutex); - return SUIT_ERR_OVERFLOW; + return SUIT_PLAT_ERR_NOMEM; } #ifdef CONFIG_SUIT_LOG_LEVEL_INF @@ -122,78 +240,106 @@ int suit_plat_ipuc_declare(suit_component_t handle) allocated_entry->component_id.value = component_id->value; allocated_entry->component_id.len = component_id->len; allocated_entry->write_offset = 0; + allocated_entry->last_chunk_stored = false; k_mutex_unlock(&ipuc_mutex); - return SUIT_SUCCESS; + return SUIT_PLAT_SUCCESS; } -struct zcbor_string *suit_plat_find_sdfw_mirror_ipuc(size_t min_size) +uintptr_t suit_plat_ipuc_sdfw_mirror_addr(size_t required_size) { - struct zcbor_string *component_id = NULL; + uintptr_t sdfw_update_area_addr = 0; + size_t sdfw_update_area_size = 0; + + suit_memory_sdfw_update_area_info_get(&sdfw_update_area_addr, &sdfw_update_area_size); + + if (required_size == 0 || sdfw_update_area_size == 0) { + + LOG_ERR("suit_plat_ipuc_sdfw_mirror_addr, required_size: %d, sdfw_update_area_size " + "%d", + required_size, sdfw_update_area_size); + return 0; + } k_mutex_lock(&ipuc_mutex, K_FOREVER); for (size_t i = 0; i < CONFIG_SUIT_IPUC_SIZE; i++) { - component_id = &components[i].component_id; + struct zcbor_string *component_id = &components[i].component_id; - if (component_id->value != NULL) { + if (component_id->value == NULL) { + continue; + } - suit_component_type_t component_type = SUIT_COMPONENT_TYPE_UNSUPPORTED; + suit_component_type_t component_type = SUIT_COMPONENT_TYPE_UNSUPPORTED; - intptr_t slot_address = 0; - size_t slot_size = 0; + intptr_t slot_address = 0; + size_t slot_size = 0; - if (suit_plat_decode_component_type(component_id, &component_type) != - SUIT_PLAT_SUCCESS || - component_type != SUIT_COMPONENT_TYPE_MEM) { - continue; - } + if (suit_plat_decode_component_type(component_id, &component_type) != + SUIT_PLAT_SUCCESS || + component_type != SUIT_COMPONENT_TYPE_MEM) { + continue; + } - if (suit_plat_decode_address_size(component_id, &slot_address, - &slot_size) != SUIT_PLAT_SUCCESS) { - continue; - } + if (suit_plat_decode_address_size(component_id, &slot_address, &slot_size) != + SUIT_PLAT_SUCCESS) { + continue; + } - if (slot_address == 0 || slot_size < min_size) { - continue; - } + if (slot_address == 0 || slot_size < required_size) { + continue; + } + + uintptr_t adjusted_slot_address = slot_address; - if (suit_memory_global_address_range_is_in_nvm(slot_address, slot_size) == - false) { - /* looking for MRAM - */ + /* Adjusting mirror address if IPUC is located in address lower than + * area acceptable by SDROM + */ + if (slot_address < sdfw_update_area_addr) { + adjusted_slot_address = sdfw_update_area_addr; + size_t shift = (sdfw_update_area_addr - slot_address); + + if (shift + required_size > slot_size) { continue; } + } - /* clang-format off */ - struct arbiter_mem_params_access mem_params = { - .allowed_types = ARBITER_MEM_TYPE(RESERVED, FIXED), - .access = { - .owner = NRF_OWNER_APPLICATION, - .permissions = ARBITER_MEM_PERM(READ), - .address = slot_address, - .size = slot_size, - }, - }; - /* clang-format on */ - - if (arbiter_mem_access_check(&mem_params) == ARBITER_STATUS_OK) { - /* ... belonging to app domain - */ - k_mutex_unlock(&ipuc_mutex); - return component_id; - } + if (adjusted_slot_address + required_size > + sdfw_update_area_addr + sdfw_update_area_size) { + continue; + } - mem_params.access.owner = NRF_OWNER_RADIOCORE; - if (arbiter_mem_access_check(&mem_params) == ARBITER_STATUS_OK) { - /* ... or belonging to radio domain - */ - k_mutex_unlock(&ipuc_mutex); - return component_id; - } + /* clang-format off */ + struct arbiter_mem_params_access mem_params = { + .allowed_types = ARBITER_MEM_TYPE(RESERVED, FIXED), + .access = { + .owner = NRF_OWNER_APPLICATION, + .permissions = ARBITER_MEM_PERM(READ, SECURE), + .address = adjusted_slot_address, + .size = required_size, + }, + }; + /* clang-format on */ + + LOG_INF("Checking IPUC ownership, address: %p, size: %d bytes", + (void *)mem_params.access.address, mem_params.access.size); + + if (arbiter_mem_access_check(&mem_params) == ARBITER_STATUS_OK) { + /* ... belonging to app domain + */ + k_mutex_unlock(&ipuc_mutex); + return adjusted_slot_address; + } + + mem_params.access.owner = NRF_OWNER_RADIOCORE; + if (arbiter_mem_access_check(&mem_params) == ARBITER_STATUS_OK) { + /* ... or belonging to radio domain + */ + k_mutex_unlock(&ipuc_mutex); + return adjusted_slot_address; } } k_mutex_unlock(&ipuc_mutex); - return NULL; + return 0; } diff --git a/sysbuild/CMakeLists.txt b/sysbuild/CMakeLists.txt index fd0966f81b9..fcd3f81e359 100644 --- a/sysbuild/CMakeLists.txt +++ b/sysbuild/CMakeLists.txt @@ -492,8 +492,8 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake) set_config_bool(${DEFAULT_IMAGE} CONFIG_NRF_WIFI_PATCHES_BUILTIN n) endif() - foreach(config NRF700X_SYSTEM_MODE NRF700X_SCAN_ONLY NRF700X_RADIO_TEST - NRF700X_SYSTEM_WITH_RAW_MODES) + foreach(config NRF70_SYSTEM_MODE NRF70_SCAN_ONLY NRF70_RADIO_TEST + NRF70_SYSTEM_WITH_RAW_MODES) if(${SB_CONFIG_WIFI_${config}}) set_config_bool(${DEFAULT_IMAGE} CONFIG_${config} ${SB_CONFIG_WIFI_${config}}) endif() diff --git a/sysbuild/Kconfig.wifi b/sysbuild/Kconfig.wifi index 937166fbed1..6176ad52eb3 100644 --- a/sysbuild/Kconfig.wifi +++ b/sysbuild/Kconfig.wifi @@ -25,6 +25,9 @@ config WIFI_NRF70_SCAN_ONLY help Select this option to enable scan only mode of the nRF700x driver +config WIFI_NRF70_OFFLOADED_RAW_TX + bool "Offloaded raw tx mode of the nRF700x driver" + config WIFI_NRF70_RADIO_TEST bool "Radio test mode of the nRF700x driver" diff --git a/test-manifests/99-default-test-nrf.yml b/test-manifests/99-default-test-nrf.yml index b5fce8359e5..798543b792a 100644 --- a/test-manifests/99-default-test-nrf.yml +++ b/test-manifests/99-default-test-nrf.yml @@ -11,7 +11,7 @@ manifest: - name: test_nrf remote: ncs-test repo-path: test-fw-nrfconnect-nrf - revision: master + revision: v2.8-branch import: name-blocklist: [sdk-nrf] userdata: diff --git a/tests/benchmarks/power_consumption/adc/testcase.yaml b/tests/benchmarks/power_consumption/adc/testcase.yaml index e7517af7dab..5343c12749d 100644 --- a/tests/benchmarks/power_consumption/adc/testcase.yaml +++ b/tests/benchmarks/power_consumption/adc/testcase.yaml @@ -11,7 +11,7 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_adc_54L" benchmarks.power_consumption.adc_nrf54h: integration_platforms: - nrf54h20dk/nrf54h20/cpuapp @@ -21,4 +21,4 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_adc_54H" diff --git a/tests/benchmarks/power_consumption/adc_async/testcase.yaml b/tests/benchmarks/power_consumption/adc_async/testcase.yaml index e22456bfbd5..998539bae13 100644 --- a/tests/benchmarks/power_consumption/adc_async/testcase.yaml +++ b/tests/benchmarks/power_consumption/adc_async/testcase.yaml @@ -11,7 +11,7 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_adc_async_54L" benchmarks.power_consumption.adc_async_nrf54h: integration_platforms: - nrf54h20dk/nrf54h20/cpuapp @@ -21,4 +21,4 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_adc_async_54H" diff --git a/tests/benchmarks/power_consumption/flash/testcase.yaml b/tests/benchmarks/power_consumption/flash/testcase.yaml index 4d49c31adb1..3daeaf2a7d4 100644 --- a/tests/benchmarks/power_consumption/flash/testcase.yaml +++ b/tests/benchmarks/power_consumption/flash/testcase.yaml @@ -11,7 +11,7 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_flash_54L" benchmarks.power_consumption.flash_nrf54h: harness: pytest integration_platforms: @@ -21,4 +21,4 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_flash_54H" diff --git a/tests/benchmarks/power_consumption/gpio/testcase.yaml b/tests/benchmarks/power_consumption/gpio/testcase.yaml index 789663a210a..309086600e5 100644 --- a/tests/benchmarks/power_consumption/gpio/testcase.yaml +++ b/tests/benchmarks/power_consumption/gpio/testcase.yaml @@ -11,7 +11,7 @@ tests: harness_config: fixture: gpio_loopback pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_gpio_54L" benchmarks.power_consumption.gpio_nrf54h: sysbuild: true integration_platforms: @@ -24,4 +24,4 @@ tests: harness_config: fixture: gpio_loopback pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_gpio_and_s2ram" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_gpio_54H" diff --git a/tests/benchmarks/power_consumption/i2c/testcase.yaml b/tests/benchmarks/power_consumption/i2c/testcase.yaml index 3ad31979fe2..cf44c7cfc9b 100644 --- a/tests/benchmarks/power_consumption/i2c/testcase.yaml +++ b/tests/benchmarks/power_consumption/i2c/testcase.yaml @@ -13,7 +13,7 @@ tests: harness_config: fixture: pca63565 pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_i2c_54L" benchmarks.power_consumption.i2c_nrf54h: harness: pytest integration_platforms: @@ -25,4 +25,4 @@ tests: harness_config: fixture: pca63566 pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_i2c_54H" diff --git a/tests/benchmarks/power_consumption/spi/testcase.yaml b/tests/benchmarks/power_consumption/spi/testcase.yaml index 8f388527278..54c302ec8c4 100644 --- a/tests/benchmarks/power_consumption/spi/testcase.yaml +++ b/tests/benchmarks/power_consumption/spi/testcase.yaml @@ -13,7 +13,7 @@ tests: harness_config: fixture: pca63565 pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_spi_54L" benchmarks.power_consumption.spi_nrf54h: harness: pytest integration_platforms: @@ -25,4 +25,4 @@ tests: harness_config: fixture: pca63566 pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_spi_54H" diff --git a/tests/benchmarks/power_consumption/uart_async/testcase.yaml b/tests/benchmarks/power_consumption/uart_async/testcase.yaml index bba2150b6a7..31a3b8f30d5 100644 --- a/tests/benchmarks/power_consumption/uart_async/testcase.yaml +++ b/tests/benchmarks/power_consumption/uart_async/testcase.yaml @@ -11,7 +11,7 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart_async_54L" benchmarks.power_consumption.uart_async_nrf54h: integration_platforms: - nrf54h20dk/nrf54h20/cpuapp @@ -21,4 +21,4 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart_async_54H" diff --git a/tests/benchmarks/power_consumption/uart_polling/testcase.yaml b/tests/benchmarks/power_consumption/uart_polling/testcase.yaml index ab79933a12a..6ed23ce49fd 100644 --- a/tests/benchmarks/power_consumption/uart_polling/testcase.yaml +++ b/tests/benchmarks/power_consumption/uart_polling/testcase.yaml @@ -11,7 +11,7 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart_polling_54L" benchmarks.power_consumption.uart_poll_nrf54h: integration_platforms: - nrf54h20dk/nrf54h20/cpuapp @@ -21,4 +21,4 @@ tests: harness_config: fixture: ppk_power_measure pytest_root: - - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_placeholder" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_thread_suspend_resume_uart_polling_54H" diff --git a/tests/subsys/suit/copy/prj.conf b/tests/subsys/suit/copy/prj.conf index acd58c29c49..13e595fdd97 100644 --- a/tests/subsys/suit/copy/prj.conf +++ b/tests/subsys/suit/copy/prj.conf @@ -26,4 +26,3 @@ CONFIG_FLASH=y CONFIG_FLASH_MAP=y CONFIG_SUIT_IPUC=y -CONFIG_MOCK_SDFW_ARBITER=y diff --git a/tests/subsys/suit/copy/src/main.c b/tests/subsys/suit/copy/src/main.c index b349c2ff800..0c29313fc09 100644 --- a/tests/subsys/suit/copy/src/main.c +++ b/tests/subsys/suit/copy/src/main.c @@ -52,9 +52,6 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_OK) ret = suit_plat_fetch_integrated(src_handle, &source, NULL); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_fetch failed - error %i", ret); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_component_impl_data_get(src_handle, &handle); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_component_impl_data_get failed - error %i", ret); @@ -83,27 +80,20 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_OK) ret = suit_plat_create_component_handle(&valid_dst_component_id, false, &dst_handle); zassert_equal(ret, SUIT_SUCCESS, "create_component_handle failed - error %i", ret); - arbiter_mem_access_check_fake.return_val = ARBITER_STATUS_OK; - arbiter_mem_access_check_fake.call_count = 0; - - struct zcbor_string *ipuc_component_id = suit_plat_find_sdfw_mirror_ipuc(1); - - zassert_is_null(ipuc_component_id, "in-place updateable component found"); + ret = suit_plat_ipuc_write(dst_handle, 0, (uintptr_t)test_data, sizeof(test_data), true); + zassert_equal(ret, SUIT_PLAT_ERR_NOT_FOUND, "in-place updateable component found"); ret = suit_plat_ipuc_declare(dst_handle); - zassert_equal(ret, SUIT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); - ipuc_component_id = suit_plat_find_sdfw_mirror_ipuc(1); - zassert_not_null(ipuc_component_id, "in-place updateable component not found"); + ret = suit_plat_ipuc_write(dst_handle, 0, (uintptr_t)test_data, sizeof(test_data), true); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "cannot write to in-place updateable component"); ret = suit_plat_copy(dst_handle, src_handle, NULL); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_copy failed - error %i", ret); - ipuc_component_id = suit_plat_find_sdfw_mirror_ipuc(1); - zassert_is_null(ipuc_component_id, "in-place updateable component found"); - - zassert_equal(arbiter_mem_access_check_fake.call_count, 1, - "Incorrect number of arbiter_mem_access_check() calls"); + ret = suit_plat_ipuc_write(dst_handle, 0, (uintptr_t)test_data, sizeof(test_data), true); + zassert_equal(ret, SUIT_PLAT_ERR_NOT_FOUND, "in-place updateable component found"); ret = suit_plat_release_component_handle(dst_handle); zassert_equal(ret, SUIT_SUCCESS, "dst_handle release failed - error %i", ret); @@ -139,9 +129,6 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_dst_hand ret = suit_plat_fetch_integrated(src_handle, &source, NULL); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_fetch failed - error %i", ret); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_component_impl_data_get(src_handle, &handle); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_component_impl_data_get failed - error %i", ret); @@ -177,9 +164,6 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_dst_hand zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_copy should have failed - dst_handle released"); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(src_handle); zassert_equal(ret, SUIT_SUCCESS, "src_handle release failed - error %i", ret); @@ -210,9 +194,6 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_src_hand ret = suit_plat_fetch_integrated(src_handle, &source, NULL); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_fetch failed - error %i", ret); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_component_impl_data_get(src_handle, &handle); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_component_impl_data_get failed - error %i", ret); @@ -248,9 +229,6 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_src_hand zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_copy should have failed - src_handle released"); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(dst_handle); zassert_equal(ret, SUIT_SUCCESS, "src_handle release failed - error %i", ret); @@ -292,9 +270,6 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_memptr_e ret = suit_plat_copy(dst_handle, src_handle, NULL); zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_copy should have failed - memptr empty"); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(dst_handle); zassert_equal(ret, SUIT_SUCCESS, "dst_handle release failed - error %i", ret); diff --git a/tests/subsys/suit/fetch/prj.conf b/tests/subsys/suit/fetch/prj.conf index 8ed7bc2e9ca..36e16b17990 100644 --- a/tests/subsys/suit/fetch/prj.conf +++ b/tests/subsys/suit/fetch/prj.conf @@ -28,4 +28,3 @@ CONFIG_FLASH=y CONFIG_FLASH_MAP=y CONFIG_SUIT_IPUC=y -CONFIG_MOCK_SDFW_ARBITER=y diff --git a/tests/subsys/suit/fetch/src/main.c b/tests/subsys/suit/fetch/src/main.c index 1ba05b46649..a1cd5d05390 100644 --- a/tests/subsys/suit/fetch/src/main.c +++ b/tests/subsys/suit/fetch/src/main.c @@ -104,28 +104,20 @@ ZTEST(fetch_tests, test_integrated_fetch_to_msink_OK) int ret = suit_plat_create_component_handle(&valid_dst_component_id, false, &dst_handle); zassert_equal(ret, SUIT_SUCCESS, "create_component_handle failed - error %i", ret); - - arbiter_mem_access_check_fake.return_val = ARBITER_STATUS_OK; - arbiter_mem_access_check_fake.call_count = 0; - - struct zcbor_string *ipuc_component_id = suit_plat_find_sdfw_mirror_ipuc(1); - - zassert_is_null(ipuc_component_id, "in-place updateable component found"); + ret = suit_plat_ipuc_write(dst_handle, 0, (uintptr_t)test_data, sizeof(test_data), true); + zassert_equal(ret, SUIT_PLAT_ERR_NOT_FOUND, "in-place updateable component found"); ret = suit_plat_ipuc_declare(dst_handle); - zassert_equal(ret, SUIT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); - ipuc_component_id = suit_plat_find_sdfw_mirror_ipuc(1); - zassert_not_null(ipuc_component_id, "in-place updateable component not found"); + ret = suit_plat_ipuc_write(dst_handle, 0, (uintptr_t)test_data, sizeof(test_data), true); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "cannot write to in-place updateable component"); ret = suit_plat_fetch_integrated(dst_handle, &source, NULL); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_fetch failed - error %i", ret); - ipuc_component_id = suit_plat_find_sdfw_mirror_ipuc(1); - zassert_is_null(ipuc_component_id, "in-place updateable component found"); - - zassert_equal(arbiter_mem_access_check_fake.call_count, 1, - "Incorrect number of arbiter_mem_access_check() calls"); + ret = suit_plat_ipuc_write(dst_handle, 0, (uintptr_t)test_data, sizeof(test_data), true); + zassert_equal(ret, SUIT_PLAT_ERR_NOT_FOUND, "in-place updateable component found"); ret = suit_plat_release_component_handle(dst_handle); zassert_equal(ret, SUIT_SUCCESS, "dst_handle release failed - error %i", ret); @@ -152,9 +144,6 @@ ZTEST(fetch_tests, test_integrated_fetch_to_memptr_OK) ret = suit_plat_fetch_integrated(component_handle, &source, NULL); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_fetch failed - error %i", ret); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_component_impl_data_get(component_handle, &handle); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_component_impl_data_get failed - error %i", ret); @@ -196,9 +185,6 @@ ZTEST(fetch_tests, test_fetch_to_memptr_OK) ret = suit_plat_fetch(component_handle, &uri, NULL); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_fetch failed - error %i", ret); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(component_handle); zassert_equal(ret, SUIT_SUCCESS, "Handle release failed - error %i", ret); @@ -229,9 +215,6 @@ ZTEST(fetch_tests, test_fetch_to_memptr_NOK_uri_not_in_cache) zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_fetch should fail - supplied uri is not in cache", ret); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(component_handle); zassert_equal(ret, SUIT_SUCCESS, "Handle release failed - error %i", ret); @@ -262,9 +245,6 @@ ZTEST(fetch_tests, test_fetch_to_memptr_NOK_invalid_component_id) zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_fetch should have failed - invalid component_id"); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(component_handle); zassert_equal(ret, SUIT_SUCCESS, "Handle release failed - error %i", ret); @@ -292,9 +272,6 @@ ZTEST(fetch_tests, test_integrated_fetch_to_memptr_NOK_data_ptr_NULL) zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_fetch should have failed - NULL data pointer"); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(component_handle); zassert_equal(ret, SUIT_SUCCESS, "Handle release failed - error %i", ret); } @@ -319,9 +296,6 @@ ZTEST(fetch_tests, test_integrated_fetch_to_memptr_NOK_data_size_zero) ret = suit_plat_fetch_integrated(component_handle, &source, NULL); zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_fetch should have failed - data size 0"); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(component_handle); zassert_equal(ret, SUIT_SUCCESS, "Handle release failed - error %i", ret); } @@ -346,9 +320,6 @@ ZTEST(fetch_tests, test_integrated_fetch_to_memptr_NOK_handle_NULL) ret = suit_plat_fetch_integrated(component_handle, &source, NULL); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_fetch failed - error %i", ret); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - const uint8_t *payload; size_t payload_size = 0; diff --git a/tests/subsys/suit/ipuc/CMakeLists.txt b/tests/subsys/suit/ipuc/CMakeLists.txt new file mode 100644 index 00000000000..fef75bbbf68 --- /dev/null +++ b/tests/subsys/suit/ipuc/CMakeLists.txt @@ -0,0 +1,21 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) + +project(integration_test_ipuc) +include(../cmake/test_template.cmake) + +target_compile_options(suit_memory_layout_interface INTERFACE -DSDFW_UPDATE_AREA_ADDR=0x1000) +target_compile_options(suit_memory_layout_interface INTERFACE -DSDFW_UPDATE_AREA_SIZE=0xFFFFE000) + +zephyr_library_link_libraries(suit) +zephyr_library_link_libraries(suit_platform_interface) +zephyr_library_link_libraries(suit_memptr_storage_interface) +zephyr_library_link_libraries(suit_sink_selector_interface) +zephyr_library_link_libraries(suit_memory_layout_interface) diff --git a/tests/subsys/suit/ipuc/Kconfig b/tests/subsys/suit/ipuc/Kconfig new file mode 100644 index 00000000000..3f9efe4e184 --- /dev/null +++ b/tests/subsys/suit/ipuc/Kconfig @@ -0,0 +1,10 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Include and define MOCK_* Kconfigs +rsource "../mocks/Kconfig" + +source "Kconfig.zephyr" diff --git a/tests/subsys/suit/ipuc/boards/native_posix.conf b/tests/subsys/suit/ipuc/boards/native_posix.conf new file mode 100644 index 00000000000..70a0fa912cb --- /dev/null +++ b/tests/subsys/suit/ipuc/boards/native_posix.conf @@ -0,0 +1,8 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y diff --git a/tests/subsys/suit/ipuc/boards/native_posix.overlay b/tests/subsys/suit/ipuc/boards/native_posix.overlay new file mode 100644 index 00000000000..c79b0b9b9a3 --- /dev/null +++ b/tests/subsys/suit/ipuc/boards/native_posix.overlay @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +&flash0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* Use the last 8KB of NVM as dfu_partition. */ + dfu_partition: partition@fe000 { + reg = <0xfe000 DT_SIZE_K(8)>; + }; + }; +}; + +/ { + sram0: memory@20000000 { + compatible = "mmio-sram"; + reg = <0x20000000 DT_SIZE_K(256)>; + }; +}; diff --git a/tests/subsys/suit/ipuc/prj.conf b/tests/subsys/suit/ipuc/prj.conf new file mode 100644 index 00000000000..5f9bed4472a --- /dev/null +++ b/tests/subsys/suit/ipuc/prj.conf @@ -0,0 +1,29 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_ZTEST=y + +CONFIG_SUIT=y +CONFIG_SUIT_PROCESSOR=y +CONFIG_SUIT_PLATFORM=y + +CONFIG_SUIT_STREAM=y +CONFIG_SUIT_SINK_SELECTOR=y +CONFIG_SUIT_STREAM_SOURCE_MEMPTR=y +CONFIG_SUIT_STREAM_SINK_FLASH=y +CONFIG_SUIT_STREAM_SINK_MEMPTR=y + +CONFIG_SUIT_UTILS=y +CONFIG_SUIT_MEMPTR_STORAGE=y + +CONFIG_ZCBOR=y +CONFIG_ZCBOR_CANONICAL=y + +CONFIG_FLASH=y +CONFIG_FLASH_MAP=y + +CONFIG_SUIT_IPUC=y +CONFIG_MOCK_SDFW_ARBITER=y diff --git a/tests/subsys/suit/ipuc/src/main.c b/tests/subsys/suit/ipuc/src/main.c new file mode 100644 index 00000000000..ed897491152 --- /dev/null +++ b/tests/subsys/suit/ipuc/src/main.c @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static uint8_t test_data[] = {0, 1, 2, 3, 4, 5, 6, 7}; + +static suit_component_t ipuc_handle; +/* [h'MEM', h'02', h'1A00080000', h'191000'] */ +static uint8_t ipuc_component_id_bstr[] = {0x84, 0x44, 0x63, 'M', 'E', 'M', 0x41, 0x02, 0x45, + 0x1A, 0x00, 0x08, 0x00, 0x00, 0x43, 0x19, 0x10, 0x00}; + +static struct zcbor_string ipuc_component_id = { + .value = ipuc_component_id_bstr, + .len = sizeof(ipuc_component_id_bstr), +}; + +static void test_before(void *data) +{ + /* Reset mocks */ + mocks_reset(); + + /* Reset common FFF internal structures */ + FFF_RESET_HISTORY(); + + int ret = suit_plat_create_component_handle(&ipuc_component_id, false, &ipuc_handle); + + zassert_equal(ret, SUIT_SUCCESS, "suit_plat_create_component_handle failed - error %i", + ret); + + suit_plat_ipuc_revoke(ipuc_handle); +} + +static void test_after(void *data) +{ + int ret = suit_plat_release_component_handle(ipuc_handle); + + zassert_equal(ret, SUIT_SUCCESS, "suit_plat_release_component_handle failed - error %i", + ret); +} + +ZTEST_SUITE(ipuc_tests, NULL, NULL, test_before, test_after, NULL); + +ZTEST(ipuc_tests, test_ipuc_revoke_OK) +{ + suit_plat_err_t ret = SUIT_PLAT_SUCCESS; + + ret = suit_plat_ipuc_declare(ipuc_handle); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); + + ret = suit_plat_ipuc_revoke(ipuc_handle); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_revoke failed - error %i", ret); + + ret = suit_plat_ipuc_revoke(ipuc_handle); + zassert_equal(ret, SUIT_PLAT_ERR_NOT_FOUND, "suit_plat_ipuc_revoke failed - error %i", ret); +} + +ZTEST(ipuc_tests, test_ipuc_copy_OK) +{ + suit_plat_err_t ret = SUIT_PLAT_SUCCESS; + + ret = suit_plat_ipuc_declare(ipuc_handle); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); + + size_t offset = 0; + bool last_chunk = false; + + ret = suit_plat_ipuc_write(ipuc_handle, offset, (uintptr_t)test_data, sizeof(test_data), + last_chunk); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_write failed - error %i", ret); + + offset += sizeof(test_data); + last_chunk = true; + ret = suit_plat_ipuc_write(ipuc_handle, offset, (uintptr_t)test_data, sizeof(test_data), + last_chunk); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_write failed - error %i", ret); + + offset += sizeof(test_data); + size_t stored_img_size = 0; + + ret = suit_plat_ipuc_get_stored_img_size(ipuc_handle, &stored_img_size); + zassert_equal(ret, SUIT_PLAT_SUCCESS, + "suit_plat_ipuc_get_stored_img_size failed - error %i", ret); + zassert_equal(stored_img_size, offset, "incorrect stored image size"); + + /* Let's write again + */ + offset = 0; + last_chunk = true; + ret = suit_plat_ipuc_write(ipuc_handle, offset, (uintptr_t)test_data, sizeof(test_data), + last_chunk); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_write failed - error %i", ret); + + offset += sizeof(test_data); + stored_img_size = 0; + ret = suit_plat_ipuc_get_stored_img_size(ipuc_handle, &stored_img_size); + zassert_equal(ret, SUIT_PLAT_SUCCESS, + "suit_plat_ipuc_get_stored_img_size failed - error %i", ret); + zassert_equal(stored_img_size, offset, "incorrect stored image size"); +} + +ZTEST(ipuc_tests, test_ipuc_copy_NOK_not_declared) +{ + suit_plat_err_t ret = SUIT_PLAT_SUCCESS; + size_t offset = 0; + bool last_chunk = false; + + ret = suit_plat_ipuc_write(ipuc_handle, offset, (uintptr_t)test_data, sizeof(test_data), + last_chunk); + zassert_equal(ret, SUIT_PLAT_ERR_NOT_FOUND, "suit_plat_ipuc_write failed - error %i", ret); +} + +ZTEST(ipuc_tests, test_ipuc_copy_NOK_wrong_offset) +{ + suit_plat_err_t ret = SUIT_PLAT_SUCCESS; + + ret = suit_plat_ipuc_declare(ipuc_handle); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); + + size_t offset = sizeof(test_data); + bool last_chunk = false; + + ret = suit_plat_ipuc_write(ipuc_handle, offset, (uintptr_t)test_data, sizeof(test_data), + last_chunk); + zassert_equal(ret, SUIT_PLAT_ERR_INCORRECT_STATE, "suit_plat_ipuc_write failed - error %i", + ret); +} + +ZTEST(ipuc_tests, test_ipuc_copy_NOK_wrong_state_write_in_progress) +{ + suit_plat_err_t ret = SUIT_PLAT_SUCCESS; + + ret = suit_plat_ipuc_declare(ipuc_handle); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); + + size_t stored_img_size = 0; + + ret = suit_plat_ipuc_get_stored_img_size(ipuc_handle, &stored_img_size); + zassert_equal(ret, SUIT_PLAT_ERR_INCORRECT_STATE, + "suit_plat_ipuc_get_stored_img_size failed - error %i", ret); + + size_t offset = 0; + bool last_chunk = true; + + ret = suit_plat_ipuc_write(ipuc_handle, offset, 0, 0, last_chunk); + + stored_img_size = 0; + ret = suit_plat_ipuc_get_stored_img_size(ipuc_handle, &stored_img_size); + zassert_equal(ret, SUIT_PLAT_SUCCESS, + "suit_plat_ipuc_get_stored_img_size failed - error %i", ret); + zassert_equal(stored_img_size, offset, "incorrect stored image size"); + + offset = sizeof(test_data); + ret = suit_plat_ipuc_write(ipuc_handle, offset, (uintptr_t)test_data, sizeof(test_data), + last_chunk); + + zassert_equal(ret, SUIT_PLAT_ERR_INCORRECT_STATE, "suit_plat_ipuc_write failed - error %i", + ret); +} + +ZTEST(ipuc_tests, test_ipuc_sdfw_mirror_OK) +{ + suit_plat_err_t ret = SUIT_PLAT_SUCCESS; + + ret = suit_plat_ipuc_declare(ipuc_handle); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); + + uintptr_t sdfw_update_area_addr = 0; + size_t sdfw_update_area_size = 0; + + suit_memory_sdfw_update_area_info_get(&sdfw_update_area_addr, &sdfw_update_area_size); + + zassert_not_equal(sdfw_update_area_size, 0, ""); + + arbiter_mem_access_check_fake.return_val = ARBITER_STATUS_OK; + arbiter_mem_access_check_fake.call_count = 0; + + uintptr_t mirror_addr = suit_plat_ipuc_sdfw_mirror_addr(16); + + zassert_between_inclusive(mirror_addr, sdfw_update_area_addr, + sdfw_update_area_addr + sdfw_update_area_size, ""); + + zassert_equal(arbiter_mem_access_check_fake.call_count, 1, + "Incorrect number of arbiter_mem_access_check() calls"); + + ret = suit_plat_ipuc_revoke(ipuc_handle); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_revoke failed - error %i", ret); + + mirror_addr = suit_plat_ipuc_sdfw_mirror_addr(16); + + zassert_equal(mirror_addr, 0, "valid mirror_addr after suit_plat_ipuc_revoke() call"); +} diff --git a/tests/subsys/suit/ipuc/testcase.yaml b/tests/subsys/suit/ipuc/testcase.yaml new file mode 100644 index 00000000000..dfca29c3716 --- /dev/null +++ b/tests/subsys/suit/ipuc/testcase.yaml @@ -0,0 +1,6 @@ +tests: + suit-platform.integration.ipuc: + platform_allow: native_posix + tags: suit_platform suit ci_tests_subsys_suit + integration_platforms: + - native_posix diff --git a/tests/subsys/suit/write/prj.conf b/tests/subsys/suit/write/prj.conf index c214c052c41..6700b234fb3 100644 --- a/tests/subsys/suit/write/prj.conf +++ b/tests/subsys/suit/write/prj.conf @@ -27,4 +27,3 @@ CONFIG_FLASH=y CONFIG_FLASH_MAP=y CONFIG_SUIT_IPUC=y -CONFIG_MOCK_SDFW_ARBITER=y diff --git a/tests/subsys/suit/write/src/main.c b/tests/subsys/suit/write/src/main.c index 4e695687ea3..cc77164a673 100644 --- a/tests/subsys/suit/write/src/main.c +++ b/tests/subsys/suit/write/src/main.c @@ -52,28 +52,20 @@ ZTEST(write_tests, test_write_to_flash_sink_OK) int ret = suit_plat_create_component_handle(&valid_dst_component_id, false, &dst_handle); zassert_equal(ret, SUIT_SUCCESS, "create_component_handle failed - error %i", ret); - - arbiter_mem_access_check_fake.return_val = ARBITER_STATUS_OK; - arbiter_mem_access_check_fake.call_count = 0; - - struct zcbor_string *ipuc_component_id = suit_plat_find_sdfw_mirror_ipuc(1); - - zassert_is_null(ipuc_component_id, "in-place updateable component found"); + ret = suit_plat_ipuc_write(dst_handle, 0, (uintptr_t)test_data, sizeof(test_data), true); + zassert_equal(ret, SUIT_PLAT_ERR_NOT_FOUND, "in-place updateable component found"); ret = suit_plat_ipuc_declare(dst_handle); - zassert_equal(ret, SUIT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "suit_plat_ipuc_declare failed - error %i", ret); - ipuc_component_id = suit_plat_find_sdfw_mirror_ipuc(1); - zassert_not_null(ipuc_component_id, "in-place updateable component not found"); + ret = suit_plat_ipuc_write(dst_handle, 0, (uintptr_t)test_data, sizeof(test_data), true); + zassert_equal(ret, SUIT_PLAT_SUCCESS, "cannot write to in-place updateable component"); ret = suit_plat_write(dst_handle, &source, NULL); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_write failed - error %i", ret); - ipuc_component_id = suit_plat_find_sdfw_mirror_ipuc(1); - zassert_is_null(ipuc_component_id, "in-place updateable component found"); - - zassert_equal(arbiter_mem_access_check_fake.call_count, 1, - "Incorrect number of arbiter_mem_access_check() calls"); + ret = suit_plat_ipuc_write(dst_handle, 0, (uintptr_t)test_data, sizeof(test_data), true); + zassert_equal(ret, SUIT_PLAT_ERR_NOT_FOUND, "in-place updateable component found"); ret = suit_plat_release_component_handle(dst_handle); zassert_equal(ret, SUIT_SUCCESS, "dst_handle release failed - error %i", ret); @@ -103,9 +95,6 @@ ZTEST(write_tests, test_write_to_ram_sink_OK) ret = suit_plat_write(dst_handle, &source, NULL); zassert_equal(ret, SUIT_SUCCESS, "suit_plat_write failed - error %i", ret); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(dst_handle); zassert_equal(ret, SUIT_SUCCESS, "dst_handle release failed - error %i", ret); zassert_mem_equal(RAM_WRITE_ADDR, test_data, sizeof(test_data), @@ -134,9 +123,6 @@ ZTEST(write_tests, test_write_flash_sink_NOK_size_not_aligned) ret = suit_plat_write(dst_handle, &source, NULL); zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_write should have failed on erase"); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(dst_handle); zassert_equal(ret, SUIT_SUCCESS, "dst_handle release failed - error %i", ret); } @@ -150,9 +136,6 @@ ZTEST(write_tests, test_write_flash_sink_NOK_handle_released) int ret = suit_plat_write(dst_handle, &source, NULL); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_write should have failed - invalid handle"); } @@ -176,9 +159,6 @@ ZTEST(write_tests, test_write_to_flash_sink_NOK_source_null) ret = suit_plat_write(dst_handle, NULL, NULL); zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_write should have failed - source null"); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(dst_handle); zassert_equal(ret, SUIT_SUCCESS, "dst_handle release failed - error %i", ret); } @@ -206,9 +186,6 @@ ZTEST(write_tests, test_write_to_flash_sink_NOK_source_value_null) zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_write should have failed - source value null"); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(dst_handle); zassert_equal(ret, SUIT_SUCCESS, "dst_handle release failed - error %i", ret); } @@ -235,9 +212,6 @@ ZTEST(write_tests, test_write_to_flash_sink_NOK_source_len_0) ret = suit_plat_write(dst_handle, &source, NULL); zassert_not_equal(ret, SUIT_SUCCESS, "suit_plat_write should have failed - source len 0"); - zassert_equal(arbiter_mem_access_check_fake.call_count, 0, - "Incorrect number of arbiter_mem_access_check() calls"); - ret = suit_plat_release_component_handle(dst_handle); zassert_equal(ret, SUIT_SUCCESS, "dst_handle release failed - error %i", ret); } diff --git a/west.yml b/west.yml index 8ca8aec83ad..5b999a0cfc1 100644 --- a/west.yml +++ b/west.yml @@ -72,7 +72,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: v3.7.99-ncs1-rc1 + revision: 3446d997d56f304192de33b297dbd291ef9b99d5 import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above @@ -149,7 +149,7 @@ manifest: - name: nrfxlib repo-path: sdk-nrfxlib path: nrfxlib - revision: v2.8.0-rc1 + revision: 673c2dd895dde6d54d2776e63e66ee1417a096b3 - name: trusted-firmware-m repo-path: sdk-trusted-firmware-m path: modules/tee/tf-m/trusted-firmware-m