From 22b5c78191a86fde6e714ab339ba38e09934cae3 Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Tue, 14 Jun 2016 16:12:32 +0100 Subject: [PATCH] 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. --- tools/build_api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/build_api.py b/tools/build_api.py index e34e74d6e6..bf8a567963 100644 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -310,6 +310,9 @@ def build_library(src_paths, build_path, target, toolchain_name, toolchain.copy_files(resource.libraries, build_path, rel_path=resource.base_path) if resource.linker_script: toolchain.copy_files(resource.linker_script, build_path, rel_path=resource.base_path) + + if resource.hex_files: + toolchain.copy_files(resource.hex_files, build_path, rel_path=resource.base_path) # Extend resources collection if not resources: @@ -494,6 +497,7 @@ def build_lib(lib_id, target, toolchain_name, options=None, verbose=False, clean # Copy Headers for resource in resources: toolchain.copy_files(resource.headers, build_path, rel_path=resource.base_path) + dependencies_include_dir.extend(toolchain.scan_resources(build_path).inc_dirs) # Compile Sources