Adding TCI6498 support in RM sample init lib
[keystone-rtos/edma3_lld.git] / packages / ti / sdo / edma3 / rm / sample / package.xs
old mode 100644 (file)
new mode 100755 (executable)
index 5e056ee..2b02b43
@@ -13,17 +13,26 @@ function getLibs(prog)
     print ("Inside EDMA3 RM Sample App getLibs");
 
     /* Prepare variables to form the library path within this package */
-    var name = "ti.sdo.edma3.rm.sample.a674";
+    var name = "ti.sdo.edma3.rm.sample";
     var lib = "lib/";
+    var target;
 
        /* Devices supported */
        var devices = [
                                        'TMS320DA830',
+                                               'TMS320CTCI6498',
                                        ];
 
     /* Directories for each platform */
     var dir = [
                 'da830/',
+                               'tci6498/',
+              ];
+
+       /* Target name for each supported platform (as coming in the library name) */
+    var targ = [
+                '.a674',
+                '.a64P',
               ];
 
     for (var i = 0; i < devices.length; i++)
@@ -32,6 +41,7 @@ function getLibs(prog)
             {
                 /* Choose the selected platform */
                 lib = lib + dir[i];
+                target = targ[i];
                 bool = 1;
                 break;
             }
@@ -40,15 +50,22 @@ function getLibs(prog)
     if (bool == 0)
         throw new Error('Unexpected value in "platform" parameter')
 
+       if (java.lang.String(Program.endian).equals("big"))     {
+               print ("Big Endian Mode Selected");
+               target += "e";
+               }
+
     switch (this.profile) {
     case 'debug':
         /* enable debug build for debug profile only */
-        lib = lib + "Debug/" + name;
+        print("i = " + i + ", target = " + target);
+        lib = lib + "Debug/" + name + target;
         break;
 
     default:
         /* release profile for everything else */
-        lib = lib + "Release/" + name;
+        print("i = " + i + ", target = " + target);
+        lib = lib + "Release/" + name + target;
     }
 
     print("    will link with " + this.$name + ":" + lib);