forked from 49577/ble_examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
83 lines (67 loc) · 2.64 KB
/
makefile
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
73
74
75
76
77
78
79
80
81
82
83
SIMPLELINK_CC26X2_SDK_INSTALL_DIR ?= $(abspath ../../../../../../..)
include $(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/imports.mak
KERNEL_BUILD := $(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/kernel/tirtos/builds/CC26X2R1_LAUNCHXL/release
CC = "$(CCS_ARMCOMPILER)/bin/armcl"
LNK = "$(CCS_ARMCOMPILER)/bin/armcl"
OBJECTS = main_tirtos.obj i2secho.obj CC26X2R1_LAUNCHXL.obj ccfg.obj
CONFIGPKG = $(KERNEL_BUILD)/ccs
NAME = i2secho
CFLAGS = -I../.. \
-DDeviceFamily_CC26X2 \
"-I$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/source" \
"-I$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/source/ti/posix/ccs" \
--silicon_version=7M4 \
--code_state=16 \
--little_endian \
--display_error_number \
--diag_warning=255 \
--diag_wrap=off \
--gen_func_subsections=on \
--float_support=FPv4SPD16 \
--symdebug:dwarf \
"-I$(CCS_ARMCOMPILER)/include"
LFLAGS = "-i$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/source" \
-lti/display/lib/display.aem4f \
-lti/mw/lcd/lib/lcd.aem4f \
-lti/grlib/lib/grlib.aem4f \
-lti/drivers/rf/lib/rf_multiMode_cc26x2.aem4f \
-lti/drivers/lib/drivers_cc26x2.aem4f \
-lti/drivers/pdm/lib/pdm_cc26x2.aem4f \
"-i$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/kernel/tirtos/packages" \
-lti/dpl/lib/dpl_cc26x2.aem4f \
"-l$(KERNEL_BUILD)/ccs/linker.cmd" \
-lti/devices/cc13x2_cc26x2/driverlib/bin/ccs/driverlib.lib \
../../tirtos/ccs/CC26X2R1_LAUNCHXL_TIRTOS.cmd \
"-m$(NAME).map" \
--warn_sections \
--display_error_number \
--diag_wrap=off \
--rom_model \
"-i$(CCS_ARMCOMPILER)/lib" \
-llibc.a
all: $(NAME).out
$(CONFIGPKG)/linker.cmd $(CONFIGPKG)/compiler.opt:
@ $(ECHOBLANKLINE)
@ echo $(CONFIGPKG) is not built.
@ echo You can build it by issuing $(MAKE) in $(CONFIGPKG).
@ $(ECHOBLANKLINE)
main_tirtos.obj: ../../tirtos/main_tirtos.c $(CONFIGPKG)/compiler.opt
@ echo Building $@
@ $(CC) $(CFLAGS) $< --cmd_file=$(CONFIGPKG)/compiler.opt --output_file=$@
i2secho.obj: ../../i2secho.c $(CONFIGPKG)/compiler.opt
@ echo Building $@
@ $(CC) $(CFLAGS) $< --cmd_file=$(CONFIGPKG)/compiler.opt --output_file=$@
CC26X2R1_LAUNCHXL.obj: ../../CC26X2R1_LAUNCHXL.c $(CONFIGPKG)/compiler.opt
@ echo Building $@
@ $(CC) $(CFLAGS) $< --cmd_file=$(CONFIGPKG)/compiler.opt --output_file=$@
ccfg.obj: ../../ccfg.c $(CONFIGPKG)/compiler.opt
@ echo Building $@
@ $(CC) $(CFLAGS) $< --cmd_file=$(CONFIGPKG)/compiler.opt --output_file=$@
$(NAME).out: $(OBJECTS) $(CONFIGPKG)/linker.cmd
@ echo linking...
@ $(LNK) $(CFLAGS) -z $(OBJECTS) $(LFLAGS) -o $(NAME).out
clean:
@ echo Cleaning...
@ $(RM) $(OBJECTS) > $(DEVNULL) 2>&1
@ $(RM) $(NAME).out > $(DEVNULL) 2>&1
@ $(RM) $(NAME).map > $(DEVNULL) 2>&1