Merged from master, added a15 support for k2l, c66ak2e
[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 # tda2xx (Vayu) Simulator
14 ifeq ($(PLATFORM),tda2xx-evm)
15  SOC = tda2xx
16  PLATFORM_XDC = "ti.platforms.evmDRA7XX"
17 endif
19 # ti816x (Netra) catalog EVM
20 ifeq ($(PLATFORM),ti816x-evm)
21  SOC = ti816x
22  PLATFORM_XDC = "ti.platforms.evmTI816X"
23 endif
25 # ti816x (Netra) Simulator
26 ifeq ($(PLATFORM),ti816x-sim)
27  SOC = ti816x
28  ifeq ($(CORE),c6xdsp)
29   PLATFORM_XDC = "ti.platforms.simDM8168"
30  endif
31 endif
33 # ti814x (Centaurus) Catalog EVM
34 ifeq ($(PLATFORM),ti814x-evm)
35  SOC = ti814x
36  PLATFORM_XDC = "ti.platforms.evmTI814X"
37 endif
39 # c6a811x (J5Eco) Catalog EVM
40 ifeq ($(PLATFORM),c6a811x-evm)
41  SOC = c6a811x
42  PLATFORM_XDC = "ti.platforms.evmTI811X"
43 endif
45 # c6472 (Tomahawk) EVM
46 ifeq ($(PLATFORM),c6472-evm)
47  SOC = c6472
48  PLATFORM_XDC = "ti.platforms.evm6472"
49 endif
51 # tci6486 (Tomahawk) EVM
52 ifeq ($(PLATFORM),tci6486-evm)
53  SOC = c6472
54  PLATFORM_XDC = "ti.platforms.evmTCI6486"
55 endif
57 # tci6608 (Shannon) Simulator 
58 ifeq ($(PLATFORM),tci6608-sim)
59  SOC = c6608
60  PLATFORM_XDC = "ti.platforms.simTCI6608"
61 endif
63 # tci6616 (Nyquist) Simulator 
64 ifeq ($(PLATFORM),tci6616-sim)
65  SOC = c6616
66  PLATFORM_XDC = "ti.platforms.simTCI6616"
67 endif
69 # tci6614 (Appleton) Simulator 
70 ifeq ($(PLATFORM),tci6614-sim)
71  SOC = tci6614
72  PLATFORM_XDC = "ti.platforms.simTCI6614"
73 endif
75 # c6657 (Gauss) Simulator 
76 ifeq ($(PLATFORM),c6657-sim)
77  SOC = c6657
78  PLATFORM_XDC = "ti.platforms.simC6657"
79 endif
81 # tci6638k2k (Kepler2) Simulator 
82 ifeq ($(PLATFORM),tci6638k2k-sim)
83  SOC = tci6638k2k
84  PLATFORM_XDC = "ti.platforms.simKepler"
85 endif
87 # c6670 (Nyquist) EVM
88 ifeq ($(PLATFORM),c6670-evm)
89  SOC = c6670
90  PLATFORM_XDC = "ti.platforms.evm6670"
91 endif
93 # c6678 (Shannon) EVM
94 ifeq ($(PLATFORM),c6678-evm)
95  SOC = c6678
96  PLATFORM_XDC = "ti.platforms.evm6678"
97 endif
99 # tci6614 (Appleton) EVM
100 ifeq ($(PLATFORM),tci6614-evm)
101  SOC = tci6614
102  PLATFORM_XDC = "ti.platforms.evmTCI6614"
103 endif
105 # c6657 (Gauss) EVM
106 ifeq ($(PLATFORM),c6657-evm)
107  SOC = c6657
108  PLATFORM_XDC = "ti.platforms.evm6657"
109 endif
111 # tci6638k2k (Kepler2) EVM
112 ifeq ($(PLATFORM),tci6638k2k-evm)
113  SOC = tci6638k2k
114  CFLAGS_LOCAL_a15host += -DGENERIC
115  PLATFORM_XDC = "ti.platforms.evmTCI6638K2K"
116 endif
118 # tci6630k2l EVM
119 ifeq ($(PLATFORM),tci6630k2l-evm)
120  SOC = tci6630k2l
121  CFLAGS_LOCAL_a15host += -DGENERIC
122  PLATFORM_XDC = "ti.platforms.evmTCI6630K2L"
123 endif
125 # c66ak2e EVM
126 ifeq ($(PLATFORM),c66ak2e-evm)
127  SOC = c66ak2e
128  CFLAGS_LOCAL_a15host += -DGENERIC
129  PLATFORM_XDC = "ti.platforms.evmC66AK2E"
130 endif
132 # tci6636k2h (Hawking) EVM
133 ifeq ($(PLATFORM),tci6636k2h-evm)
134  SOC = tci6636k2h
135  CFLAGS_LOCAL_a15host += -DGENERIC
136  PLATFORM_XDC = "ti.platforms.evmTCI6636K2H"
137 endif
139 # omapl138 (Freon) EVM
140 ifeq ($(PLATFORM),omapl138-evm)
141  SOC = omapl138
142  PLATFORM_XDC = "ti.platforms.evmOMAPL138"
143 endif
145 # c6748 (Freon) EVM
146 ifeq ($(PLATFORM),c6748-evm)
147  SOC = omapl138
148  PLATFORM_XDC = "ti.platforms.evm6748"
149 endif
151 # da830 (Primus) EVM
152 ifeq ($(PLATFORM),da830-evm)
153  SOC = omapl137
154  PLATFORM_XDC = "ti.platforms.evmDA830"
155 endif
157 # omap4 EVM
158 ifeq ($(PLATFORM),omap4-evm)
159  SOC = omap4
160  PLATFORM_XDC = "ti.platforms.sdp4430"
161 endif
163 # Generic platform
164 ifeq ($(PLATFORM),generic)
165  SOC = generic
166  PLATFORM_XDC = 
167 endif
169 # Derive Target/ISA from CORE
171 # m4
172 ifeq ($(CORE),m4)
173  ISA = m4
174 endif
176 # a15host
177 ifeq ($(CORE),a15host)
178  ISA = a15
179 endif
181 # m3vpss
182 ifeq ($(CORE),m3vpss)
183  ISA = m3
184 endif
186 # m3video
187 ifeq ($(CORE),m3video)
188  ISA = m3
189 endif
191 # a8host
192 ifeq ($(CORE),a8host)
193  ISA = a8
194 endif
196 # arm9
197 ifeq ($(CORE),arm9)
198  ISA = arm9
199 endif
201 # c6xdsp
202 ifeq ($(CORE),c6xdsp)
203  ifeq ($(SOC),ti816x)
204   ISA = 674
205  endif
206  ifeq ($(SOC),tda2xx)
207   ISA = 66
208  endif
209  ifeq ($(SOC),ti814x)
210   ISA = 674
211  endif
212  ifeq ($(SOC),c6a811x)
213   ISA = 674
214  endif
215  ifeq ($(SOC),omapl137)
216   ISA = 674
217  endif
218  ifeq ($(SOC),omapl138)
219   ISA = 674
220  endif
221  ifeq ($(SOC),c6472)
222   ISA = 64p
223  endif
224  ifeq ($(SOC),c6608)
225   ISA = 66
226  endif
227  ifeq ($(SOC),c66ak2e)
228   ISA = 66
229  endif
230  ifeq ($(SOC),c6616)
231   ISA = 66
232  endif
233  ifeq ($(SOC),tci6614)
234   ISA = 66
235  endif
236  ifeq ($(SOC),c6657)
237   ISA = 66
238  endif
239  ifeq ($(SOC),c6670)
240   ISA = 66
241  endif
242  ifeq ($(SOC),c6678)
243   ISA = 66
244  endif
245  ifeq ($(SOC),tci6638k2k)
246   ISA = 66
247  endif
248  ifeq ($(SOC),tci6630k2l)
249   ISA = 66
250  endif
251  ifeq ($(SOC),tci6636k2h)
252   ISA = 66
253  endif
254  ifeq ($(SOC),omap4)
255   ISA = 64t
256  endif
257 endif
259 # EVE - arp32
260 ifeq ($(CORE),eve)
261  ISA = arp32
262 endif
264 # Platform and SOC is generic; use the core name same as ISA (eg: 674)
265 ifeq ($(SOC),generic)
266   ISA = $(CORE)
267 endif
270 # Derive XDC/ISA specific settings 
272 ifeq ($(ISA),m4)
273   COMPILER = TMS470
274   ifeq ($(FORMAT),ELF)
275     TARGET_XDC = ti.targets.arm.elf.M4
276     FORMAT_EXT = e
277   else
278     TARGET_XDC = ti.targets.arm.M4
279   endif
280   
281   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
282   #    in the filename extension of object/library/executable files
283   ifeq ($(ENDIAN),big)
284     ENDIAN_EXT = e
285   endif
287   # Define the file extensions
288   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
289   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
290   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
291   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
292 endif
294 ifeq ($(ISA),a15)
295   TARGET_XDC = gnu.targets.arm.A15F
296   CFLAGS_LOCAL_a15host += -DGCC_BUILD
297   COMPILER = LINARO_GCC
298   FORMAT_EXT =
299   ENDIAN_EXT = fg
301   # Define the file extensions
302   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
303   OBJEXT_SO = $(OBJEXT)_so
304   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
305   LIBEXT_SO = $(LIBEXT)_so
306   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
307   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
308 endif
310 ifeq ($(ISA),m3)
311   COMPILER = TMS470
312   ifeq ($(FORMAT),ELF)
313     TARGET_XDC = ti.targets.arm.elf.M3
314     FORMAT_EXT = e
315   else
316     TARGET_XDC = ti.targets.arm.M3
317   endif
318   
319   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
320   #    in the filename extension of object/library/executable files
321   ifeq ($(ENDIAN),big)
322     ENDIAN_EXT = e
323   endif
325   # Define the file extensions
326   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
327   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
328   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
329   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
330 endif
332 ifeq ($(ISA),674)
333   COMPILER = C6000
334   ifeq ($(FORMAT),ELF)
335     TARGET_XDC = ti.targets.elf.C674
336     FORMAT_EXT = e
337   else
338     TARGET_XDC = ti.targets.C674
339   endif
340   
341   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
342   #    in the filename extension of object/library/executable files
343   ifeq ($(ENDIAN),big)
344     ENDIAN_EXT = e
345   endif
347   # Define the file extensions
348   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
349   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
350   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
351   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
352 endif
354 ifeq ($(ISA),64p)
355   COMPILER = C6000
356   ifeq ($(FORMAT),ELF)
357    ifeq ($(ENDIAN),big)
358     TARGET_XDC = ti.targets.elf.C64P_big_endian
359    else
360     TARGET_XDC = ti.targets.elf.C64P
361    endif
362     FORMAT_EXT = e
363   else
364    ifeq ($(ENDIAN),big)
365     TARGET_XDC = ti.targets.C64P_big_endian
366    else
367     TARGET_XDC = ti.targets.C64P
368    endif
369   endif
370   
371   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
372   #    in the filename extension of object/library/executable files
373   ifeq ($(ENDIAN),big)
374     ENDIAN_EXT = e
375   endif
377   # Define the file extensions
378   OBJEXT = o$(FORMAT_EXT)64P$(ENDIAN_EXT)
379   LIBEXT = a$(FORMAT_EXT)64P$(ENDIAN_EXT)
380   EXEEXT = x$(FORMAT_EXT)64P$(ENDIAN_EXT)
381   ASMEXT = s$(FORMAT_EXT)64P$(ENDIAN_EXT)
382 endif
384 ifeq ($(ISA),64t)
385   COMPILER = C6000
386   ifeq ($(FORMAT),ELF)
387    ifeq ($(ENDIAN),big)
388     TARGET_XDC = ti.targets.elf.C64T_big_endian
389    else
390     TARGET_XDC = ti.targets.elf.C64T
391    endif
392     FORMAT_EXT = e
393   else
394    ifeq ($(ENDIAN),big)
395     TARGET_XDC = ti.targets.C64T_big_endian
396    else
397     TARGET_XDC = ti.targets.C64T
398    endif
399   endif
400   
401   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
402   #    in the filename extension of object/library/executable files
403   ifeq ($(ENDIAN),big)
404     ENDIAN_EXT = e
405   endif
407   # Define the file extensions
408   OBJEXT = o$(FORMAT_EXT)64T$(ENDIAN_EXT)
409   LIBEXT = a$(FORMAT_EXT)64T$(ENDIAN_EXT)
410   EXEEXT = x$(FORMAT_EXT)64T$(ENDIAN_EXT)
411   ASMEXT = s$(FORMAT_EXT)64T$(ENDIAN_EXT)
412 endif
414 ifeq ($(ISA),66)
415   COMPILER = C6000
416   ifeq ($(FORMAT),ELF)
417    ifeq ($(ENDIAN),big)
418     TARGET_XDC = ti.targets.elf.C66_big_endian
419    else
420     TARGET_XDC = ti.targets.elf.C66
421    endif
422     FORMAT_EXT = e
423   else
424    ifeq ($(ENDIAN),big)
425     TARGET_XDC = ti.targets.C66_big_endian
426    else
427     TARGET_XDC = ti.targets.C66
428    endif
429   endif
430   
431   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
432   #    in the filename extension of object/library/executable files
433   ifeq ($(ENDIAN),big)
434     ENDIAN_EXT = e
435   endif
437   # Define the file extensions
438   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
439   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
440   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
441   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
443 endif
445 ifeq ($(ISA),a8)
446   ifeq ($(TOOLCHAIN_a8),TI)
447     TARGET_XDC = ti.targets.arm.elf.A8F
448     ifeq ($(FORMAT),ELF)
449       FORMAT_EXT = e
450     endif
451     ifeq ($(ENDIAN),big)
452       ENDIAN_EXT = ef
453   else
454     ENDIAN_EXT = f
455     endif
456   COMPILER = TMS470
457   else
458     TARGET_XDC = gnu.targets.arm.A8F
459     CFLAGS_LOCAL_a8host += -DGCC_BUILD
460   FORMAT_EXT =
461   ENDIAN_EXT = fg
462   COMPILER = LINARO_GCC
463   endif
465   # Define the file extensions
466   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
467   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
468   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
469   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
470 endif
472 ifeq ($(ISA),arm9)
473   COMPILER = TMS470
474   TARGET_XDC = ti.targets.arm.elf.Arm9
475   ifeq ($(FORMAT),ELF)
476     FORMAT_EXT = e
477   endif
478   ifeq ($(ENDIAN),big)
479     ENDIAN_EXT = e
480   endif
482   # Define the file extensions
483   OBJEXT = o$(FORMAT_EXT)9$(ENDIAN_EXT)
484   LIBEXT = a$(FORMAT_EXT)9$(ENDIAN_EXT)
485   EXEEXT = x$(FORMAT_EXT)9$(ENDIAN_EXT)
486   ASMEXT = s$(FORMAT_EXT)9$(ENDIAN_EXT)
487 endif
489 ifeq ($(ISA),arp32)
490   ifeq ($(FORMAT),ELF)
491     TARGET_XDC = ti.targets.arp32.elf.ARP32_far
492     ENDIAN_EXT = f
493     FORMAT_EXT = e
494   else
495     TARGET_XDC = ti.targets.arp32.elf.ARP32
496   endif
498   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
499   #    in the filename extension of object/library/executable files
500   ifeq ($(ENDIAN),big)
501     ENDIAN_EXT = e
502   endif
504   # Define the file extensions
505   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
506   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
507   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
508   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
509 endif
511 ifeq (sim,$(findstring sim,$(PLATFORM)))
512   OMX_PLATFORM = sim
513 endif
514 export COMPILER
515 ifeq (ti816x-evm,$(findstring ti816x-evm,$(PLATFORM)))
516  # Don't know why platform define for XDC is separate for A8. TO DO.
517  ifeq ($(CORE),a8host)
518   OMX_PLATFORM = evmSi
519  else
520   OMX_PLATFORM = evmSi816X
521  endif
522 endif
524 ifeq ($(CORE),m3vpss)
525   CFGARGS_XDC = \"{mode: \\\"$(IPC_MODE)\\\", coreName: \\\"VPSS-M3\\\", tiler: \\\"DucatiTilerMemMgr\\\", platformMem: \\\"$(PLATFORM_MEM)\\\", maxResolution: \\\"$(MAX_RESOLUTION)\\\", omxBuildPlatform: \\\"$(OMX_PLATFORM)\\\"}\"
526 endif
527 ifeq ($(CORE),m3video)
528   CFGARGS_XDC = \"{mode: \\\"$(IPC_MODE)\\\", coreName:\\\"VIDEO-M3\\\", tiler: \\\"DucatiTilerMemMgr\\\", platformMem: \\\"$(PLATFORM_MEM)\\\", maxResolution: \\\"$(MAX_RESOLUTION)\\\", omxBuildPlatform: \\\"$(OMX_PLATFORM)\\\"}\"
529 endif
530 ifeq ($(CORE),c6xdsp)
531   CFGARGS_XDC = 
532 endif
533 ifeq ($(CORE),a8host)
534   CFGARGS_XDC = \"{mode: \\\"$(IPC_MODE)\\\", coreName:\\\"HOST\\\", tiler: \\\"NullTilerMemMgr\\\", platformMem: \\\"$(PLATFORM_MEM)\\\", maxResolution: \\\"$(MAX_RESOLUTION)\\\", omxBuildPlatform: \\\"$(OMX_PLATFORM)\\\"}\"
535 endif
537 # Nothing beyond this point