aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-04-01 12:47:16 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-04-01 12:47:16 +0000
commit5496aa4a4877bf377e2cd9a34c7c08518785f079 (patch)
tree97f9628b08c0ae54a95236946a237300a5acbe56
parente5a10ba0c5252b61a43886c47b70bbbf06cb15af (diff)
downloadChibiOS-5496aa4a4877bf377e2cd9a34c7c08518785f079.tar.gz
ChibiOS-5496aa4a4877bf377e2cd9a34c7c08518785f079.tar.bz2
ChibiOS-5496aa4a4877bf377e2cd9a34c7c08518785f079.zip
Added support for .S files.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4069 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/ports/GCC/ARMCMx/rules.mk15
-rw-r--r--readme.txt1
2 files changed, 14 insertions, 2 deletions
diff --git a/os/ports/GCC/ARMCMx/rules.mk b/os/ports/GCC/ARMCMx/rules.mk
index e592683d8..111669fde 100644
--- a/os/ports/GCC/ARMCMx/rules.mk
+++ b/os/ports/GCC/ARMCMx/rules.mk
@@ -28,7 +28,7 @@ else
endif
ASRC = $(ACSRC)$(ACPPSRC)
TSRC = $(TCSRC)$(TCPPSRC)
-SRCPATHS = $(sort $(dir $(ASMSRC)) $(dir $(ASRC)) $(dir $(TSRC)))
+SRCPATHS = $(sort $(dir $(ASMXSRC)) $(dir $(ASMSRC)) $(dir $(ASRC)) $(dir $(TSRC)))
# Various directories
OBJDIR = $(BUILDDIR)/obj
@@ -40,7 +40,8 @@ ACPPOBJS = $(addprefix $(OBJDIR)/, $(notdir $(ACPPSRC:.cpp=.o)))
TCOBJS = $(addprefix $(OBJDIR)/, $(notdir $(TCSRC:.c=.o)))
TCPPOBJS = $(addprefix $(OBJDIR)/, $(notdir $(TCPPSRC:.cpp=.o)))
ASMOBJS = $(addprefix $(OBJDIR)/, $(notdir $(ASMSRC:.s=.o)))
-OBJS = $(ASMOBJS) $(ACOBJS) $(TCOBJS) $(ACPPOBJS) $(TCPPOBJS)
+ASMXOBJS = $(addprefix $(OBJDIR)/, $(notdir $(ASMXSRC:.S=.o)))
+OBJS = $(ASMXOBJS) $(ASMOBJS) $(ACOBJS) $(TCOBJS) $(ACPPOBJS) $(TCPPOBJS)
# Paths
IINCDIR = $(patsubst %,-I%,$(INCDIR) $(DINCDIR) $(UINCDIR))
@@ -57,6 +58,7 @@ LIBS = $(DLIBS) $(ULIBS)
MCFLAGS = -mcpu=$(MCU)
ODFLAGS = -x --syms
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
+ASXFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.cpp=.lst)) $(DEFS)
ifeq ($(USE_LINK_GC),yes)
@@ -162,6 +164,15 @@ else
@$(AS) -c $(ASFLAGS) -I. $(IINCDIR) $< -o $@
endif
+$(ASMXOBJS) : $(OBJDIR)/%.o : %.S Makefile
+ifeq ($(USE_VERBOSE_COMPILE),yes)
+ @echo
+ $(CC) -c $(ASXFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
+else
+ @echo Compiling $<
+ @$(CC) -c $(ASXFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
+endif
+
%.elf: $(OBJS) $(LDSCRIPT)
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
diff --git a/readme.txt b/readme.txt
index 7b9ff2191..a8b625d0c 100644
--- a/readme.txt
+++ b/readme.txt
@@ -104,6 +104,7 @@
3484947)(backported to 2.4.1).
- FIX: Fixed various minor documentation errors (bug 3484942)(backported
to 2.4.1).
+- NEW: Addes support for .S patch in the GCC Cortex port, by Ayman El-Khashab.
- NEW: Added a switch to the STM32F4 Makefile files in order to enable or
disable the FPU support in a single place.
- NEW: Added float support (optional) to chprintf(), by Fabio Utzig.