cortex-m3: adjusted target cflags
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Mon, 7 Feb 2011 23:53:05 +0000 (23:53 +0000)
committerKhem Raj <raj.khem@gmail.com>
Sat, 12 Feb 2011 20:10:10 +0000 (12:10 -0800)
Explicit '-mthumb' is required because Cortex-M3 does not support ARM
instructions and actual flags cause gcc to fail with 'error: target CPU
does not support ARM mode'.

The '-mcpu=cortex-m3' is shorter than '-march=armv7-m -mtune=cortex-m3'
and enables workarounds like '-mfix-cortex-m3-ldrd'.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
conf/machine/include/tune-cortexm3.inc

index 6da9aee..a66a33c 100644 (file)
@@ -1,4 +1,4 @@
 # valid options for -march: `armv7', `armv7-m'
-TARGET_CC_ARCH = "-march=armv7-m -mtune=cortex-m3 -mfpu=vfp -mfloat-abi=softfp"
+TARGET_CC_ARCH = "-mthumb -mcpu=cortex-m3 -mfpu=vfp -mfloat-abi=softfp"
 FEED_ARCH = "armv7"
 BASE_PACKAGE_ARCH = "armv7"