ARM and ARMCMx rules.mk improvements.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3704 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2012-01-02 11:30:14 +00:00
parent 12ba4080d6
commit 2f6d56866c
3 changed files with 47 additions and 36 deletions

View File

@ -109,58 +109,62 @@ MAKE_ALL_RULE_HOOK:
$(OBJS): | $(BUILDDIR) $(OBJDIR) $(LSTDIR)
$(BUILDDIR):
@echo $(SRCPATHS)
ifneq ($(USE_VERBOSE_COMPILE),yes)
@echo Compiler Options
@echo $(CC) -c $(CFLAGS) -I. $(IINCDIR) main.c -o main.o
@echo
endif
mkdir $(BUILDDIR)
$(OBJDIR):
$(OBJDIR): $(BUILDDIR)
mkdir $(OBJDIR)
$(LSTDIR):
$(LSTDIR): $(BUILDDIR)
mkdir $(LSTDIR)
$(ACPPOBJS) : $(OBJDIR)/%.o : %.cpp Makefile
$(ACPPOBJS) : $(OBJDIR)/%.o : %.cpp $(OBJDIR) $(LSTDIR) Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
$(CPPC) -c $(CPPFLAGS) $(AOPT) -I . $(IINCDIR) $< -o $@
$(CPPC) -c $(CPPFLAGS) $(AOPT) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $<
@$(CPPC) -c $(CPPFLAGS) $(AOPT) -I . $(IINCDIR) $< -o $@
@$(CPPC) -c $(CPPFLAGS) $(AOPT) -I. $(IINCDIR) $< -o $@
endif
$(TCPPOBJS) : $(OBJDIR)/%.o : %.cpp Makefile
$(TCPPOBJS) : $(OBJDIR)/%.o : %.cpp $(OBJDIR) $(LSTDIR) Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
$(CPPC) -c $(CPPFLAGS) $(TOPT) -I . $(IINCDIR) $< -o $@
$(CPPC) -c $(CPPFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $<
@$(CPPC) -c $(CPPFLAGS) $(TOPT) -I . $(IINCDIR) $< -o $@
@$(CPPC) -c $(CPPFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
endif
$(ACOBJS) : $(OBJDIR)/%.o : %.c Makefile
$(ACOBJS) : $(OBJDIR)/%.o : %.c $(OBJDIR) $(LSTDIR) Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
$(CC) -c $(CFLAGS) $(AOPT) -I . $(IINCDIR) $< -o $@
$(CC) -c $(CFLAGS) $(AOPT) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $<
@$(CC) -c $(CFLAGS) $(AOPT) -I . $(IINCDIR) $< -o $@
@$(CC) -c $(CFLAGS) $(AOPT) -I. $(IINCDIR) $< -o $@
endif
$(TCOBJS) : $(OBJDIR)/%.o : %.c Makefile
$(TCOBJS) : $(OBJDIR)/%.o : %.c $(OBJDIR) $(LSTDIR) Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
$(CC) -c $(CFLAGS) $(TOPT) -I . $(IINCDIR) $< -o $@
$(CC) -c $(CFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $<
@$(CC) -c $(CFLAGS) $(TOPT) -I . $(IINCDIR) $< -o $@
@$(CC) -c $(CFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
endif
$(ASMOBJS) : $(OBJDIR)/%.o : %.s Makefile
$(ASMOBJS) : $(OBJDIR)/%.o : %.s $(OBJDIR) $(LSTDIR) Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
$(AS) -c $(ASFLAGS) -I . $(IINCDIR) $< -o $@
$(AS) -c $(ASFLAGS) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $<
@$(AS) -c $(ASFLAGS) -I . $(IINCDIR) $< -o $@
@$(AS) -c $(ASFLAGS) -I. $(IINCDIR) $< -o $@
endif
%.elf: $(OBJS) $(LDSCRIPT)

View File

@ -109,58 +109,62 @@ MAKE_ALL_RULE_HOOK:
$(OBJS): | $(BUILDDIR) $(OBJDIR) $(LSTDIR)
$(BUILDDIR):
@echo $(SRCPATHS)
ifneq ($(USE_VERBOSE_COMPILE),yes)
@echo Compiler Options
@echo $(CC) -c $(CFLAGS) -I. $(IINCDIR) main.c -o main.o
@echo
endif
mkdir $(BUILDDIR)
$(OBJDIR):
$(OBJDIR): $(BUILDDIR)
mkdir $(OBJDIR)
$(LSTDIR):
$(LSTDIR): $(BUILDDIR)
mkdir $(LSTDIR)
$(ACPPOBJS) : $(OBJDIR)/%.o : %.cpp Makefile
$(ACPPOBJS) : $(OBJDIR)/%.o : %.cpp $(OBJDIR) $(LSTDIR) Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
$(CPPC) -c $(CPPFLAGS) $(AOPT) -I . $(IINCDIR) $< -o $@
$(CPPC) -c $(CPPFLAGS) $(AOPT) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $<
@$(CPPC) -c $(CPPFLAGS) $(AOPT) -I . $(IINCDIR) $< -o $@
@$(CPPC) -c $(CPPFLAGS) $(AOPT) -I. $(IINCDIR) $< -o $@
endif
$(TCPPOBJS) : $(OBJDIR)/%.o : %.cpp Makefile
$(TCPPOBJS) : $(OBJDIR)/%.o : %.cpp $(OBJDIR) $(LSTDIR) Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
$(CPPC) -c $(CPPFLAGS) $(TOPT) -I . $(IINCDIR) $< -o $@
$(CPPC) -c $(CPPFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $<
@$(CPPC) -c $(CPPFLAGS) $(TOPT) -I . $(IINCDIR) $< -o $@
@$(CPPC) -c $(CPPFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
endif
$(ACOBJS) : $(OBJDIR)/%.o : %.c Makefile
$(ACOBJS) : $(OBJDIR)/%.o : %.c $(OBJDIR) $(LSTDIR) Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
$(CC) -c $(CFLAGS) $(AOPT) -I . $(IINCDIR) $< -o $@
$(CC) -c $(CFLAGS) $(AOPT) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $<
@$(CC) -c $(CFLAGS) $(AOPT) -I . $(IINCDIR) $< -o $@
@$(CC) -c $(CFLAGS) $(AOPT) -I. $(IINCDIR) $< -o $@
endif
$(TCOBJS) : $(OBJDIR)/%.o : %.c Makefile
$(TCOBJS) : $(OBJDIR)/%.o : %.c $(OBJDIR) $(LSTDIR) Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
$(CC) -c $(CFLAGS) $(TOPT) -I . $(IINCDIR) $< -o $@
$(CC) -c $(CFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $<
@$(CC) -c $(CFLAGS) $(TOPT) -I . $(IINCDIR) $< -o $@
@$(CC) -c $(CFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
endif
$(ASMOBJS) : $(OBJDIR)/%.o : %.s Makefile
$(ASMOBJS) : $(OBJDIR)/%.o : %.s $(OBJDIR) $(LSTDIR) Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
$(AS) -c $(ASFLAGS) -I . $(IINCDIR) $< -o $@
$(AS) -c $(ASFLAGS) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $<
@$(AS) -c $(ASFLAGS) -I . $(IINCDIR) $< -o $@
@$(AS) -c $(ASFLAGS) -I. $(IINCDIR) $< -o $@
endif
%.elf: $(OBJS) $(LDSCRIPT)

View File

@ -78,6 +78,9 @@
- FIX: Fixed SYSCFG clock not started in STM32L1/F4 HALs (bug 3449139).
- FIX: Fixed wrong definitions in STM32L-Discovery board file (bug 3449076).
- OPT: Improved the exception exit code in the GCC Cortex-Mx ports.
- NEW: Modified ARM and ARMCMx build rules to allow parallel build. Now the
log outputs one dummy compilation command in order to allow paths discovery
by Eclipse.
- NEW: Added an utility module to access LIS302DL MEMS using a SPI.
- NEW: Updated STM32F2xx support by inheriting the work done on the STM32F4xx,
the whole thing is untested because lack of hardware.