forked from 49577/ble_examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
93 lines (77 loc) · 3.06 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
84
85
86
87
88
89
90
91
92
93
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 = "$(GCC_ARMCOMPILER)/bin/arm-none-eabi-gcc"
LNK = "$(GCC_ARMCOMPILER)/bin/arm-none-eabi-gcc"
OBJECTS = main_tirtos.obj i2secho.obj CC26X2R1_LAUNCHXL.obj ccfg.obj
CONFIGPKG = $(KERNEL_BUILD)/gcc
NAME = i2secho
CFLAGS = -I../.. \
-DDeviceFamily_CC26X2 \
"-I$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/source" \
"-I$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/source/ti/posix/gcc" \
-mcpu=cortex-m4 \
-march=armv7e-m \
-mthumb \
-mfloat-abi=hard \
-mfpu=fpv4-sp-d16 \
-ffunction-sections \
-fdata-sections \
-g \
-gstrict-dwarf \
-Wall \
"-I$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include/newlib-nano" \
"-I$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include" \
"-I$(GCC_ARMCOMPILER)/arm-none-eabi/include"
LFLAGS = -Wl,-T,../../tirtos/gcc/CC26X2R1_LAUNCHXL_TIRTOS.lds \
"-Wl,-Map,$(NAME).map" \
"-L$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/source" \
-l:ti/display/lib/display.am4fg \
-l:ti/mw/lcd/lib/lcd.am4fg \
-l:ti/grlib/lib/grlib.am4fg \
-l:ti/drivers/rf/lib/rf_multiMode_cc26x2.am4fg \
-l:ti/drivers/lib/drivers_cc26x2.am4fg \
-l:ti/drivers/pdm/lib/pdm_cc26x2.am4fg \
"-L$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/kernel/tirtos/packages" \
-l:ti/dpl/lib/dpl_cc26x2.am4fg \
"-Wl,-T,$(KERNEL_BUILD)/gcc/linker.cmd" \
-l:ti/devices/cc13x2_cc26x2/driverlib/bin/gcc/driverlib.lib \
-march=armv7e-m \
-mthumb \
-mfloat-abi=hard \
-mfpu=fpv4-sp-d16 \
-nostartfiles \
-static \
-Wl,--gc-sections \
"-L$(SIMPLELINK_CC26X2_SDK_INSTALL_DIR)/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard" \
-lgcc \
-lc \
-lm \
-lnosys \
--specs=nano.specs
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) $< -c @$(CONFIGPKG)/compiler.opt -o $@
i2secho.obj: ../../i2secho.c $(CONFIGPKG)/compiler.opt
@ echo Building $@
@ $(CC) $(CFLAGS) $< -c @$(CONFIGPKG)/compiler.opt -o $@
CC26X2R1_LAUNCHXL.obj: ../../CC26X2R1_LAUNCHXL.c $(CONFIGPKG)/compiler.opt
@ echo Building $@
@ $(CC) $(CFLAGS) $< -c @$(CONFIGPKG)/compiler.opt -o $@
ccfg.obj: ../../ccfg.c $(CONFIGPKG)/compiler.opt
@ echo Building $@
@ $(CC) $(CFLAGS) $< -c @$(CONFIGPKG)/compiler.opt -o $@
$(NAME).out: $(OBJECTS) $(CONFIGPKG)/linker.cmd
@ echo linking...
@ $(LNK) $(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