]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/traceframework.git/blob - config.bld
updated the library and test code for strict compilation fixes
[keystone-rtos/traceframework.git] / config.bld
1 /******************************************************************************\r
2  * FILE PURPOSE: Build configuration Script for the TraceFramework 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 TraceFramework 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) 2011-2014, Texas Instruments, Inc.\r
12  *****************************************************************************/\r
13 var Build = xdc.useModule('xdc.bld.BuildEnvironment');\r
14 print (Build.hostOSName);\r
15  \r
16  \r
17 /* Get the Tools Base directory from the Environment Variable. */\r
18 var toolsBaseDir = java.lang.System.getenv("XDCCGROOT");\r
19 \r
20 /* Get the base directory for the TraceFramework Socket Driver Package */\r
21 var tfDriverPath = new java.io.File(".//").getPath();\r
22 \r
23 /* Read the part number from the environment variable. */\r
24 var tfLLDPartNumber = java.lang.System.getenv("SOC_FAMILY");\r
25 \r
26 /* Get the extended debug flags */\r
27 var extDbgFlags = java.lang.System.getenv("EXTDBGFLAGS");\r
28 \r
29 /* Configure the TraceFramework Socket Release Version Information */\r
30 var tfDriverReleaseVersion = [01,01,01,04];\r
31 \r
32 var pkgName = Pkg.name;\r
33 \r
34 var tiCcopts = "--verbose_diagnostics --display_error_number --diag_error=225 -k --diag_error=9 --diag_warning=179 --diag_remark=880 --diag_remark=188 --mem_model:data=far";\r
35 var tiDefs = " ";\r
36 var tiIncs = " " ;\r
37 \r
38 if (tfLLDPartNumber == "KeyStone2")\r
39 {\r
40         tiCcopts = tiCcopts + " -DK2 ";\r
41         tfLLDPartNumber = "K2";\r
42 }\r
43 \r
44 /* Add support for Logger Streamer 2 */\r
45 tiCcopts = tiCcopts + " -dTF_SUP_LOGGERSTREAMER2" + " -dTF_STREAM_FREEZE_PRODUCER_SUPPORT";\r
46 var tiCcopts_le = tiCcopts + " -mo -o3 -q";\r
47 var tiCcopts_be = tiCcopts + " -mo -o3 -q -D_BIG_ENDIAN";\r
48 /* C66 ELF compiler configuration for Little Endian Mode. */\r
49 var C66LE           = xdc.useModule('ti.targets.elf.C66');\r
50 C66LE.rootDir       = toolsBaseDir;\r
51 C66LE.ccOpts.prefix = tiCcopts_le;\r
52 if(extDbgFlags)     \r
53     C66LE.ccOpts.prefix = C66LE.ccOpts.prefix + " " + extDbgFlags; \r
54 \r
55 /* C66 ELF compiler configuration for Big Endian Mode. */\r
56 var C66BE           = xdc.useModule('ti.targets.elf.C66_big_endian');\r
57 C66BE.rootDir       = toolsBaseDir;\r
58 C66BE.ccOpts.prefix = tiCcopts_be;\r
59 if(extDbgFlags)     \r
60     C66BE.ccOpts.prefix = C66BE.ccOpts.prefix + " " + extDbgFlags;\r
61 \r
62 /* Check if we need to run the STATIC Analysis or not? */\r
63 var coverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");\r
64 \r
65 /* Setup the Coverity Filters to perform Static Analysis. */\r
66 if (coverityAnalysis == "ON") {\r
67     var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH");\r
68     var cfgBase = xdc.getPackageBase("tisb.coverity.filters") + "cfg";\r
69 \r
70     var coverityFilter = [\r
71     {\r
72         moduleName: "tisb.coverity.filters.Coverity",\r
73         params: {\r
74             cfgDir:  cfgBase,  // The Coverity configuration file directory\r
75             rootDir: coverityInstallPath,\r
76             outDir: xdc.csd() + "cov_out",\r
77             analyzeLibs: true\r
78         }\r
79     },\r
80     ];\r
81 \r
82     /* Run the coverity filters on the LE Build only. */\r
83     C66LE.profiles["release"].filters = coverityFilter;\r
84 }\r
85 \r
86 /* Check if we need to create the Makefiles? */\r
87 var miniBuild = java.lang.System.getenv("MINI_PACKAGE");\r
88 if (miniBuild == "ON")\r
89 {\r
90     var makeC66LEFilter = {\r
91         moduleName: "build.filter.Make",\r
92         params: {\r
93           makefileName: "simpleC66LE.mak",\r
94         }\r
95     };\r
96     C66LE.profiles["release"].filters[C66LE.profiles["release"].filters.length++] = makeC66LEFilter;\r
97     \r
98     var makeC66BEFilter = {\r
99         moduleName: "build.filter.Make",\r
100         params: {\r
101           makefileName: "simpleC66BE.mak",\r
102         }\r
103     }; \r
104     C66BE.profiles["release"].filters[C66BE.profiles["release"].filters.length++] = makeC66BEFilter;\r
105 }\r
106 \r
107 /* List all the build targets here. */\r
108 Build.targets = [ C66LE, C66BE ];\r
109 \r