1 /******************************************************************************
2 * FILE PURPOSE: Fault Management Source module specification file.
3 ******************************************************************************
4 * FILE NAME: module.xs
5 *
6 * DESCRIPTION:
7 * This file contains the module specification for the Fault Management source directory.
8 *
9 * Copyright (C) 2012-2014 Texas Instruments, Inc.
10 *****************************************************************************/
12 /* Load the library utility. */
13 var libUtility = xdc.loadCapsule ("../build/buildlib.xs");
15 var fault_mgmtLibFiles = [
16 "src/fault_mgmt.c",
17 "src/fm_clean.c",
18 "src/fm_exclusion.c",
19 ];
21 /**************************************************************************
22 * FUNCTION NAME : modBuild
23 **************************************************************************
24 * DESCRIPTION :
25 * The function is used to build all the components of the Fault
26 * Management library
27 **************************************************************************/
28 function modBuild()
29 {
30 /* Build the libraries for all the targets specified. */
31 for (var device=0; device < devices.length; device++)
32 {
33 /* Only build libraries within the specified SOC Family */
34 if (devicesSocFamily[device] == fault_mgmtlibSocFamily)
35 {
36 /* Build the libraries for all the targets specified. */
37 for (var targets=0; targets < Build.targets.length; targets++)
38 {
39 var libOptions = {
40 copts: devicesCCOpt[device],
41 incs: fault_mgmtlibIncludePath,
42 };
44 libUtility.buildLibrary (devices[device], libOptions, "ti.instrumentation.fault_mgmt", Build.targets[targets], fault_mgmtLibFiles);
45 }
46 }
47 }
49 /* Add all the .c files to the release package. */
50 var testFiles = libUtility.listAllFiles (".c", "src", true);
51 for (var k = 0 ; k < testFiles.length; k++)
52 Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
54 /* Add all the .h files to the release package. */
55 var testFiles = libUtility.listAllFiles (".h", "src", true);
56 for (var k = 0 ; k < testFiles.length; k++)
57 Pkg.otherFiles[Pkg.otherFiles.length++] = testFiles[k];
58 }