Skip to content

Commit 5a46ac7

Browse files
committed
Fixing test builds for devices with softdevices.
Previously, .hex files were not copied when building source as a library. This prevents builds that pre compile source as a library and then includes the build directory as the only source (because there is no softdevice present). This PR copies hex files when compiling source as a library.
1 parent ffa45c9 commit 5a46ac7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/build_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ def build_library(src_paths, build_path, target, toolchain_name,
310310
toolchain.copy_files(resource.libraries, build_path, rel_path=resource.base_path)
311311
if resource.linker_script:
312312
toolchain.copy_files(resource.linker_script, build_path, rel_path=resource.base_path)
313+
314+
if resource.hex_files:
315+
toolchain.copy_files(resource.hex_files, build_path, rel_path=resource.base_path)
313316

314317
# Extend resources collection
315318
if not resources:
@@ -494,6 +497,7 @@ def build_lib(lib_id, target, toolchain_name, options=None, verbose=False, clean
494497
# Copy Headers
495498
for resource in resources:
496499
toolchain.copy_files(resource.headers, build_path, rel_path=resource.base_path)
500+
497501
dependencies_include_dir.extend(toolchain.scan_resources(build_path).inc_dirs)
498502

499503
# Compile Sources

0 commit comments

Comments
 (0)