aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/tfm_parse_manifest_list.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/tfm_parse_manifest_list.py b/tools/tfm_parse_manifest_list.py
index cfc6bfcbde..e788554bdf 100644
--- a/tools/tfm_parse_manifest_list.py
+++ b/tools/tfm_parse_manifest_list.py
@@ -77,7 +77,13 @@ def process_manifest(manifest_list_files):
memorytemplate = ENV.get_template('secure_fw/partitions/partition_intermedia.template')
print("Start to generate PSA manifests:")
+ pid_list = []
for manifest_item in manifest_list:
+ # Check if partition ID is duplicated
+ if manifest_item['pid'] in pid_list:
+ raise Exception("PID No. {pid} has already been used!".format(pid=manifest_item['pid']))
+ pid_list.append(manifest_item['pid'])
+
# Replace environment variables in the manifest path
manifest_path = os.path.expandvars(manifest_item['manifest'])
file = open(manifest_path)