diff --git a/samples/net/aws_iot/Kconfig.sysbuild b/samples/net/aws_iot/Kconfig.sysbuild index 0dd915f9333..a5f5c082ad7 100644 --- a/samples/net/aws_iot/Kconfig.sysbuild +++ b/samples/net/aws_iot/Kconfig.sysbuild @@ -9,6 +9,9 @@ choice BOOTLOADER endchoice config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY - default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS + default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || BOARD_NRF54L15PDK_NRF54L15_CPUAPP + +config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK + default y if BOARD_NRF54L15PDK_NRF54L15_CPUAPP source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/samples/net/aws_iot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/net/aws_iot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf new file mode 100644 index 00000000000..a0b9b420de4 --- /dev/null +++ b/samples/net/aws_iot/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -0,0 +1,117 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +# Wi-Fi +CONFIG_WIFI=y +CONFIG_WIFI_NRF700X=y + +# WPA supplicant +CONFIG_WPA_SUPP=y +CONFIG_WPA_SUPP_LOG_LEVEL_INF=y +CONFIG_NET_L2_WIFI_SHELL=y + +# Networking +CONFIG_NET_L2_ETHERNET=y +CONFIG_NETWORKING=y +CONFIG_NET_SOCKETS=y +CONFIG_NET_IPV6=y +CONFIG_NET_IPV4=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 + +# Below section is the primary contributor to SRAM and is currently +# 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_NRF700X_RX_NUM_BUFS=16 +CONFIG_NRF700X_MAX_TX_AGGREGATION=4 +# nRF700x is main consumer: (16 + 8) * 1600 = ~40KB + ~40KB control path (experimental) +CONFIG_NET_TC_TX_COUNT=1 + +# MQTT +CONFIG_MQTT_HELPER_PROVISION_CERTIFICATES=y + +# Kernel options +CONFIG_REBOOT=y +CONFIG_POSIX_API=y +CONFIG_POSIX_MAX_FDS=25 + +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_CMDS_RESIZE=n + +# Logging +CONFIG_NET_CONFIG_AUTO_INIT=n + +# TLS +CONFIG_NET_SOCKETS_SOCKOPT_TLS=y +CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=2 +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=4096 +CONFIG_NET_TX_STACK_SIZE=2048 +CONFIG_NET_RX_STACK_SIZE=2048 +CONFIG_NET_MGMT_EVENT_STACK_SIZE=1024 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2300 +CONFIG_NRF700X_IRQ_WQ_STACK_SIZE=1024 +CONFIG_NRF700X_BH_WQ_STACK_SIZE=2300 +CONFIG_MQTT_HELPER_STACK_SIZE=4096 +CONFIG_SHELL_STACK_SIZE=4400 + +# Heap sizes +CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=21808 +CONFIG_MBEDTLS_HEAP_SIZE=54920 +CONFIG_HEAP_MEM_POOL_SIZE=80000 + +# Bootloader requirements +CONFIG_BOOTLOADER_MCUBOOT=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y +CONFIG_STREAM_FLASH=y +CONFIG_STREAM_FLASH_ERASE=y +CONFIG_IMG_MANAGER=y +CONFIG_MCUBOOT_IMG_MANAGER=y +CONFIG_FW_INFO_OFFSET=0x800 + +# AWS FOTA +CONFIG_AWS_FOTA=y +CONFIG_FOTA_DOWNLOAD=y +CONFIG_DFU_TARGET=y + +# Download client (needed by AWS FOTA) +CONFIG_DOWNLOAD_CLIENT=y +CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096 +CONFIG_DOWNLOAD_CLIENT_BUF_SIZE=4096 +CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_4096=y + +# Disable connection manager +CONFIG_NET_CONNECTION_MANAGER=n diff --git a/samples/net/aws_iot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay b/samples/net/aws_iot/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay new file mode 100644 index 00000000000..2dabe38016f --- /dev/null +++ b/samples/net/aws_iot/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/prj.conf b/samples/net/aws_iot/prj.conf index 2236bd60582..89f1684fab6 100644 --- a/samples/net/aws_iot/prj.conf +++ b/samples/net/aws_iot/prj.conf @@ -25,8 +25,8 @@ CONFIG_NET_CONNECTION_MANAGER=y # AWS IoT library CONFIG_AWS_IOT=y -CONFIG_AWS_IOT_CLIENT_ID_STATIC="my-thing" -CONFIG_AWS_IOT_BROKER_HOST_NAME="xxx.amazonaws.com" +CONFIG_AWS_IOT_BROKER_HOST_NAME="" +CONFIG_AWS_IOT_CLIENT_ID_STATIC="" CONFIG_AWS_IOT_TOPIC_UPDATE_DELTA_SUBSCRIBE=y CONFIG_AWS_IOT_TOPIC_GET_ACCEPTED_SUBSCRIBE=y CONFIG_AWS_IOT_TOPIC_GET_REJECTED_SUBSCRIBE=y diff --git a/samples/net/aws_iot/src/main.c b/samples/net/aws_iot/src/main.c index 4ea49732b06..e7ce29283da 100644 --- a/samples/net/aws_iot/src/main.c +++ b/samples/net/aws_iot/src/main.c @@ -9,16 +9,33 @@ #include #include #include -#include -#include #include #include #include #include #include +#include +#include +#include +#include +#include #include "json_payload.h" +#define WIFI_MGMT_EVENTS (NET_EVENT_WIFI_CONNECT_RESULT | \ + NET_EVENT_WIFI_DISCONNECT_RESULT) + +#define WPA_SUPP_EVENTS (NET_EVENT_WPA_SUPP_READY) + +static struct net_mgmt_event_callback net_l2_mgmt_cb; +static struct net_mgmt_event_callback net_wpa_supp_cb; +int connection_status; + +K_SEM_DEFINE(wpa_supp_ready_sem, 0, 1); + +/* Store a local reference to the connection binding */ +static struct net_if *wifi_iface; + /* Register log module */ LOG_MODULE_REGISTER(aws_iot_sample, CONFIG_AWS_IOT_SAMPLE_LOG_LEVEL); @@ -47,12 +64,10 @@ static char hw_id[HW_ID_LEN]; /* Forward declarations. */ static void shadow_update_work_fn(struct k_work *work); -static void connect_work_fn(struct k_work *work); static void aws_iot_event_handler(const struct aws_iot_evt *const evt); /* Work items used to control some aspects of the sample. */ static K_WORK_DELAYABLE_DEFINE(shadow_update_work, shadow_update_work_fn); -static K_WORK_DELAYABLE_DEFINE(connect_work, connect_work_fn); /* Static functions */ @@ -158,35 +173,10 @@ static void shadow_update_work_fn(struct k_work *work) K_SECONDS(CONFIG_AWS_IOT_SAMPLE_PUBLICATION_INTERVAL_SECONDS)); } -static void connect_work_fn(struct k_work *work) -{ - int err; - const struct aws_iot_config config = { - .client_id = hw_id, - }; - - LOG_INF("Connecting to AWS IoT"); - - err = aws_iot_connect(&config); - if (err == -EAGAIN) { - LOG_INF("Connection attempt timed out, " - "Next connection retry in %d seconds", - CONFIG_AWS_IOT_SAMPLE_CONNECTION_RETRY_TIMEOUT_SECONDS); - - (void)k_work_reschedule(&connect_work, - K_SECONDS(CONFIG_AWS_IOT_SAMPLE_CONNECTION_RETRY_TIMEOUT_SECONDS)); - } else if (err) { - LOG_ERR("aws_iot_connect, error: %d", err); - FATAL_ERROR(); - } -} - /* Functions that are executed on specific connection-related events. */ static void on_aws_iot_evt_connected(const struct aws_iot_evt *const evt) { - (void)k_work_cancel_delayable(&connect_work); - /* If persistent session is enabled, the AWS IoT library will not subscribe to any topics. * Topics from the last session will be used. */ @@ -204,48 +194,12 @@ static void on_aws_iot_evt_connected(const struct aws_iot_evt *const evt) (void)k_work_reschedule(&shadow_update_work, K_NO_WAIT); } -static void on_aws_iot_evt_disconnected(void) -{ - (void)k_work_cancel_delayable(&shadow_update_work); - (void)k_work_reschedule(&connect_work, K_SECONDS(5)); -} - static void on_aws_iot_evt_fota_done(const struct aws_iot_evt *const evt) { - int err; - - /* Tear down MQTT connection. */ - (void)aws_iot_disconnect(); - (void)k_work_cancel_delayable(&connect_work); - /* If modem FOTA has been carried out, the modem needs to be reinitialized. * This is carried out by bringing the network interface down/up. */ - if (evt->data.image & DFU_TARGET_IMAGE_TYPE_ANY_MODEM) { - LOG_INF("Modem FOTA done, reinitializing the modem"); - - err = conn_mgr_all_if_down(true); - if (err) { - LOG_ERR("conn_mgr_all_if_down, error: %d", err); - FATAL_ERROR(); - return; - } - - err = conn_mgr_all_if_up(true); - if (err) { - LOG_ERR("conn_mgr_all_if_up, error: %d", err); - FATAL_ERROR(); - return; - } - - err = conn_mgr_all_if_connect(true); - if (err) { - LOG_ERR("conn_mgr_all_if_connect, error: %d", err); - FATAL_ERROR(); - return; - } - - } else if (evt->data.image & DFU_TARGET_IMAGE_TYPE_ANY_APPLICATION) { + if (evt->data.image & DFU_TARGET_IMAGE_TYPE_ANY_APPLICATION) { LOG_INF("Application FOTA done, rebooting"); IF_ENABLED(CONFIG_REBOOT, (sys_reboot(0))); } else { @@ -253,18 +207,6 @@ static void on_aws_iot_evt_fota_done(const struct aws_iot_evt *const evt) } } -static void on_net_event_l4_connected(void) -{ - (void)k_work_reschedule(&connect_work, K_SECONDS(5)); -} - -static void on_net_event_l4_disconnected(void) -{ - (void)aws_iot_disconnect(); - (void)k_work_cancel_delayable(&connect_work); - (void)k_work_cancel_delayable(&shadow_update_work); -} - /* Event handlers */ static void aws_iot_event_handler(const struct aws_iot_evt *const evt) @@ -279,7 +221,6 @@ static void aws_iot_event_handler(const struct aws_iot_evt *const evt) break; case AWS_IOT_EVT_DISCONNECTED: LOG_INF("AWS_IOT_EVT_DISCONNECTED"); - on_aws_iot_evt_disconnected(); break; case AWS_IOT_EVT_DATA_RECEIVED: LOG_INF("AWS_IOT_EVT_DATA_RECEIVED"); @@ -324,67 +265,96 @@ static void aws_iot_event_handler(const struct aws_iot_evt *const evt) } } -static void l4_event_handler(struct net_mgmt_event_callback *cb, - uint32_t event, - struct net_if *iface) +static void net_l2_wifi_connect_result(struct net_mgmt_event_callback *cb) { - switch (event) { - case NET_EVENT_L4_CONNECTED: - LOG_INF("Network connectivity established"); - on_net_event_l4_connected(); + const struct wifi_status *status = + (const struct wifi_status *) cb->info; + + const struct aws_iot_config config = { + .client_id = hw_id, + }; + + if (status->status) { + connection_status = WIFI_STATE_DISCONNECTED; + } else { + LOG_ERR("Wi-Fi connected"); + + int err = aws_iot_connect(&config); + + if (err) { + LOG_ERR("aws_iot_connect, error: %d", err); + FATAL_ERROR(); + return; + } + + connection_status = WIFI_STATE_COMPLETED; + } +} + +static void net_l2_wifi_mgmt_event_handler(struct net_mgmt_event_callback *cb, + uint32_t mgmt_event, struct net_if *iface) +{ + if (iface != wifi_iface) { + return; + } + + switch (mgmt_event) { + case NET_EVENT_WIFI_CONNECT_RESULT: + net_l2_wifi_connect_result(cb); break; - case NET_EVENT_L4_DISCONNECTED: - LOG_INF("Network connectivity lost"); - on_net_event_l4_disconnected(); + case NET_EVENT_WIFI_DISCONNECT_RESULT: + LOG_ERR("Wi-Fi disconnected") break; default: - /* Don't care */ - return; + break; } } -static void connectivity_event_handler(struct net_mgmt_event_callback *cb, - uint32_t event, - struct net_if *iface) +static void wpa_supp_event_handler(struct net_mgmt_event_callback *cb, + uint32_t mgmt_event, struct net_if *iface) { - if (event == NET_EVENT_CONN_IF_FATAL_ERROR) { - LOG_ERR("NET_EVENT_CONN_IF_FATAL_ERROR"); - FATAL_ERROR(); - return; + switch (mgmt_event) { + case NET_EVENT_WPA_SUPP_READY: + k_sem_give(&wpa_supp_ready_sem); + break; + default: + break; } } int main(void) { - LOG_INF("The AWS IoT sample started, version: %s", CONFIG_AWS_IOT_SAMPLE_APP_VERSION); - int err; - /* Setup handler for Zephyr NET Connection Manager events. */ - net_mgmt_init_event_callback(&l4_cb, l4_event_handler, L4_EVENT_MASK); - net_mgmt_add_event_callback(&l4_cb); + LOG_INF("The AWS IoT sample started, version: %s", CONFIG_AWS_IOT_SAMPLE_APP_VERSION); - /* Setup handler for Zephyr NET Connection Manager Connectivity layer. */ - net_mgmt_init_event_callback(&conn_cb, connectivity_event_handler, CONN_LAYER_EVENT_MASK); - net_mgmt_add_event_callback(&conn_cb); + struct net_if *wifi_iface = net_if_get_default(); - /* Connecting to the configured connectivity layer. - * Wi-Fi or LTE depending on the board that the sample was built for. - */ - LOG_INF("Bringing network interface up and connecting to the network"); - - err = conn_mgr_all_if_up(true); - if (err) { - LOG_ERR("conn_mgr_all_if_up, error: %d", err); + if (!wifi_iface) { + LOG_ERR("Wi-Fi interface not found"); FATAL_ERROR(); - return err; + return -ENODEV; } - err = conn_mgr_all_if_connect(true); + net_mgmt_init_event_callback(&net_l2_mgmt_cb, + net_l2_wifi_mgmt_event_handler, + WIFI_MGMT_EVENTS); + net_mgmt_add_event_callback(&net_l2_mgmt_cb); + + net_mgmt_init_event_callback(&net_wpa_supp_cb, + wpa_supp_event_handler, + WPA_SUPP_EVENTS); + net_mgmt_add_event_callback(&net_wpa_supp_cb); + + k_sem_take(&wpa_supp_ready_sem, K_FOREVER); + + LOG_INF("Connecting to the network"); + + err = net_mgmt(NET_REQUEST_WIFI_CONNECT_STORED, wifi_iface, NULL, 0); + if (err) { - LOG_ERR("conn_mgr_all_if_connect, error: %d", err); - FATAL_ERROR(); - return err; + LOG_ERR("net management connect_stored request failed: %d\n", err); + return -ENOEXEC; } #if defined(CONFIG_AWS_IOT_SAMPLE_DEVICE_ID_USE_HW_ID) @@ -406,15 +376,5 @@ int main(void) return err; } - /* Resend connection status if the sample is built for QEMU x86. - * This is necessary because the network interface is automatically brought up - * at SYS_INIT() before main() is called. - * This means that NET_EVENT_L4_CONNECTED fires before the - * appropriate handler l4_event_handler() is registered. - */ - if (IS_ENABLED(CONFIG_BOARD_NATIVE_SIM)) { - conn_mgr_mon_resend_status(); - } - return 0; } diff --git a/samples/net/aws_iot/sysbuild.conf b/samples/net/aws_iot/sysbuild.conf new file mode 100644 index 00000000000..32948cdda47 --- /dev/null +++ b/samples/net/aws_iot/sysbuild.conf @@ -0,0 +1,7 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +SB_CONFIG_WIFI_NRF700X=y diff --git a/samples/net/aws_iot/sysbuild/mcuboot/app.overlay b/samples/net/aws_iot/sysbuild/mcuboot/app.overlay index 74d3dfbfd22..3034dd7db58 100644 --- a/samples/net/aws_iot/sysbuild/mcuboot/app.overlay +++ b/samples/net/aws_iot/sysbuild/mcuboot/app.overlay @@ -1,4 +1,10 @@ -/ { +/* + * 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..60841d9be3f --- /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>; +}; \ No newline at end of file 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 d8ebd794fa1..63cf616f802 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..24b457a77f5 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_NRF700X=n