7ec342144dc36a1785549798219ba2143e1e1df1
1 /******************************************************************************\r
2 * FILE PURPOSE: Build description for the i2c Driver\r
3 ******************************************************************************\r
4 * FILE NAME: package.bld\r
5 *\r
6 * DESCRIPTION: \r
7 * This file contains the build specification and description for the i2c driver\r
8 * \r
9 * The file takes the following parameters from the command line through the\r
10 * XDCARGS variable.\r
11 * XDCARGS[0] = Driver Install Type \r
12 * Valid Values are "TAR" or "SETUP"\r
13 * DEFAULT is "SETUP"\r
14 *\r
15 * Example for a valid command:\r
16 * xdc XDCARGS="SETUP" release \r
17 *\r
18 * Copyright (C) 2014-2018, Texas Instruments, Inc.\r
19 *****************************************************************************/\r
20 \r
21 /* List of all subdirectories that combine to make the i2c Socket Driver Package. */\r
22 var subDirectories = [ "src", "docs", "soc", "test", "example", "firmware" ];\r
23 \r
24 var driverInstallType;\r
25 \r
26 /* Determine if we need to create the InstallJammer Application or not? \r
27 * i2c LLD Deliverables be either of the following formats:\r
28 * - TAR Ball Package\r
29 * - Setup Executable \r
30 * DEFAULT is a SETUP Executable. */\r
31 \r
32 if ((arguments[0] != "TAR") && (arguments[0] != "SETUP"))\r
33 driverInstallType = "TAR";\r
34 else\r
35 driverInstallType = arguments[0];\r
36 \r
37 /* Irrespective of the InstallType we always create a TAR Ball Package as a part\r
38 * of the RTSC Build. Here we determine the name of the TAR Ball Package\r
39 * Format is as follows:\r
40 * i2c_<version> */\r
41 var i2cRTSCFileName = "i2c" + "_" + \r
42 driverReleaseVersion[0] + "_" + driverReleaseVersion[1] + "_" + \r
43 driverReleaseVersion[2] + "_" + driverReleaseVersion[3];\r
44 \r
45 /******************************************************************\r
46 ************************ Release Banner **************************\r
47 ******************************************************************/\r
48 \r
49 print ("************* i2c Socket Driver Build Information *************");\r
50 print ("i2c Socket Driver Install : " + driverInstallType);\r
51 print ("i2c Socket Driver LLD Version : " + driverReleaseVersion);\r
52 print ("RTSC File Name : " + i2cRTSCFileName);\r
53 print ("i2c Socket Driver LLD Path : " + driverPath);\r
54 print ("C66 Tools Directory : " + c66ToolsBaseDir);\r
55 print ("M4 Tools Directory : " + m4ToolsBaseDir);\r
56 print ("A15 Tools Directory : " + a15ToolsBaseDir);\r
57 if (pOpts == 1) \r
58 {\r
59 print ("CC LE opts : " + C66LE.ccOpts.prefix);\r
60 print ("CC BE opts : " + C66BE.ccOpts.prefix);\r
61 print ("M4 LE opts : " + M4LE.ccOpts.prefix);\r
62 print ("A15 basic opts : " + A15LE.ccOpts.prefix);\r
63 }\r
64 print ("****************************************************************");\r
65 \r
66 /* Create the release package for the i2c LLD */\r
67 Pkg.defaultRelease = Pkg.addRelease (i2cRTSCFileName, {prefix: "./packages/"});\r
68 \r
69 /* Moving forward we need to set the Archiver of the package to be ZIP. This is currently\r
70 * not supported in the XDC tools being used. Currenly builds need to be done with the \r
71 * following options:-\r
72 * xdc MK_FIXLISTOPTS=-t release \r
73 * ZIP is a better option as it works natively with INSTALL Jammer and we can remove the\r
74 * uncompression into a temporary directory. XDC Tools with xdc-rXX support the ZIP archiver. */\r
75 //Pkg.attrs = {archiver : "zip"};\r
76 \r
77 /* Cycle through all the sub-directories and build all the files */\r
78 for (var i = 0; i < subDirectories.length; i++) \r
79 {\r
80 /* Load the capsule in the sub directory. */\r
81 var caps = xdc.loadCapsule (subDirectories[i]+"/Module.xs");\r
82 \r
83 print ("Building directory " + subDirectories[i]);\r
84 \r
85 /* Build the capsule. */\r
86 caps.modBuild();\r
87 \r
88 /* Package the module.xs files for building via package */\r
89 Pkg.otherFiles[Pkg.otherFiles.length++] = subDirectories[i]+"/Module.xs";\r
90 }\r
91 \r
92 /* Package the remaining files */\r
93 Pkg.otherFiles[Pkg.otherFiles.length++] = "config.bld";\r
94 Pkg.otherFiles[Pkg.otherFiles.length++] = "config_mk.bld";\r
95 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.bld";\r
96 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xdc";\r
97 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xs";\r
98 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc";\r
99 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc.xdt";\r
100 Pkg.otherFiles[Pkg.otherFiles.length++] = "I2C.h";\r
101 Pkg.otherFiles[Pkg.otherFiles.length++] = "I2Cver.h";\r
102 Pkg.otherFiles[Pkg.otherFiles.length++] = "I2Cver.h.xdt";\r
103 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/Doxyfile";\r
104 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/doxyfile.xdt";\r
105 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/buildlib.xs";\r
106 Pkg.otherFiles[Pkg.otherFiles.length++] = "makefile";\r
107 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile.mk";\r
108 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_indp.mk";\r
109 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_profile_indp.mk";\r
110 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_profile.mk";\r
111 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile_icss_i2c.mk";\r
112 Pkg.otherFiles[Pkg.otherFiles.length++] = "src/src_files_common.mk";\r
113 Pkg.otherFiles[Pkg.otherFiles.length++] = "i2c_component.mk";\r
114 Pkg.otherFiles[Pkg.otherFiles.length++] = "./lib";\r
115 \r
116 /* Generate Users Manual Doxyfile */\r
117 var tplt = xdc.loadTemplate("./docs/doxyfile.xdt");\r
118 tplt.genFile("./docs/Doxyfile",driverReleaseVersion); \r
119 \r
120 /* Generate Settings.xdc */\r
121 var tplt = xdc.loadTemplate("./Settings.xdc.xdt");\r
122 tplt.genFile("./Settings.xdc",driverReleaseVersion); \r
123 \r
124 /* Generate paver.h */\r
125 var tplt = xdc.loadTemplate("./I2Cver.h.xdt");\r
126 tplt.genFile("./I2Cver.h",driverReleaseVersion); \r
127 \r
128 \r