Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN
Tool/software: Code Composer Studio
Hello.
My main goal is to lock the TMS570LC4357 device by AJSM and temporarily unlock it at CCS debugging with GUI usage.
If you have this example/template – please share it with me.
But I used the described in the “spna232a” approach to configure CCS and it constantly fails.
See please my details below.
Code Composer Studio, Version: 8.3.1.00004
HW: TMS570LC4357: HDK and LaunchPad. And TMS570LS3137 HDK.
Before to set my key to lock the device I decided to test and check connection with AJSM functionality. So I kept the originally programmed visible key in OTP memory and tried to access and unlock the device with “zero-key”.
1) CCS GUI
I downloaded the “spna232.zip”. Copied ‘ajsm’ folder to GEL files as described. Created ‘tms570lc43xx_secure.xml’ file as described in ‘readme.txt’. And used the available ‘rm57l8xx_secure.xml’ as example. Copied the created .xml file to corresponded folder. Then I created the appropriate project and got Port18 and AJSM key value in Target configuration as supposed:
After that I try to debug the application and press ‘F11’ key. I get a constant error:
AJSM: Error: (Error -2010 @ 0x0) Internal error: Invalid parameter passed to function. Restart the application. If error persists, please report the error. (Emulation package 8.3.0.00003)
AJSM: Unable to determine target status after 20 attempts
AJSM: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging
Dap: GEL: Error while executing OnPreTargetConnect(): Connect failed
at GEL_Connect() [ajsm_util.gel:50]
at AJSM_Unlock()
at GEL_EvalOnTarget("AJSM", "AJSM_Unlock()", 1) [dap_util.gel:46]
at OnPreTargetConnect()
CortexR5: GEL Output: Memory Map Setup for Flash @ Address 0x0CortexR5: GEL Output: Memory Map Setup for Flash @ Address 0x0 due to System Reset
CortexR5: GEL Output: Memory Map Setup for Flash @ Address 0x0 due to System Reset
2) Command line check with “dbgauth”
I successfully connected and unlocked the device with “dbgauth” command line access. See please the result:
I copied and renamed the “testBoard” file (which was obtained at board “Test connection”) to the “570Lnx-WithAjsmPort.dat” and used it here. You can see the device is unlocked. And please note it does not matter which key I use in command line.
3) After that I updated the emulation pack to last one, version 8.04. And tried to debug the application. I see the same error:
And there is the copied text output :
AJSM: Error: (Error -2010 @ 0x0) Internal error: Invalid parameter passed to function. Restart the application. If error persists, please report the error. (Emulation package 8.4.0.00006)
AJSM: Unable to determine target status after 20 attempts
AJSM: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging
Dap: GEL: Error while executing OnPreTargetConnect(): Connect failed
at GEL_Connect() [ajsm_util.gel:50]
at AJSM_Unlock()
at GEL_EvalOnTarget("AJSM", "AJSM_Unlock()", 1) [dap_util.gel:46]
at OnPreTargetConnect()
CortexR5: GEL Output: Memory Map Setup for Flash @ Address 0x0CortexR5: GEL Output: Memory Map Setup for Flash @ Address 0x0 due to System Reset
CortexR5: GEL Output: Memory Map Setup for Flash @ Address 0x0 due to System Reset
4) Command line check with “dbgauth” works properly again.
5) I decided to check with other device. I downloaded the project from this topic:
https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/686560
And tried to debug it, see please the result:
You can see the introduced into “tms570ls3137_ajsm_unlock.gel” GEL file call of the “dbgauth” command line utility unlocks the device correct.
But the configured in the GUI unlocking functionality fails on calling the functions in corresponded GEL files in ajsm folder.
6) So I report the error on this functionality
And one more – my main goal is to lock the TMS570LC4357 device by AJSM and temporarily unlock it at CCS debugging with GUI usage.
Please share the example/template how to do that.
Thanks in advance,
Oleg.





