Skip to content

Commit

Permalink
samples: Re-add board support in Wi-Fi and NET samples
Browse files Browse the repository at this point in the history
Re-add board support in Wi-Fi and NET samples that was removed
in the last upmerge.
  • Loading branch information
simensrostad committed Oct 22, 2024
1 parent 55a0c3c commit 4171815
Show file tree
Hide file tree
Showing 26 changed files with 194 additions and 33 deletions.
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
21 changes: 21 additions & 0 deletions samples/net/coap_client/boards/thingy91x_nrf9151_ns.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Configuration file for Thingy:91X
# This file is merged with prj.conf in the application folder, and options
# set here will take precedence if they are present in both files.

# General
CONFIG_HW_ID_LIBRARY_SOURCE_IMEI=y

# Disable Duplicate Address Detection (DAD)
# due to not being properly implemented for offloaded interfaces.
CONFIG_NET_IPV6_NBR_CACHE=n
CONFIG_NET_IPV6_MLD=n

# Zephyr NET Connection Manager and Connectivity layer.
CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=1024
CONFIG_NRF_MODEM_LIB_NET_IF=y
4 changes: 4 additions & 0 deletions samples/net/coap_client/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ 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
tags: ci_build sysbuild ci_samples_net
9 changes: 5 additions & 4 deletions samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf
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,6 +37,7 @@ 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
Expand Down
24 changes: 24 additions & 0 deletions samples/net/http_server/boards/thingy91x_nrf9151_ns.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Configuration file for Thingy:91X
# This file is merged with prj.conf in the application folder, and options
# set here will take precedence if they are present in both files.

# General
CONFIG_PICOLIBC=y

# Disable Duplicate Address Detection (DAD)
# due to not being properly implemented for offloaded interfaces.
CONFIG_NET_IPV6_NBR_CACHE=n
CONFIG_NET_IPV6_MLD=n

# Zephyr NET Connection Manager and Connectivity layer.
CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=1024
CONFIG_NRF_MODEM_LIB_NET_IF=y

# Disable PSM to make sure that the server is always available.
CONFIG_LTE_PSM_REQ=n
8 changes: 8 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 All @@ -20,11 +24,13 @@ tests:
- nrf9151dk/nrf9151/ns
- nrf9160dk/nrf9160/ns
- thingy91/nrf9160/ns
- thingy91x/nrf9151/ns
platform_allow:
- nrf9161dk/nrf9161/ns
- nrf9151dk/nrf9151/ns
- nrf9160dk/nrf9160/ns
- thingy91/nrf9160/ns
- thingy91x/nrf9151/ns
tags: ci_build sysbuild ci_samples_net
sample.net.http_server.lte.tls:
sysbuild: true
Expand All @@ -34,11 +40,13 @@ tests:
- nrf9151dk/nrf9151/ns
- nrf9160dk/nrf9160/ns
- thingy91/nrf9160/ns
- thingy91x/nrf9151/ns
platform_allow:
- nrf9161dk/nrf9161/ns
- nrf9151dk/nrf9151/ns
- nrf9160dk/nrf9160/ns
- thingy91/nrf9160/ns
- thingy91x/nrf9151/ns
extra_args: OVERLAY_CONFIG=overlay-tls-nrf91.conf
tags: ci_build sysbuild ci_samples_net
sample.net.http_server.emulation:
Expand Down
Loading

0 comments on commit 4171815

Please sign in to comment.