1 /******************************************************************************\r
2 * FILE PURPOSE: Build configuration Script for the nimu_icss Driver\r
3 ******************************************************************************\r
4 * FILE NAME: config.bld\r
5 *\r
6 * DESCRIPTION: \r
7 * This file contains the build configuration script for the nimu_icss driver\r
8 * and is responsible for configuration of the paths for the various \r
9 * tools required to build the driver.\r
10 *\r
11 * Copyright (C) 2014-2015, Texas Instruments, Inc.\r
12 *****************************************************************************/\r
13 \r
14 /* Get the Tools Base directory from the Environment Variable. */\r
15 var c66ToolsBaseDir = java.lang.System.getenv("C6X_GEN_INSTALL_PATH");\r
16 var m4ToolsBaseDir = java.lang.System.getenv("TOOLCHAIN_PATH_M4");\r
17 var a15ToolsBaseDir = java.lang.System.getenv("TOOLCHAIN_PATH_A15");\r
18 var a9ToolsBaseDir = java.lang.System.getenv("TOOLCHAIN_PATH_A9");\r
19 var a8ToolsBaseDir = java.lang.System.getenv("TOOLCHAIN_PATH_A8");\r
20 \r
21 /* Get the base directory for the nimu_icss Socket Driver Package */\r
22 var driverPath = new java.io.File(".//").getPath();\r
23 \r
24 /* Read the part number from the environment variable. */\r
25 var LLDPartNumber = java.lang.System.getenv("PARTNO");\r
26 \r
27 /* Include Path */\r
28 var lldIncludePath = " -I" + driverPath + "/src" + " -I" + driverPath;\r
29 \r
30 /* Configure the nimu_icss Socket Release Version Information */\r
31 /* 3 steps: remove SPACE and TAB, convert to string and split to make array */\r
32 var driverReleaseVersion = (""+Pkg.version.replace(/\s/g, "")).split(',');\r
33 \r
34 /* Print the Compiler Options */\r
35 var pOpts = 1;\r
36 \r
37 /* C66 ELF compiler configuration for Little Endian Mode. */\r
38 var C66LE = xdc.useModule('ti.targets.elf.C66');\r
39 C66LE.rootDir = c66ToolsBaseDir;\r
40 C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o -DMEM_BARRIER_DISABLE";\r
41 \r
42 /* C66 ELF compiler configuration for Big Endian Mode. */\r
43 var C66BE = xdc.useModule('ti.targets.elf.C66_big_endian');\r
44 C66BE.rootDir = c66ToolsBaseDir;\r
45 C66BE.ccOpts.prefix = "-mo -o3 -q -k -eo.o -DBIGENDIAN -DMEM_BARRIER_DISABLE";\r
46 \r
47 /* ARMv7 A15 compiler configuration */\r
48 var A15LE = xdc.useModule('gnu.targets.arm.A15F');\r
49 A15LE.rootDir = a15ToolsBaseDir;\r
50 A15LE.ccOpts.prefix = "-mno-unaligned-access -c -mtune=cortex-a15 -marm -DDRA7xx -gstrict-dwarf -Wall -D__ARMv7 -D_LITTLE_ENDIAN=1";\r
51 \r
52 /* M4 ELF compiler configuration for Little Endian Mode. */\r
53 var M4LE = xdc.useModule('ti.targets.arm.elf.M4');\r
54 M4LE.rootDir = m4ToolsBaseDir;\r
55 M4LE.ccOpts.prefix = "-o4 -qq -pdsw255 -DMAKEFILE_BUILD";\r
56 \r
57 /* ARMv7 A9 compiler configuration */\r
58 var A9LE = xdc.useModule('gnu.targets.arm.A9F');\r
59 A9LE.rootDir = a9ToolsBaseDir;\r
60 A9LE.ccOpts.prefix = "-mno-unaligned-access -c -mtune=cortex-a9 -marm -g -gstrict-dwarf -Wall -D__ARMv7 -D_LITTLE_ENDIAN=1";\r
61 /* A9LE.ccOpts.prefix = "-c -mcpu=cortex-a9 -mtune=cortex-a9 -march=armv7-a -mfpu=neon -mfloat-abi=hard -eo.$(OBJEXT) -ea.$(ASMEXT) -mlong-calls -fdata-sections -funsigned-char -ffunction-sections -Wall -Dgcc -Darmv7a -D_LITTLE_ENDIAN=1 -D SUPPORT_UNALIGNED -MD -MF $(DEPFILE).P "; */\r
62 \r
63 /* ARMv7 A8 compiler configuration */\r
64 var A8LE = xdc.useModule('gnu.targets.arm.A8F');\r
65 A8LE.rootDir = a8ToolsBaseDir;\r
66 A8LE.ccOpts.prefix = "-mno-unaligned-access -c -mtune=cortex-a8 -marm -g -gstrict-dwarf -Wall -D__ARMv7 -D_LITTLE_ENDIAN=1";\r
67 /* Check if we need to run the STATIC Analysis or not? */\r
68 var coverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");\r
69 \r
70 /* C66 ELF compiler configuration for Little Endian Mode. */\r
71 var C66LE = xdc.useModule('ti.targets.elf.C66');\r
72 C66LE.rootDir = c66ToolsBaseDir;\r
73 C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o -DMEM_BARRIER_DISABLE";\r
74 \r
75 /* C66 ELF compiler configuration for Big Endian Mode. */\r
76 var C66BE = xdc.useModule('ti.targets.elf.C66_big_endian');\r
77 C66BE.rootDir = c66ToolsBaseDir;\r
78 C66BE.ccOpts.prefix = "-mo -o3 -q -k -eo.o -DBIGENDIAN -DMEM_BARRIER_DISABLE";\r
79 /* Setup the Coverity Filters to perform Static Analysis. */\r
80 if (coverityAnalysis == "ON") {\r
81 var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH");\r
82 var cfgBase = xdc.getPackageBase("tisb.coverity.filters") + "cfg";\r
83 \r
84 var coverityFilter = [\r
85 {\r
86 moduleName: "tisb.coverity.filters.Coverity",\r
87 params: {\r
88 cfgDir: cfgBase, // The Coverity configuration file directory\r
89 rootDir: coverityInstallPath,\r
90 outDir: xdc.csd() + "cov_out",\r
91 analyzeLibs: true\r
92 }\r
93 },\r
94 ];\r
95 \r
96 /* Run the coverity filters on the LE Build only. */\r
97 C66LE.profiles["release"].filters = coverityFilter;\r
98 }\r
99 \r
100 /* List all the build targets here. */\r
101 Build.targets = [ A15LE, A9LE, A8LE, M4LE, C66LE, C66BE ];\r