2019-02-22 23:42:08 +01:00
|
|
|
# Target architecture for the build. Use msp430-elf if you are unsure.
|
2020-09-08 22:28:41 +02:00
|
|
|
TARGET_ARCH_MSP430 ?= msp430-elf
|
|
|
|
TARGET_ARCH ?= $(TARGET_ARCH_MSP430)
|
2019-02-22 23:42:08 +01:00
|
|
|
|
|
|
|
MSP430_SUPPORT_FILES ?= $(RIOTCPU)/msp430_common/vendor/msp430-gcc-support-files
|
2015-09-16 17:06:08 +02:00
|
|
|
|
|
|
|
# define build specific options
|
2019-02-22 23:42:08 +01:00
|
|
|
CFLAGS_CPU = -mmcu=$(CPU_MODEL) -isystem $(MSP430_SUPPORT_FILES)/include
|
2016-07-31 00:17:55 +02:00
|
|
|
CFLAGS_LINK = -ffunction-sections -fdata-sections
|
2019-02-22 23:42:08 +01:00
|
|
|
CFLAGS_DBG ?= -g -gdwarf-2
|
2015-09-16 17:06:08 +02:00
|
|
|
CFLAGS_OPT ?= -Os
|
2019-02-22 23:42:08 +01:00
|
|
|
|
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)
|
2019-02-22 23:42:08 +01:00
|
|
|
|
|
|
|
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT)
|
|
|
|
LINKFLAGS += -Wl,--gc-sections -Wl,-L$(MSP430_SUPPORT_FILES)/include
|
2020-11-03 11:32:35 +01:00
|
|
|
LINKFLAGS += -T $(MSP430_SUPPORT_FILES)/include/$(CPU_MODEL).ld
|
2021-10-25 15:03:50 +02:00
|
|
|
LINKFLAGS += -T $(RIOTCPU)/msp430_common/ldscripts/msp430_common.ld
|
2020-11-03 11:32:35 +01:00
|
|
|
LINKFLAGS += $(RIOTCPU)/msp430_common/ldscripts/xfa.ld
|
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
|