Correct exporting with cortex-M23 and M33

pull/6818/head
Jimmy Brisson 2018-04-17 11:58:02 -05:00 committed by adbridge
parent 8febfd99f2
commit 3b76d9d94d
2 changed files with 10 additions and 9 deletions

View File

@ -2077,8 +2077,9 @@ def find_tests(base_dir, target_name, toolchain_name, app_config=None):
commons = []
# Prepare the toolchain
toolchain = prepare_toolchain([base_dir], None, target_name, toolchain_name,
silent=True, app_config=app_config)
toolchain = prepare_toolchain(
[base_dir], base_dir, target_name, toolchain_name, silent=True,
app_config=app_config)
# Scan the directory for paths to probe for 'TESTS' folders
base_resources = scan_resources([base_dir], toolchain)

View File

@ -233,11 +233,6 @@ class ARM(mbedToolchain):
cmd_pre = self.ld + args
cmd = self.hook.get_cmdline_linker(cmd_pre)
# Create Secure library
if self.target.core == "Cortex-M23" or self.target.core == "Cortex-M33":
secure_file = join(dirname(output), "cmse_lib.o")
cmd.extend(["--import_cmse_lib_out=%s" % secure_file])
if self.RESPONSE_FILES:
cmd_linker = cmd[0]
link_files = self.get_link_file(cmd[1:])
@ -364,6 +359,11 @@ class ARMC6(ARM_STD):
if target.core == "Cortex-M23" or target.core == "Cortex-M33":
self.flags['common'].append("-mcmse")
# Create Secure library
if target.core == "Cortex-M23" or self.target.core == "Cortex-M33":
build_dir = kwargs['build_dir']
secure_file = join(build_dir, "cmse_lib.o")
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]
# Add linking time preprocessor macro __DOMAIN_NS
if target.core == "Cortex-M23-NS" or self.target.core == "Cortex-M33-NS":
define_string = self.make_ld_define("__DOMAIN_NS", 1)