From 2b2b799a233882af184aeb599e334affe10d5a24 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 29 Apr 2014 15:02:34 -0600 Subject: [PATCH] ARMv7-M: Add FPU-related CFLAG settings for the CodeSourcery of Linux toolchain --- arch/arm/src/armv7-m/Toolchain.defs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/armv7-m/Toolchain.defs b/arch/arm/src/armv7-m/Toolchain.defs index a698d6cacc..c2c40c33dc 100644 --- a/arch/arm/src/armv7-m/Toolchain.defs +++ b/arch/arm/src/armv7-m/Toolchain.defs @@ -209,8 +209,16 @@ endif ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODESOURCERYL) CROSSDEV ?= arm-none-eabi- ARCROSSDEV ?= arm-none-eabi- - ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft MAXOPTIMIZATION ?= -O2 + ifeq ($(CONFIG_ARCH_CORTEXM4),y) + ifeq ($(CONFIG_ARCH_FPU),y) + ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard + else + ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfloat-abi=soft + endif + else ifeq ($(CONFIG_ARCH_CORTEXM3),y) + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft + endif endif # CodeSourcery under Windows