Build warnings and errors when adding FOTA for nRF54L15 project

I'm following along with the Nordic Academy tutorial for v2.7.0-v2.9.0. I made the recommended modifications to my v2.9.0 project with an nRF54L15-DK target:

  1. Create sysbuild.conf with SB_CONFIG_BOOTLOADER_MCUBOOT=y
  2. Add CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y to the main app prj.conf

While this did properly add OTA DFU support, it also generated a handful of warnings when running CMake for mcuboot. First, FPROTECT_ALLOW_COMBINED_REGIONS was set to 'n' because FPROTECT was set to 'n'. Second, NRF_RTC_TIMER_USER_CHAN_COUNT was not assigned a value and is dependent on (NRF_RTC_TIMER && SYS_CLOCK_EXISTS). To resolve these warnings, I created an mcuboot.conf file in app/sysbuild and added the following configs:

CONFIG_FPROTECT=y
CONFIG_NRF_RTC_TIMER=y
CONFIG_SYS_CLOCK_EXISTS=y

mcuboot builds successfully after this change but now I get build errors for the main app:

FAILED: zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/nrf_rtc_timer.c.obj 

In file included from .../zephyr/include/zephyr/toolchain.h:50,
                 from .../zephyr/include/zephyr/sys/util.h:18,
                 from .../zephyr/include/zephyr/init.h:13,
                 from .../zephyr/drivers/timer/nrf_rtc_timer.c:8:

.../zephyr/drivers/timer/nrf_rtc_timer.c:29:25: error: 'RTC1_CC_NUM' undeclared here (not in a function); did you mean 'RTC10_CC_NUM'?
   29 | #define CHAN_COUNT_MAX (RTC1_CC_NUM - (RTC_PRETICK ? 1 : 0))

.../zephyr/include/zephyr/toolchain/gcc.h:87:51: error: expression in static assertion is not an integer
   87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), "" MSG)

.../zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "Counter for RTC1 must be disabled"
   87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), "" MSG)

.../zephyr/drivers/timer/nrf_rtc_timer.c:26:13: error: 'NRF_RTC1' undeclared (first use in this function); did you mean 'NRF_RTC10'?
   26 | #define RTC NRF_RTC1

It seems to be looking for an RTC instance based on the old naming sequence? That's what I gathered from the error output at least. Am I doing something wrong in trying to integrate OTA DFU here, and if so, how can I resolve the original build warnings the correct way?

Parents Reply Children
Related