From b211a33a530fc27f51259fddc188575e4ead7c9b Mon Sep 17 00:00:00 2001 From: Joe Turner Date: Wed, 19 Jun 2013 13:32:06 +0100 Subject: [PATCH] Use correct setting for -mfpu when building for Cortex-M4 targets, and add a setting for using hard or soft floating point. --- workspace_tools/settings.py | 3 +++ workspace_tools/toolchains.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/workspace_tools/settings.py b/workspace_tools/settings.py index 10be15868bf..5b0e8ecd14e 100644 --- a/workspace_tools/settings.py +++ b/workspace_tools/settings.py @@ -71,6 +71,9 @@ GCC_CW_PATH = "C:/Freescale/CW MCU v10.3/Cross_Tools/arm-none-eabi-gcc-4_6_2/bin" EWL_LIB_PATH = "C:/Freescale/CW MCU v10.3/MCU/ARM_GCC_Support/ewl/lib" +# GCC float ABI +M4_FLOAT_ABI = "softfp" + try: # Allow to overwrite the default settings without the need to edit the # settings file stored in the repository diff --git a/workspace_tools/toolchains.py b/workspace_tools/toolchains.py index 73feca0d208..bf2534936cf 100644 --- a/workspace_tools/toolchains.py +++ b/workspace_tools/toolchains.py @@ -556,7 +556,8 @@ def __init__(self, target, notify, tool_path): self.cpu.append("-mthumb") if target.core == "Cortex-M4": - self.cpu.append("-mfpu=vfp") + self.cpu.append("-mfpu=fpv4-sp-d16") + self.cpu.append("-mfloat-abi=%s" % M4_FLOAT_ABI) # Note: We are using "-O2" instead of "-Os" to avoid this known GCC bug: # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46762