-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathCommon.mk
30 lines (27 loc) · 1003 Bytes
/
Common.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
### Machine flags
#
CC_CMACH = -mmcu=cc430f6137
CC_DMACH =
### Build flags
#
# -fdata-sections, -ffunction-sections and -Wl,--gc-sections -Wl,-s
# are used for dead code elimination, see:
# http://gcc.gnu.org/ml/gcc-help/2003-08/msg00128.html
#
CFLAGS += $(CC_CMACH) $(CC_DMACH) -Wall
CFLAGS += -fno-force-addr -finline-limit=1 -fno-schedule-insns
CFLAGS += -mhwmult=none -fshort-enums -Wl,-Map=output.map
LDFLAGS = -L$(MSP430_TI)/include
CFLAGS_REL += -Os -fdata-sections -ffunction-sections -fomit-frame-pointer
LDFLAGS_REL += -Wl,--gc-sections -Wl,-s
CFLAGS_DBG += -O1 -g3 -gdwarf-2 -ggdb
LDFLAGS_DBG += -Wl,--gc-sections
# linker flags and include directories
# Not really sure about this include. There must be a better way ?
INCLUDES += -I./ -I$(MSP430_TI)/include -I$(MSP430_TI)/msp430-elf/include -I$(MSP430_TI)/lib/gcc/msp430-elf/4.9.1/include
### Build tools
#
CC = msp430-elf-gcc
LD = msp430-elf-ld
AS = msp430-elf-as
AR = msp430-elf-ar