d95099dde25deab0cd3f972b35288edb42eaabe6
[keystone-rtos/edma3_lld.git] / makerules / platform.mk
1 # Filename: platforms.mk
2 #
3 # Platforms make file - Platform/SoC/targets are defined/derived in this file
4
5 # This file needs to change when:
6 #     1. a new platform/SoC is added, which also might have its own cores/ISAs
7 #
9 #
10 # Derive SOC from PLATFORM
11 #
13 # ti816x (Netra) catalog EVM
14 ifeq ($(PLATFORM),ti816x-evm)
15  SOC = ti816x
16  PLATFORM_XDC = "ti.platforms.evmTI816X"
17 endif
19 # ti816x (Netra) Simulator
20 ifeq ($(PLATFORM),ti816x-sim)
21  SOC = ti816x
22  ifeq ($(CORE),c6xdsp)
23   PLATFORM_XDC = "ti.platforms.simDM8168"
24  endif
25 endif
27 # ti814x (Centaurus) Catalog EVM
28 ifeq ($(PLATFORM),ti814x-evm)
29  SOC = ti814x
30  PLATFORM_XDC = "ti.platforms.evmTI814X"
31 endif
33 # c6a811x (J5Eco) Catalog EVM
34 ifeq ($(PLATFORM),c6a811x-evm)
35  SOC = c6a811x
36  PLATFORM_XDC = "ti.platforms.evmTI811X"
37 endif
39 # c6472 (Tomahawk) EVM
40 ifeq ($(PLATFORM),c6472-evm)
41  SOC = c6472
42  PLATFORM_XDC = "ti.platforms.evm6472"
43 endif
45 # tci6486 (Tomahawk) EVM
46 ifeq ($(PLATFORM),tci6486-evm)
47  SOC = c6472
48  PLATFORM_XDC = "ti.platforms.evmTCI6486"
49 endif
51 # tci6608 (Shannon) Simulator 
52 ifeq ($(PLATFORM),tci6608-sim)
53  SOC = c6608
54  PLATFORM_XDC = "ti.platforms.simTCI6608"
55 endif
57 # tci6616 (Nyquist) Simulator 
58 ifeq ($(PLATFORM),tci6616-sim)
59  SOC = c6616
60  PLATFORM_XDC = "ti.platforms.simTCI6616"
61 endif
63 # tci6614 (Appleton) Simulator 
64 ifeq ($(PLATFORM),tci6614-sim)
65  SOC = tci6614
66  PLATFORM_XDC = "ti.platforms.simTCI6614"
67 endif
69 # c6657 (Gauss) Simulator 
70 ifeq ($(PLATFORM),c6657-sim)
71  SOC = c6657
72  PLATFORM_XDC = "ti.platforms.simC6657"
73 endif
75 # tci6634 (Kepler) Simulator 
76 ifeq ($(PLATFORM),tci6634-sim)
77  SOC = tci6634
78  PLATFORM_XDC = "ti.platforms.simTCI6634"
79 endif
80 # c6670 (Nyquist) EVM
81 ifeq ($(PLATFORM),c6670-evm)
82  SOC = c6670
83  PLATFORM_XDC = "ti.platforms.evm6670"
84 endif
86 # c6678 (Shannon) EVM
87 ifeq ($(PLATFORM),c6678-evm)
88  SOC = c6678
89  PLATFORM_XDC = "ti.platforms.evm6678"
90 endif
92 # tci6614 (Appleton) EVM
93 ifeq ($(PLATFORM),tci6614-evm)
94  SOC = tci6614
95  PLATFORM_XDC = "ti.platforms.evmTCI6614"
96 endif
98 # c6657 (Gauss) EVM
99 ifeq ($(PLATFORM),c6657-evm)
100  SOC = c6657
101  PLATFORM_XDC = "ti.platforms.evm6657"
102 endif
104 # tci6634 (Kepler) EVM
105 ifeq ($(PLATFORM),tci6634-evm)
106  SOC = tci6634
107  PLATFORM_XDC = "ti.platforms.evmTCI6634"
108 endif
110 # omapl138 (Freon) EVM
111 ifeq ($(PLATFORM),omapl138-evm)
112  SOC = omapl138
113  PLATFORM_XDC = "ti.platforms.evmOMAPL138"
114 endif
116 # c6748 (Freon) EVM
117 ifeq ($(PLATFORM),c6748-evm)
118  SOC = omapl138
119  PLATFORM_XDC = "ti.platforms.evm6748"
120 endif
122 # da830 (Primus) EVM
123 ifeq ($(PLATFORM),da830-evm)
124  SOC = omapl137
125  PLATFORM_XDC = "ti.platforms.evmDA830"
126 endif
128 # omap4 EVM
129 ifeq ($(PLATFORM),omap4-evm)
130  SOC = omap4
131  PLATFORM_XDC = "ti.platforms.sdp4430"
132 endif
134 # Generic platform
135 ifeq ($(PLATFORM),generic)
136  SOC = generic
137  PLATFORM_XDC = 
138 endif
140 # Derive Target/ISA from CORE
142 # m3vpss
143 ifeq ($(CORE),m3vpss)
144  ISA = m3
145 endif
147 # m3video
148 ifeq ($(CORE),m3video)
149  ISA = m3
150 endif
152 # a8host
153 ifeq ($(CORE),a8host)
154  ISA = a8
155 endif
157 # arm9
158 ifeq ($(CORE),arm9)
159  ISA = arm9
160 endif
162 # c6xdsp
163 ifeq ($(CORE),c6xdsp)
164  ifeq ($(SOC),ti816x)
165   ISA = 674
166  endif
167  ifeq ($(SOC),ti814x)
168   ISA = 674
169  endif
170  ifeq ($(SOC),c6a811x)
171   ISA = 674
172  endif
173  ifeq ($(SOC),omapl137)
174   ISA = 674
175  endif
176  ifeq ($(SOC),omapl138)
177   ISA = 674
178  endif
179  ifeq ($(SOC),c6472)
180   ISA = 64p
181  endif
182  ifeq ($(SOC),c6608)
183   ISA = 66
184  endif
185  ifeq ($(SOC),c6616)
186   ISA = 66
187  endif
188  ifeq ($(SOC),tci6614)
189   ISA = 66
190  endif
191  ifeq ($(SOC),c6657)
192   ISA = 66
193  endif
194  ifeq ($(SOC),c6670)
195   ISA = 66
196  endif
197  ifeq ($(SOC),c6678)
198   ISA = 66
199  endif
200  ifeq ($(SOC),tci6634)
201   ISA = 66
202  endif
203  ifeq ($(SOC),omap4)
204   ISA = 64t
205  endif
206 endif
208 # Platform and SOC is generic; use the core name same as ISA (eg: 674)
209 ifeq ($(SOC),generic)
210   ISA = $(CORE)
211 endif
214 # Derive XDC/ISA specific settings 
217 ifeq ($(ISA),m3)
218   ifeq ($(FORMAT),ELF)
219     TARGET_XDC = ti.targets.arm.elf.M3
220     FORMAT_EXT = e
221   else
222     TARGET_XDC = ti.targets.arm.M3
223   endif
224   
225   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
226   #    in the filename extension of object/library/executable files
227   ifeq ($(ENDIAN),big)
228     ENDIAN_EXT = e
229   endif
231   # Define the file extensions
232   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
233   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
234   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
235   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
236 endif
238 ifeq ($(ISA),674)
239   ifeq ($(FORMAT),ELF)
240     TARGET_XDC = ti.targets.elf.C674
241     FORMAT_EXT = e
242   else
243     TARGET_XDC = ti.targets.C674
244   endif
245   
246   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
247   #    in the filename extension of object/library/executable files
248   ifeq ($(ENDIAN),big)
249     ENDIAN_EXT = e
250   endif
252   # Define the file extensions
253   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
254   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
255   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
256   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
257 endif
259 ifeq ($(ISA),64p)
260   ifeq ($(FORMAT),ELF)
261    ifeq ($(ENDIAN),big)
262     TARGET_XDC = ti.targets.elf.C64P_big_endian
263    else
264     TARGET_XDC = ti.targets.elf.C64P
265    endif
266     FORMAT_EXT = e
267   else
268    ifeq ($(ENDIAN),big)
269     TARGET_XDC = ti.targets.C64P_big_endian
270    else
271     TARGET_XDC = ti.targets.C64P
272    endif
273   endif
274   
275   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
276   #    in the filename extension of object/library/executable files
277   ifeq ($(ENDIAN),big)
278     ENDIAN_EXT = e
279   endif
281   # Define the file extensions
282   OBJEXT = o$(FORMAT_EXT)64P$(ENDIAN_EXT)
283   LIBEXT = a$(FORMAT_EXT)64P$(ENDIAN_EXT)
284   EXEEXT = x$(FORMAT_EXT)64P$(ENDIAN_EXT)
285   ASMEXT = s$(FORMAT_EXT)64P$(ENDIAN_EXT)
286 endif
288 ifeq ($(ISA),64t)
289   ifeq ($(FORMAT),ELF)
290    ifeq ($(ENDIAN),big)
291     TARGET_XDC = ti.targets.elf.C64T_big_endian
292    else
293     TARGET_XDC = ti.targets.elf.C64T
294    endif
295     FORMAT_EXT = e
296   else
297    ifeq ($(ENDIAN),big)
298     TARGET_XDC = ti.targets.C64T_big_endian
299    else
300     TARGET_XDC = ti.targets.C64T
301    endif
302   endif
303   
304   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
305   #    in the filename extension of object/library/executable files
306   ifeq ($(ENDIAN),big)
307     ENDIAN_EXT = e
308   endif
310   # Define the file extensions
311   OBJEXT = o$(FORMAT_EXT)64T$(ENDIAN_EXT)
312   LIBEXT = a$(FORMAT_EXT)64T$(ENDIAN_EXT)
313   EXEEXT = x$(FORMAT_EXT)64T$(ENDIAN_EXT)
314   ASMEXT = s$(FORMAT_EXT)64T$(ENDIAN_EXT)
315 endif
317 ifeq ($(ISA),66)
318   ifeq ($(FORMAT),ELF)
319    ifeq ($(ENDIAN),big)
320     TARGET_XDC = ti.targets.elf.C66_big_endian
321    else
322     TARGET_XDC = ti.targets.elf.C66
323    endif
324     FORMAT_EXT = e
325   else
326    ifeq ($(ENDIAN),big)
327     TARGET_XDC = ti.targets.C66_big_endian
328    else
329     TARGET_XDC = ti.targets.C66
330    endif
331   endif
332   
333   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
334   #    in the filename extension of object/library/executable files
335   ifeq ($(ENDIAN),big)
336     ENDIAN_EXT = e
337   endif
339   # Define the file extensions
340   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
341   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
342   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
343   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
345 endif
347 ifeq ($(ISA),a8)
348   ifeq ($(TOOLCHAIN_a8),TI)
349   TARGET_XDC = ti.targets.arm.elf.A8F
350   else
351   TARGET_XDC = gnu.targets.arm.GCArmv5T
352   PLATFORM_XDC = "host.platforms.arm"
353   endif
354   ifeq ($(FORMAT),ELF)
355     FORMAT_EXT = e
356   endif
357   ifeq ($(ENDIAN),big)
358     ENDIAN_EXT = e
359   endif
361   # Define the file extensions
362   OBJEXT = o$(FORMAT_EXT)a8f$(ENDIAN_EXT)
363   LIBEXT = a$(FORMAT_EXT)a8f$(ENDIAN_EXT)
364   EXEEXT = x$(FORMAT_EXT)a8f$(ENDIAN_EXT)
365   ASMEXT = s$(FORMAT_EXT)a8f$(ENDIAN_EXT)
366 endif
368 ifeq ($(ISA),arm9)
369   TARGET_XDC = ti.targets.arm.elf.Arm9
370   ifeq ($(FORMAT),ELF)
371     FORMAT_EXT = e
372   endif
373   ifeq ($(ENDIAN),big)
374     ENDIAN_EXT = e
375   endif
377   # Define the file extensions
378   OBJEXT = o$(FORMAT_EXT)9$(ENDIAN_EXT)
379   LIBEXT = a$(FORMAT_EXT)9$(ENDIAN_EXT)
380   EXEEXT = x$(FORMAT_EXT)9$(ENDIAN_EXT)
381   ASMEXT = s$(FORMAT_EXT)9$(ENDIAN_EXT)
382 endif
384 ifeq (sim,$(findstring sim,$(PLATFORM)))
385   OMX_PLATFORM = sim
386 endif
388 ifeq (ti816x-evm,$(findstring ti816x-evm,$(PLATFORM)))
389  # Don't know why platform define for XDC is separate for A8. TO DO.
390  ifeq ($(CORE),a8host)
391   OMX_PLATFORM = evmSi
392  else
393   OMX_PLATFORM = evmSi816X
394  endif
395 endif
397 ifeq ($(CORE),m3vpss)
398   CFGARGS_XDC = \"{mode: \\\"$(IPC_MODE)\\\", coreName: \\\"VPSS-M3\\\", tiler: \\\"DucatiTilerMemMgr\\\", platformMem: \\\"$(PLATFORM_MEM)\\\", maxResolution: \\\"$(MAX_RESOLUTION)\\\", omxBuildPlatform: \\\"$(OMX_PLATFORM)\\\"}\"
399 endif
400 ifeq ($(CORE),m3video)
401   CFGARGS_XDC = \"{mode: \\\"$(IPC_MODE)\\\", coreName:\\\"VIDEO-M3\\\", tiler: \\\"DucatiTilerMemMgr\\\", platformMem: \\\"$(PLATFORM_MEM)\\\", maxResolution: \\\"$(MAX_RESOLUTION)\\\", omxBuildPlatform: \\\"$(OMX_PLATFORM)\\\"}\"
402 endif
403 ifeq ($(CORE),c6xdsp)
404   CFGARGS_XDC = 
405 endif
406 ifeq ($(CORE),a8host)
407   CFGARGS_XDC = \"{mode: \\\"$(IPC_MODE)\\\", coreName:\\\"HOST\\\", tiler: \\\"NullTilerMemMgr\\\", platformMem: \\\"$(PLATFORM_MEM)\\\", maxResolution: \\\"$(MAX_RESOLUTION)\\\", omxBuildPlatform: \\\"$(OMX_PLATFORM)\\\"}\"
408 endif
410 # Nothing beyond this point