Merge pull request #9892 from kfnta/psoc6_binary_hook

Update PSOC6 postbuild prints
pull/9896/head
Martin Kojtal 2019-03-01 11:24:33 +01:00 committed by GitHub
commit 7ed16fbd76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -120,13 +120,13 @@ def find_cm0_image(toolchain, resources, elf, hexf, hex_filename):
from tools.resources import FileType
hex_files = resources.get_file_paths(FileType.HEX)
m0hexf = next((f for f in hex_files if os.path.basename(f) == hex_filename), None)
if toolchain.target.name.endswith('_PSA'):
if toolchain.target.is_PSA_non_secure_target:
m0hexf = next((f for f in hex_files if os.path.basename(f) == os.path.basename(hexf)), m0hexf)
if m0hexf:
toolchain.notify.debug("M0 core image file found: %s." % os.path.basename(m0hexf))
toolchain.notify.info("M0 core image file found: %s." % m0hexf)
else:
toolchain.notify.debug("M0 core hex image file %s not found. Aborting." % hex_filename)
toolchain.notify.info("M0 core hex image file %s not found. Aborting." % hex_filename)
raise ConfigException("Required M0 core hex image not found.")
return m0hexf