Device error: No programmer is defined for the xip memory (0x10000000..0x20000000)

I get the following error when clicking flash button in nrfConnect VS Code extension with an nRF54L15 DK:

Error: One or more batch tasks failed:
* 1057701224: Device error: No programmer is defined for the xip memory (0x10000000..0x20000000). An external memory config file is required to work with this memory. Set this file with the dedicated option (Generic)

FATAL ERROR: command exited with status 1: nrfutil --json device x-execute-batch --batch-path /Users/bigal/Projects/Tycho-Watch/app/build/app/zephyr/generated_nrfutil_batch.json --serial-number 1057701224

My board.cmake file is:

**************************************************************************************************************************************************************************************************************************# Copyright (c) 2025 ZSWatch Project

# SPDX-License-Identifier: Apache-2.0

if(CONFIG_BOARD_WATCHDK_NRF5340_CPUAPP_NS)
set(TFM_PUBLIC_KEY_FORMAT "full")
endif()

if(CONFIG_BOARD_WATCHDK_NRF5340_CPUAPP OR CONFIG_BOARD_WATCHDK_NRF5340_CPUAPP_NS)
board_runner_args(nrfjprog "--qspiini=${BOARD_DIR}/support/qspi_mx25u51245.ini")
board_runner_args(jlink "--device=nrf5340_xxaa_app" "--speed=4000")
endif()

if(CONFIG_TFM_FLASH_MERGED_BINARY)
set_property(TARGET runners_yaml_props_target PROPERTY hex_file tfm_merged.hex)
endif()

if(CONFIG_BOARD_WATCHDK_NRF5340_CPUNET)
board_runner_args(jlink "--device=nrf5340_xxaa_net" "--speed=4000")
endif()

include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

**************************************************************************************************************************************************************************************************************************

I'm specifically looking for a board_runner_args line for nrfutil instead of the nrfjprog one above.
I can't find any documentation for it.
I think the qspiini option isn't available for nrfutil, so what's the alternative?
I know there's an nrfutil command for the terminal, but I don't know where the .hex file from the build is in my project. I'd ideally like to use the flash button in nrfConnect VS Code extension.
I know nrfjprog is deprecated and I should use nrfutil going forward, so I'd like to get a solution for nrfutil that lets me use nrfConnect VS code extension in the same way I have already been.
Parents Reply Children
  • I'm programming a custom board with nRF5340 which requires external QSPI memory. Should I be changing board.cmake or CMakeLists.txt (as in the first link you posted)? Bearing in mind I'd like to be able to click the nRFConnect VS Code extension flash button in the actions panel.

    I've got a nrf54l15dk_spi_nrfutil_config.json in /nrf/tests/subsys/dfu/dfu_extra/boards directory of my project. Do I use that in the CMakeLists.txt macro (as in the first link)?

  • It may be best to just update the board.cmake file in this case. That will make it work across all projects. I can use the thingy53 board as a reference: https://github.com/nrfconnect/sdk-zephyr/blob/d088ff9107d68dc49e21a402b708ab50aca1e847/boards/nordic/thingy53/board.cmake#L4

  • I just updated the board.cmake file with an nRF5340 JSON config file I found: 

    nrf5340dk_qspi_nrfutil_config.json
    {
        "firmware_config": {
            "peripheral": "QSPI"
        },
        "pins": {
            "sck": 17,
            "csn": 18,
            "io0": 13,
            "io1": 14,
            "io2": 15,
            "io3": 16
        },
        "flash_size": 8388608,
        "sck_frequency": 8000000,
        "address_mode": "MODE24BIT",
        "readoc": "READ4IO",
        "writeoc": "PP4IO",
        "pp_size": "PPSIZE256",
        "sck_delay": 128,
        "rx_delay": 2,
        "page_size": 4096
    }
     
    It says it successfully flashed to the nRF5340:
    WARNING: Specifying runner options for multiple domains is experimental.
    If problems are experienced, please specify a single domain using '--domain <domain>'
    -- west flash: using runner nrfutil
    -- runners.nrfutil: mass erase requested
    -- runners.nrfutil: reset after flashing requested
    -- runners.nrfutil: Flashing file: /Users/bigal/Projects/Tycho-Watch/app/build/merged_CPUNET.hex
    -- runners.nrfutil: Connecting to probe
    -- runners.nrfutil: Erasing non-volatile memory (ERASEALL)
    -- runners.nrfutil: Programming image
    -- runners.nrfutil: Verifying image
    -- runners.nrfutil: Reset
    -- runners.nrfutil: Board(s) with serial number(s) 1057701224 flashed successfully.
    -- west flash: using runner nrfutil
    -- runners.nrfutil: mass erase requested
    -- runners.nrfutil: reset after flashing requested
    -- runners.nrfutil: Flashing file: /Users/bigal/Projects/Tycho-Watch/app/build/merged.hex
    -- runners.nrfutil: Connecting to probe
    -- runners.nrfutil: Erasing non-volatile memory (ERASEALL)
    -- runners.nrfutil: Programming image
    -- runners.nrfutil: Verifying image
    -- runners.nrfutil: Reset
    -- runners.nrfutil: Board(s) with serial number(s) 1057701224 flashed successfully.
    But the nRF5340 never resets and boots (watch touch display is unlit and unresponsive).
  • As the log says, the hex file was flashed successfully. It would not have been able to complete the verification step otherwise. Next step should probably be to debug the FW to figure out why the display is not functioning.

Related