Enable code size optimization by default on most platforms
This commit is contained in:
parent
51beaee1b5
commit
ccbb55de2e
@ -27,6 +27,7 @@ CFLAGS += -Werror
|
||||
endif
|
||||
|
||||
### Are we building with code size optimisations?
|
||||
SMALL ?= 1
|
||||
ifeq ($(SMALL),1)
|
||||
CFLAGS += -Os
|
||||
else
|
||||
|
@ -46,6 +46,7 @@ CFLAGS += -Werror
|
||||
endif
|
||||
|
||||
### Are we building with code size optimisations?
|
||||
SMALL ?= 1
|
||||
ifeq ($(SMALL),1)
|
||||
CFLAGS += -Os
|
||||
else
|
||||
|
@ -178,6 +178,7 @@ CFLAGS += -Os -fno-strict-aliasing
|
||||
LDFLAGS += -mmcu=$(CC_MCU) -Wl,-Map=contiki-$(TARGET).map
|
||||
|
||||
### These flags can reduce the code size and RAM usage with up to 10%
|
||||
SMALL ?= 1
|
||||
ifeq ($(SMALL),1)
|
||||
CFLAGS += -ffunction-sections
|
||||
# CFLAGS += -fdata-sections
|
||||
|
@ -145,6 +145,7 @@ CFLAGS += -DSOFTDEVICE_PRESENT
|
||||
CFLAGS += -DS132
|
||||
endif
|
||||
|
||||
SMALL ?= 1
|
||||
ifeq ($(SMALL),1)
|
||||
CFLAGS += -Os
|
||||
else
|
||||
|
@ -15,11 +15,6 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
||||
|
||||
CLEAN += *.cc2538dk
|
||||
|
||||
### Unless the example dictates otherwise, build with code size optimisations
|
||||
ifndef SMALL
|
||||
SMALL = 1
|
||||
endif
|
||||
|
||||
### Define the CPU directory
|
||||
CONTIKI_CPU=$(CONTIKI)/drivers/cpu/cc2538
|
||||
include $(CONTIKI_CPU)/Makefile.cc2538
|
||||
|
@ -21,11 +21,8 @@ endif
|
||||
|
||||
CLEAN += *.nrf52dk
|
||||
|
||||
### Unless the example dictates otherwise, build with code size optimisations switched
|
||||
### off
|
||||
ifndef SMALL
|
||||
SMALL = 0
|
||||
endif
|
||||
### Unless the example dictates otherwise, build with code size optimisations switched off
|
||||
SMALL ?= 0
|
||||
|
||||
### Define the CPU directory and pull in the correct CPU makefile.
|
||||
CONTIKI_CPU=$(CONTIKI)/drivers/cpu/nrf52832
|
||||
|
@ -22,11 +22,6 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
||||
|
||||
CLEAN += *.openmote-cc2538
|
||||
|
||||
### Unless the example dictates otherwise, build with code size optimisations
|
||||
ifndef SMALL
|
||||
SMALL = 1
|
||||
endif
|
||||
|
||||
### Define the CPU directory
|
||||
CONTIKI_CPU=$(CONTIKI)/drivers/cpu/cc2538
|
||||
include $(CONTIKI_CPU)/Makefile.cc2538
|
||||
|
@ -4,10 +4,6 @@ CONTIKI_TARGET_SOURCEFILES += contiki-sky-platform.c \
|
||||
sht11.c sht11-sensor.c light-sensor.c battery-sensor.c \
|
||||
button-sensor.c radio-sensor.c
|
||||
|
||||
ifndef SMALL
|
||||
SMALL=1
|
||||
endif
|
||||
|
||||
include $(CONTIKI)/drivers/platform/sky/Makefile.common
|
||||
|
||||
MODULES += core/net/mac \
|
||||
|
@ -23,10 +23,8 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
||||
|
||||
CLEAN += *.srf06-cc26xx
|
||||
|
||||
### Unless the example dictates otherwise, build with code size optimisations
|
||||
ifndef SMALL
|
||||
SMALL = 0
|
||||
endif
|
||||
### Unless the example dictates otherwise, build without code size optimisations
|
||||
SMALL ?= 0
|
||||
|
||||
### Define the CPU directory and pull in the correct CPU makefile. This will
|
||||
### be defined by one of the makefiles included above and it can be either
|
||||
|
@ -19,9 +19,8 @@ CONTIKI_TARGET_MAIN = contiki-wismote-main.c
|
||||
endif
|
||||
|
||||
ifdef IAR
|
||||
SMALL = 0
|
||||
CFLAGS += -D__MSP430F5437__=1 -e --vla -Ohz --multiplier=32 --multiplier_location=4C0 --hw_workaround=CPU40 --core=430X --double=32
|
||||
else
|
||||
SMALL=1
|
||||
endif
|
||||
|
||||
CONTIKI_TARGET_SOURCEFILES += $(ARCH) $(UIPDRIVERS)
|
||||
|
@ -41,11 +41,6 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
||||
|
||||
CLEAN += *.zoul
|
||||
|
||||
### Unless the example dictates otherwise, build with code size optimisations
|
||||
ifndef SMALL
|
||||
SMALL = 1
|
||||
endif
|
||||
|
||||
### Define the CPU directory
|
||||
CONTIKI_CPU=$(CONTIKI)/drivers/cpu/cc2538
|
||||
include $(CONTIKI_CPU)/Makefile.cc2538
|
||||
|
@ -3,7 +3,6 @@ CONTIKI = ../../../
|
||||
APPS += antelope unit-test
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
SMALL = 1
|
||||
|
||||
all: shell-db
|
||||
|
||||
|
@ -20,9 +20,6 @@ endif
|
||||
PROJECTDIRS += $(REST_RESOURCES_DIR)
|
||||
PROJECT_SOURCEFILES += $(REST_RESOURCES_FILES)
|
||||
|
||||
# linker optimizations
|
||||
SMALL=1
|
||||
|
||||
# REST Engine shall use Erbium CoAP implementation
|
||||
APPS += er-coap
|
||||
APPS += rest-engine
|
||||
|
@ -1,7 +1,5 @@
|
||||
CONTIKI=../../..
|
||||
|
||||
SMALL=1
|
||||
|
||||
PROJECT_SOURCEFILES += json-ws.c
|
||||
|
||||
ifdef WITH_COSM
|
||||
|
@ -4,9 +4,6 @@ APPS = slip-cmd
|
||||
|
||||
CONTIKI=../../..
|
||||
|
||||
#linker optimizations
|
||||
SMALL=1
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
PROJECT_SOURCEFILES += border-router-cmds.c tun-bridge.c border-router-rdc.c \
|
||||
slip-config.c slip-dev.c
|
||||
|
@ -3,9 +3,6 @@ all: $(CONTIKI_PROJECT)
|
||||
|
||||
CONTIKI=../../..
|
||||
|
||||
#linker optimizations
|
||||
SMALL=1
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
PROJECT_SOURCEFILES += slip-bridge.c
|
||||
|
||||
|
@ -8,9 +8,6 @@ endif
|
||||
|
||||
CONTIKI=../../..
|
||||
|
||||
#linker optimizations
|
||||
SMALL=1
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
PROJECT_SOURCEFILES += slip-net.c no-framer.c
|
||||
ifeq ($(TARGET),sky)
|
||||
|
@ -23,9 +23,6 @@ REST_RESOURCES_FILES = $(notdir $(shell find $(REST_RESOURCES_DIR) -name '*.c' !
|
||||
PROJECTDIRS += $(REST_RESOURCES_DIR)
|
||||
PROJECT_SOURCEFILES += $(REST_RESOURCES_FILES)
|
||||
|
||||
# linker optimizations
|
||||
SMALL=1
|
||||
|
||||
# REST Engine shall use Erbium CoAP implementation
|
||||
APPS += er-coap
|
||||
APPS += rest-engine
|
||||
|
@ -2,8 +2,6 @@ all: z1-websense
|
||||
|
||||
CONTIKI = ../../../../..
|
||||
|
||||
SMALL = 1
|
||||
|
||||
APPS += webserver webbrowser
|
||||
|
||||
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
||||
|
Loading…
Reference in New Issue
Block a user