Skip to content

Commit e35f314

Browse files
committed
Add --skip-copy functionality to build_tfm.py
This feature skips the copying of TF-M dependencies files and folders to Mbed OS.
1 parent 66aff78 commit e35f314

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

build_tfm.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -535,19 +535,21 @@ def _build_target(tgt, cmake_build_dir, args):
535535

536536
_run_cmake_build(cmake_build_dir, args, tgt, args.config)
537537

538-
source = join(cmake_build_dir, "install", "outputs", tgt[1].upper())
539-
_copy_binaries(source, tgt[3], tgt[2], tgt[0])
540-
tgt_list.append((tgt[0], tgt[2]))
538+
if not args.skip_copy:
539+
source = join(cmake_build_dir, "install", "outputs", tgt[1].upper())
540+
_copy_binaries(source, tgt[3], tgt[2], tgt[0])
541+
tgt_list.append((tgt[0], tgt[2]))
541542

542543
if args.commit:
543544
_commit_changes(tgt[3], tgt_list)
544545

545-
if args.config == SUPPORTED_TFM_CONFIGS[1]:
546-
_copy_library(cmake_build_dir, tgt[2])
547-
elif args.config in SUPPORTED_TFM_PSA_CONFIGS:
548-
_copy_psa_libs(cmake_build_dir, ROOT, args)
546+
if not args.skip_copy:
547+
if args.config == SUPPORTED_TFM_CONFIGS[1]:
548+
_copy_library(cmake_build_dir, tgt[2])
549+
elif args.config in SUPPORTED_TFM_PSA_CONFIGS:
550+
_copy_psa_libs(cmake_build_dir, ROOT, args)
549551

550-
_copy_tfm_ns_files(cmake_build_dir, tgt[0])
552+
_copy_tfm_ns_files(cmake_build_dir, tgt[0])
551553

552554

553555
def _build_tfm(args):
@@ -674,6 +676,13 @@ def _get_parser():
674676
default=False,
675677
)
676678

679+
parser.add_argument(
680+
"--skip-copy",
681+
help="Skip copying TF-M dependencies to Mbed OS",
682+
action="store_true",
683+
default=False,
684+
)
685+
677686
return parser
678687

679688

0 commit comments

Comments
 (0)