mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #8995 from NXPmicro/Update_for_M33_FD
Add core option for Cortex-M33 with DSP enabledpull/9073/head
commit
93da33f151
|
@ -51,7 +51,9 @@ CORE_LABELS = {
|
||||||
"Cortex-M33": ["M33", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"],
|
"Cortex-M33": ["M33", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"],
|
||||||
"Cortex-M33-NS": ["M33", "M33_NS", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"],
|
"Cortex-M33-NS": ["M33", "M33_NS", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"],
|
||||||
"Cortex-M33F": ["M33", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"],
|
"Cortex-M33F": ["M33", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"],
|
||||||
"Cortex-M33F-NS": ["M33", "M33_NS", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"]
|
"Cortex-M33F-NS": ["M33", "M33_NS", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"],
|
||||||
|
"Cortex-M33FD": ["M33", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"],
|
||||||
|
"Cortex-M33FD-NS": ["M33", "M33_NS", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"]
|
||||||
}
|
}
|
||||||
|
|
||||||
CORE_ARCH = {
|
CORE_ARCH = {
|
||||||
|
@ -71,6 +73,8 @@ CORE_ARCH = {
|
||||||
"Cortex-M33F": 8,
|
"Cortex-M33F": 8,
|
||||||
"Cortex-M33-NS": 8,
|
"Cortex-M33-NS": 8,
|
||||||
"Cortex-M33F-NS": 8,
|
"Cortex-M33F-NS": 8,
|
||||||
|
"Cortex-M33FD": 8,
|
||||||
|
"Cortex-M33FD-NS": 8,
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
|
@ -364,7 +364,8 @@ class ARMC6(ARM_STD):
|
||||||
SUPPORTED_CORES = ["Cortex-M0", "Cortex-M0+", "Cortex-M3", "Cortex-M4",
|
SUPPORTED_CORES = ["Cortex-M0", "Cortex-M0+", "Cortex-M3", "Cortex-M4",
|
||||||
"Cortex-M4F", "Cortex-M7", "Cortex-M7F", "Cortex-M7FD",
|
"Cortex-M4F", "Cortex-M7", "Cortex-M7F", "Cortex-M7FD",
|
||||||
"Cortex-M23", "Cortex-M23-NS", "Cortex-M33", "Cortex-M33F",
|
"Cortex-M23", "Cortex-M23-NS", "Cortex-M33", "Cortex-M33F",
|
||||||
"Cortex-M33-NS", "Cortex-M33F-NS", "Cortex-A9"]
|
"Cortex-M33-NS", "Cortex-M33F-NS", "Cortex-M33FD-NS", "Cortex-M33FD",
|
||||||
|
"Cortex-A9"]
|
||||||
ARMCC_RANGE = (LooseVersion("6.10"), LooseVersion("7.0"))
|
ARMCC_RANGE = (LooseVersion("6.10"), LooseVersion("7.0"))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -392,6 +393,10 @@ class ARMC6(ARM_STD):
|
||||||
self.flags['common'].append("-mcpu=%s" % target.core.lower()[:-2])
|
self.flags['common'].append("-mcpu=%s" % target.core.lower()[:-2])
|
||||||
self.flags['ld'].append("--cpu=%s" % target.core.lower()[:-2])
|
self.flags['ld'].append("--cpu=%s" % target.core.lower()[:-2])
|
||||||
self.SHEBANG += " -mcpu=%s" % target.core.lower()[:-2]
|
self.SHEBANG += " -mcpu=%s" % target.core.lower()[:-2]
|
||||||
|
elif target.core.lower().endswith("fd-ns"):
|
||||||
|
self.flags['common'].append("-mcpu=%s" % target.core.lower()[:-5])
|
||||||
|
self.flags['ld'].append("--cpu=%s" % target.core.lower()[:-5])
|
||||||
|
self.SHEBANG += " -mcpu=%s" % target.core.lower()[:-5]
|
||||||
elif target.core.lower().endswith("f"):
|
elif target.core.lower().endswith("f"):
|
||||||
self.flags['common'].append("-mcpu=%s" % target.core.lower()[:-1])
|
self.flags['common'].append("-mcpu=%s" % target.core.lower()[:-1])
|
||||||
self.flags['ld'].append("--cpu=%s" % target.core.lower()[:-1])
|
self.flags['ld'].append("--cpu=%s" % target.core.lower()[:-1])
|
||||||
|
@ -420,18 +425,25 @@ class ARMC6(ARM_STD):
|
||||||
self.flags['common'].append("-mfpu=fpv5-sp-d16")
|
self.flags['common'].append("-mfpu=fpv5-sp-d16")
|
||||||
self.flags['common'].append("-mfloat-abi=softfp")
|
self.flags['common'].append("-mfloat-abi=softfp")
|
||||||
|
|
||||||
if target.core == "Cortex-M23" or target.core == "Cortex-M33":
|
if ((target.core.startswith("Cortex-M23") or
|
||||||
|
target.core.startswith("Cortex-M33")) and
|
||||||
|
not target.core.endswith("-NS")):
|
||||||
self.flags['cxx'].append("-mcmse")
|
self.flags['cxx'].append("-mcmse")
|
||||||
self.flags['c'].append("-mcmse")
|
self.flags['c'].append("-mcmse")
|
||||||
|
|
||||||
# Create Secure library
|
# Create Secure library
|
||||||
if ((target.core == "Cortex-M23" or self.target.core == "Cortex-M33") and
|
if ((target.core.startswith("Cortex-M23") or
|
||||||
|
target.core.startswith("Cortex-M33")) and
|
||||||
|
not target.core.endswith("-NS") and
|
||||||
kwargs.get('build_dir', False)):
|
kwargs.get('build_dir', False)):
|
||||||
build_dir = kwargs['build_dir']
|
build_dir = kwargs['build_dir']
|
||||||
secure_file = join(build_dir, "cmse_lib.o")
|
secure_file = join(build_dir, "cmse_lib.o")
|
||||||
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]
|
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]
|
||||||
|
|
||||||
# Add linking time preprocessor macro DOMAIN_NS
|
# Add linking time preprocessor macro DOMAIN_NS
|
||||||
if target.core == "Cortex-M23-NS" or self.target.core == "Cortex-M33-NS":
|
if ((target.core.startswith("Cortex-M23") or
|
||||||
|
target.core.startswith("Cortex-M33")) and
|
||||||
|
target.core.endswith("-NS")):
|
||||||
define_string = self.make_ld_define("DOMAIN_NS", "0x1")
|
define_string = self.make_ld_define("DOMAIN_NS", "0x1")
|
||||||
self.flags["ld"].append(define_string)
|
self.flags["ld"].append(define_string)
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,8 @@ class GCC(mbedToolchain):
|
||||||
self.cpu = ["-mcpu=cortex-m7"]
|
self.cpu = ["-mcpu=cortex-m7"]
|
||||||
elif target.core.startswith("Cortex-M23"):
|
elif target.core.startswith("Cortex-M23"):
|
||||||
self.cpu = ["-mcpu=cortex-m23"]
|
self.cpu = ["-mcpu=cortex-m23"]
|
||||||
|
elif target.core.startswith("Cortex-M33FD"):
|
||||||
|
self.cpu = ["-mcpu=cortex-m33"]
|
||||||
elif target.core.startswith("Cortex-M33F"):
|
elif target.core.startswith("Cortex-M33F"):
|
||||||
self.cpu = ["-mcpu=cortex-m33+nodsp"]
|
self.cpu = ["-mcpu=cortex-m33+nodsp"]
|
||||||
elif target.core.startswith("Cortex-M33"):
|
elif target.core.startswith("Cortex-M33"):
|
||||||
|
@ -80,6 +82,9 @@ class GCC(mbedToolchain):
|
||||||
elif target.core == "Cortex-M7FD":
|
elif target.core == "Cortex-M7FD":
|
||||||
self.cpu.append("-mfpu=fpv5-d16")
|
self.cpu.append("-mfpu=fpv5-d16")
|
||||||
self.cpu.append("-mfloat-abi=softfp")
|
self.cpu.append("-mfloat-abi=softfp")
|
||||||
|
elif target.core.startswith("Cortex-M33F"):
|
||||||
|
self.cpu.append("-mfpu=fpv5-sp-d16")
|
||||||
|
self.cpu.append("-mfloat-abi=softfp")
|
||||||
|
|
||||||
if target.core == "Cortex-A9":
|
if target.core == "Cortex-A9":
|
||||||
self.cpu.append("-mthumb-interwork")
|
self.cpu.append("-mthumb-interwork")
|
||||||
|
@ -97,7 +102,11 @@ class GCC(mbedToolchain):
|
||||||
"-Wl,--cmse-implib",
|
"-Wl,--cmse-implib",
|
||||||
"-Wl,--out-implib=%s" % join(build_dir, "cmse_lib.o")
|
"-Wl,--out-implib=%s" % join(build_dir, "cmse_lib.o")
|
||||||
])
|
])
|
||||||
elif target.core == "Cortex-M23-NS" or target.core == "Cortex-M33-NS" or target.core == "Cortex-M33F-NS":
|
|
||||||
|
# Add linking time preprocessor macro DOMAIN_NS
|
||||||
|
if ((target.core.startswith("Cortex-M23") or
|
||||||
|
target.core.startswith("Cortex-M33")) and
|
||||||
|
target.core.endswith("-NS")):
|
||||||
self.flags["ld"].append("-DDOMAIN_NS=1")
|
self.flags["ld"].append("-DDOMAIN_NS=1")
|
||||||
|
|
||||||
self.flags["common"] += self.cpu
|
self.flags["common"] += self.cpu
|
||||||
|
|
Loading…
Reference in New Issue