]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/commitdiff
sciclient: tools: Update launch.js to clear CLEC Secure Claim REL.CORESDK.08.06.00.29
authorDon Dominic <dondmadappallil@ti.com>
Mon, 27 Feb 2023 15:00:23 +0000 (20:30 +0530)
committerDon Dominic <dondmadappallil@ti.com>
Mon, 27 Feb 2023 15:10:16 +0000 (20:40 +0530)
- launch.js script updates for devices with CLEC module present,
  to clear the CLEC secure claim bit by default in CCS No Boot mode
  - A new flag 'clearCLECSecureClaimFlag' can be used to disable
    the same
  - This uses the checked-in sciclient_clear_clec_secure_claim
    image executable to clear the CLEC secure claim bit

Signed-off-by: Don Dominic <dondmadappallil@ti.com>
packages/ti/drv/sciclient/tools/ccsLoadDmsc/j721e/launch.js
packages/ti/drv/sciclient/tools/ccsLoadDmsc/j721s2/launch.js
packages/ti/drv/sciclient/tools/ccsLoadDmsc/j784s4/launch.js

index 26fffbc8c1ff300909c9d6ad65090b6f848ec686..3bbb13468b7f8689ff44ad8d543fa908c2dbf273 100755 (executable)
@@ -58,6 +58,10 @@ pdkPath = "/ti/j7presi/workarea/pdk";
 //path to board config elf
 pathSciclient = pdkPath+"/packages/ti/drv/sciclient/tools/ccsLoadDmsc/j721e/"
 ccs_init_elf_file = pathSciclient+"sciclient_ccs_init_mcu1_0_release.xer5f";
+
+// Set this to 1, to clear 'Secure Claim' Bit in CLEC register
+clearCLECSecureClaimFlag = 1;
+
 loadSciserverFlag = 1;
 if(isFreertos == 1)
 {
@@ -217,12 +221,35 @@ function loadSciserver()
     dsMCU1_0.expression.evaluate('GEL_Load("'+ sciserver_elf_file +'")');
 }
 
+function clearCLECSecureClaim()
+{
+    dsC7X1_0 = debugServer.openSession( ".*C71X_0" );
+
+    dsC7X1_0.target.connect();
+
+    c7x_binary = pdkPath+"/packages/ti/drv/sciclient/tools/clearClecSecureClaim/sciclient_clear_clec_secure_claim_c7x_1_release.xe71";
+
+    dsC7X1_0.memory.loadProgram(c7x_binary);
+    dsC7X1_0.target.runAsynch();
+
+    // Halt and re-run since the startup code image doesn't have a main function.
+    dsC7X1_0.target.halt();
+    dsC7X1_0.target.runAsynch();
+
+    dsC7X1_0.target.disconnect();
+}
+
 function doEverything()
 {
     printVars();
     connectTargets();
     disconnectTargets();
     sampleDDRCheck ();
+    if (clearCLECSecureClaimFlag == 1)
+    {
+        print("Clearing CLEC Secure Claim...");
+        clearCLECSecureClaim();
+    }
     if (loadSciserverFlag == 1)
     {
         loadSciserver();
index 983c91b67d3403216c2beb0e04b83369f3a3b3a7..c08e831581ffb67d67a60e4af2a7cabcc9ab6316 100755 (executable)
@@ -56,6 +56,10 @@ pdkPath = "/ti/j7presi/workarea/pdk";
 //path to board config elf
 pathSciclient = pdkPath+"/packages/ti/drv/sciclient/tools/ccsLoadDmsc/j721s2/"
 ccs_init_elf_file = pathSciclient+"sciclient_ccs_init_mcu1_0_release.xer5f";
+
+// Set this to 1, to clear 'Secure Claim' Bit in CLEC register
+clearCLECSecureClaimFlag = 1;
+
 loadSciserverFlag = 1;
 if(isFreertos == 1)
 {
@@ -230,12 +234,35 @@ function loadSciserver()
     dsMCU1_0.expression.evaluate('GEL_Load("'+ sciserver_elf_file +'")');
 }
 
+function clearCLECSecureClaim()
+{
+    dsC7X1_0 = debugServer.openSession( ".*C71X_0" );
+
+    dsC7X1_0.target.connect();
+
+    c7x_binary = pdkPath+"/packages/ti/drv/sciclient/tools/clearClecSecureClaim/sciclient_clear_clec_secure_claim_c7x_1_release.xe71";
+
+    dsC7X1_0.memory.loadProgram(c7x_binary);
+    dsC7X1_0.target.runAsynch();
+
+    // Halt and re-run since the startup code image doesn't have a main function.
+    dsC7X1_0.target.halt();
+    dsC7X1_0.target.runAsynch();
+
+    dsC7X1_0.target.disconnect();
+}
+
 function doEverything()
 {
     printVars();
     connectTargets();
     disconnectTargets();
-    // sampleDDRCheck ();
+    sampleDDRCheck ();
+    if (clearCLECSecureClaimFlag == 1)
+    {
+        print("Clearing CLEC Secure Claim...");
+        clearCLECSecureClaim();
+    }
     if (loadSciserverFlag == 1)
     {
         loadSciserver();
index b795aeb1bb12a31bdaa5576bf0950cd9fedb3cff..922f4949f59787d0199e24bd834d5b38ba130f32 100644 (file)
@@ -58,6 +58,10 @@ pdkPath = "/ti/j7presi/workarea/pdk";
 //path to board config elf
 pathSciclient = pdkPath+"/packages/ti/drv/sciclient/tools/ccsLoadDmsc/j784s4/"
 ccs_init_elf_file = pathSciclient+"sciclient_ccs_init_mcu1_0_release.xer5f";
+
+// Set this to 1, to clear 'Secure Claim' Bit in CLEC register
+clearCLECSecureClaimFlag = 1;
+
 loadSciserverFlag = 1;
 
 if(isFreertos == 1)
@@ -232,12 +236,35 @@ function loadSciserver()
     dsMCU1_0.expression.evaluate('GEL_Load("'+ sciserver_elf_file +'")');
 }
 
+function clearCLECSecureClaim()
+{
+    dsC7X1_0 = debugServer.openSession( ".*C71X_0" );
+
+    dsC7X1_0.target.connect();
+
+    c7x_binary = pdkPath+"/packages/ti/drv/sciclient/tools/clearClecSecureClaim/sciclient_clear_clec_secure_claim_c7x_1_release.xe71";
+
+    dsC7X1_0.memory.loadProgram(c7x_binary);
+    dsC7X1_0.target.runAsynch();
+
+    // Halt and re-run since the startup code image doesn't have a main function.
+    dsC7X1_0.target.halt();
+    dsC7X1_0.target.runAsynch();
+
+    dsC7X1_0.target.disconnect();
+}
+
 function doEverything()
 {
     printVars();
     connectTargets();
     disconnectTargets();
-    // sampleDDRCheck ();
+    sampleDDRCheck ();
+    if (clearCLECSecureClaimFlag == 1)
+    {
+        print("Clearing CLEC Secure Claim...");
+        clearCLECSecureClaim();
+    }
     if (loadSciserverFlag == 1)
     {
         loadSciserver();