[rtems commit] bsps/arm: Adjust machine flags for ARMv7-M
Sebastian Huber
sebh at rtems.org
Tue May 14 09:08:20 UTC 2019
Module: rtems
Branch: master
Commit: b446457f1c0a159863e770458b1373604f7050fe
Changeset: http://git.rtems.org/rtems/commit/?id=b446457f1c0a159863e770458b1373604f7050fe
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue May 14 09:04:05 2019 +0200
bsps/arm: Adjust machine flags for ARMv7-M
Update machine flags for Cortex-M3 and Cortex-M4 based BSPs to account
for Cortex-M3 Errata 602117 which required GCC multilib changes.
Update #3747.
---
bsps/arm/lm3s69xx/config/lm3s69xx.inc | 2 +-
bsps/arm/lpc176x/config/lpc1768_mbed.cfg | 2 +-
bsps/arm/lpc24xx/config/lpc17xx.inc | 2 +-
bsps/arm/lpc24xx/config/lpc40xx.inc | 2 +-
bsps/arm/stm32f4/config/stm32f105rc.cfg | 11 ++++++++++-
bsps/arm/stm32f4/config/stm32f4.cfg | 2 +-
6 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/bsps/arm/lm3s69xx/config/lm3s69xx.inc b/bsps/arm/lm3s69xx/config/lm3s69xx.inc
index 954a43c..f050b3a 100644
--- a/bsps/arm/lm3s69xx/config/lm3s69xx.inc
+++ b/bsps/arm/lm3s69xx/config/lm3s69xx.inc
@@ -6,7 +6,7 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU = arm
-CPU_CFLAGS = -march=armv7-m -mthumb
+CPU_CFLAGS = -mthumb -mcpu=cortex-m3
CFLAGS_OPTIMIZE_V = -O2 -g
diff --git a/bsps/arm/lpc176x/config/lpc1768_mbed.cfg b/bsps/arm/lpc176x/config/lpc1768_mbed.cfg
index 3e9255e..f6aacf3 100644
--- a/bsps/arm/lpc176x/config/lpc1768_mbed.cfg
+++ b/bsps/arm/lpc176x/config/lpc1768_mbed.cfg
@@ -6,7 +6,7 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU = arm
-CPU_CFLAGS = -march=armv7-m -mthumb
+CPU_CFLAGS = -mthumb -mcpu=cortex-m3
CFLAGS_OPTIMIZE_V = -O2 -ggdb3
CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
diff --git a/bsps/arm/lpc24xx/config/lpc17xx.inc b/bsps/arm/lpc24xx/config/lpc17xx.inc
index e877959..3ecef90 100644
--- a/bsps/arm/lpc24xx/config/lpc17xx.inc
+++ b/bsps/arm/lpc24xx/config/lpc17xx.inc
@@ -6,7 +6,7 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU = arm
-CPU_CFLAGS = -march=armv7-m -mthumb
+CPU_CFLAGS = -mthumb -mcpu=cortex-m3
CFLAGS_OPTIMIZE_V = -O2 -g
CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
diff --git a/bsps/arm/lpc24xx/config/lpc40xx.inc b/bsps/arm/lpc24xx/config/lpc40xx.inc
index 5460a95..a3fb48a 100644
--- a/bsps/arm/lpc24xx/config/lpc40xx.inc
+++ b/bsps/arm/lpc24xx/config/lpc40xx.inc
@@ -6,7 +6,7 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU = arm
-CPU_CFLAGS = -mthumb -march=armv7-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mtune=cortex-m4
+CPU_CFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
CFLAGS_OPTIMIZE_V = -O2 -g
CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
diff --git a/bsps/arm/stm32f4/config/stm32f105rc.cfg b/bsps/arm/stm32f4/config/stm32f105rc.cfg
index b0a522e..750ade2 100644
--- a/bsps/arm/stm32f4/config/stm32f105rc.cfg
+++ b/bsps/arm/stm32f4/config/stm32f105rc.cfg
@@ -1 +1,10 @@
-include $(RTEMS_ROOT)/make/custom/stm32f4.cfg
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = arm
+
+CPU_CFLAGS = -mthumb -mcpu=cortex-m3
+
+CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
diff --git a/bsps/arm/stm32f4/config/stm32f4.cfg b/bsps/arm/stm32f4/config/stm32f4.cfg
index edca4bf..3a6982b 100644
--- a/bsps/arm/stm32f4/config/stm32f4.cfg
+++ b/bsps/arm/stm32f4/config/stm32f4.cfg
@@ -2,7 +2,7 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU = arm
-CPU_CFLAGS = -march=armv7-m -mthumb
+CPU_CFLAGS = -mthumb -mcpu=cortex-m4
CFLAGS_OPTIMIZE_V = -O2 -g
CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
More information about the vc
mailing list