Skip to content

Commit 750a2ac

Browse files
committed
Use paths explicitly in copy from mbed libs
1 parent 447acd0 commit 750a2ac

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

tools/build_api.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,18 +1010,21 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
10101010
hal_objects = toolchain.compile_sources(hal_res, incdirs + [tmp_path])
10111011

10121012
# Copy everything into the build directory
1013-
to_copy = [FileRef(basename(p), p) for p in sum([
1014-
hal_res.headers,
1015-
hal_res.hex_files,
1016-
hal_res.bin_files,
1017-
hal_res.libraries,
1018-
cmsis_res.headers,
1019-
cmsis_res.bin_files,
1020-
[cmsis_res.linker_script, hal_res.linker_script, MBED_CONFIG_FILE],
1013+
to_copy_paths = [
1014+
hal_res.get_file_paths(FileType.HEADER),
1015+
hal_res.get_file_paths(FileType.HEX),
1016+
hal_res.get_file_paths(FileType.BIN),
1017+
hal_res.get_file_paths(FileType.LIB),
1018+
cmsis_res.get_file_paths(FileType.HEADER),
1019+
cmsis_res.get_file_paths(FileType.BIN),
1020+
cmsis_res.get_file_paths(FileType.LD_SCRIPT),
1021+
hal_res.get_file_paths(FileType.LD_SCRIPT),
1022+
[MBED_CONFIG_FILE],
10211023
cmsis_objects,
10221024
hal_objects,
10231025
separate_objects,
1024-
], [])]
1026+
]
1027+
to_copy = [FileRef(basename(p), p) for p in sum(to_copy_paths, [])]
10251028
toolchain.copy_files(to_copy, build_toolchain)
10261029

10271030
if report is not None:

0 commit comments

Comments
 (0)