Skip to content

Cortex-M4 split to M4 and M4F #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions workspace_tools/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"Cortex-M0" : "M0",
"Cortex-M0+": "M0P",
"Cortex-M3" : "M3",
"Cortex-M4" : "M4"
"Cortex-M4" : "M4",
"Cortex-M4F" : "M4F"
}

import os
Expand Down Expand Up @@ -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']

Expand Down Expand Up @@ -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']

Expand Down Expand Up @@ -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']

Expand Down
3 changes: 2 additions & 1 deletion workspace_tools/toolchains/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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%"
Expand Down
2 changes: 1 addition & 1 deletion workspace_tools/toolchains/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, target, options=None, notify=None, macros=None):

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
Expand Down
4 changes: 3 additions & 1 deletion workspace_tools/toolchains/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ def __init__(self, target, options=None, notify=None, macros=None, tool_path="")

if target.core == "Cortex-M0+":
cpu = "cortex-m0"
elif target.core == "Cortex-M4F":
cpu = "cortex-m4"
else:
cpu = target.core.lower()

self.cpu = ["-mcpu=%s" % cpu]
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")

Expand Down