-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.env
74 lines (61 loc) · 2.23 KB
/
Makefile.env
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
ifndef REFLIB_ROOT
${error REFLIB_ROOT not defined! You must specify where the main directory resides}
endif
ifeq ($(OS),Windows_NT)
###################### Windows OS ######################
################## GCC Root Variable ###################
GCC_DIR ?= C:\ti\ccs1000\ccs\tools\compiler\msp430-gcc-9.2.0.50_win64
GCC_MSP_INC_DIR ?= $(GCC_DIR)\include
GCC_CCS_DIR := C:\ti\ccs1000\ccs\ccs_base\msp430
GCC_CCS_INC_GCC_DIR := $(GCC_CCS_DIR)\include_gcc
GCC_CCS_INC_DIR := $(GCC_CCS_DIR)\include
LIB_DIR := $(GCC_CCS_INC_GCC_DIR)
GLUELIB := $(REFLIB_ROOT)/glue/generic
LDDIR := $(GCC_CCS_INC_GCC_DIR)\$(DEVICE)
RM := rm -f
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
GCC_DIR ?= /opt/msp430
GCC_EXTRA_INC_DIR ?= $(GCC_DIR)/include
GLUELIB := $(REFLIB_ROOT)/glue/generic
GCC_CCS_INC_GCC_DIR := $(GCC_EXTRA_INC_DIR)
RM := rm -f
CTAGS := exuberant-ctags
endif
ifeq ($(UNAME_S),FreeBSD)
# GCC_DIR should be a link to /usr/local/gcc-msp430-ti-toolchain-XXX
GCC_DIR ?= ~/.local/share/gcc-msp430-ti-toolchain
GCC_EXTRA_INC_DIR ?= $(GCC_DIR)/include
GLUELIB := $(REFLIB_ROOT)/glue/generic
GCC_CCS_INC_GCC_DIR := $(GCC_EXTRA_INC_DIR)
RM := rm -f
CTAGS := exctags
endif
endif
ifneq ($(IGNORE_TARGET), true)
include $(REFLIB_ROOT)/Makefile.identify-target
endif
# set MEMORY_MODEL to LARGE if output elf is larger then 49KB and won't fit into low ROM portion
#MEMORY_MODEL := LARGE
# overwrite if clang needs to be called
ifeq ($(PARSER), scan-build)
MEMORY_MODEL = IGNORE
endif
ifeq ($(MEMORY_MODEL),LARGE)
GCC_MSP_LIB_DIR ?= $(GCC_DIR)/msp430-elf/lib/large
else
GCC_MSP_LIB_DIR ?= $(GCC_DIR)/msp430-elf/lib
endif
ifeq ($(OS),Windows_NT)
else
################### Linux or Mac OS ####################
################## GCC Root Variable ###################
LIB_DIR := $(GCC_MSP_LIB_DIR)
LDDIR := $(GCC_EXTRA_INC_DIR)/$(DEVICE_L)
endif
# location for the MSP430 DriverLib provided by Texas Instruments
# can be downloaded from https://www.ti.com/tool/MSPDRIVERLIB
DRIVERLIB:=$(REFLIB_ROOT)/driverlib/$(FAMILY)
# location for the glue logic that is still specific register-bound
GLUELIB_HAL:=$(REFLIB_ROOT)/glue/$(FAMILY)