From 6a2ca74cba868b6cd3c7337911774a64989b96ff Mon Sep 17 00:00:00 2001 From: Kevin Townsend Date: Fri, 23 Mar 2012 23:50:11 +0100 Subject: [PATCH] v1.0.0 --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c52e557..1f50bc3 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,12 @@ OBJS = main.o # or to 'FALSE' for release builds (smallest, fastest binaries) DEBUGBUILD = FALSE +########################################################################## +# IDE Flags (Keeps various IDEs happy) +########################################################################## + +OPTDEFINES = -D __NEWLIB__ + ########################################################################## # Project-specific files ########################################################################## @@ -186,10 +192,10 @@ OBJS += $(TARGET)_handlers.o LPC1xxx_startup.o # Compiler settings, parameters and flags ########################################################################## ifeq (TRUE,$(DEBUGBUILD)) - CFLAGS = -c -g -O0 $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin + CFLAGS = -c -g -O0 $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin $(OPTDEFINES) ASFLAGS = -c -g -O0 $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -D__ASSEMBLY__ -x assembler-with-cpp else - CFLAGS = -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin + CFLAGS = -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin $(OPTDEFINES) ASFLAGS = -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -D__ASSEMBLY__ -x assembler-with-cpp endif @@ -214,9 +220,13 @@ firmware: $(OBJS) $(SYS_OBJS) -@echo "INCLUDE $(LD_SCRIPT)" >> $(LD_TEMP) $(LD) $(LDFLAGS) -T $(LD_TEMP) -o $(OUTFILE).elf $(OBJS) $(LDLIBS) -@echo "" + -@echo "Removing temporary files" + rm -f $(OBJS) $(LD_TEMP) + -@echo "" $(SIZE) $(OUTFILE).elf -@echo "" $(OBJCOPY) $(OCFLAGS) -O binary $(OUTFILE).elf $(OUTFILE).bin + $(OBJCOPY) $(OCFLAGS) -O binary $(OUTFILE).elf $(OUTFILE).bin $(OBJCOPY) $(OCFLAGS) -O ihex $(OUTFILE).elf $(OUTFILE).hex -@echo "" $(LPCRC) firmware.bin -- 2.20.1