On a project with flash enabled, Sysbuild seems to look for a pm file when it doesn't exist

Hello, I am porting my projects from NCS v2.6.0 to v2.7.0 and I am defaulting my builds with sysbuild enabled.

I have a project that has FLASH enabled but doesn't have any bootloader enabled.

With sysbuild enabled, the build system seems to look for a pm static file, which doesn't exist for this project. So I get this error:

nrf/include/flash_map_pm.h:52:18: error: 'PM_PM_PM_data_storage_ID_LABEL_SIZE' undeclared here (not in a function)

If I disable sysbuild however, the project builds and runs fine.

If I enable sysbuild and provide a pm static file, the project in this case builds with a warning:

nrf/cmake/sysbuild/partition_manager.cmake:166 (message): MCUboot padding partition size is 0x200 but signing uses , please adjust PM_MCUBOOT_PAD value in sysbuild Kconfig to 0x200.

however it doesn't run. This seems to be caused by the fact that the partition map includes a bootloader (mcuboot) partition, which the project doesn't need

I am thinking of disabling sysbuild for this project but is the behaviour I've described expected?

I am also confused about these following points:

  1. Can sysbuild run without a pm file? I can see CONFIG_PARTITION_MANAGER_ENABLED being enabled whenever I use sysbuild
  2. Can a pm file be defined without bootloaders?

I'd appreciate some help.

Parents Reply Children
  • Thanks Sigurd. That works well and will be my way forward for smaller projects where I don't want to define a PM file.

    My intention is to keep Sysbuild enabled by default in our build script for all projects, no matter the complexity. I think I remember reading that NCS now enables Sysbuild by default, so do you think this is a good approach?

    What I don't understand is when I disable SB_CONFIG_PARTITION_MANAGER, what definitions it is using?Because the memory report from west build reports a region size of 1MB but my DTS flash partitions have two slots of roughly 500 KB.

  • dtp said:
    Because the memory report from west build reports a region size of 1MB

    The memory report uses whatever is available from the linker itself. You can see this in build/project_name/zephyr/linker.cmd.

    dtp said:
    my DTS flash partitions have two slots of roughly 500 KB.

    What are those?
    If they are slot0_partition and slot1_partition, I think they are intended to be used for MCUboot. And thus, they are not used whenever MCUboot  is not enabled. I am not sure exactly where this is decided, but it would not make sense to partition the flash into two parts like this unless you intend to use DFU.

    Figuring out where this

    Is this enough of an explanation for you?

  • They are the slot0 and slot1 partitions, yes.

    I understand better now, thank you.

Related