@@ -999,19 +999,6 @@ def build_mbed_libs(target, toolchain_name, verbose=False,
999
999
config .add_config_files ([MBED_CONFIG_FILE ])
1000
1000
toolchain .set_config_data (toolchain .config .get_config_data ())
1001
1001
1002
- # CMSIS
1003
- toolchain .info ("Building library %s (%s, %s)" %
1004
- ('CMSIS' , target .name , toolchain_name ))
1005
- cmsis_src = MBED_CMSIS_PATH
1006
- resources = toolchain .scan_resources (cmsis_src )
1007
-
1008
- toolchain .copy_files (resources .headers , build_target )
1009
- toolchain .copy_files (resources .linker_script , build_toolchain )
1010
- toolchain .copy_files (resources .bin_files , build_toolchain )
1011
-
1012
- objects = toolchain .compile_sources (resources , tmp_path )
1013
- toolchain .copy_files (objects , build_toolchain )
1014
-
1015
1002
# mbed
1016
1003
toolchain .info ("Building library %s (%s, %s)" %
1017
1004
('MBED' , target .name , toolchain_name ))
@@ -1027,9 +1014,12 @@ def build_mbed_libs(target, toolchain_name, verbose=False,
1027
1014
toolchain .copy_files (resources .headers , dest )
1028
1015
library_incdirs .append (dest )
1029
1016
1030
- # Target specific sources
1031
- hal_src = MBED_TARGETS_PATH
1032
- hal_implementation = toolchain .scan_resources (hal_src )
1017
+ cmsis_implementation = toolchain .scan_resources (MBED_CMSIS_PATH )
1018
+ toolchain .copy_files (cmsis_implementation .headers , build_target )
1019
+ toolchain .copy_files (cmsis_implementation .linker_script , build_toolchain )
1020
+ toolchain .copy_files (cmsis_implementation .bin_files , build_toolchain )
1021
+
1022
+ hal_implementation = toolchain .scan_resources (MBED_TARGETS_PATH )
1033
1023
toolchain .copy_files (hal_implementation .headers +
1034
1024
hal_implementation .hex_files +
1035
1025
hal_implementation .libraries +
@@ -1038,8 +1028,8 @@ def build_mbed_libs(target, toolchain_name, verbose=False,
1038
1028
toolchain .copy_files (hal_implementation .linker_script , build_toolchain )
1039
1029
toolchain .copy_files (hal_implementation .bin_files , build_toolchain )
1040
1030
incdirs = toolchain .scan_resources (build_target ).inc_dirs
1041
- objects = toolchain .compile_sources (hal_implementation ,
1042
- library_incdirs + incdirs )
1031
+ objects = toolchain .compile_sources (cmsis_implementation + hal_implementation ,
1032
+ library_incdirs + incdirs + [ tmp_path ] )
1043
1033
toolchain .copy_files (objects , build_toolchain )
1044
1034
1045
1035
# Common Sources
0 commit comments