Multiple TF-M secure partitions

I am working with the "TF-M secure peripheral partition" sample project (nRF5340DK, NCS v2.5.0, nrf/samples/tfm/tfm_secure_peripheral), and modifying it as necessary to add a 2nd secure partition. With the file at ./CMakeLists.txt, I made the following changes based on instructions here:

  # ...(rest of the first part of the file)...
  
  configure_file(
    ${CMAKE_CURRENT_LIST_DIR}/secure_peripheral_partition/tfm_manifest_list.yaml.in
    ${CMAKE_CURRENT_BINARY_DIR}/secure_peripheral_partition/tfm_manifest_list.yaml
  )
  
  configure_file(
    ${CMAKE_CURRENT_LIST_DIR}/secure_encryption_partition/tfm_manifest_list.yaml.in
    ${CMAKE_CURRENT_BINARY_DIR}/secure_encryption_partition/tfm_manifest_list.yaml
  )

  set_property(TARGET zephyr_property_target
    APPEND PROPERTY TFM_CMAKE_OPTIONS
    -DTFM_EXTRA_MANIFEST_LIST_FILES="${CMAKE_CURRENT_BINARY_DIR}/secure_peripheral_partition/tfm_manifest_list.yaml;${CMAKE_CURRENT_BINARY_DIR}/secure_encryption_partition/tfm_manifest_list.yaml"
    -DTFM_EXTRA_PARTITION_PATHS="${CMAKE_CURRENT_LIST_DIR}/secure_peripheral_partition;${CMAKE_CURRENT_LIST_DIR}/secure_encryption_partition"
  )
  
  # ... (other options)
  
  target_compile_definitions(app
    PRIVATE
      TFM_PARTITION_SECURE_PERIPHERAL_PARTITION
      TFM_PARTITION_SECURE_ENCRYPTION_PARTITION
  )

But when I tried to build, I get the following error:

CMake Error at tools/CMakeLists.txt:65 (message):
  Manifest list
  <path_to_proj>/build_nrf53_ns/secure_peripheral_partition/tfm_manifest_list.yaml
  <path_to_proj>/build_nrf53_ns/secure_encryption_partition/tfm_manifest_list.yaml
  doesn't exist

Any help with this that anyone can suggest?

Related