Error programming Thingy 91X: slot_index_primary is required

I have rebuilt the sample app at_client using VS Code (Mac)
nRF Connect SDK v2.6.0 and Toolchain v2.6.0
Board target: thingy91_nrf9151
Snippets: nrf91-modem-trace-uart

I am using nRF Connect for Desktop -> Programmer v4.6.2 to program the device
File: at_client/build/zephyr/dfu_application.zip

When programming I get the following failure:
Message: Failed, Error parsing multi-image file entry: slot_index_primary is required.

Same result if I try to use command line.

Full log:
2025-07-20T21:01:38.782Z INFO Device connected with the serial number THINGY91X_941D1C15D72
2025-07-20T21:01:45.430Z INFO Getting serial port options from the persistent store for THINGY91X_941D1C15D72.pc-nrfconnect-programmer
2025-07-20T21:01:45.431Z INFO Device connected with the serial number THINGY91X_941D1C15D72
2025-07-20T21:01:45.431Z DEBUG Sending event "programmer: device connected"
2025-07-20T21:01:45.657Z INFO Getting serial port options from the persistent store for THINGY91X_941D1C15D72.pc-nrfconnect-programmer
2025-07-20T21:01:45.657Z DEBUG Sending event "programmer: device connected"
2025-07-20T21:01:45.664Z INFO Getting serial port options from the persistent store for THINGY91X_941D1C15D72.pc-nrfconnect-programmer
2025-07-20T21:01:45.664Z DEBUG Sending event "programmer: device connected"
2025-07-20T21:01:56.082Z INFO Selecting device with the serial number THINGY91X_941D1C15D72
2025-07-20T21:01:56.089Z DEBUG Sending event "programmer: running nrfutil device"
2025-07-20T21:01:56.210Z INFO Selected device with the serial number THINGY91X_941D1C15D72
2025-07-20T21:01:56.211Z DEBUG Sending event "programmer: device selected"
2025-07-20T21:02:01.650Z INFO Checking ZIP file: /Users/anders/Sources/thingy91x/at_client/build/zephyr/dfu_application.zip
2025-07-20T21:02:01.650Z INFO File was last modified at 7/18/2025, 12:36:15 PM
2025-07-20T21:02:07.003Z INFO Modem DFU starts to write...
2025-07-20T21:02:07.003Z INFO Writing /Users/anders/Sources/nrf52840dk/at_client/build/zephyr/dfu_application.zip to device THINGY91X_941D1C15D72
2025-07-20T21:02:07.006Z DEBUG Sending event "programmer: running nrfutil device"
2025-07-20T21:02:07.129Z ERROR Error: Failed with exit code 1.
One or more program tasks failed:
* THINGY91X_941D1C15D72: Error parsing multi-image file entry: slot_index_primary is required (FileOpenFailed)


Message: Failed, Error parsing multi-image file entry: slot_index_primary is required.
2025-07-20T21:02:07.129Z ERROR Modem DFU failed with error: Error: Failed with exit code 1.
One or more program tasks failed:
* THINGY91X_941D1C15D72: Error parsing multi-image file entry: slot_index_primary is required (FileOpenFailed)


Message: Failed, Error parsing multi-image file entry: slot_index_primary is required.

Parents
  • Hi,

    Are you able to build the sample from command line (with and without the snippet)?

    Best regards,
    Dejan

  • Deleted old at_client and started with at_client from nRF Connect SDK v3.0.2. Built successfully. Loaded on target successfully.

    Deleted build directory. Added mrf91-modem-uart-trace snippet to build configuration 

    Got following build error (re-build here to shorten output):

    * Executing task: nRF Connect: Build: at_client/build (active)

    Building at_client
    west build --build-dir /Users/anders/Sources/thingy91x/at_client/build /Users/anders/Sources/thingy91x/at_client

    [0/31] Performing build step for 'mcuboot'
    ninja: no work to do.
    [0/14] Performing build step for 'tfm'
    ninja: no work to do.
    [5/25] Performing build step for 's1_image'
    ninja: no work to do.
    [1/6] Linking C executable zephyr/zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /Users/anders/Sources/thingy91x/at_client/build/b0/zephyr/zephyr_pre0.map
    : && ccache /opt/nordic/ncs/toolchains/ef4fc6722e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=/Users/anders/Sources/thingy91x/at_client/build/b0/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/libarch__arm__core.a zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a zephyr/arch/arch/arm/core/cortex_m/cmse/libarch__arm__core__cortex_m__cmse.a zephyr/lib/libc/picolibc/liblib__libc__picolibc.a zephyr/lib/libc/common/liblib__libc__common.a zephyr/soc/soc/nrf9151/libsoc__nordic.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/console/libdrivers__console.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/timer/libdrivers__timer.a modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a modules/nrf/subsys/bootloader/bl_boot/lib..__nrf__subsys__bootloader__bl_boot.a modules/nrf/subsys/bootloader/bl_crypto/lib..__nrf__subsys__bootloader__bl_crypto.a modules/nrf/subsys/bootloader/bl_validation/lib..__nrf__subsys__bootloader__bl_validation.a modules/nrf/subsys/bootloader/bl_storage/lib..__nrf__subsys__bootloader__bl_storage.a modules/nrf/subsys/fw_info/lib..__nrf__subsys__fw_info.a modules/nrf/drivers/hw_cc3xx/lib..__nrf__drivers__hw_cc3xx.a modules/hal_nordic/modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a -L/Users/anders/Sources/thingy91x/at_client/build/b0/zephyr zephyr/arch/common/libisr_tables.a /opt/nordic/ncs/v3.0.2/nrfxlib/crypto/nrf_oberon/lib/cortex-m33/hard-float/liboberon_3.0.16.a /opt/nordic/ncs/v3.0.2/nrfxlib/crypto/nrf_cc310_bl/lib/cortex-m33/hard-float/no-interrupts/libnrf_cc310_bl_0.9.12.a -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft -fuse-ld=bfd -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -Wl,-no-pie -specs=picolibc.specs -DPICOLIBC_DOUBLE_PRINTF_SCANF /opt/nordic/ncs/v3.0.2/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m33/hard-float/no-interrupts/libnrf_cc310_platform_0.9.19.a -L"/opt/nordic/ncs/toolchains/ef4fc6722e/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v8-m.main+fp/hard" -lc -lgcc && cd /Users/anders/Sources/thingy91x/at_client/build/b0/zephyr && /opt/nordic/ncs/toolchains/ef4fc6722e/Cellar/cmake/3.21.0/bin/cmake -E true
    /opt/nordic/ncs/toolchains/ef4fc6722e/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/kernel/libkernel.a(timeout.c.obj): in function `elapsed':
    /opt/nordic/ncs/v3.0.2/zephyr/kernel/timeout.c:80: undefined reference to `sys_clock_elapsed'
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    [12/24] cd /Users/anders/Sources/thingy91x/at_client/build/_sysbuild && /opt/nordic/ncs/toolchains/ef4fc6722e/Cellar/cmake/3.21.0/bin/cmake -E true
    FAILED: modules/nrf/b0-prefix/src/b0-stamp/b0-build /Users/anders/Sources/thingy91x/at_client/build/modules/nrf/b0-prefix/src/b0-stamp/b0-build
    cd /Users/anders/Sources/thingy91x/at_client/build/b0 && /opt/nordic/ncs/toolchains/ef4fc6722e/Cellar/cmake/3.21.0/bin/cmake --build .
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/ef4fc6722e/bin/cmake --build /Users/anders/Sources/thingy91x/at_client/build

    * The terminal process terminated with exit code: 1.
    * Terminal will be reused by tasks, press any key to close it.

  • Hi,

    You can try to shorten the path to the sample project. Do you get different result?

    Best regards,
    Dejan

  • Pulled new sample project to /opt/tst/at/

    This gives exact same error.

  • I do suspect this has something to do with configuration. The prototype is found in 

    <zephyr/drivers/timer/system_timer.h> and I see the implementation in the drivers in zephyr/drivers/timer/*.c files.
    Namely nrf_rtc_timer.c and nrf_grtc_timer.c (if one of those is appropriate for the platform).
    Question is if timer driver is supported by the platform and what configs includes the timer implementation files in the build.
  • Since implementation is in nrf_rtc_timer I did the following
    rtc0 or rtc1 is not included in thingy91_nrf9151_ns.dts, so I added app.overlay with

    &rtc0 {
    status = "okay";
    };

    And added
    CONFIG_NRF_RTC_TIMER=y
    To my prj.conf file.

    Still same error: undefined reference to `sys_clock_elapsed'

    So the question remains:
    How do I get nrf_rtc_timer.c included in my build. (If that's the implementation I need).

Reply
  • Since implementation is in nrf_rtc_timer I did the following
    rtc0 or rtc1 is not included in thingy91_nrf9151_ns.dts, so I added app.overlay with

    &rtc0 {
    status = "okay";
    };

    And added
    CONFIG_NRF_RTC_TIMER=y
    To my prj.conf file.

    Still same error: undefined reference to `sys_clock_elapsed'

    So the question remains:
    How do I get nrf_rtc_timer.c included in my build. (If that's the implementation I need).

Children
Related