From 8356948e153fba9a937e82f3bee2829af8cabc2a Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 4 Nov 2021 08:51:15 -0400 Subject: [PATCH] Fix output file name in infineon builds. (#11417) Also add flashbundle support. --- scripts/build/builders/infineon.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/build/builders/infineon.py b/scripts/build/builders/infineon.py index c7e23fc67d7e3a..4a4b0febf44acd 100644 --- a/scripts/build/builders/infineon.py +++ b/scripts/build/builders/infineon.py @@ -34,7 +34,15 @@ def AppNamePrefix(self): if self == InfineonApp.LOCK: return 'chip-p6-lock-example' elif self == InfineonApp.ALL_CLUSTERS: - return 'chip-p6-all-clusters-example' + return 'chip-p6-clusters-example' + else: + raise Exception('Unknown app type: %r' % self) + + def FlashBundleName(self): + if self == InfineonApp.LOCK: + return 'lock_app.flashbundle.txt' + elif self == InfineonApp.ALL_CLUSTERS: + return 'clusters_app.flashbundle.txt' else: raise Exception('Unknown app type: %r' % self) @@ -75,3 +83,9 @@ def build_outputs(self): } return items + + def flashbundle(self): + with open(os.path.join(self.output_dir, self.app.FlashBundleName()), 'r') as fp: + return { + l.strip(): os.path.join(self.output_dir, l.strip()) for l in fp.readlines() if l.strip() + } \ No newline at end of file