diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-12-29 00:28:30 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-12-29 00:28:30 +0100 |
commit | 1b7a9f8f89efe841fecae18d542723e422c45a3c (patch) | |
tree | e6abdd4b213354a34b8f5c8dd3ba96a0746f08c1 /src/fsm | |
parent | 08c29c2f54d48f6c127e7964f8a71aeaa92a0e2f (diff) | |
download | glutte-o-matic-1b7a9f8f89efe841fecae18d542723e422c45a3c.tar.gz glutte-o-matic-1b7a9f8f89efe841fecae18d542723e422c45a3c.tar.bz2 glutte-o-matic-1b7a9f8f89efe841fecae18d542723e422c45a3c.zip |
Enable makefile optimisations
Diffstat (limited to 'src/fsm')
-rw-r--r-- | src/fsm/Makefile | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/fsm/Makefile b/src/fsm/Makefile index 8a6e463..6891076 100644 --- a/src/fsm/Makefile +++ b/src/fsm/Makefile @@ -36,13 +36,15 @@ DEFS=-DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DARM_MATH_CM4 -D__FPU_PRESENT=1 CFLAGS =-Wall -ggdb -std=c99 -c $(MCFLAGS) $(DEFS) $(INCLUDES) # LINKER FLAGS LDSCRIPT= bsp/stm32_flash.ld -LDFLAGS =-T $(LDSCRIPT) --specs=nosys.specs $(MCFLAGS) +LDFLAGS =-T $(LDSCRIPT) --specs=nosys.specs $(MCFLAGS) -Wl,-Map=$(BINDIR)/outp.map ### # Optimizations -OPT?='O1 O2 O3 O4 O6 O7' # O5 disabled by default, because it breaks code +OPT?='O2 O3 O6' +# O1 and O4 are irrelevant +# O5 breaks FreeRTOS somehow +# I'm not trusting O7 -ifneq ($(findstring release-memopt,$(MAKECMDGOALS)),) ifneq ($(filter O1,$(OPT)),) CXXFLAGS+=-fno-exceptions # Uncomment to disable exception handling DEFS+=-DNO_EXCEPTIONS # The source code has to comply with this rule @@ -78,18 +80,15 @@ endif ifneq ($(findstring O7,$(OPT)),) LDFLAGS+=--specs=nano.specs # Use size optimized newlib endif -endif ### # Build Rules -.PHONY: all release release-memopt debug clean +.PHONY: all release debug clean all: release release: $(BINDIR)/$(BINHEX) -release-memopt: release - debug: CFLAGS+=-g debug: LDFLAGS+=-g debug: release |