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
|
|
|
|
CFLAGS_CPU = -mmcu=$(CPU_MODEL)
|
2016-07-31 00:17:55 +02:00
|
|
|
CFLAGS_LINK = -ffunction-sections -fdata-sections
|
2015-09-16 17:06:08 +02:00
|
|
|
CFLAGS_DBG = -gdwarf-2
|
|
|
|
CFLAGS_OPT ?= -Os
|
|
|
|
# export compiler flags
|
2016-02-08 11:19:16 +01:00
|
|
|
export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
|
2015-09-16 17:06:08 +02:00
|
|
|
# export assmebly flags
|
2016-02-08 13:31:11 +01:00
|
|
|
export 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
|
2015-09-16 17:06:08 +02:00
|
|
|
|
|
|
|
# Import all toolchain settings
|
2016-02-10 07:44:47 +01:00
|
|
|
include $(RIOTCPU)/Makefile.include.gnu
|