mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
7c1949341e
Add `TARGET_ARCH_<ARCH>` for each architecture (e.g. `TARGET_ARCH_CORTEX` for Cortex M) to allow users to overwrite the target triple for a specific arch from ~/.profile or ~/.bashrc (or the like) without overwriting it for all others as well.
23 lines
864 B
Makefile
23 lines
864 B
Makefile
# Target architecture for the build. Use msp430-elf if you are unsure.
|
|
TARGET_ARCH_MSP430 ?= msp430-elf
|
|
TARGET_ARCH ?= $(TARGET_ARCH_MSP430)
|
|
|
|
MSP430_SUPPORT_FILES ?= $(RIOTCPU)/msp430_common/vendor/msp430-gcc-support-files
|
|
|
|
# define build specific options
|
|
CFLAGS_CPU = -mmcu=$(CPU_MODEL) -isystem $(MSP430_SUPPORT_FILES)/include
|
|
CFLAGS_LINK = -ffunction-sections -fdata-sections
|
|
CFLAGS_DBG ?= -g -gdwarf-2
|
|
CFLAGS_OPT ?= -Os
|
|
|
|
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
|
|
ASFLAGS += $(CFLAGS_CPU) --defsym $(CPU_MODEL)=1 $(CFLAGS_DBG)
|
|
|
|
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT)
|
|
LINKFLAGS += -Wl,--gc-sections -Wl,-L$(MSP430_SUPPORT_FILES)/include
|
|
|
|
OPTIONAL_CFLAGS_BLACKLIST += -fdiagnostics-color
|
|
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-overflow
|
|
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-truncation
|
|
OPTIONAL_CFLAGS_BLACKLIST += -gz
|