Cortex-M4 split to M4 and M4F
pull/116/head
Bogdan Marinescu 2013-11-28 05:05:32 -08:00
commit 2897644e1b
4 changed files with 11 additions and 7 deletions

View File

@ -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']

View File

@ -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%"

View File

@ -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

View File

@ -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")