diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index 27f766827c..d80435d4ad 100644 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -20,7 +20,8 @@ CORE_LABELS = { "Cortex-M0" : "M0", "Cortex-M0+": "M0P", "Cortex-M3" : "M3", - "Cortex-M4" : "M4" + "Cortex-M4" : "M4", + "Cortex-M4F" : "M4F" } import os @@ -165,7 +166,7 @@ class LPC4088(Target): def __init__(self): Target.__init__(self) - self.core = "Cortex-M4" + self.core = "Cortex-M4F" self.extra_labels = ['NXP', 'LPC408X'] @@ -208,7 +209,7 @@ class LPC4330_M4(Target): def __init__(self): Target.__init__(self) - self.core = "Cortex-M4" + self.core = "Cortex-M4F" self.extra_labels = ['NXP', 'LPC43XX'] @@ -241,7 +242,7 @@ class STM32F407(Target): def __init__(self): Target.__init__(self) - self.core = "Cortex-M4" + self.core = "Cortex-M4F" self.extra_labels = ['STM', 'STM32F4XX'] diff --git a/workspace_tools/toolchains/__init__.py b/workspace_tools/toolchains/__init__.py index ec24674fd2..a629d8aa51 100644 --- a/workspace_tools/toolchains/__init__.py +++ b/workspace_tools/toolchains/__init__.py @@ -151,7 +151,8 @@ class mbedToolchain: "Cortex-M3" : ["__CORTEX_M3", "ARM_MATH_CM3"], "Cortex-M0" : ["__CORTEX_M0", "ARM_MATH_CM0"], "Cortex-M0+": ["__CORTEX_M0PLUS", "ARM_MATH_CM0PLUS"], - "Cortex-M4" : ["__CORTEX_M4", "ARM_MATH_CM4", "__FPU_PRESENT=1"], + "Cortex-M4" : ["__CORTEX_M4", "ARM_MATH_CM4"], + "Cortex-M4F" : ["__CORTEX_M4", "ARM_MATH_CM4", "__FPU_PRESENT=1"], } GOANNA_FORMAT = "[Goanna] warning [%FILENAME%:%LINENO%] - [%CHECKNAME%(%SEVERITY%)] %MESSAGE%" diff --git a/workspace_tools/toolchains/arm.py b/workspace_tools/toolchains/arm.py index 4a3e714eb7..0a43183577 100644 --- a/workspace_tools/toolchains/arm.py +++ b/workspace_tools/toolchains/arm.py @@ -35,7 +35,7 @@ class ARM(mbedToolchain): if target.core == "Cortex-M0+": cpu = "Cortex-M0" - elif target.core == "Cortex-M4": + elif target.core == "Cortex-M4F": cpu = "Cortex-M4.fp" else: cpu = target.core diff --git a/workspace_tools/toolchains/gcc.py b/workspace_tools/toolchains/gcc.py index ebeaa35a44..b5b2ad38bd 100644 --- a/workspace_tools/toolchains/gcc.py +++ b/workspace_tools/toolchains/gcc.py @@ -34,6 +34,8 @@ class GCC(mbedToolchain): if target.core == "Cortex-M0+": cpu = "cortex-m0" + elif target.core == "Cortex-M4F": + cpu = "cortex-m4" else: cpu = target.core.lower() @@ -41,7 +43,7 @@ class GCC(mbedToolchain): if target.core.startswith("Cortex"): self.cpu.append("-mthumb") - if target.core == "Cortex-M4": + if target.core == "Cortex-M4F": self.cpu.append("-mfpu=fpv4-sp-d16") self.cpu.append("-mfloat-abi=softfp")