diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-07-09 09:22:20 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-07-09 09:22:20 +0000 |
commit | 0082938a9990953a91f1ce78edb35de3b0967239 (patch) | |
tree | 57d63ecc19555f017407fb89e83d5f51a2fb649b | |
parent | 2af0d2f2513182f902946c16381ff5ffb36cfc19 (diff) | |
download | ChibiOS-0082938a9990953a91f1ce78edb35de3b0967239.tar.gz ChibiOS-0082938a9990953a91f1ce78edb35de3b0967239.tar.bz2 ChibiOS-0082938a9990953a91f1ce78edb35de3b0967239.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12152 110e8d01-0319-4d1e-a829-52ad28d1bb01
-rw-r--r-- | os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld | 4 | ||||
-rw-r--r-- | os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk | 8 | ||||
-rw-r--r-- | os/common/startup/ARMCMx/compilers/LLVM/mk/rules.mk | 8 |
3 files changed, 5 insertions, 15 deletions
diff --git a/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld b/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld index 76ac53116..f61a59f17 100644 --- a/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld +++ b/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld @@ -35,13 +35,15 @@ SECTIONS __fini_array_end = .;
} > XTORS_FLASH AT > XTORS_FLASH_LMA
- .text ALIGN(16) : ALIGN(16)
+ .text : ALIGN(16)
{
+ __text_base = .;
*(.text)
*(.text.*)
*(.glue_7t)
*(.glue_7)
*(.gcc*)
+ __text_end = .;
} > TEXT_FLASH AT > TEXT_FLASH_LMA
.rodata : ALIGN(4)
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk index 160731bdf..f7db0f287 100644 --- a/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk +++ b/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk @@ -114,7 +114,7 @@ ADEFS := $(DADEFS) $(UADEFS) LIBS := $(DLIBS) $(ULIBS)
# Various settings
-MCFLAGS := -mcpu=$(MCU)
+MCFLAGS := -mcpu=$(MCU) -mthumb
ODFLAGS = -x --syms
ASFLAGS = $(MCFLAGS) $(OPT) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
ASXFLAGS = $(MCFLAGS) $(OPT) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
@@ -122,12 +122,6 @@ CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<: CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.cpp=.lst)) $(DEFS)
LDFLAGS = $(MCFLAGS) $(OPT) -nostartfiles $(LLIBDIR) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,--library-path=$(STARTUPLD),--script=$(LDSCRIPT)$(LDOPT)
-# Always thumb mode
-CFLAGS += -mthumb
-CPPFLAGS += -mthumb
-ASFLAGS += -mthumb
-ASXFLAGS += -mthumb
-
# Generate dependency information
ASFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
ASXFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
diff --git a/os/common/startup/ARMCMx/compilers/LLVM/mk/rules.mk b/os/common/startup/ARMCMx/compilers/LLVM/mk/rules.mk index c584c39ff..6c593f0a8 100644 --- a/os/common/startup/ARMCMx/compilers/LLVM/mk/rules.mk +++ b/os/common/startup/ARMCMx/compilers/LLVM/mk/rules.mk @@ -114,7 +114,7 @@ ADEFS := $(DADEFS) $(UADEFS) LIBS := $(DLIBS) $(ULIBS)
# Various settings
-MCFLAGS := -mcpu=$(MCU)
+MCFLAGS := -mcpu=$(MCU) -mthumb
ODFLAGS = -x --syms
ASFLAGS = $(MCFLAGS) $(OPT) $(ADEFS)
ASXFLAGS = $(MCFLAGS) $(OPT) $(ADEFS)
@@ -126,12 +126,6 @@ CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) $(DEFS) #CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.cpp=.lst)) $(DEFS)
LDFLAGS = $(MCFLAGS) $(OPT) -nostartfiles $(LLIBDIR) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,--library-path=$(STARTUPLD),--script=$(LDSCRIPT)$(LDOPT)
-# Always thumb mode
-CFLAGS += -mthumb
-CPPFLAGS += -mthumb
-ASFLAGS += -mthumb
-ASXFLAGS += -mthumb
-
# Generate dependency information
ASFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
ASXFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
|