28
28
import fnmatch
29
29
30
30
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_CONFIG_FILE
31
+ from tools .paths import MBED_TARGETS_PATH , MBED_LIBRARIES , MBED_DRIVERS , MBED_PLATFORM , MBED_HAL , MBED_CONFIG_FILE
32
32
from tools .targets import TARGET_NAMES , TARGET_MAP
33
33
from tools .libraries import Library
34
34
from tools .toolchains import TOOLCHAIN_CLASSES
@@ -715,8 +715,9 @@ def build_mbed_libs(target, toolchain_name, options=None, verbose=False, clean=F
715
715
716
716
# Common Headers
717
717
toolchain .copy_files (['mbed.h' ], MBED_LIBRARIES )
718
- toolchain .copy_files (toolchain .scan_resources (MBED_DRIVERS ).headers , join (MBED_LIBRARIES , 'drivers' ))
719
- toolchain .copy_files (toolchain .scan_resources (MBED_PLATFORM ).headers , join (MBED_LIBRARIES , 'platform' ))
718
+ toolchain .copy_files (toolchain .scan_resources (MBED_DRIVERS ).headers , MBED_LIBRARIES )
719
+ toolchain .copy_files (toolchain .scan_resources (MBED_PLATFORM ).headers , MBED_LIBRARIES )
720
+ toolchain .copy_files (toolchain .scan_resources (MBED_HAL ).headers , MBED_LIBRARIES )
720
721
721
722
# Target specific sources
722
723
HAL_SRC = MBED_TARGETS_PATH
@@ -726,7 +727,9 @@ def build_mbed_libs(target, toolchain_name, options=None, verbose=False, clean=F
726
727
objects = toolchain .compile_sources (hal_implementation , TMP_PATH , [MBED_LIBRARIES ] + incdirs )
727
728
728
729
# Common Sources
729
- mbed_resources = toolchain .scan_resources (MBED_DRIVERS ) + toolchain .scan_resources (MBED_PLATFORM )
730
+ mbed_resources = (toolchain .scan_resources (MBED_DRIVERS )
731
+ + toolchain .scan_resources (MBED_PLATFORM )
732
+ + toolchain .scan_resources (MBED_HAL ))
730
733
objects += toolchain .compile_sources (mbed_resources , TMP_PATH , [MBED_LIBRARIES ] + incdirs )
731
734
732
735
# A number of compiled files need to be copied as objects as opposed to
@@ -941,8 +944,9 @@ def static_analysis_scan(target, toolchain_name, CPPCHECK_CMD, CPPCHECK_MSG_FORM
941
944
942
945
# Common Headers
943
946
toolchain .copy_files (['mbed.h' ], MBED_LIBRARIES )
944
- toolchain .copy_files (toolchain .scan_resources (MBED_DRIVERS ).headers , join (MBED_LIBRARIES , 'drivers' ))
945
- toolchain .copy_files (toolchain .scan_resources (MBED_PLATFORM ).headers , join (MBED_LIBRARIES , 'platform' ))
947
+ toolchain .copy_files (toolchain .scan_resources (MBED_DRIVERS ).headers , MBED_LIBRARIES )
948
+ toolchain .copy_files (toolchain .scan_resources (MBED_PLATFORM ).headers , MBED_LIBRARIES )
949
+ toolchain .copy_files (toolchain .scan_resources (MBED_HAL ).headers , MBED_LIBRARIES )
946
950
947
951
# Target specific sources
948
952
HAL_SRC = MBED_TARGETS_PATH
@@ -960,13 +964,16 @@ def static_analysis_scan(target, toolchain_name, CPPCHECK_CMD, CPPCHECK_MSG_FORM
960
964
target_macros = ["-D%s" % s for s in toolchain .get_symbols () + toolchain .macros ]
961
965
962
966
# Common Sources
963
- mbed_resources = toolchain .scan_resources (MBED_DRIVERS ) + toolchain .scan_resources (MBED_PLATFORM )
967
+ mbed_resources = (toolchain .scan_resources (MBED_DRIVERS )
968
+ + toolchain .scan_resources (MBED_PLATFORM )
969
+ + toolchain .scan_resources (MBED_HAL ))
964
970
965
971
# Gather include paths, c, cpp sources and macros to transfer to cppcheck command line
966
972
mbed_includes = ["-I%s" % i for i in mbed_resources .inc_dirs ]
967
973
mbed_includes .append ("-I%s" % str (BUILD_TARGET ))
968
974
mbed_includes .append ("-I%s" % str (MBED_DRIVERS ))
969
975
mbed_includes .append ("-I%s" % str (MBED_PLATFORM ))
976
+ mbed_includes .append ("-I%s" % str (MBED_HAL ))
970
977
mbed_c_sources = " " .join (mbed_resources .c_sources )
971
978
mbed_cpp_sources = " " .join (mbed_resources .cpp_sources )
972
979
0 commit comments