TOOLS : Add missing M33 and M33F in python scripts

pull/8449/head
jeromecoutant 2018-10-16 16:43:23 +02:00
parent cb4924151e
commit 1ea28973b2
6 changed files with 19 additions and 10 deletions

View File

@ -49,7 +49,9 @@ CORE_LABELS = {
"Cortex-M23": ["M23", "CORTEX_M", "LIKE_CORTEX_M23", "CORTEX"],
"Cortex-M23-NS": ["M23", "M23_NS", "CORTEX_M", "LIKE_CORTEX_M23", "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-NS": ["M33", "M33_NS", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"]
}
CORE_ARCH = {
@ -66,7 +68,9 @@ CORE_ARCH = {
"Cortex-M23": 8,
"Cortex-M23-NS": 8,
"Cortex-M33": 8,
"Cortex-M33F": 8,
"Cortex-M33-NS": 8,
"Cortex-M33F-NS": 8,
}
################################################################################

View File

@ -17,7 +17,7 @@ from tools.utils import NotSupportedException
ARMC5_CORES = ["Cortex-M0", "Cortex-M0+", "Cortex-M3", "Cortex-M4",
"Cortex-M4F", "Cortex-M7", "Cortex-M7F", "Cortex-M7FD"]
ARMC6_CORES = ARMC5_CORES + ["Cortex-M23", "Cortex-M23-NS",
"Cortex-M33", "CortexM33-NS"]
"Cortex-M33", "Cortex-M33-NS", "Cortex-M33F", "Cortex-M33F-NS"]
CORE_SUF_ALPHA = ["MDFNS02347-+"]

View File

@ -75,8 +75,8 @@ class mbedToolchain:
"Cortex-M23": ["__CORTEX_M23", "ARM_MATH_ARMV8MBL", "__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
"Cortex-M33-NS": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "DOMAIN_NS=1", "__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
"Cortex-M33": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
"Cortex-M33F-NS": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "DOMAIN_NS=1", "__FPU_PRESENT", "__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
"Cortex-M33F": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "__FPU_PRESENT", "__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
"Cortex-M33F-NS": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "DOMAIN_NS=1", "__FPU_PRESENT=1U", "__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
"Cortex-M33F": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "__FPU_PRESENT=1U", "__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
}
MBED_CONFIG_FILE_NAME="mbed_config.h"

View File

@ -363,8 +363,8 @@ class ARMC6(ARM_STD):
SHEBANG = "#! armclang -E --target=arm-arm-none-eabi -x c"
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",
"Cortex-M33-NS", "Cortex-A9"]
"Cortex-M23", "Cortex-M23-NS", "Cortex-M33", "Cortex-M33F",
"Cortex-M33-NS", "Cortex-M33F-NS", "Cortex-A9"]
ARMCC_RANGE = (LooseVersion("6.10"), LooseVersion("7.0"))
@staticmethod
@ -416,6 +416,9 @@ 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-M33F"):
self.flags['common'].append("-mfpu=fpv5-sp-d16")
self.flags['common'].append("-mfloat-abi=softfp")
if target.core == "Cortex-M23" or target.core == "Cortex-M33":
self.flags['cxx'].append("-mcmse")

View File

@ -62,8 +62,10 @@ class GCC(mbedToolchain):
self.cpu = ["-mcpu=cortex-m23"]
elif target.core.startswith("Cortex-M33F"):
self.cpu = ["-mcpu=cortex-m33"]
self.cpu = ["-mcpu=cortex-m33+nodsp"]
elif target.core.startswith("Cortex-M33"):
self.cpu = ["-march=armv8-m.main"]
self.cpu = ["-mcpu=cortex-m33"]
self.cpu = ["-mcpu=cortex-m33+nodsp+nofp"]
else:
self.cpu = ["-mcpu={}".format(target.core.lower())]
@ -97,7 +99,7 @@ class GCC(mbedToolchain):
"-Wl,--cmse-implib",
"-Wl,--out-implib=%s" % join(build_dir, "cmse_lib.o")
])
elif target.core == "Cortex-M23-NS" or target.core == "Cortex-M33-NS":
elif target.core == "Cortex-M23-NS" or target.core == "Cortex-M33-NS" or target.core == "Cortex-M33F-NS":
self.flags["ld"].append("-DDOMAIN_NS=1")
self.flags["common"] += self.cpu

View File

@ -74,12 +74,12 @@ class IAR(mbedToolchain):
elif target.core == "Cortex-M7F":
asm_flags_cmd += ["--fpu", "VFPv5_sp"]
c_flags_cmd.append("--fpu=VFPv5_sp")
elif target.core == "Cortex-M23" or target.core == "Cortex-M33":
elif target.core == "Cortex-M23" or target.core == "Cortex-M33" or target.core == "Cortex-M33F":
self.flags["asm"] += ["--cmse"]
self.flags["common"] += ["--cmse"]
# Create Secure library
if target.core == "Cortex-M23" or self.target.core == "Cortex-M33":
if target.core == "Cortex-M23" or self.target.core == "Cortex-M33" or self.target.core == "Cortex-M33F":
secure_file = join(build_dir, "cmse_lib.o")
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]