]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/traceframework.git/blob - config.bld
multiprocess support in traceframework library
[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-2013, 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 /* Configure the TraceFramework Socket Release Version Information */\r
27 var tfDriverReleaseVersion = [01,01,01,00];\r
28 \r
29 var pkgName = Pkg.name;\r
30 \r
31 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
32 var tiDefs = " ";\r
33 var tiIncs = " " ;\r
34 \r
35 if (tfLLDPartNumber == "KeyStone2")\r
36 {\r
37         tiCcopts = tiCcopts + " -DK2 ";\r
38         tfLLDPartNumber = "K2";\r
39 }\r
40 \r
41 /* Add support for Logger Streamer 2 */\r
42 tiCcopts = tiCcopts + " -dTF_SUP_LOGGERSTREAMER2" + " -dTF_STREAM_FREEZE_PRODUCER_SUPPORT";\r
43 var tiCcopts_le = tiCcopts + " -mo -o3 -q";\r
44 var tiCcopts_be = tiCcopts + " -mo -o3 -q -D_BIG_ENDIAN";\r
45 /* C66 ELF compiler configuration for Little Endian Mode. */\r
46 var C66LE           = xdc.useModule('ti.targets.elf.C66');\r
47 C66LE.rootDir       = toolsBaseDir;\r
48 C66LE.ccOpts.prefix = tiCcopts_le;\r
49 \r
50 /* C66 ELF compiler configuration for Big Endian Mode. */\r
51 var C66BE           = xdc.useModule('ti.targets.elf.C66_big_endian');\r
52 C66BE.rootDir       = toolsBaseDir;\r
53 C66BE.ccOpts.prefix = tiCcopts_be;\r
54 \r
55 /* Check if we need to run the STATIC Analysis or not? */\r
56 var coverityAnalysis = java.lang.System.getenv("STATIC_ANALYZE");\r
57 \r
58 /* Setup the Coverity Filters to perform Static Analysis. */\r
59 if (coverityAnalysis == "ON") {\r
60     var coverityInstallPath = java.lang.System.getenv("STATIC_ANALYZE_PATH");\r
61     var cfgBase = xdc.getPackageBase("tisb.coverity.filters") + "cfg";\r
62 \r
63     var coverityFilter = [\r
64     {\r
65         moduleName: "tisb.coverity.filters.Coverity",\r
66         params: {\r
67             cfgDir:  cfgBase,  // The Coverity configuration file directory\r
68             rootDir: coverityInstallPath,\r
69             outDir: xdc.csd() + "cov_out",\r
70             analyzeLibs: true\r
71         }\r
72     },\r
73     ];\r
74 \r
75     /* Run the coverity filters on the LE Build only. */\r
76     C66LE.profiles["release"].filters = coverityFilter;\r
77 }\r
78 \r
79 /* Check if we need to create the Makefiles? */\r
80 var miniBuild = java.lang.System.getenv("MINI_PACKAGE");\r
81 if (miniBuild == "ON")\r
82 {\r
83     var makeC66LEFilter = {\r
84         moduleName: "build.filter.Make",\r
85         params: {\r
86           makefileName: "simpleC66LE.mak",\r
87         }\r
88     };\r
89     C66LE.profiles["release"].filters[C66LE.profiles["release"].filters.length++] = makeC66LEFilter;\r
90     \r
91     var makeC66BEFilter = {\r
92         moduleName: "build.filter.Make",\r
93         params: {\r
94           makefileName: "simpleC66BE.mak",\r
95         }\r
96     }; \r
97     C66BE.profiles["release"].filters[C66BE.profiles["release"].filters.length++] = makeC66BEFilter;\r
98 }\r
99 \r
100 /* List all the build targets here. */\r
101 Build.targets = [ C66LE, C66BE ];\r
102 \r