Skip to content

Commit

Permalink
Fix output file name in infineon builds. (#11417)
Browse files Browse the repository at this point in the history
Also add flashbundle support.
  • Loading branch information
andy31415 authored Nov 4, 2021
1 parent 754a08c commit 8dabc5d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion scripts/build/builders/infineon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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()
}

0 comments on commit 8dabc5d

Please sign in to comment.