Skip to content

Commit

Permalink
samples: net: aws_iot: Add support for nRF54L15 DK + nRF7002
Browse files Browse the repository at this point in the history
Adds support for nRF54L15 DK in combination with nRF7002 EK.

Signed-off-by: Jan Tore Guggedal <[email protected]>
  • Loading branch information
jtguggedal authored and rlubos committed Oct 25, 2024
1 parent 92b7c89 commit 088bd54
Show file tree
Hide file tree
Showing 13 changed files with 225 additions and 31 deletions.
20 changes: 0 additions & 20 deletions doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -654,26 +654,6 @@ Networking samples

* Fixed not to fail with a fatal error if IPv4 or IPv6 server setup fails.

* :ref:`download_client` sample:

* Added support for the :ref:`zephyr:nrf54l15dk_nrf54l15` board in combination with an nRF7002-based shield.

* :ref:`mqtt_sample` sample:

* Added support for the :ref:`zephyr:nrf54l15dk_nrf54l15` board in combination with an nRF7002-based shield.

* :ref:`https_client` sample:

* Added support for the :ref:`zephyr:nrf54l15dk_nrf54l15` board in combination with an nRF7002-based shield.

* :ref:`udp_sample`: sample:

* Added support for the :ref:`zephyr:nrf54l15dk_nrf54l15` board in combination with an nRF7002-based shield.

* :ref:`net_coap_client_sample` sample:

* Added support for the :ref:`zephyr:nrf54l15dk_nrf54l15` board in combination with an nRF7002-based shield.

NFC samples
-----------

Expand Down
4 changes: 2 additions & 2 deletions samples/net/aws_iot/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 2 additions & 1 deletion samples/net/aws_iot/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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®
Expand Down Expand Up @@ -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:
Expand Down
89 changes: 89 additions & 0 deletions samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.conf
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay
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
*/

&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)>;
};
10 changes: 10 additions & 0 deletions samples/net/aws_iot/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ tests:
- 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"
6 changes: 6 additions & 0 deletions samples/net/aws_iot/sysbuild/mcuboot/app.overlay
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
chosen {
zephyr,code-partition = &boot_partition;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
23 changes: 15 additions & 8 deletions samples/net/aws_iot/sysbuild/mcuboot/prj.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

0 comments on commit 088bd54

Please sign in to comment.