This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280025: how to unsecure the device to re-debug

Part Number: TMS320F280025
Other Parts Discussed in Thread: UNIFLASH

Hi Team,

Based on the original thread,

I configured the LINKPOINTERCSMPSWD and GRABSECT/RAM of B0Z1 by using UNIFLASH 8.3.0.4307:

 (I used ZSB2, 0x78040)

 (PSWD0 from 0xFFFFFFFF to 0xFFFFFFF8)

 (All RAM and SECTOR are allocated to Z1)

After these configurations, I can load image and the device will work properly by using uniflash whatever configure the boot mode to boot to FLASH or WAIT boot mode.


Then I want to re-debug this device by using CCS. I populated the DCSM configurations on CCS-->Debug Configurations...-->Target-->Flash Settings for the project that I want to debug:

(I only populated Zone1 because I think I just using this ZONE.) Then I press the debug button(in wait boot mode), and got this error:

C28xx_CPU1: File Loader: Verification failed: Values at address 0x00A000@Program do not match Please verify target memory and memory map.
C28xx_CPU1: GEL: File: C:\Users\x1092776\workspace_v12\led_ex1_blinky\CPU1_RAM\led_ex1_blinky.out: a data verification error occurred, file load failed.

How to resolve it?

--

Thanks & Regards

Yale

  • Update:

    I populated the ZONE2 with it default value:

    The situation has not changed, same error.

  • Zone2 should auto populate with correct password. Was that not the case when you connect to device. Can you click on unlock button in CCS flash plug-in GUI  tool and see if both Zone1 and Zone2 are getting unlock correctly ?

    Regards,

    Vivek Singh

  • Thanks Vivek, I fixed it.

    Yes, when I open the Tools-->On-Chip Flash in Debug view, all of the DCSM OTP parameters have been auto populated.

    (Since the error I post above, the device cannot get in the debug mode(the debug probe cannot connect the target), so I set the debug session to load symbol only in Debug Configurations.)

    I guess the Flash Settings-->Security Settings are used to configure the DCSM OTP, not used to match the PSWD to unlock.

    And what is the Unlock/Lock button used for(whatever in CCS and UNIFLASH)? Just for test and change Linkpointer? Because the device will lock again after next power on, and reset is necessary for debug or load.


    After the auto populated, I used the correct PSWD to unlock and then move the Linkpointer to the next ZSB, remain all of the settings, the device can be debugged again(unsecured).

    Are these understandings and steps correct?

    And I reached a lot of bug with software tools(both CCS and Uniflash) during the test... These used to really confuse me.

    --

    Thanks & Regards

    Yale

  • After secured, the device cannot debug until unlock and move linkpointer to the next ZSB and remain default setting. We call this operation "unsecured".

    Is this correct?

  • You don't have to move linkpointer to next ZSB to debug. You can unlock the ECSL which will enable the CCS connection when stepping through the secure code without giving access to content in secure region or you can have zone unlock which will provide full access. Next ZSB is used when user need to change security settings.

    And I reached a lot of bug with software tools(both CCS and Uniflash) during the test... These used to really confuse me.

    Can you list down all the bugs you found ?

    Regards,

    Vivek Singh 

  • So the Unlock/Lock is used to execute an ECSL PMF flow? According to the TRM, I can understand these two buttons and corresponding functions in CCS. But in UNIFLASH, What is used for?

    As I mentioned before, I can just load symbol only to debug. Then, If I don't execute Unlock, the debugger or CPU can not run. Even I execute Unlock, the debugger or CPU can run, but the call stack window shows that the PC still point to the _c_init, It seems that no program is executing.

    That's why I move the Linkpointer to the next ZSB, and maintain the default setting. Then these work normally. 

    Could you please take a explain of this?

    Can you list down all the bugs you found ?
    • In CCS, when I first move the Linkpointer to the next ZSB, the situation not changed, whatever I keep the default setting, change PSWD and allocate SECT/RAM. This error still exist:

    Then I continue move the Linkpointer to the next ZSB, keep the default setting, everything recovered, no error.

    • In UNIFLASH, when I Read Target Device directly after I connect the launchpad, all the content of former address of each ZSB is 0:

    After load a image successfully, then the UNIFLASH can correctly read all the content:

    --

    Thanks & Regards

    Yale

  • As I mentioned before, I can just load symbol only to debug. Then, If I don't execute Unlock, the debugger or CPU can not run. Even I execute Unlock, the debugger or CPU can run, but the call stack window shows that the PC still point to the _c_init, It seems that no program is executing.

    There should not be any any issue in running the code with security on. I would suggest you to review your code to make sure you have not allocated stack in secure memory region because that will not be accessible from non-secure region. 

    Regards,

    Vivek Singh

  • Thanks Vivek, very helpful!

    I allocated all of the RAM to Z1 during my test.(Z1OTP-GRABRAM (0x5F01C)(32 bits)  0x0000 5500)(In fact all of the SECT also allocated to Z1.)

    I guess that is the reason.

    Thanks again.

    Yale