PRSDK-8534: migration to sysbios 6.82
[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) EVM
14 ifeq ($(PLATFORM),tda2xx-evm)
15  SOC = tda2xx
16  PLATFORM_XDC = "ti.platforms.evmDRA7XX"
17 endif
18 #  am572x
19 ifeq ($(PLATFORM),am572x-evm)
20  SOC = am572x
21  PLATFORM_XDC = "ti.platforms.evmAM572X"
22 endif
24 ifeq ($(PLATFORM),am571x-evm)
25  SOC = am571x
26  PLATFORM_XDC = "ti.platforms.evmDRA7XX"
27 endif
29 # tda3xx (ADAS low)
30 ifeq ($(PLATFORM),tda3xx-evm)
31  SOC = tda3xx
32  PLATFORM_XDC = "ti.platforms.evmTDA3XX"
33 endif
35 #  dra72x (j6Eco)
36 ifeq ($(PLATFORM),dra72x-evm)
37  SOC = dra72x
38  PLATFORM_XDC = "ti.platforms.evmDRA7XX"
39 endif
41 #  tda2ex (j6Eco)
42 ifeq ($(PLATFORM),tda2ex-evm)
43  SOC = dra72x
44  PLATFORM_XDC = "ti.platforms.evmDRA7XX"
45 endif
47 #  am335x
48 ifeq ($(PLATFORM),am335x-evm)
49  SOC = am335x
50  PLATFORM_XDC = "ti.platforms.evmAM3359"
51 endif
53 #  am437x
54 ifeq ($(PLATFORM),am437x-evm)
55  SOC = am437x
56  PLATFORM_XDC = "ti.platforms.evmAM437X"
57 endif
59 # ti816x (Netra) catalog EVM
60 ifeq ($(PLATFORM),ti816x-evm)
61  SOC = ti816x
62  PLATFORM_XDC = "ti.platforms.evmTI816X"
63 endif
65 # ti816x (Netra) Simulator
66 ifeq ($(PLATFORM),ti816x-sim)
67  SOC = ti816x
68  ifeq ($(CORE),c6xdsp)
69   PLATFORM_XDC = "ti.platforms.simDM8168"
70  endif
71 endif
73 # ti814x (Centaurus) Catalog EVM
74 ifeq ($(PLATFORM),ti814x-evm)
75  SOC = ti814x
76  PLATFORM_XDC = "ti.platforms.evmTI814X"
77 endif
79 # c6a811x (J5Eco) Catalog EVM
80 ifeq ($(PLATFORM),c6a811x-evm)
81  SOC = c6a811x
82  PLATFORM_XDC = "ti.platforms.evmTI811X"
83 endif
85 # c6472 (Tomahawk) EVM
86 ifeq ($(PLATFORM),c6472-evm)
87  SOC = c6472
88  PLATFORM_XDC = "ti.platforms.evm6472"
89 endif
91 # tci6486 (Tomahawk) EVM
92 ifeq ($(PLATFORM),tci6486-evm)
93  SOC = c6472
94  PLATFORM_XDC = "ti.platforms.evmTCI6486"
95 endif
97 # tci6608 (Shannon) Simulator
98 ifeq ($(PLATFORM),tci6608-sim)
99  SOC = c6608
100  PLATFORM_XDC = "ti.platforms.simTCI6608"
101 endif
103 # tci6616 (Nyquist) Simulator
104 ifeq ($(PLATFORM),tci6616-sim)
105  SOC = c6616
106  PLATFORM_XDC = "ti.platforms.simTCI6616"
107 endif
109 # tci6614 (Appleton) Simulator
110 ifeq ($(PLATFORM),tci6614-sim)
111  SOC = tci6614
112  PLATFORM_XDC = "ti.platforms.simTCI6614"
113 endif
115 # c6657 (Gauss) Simulator
116 ifeq ($(PLATFORM),c6657-sim)
117  SOC = c6657
118  PLATFORM_XDC = "ti.platforms.simC6657"
119 endif
121 # tci6638k2k (Kepler2) Simulator
122 ifeq ($(PLATFORM),tci6638k2k-sim)
123  SOC = tci6638k2k
124  PLATFORM_XDC = "ti.platforms.simKepler"
125 endif
127 # c6670 (Nyquist) EVM
128 ifeq ($(PLATFORM),c6670-evm)
129  SOC = c6670
130  PLATFORM_XDC = "ti.platforms.evm6670"
131 endif
133 # c6678 (Shannon) EVM
134 ifeq ($(PLATFORM),c6678-evm)
135  SOC = c6678
136  PLATFORM_XDC = "ti.platforms.evm6678"
137 endif
139 # tci6614 (Appleton) EVM
140 ifeq ($(PLATFORM),tci6614-evm)
141  SOC = tci6614
142  PLATFORM_XDC = "ti.platforms.evmTCI6614"
143 endif
145 # c6657 (Gauss) EVM
146 ifeq ($(PLATFORM),c6657-evm)
147  SOC = c6657
148  PLATFORM_XDC = "ti.platforms.evm6657"
149 endif
151 # tci6638k2k (Kepler2) EVM
152 ifeq ($(PLATFORM),tci6638k2k-evm)
153  SOC = tci6638k2k
154  CFLAGS_LOCAL_a15host += -DGENERIC
155  PLATFORM_XDC = "ti.platforms.evmTCI6638K2K"
156 endif
158 # tci6630k2l EVM
159 ifeq ($(PLATFORM),tci6630k2l-evm)
160  SOC = tci6630k2l
161  CFLAGS_LOCAL_a15host += -DGENERIC
162  PLATFORM_XDC = "ti.platforms.evmTCI6630K2L"
163 endif
165 # c66ak2e EVM
166 ifeq ($(PLATFORM),c66ak2e-evm)
167  SOC = c66ak2e
168  CFLAGS_LOCAL_a15host += -DGENERIC
169  PLATFORM_XDC = "ti.platforms.evmC66AK2E"
170 endif
172 # tci6636k2h (Hawking) EVM
173 ifeq ($(PLATFORM),tci6636k2h-evm)
174  SOC = tci6636k2h
175  CFLAGS_LOCAL_a15host += -DGENERIC
176  PLATFORM_XDC = "ti.platforms.evmTCI6636K2H"
177 endif
179 # tci66ak2g02 EVM
180 ifeq ($(PLATFORM),tci66ak2g02-evm)
181  SOC = tci66ak2g02
182  CFLAGS_LOCAL_a15host += -DGENERIC
183  PLATFORM_XDC = "ti.platforms.evmTCI66AK2G02"
184 endif
186 # omapl137 (Primus) EVM
187 ifeq ($(PLATFORM),omapl137-evm)
188  SOC = omapl137
189  PLATFORM_XDC = "ti.platforms.evmOMAPL137"
190 endif
192 # omapl138 (Freon) EVM
193 ifeq ($(PLATFORM),omapl138-evm)
194  SOC = omapl138
195  PLATFORM_XDC = "ti.platforms.evmOMAPL138"
196 endif
198 # c6748 (Freon) EVM
199 ifeq ($(PLATFORM),c6748-evm)
200  SOC = omapl138
201  PLATFORM_XDC = "ti.platforms.evm6748"
202 endif
204 # da830 (Primus) EVM
205 ifeq ($(PLATFORM),da830-evm)
206  SOC = omapl137
207  PLATFORM_XDC = "ti.platforms.evmDA830"
208 endif
210 # omap4 EVM
211 ifeq ($(PLATFORM),omap4-evm)
212  SOC = omap4
213  PLATFORM_XDC = "ti.platforms.sdp4430"
214 endif
216 # Generic platform
217 ifeq ($(PLATFORM),generic)
218  SOC = generic
219  PLATFORM_XDC =
220 endif
222 # Derive Target/ISA from CORE
224 # m4
225 ifeq ($(CORE),m4)
226  ISA = m4
227 endif
229 # a15host user space
230 ifeq ($(CORE),a15host)
231  ISA = a15
232 endif
234 # m3vpss
235 ifeq ($(CORE),m3vpss)
236  ISA = m3
237 endif
239 # m3video
240 ifeq ($(CORE),m3video)
241  ISA = m3
242 endif
244 # a8host
245 ifeq ($(CORE),a8host)
246  ISA = a8
247 endif
249 # arm9
250 ifeq ($(CORE),arm9)
251  ISA = arm9
252 endif
254 # c6xdsp
255 ifeq ($(CORE),c6xdsp)
256  ifeq ($(SOC),ti816x)
257   ISA = 674
258  endif
259  ifeq ($(SOC),tda2xx)
260   ISA = 66
261  endif
262  ifeq ($(SOC),tda3xx)
263   ISA = 66
264  endif
265  ifeq ($(SOC),dra72x)
266   ISA = 66
267  endif
268  ifeq ($(SOC),am572x)
269   ISA = 66
270  endif
271  ifeq ($(SOC),am571x)
272   ISA = 66
273  endif
274  ifeq ($(SOC),ti814x)
275   ISA = 674
276  endif
277  ifeq ($(SOC),c6a811x)
278   ISA = 674
279  endif
280  ifeq ($(SOC),omapl137)
281   ISA = 674
282  endif
283  ifeq ($(SOC),omapl138)
284   ISA = 674
285  endif
286  ifeq ($(SOC),c6472)
287   ISA = 64p
288  endif
289  ifeq ($(SOC),c6608)
290   ISA = 66
291  endif
292  ifeq ($(SOC),c66ak2e)
293   ISA = 66
294  endif
295  ifeq ($(SOC),c6616)
296   ISA = 66
297  endif
298  ifeq ($(SOC),tci6614)
299   ISA = 66
300  endif
301  ifeq ($(SOC),c6657)
302   ISA = 66
303  endif
304  ifeq ($(SOC),c6670)
305   ISA = 66
306  endif
307  ifeq ($(SOC),c6678)
308   ISA = 66
309  endif
310  ifeq ($(SOC),tci6638k2k)
311   ISA = 66
312  endif
313  ifeq ($(SOC),tci6630k2l)
314   ISA = 66
315  endif
316  ifeq ($(SOC),tci6636k2h)
317   ISA = 66
318  endif
319  ifeq ($(SOC),tci66ak2g02)
320   ISA = 66
321  endif
322  ifeq ($(SOC),omap4)
323   ISA = 64t
324  endif
325 endif
327 # EVE - arp32
328 ifeq ($(CORE),eve)
329  ISA = arp32
330 endif
332 # Platform and SOC is generic; use the core name same as ISA (eg: 674)
333 ifeq ($(SOC),generic)
334   ISA = $(CORE)
335 endif
338 # Derive XDC/ISA specific settings
340 ifeq ($(ISA),m4)
341   COMPILER = TMS470
342   ifeq ($(FORMAT),ELF)
343     TARGET_XDC = ti.targets.arm.elf.M4
344     FORMAT_EXT = e
345   else
346     TARGET_XDC = ti.targets.arm.M4
347   endif
349   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
350   #    in the filename extension of object/library/executable files
351   ifeq ($(ENDIAN),big)
352     ENDIAN_EXT = e
353   endif
355   # Define the file extensions
356   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
357   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
358   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
359   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
360 endif
362 ifeq ($(ISA),a15)
363   TARGET_XDC = gnu.targets.arm.A15F
364   CFLAGS_LOCAL_a15host += -DGCC_BUILD -DBUILD_A15
365   COMPILER = LINARO_GCC
366   FORMAT_EXT =
367   ENDIAN_EXT = fg
369   # Define the file extensions
370   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
371   OBJEXT_SO = $(OBJEXT)_so
372   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
373   LIBEXT_SO = $(LIBEXT)_so
374   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
375   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
376 endif
378 ifeq ($(ISA),m3)
379   COMPILER = TMS470
380   ifeq ($(FORMAT),ELF)
381     TARGET_XDC = ti.targets.arm.elf.M3
382     FORMAT_EXT = e
383   else
384     TARGET_XDC = ti.targets.arm.M3
385   endif
387   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
388   #    in the filename extension of object/library/executable files
389   ifeq ($(ENDIAN),big)
390     ENDIAN_EXT = e
391   endif
393   # Define the file extensions
394   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
395   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
396   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
397   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
398 endif
400 ifeq ($(ISA),674)
401   COMPILER = C6000
402   ifeq ($(FORMAT),ELF)
403     TARGET_XDC = ti.targets.elf.C674
404     FORMAT_EXT = e
405   else
406     TARGET_XDC = ti.targets.C674
407   endif
409   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
410   #    in the filename extension of object/library/executable files
411   ifeq ($(ENDIAN),big)
412     ENDIAN_EXT = e
413   endif
415   # Define the file extensions
416   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
417   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
418   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
419   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
420 endif
422 ifeq ($(ISA),64p)
423   COMPILER = C6000
424   ifeq ($(FORMAT),ELF)
425    ifeq ($(ENDIAN),big)
426     TARGET_XDC = ti.targets.elf.C64P_big_endian
427    else
428     TARGET_XDC = ti.targets.elf.C64P
429    endif
430     FORMAT_EXT = e
431   else
432    ifeq ($(ENDIAN),big)
433     TARGET_XDC = ti.targets.C64P_big_endian
434    else
435     TARGET_XDC = ti.targets.C64P
436    endif
437   endif
439   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
440   #    in the filename extension of object/library/executable files
441   ifeq ($(ENDIAN),big)
442     ENDIAN_EXT = e
443   endif
445   # Define the file extensions
446   OBJEXT = o$(FORMAT_EXT)64P$(ENDIAN_EXT)
447   LIBEXT = a$(FORMAT_EXT)64P$(ENDIAN_EXT)
448   EXEEXT = x$(FORMAT_EXT)64P$(ENDIAN_EXT)
449   ASMEXT = s$(FORMAT_EXT)64P$(ENDIAN_EXT)
450 endif
452 ifeq ($(ISA),64t)
453   COMPILER = C6000
454   ifeq ($(FORMAT),ELF)
455    ifeq ($(ENDIAN),big)
456     TARGET_XDC = ti.targets.elf.C64T_big_endian
457    else
458     TARGET_XDC = ti.targets.elf.C64T
459    endif
460     FORMAT_EXT = e
461   else
462    ifeq ($(ENDIAN),big)
463     TARGET_XDC = ti.targets.C64T_big_endian
464    else
465     TARGET_XDC = ti.targets.C64T
466    endif
467   endif
469   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
470   #    in the filename extension of object/library/executable files
471   ifeq ($(ENDIAN),big)
472     ENDIAN_EXT = e
473   endif
475   # Define the file extensions
476   OBJEXT = o$(FORMAT_EXT)64T$(ENDIAN_EXT)
477   LIBEXT = a$(FORMAT_EXT)64T$(ENDIAN_EXT)
478   EXEEXT = x$(FORMAT_EXT)64T$(ENDIAN_EXT)
479   ASMEXT = s$(FORMAT_EXT)64T$(ENDIAN_EXT)
480 endif
482 ifeq ($(ISA),66)
483   COMPILER = C6000
484   ifeq ($(FORMAT),ELF)
485    ifeq ($(ENDIAN),big)
486     TARGET_XDC = ti.targets.elf.C66_big_endian
487    else
488     TARGET_XDC = ti.targets.elf.C66
489    endif
490     FORMAT_EXT = e
491   else
492    ifeq ($(ENDIAN),big)
493     TARGET_XDC = ti.targets.C66_big_endian
494    else
495     TARGET_XDC = ti.targets.C66
496    endif
497   endif
499   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
500   #    in the filename extension of object/library/executable files
501   ifeq ($(ENDIAN),big)
502     ENDIAN_EXT = e
503   endif
505   # Define the file extensions
506   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
507   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
508   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
509   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
511 endif
513 ifeq ($(ISA),a8)
514   ifeq ($(TOOLCHAIN_a8),TI)
515     TARGET_XDC = ti.targets.arm.elf.A8F
516     ifeq ($(FORMAT),ELF)
517       FORMAT_EXT = e
518     endif
519     ifeq ($(ENDIAN),big)
520       ENDIAN_EXT = ef
521     else
522       ENDIAN_EXT = f
523     endif
524   COMPILER = TMS470
525   else
526     TARGET_XDC = gnu.targets.arm.A8F
527     CFLAGS_LOCAL_a8host += -DGCC_BUILD -DBUILD_A8
528     FORMAT_EXT =
529     ENDIAN_EXT = fg
530     COMPILER = LINARO_GCC
531   endif
533   # Define the file extensions
534   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
535   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
536   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
537   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
538 endif
540 ifeq ($(ISA),arm9)
541   ifeq ($(TOOLCHAIN_arm9),GCC)
542     TARGET_XDC = gnu.targets.arm.A9F
543     CFLAGS_LOCAL_arm9 += -DGCC_BUILD
544     FORMAT_EXT = a
545     ENDIAN_EXT = fg
546     COMPILER = LINARO_GCC
547   else
548     COMPILER = TMS470
549     TARGET_XDC = ti.targets.arm.elf.Arm9
550     ifeq ($(FORMAT),ELF)
551       FORMAT_EXT = e
552     endif
553     ifeq ($(ENDIAN),big)
554       ENDIAN_EXT = e
555     endif
556   endif
558   # Define the file extensions
559   OBJEXT = o$(FORMAT_EXT)9$(ENDIAN_EXT)
560   LIBEXT = a$(FORMAT_EXT)9$(ENDIAN_EXT)
561   EXEEXT = x$(FORMAT_EXT)9$(ENDIAN_EXT)
562   ASMEXT = s$(FORMAT_EXT)9$(ENDIAN_EXT)
563 endif
565 ifeq ($(ISA),arp32)
566   ifeq ($(FORMAT),ELF)
567     TARGET_XDC = ti.targets.arp32.elf.ARP32_far
568     ENDIAN_EXT = F
569     FORMAT_EXT = e
570   else
571     TARGET_XDC = ti.targets.arp32.elf.ARP32
572   endif
574   # If ENDIAN is set to "big", set ENDIAN_EXT to "e", that would be used in
575   #    in the filename extension of object/library/executable files
576   ifeq ($(ENDIAN),big)
577     ENDIAN_EXT = e
578   endif
580   # Define the file extensions
581   OBJEXT = o$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
582   LIBEXT = a$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
583   EXEEXT = x$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
584   ASMEXT = s$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
585 endif
587 ifeq (sim,$(findstring sim,$(PLATFORM)))
588   OMX_PLATFORM = sim
589 endif
590 export COMPILER
591 ifeq (ti816x-evm,$(findstring ti816x-evm,$(PLATFORM)))
592  # Don't know why platform define for XDC is separate for A8. TO DO.
593  ifeq ($(CORE),a8host)
594   OMX_PLATFORM = evmSi
595  else
596   OMX_PLATFORM = evmSi816X
597  endif
598 endif
600 ifeq ($(CORE),m3vpss)
601   CFGARGS_XDC = \"{mode: \\\"$(IPC_MODE)\\\", coreName: \\\"VPSS-M3\\\", tiler: \\\"DucatiTilerMemMgr\\\", platformMem: \\\"$(PLATFORM_MEM)\\\", maxResolution: \\\"$(MAX_RESOLUTION)\\\", omxBuildPlatform: \\\"$(OMX_PLATFORM)\\\"}\"
602 endif
603 ifeq ($(CORE),m3video)
604   CFGARGS_XDC = \"{mode: \\\"$(IPC_MODE)\\\", coreName:\\\"VIDEO-M3\\\", tiler: \\\"DucatiTilerMemMgr\\\", platformMem: \\\"$(PLATFORM_MEM)\\\", maxResolution: \\\"$(MAX_RESOLUTION)\\\", omxBuildPlatform: \\\"$(OMX_PLATFORM)\\\"}\"
605 endif
606 ifeq ($(CORE),c6xdsp)
607   CFGARGS_XDC =
608 endif
609 ifeq ($(CORE),a8host)
610   CFGARGS_XDC = \"{mode: \\\"$(IPC_MODE)\\\", coreName:\\\"HOST\\\", tiler: \\\"NullTilerMemMgr\\\", platformMem: \\\"$(PLATFORM_MEM)\\\", maxResolution: \\\"$(MAX_RESOLUTION)\\\", omxBuildPlatform: \\\"$(OMX_PLATFORM)\\\"}\"
611 endif
613 # Nothing beyond this point