Sysbuild: Accessing Partition Manager variables in CMake

I am migrating a project to Sysbuild where we previously were doing some post-build steps that require access to PM variables like PM_MCUBOOT_PRIMARY_SIZE.

Previously, we would access these variables using constructs like:

--slot-size $<TARGET_PROPERTY:partition_manager,PM_MCUBOOT_PRIMARY_SIZE>

However, with sysbuild, we can no access these variables in our CMakeLists.txt file.

For example, if we place the following in CMakeLists.txt:

get_property(PM_MCUBOOT_PRIMARY_SIZE TARGET partition_manager PROPERTY PM_MCUBOOT_PRIMARY_SIZE)

we get the error:

CMake Error at CMakeLists.txt:(get_property):
get_property could not find TARGET partition_manager. Perhaps it has not
yet been created.

Is there some way we can work around this issue?

Thanks,

Jon

Parents Reply Children
No Data
Related