Merge pull request #7792 from deepikabhavnani/fix_m33

Build tool fixes for Musca support
pull/7913/merge
Cruz Monrreal 2018-08-28 10:09:28 -05:00 committed by GitHub
commit 14319adf7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 17 deletions

View File

@ -23,8 +23,7 @@
"asm": [],
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
"cxx": ["-fno-rtti", "-std=gnu++98"],
"ld": ["--verbose", "--remove", "--legacyalign", "--no_strict_wchar_size",
"--no_strict_enum_size", "--show_full_path"]
"ld": ["--verbose", "--remove", "--show_full_path"]
},
"ARM": {
"common": ["-c", "--gnu", "-Otime", "--split_sections",

View File

@ -22,7 +22,7 @@
"asm": [],
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
"cxx": ["-fno-rtti", "-std=gnu++98"],
"ld": ["--legacyalign", "--no_strict_wchar_size", "--no_strict_enum_size", "--show_full_path"]
"ld": ["--show_full_path"]
},
"ARM": {
"common": ["-c", "--gnu", "-Otime", "--split_sections",

View File

@ -22,8 +22,7 @@
"asm": [],
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
"cxx": ["-fno-rtti", "-std=gnu++98"],
"ld": ["--legacyalign", "--no_strict_wchar_size", "--no_strict_enum_size",
"--show_full_path"]
"ld": ["--show_full_path"]
},
"ARM": {
"common": ["-c", "--gnu", "-Ospace", "--split_sections",

View File

@ -361,7 +361,7 @@ class ARMC6(ARM_STD):
SUPPORTED_CORES = ["Cortex-M0", "Cortex-M0+", "Cortex-M3", "Cortex-M4",
"Cortex-M4F", "Cortex-M7", "Cortex-M7F", "Cortex-M7FD",
"Cortex-M23", "Cortex-M23-NS", "Cortex-M33",
"CortexM33-NS", "Cortex-A9"]
"Cortex-M33-NS", "Cortex-A9"]
ARMCC_RANGE = (LooseVersion("6.10"), LooseVersion("7.0"))
@staticmethod
@ -393,11 +393,11 @@ class ARMC6(ARM_STD):
self.flags['common'].append("-mcpu=%s" % target.core.lower()[:-1])
self.flags['ld'].append("--cpu=%s" % target.core.lower()[:-1])
self.SHEBANG += " -mcpu=%s" % target.core.lower()[:-1]
elif target.core.lower().endswith("ns"):
self.flags['common'].append("-mcpu=%s" % target.core.lower()[:-3])
self.flags['ld'].append("--cpu=%s" % target.core.lower()[:-3])
self.SHEBANG += " -mcpu=%s" % target.core.lower()[:-3]
else:
elif target.core.startswith("Cortex-M33"):
self.flags['common'].append("-mcpu=cortex-m33+nodsp")
self.flags['common'].append("-mfpu=none")
self.flags['ld'].append("--cpu=Cortex-M33.no_dsp.no_fp")
elif not target.core.startswith("Cortex-M23"):
self.flags['common'].append("-mcpu=%s" % target.core.lower())
self.flags['ld'].append("--cpu=%s" % target.core.lower())
self.SHEBANG += " -mcpu=%s" % target.core.lower()
@ -413,11 +413,10 @@ class ARMC6(ARM_STD):
self.flags['common'].append("-mfloat-abi=softfp")
elif target.core.startswith("Cortex-M23"):
self.flags['common'].append("-march=armv8-m.base")
elif target.core.startswith("Cortex-M33"):
self.flags['common'].append("-march=armv8-m.main")
if target.core == "Cortex-M23" or target.core == "Cortex-M33":
self.flags['common'].append("-mcmse")
self.flags['cxx'].append("-mcmse")
self.flags['c'].append("-mcmse")
# Create Secure library
if ((target.core == "Cortex-M23" or self.target.core == "Cortex-M33") and
@ -438,7 +437,10 @@ class ARMC6(ARM_STD):
"Cortex-M23-NS": "Cortex-M23",
"Cortex-M33-NS": "Cortex-M33" }.get(target.core, target.core)
self.flags['asm'].append("--cpu=%s" % asm_cpu)
if target.core.startswith("Cortex-M33"):
self.flags['asm'].append("--cpu=Cortex-M33.no_dsp.no_fp")
else :
self.flags['asm'].append("--cpu=%s" % asm_cpu)
self.cc = ([join(TOOLCHAIN_PATHS["ARMC6"], "armclang")] +
self.flags['common'] + self.flags['c'])

View File

@ -262,8 +262,6 @@ class GCC(mbedToolchain):
# Exec command
self.notify.cc_verbose("Link: %s" % ' '.join(cmd))
self.default_cmd(cmd)
if self.target.core == "Cortex-M23" or self.target.core == "Cortex-M33":
self.notify.info("Secure Library Object %s" %secure_file)
@hook_tool
def archive(self, objects, lib_path):