diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f48529d3..9620579a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,9 +93,6 @@ jobs: echo "MEMFAULT_SW_TYPE=${{ inputs.memfault_sw_type }}" >> $GITHUB_ENV fi - - name: Apply nrf_wifi HAL patch - run: git apply thingy91x-oob/scripts/nrf_wifi_hal_memory_leak_fix.patch --directory=nrfxlib - # Out-of-box firmware build - name: Build nrf91 firmware @@ -189,7 +186,6 @@ jobs: - name: Apply Connectivity Bridge patch for debug feature run: | git apply thingy91x-oob/scripts/debug_feature_nrf.patch --directory=nrf - git apply thingy91x-oob/scripts/debug_feature_zephyr.patch --directory=zephyr - name: Build nrf53 firmware working-directory: nrf/applications/connectivity_bridge diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml index eb7bd499..86b7f73e 100644 --- a/.github/workflows/compliance.yml +++ b/.github/workflows/compliance.yml @@ -26,6 +26,7 @@ jobs: west config manifest.group-filter +bsec west config build.sysbuild True west update -o=--depth=1 -n + west blobs fetch hal_nordic - name: Run Compliance Tests continue-on-error: true diff --git a/.github/workflows/dfu_check.yml b/.github/workflows/dfu_check.yml index 18e415fa..21bb57af 100644 --- a/.github/workflows/dfu_check.yml +++ b/.github/workflows/dfu_check.yml @@ -35,6 +35,7 @@ jobs: west config manifest.group-filter +bsec west config build.sysbuild True west update -o=--depth=1 -n + west blobs fetch hal_nordic - name: Install dependencies run: | diff --git a/app/Kconfig.sysbuild b/app/Kconfig.sysbuild deleted file mode 100644 index 29af9c4a..00000000 --- a/app/Kconfig.sysbuild +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -config WIFI_NRF700X - default y if BOARD_THINGY91X_NRF9151_NS - -source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" diff --git a/app/boards/thingy91x_nrf9151_ns.overlay b/app/boards/thingy91x_nrf9151_ns.overlay index e41a9600..7cc42d5a 100644 --- a/app/boards/thingy91x_nrf9151_ns.overlay +++ b/app/boards/thingy91x_nrf9151_ns.overlay @@ -17,9 +17,16 @@ chosen { nordic,modem-trace-uart = &uart1; + zephyr,wifi = &nordic_wlan0; }; }; &uart1 { status = "okay"; }; + + +/* Switch to nrf7000 emulation so that scan-only mode is used. */ +&nrf70 { + compatible = "nordic,nrf7000-spi"; +}; diff --git a/app/overlay-memfault.conf b/app/overlay-memfault.conf index 42ff38b1..2658c361 100644 --- a/app/overlay-memfault.conf +++ b/app/overlay-memfault.conf @@ -10,4 +10,6 @@ CONFIG_MEMFAULT_NCS_DEVICE_ID_IMEI=y CONFIG_MEMFAULT_NCS_PROJECT_KEY="" CONFIG_MEMFAULT_LOGGING_RAM_SIZE=4096 CONFIG_MEMFAULT_HEAP_STATS=y +CONFIG_MEMFAULT_NCS_LOCATION_METRICS=y CONFIG_MEMFAULT_HTTP_DEDICATED_WORKQUEUE_STACK_SIZE=1560 +CONFIG_MEMFAULT_COREDUMP_FULL_THREAD_STACKS=y diff --git a/app/prj.conf b/app/prj.conf index 670705dc..3d9bbf56 100644 --- a/app/prj.conf +++ b/app/prj.conf @@ -10,7 +10,8 @@ CONFIG_RESET_ON_FATAL_ERROR=y CONFIG_LOG_MODE_DEFERRED=y CONFIG_LOG_BUFFER_SIZE=4096 CONFIG_DK_LIBRARY=y -CONFIG_POSIX_MAX_FDS=10 +CONFIG_ZVFS_OPEN_MAX=10 +# CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=3808 ? CONFIG_PWM=y # Heap and stacks @@ -19,6 +20,7 @@ CONFIG_MAIN_STACK_SIZE=4096 CONFIG_AT_MONITOR_HEAP_SIZE=2048 # Wifi scan requires extended heap size CONFIG_HEAP_MEM_POOL_SIZE=40000 +CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1280 # Enable Networking and Connection Manager. @@ -69,6 +71,7 @@ CONFIG_AT_SHELL=y CONFIG_NRF_CLOUD_COAP=y CONFIG_NRF_CLOUD_COAP_DISCONNECT_ON_FAILED_REQUEST=y CONFIG_MODEM_JWT=y +CONFIG_NRF_CLOUD_PRINT_DETAILS=n # On initial connection to the cloud, add info sections to the shadow CONFIG_MODEM_INFO=y @@ -117,8 +120,8 @@ CONFIG_BUILD_S1_VARIANT=y CONFIG_COAP_CLIENT_THREAD_PRIORITY=0 CONFIG_COAP_CLIENT_BLOCK_SIZE=1024 CONFIG_COAP_CLIENT_MESSAGE_SIZE=1024 -CONFIG_COAP_CLIENT_STACK_SIZE=1024 -CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=40 +CONFIG_COAP_CLIENT_STACK_SIZE=1792 +CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=192 # nRF Cloud CONFIG_NRF_CLOUD_CLIENT_ID_PREFIX="oob-" @@ -158,10 +161,10 @@ CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT_GPS=y # configs for Wi-Fi CONFIG_WIFI=y -CONFIG_WIFI_NRF700X=y -CONFIG_WIFI_NRF700X_SKIP_LOCAL_ADMIN_MAC=y -CONFIG_NRF700X_BH_WQ_STACK_SIZE=1024 -CONFIG_NRF700X_IRQ_WQ_STACK_SIZE=1024 +CONFIG_WIFI_NRF70=y +CONFIG_WIFI_NRF70_SKIP_LOCAL_ADMIN_MAC=y +CONFIG_NRF70_BH_WQ_STACK_SIZE=1024 +CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024 # Align this with CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT CONFIG_NRF_WIFI_SCAN_MAX_BSS_CNT=10 @@ -179,7 +182,7 @@ CONFIG_NRF_MODEM_LIB_SHMEM_TX_SIZE=4096 CONFIG_NRF_MODEM_LIB_SHMEM_RX_SIZE=4096 # Scan only using offload API -CONFIG_WPA_SUPP=n +CONFIG_WIFI_NM_WPA_SUPPLICANT=n # For nRF9160 the default is socket interface CONFIG_NET_DEFAULT_IF_ETHERNET=y @@ -235,3 +238,4 @@ CONFIG_TASK_WDT_CHANNELS=9 # Device power management CONFIG_PM_DEVICE=y +CONFIG_PM_DEVICE_RUNTIME=n diff --git a/app/sample.yaml b/app/sample.yaml index 0d8b2612..9c74785c 100644 --- a/app/sample.yaml +++ b/app/sample.yaml @@ -18,7 +18,7 @@ tests: - thingy91x/nrf9151/ns extra_configs: - CONFIG_MEMFAULT_NCS_PROJECT_KEY="PROJECTKEY" - extra_args: EXTRA_CONF_FILE=overlay-memfault.conf + extra_args: EXTRA_CONF_FILE="overlay-memfault.conf;overlay-modemtrace.conf;overlay-etb.conf" tags: ci_build app.build.bootloader_update: build_only: true diff --git a/app/src/modules/app/Kconfig.app b/app/src/modules/app/Kconfig.app index b624e08e..fcd4a658 100644 --- a/app/src/modules/app/Kconfig.app +++ b/app/src/modules/app/Kconfig.app @@ -6,7 +6,7 @@ menu "App" config APP_MODULE_THREAD_STACK_SIZE int "Thread stack size" - default 2700 + default 2944 config APP_MODULE_WATCHDOG_TIMEOUT_SECONDS int "Watchdog timeout seconds" diff --git a/app/src/modules/battery/Kconfig.battery b/app/src/modules/battery/Kconfig.battery index 4c78b43c..b7e396fc 100644 --- a/app/src/modules/battery/Kconfig.battery +++ b/app/src/modules/battery/Kconfig.battery @@ -8,7 +8,7 @@ menu "Sampler" config APP_BATTERY_THREAD_STACK_SIZE int "Thread stack size" - default 1280 + default 1536 config APP_BATTERY_WATCHDOG_TIMEOUT_SECONDS int "Watchdog timeout seconds" diff --git a/app/src/modules/battery/battery.c b/app/src/modules/battery/battery.c index cb161626..f366dd56 100644 --- a/app/src/modules/battery/battery.c +++ b/app/src/modules/battery/battery.c @@ -233,7 +233,7 @@ static void sample(int64_t *ref_time) NPM1300_CHG_STATUS_CC_MASK | NPM1300_CHG_STATUS_CV_MASK)) != 0; - state_of_charge = nrf_fuel_gauge_process(voltage, current, temp, delta, NULL); + state_of_charge = nrf_fuel_gauge_process(voltage, current, temp, delta, false, NULL); LOG_DBG("State of charge: %f", (double)roundf(state_of_charge)); LOG_DBG("The battery is %s", charging ? "charging" : "not charging"); diff --git a/app/src/modules/fota/fota.c b/app/src/modules/fota/fota.c index 7ec5833e..06adaaf6 100644 --- a/app/src/modules/fota/fota.c +++ b/app/src/modules/fota/fota.c @@ -401,8 +401,6 @@ static void fota_task(void) LOG_ERR("task_wdt_feed, error: %d", err); SEND_FATAL_ERROR(); return; - } else { - LOG_DBG("Task WDT fed"); } err = zbus_sub_wait_msg(&fota, &s_obj.chan, s_obj.msg_buf, zbus_wait_ms); diff --git a/app/src/modules/memfault/Kconfig.memfault b/app/src/modules/memfault/Kconfig.memfault index 597d21cd..dd587a41 100644 --- a/app/src/modules/memfault/Kconfig.memfault +++ b/app/src/modules/memfault/Kconfig.memfault @@ -19,7 +19,7 @@ if APP_MEMFAULT config APP_MEMFAULT_THREAD_STACK_SIZE int "Thread stack size" - default 2048 + default 1536 config APP_MEMFAULT_WATCHDOG_TIMEOUT_SECONDS int "Watchdog timeout seconds" diff --git a/app/src/modules/transport/Kconfig.transport b/app/src/modules/transport/Kconfig.transport index cf3f7219..37cf8ba6 100644 --- a/app/src/modules/transport/Kconfig.transport +++ b/app/src/modules/transport/Kconfig.transport @@ -15,7 +15,7 @@ config APP_TRANSPORT_RECONNECTION_TIMEOUT_SECONDS config APP_TRANSPORT_THREAD_STACK_SIZE int "Thread stack size" - default 2048 + default 1536 config APP_TRANSPORT_MESSAGE_QUEUE_SIZE int "Message queue size" @@ -25,7 +25,7 @@ config APP_TRANSPORT_MESSAGE_QUEUE_SIZE config APP_TRANSPORT_WORKQUEUE_STACK_SIZE int "Workqueue stack size" - default 1536 + default 1792 help Stack size of the module's internal workqueue. diff --git a/app/src/modules/trigger/trigger.c b/app/src/modules/trigger/trigger.c index bef228f4..4bcbbd14 100644 --- a/app/src/modules/trigger/trigger.c +++ b/app/src/modules/trigger/trigger.c @@ -262,8 +262,6 @@ static void blocked_run(void *o) LOG_DBG("blocked_run"); if (user_object->chan == &LOCATION_CHAN && !user_object->location_search) { - LOG_DBG("Location search done"); - if (user_object->trigger_mode == TRIGGER_MODE_NORMAL) { LOG_DBG("Going into normal state"); smf_set_state(SMF_CTX(&state_object), &states[STATE_NORMAL]); @@ -607,6 +605,8 @@ void trigger_callback(const struct zbus_channel *chan) const enum location_status *location_status = zbus_chan_const_msg(chan); state_object.location_search = (*location_status == LOCATION_SEARCH_STARTED); + + LOG_DBG("Location search %s", state_object.location_search ? "started" : "done"); } else { /* PRIV_TRIGGER_CHAN event. Frequent Poll Duration timer expired*/ LOG_DBG("Message received on PRIV_TRIGGER_CHAN channel."); diff --git a/app/sysbuild.conf b/app/sysbuild.conf new file mode 100644 index 00000000..1f6da431 --- /dev/null +++ b/app/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_SCAN_ONLY=y diff --git a/app/sysbuild/mcuboot/prj.conf b/app/sysbuild/mcuboot/prj.conf index ae6a05e9..60f8d41b 100644 --- a/app/sysbuild/mcuboot/prj.conf +++ b/app/sysbuild/mcuboot/prj.conf @@ -1,7 +1,6 @@ CONFIG_PM=n CONFIG_MAIN_STACK_SIZE=10240 -CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" CONFIG_BOOT_SWAP_SAVE_ENCTLV=n CONFIG_BOOT_ENCRYPT_IMAGE=n diff --git a/scripts/nrf_wifi_hal_memory_leak_fix.patch b/scripts/nrf_wifi_hal_memory_leak_fix.patch deleted file mode 100644 index aa88235a..00000000 --- a/scripts/nrf_wifi_hal_memory_leak_fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/nrf_wifi/hw_if/hal/src/hal_api.c b/nrf_wifi/hw_if/hal/src/hal_api.c -index 1b23fa42..5765e383 100644 ---- a/nrf_wifi/hw_if/hal/src/hal_api.c -+++ b/nrf_wifi/hw_if/hal/src/hal_api.c -@@ -1258,6 +1258,7 @@ void nrf_wifi_hal_dev_rem(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx) - - nrf_wifi_osal_spinlock_free(hal_dev_ctx->lock_hal); - nrf_wifi_osal_spinlock_free(hal_dev_ctx->lock_rx); -+ nrf_wifi_osal_spinlock_free(hal_dev_ctx->lock_recovery); - - nrf_wifi_utils_q_free(hal_dev_ctx->event_q); - diff --git a/tests/lib/simple_config/CMakeLists.txt b/tests/lib/simple_config/CMakeLists.txt index c97f3ed5..d69a7598 100644 --- a/tests/lib/simple_config/CMakeLists.txt +++ b/tests/lib/simple_config/CMakeLists.txt @@ -35,4 +35,5 @@ target_compile_options(app -DCONFIG_COAP_CLIENT_MESSAGE_HEADER_SIZE=48 -DCONFIG_COAP_CLIENT_MESSAGE_SIZE=512 -DCONFIG_COAP_CLIENT_MAX_REQUESTS=2 + -DCONFIG_COAP_CLIENT_BLOCK_SIZE=1024 ) diff --git a/tests/on_target/tests/test_uart_output.py b/tests/on_target/tests/test_uart_output.py index 48523bc3..503c42d1 100644 --- a/tests/on_target/tests/test_uart_output.py +++ b/tests/on_target/tests/test_uart_output.py @@ -27,7 +27,7 @@ def test_uart_output(t91x_board, hex_file): "battery: sample: State of charge:", "environmental_module: sample: temp:", "transport: state_connected_ready_run: Payload", - "blocked_run: Location search done", + "Location search done", "trigger: frequent_poll_entry: frequent_poll_entry" ] patterns_button_press = [ diff --git a/west.yml b/west.yml index 4d78065d..bbb390bc 100644 --- a/west.yml +++ b/west.yml @@ -14,5 +14,5 @@ manifest: - name: nrf remote: ncs repo-path: sdk-nrf - revision: cfb2a11d013959f2fa68a1dc9460a1cf1c6fda82 + revision: dd1b59877d3bf2aff976bc3c3a2a0dca135d9f85 import: true