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.

CSS V3.3 Debugger Lock/Unlock vs release code with passwords

Using

CCS 3.3.82.13 (recently updated to SR12)
ID 5.98.0.393
BIOS 5.31.02
CGT V5.0.1

We are using an F28335 device

We compile two versions of our code. The first is labled "Debug "and the second is "Release". These are the same code but we compile in the passwords in the "Release" version. If we program the target with the"debug" version using SDFLASH we can start CCS & connect to the target (although sometimes it doesn't connect the first time but retry works ok) we can program the passwords and lock and unlock the device using tools\F28xx on-chip Flash programmer.  If we power cycle the board and restart CCS the device is locked (as expected) and we can unlock with the tools\F28xx on-chip flash programmer(Note if we try to run before unlocking the code in the target is corrupter??).

Our problem is if we program the target with the "release" version (using SDFLASH we can never connect to the target.

Here is the assembly file that differentiates the two code versions

 

; The "csmpasswords" section contains the actual CSM passwords that will be
; linked and programmed into to the CSM password locations (PWL) in flash. 
; These passwords must be known in order to unlock the CSM module.
; All 0xFFFF's (erased) is the default value for the password locations (PWL).

; It is recommended that all passwords be left as 0xFFFF during code
; development.  Passwords of 0xFFFF do not activate code security and dummy
; reads of the CSM PWL registers is all that is required to unlock the CSM. 
; When code development is complete, modify the passwords to activate the
; code security module.

      .sect "csmpasswds"
  .if _LOCKED == 1
      .int 0x24D4  ;PWL0 (LSW of 128-bit password)
      .int 0x43F1  ;PWL1
      .int 0xF893  ;PWL2
      .int 0xC264  ;PWL3
      .int 0x6730  ;PWL4
      .int 0x4D45  ;PWL5
      .int 0x8AC2  ;PWL6
      .int 0xEF54  ;PWL7 (MSW of 128-bit password)
  .else
      .int 0xFFFF  ;PWL0 (LSW of 128-bit password)
      .int 0xFFFF  ;PWL1
      .int 0xFFFF  ;PWL2
      .int 0xFFFF  ;PWL3
      .int 0xFFFF  ;PWL4
      .int 0xFFFF  ;PWL5
      .int 0xFFFF  ;PWL6
      .int 0xFFFF  ;PWL7 (MSW of 128-bit password)
  .endif 
;----------------------------------------------------------------------

; For code security operation, all addresses between 0x33FF80 and
; 0X33fff5 cannot be used as program code or data.  These locations
; must be programmed to 0x0000 when the code security password locations
; (PWL) are programmed.  If security is not a concern, then these addresses
; can be used for code or data. 

; The section "csm_rsvd" can be used to program these locations to 0x0000.

        .sect "csm_rsvd"
        .loop (33FFF5h - 33FF80h + 1)
              .int 0x0000
        .endloop

;//===========================================================================
;// End of file.
;//===========================================================================

 

Any suggestions?

 

 

  • Richard,

    Please try the following:

    • Please try programming debug code and release code (.out files) using On-chip flash programmer in CCS3.3v.
    • Please let us know of the emulator you are using?
    • Make sure you have the right Emulator Address in your SDConfig setup.
      • XDS510PP    - 378
      • XDS510USB - 510
    • Did you try resetting your JTAG emulator? If you are not able to reset the emulator then you might have wrong config file.

    Regards,

    Manoj

     

  • We have tried multiple methods of programming both using the on-Chip and standalone SDFLASH tools. The results are the same

    We decided to install the latest Spectrum DIgital F28xx Drivers V30330  for CCS V3.3
    we were previously ate V3.3.22
    Release V3.3.23 had a note addressing the -1135 error
    After the update we experienced the same problem trying to connect to a the locked "release" file

    However, we did come up with a method to connect to the locked release code
    We have a jumper on our board to force the serial boot code
    We selected this jumper and power cycled the target board. (target is now in serial boot)
    We subsequently started the CCSV3.3 and it starts without the error
    We then removed the jumper and issued the Debug|resetCPU command from CCSV3.3
    The target was labled locked as expected
    We then load the corresponding workspace and symbols
    We bring up the On-CHip program window with the security codes
    We can unlock the code
    We can then Run the code
    HOWEVER SINGLE STEP IS NOT AVAILABLE (greyed out)

    As a test of the single step we loaded "Debug code" (no security)
    We can Run and single step
    If we program the Same security codes in this version we loose single step control also
    Is this a limitation when security codes are programmed?

    I should note we are using a modified F28335-ezdsp board as an emulator at IOPORT 540

    The error we gen not following the above technique is 0x80000200/-1135
    This is and error listed in one of the driver updates