mirror of https://github.com/ARMmbed/mbed-os.git
tools: cmsis and hal are build together
Build api used to build cmsis separately (how mbed 2 is being build). This is currently not how cmsis is being defined. As there target dependencies in some cases, we should include paths from targets when building cmsispull/5770/head
parent
038324a7e5
commit
e07b3c7ac6
|
@ -999,19 +999,6 @@ def build_mbed_libs(target, toolchain_name, verbose=False,
|
|||
config.add_config_files([MBED_CONFIG_FILE])
|
||||
toolchain.set_config_data(toolchain.config.get_config_data())
|
||||
|
||||
# CMSIS
|
||||
toolchain.info("Building library %s (%s, %s)" %
|
||||
('CMSIS', target.name, toolchain_name))
|
||||
cmsis_src = MBED_CMSIS_PATH
|
||||
resources = toolchain.scan_resources(cmsis_src)
|
||||
|
||||
toolchain.copy_files(resources.headers, build_target)
|
||||
toolchain.copy_files(resources.linker_script, build_toolchain)
|
||||
toolchain.copy_files(resources.bin_files, build_toolchain)
|
||||
|
||||
objects = toolchain.compile_sources(resources, tmp_path)
|
||||
toolchain.copy_files(objects, build_toolchain)
|
||||
|
||||
# mbed
|
||||
toolchain.info("Building library %s (%s, %s)" %
|
||||
('MBED', target.name, toolchain_name))
|
||||
|
@ -1027,9 +1014,12 @@ def build_mbed_libs(target, toolchain_name, verbose=False,
|
|||
toolchain.copy_files(resources.headers, dest)
|
||||
library_incdirs.append(dest)
|
||||
|
||||
# Target specific sources
|
||||
hal_src = MBED_TARGETS_PATH
|
||||
hal_implementation = toolchain.scan_resources(hal_src)
|
||||
cmsis_implementation = toolchain.scan_resources(MBED_CMSIS_PATH)
|
||||
toolchain.copy_files(cmsis_implementation.headers, build_target)
|
||||
toolchain.copy_files(cmsis_implementation.linker_script, build_toolchain)
|
||||
toolchain.copy_files(cmsis_implementation.bin_files, build_toolchain)
|
||||
|
||||
hal_implementation = toolchain.scan_resources(MBED_TARGETS_PATH)
|
||||
toolchain.copy_files(hal_implementation.headers +
|
||||
hal_implementation.hex_files +
|
||||
hal_implementation.libraries +
|
||||
|
@ -1038,8 +1028,8 @@ def build_mbed_libs(target, toolchain_name, verbose=False,
|
|||
toolchain.copy_files(hal_implementation.linker_script, build_toolchain)
|
||||
toolchain.copy_files(hal_implementation.bin_files, build_toolchain)
|
||||
incdirs = toolchain.scan_resources(build_target).inc_dirs
|
||||
objects = toolchain.compile_sources(hal_implementation,
|
||||
library_incdirs + incdirs)
|
||||
objects = toolchain.compile_sources(cmsis_implementation + hal_implementation,
|
||||
library_incdirs + incdirs + [tmp_path])
|
||||
toolchain.copy_files(objects, build_toolchain)
|
||||
|
||||
# Common Sources
|
||||
|
|
Loading…
Reference in New Issue