Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add support in Wi-Fi and NET samples that was removed #17922

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions applications/asset_tracker_v2/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
10 changes: 10 additions & 0 deletions samples/debug/memfault/Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -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"
35 changes: 16 additions & 19 deletions samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions samples/debug/memfault/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# General config
CONFIG_FPU=y
CONFIG_ASSERT=y

# Logging
CONFIG_LOG=y
Expand Down
3 changes: 3 additions & 0 deletions samples/debug/memfault/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
5 changes: 3 additions & 2 deletions samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions samples/net/aws_iot/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ tests:
- nrf9161dk/nrf9161/ns
- 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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions samples/net/azure_iot_hub/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# General config
CONFIG_REBOOT=y
CONFIG_ASSERT=y

# Logging
CONFIG_LOG=y
Expand Down
4 changes: 4 additions & 0 deletions samples/net/azure_iot_hub/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions samples/net/coap_client/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions samples/net/download/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -23,8 +25,10 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions samples/net/http_server/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions samples/net/https_client/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions samples/net/mqtt/overlay-tls-nrf70.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading
Loading