MCUBoot+sysbuild+ns-variant: E: Protect mcuboot flash failed, cancel startup.

Hi.

Goal
I am creating a new application for the nRF54l15 and want to follow the latest recommendations for project configuration. I need to do DFU over BLE, so I'm trying to add MCUBoot in the chain-of-trust regime, using sysbuild. To get there, I used the zephyr/samples/sysbuild/with_mcuboot as a starting point.

Problem
The sample in question does not explicitly support any of the nordic boards with secure/non-secure regime, and I haven't found any samples that combine all these criteria. So I have tried to build the zephyr/sysbuild/with_mcuboot sample for nrf54l15dk/nrf54l15/ns. After erase+flash to my nRF54l15-PDK, I get the following error:

*** Booting MCUboot v2.1.0-dev-2b69d93e75bc ***
*** Using nRF Connect SDK v3.1.0-6c6e5b32496e ***
*** Using Zephyr OS v4.1.99-1612683d4010 ***
E: Protect mcuboot flash failed, cancel startup.

How to recreate
Open zephyr/sysbuild/with_mcuboot and build for zephyr/sysbuild/with_mcuboot sample for nrf54l15dk/nrf54l15/ns. My first build failed, but after doing a pristine build it built successfully and I was able to flash (VSCode build output is attached). Finally, flash to the DK and it should produce the error message shown above.

My setup
Support information is attached. I'm using SDK and toolchain version 3.1.0 with VSCode for windows 10, and nRF54L15-PDK (0.8.1, 2024.38).

Solutions?
I don't have to be able to run this exact sample, but what is causing this error and how do I best resolve it?

vscode_build_log.txt 

// IMPORTANT: The following data can contain sensitive or confidential information about your environment.
// If you do not want others to see this information, make sure to remove it before sharing the data.

// For help and support, visit Nordic Semiconductor's DevZone at https://devzone.nordicsemi.com/.

{
  "platform": {
    "os": "win32",
    "osVersion": "Windows 10 Pro",
    "osKernel": "10.0.19045",
    "vscode": "1.103.0",
    "electron": "37.2.3",
    "node": "v22.17.0"
  },
  "system": {
    "date": "2025-08-18T09:15:11.091Z",
    "vscodeRoot": "c:\\Program Files\\Microsoft VS Code\\resources\\app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:47:59",
    "osUptime": "129:28:11",
    "cpu": "Intel(R) Core(TM) i7-10700T CPU @ 2.00GHz"
  },
  "workspace": {
    "name": "with_mcuboot",
    "workspaceFile": null,
    "folders": [
      "c:\\ncs\\v3.1.0\\zephyr\\samples\\sysbuild\\with_mcuboot"
    ]
  },
  "sdks": [
    {
      "version": "v3.1.0",
      "path": "c:\\ncs\\v3.1.0"
    },
    {
      "version": "v3.0.0",
      "path": "c:\\ncs\\v3.0.0"
    },
    {
      "version": "v2.9.0",
      "path": "c:\\ncs\\v2.9.0"
    },
    {
      "version": "v2.7.0",
      "path": "c:\\ncs\\v2.7.0"
    },
    {
      "version": "v2.6.1",
      "path": "c:\\ncs\\v2.6.1"
    },
    {
      "version": "v2.5.1",
      "path": "c:\\ncs\\v2.5.1"
    },
    {
      "version": "v2.4.2",
      "path": "c:\\project\\saferoad"
    },
    {
      "version": "v2.4.0",
      "path": "c:\\ncs\\v2.4.0"
    },
    {
      "version": "v2.3.0",
      "path": "c:\\ncs\\v2.3.0"
    },
    {
      "version": "v2.2.0",
      "path": "c:\\ncs\\v2.2.0"
    },
    {
      "version": "v1.9.1",
      "path": "c:\\ncs\\v1.9.1"
    },
    {
      "version": "v1.5.1",
      "path": "c:\\ncs\\v1.5.1"
    }
  ],
  "activeBuild": "c:\\ncs\\v3.1.0\\zephyr\\samples\\sysbuild\\with_mcuboot\\build_1",
  "apps": [
    {
      "workspace": "c:\\ncs\\v3.1.0\\zephyr\\samples\\sysbuild\\with_mcuboot",
      "uri": "c:\\ncs\\v3.1.0\\zephyr\\samples\\sysbuild\\with_mcuboot",
      "buildConfigurations": [
        {
          "id": "c:\\ncs\\v3.1.0\\zephyr\\samples\\sysbuild\\with_mcuboot\\build",
          "name": "build",
          "boardId": "nrf54l15dk/nrf54l15/cpuapp/ns",
          "type": "Sysbuild",
          "isChild": false,
          "isStale": false,
          "taskBindings": {
            "build": [],
            "pristineBuild": [],
            "flash": [],
            "eraseAndFlash": []
          },
          "sdk": "c:\\ncs\\v3.1.0",
          "toolchain": "nRF Connect SDK Toolchain v3.1.0"
        },
        {
          "id": "c:\\ncs\\v3.1.0\\zephyr\\samples\\sysbuild\\with_mcuboot\\build_1",
          "name": "build_1",
          "boardId": "nrf54l15dk/nrf54l15/cpuapp/ns",
          "type": "Zephyr",
          "isChild": false,
          "isStale": false,
          "taskBindings": {
            "build": [],
            "pristineBuild": [],
            "flash": [],
            "eraseAndFlash": []
          },
          "sdk": "c:\\ncs\\v3.1.0",
          "toolchain": "nRF Connect SDK Toolchain v3.1.0"
        }
      ]
    }
  ],
  "toolchains": [
    {
      "version": "3.1.0",
      "path": "c:\\ncs\\toolchains\\b8b84efebd"
    },
    {
      "version": "3.0.0",
      "path": "c:\\ncs\\toolchains\\0b393f9e1b"
    },
    {
      "version": "2.9.0",
      "path": "c:\\ncs\\toolchains\\b620d30767"
    },
    {
      "version": "2.7.0",
      "path": "c:\\ncs\\toolchains\\ce3b5ff664"
    },
    {
      "version": "2.6.1",
      "path": "c:\\ncs\\toolchains\\cf2149caf2"
    },
    {
      "version": "2.5.1",
      "path": "c:\\ncs\\toolchains\\c57af46cb7"
    },
    {
      "version": "2.4.0",
      "path": "c:\\ncs\\toolchains\\31f4403e35"
    },
    {
      "version": "2.3.0",
      "path": "c:\\ncs\\toolchains\\v2.3.0"
    },
    {
      "version": "2.2.0",
      "path": "c:\\ncs\\toolchains\\v2.2.0"
    },
    {
      "version": "2.0.0",
      "path": "c:\\ncs\\toolchains\\v2.0.0"
    },
    {
      "version": "1.9.1",
      "path": "c:\\ncs\\v1.9.1\\toolchain"
    },
    {
      "version": "1.9.1",
      "path": "c:\\ncs\\toolchains\\v1.9.1"
    },
    {
      "version": "1.5.1",
      "path": "c:\\ncs\\v1.5.1\\toolchain"
    }
  ],
  "connectedDevices": [
    {
      "serialNumber": "000203200665"
    },
    {
      "serialNumber": "001057760695"
    }
  ],
  "tools": {
    "C:\\ncs\\toolchains\\b8b84efebd\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.17.0",
    "C:\\Program Files\\SEGGER\\JLink_V818\\JLink.exe": "8.18",
    "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.24.2",
    "C:\\ncs\\toolchains\\b8b84efebd\\nrfutil": "8.1.0",
    "C:\\ncs\\toolchains\\b8b84efebd\\cmake": "3.21.0",
    "C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin\\Scripts\\west.exe": "1.4.0",
    "C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin\\python.exe": "3.12.4",
    "C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin\\ninja.exe": "1.10.2",
    "C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin\\gperf.exe": "3.1",
    "C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin\\dtc.exe": "1.4.7",
    "C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin\\gn.exe": "2223",
    "C:\\ncs\\toolchains\\b8b84efebd\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
    "arm-gdbPath": "c:\\ncs\\toolchains\\b8b84efebd\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe",
    "riscv-gdbPath": "C:\\ncs\\toolchains\\b8b84efebd\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin\\riscv64-zephyr-elf-gdb.exe"
  },
  "nrfutil": {
    "nrfutil-device": {
      "version": "2.7.2",
      "binPath": "c:\\Users\\ErlendEliasIsachsen\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.12.55-win32-x64\\platform\\nrfutil\\bin\\nrfutil-device",
      "jlinkInfo": {
        "description": "This version of SEGGER J-Link is different from the J-Link version that was used to test nrfutil device commands",
        "expectedVersion": {
          "version": "JLink_V7.94i",
          "versionFormat": "string"
        },
        "name": "JlinkARM",
        "version": "JLink_V8.18 ",
        "versionFormat": "string"
      }
    },
    "nrfutil-toolchain-manager": {
      "version": "0.14.4",
      "binPath": "c:\\Users\\ErlendEliasIsachsen\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.12.55-win32-x64\\platform\\nrfutil\\bin\\nrfutil-toolchain-manager"
    }
  },
  "environment": {
    "westEnv": {
      "HOME": "C:\\SPB_Data",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\ErlendEliasIsachsen",
      "PATH": "C:\\ncs\\toolchains\\b8b84efebd;C:\\ncs\\toolchains\\b8b84efebd\\mingw64\\bin;C:\\ncs\\toolchains\\b8b84efebd\\bin;C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin;C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin\\Scripts;c:/ncs/toolchains/b8b84efebd\\opt/nanopb/generator-bin;C:\\ncs\\toolchains\\b8b84efebd\\nrfutil\\bin;C:\\ncs\\toolchains\\b8b84efebd\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;C:\\ncs\\toolchains\\b8b84efebd\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin;c:\\Users\\ErlendEliasIsachsen\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.12.55-win32-x64\\platform\\nrfutil\\lib\\nrfutil-toolchain-manager;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Microchip\\xc8\\v2.31\\bin;C:\\Program Files\\PuTTY\\;C:\\Program Files\\WinMerge;C:\\Program Files\\dotnet\\;C:\\Program Files\\Wolfram Research\\WolframScript\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Program Files\\LLVM\\bin;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files\\otii;C:\\Program Files\\doxygen\\bin;C:\\Program Files\\Graphviz\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\CMake\\bin;C:\\ncs\\nrfutil;C:\\gnuarmemb\\9_2019-q4-major\\bin;C:\\Users\\ErlendEliasIsachsen\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\ErlendEliasIsachsen\\.dotnet\\tools;C:\\Users\\ErlendEliasIsachsen\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\ErlendEliasIsachsen\\AppData\\Local\\Programs\\MiKTeX\\miktex\\bin\\x64\\;",
      "ZEPHYR_BASE": "c:\\ncs\\v3.1.0\\zephyr",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "C:\\ncs\\toolchains\\b8b84efebd\\opt\\zephyr-sdk",
      "PYTHONPATH": "C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin;C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin\\Lib;C:\\ncs\\toolchains\\b8b84efebd\\opt\\bin\\Lib\\site-packages"
    },
    "inherited": {
      "HOME": "C:\\SPB_Data",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\ErlendEliasIsachsen",
      "Path": "C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Microchip\\xc8\\v2.31\\bin;C:\\Program Files\\PuTTY\\;C:\\Program Files\\WinMerge;C:\\Program Files\\dotnet\\;C:\\Program Files\\Wolfram Research\\WolframScript\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Program Files\\LLVM\\bin;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files\\otii;C:\\Program Files\\doxygen\\bin;C:\\Program Files\\Graphviz\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\CMake\\bin;C:\\ncs\\nrfutil;C:\\gnuarmemb\\9_2019-q4-major\\bin;C:\\Users\\ErlendEliasIsachsen\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\ErlendEliasIsachsen\\.dotnet\\tools;C:\\Program Files\\TortoiseSVN\\bin;C:\\Users\\ErlendEliasIsachsen\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\ErlendEliasIsachsen\\AppData\\Local\\Programs\\MiKTeX\\miktex\\bin\\x64\\;",
      "PATH": "C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Microchip\\xc8\\v2.31\\bin;C:\\Program Files\\PuTTY\\;C:\\Program Files\\WinMerge;C:\\Program Files\\dotnet\\;C:\\Program Files\\Wolfram Research\\WolframScript\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Program Files\\LLVM\\bin;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files\\otii;C:\\Program Files\\doxygen\\bin;C:\\Program Files\\Graphviz\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\CMake\\bin;C:\\ncs\\nrfutil;C:\\gnuarmemb\\9_2019-q4-major\\bin;C:\\Users\\ErlendEliasIsachsen\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\ErlendEliasIsachsen\\.dotnet\\tools;C:\\Program Files\\TortoiseSVN\\bin;C:\\Users\\ErlendEliasIsachsen\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\ErlendEliasIsachsen\\AppData\\Local\\Programs\\MiKTeX\\miktex\\bin\\x64\\;"
    }
  },
  "terminal": {
    "defaultProfile": null
  },
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "",
      "toolchain": {
        "path": ""
      },
      "ozonePath": "",
      "applications": [],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig"
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [],
      "taskBindings": {},
      "buildTerminal": {
        "condensedProgress": true
      },
      "debugging": {
        "flash": true,
        "bindings": {},
        "justMyCode": false
      },
      "activeAppFollowActiveEditor": true,
      "flash": {
        "softreset": false,
        "erase": false,
        "recover": false
      },
      "enableTelemetry": true,
      "thirdpartyIntegration": {},
      "toolchainManager": {
        "indexURL": null,
        "installDirectory": null
      },
      "nrfutil": {
        "home": null
      },
      "defaultOpenAction": "ask",
      "terminalProfile": {
        "shell": null
      }
    },
    "nordic-semiconductor.nrf-terminal": {
      "terminalMode": "character"
    },
    "marus25.cortex-debug": {
      "variableUseNaturalFormat": true,
      "liveWatchRefreshRate": "300",
      "armToolchainPath": null,
      "armToolchainPrefix": "arm-none-eabi",
      "gdbPath": null,
      "objdumpPath": null,
      "JLinkGDBServerPath": null,
      "openocdPath": null,
      "pyocdPath": null,
      "PEGDBServerPath": null,
      "stutilPath": null,
      "stlinkPath": null,
      "stm32cubeprogrammer": null,
      "enableTelemetry": true,
      "dbgServerLogfile": null
    }
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2024.12.55",
        "path": "c:\\Users\\ErlendEliasIsachsen\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.12.55-win32-x64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2024.9.14",
        "path": "c:\\Users\\ErlendEliasIsachsen\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2024.9.14",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2025.4.22",
        "path": "c:\\Users\\ErlendEliasIsachsen\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2025.4.22",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2025.4.26",
        "path": "c:\\Users\\ErlendEliasIsachsen\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2025.4.26",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": "1.12.1",
      "ms-vscode.cpptools": "1.27.0",
      "ms-vscode.js-debug": "1.102.0",
      "ms-vscode.js-debug-companion": "1.1.3",
      "ms-vscode.vscode-js-profile-table": "1.0.10",
      "bbenoist.Doxygen": "1.0.0",
      "cschlosser.doxdocgen": "1.4.0",
      "GitHub.copilot": "1.350.0",
      "GitHub.copilot-chat": "0.30.1",
      "josetr.cmake-language-support-vscode": "0.0.9",
      "mcu-debug.debug-tracker-vscode": "0.0.15",
      "mcu-debug.memory-view": "0.0.25",
      "mcu-debug.peripheral-viewer": "1.4.6",
      "mcu-debug.rtos-views": "0.0.7",
      "ms-dotnettools.vscode-dotnet-runtime": "2.3.7",
      "ms-python.vscode-python-envs": "1.2.0",
      "ms-vscode-remote.remote-containers": "0.422.1",
      "ms-vscode.cpptools-extension-pack": "1.3.1",
      "ms-vscode.cpptools-themes": "2.0.0",
      "tomoki1207.pdf": "1.2.2",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "xaver.clang-format": "1.9.0"
    }
  }
}

Parents
  • Hello,

    Sorry for the delay with this issue. Please check the PRs below for the FPROTECT issue:

    https://github.com/nrfconnect/sdk-mcuboot/pull/576 

    https://github.com/nrfconnect/sdk-nrf/pull/25655 

    Kind Regards,

    Abhijith

  • After a while I was finally able to test the fix in some of the newer SDK versions, and I'm now able to build with sysbuild+MCUboot+TFM / non-secure variant with both nRF54l15 DK and our custom boards. However, I only managed to get it working with the partition manager, which since the creation of this thread has been marked as depreciated. As soon as I tried to switch to DTS-style partitioning (nRF Connect SDK 3.3.1) I encountered problems again, for example:

    In file included from C:/ncs/v3.3.1/zephyr/include/zephyr/toolchain.h:52,
                     from C:/ncs/v3.3.1/zephyr/include/zephyr/kernel_includes.h:23,
                     from C:/ncs/v3.3.1/zephyr/include/zephyr/kernel.h:17,
                     from C:/ncs/v3.3.1/bootloader/mcuboot/boot/zephyr/main.c:22:
    C:/ncs/v3.3.1/bootloader/mcuboot/boot/zephyr/main.c: In function 'main':
    C:/ncs/v3.3.1/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "Can not FPROTECT region that big"
       87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), "" MSG)
          |                                    ^~~~~~~~~~~~~~
    C:/ncs/v3.3.1/bootloader/mcuboot/boot/zephyr/main.c:951:5: note: in expansion of macro 'BUILD_ASSERT'
      951 |     BUILD_ASSERT(FPROTECT_REGION_SIZE <= (62 * 1024), "Can not FPROTECT region that big");

    Where again the 62KiB limitation appears (close to the 64KiB / 0x10000 limitation some have reported previously). This was for my custom board/application, but if I modify the "with_mcuboot" sample to use the dts partition manager with nRF54L15 DK ns I get another error:

    Generating files from C:/ncs/v3.3.1/zephyr/samples/sysbuild/with_mcuboot/build/with_mcuboot/zephyr/zephyr.elf for board: nrf54l15dk/nrf54l15/cpuapp/ns
    Usage: imgtool.py sign [OPTIONS] INFILE OUTFILE
    Try 'imgtool.py sign -h' for help.
    
    Error: Image size (0x91580) + trailer (0x20) exceeds requested size 0x80000
    image.py: sign the digest
    ninja: build stopped: subcommand failed.

    So before marking this problem as resolved, it would be nice to be able to build my applications or even a sample application with the latest/current recommended configuration for the nRF54L15:

    MCUboot+sysbuild+ns-variant+dts-style partitioning.

    Or, even better:
    NSIB+MCUboot+sysbuild+ns-variant+dts-style partitioning+KMU.

    Which seems to be the latest recommendation based on your previous answer and this guide.

    Any suggestions?

  • So before marking this problem as resolved, it would be nice to be able to build my applications or even a sample application with the latest/current recommended configuration for the nRF54L15:

    MCUboot+sysbuild+ns-variant+dts-style partitioning.

    Please could someone make a sample application as a starting point for MCUBOOT+sysbuild+ns-variant+dts-style partitioning.  I've got a new project, so don't want to try and use Partition Manager and migrate from that. I too am getting similar Image size exceeds requested size. I can't see where it's getting boot_partition as it seemed to still try and compile with it removed from all my overlays.

    Thanks for the links to the KMU and NSIB but if someone at Nordic who is familiar with these things can make a demo that would really help, given it looks like the tooling is still being worked on, so it's hard to know where the problems are coming from!

  • Hi,

    There is a sample in Zephyr on how to use MCUBoot with Sysbuild (link). I tried to build it for the nrf9151dk/nrf9151/ns, and it seems to build.

    If you want to see the default partitioning to base your partitioning on, you can find it in the SDK. For the nRF9151 DK it is located in "ncs/v3.4.0/zephyr/dts/vendor/nordic/nrf91xx_partition.dtsi".

    If you still need more information, can you please make a new ticket ?

    Best regards,

    Simon

  • It was specifically nRF54L15, as mentioned in the ticket I was hoping for an example for. I tried SB_CONFIG_BOOTLOADER_MCUBOOT=y and got errors for lack of partitions.

  • Hi,

    Can you please create another ticket for this?

    This is not exactly the subject of this thread. And it helps us to keep the threads clean.

    Best regards,

    Simon

  • Can you please try the new fix? 

    Thank you. I have now verified this in the nRF Connect SDK v3.4.0, and it is indeed (barely) possible to build with the recommended configuration in v3.4.0.

    It would still be nice with an example/sample app that is "secure by default" as some other comments here requested to make the process a bit easier. I had to combine the current ticket, this ticketanother ticket, yet another ticket and migrate to 3.4.0 to get the board to boot in the recommended secure configuration (along the guides you suggested). While this is not exactly what the original ticket was about, the essence of this ticket was:

    creating a new application for the nRF54l15 and want to follow the latest recommendations for project configuration

    which is still quite tricky to do to be honest. 

    So for anyone else attempting to build with the recommended configuration, you would need something like this:
    partitions/
     partitions_ns.dtsi
     partitions.dtsi

    Here you put your "static" partition layout. They should look something like this:

    &cpuapp_rram {
    	/* Application does not use cpuflpr core. Assign whole RRAM to cpuapp. */
    	reg = <0x0 DT_SIZE_K(1524)>;
    
    	/delete-node/ partitions;
    	
    	partitions {
    	 // Your static partitions here...
    	};
    };

    non-ns and ns partitions should match closely, MCUBoot (and NSIB) will use the secure variant to get their partition config, and the application will use the ns variant.

    Then, create overlays to ensure the board picks them up:
    boards/
     boardname_cpuapp_ns.overlay
     boardname_cpuapp.overlay

    These overlays should simply include the partition files

    Next you need b0 (if you use NSIB as recommended) and MCUBoot to pick up the right configuration:

    sysbuild/
     b0/
      prj.conf (NSIB configuration with what you need, keeping it below 31 kiB for protection compatibility)
      boards/
       boardname_cpuapp.overlay (uses the secure layout)
     mcuboot/
      prj.conf
      boards/
       boardname_cpuapp.overlay (uses the secure layout)

    These board overlays select zephyr,code-partition (&b0_partition and &boot_partition, respectively) and include the partitions via the overlays in boards/.

    Finally, sysbuild.conf need to set boot signature types and files for both B0 and MCUBoot and enable NSIB. Keys must be provisioned to both BL_PUBKEY and UROT_PUBKEY when using NSIB and MCUBoot.

    Since I don't have a basic setup with this I unfortunately can't share the full setup, so hopefully Nordic will provide a sample for the recommended secure configuration in the near future. Otherwise the tickets I shared earlier are very useful. I also want to highlight mcuboot-sysbuild-ns-variant-dts-style-partitioning-example ticket (also mentioned earlier) to follow progress on a sample that includes all this.
      

Reply
  • Can you please try the new fix? 

    Thank you. I have now verified this in the nRF Connect SDK v3.4.0, and it is indeed (barely) possible to build with the recommended configuration in v3.4.0.

    It would still be nice with an example/sample app that is "secure by default" as some other comments here requested to make the process a bit easier. I had to combine the current ticket, this ticketanother ticket, yet another ticket and migrate to 3.4.0 to get the board to boot in the recommended secure configuration (along the guides you suggested). While this is not exactly what the original ticket was about, the essence of this ticket was:

    creating a new application for the nRF54l15 and want to follow the latest recommendations for project configuration

    which is still quite tricky to do to be honest. 

    So for anyone else attempting to build with the recommended configuration, you would need something like this:
    partitions/
     partitions_ns.dtsi
     partitions.dtsi

    Here you put your "static" partition layout. They should look something like this:

    &cpuapp_rram {
    	/* Application does not use cpuflpr core. Assign whole RRAM to cpuapp. */
    	reg = <0x0 DT_SIZE_K(1524)>;
    
    	/delete-node/ partitions;
    	
    	partitions {
    	 // Your static partitions here...
    	};
    };

    non-ns and ns partitions should match closely, MCUBoot (and NSIB) will use the secure variant to get their partition config, and the application will use the ns variant.

    Then, create overlays to ensure the board picks them up:
    boards/
     boardname_cpuapp_ns.overlay
     boardname_cpuapp.overlay

    These overlays should simply include the partition files

    Next you need b0 (if you use NSIB as recommended) and MCUBoot to pick up the right configuration:

    sysbuild/
     b0/
      prj.conf (NSIB configuration with what you need, keeping it below 31 kiB for protection compatibility)
      boards/
       boardname_cpuapp.overlay (uses the secure layout)
     mcuboot/
      prj.conf
      boards/
       boardname_cpuapp.overlay (uses the secure layout)

    These board overlays select zephyr,code-partition (&b0_partition and &boot_partition, respectively) and include the partitions via the overlays in boards/.

    Finally, sysbuild.conf need to set boot signature types and files for both B0 and MCUBoot and enable NSIB. Keys must be provisioned to both BL_PUBKEY and UROT_PUBKEY when using NSIB and MCUBoot.

    Since I don't have a basic setup with this I unfortunately can't share the full setup, so hopefully Nordic will provide a sample for the recommended secure configuration in the near future. Otherwise the tickets I shared earlier are very useful. I also want to highlight mcuboot-sysbuild-ns-variant-dts-style-partitioning-example ticket (also mentioned earlier) to follow progress on a sample that includes all this.
      

Children
No Data
Related