Skip to content

Commit 0668287

Browse files
committed
[restructure] Fixed relative path issue related to mbed.h
1 parent bc61170 commit 0668287

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tools/build_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import fnmatch
2929

3030
from tools.utils import mkdir, run_cmd, run_cmd_ext, NotSupportedException, ToolException, InvalidReleaseTargetException
31-
from tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_DRIVERS, MBED_PLATFORM, MBED_HAL, MBED_CONFIG_FILE
31+
from tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_DRIVERS, MBED_PLATFORM, MBED_HAL, MBED_HEADER, MBED_CONFIG_FILE
3232
from tools.targets import TARGET_NAMES, TARGET_MAP
3333
from tools.libraries import Library
3434
from tools.toolchains import TOOLCHAIN_CLASSES
@@ -714,7 +714,7 @@ def build_mbed_libs(target, toolchain_name, options=None, verbose=False, clean=F
714714
toolchain.info("Building library %s (%s, %s)" % ('MBED', target.name, toolchain_name))
715715

716716
# Common Headers
717-
toolchain.copy_files(['mbed.h'], MBED_LIBRARIES)
717+
toolchain.copy_files([MBED_HEADER], MBED_LIBRARIES)
718718
toolchain.copy_files(toolchain.scan_resources(MBED_DRIVERS).headers, MBED_LIBRARIES)
719719
toolchain.copy_files(toolchain.scan_resources(MBED_PLATFORM).headers, MBED_LIBRARIES)
720720
toolchain.copy_files(toolchain.scan_resources(MBED_HAL).headers, MBED_LIBRARIES)
@@ -943,7 +943,7 @@ def static_analysis_scan(target, toolchain_name, CPPCHECK_CMD, CPPCHECK_MSG_FORM
943943
toolchain.info("Static analysis for %s (%s, %s)" % ('MBED', target.name, toolchain_name))
944944

945945
# Common Headers
946-
toolchain.copy_files(['mbed.h'], MBED_LIBRARIES)
946+
toolchain.copy_files([MBED_HEADER], MBED_LIBRARIES)
947947
toolchain.copy_files(toolchain.scan_resources(MBED_DRIVERS).headers, MBED_LIBRARIES)
948948
toolchain.copy_files(toolchain.scan_resources(MBED_PLATFORM).headers, MBED_LIBRARIES)
949949
toolchain.copy_files(toolchain.scan_resources(MBED_HAL).headers, MBED_LIBRARIES)

tools/paths.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
TOOLS_BOOTLOADERS = join(TOOLS, "bootloaders")
3232

3333
# mbed libraries
34+
MBED_HEADER = join(ROOT, "mbed.h")
35+
3436
MBED_DRIVERS = join(ROOT, "drivers")
3537
MBED_PLATFORM = join(ROOT, "platform")
3638
MBED_HAL = join(ROOT, "hal")

0 commit comments

Comments
 (0)