]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/mcbsp-lld.git/blob - package.bld
PRSDK-4301 Add UART print console support
[keystone-rtos/mcbsp-lld.git] / package.bld
1 /******************************************************************************
2  * FILE PURPOSE: Build description for the MCBSP Driver
3  ******************************************************************************
4  * FILE NAME: package.bld
5  *
6  * DESCRIPTION: 
7  *  This file contains the build specification and description for the MCBSP driver
8  *  
9  *  The file takes the following parameters from the command line through the
10  *  XDCARGS variable.
11  *      XDCARGS[0] = MCBSP Driver Install Type 
12  *      Valid Values are "TAR" or "SETUP"
13  *      DEFAULT is "SETUP"
14  *
15  *  Example for a valid command:
16  *      xdc XDCARGS="SETUP" release   
17  *
18  * Copyright (C) 2012, Texas Instruments, Inc.
19  *****************************************************************************/
21 /* List of all subdirectories that combine to make the MCBSP Driver Package. */
22 var subDirectories = [ "src", "docs", "include","device","example" ];
24 var mcbspDriverInstallType;
26 /* Determine if we need to create the InstallJammer Application or not? 
27  * MCBSP LLD Deliverables be either of the following formats:
28  *  - TAR Ball Package
29  *  - Setup Executable 
30  * DEFAULT is a SETUP Executable. */
32 if ((arguments[0] != "TAR") && (arguments[0] != "SETUP"))
33     mcbspDriverInstallType = "TAR";
34 else
35     mcbspDriverInstallType = arguments[0];
37 /* Irrespective of the InstallType we always create a TAR Ball Package as a part
38  * of the RTSC Build. Here we determine the name of the TAR Ball Package
39  *  Format is as follows:
40  *      mcbsp_<version> */
41 var mcbspRTSCFileName = "mcbsp" + "_" +  
42                       mcbspDriverReleaseVersion[0] + "_" +  mcbspDriverReleaseVersion[1] + "_" + 
43                       mcbspDriverReleaseVersion[2]  + "_" + mcbspDriverReleaseVersion[3];
45 /******************************************************************
46  ************************ Release Banner **************************
47  ******************************************************************/
49 print ("************* MCBSP Driver Build Information *************");
50 print ("MCBSP Driver Install      : " + mcbspDriverInstallType);
51 print ("MCBSP Driver LLD Version  : " + mcbspDriverReleaseVersion);
52 print ("Tools Directory           : " + toolsBaseDir);
53 print ("RTSC File Name            : " + mcbspRTSCFileName);
54 print ("MCBSP Driver LLD Path     : " + driverPath);
55 if (pOpts == 1) 
56 {
57     print ("CC LE opts                : " + C66LE.ccOpts.prefix);
58     print ("CC BE opts                : " + C66BE.ccOpts.prefix);
59     print ("****************************************************************");
60 }
62 /* Create the release package for the MCBSP LLD */
63 Pkg.defaultRelease = Pkg.addRelease (mcbspRTSCFileName, {prefix: "./packages/"});
65 /* Moving forward we need to set the Archiver of the package to be ZIP. This is currently
66  * not supported in the XDC tools being used. Currenly builds need to be done with the 
67  * following options:-
68  *   xdc MK_FIXLISTOPTS=-t release 
69  * ZIP is a better option as it works natively with INSTALL Jammer and we can remove the
70  * uncompression into a temporary directory. XDC Tools with xdc-rXX support the ZIP archiver. */
71 //Pkg.attrs = {archiver : "zip"};
73 /* Cycle through all the sub-directories and build all the files */
74 for (var i = 0; i < subDirectories.length; i++) 
75 {
76     /* Load the capsule in the sub directory. */
77     var caps = xdc.loadCapsule (subDirectories[i]+"/Module.xs");
79     print ("Building directory " + subDirectories[i]);
81     /* Build the capsule. */
82     caps.modBuild();
84     /* Package the module.xs files for building via package */
85     Pkg.otherFiles[Pkg.otherFiles.length++] = subDirectories[i]+"/Module.xs";
86 }
88 /* Package the remaining files */
89 Pkg.otherFiles[Pkg.otherFiles.length++] = "config.bld";
90 Pkg.otherFiles[Pkg.otherFiles.length++] = "config_mk.bld";
91 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.bld";
92 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xdc";
93 Pkg.otherFiles[Pkg.otherFiles.length++] = "package.xs";
94 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc";
95 Pkg.otherFiles[Pkg.otherFiles.length++] = "Settings.xdc.xdt";
96 Pkg.otherFiles[Pkg.otherFiles.length++] = "mcbsp_drv.h";
97 Pkg.otherFiles[Pkg.otherFiles.length++] = "mcbsp_osal.h";
98 Pkg.otherFiles[Pkg.otherFiles.length++] = "mcbsp_types.h";
99 Pkg.otherFiles[Pkg.otherFiles.length++] = "mcbspver.h";
100 Pkg.otherFiles[Pkg.otherFiles.length++] = "mcbspver.h.xdt";
101 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/Doxyfile";
102 Pkg.otherFiles[Pkg.otherFiles.length++] = "docs/doxyfile.xdt";
103 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/buildlib.xs";
104 Pkg.otherFiles[Pkg.otherFiles.length++] = "makefile";
105 Pkg.otherFiles[Pkg.otherFiles.length++] = "build/makefile.mk";
106 Pkg.otherFiles[Pkg.otherFiles.length++] = "src/src_files_common.mk";
107 Pkg.otherFiles[Pkg.otherFiles.length++] = "mcbsp_component.mk";
108 Pkg.otherFiles[Pkg.otherFiles.length++] = "./lib";
110 /* Generate Users Manual Doxyfile */
111 var tplt = xdc.loadTemplate("./docs/doxyfile.xdt");
112 tplt.genFile("./docs/Doxyfile",mcbspDriverReleaseVersion); 
114 /* Generate Settings.xdc */
115 var tplt = xdc.loadTemplate("./Settings.xdc.xdt");
116 tplt.genFile("./Settings.xdc",mcbspDriverReleaseVersion); 
118 /* Generate paver.h */
119 var tplt = xdc.loadTemplate("./mcbspver.h.xdt");
120 tplt.genFile("./mcbspver.h",mcbspDriverReleaseVersion);      
122