Skip to content
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
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ jobs:
- name: Build nrf53 firmware
working-directory: nrf/applications/connectivity_bridge
run: |
west build -b thingy91x/nrf5340/cpuapp -p --sysbuild -- -Dmcuboot_CONFIG_FW_INFO_FIRMWARE_VERSION=3 -DCONFIG_BUILD_S1_VARIANT=y
west build -b thingy91x/nrf5340/cpuapp -p --sysbuild -- -Dmcuboot_CONFIG_FW_INFO_FIRMWARE_VERSION=3

- name: Create partition manager report for nRF53 firmware
working-directory: nrf/applications/connectivity_bridge/build
Expand Down Expand Up @@ -269,10 +269,13 @@ jobs:
working-directory: thingy91x-oob
run: |
west twister -T . --test app/app.build.bootloader_update -v -p thingy91x/nrf9151/ns --inline-logs
cp twister-out/thingy91x_nrf9151_ns/app/app.build.bootloader_update/dfu_mcuboot.zip \
cp twister-out/thingy91x_nrf9151_ns/zephyr/app/app.build.bootloader_update/dfu_mcuboot.zip \
hello.nrfcloud.com-${{ env.VERSION }}-thingy91x-nrf91-bootloader.zip
rm -rf twister-out
west build -b thingy91x/nrf5340/cpuapp -p --sysbuild -d ../nrf/applications/connectivity_bridge/build-bl-update ../nrf/applications/connectivity_bridge -- -Dmcuboot_CONFIG_FW_INFO_FIRMWARE_VERSION=4 -DCONFIG_BUILD_S1_VARIANT=y
west build -b thingy91x/nrf5340/cpuapp -p --sysbuild \
-d ../nrf/applications/connectivity_bridge/build-bl-update \
../nrf/applications/connectivity_bridge -- \
-Dmcuboot_CONFIG_FW_INFO_FIRMWARE_VERSION=4
cp ../nrf/applications/connectivity_bridge/build-bl-update/dfu_mcuboot.zip \
connectivity-bridge-${{ env.VERSION }}-thingy91x-nrf53-bootloader.zip

Expand Down
4 changes: 4 additions & 0 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

menu "Thingy Out-of-Box Application"

config PM_PARTITION_SIZE_TFM_SRAM
hex
default 0x4000

config APP_PAYLOAD_CHANNEL_BUFFER_MAX_SIZE
int "Payload maximum buffer size"
default 128
Expand Down
10 changes: 10 additions & 0 deletions app/Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

config MCUBOOT_USE_ALL_AVAILABLE_RAM
default y

source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
2 changes: 1 addition & 1 deletion app/overlay-etb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ CONFIG_MEMFAULT_NCS_ETB_CAPTURE=y
# Reduce logging to avoid filling up ETB with data not related to the crash
CONFIG_FAULT_DUMP=0
CONFIG_KERNEL_LOG_LEVEL_OFF=y
CONFIG_PM_PARTITION_SIZE_MEMFAULT_STORAGE=0x40000
CONFIG_PM_PARTITION_SIZE_MEMFAULT_STORAGE=0x30000
CONFIG_MEMFAULT_COREDUMP_COLLECT_BSS_REGIONS=y
CONFIG_MEMFAULT_COREDUMP_FULL_THREAD_STACKS=y
19 changes: 8 additions & 11 deletions app/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ CONFIG_DK_LIBRARY=y
CONFIG_ZVFS_OPEN_MAX=10
CONFIG_PWM=y

# Disable UART NRFX legacy shim to make the device boot.
CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n

# Heap and stacks
CONFIG_MAIN_STACK_SIZE=4096
# Extended AT host/monitor stack/heap sizes since some nrf_cloud credentials are longer than 1024 bytes.
Expand Down Expand Up @@ -76,6 +73,7 @@ CONFIG_SHELL_STACK_SIZE=1560
CONFIG_AT_SHELL=y

# nRF Cloud
CONFIG_NRF_CLOUD=y
CONFIG_NRF_CLOUD_COAP=y
CONFIG_NRF_CLOUD_COAP_DISCONNECT_ON_FAILED_REQUEST=y
CONFIG_MODEM_JWT=y
Expand Down Expand Up @@ -103,11 +101,9 @@ CONFIG_SETTINGS_FCB=y
CONFIG_FCB=y

# Download Client - used by FOTA and PGPS
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_1024=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=3072
CONFIG_DOWNLOAD_CLIENT_BUF_SIZE=2048
CONFIG_DOWNLOAD_CLIENT_MAX_HOSTNAME_SIZE=128
CONFIG_DOWNLOADER=y
CONFIG_DOWNLOADER_TRANSPORT_HTTP=n
CONFIG_DOWNLOADER_STACK_SIZE=1664

# Flash - Used by FOTA and PGPS
CONFIG_FLASH=y
Expand All @@ -121,12 +117,12 @@ CONFIG_NRF_CLOUD_FOTA_POLL=y
CONFIG_NRF_CLOUD_FOTA_POLL_LOG_LEVEL_DBG=y
CONFIG_NRF_CLOUD_FOTA_FULL_MODEM_UPDATE=y
CONFIG_NRF_CLOUD_FOTA_DOWNLOAD_FRAGMENT_SIZE=1700
CONFIG_NRF_CLOUD_COAP_DOWNLOADS=n
CONFIG_NRF_CLOUD_COAP_DOWNLOADS=y
CONFIG_FOTA_DOWNLOAD=y
CONFIG_FOTA_DOWNLOAD_PROGRESS_EVT=y
CONFIG_FOTA_DL_TIMEOUT_MIN=30
CONFIG_DFU_TARGET=y
CONFIG_BUILD_S1_VARIANT=y

# COAP client
CONFIG_COAP_CLIENT_THREAD_PRIORITY=0
CONFIG_COAP_CLIENT_BLOCK_SIZE=1024
Expand Down Expand Up @@ -241,7 +237,7 @@ CONFIG_APP_LOG_LEVEL_DBG=y

# Fuel Gage
CONFIG_NRF_FUEL_GAUGE=y
CONFIG_NPM1300_CHARGER=y
CONFIG_NPM13XX_CHARGER=y

# Task Watchdog
CONFIG_TASK_WDT=y
Expand All @@ -250,6 +246,7 @@ CONFIG_TASK_WDT_MIN_TIMEOUT=10000

# Device power management
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=n

# Modem tracing
CONFIG_FCB=y
Expand Down
1 change: 0 additions & 1 deletion app/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ tests:
tags: ci_build
extra_args:
- mcuboot_CONFIG_FW_INFO_FIRMWARE_VERSION=3
- CONFIG_BUILD_S1_VARIANT=y
6 changes: 3 additions & 3 deletions app/src/modules/battery/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/zbus/zbus.h>
#include <zephyr/drivers/sensor/npm1300_charger.h>
#include <zephyr/drivers/sensor/npm13xx_charger.h>
#include <zephyr/sys/util.h>
#include <nrf_fuel_gauge.h>
#include <date_time.h>
Expand Down Expand Up @@ -193,7 +193,7 @@ static int charger_read_sensors(float *voltage, float *current, float *temp, int
sensor_channel_get(charger, SENSOR_CHAN_GAUGE_AVG_CURRENT, &value);
*current = (float)value.val1 + ((float)value.val2 / 1000000);

sensor_channel_get(charger, (enum sensor_channel)SENSOR_CHAN_NPM1300_CHARGER_STATUS,
sensor_channel_get(charger, (enum sensor_channel)SENSOR_CHAN_NPM13XX_CHARGER_STATUS,
&value);
*chg_status = value.val1;

Expand Down Expand Up @@ -233,7 +233,7 @@ static void sample(int64_t *ref_time)
NPM1300_CHG_STATUS_CC_MASK |
NPM1300_CHG_STATUS_CV_MASK)) != 0;

Copy link

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nrf_fuel_gauge_process function call has been modified to remove a boolean parameter and replace it with NULL. This appears to be an API change, but without documentation of what the removed parameter represented, this change could affect fuel gauge behavior. Consider adding a comment explaining what functionality was removed or verify that NULL is the correct replacement for the boolean parameter.

Copilot uses AI. Check for mistakes.
state_of_charge = nrf_fuel_gauge_process(voltage, current, temp, delta, false, NULL);
state_of_charge = nrf_fuel_gauge_process(voltage, current, temp, delta, NULL);

LOG_DBG("State of charge: %f", (double)roundf(state_of_charge));
LOG_DBG("The battery is %s", charging ? "charging" : "not charging");
Expand Down
20 changes: 10 additions & 10 deletions app/src/modules/trigger/trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ struct s_object {
/* SMF state object variable */
static struct s_object state_object;

static void trigger_send(enum trigger_type type, k_timeout_t timeout)
static void trigger_send(enum trigger_type type)
{
enum trigger_type trigger_type = type;

int err = zbus_chan_pub(&TRIGGER_CHAN, &trigger_type, timeout);
int err = zbus_chan_pub(&TRIGGER_CHAN, &trigger_type, K_NO_WAIT);

if (err) {
LOG_ERR("zbus_chan_pub, error: %d", err);
Expand All @@ -136,7 +136,7 @@ static void frequent_poll_state_duration_timer_handler(struct k_timer * timer_id

LOG_DBG("Frequent poll duration timer expired");

err = zbus_chan_pub(&PRIV_TRIGGER_CHAN, &unused, K_SECONDS(1));
err = zbus_chan_pub(&PRIV_TRIGGER_CHAN, &unused, K_NO_WAIT);
if (err) {
LOG_ERR("zbus_chan_pub, error: %d", err);
SEND_FATAL_ERROR();
Expand All @@ -151,7 +151,7 @@ static void trigger_work_fn(struct k_work *work)

LOG_DBG("Sending data sample trigger");

trigger_send(TRIGGER_DATA_SAMPLE, K_SECONDS(1));
trigger_send(TRIGGER_DATA_SAMPLE);

k_work_reschedule(&trigger_work, K_SECONDS(state_object.update_interval_used_sec));
}
Expand All @@ -162,8 +162,8 @@ static void trigger_poll_work_fn(struct k_work *work)

LOG_DBG("Sending shadow/fota poll trigger");

trigger_send(TRIGGER_POLL, K_SECONDS(1));
trigger_send(TRIGGER_FOTA_POLL, K_SECONDS(1));
trigger_send(TRIGGER_POLL);
trigger_send(TRIGGER_FOTA_POLL);

k_work_reschedule(&trigger_poll_work,
K_SECONDS(state_object.poll_interval_used_sec));
Expand Down Expand Up @@ -283,8 +283,8 @@ static void blocked_run(void *o)
user_object->button_number);

frequent_poll_duration_timer_start(true);
trigger_send(TRIGGER_POLL, K_SECONDS(1));
trigger_send(TRIGGER_FOTA_POLL, K_SECONDS(1));
trigger_send(TRIGGER_POLL);
trigger_send(TRIGGER_FOTA_POLL);

} else if (user_object->chan == &CONFIG_CHAN) {
LOG_DBG("Configuration received, refreshing poll duration timer");
Expand Down Expand Up @@ -316,7 +316,7 @@ static void frequent_poll_entry(void *o)
K_SECONDS(user_object->poll_interval_used_sec));
return;
}
int err = zbus_chan_pub(&TRIGGER_MODE_CHAN, &user_object->trigger_mode, K_SECONDS(1));
int err = zbus_chan_pub(&TRIGGER_MODE_CHAN, &user_object->trigger_mode, K_NO_WAIT);

if (err) {
LOG_ERR("zbus_chan_pub, error: %d", err);
Expand Down Expand Up @@ -393,7 +393,7 @@ static void normal_entry(void *o)
user_object->trigger_mode = TRIGGER_MODE_NORMAL;

/* Send message on trigger mode channel */
int err = zbus_chan_pub(&TRIGGER_MODE_CHAN, &user_object->trigger_mode, K_SECONDS(1));
int err = zbus_chan_pub(&TRIGGER_MODE_CHAN, &user_object->trigger_mode, K_NO_WAIT);
if (err) {
LOG_ERR("zbus_chan_pub, error: %d", err);
SEND_FATAL_ERROR();
Expand Down
20 changes: 10 additions & 10 deletions scripts/pmr_nrf91.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@

sram_primary (0x40000 - 256kB):
+--------------------------------------------------+
+---0x20000000: mcuboot_sram (0xa000 - 40kB)-------+
+---0x20000000: sram_secure (0xa000 - 40kB)--------+
| 0x20000000: tfm_sram (0xa000 - 40kB) |
+---0x2000a000: sram_nonsecure (0x36000 - 216kB)---+
+---0x2000a000: nrf_modem_lib_sram (0x64e8 - 25kB)-+
| 0x2000a000: nrf_modem_lib_ctrl (0x4e8 - 1kB) |
| 0x2000a4e8: nrf_modem_lib_tx (0x1000 - 4kB) |
| 0x2000b4e8: nrf_modem_lib_rx (0x1000 - 4kB) |
| 0x2000c4e8: nrf_modem_lib_trace (0x4000 - 16kB) |
+---0x20000000: mcuboot_sram (0x40000 - 256kB)-----+
+---0x20000000: sram_secure (0x4000 - 16kB)--------+
| 0x20000000: tfm_sram (0x4000 - 16kB) |
+---0x20004000: sram_nonsecure (0x3c000 - 240kB)---+
+---0x20004000: nrf_modem_lib_sram (0x64e8 - 25kB)-+
| 0x20004000: nrf_modem_lib_ctrl (0x4e8 - 1kB) |
| 0x200044e8: nrf_modem_lib_tx (0x1000 - 4kB) |
| 0x200054e8: nrf_modem_lib_rx (0x1000 - 4kB) |
| 0x200064e8: nrf_modem_lib_trace (0x4000 - 16kB) |
+--------------------------------------------------+
| 0x200104e8: sram_primary (0x2fb18 - 190kB) |
| 0x2000a4e8: sram_primary (0x35b18 - 214kB) |
+--------------------------------------------------+
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ manifest:
- name: nrf
remote: ncs
repo-path: sdk-nrf
revision: v2.8.0-rc2
revision: v3.1.0
import: true
Loading