2016-03-21 12:19:04 +01:00
|
|
|
# Target architecture for the build. Use msp430 if you are unsure.
|
|
|
|
export TARGET_ARCH ?= msp430
|
2015-09-16 17:06:08 +02:00
|
|
|
|
|
|
|
# define build specific options
|
2018-07-11 14:56:54 +02:00
|
|
|
CFLAGS_CPU = -mmcu=$(CPU_MODEL)
|
|
|
|
# default std set to gnu99 of not overwritten by user
|
|
|
|
ifeq (, $(filter -std=%, $(CFLAGS)))
|
2019-08-27 16:06:41 +02:00
|
|
|
CFLAGS += -std=gnu99
|
2018-07-11 14:56:54 +02:00
|
|
|
endif
|
2016-07-31 00:17:55 +02:00
|
|
|
CFLAGS_LINK = -ffunction-sections -fdata-sections
|
2017-01-16 15:54:59 +01:00
|
|
|
CFLAGS_DBG ?= -gdwarf-2
|
2015-09-16 17:06:08 +02:00
|
|
|
CFLAGS_OPT ?= -Os
|
2019-08-27 16:06:41 +02:00
|
|
|
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
|
|
|
|
ASFLAGS += $(CFLAGS_CPU) --defsym $(CPU_MODEL)=1 $(CFLAGS_DBG)
|
2015-09-16 17:06:08 +02:00
|
|
|
# export linker flags
|
2016-07-31 00:17:55 +02:00
|
|
|
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc
|
2019-08-28 19:43:17 +02:00
|
|
|
|
|
|
|
OPTIONAL_CFLAGS_BLACKLIST += -fdiagnostics-color
|
|
|
|
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-overflow
|
|
|
|
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-truncation
|
2019-08-28 18:40:38 +02:00
|
|
|
OPTIONAL_CFLAGS_BLACKLIST += -gz
|