system.mak
8.6 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# Define source file lists to SRC_LIST
SRC_LIST = hal\system\cache\src\cp15.s \
hal\system\cache\src\cache.c \
hal\system\pdn\src\pdnoldarch.c \
hal\system\dma\src\dma.c \
hal\system\pll\src\pll.c \
hal\system\counter\src\uscounter.c \
hal\system\DP\src\fault.c \
hal\system\pmu\src\arm11_pmu_montr.c \
hal\system\GFH\public\br_GFH_parser.c \
hal\system\GFH\public\br_GFH_file_info.c \
hal\system\CBR\src\cbr.c \
hal\system\CBR\src\cbr_util.c \
hal\system\FTL\src\FTL.c \
hal\system\excep_hdlr\src\excep_hdlr.c \
hal\system\init\src\armlibc_rt.c \
hal\system\init\src\nfb_loader.c \
hal\system\init\src\idle_task.c \
hal\system\init\src\info.c \
hal\system\dcm\src\dcm_service.c \
hal\system\compression\src\code_decompression_hal.c
ifneq ($(strip $(FUNET_ENABLE)),NONE)
SRC_LIST += hal\system\funet\src\FUNET.c
endif
ifneq ($(strip $(DCM_MULTITRUNK)),NONE)
SRC_LIST += hal\system\dcmgr\src\dcmgr_pl.c
else
SRC_LIST += hal\system\dcmgr\src\dcmgr.c
endif
ifeq ($(strip $(DCM_DEBUG_SUITE_ENABLE)),TRUE)
SRC_LIST += hal\system\dcmgr\src\dcm_intercept_c.c
SRC_LIST += hal\system\dcmgr\src\dcm_intercept_a.s
endif
ifneq ($(filter __FOTA_DM__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\init\src\fota_nfb_loader.c
endif
ifneq ($(filter __ARM_FPUV2__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\vfp\src\vfp.s
endif
ifneq ($(filter __VI_ENABLED__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\compression\src\viva.c
endif
ifneq ($(filter __EVENT_BASED_TIMER__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\timer\src\event_timer.c
endif
ifneq ($(filter __DSP_FCORE4__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\init\src\Dmdsp_init.c
endif
ifneq ($(filter __SMART_PHONE_MODEM__ , $(strip $(MODULE_DEFS))),)
ifneq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\ipc\src\fs_ccci.c \
hal\system\ipc\src\ccci.c \
hal\system\ipc\src\ccci_uart_drv.c \
hal\system\ipc\src\ipc_msgsvc.c \
drv\src\ipc_rpc.c \
drv\src\ipc_rpc_cpsvc.c
endif
SRC_LIST += hal\system\emi\src\emimpu.c
endif
ifeq ($(filter __SMART_PHONE_MODEM__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\emi\src\emi.c
else
SRC_LIST += hal\system\emi\src\emi.c
endif
ifneq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
ifneq ($(filter __DSP_FCORE4__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\ipc\src\mdci.c
endif
endif
ifneq ($(filter DCM_ENABLE, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\dcm\src\dcm.c hal\system\dcm\src\sleep.c
else
ifneq ($(filter __MEUT__ __KTEST__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\dcm\src\dcm.c hal\system\dcm\src\sleep.c
else
ifeq ($(filter L1_NOT_PRESENT, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\dcm\src\dcm.c hal\system\dcm\src\sleep.c
endif
endif
endif
ifneq ($(filter __MCU_DORMANT_MODE__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\dcm\src\arm1176-dormantMode.s
endif
ifneq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\init\src\init.c \
hal\system\init\src\init_comm.c \
hal\system\init\src\init_trc.c \
hal\system\init\src\boot_cert_pattern.c \
hal\system\region\src\regioninit_ads.s \
hal\system\region\src\stack.s \
hal\system\cirq\src\Eint.c \
hal\system\cirq\src\intrCtrl.c \
hal\system\cirq\src\isrentry.c \
hal\system\cirq\src\ADIE_Eint.c \
hal\system\cirq\src\ADIE_intrCtrl.c \
hal\system\cirq\src\irq.s \
hal\system\region\src\init_memory_stack.c \
hal\system\pdn\src\pdn.c \
hal\system\init\src\bootarm.s \
hal\system\init\src\misc.s \
hal\system\init\src\armlibc_rt_heap.c \
hal\system\init\src\armlibc_rt_io.c \
hal\system\init\src\arm_unaligned.s \
hal\system\init\src\third_rom_res.c
endif
ifneq ($(filter __SV5_ENABLED__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\GFH\public\maui_GFH_body.c
endif
ifneq ($(filter __MT6255_CONCURRENCY_TEST__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\pmu\src\arm9_pmu_montr.c
endif
# Define include path lists to INC_DIR
INC_DIR = hal\system\cache\inc \
hal\system\region\inc \
interface\hal\system \
hal\system\bootloader\inc \
hal\system\cirq\inc \
hal\system\counter\inc \
hal\system\compression\inc \
hal\system\dcm\inc \
hal\system\dma\inc \
hal\system\DP\inc \
hal\system\emi\inc \
hal\system\fota\inc \
hal\system\init\inc \
hal\system\ipc\inc \
hal\system\pdn\inc \
hal\system\pll\inc \
hal\system\dcmgr\inc \
hal\system\regbase\inc \
hal\system\pmu\inc \
hal\system\excep_hdlr\inc \
hal\storage\flash\fdm\inc \
hal\storage\mc\inc \
inc \
interface\l1interface \
drv\include \
hal\bluetooth\btif\include \
MCT\Source\MainLib\Include \
sst\include \
verno \
ssf\inc \
sss\interface\inc \
security\sds \
hal\system\CBR\inc \
hal\system\GFH\public \
hal\dsp_ram \
interface\hal\system \
hal\peripheral\inc \
interface\l1interface\internal \
init\include \
tst\local_inc
ifneq ($(filter __ARM9_MMU__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\cache\src\mmu.c
endif
ifneq ($(filter __ARM11_MMU__, $(strip $(MODULE_DEFS))),)
SRC_LIST += hal\system\cache\src\mmu.c
endif
# Define the specified compile options to COMP_DEFS
COMP_DEFS = APCS_INTWORK
COMP_DEFS += $(strip $(PLATFORM))
FORCE_NO_REMAPPING_PLATFORM = MT6255 MT6922 MT6250 MT6260 MT6261 MT2501 MT2502
ifeq ($(strip $(NEED_BUILD_BOOTLOADER)),TRUE)
COMP_DEFS += __BL_ENABLE__
endif
ifeq ($(strip $(NEED_BUILD_BOOTLOADER)),TRUE)
ifeq ($(strip $(NAND_FLASH_BOOTING)),NONE)
ifdef EMMC_BOOTING
ifeq ($(strip $(EMMC_BOOTING)),NONE)
COMP_DEFS += __BL_ENABLE__
ifeq ($(filter $(strip $(PLATFORM)),$(FORCE_NO_REMAPPING_PLATFORM)),)
COMP_DEFS += REMAPPING
endif
endif
else
COMP_DEFS += __BL_ENABLE__
ifeq ($(filter $(strip $(PLATFORM)),$(FORCE_NO_REMAPPING_PLATFORM)),)
COMP_DEFS += REMAPPING
endif
endif
endif
endif
ifneq ($(strip $(FOTA_ENABLE)),NONE)
ifneq ($(strip $(FOTA_ENABLE)),)
COMP_DEFS += __FOTA_ENABLE__
ifeq ($(strip $(NAND_FLASH_BOOTING)),NONE)
ifdef EMMC_BOOTING
ifeq ($(strip $(EMMC_BOOTING)),NONE)
ifeq ($(filter $(strip $(PLATFORM)),$(FORCE_NO_REMAPPING_PLATFORM)),)
COMP_DEFS += REMAPPING
endif
endif
else
ifeq ($(filter $(strip $(PLATFORM)),$(FORCE_NO_REMAPPING_PLATFORM)),)
COMP_DEFS += REMAPPING
endif
endif
endif
endif
endif
ifdef NAND_FLASH_BOOTING
ifneq ($(strip $(NAND_FLASH_BOOTING)),NONE)
COMP_DEFS += _NAND_FLASH_BOOTING_
endif
endif
ifdef EMMC_BOOTING
ifneq ($(strip $(EMMC_BOOTING)),NONE)
COMP_DEFS += __EMMC_BOOTING__
endif
endif
ifeq ($(strip $(MCU_DCM)),DCM_ENABLE)
COMP_DEFS += DCM_ENABLE
endif
ifeq ($(strip $(ENHANCED_SINGLE_BANK_NOR_FLASH_SUPPORT)),TRUE)
COMP_DEFS += SINGLE_BANK_SUPPORT
ifeq ($(filter $(strip $(PLATFORM)),$(FORCE_NO_REMAPPING_PLATFORM)),)
COMP_DEFS += REMAPPING
endif
endif
ifeq ($(strip $(DCM_COMPRESSION_MAUI_INIT)),TRUE)
COMP_DEFS += __DCM_WITH_COMPRESSION_MAUI_INIT__
endif
###################################################################
# TimeStamp Profiling
###################################################################
# include path
INC_DIR += hal\system\profile\inc
# TS_PROFILING := TRUE
ifeq ($(TS_PROFILING),TRUE)
# compile option
COMP_DEFS += __TIME_STAMP__\
__TIME_STAMP_UTIL__\
__TIME_STAMP_TDMA_TIMER__\
__TIME_STAMP_FORCE_ENABLE__
# source flle list
SRC_LIST += hal\system\profile\src\br_time_stamp.c\
hal\system\profile\src\maui_time_stamp_util.c\
hal\system\profile\src\time_stamp_timer.c
endif
# SRC_RULE_PREPROCESS means the asm file needs to be preprocessed by armcc -E and then armasm
SRC_RULE_PREPROCESS = bootarm.s