TI中文支持网
TI专业的中文技术问题搜集分享网站

TMS320F280049C: 关于F280049C加密问题

Part Number:TMS320F280049COther Parts Discussed in Thread:SYSCONFIG, CONTROLSUITE, UNIFLASH

关于F280049C加密问题

1:ASM文件是用SYSCONFIG产生的ASM文件和CMD文件

  • ASM文件内容:

  文件说明内容只是修改了红色部分

        密码1,3,4修改为12345678

其它内容一字不改

; ———————————————————————-

; Zone 1

;———————————————————————-

    .sect "dcsm_otp_z1_linkpointer"

      .retain

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

   

    .sect "dcsm_otp_z1_pswdlock"

      .retain

     .long 0xFB7FFFFF

     .long 0x7FFFFFFF     ;Reserved

     

    .sect "dcsm_otp_z1_crclock"

      .retain

     .long 0x4BFFFFFF

     .long 0x3FFFFFFF     ;Reserved

  

;;     .sect "dcsm_otp_z1_gpreg"

;;      .retain

;;      .long 0x5AFF1820     ;Z1OTP_BOOTPIN_CONFIG

;;      .long 0x5AFFFFfF     ;Z1OTP_GPREG2

;;     .sect "dcsm_otp_z1_bootctrl"

;;      .retain

;;      .long 0x00000000     ;Z1OTP_BOOTDEF_LOW

;;      .long 0xFFFFFFFF     ;Z1OTP_BOOTDEF_HIGH

     

    .sect "dcsm_zsel_z1"

      .retain

     .long 0x000000FF       ;Z1-EXEONLYRAM

     .long 0x0000FFFF      ;Z1-EXEONLYSECT

     .long 0x0000AAAA          ;Z1-GRABRAM

     .long 0xAAAAAAAA         ;Z1-GRABSECT     

     .long 0x12345678

     .long 0x47FFFFFF

     .long 0x12345678

     .long 0x12345678

 

    .sect "b1_dcsm_otp_z1_linkpointer"

      .retain

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

 

    .sect "b1_dcsm_zsel_z1"

      .retain

     .long 0xFFFFFFFF               ;Reserved

     .long 0x0000FFFF      ;Bank 1 Z1-EXEONLYSECT

     .long 0xFFFFFFFF               ;Reserved

     .long 0xAAAAAAAA         ;Bank 1 Z1-GRABSECT

 

     .long 0xFFFFFFFF               ;Reserved

     .long 0xFFFFFFFF               ;Reserved

     .long 0xFFFFFFFF               ;Reserved

     .long 0xFFFFFFFF               ;Reserved

 

;———————————————————————-

 

; For code security operation,after development has completed, prior to

; production, all other zone select block locations should be programmed

; to 0x0000 for maximum security.       

; If the first zone select block at offset 0x10 is used, the section

; "dcsm_rsvd_z1" can be used to program these locations to 0x0000.

; This code is commented out for development.

 

;       .sect "dcsm_rsvd_z1"

;        .loop (1e0h)

;              .int 0x0000

;        .endloop

 

 

;———————————————————————-

; Zone 2

;———————————————————————-

    .sect "dcsm_otp_z2_linkpointer"

      .retain

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

 

    .sect "dcsm_otp_z2_pswdlock"

      .retain

     .long 0xBF7FFFFF

     .long 0x77FFFFFF     ;Reserved

     

    .sect "dcsm_otp_z2_crclock"

      .retain

     .long 0x0FFFFFFF

     .long 0x37FFFFFF     ;Reserved

           

;;     .sect "dcsm_otp_z2_gpreg"

;;      .retain

;;      .long 0x5AFF1820     ;Z2OTP_BOOTPIN_CONFIG

;;      .long 0x5AFFFFfF     ;Z2OTP_GPREG2

;;     .sect "dcsm_otp_z2_bootctrl"

;;      .retain

;;      .long 0x00000000     ;Z2OTP_BOOTDEF_LOW

;;      .long 0xFFFFFFFF     ;Z2OTP_BOOTDEF_HIGH

     

    .sect "dcsm_zsel_z2"

      .retain

     .long 0x000000FF       ;z2-EXEONLYRAM

     .long 0x0000FFFF      ;z2-EXEONLYSECT

     .long 0x0000AAAA          ;z2-GRABRAM

     .long 0xAAAAAAAA         ;z2-GRABSECT

     

     .long 0x12345678

     .long 0xE3FFFFFF

     .long 0x12345678

     .long 0x12345678

 

    .sect "b1_dcsm_otp_z2_linkpointer"

      .retain

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

     .long 0x1FFFFFFF

     .long 0xFFFFFFFF     ;Reserved

 

    .sect "b1_dcsm_zsel_z2"

      .retain

     .long 0xFFFFFFFF               ;Reserved

     .long 0x0000FFFF      ;Bank 1 Z2-EXEONLYSECT

     .long 0xFFFFFFFF               ;Reserved

     .long 0xAAAAAAAA         ;Bank 1 Z2-GRABSECT

 

     .long 0xFFFFFFFF               ;Reserved

     .long 0xFFFFFFFF               ;Reserved

     .long 0xFFFFFFFF               ;Reserved

     .long 0xFFFFFFFF               ;Reserved

 

;———————————————————————-

 

; For code security operation,after development has completed, prior to

; production, all other zone select block locations should be programmed

; to 0x0000 for maximum security.       

; If the first zone select block at offset 0x10 is used, the section

; "dcsm_rsvd_z2" can be used to program these locations to 0x0000.

; This code is commented out for development.

 

;       .sect "dcsm_rsvd_z2"

;        .loop (1e0h)

;              .int 0x0000

;        .endloop

 

 

;———————————————————————-

; End of file

;———————————————————————-

 

 

1.2  CMD文件内容生成后没动过

 

1.3  然后进行编译,得到MAP文件和OUT文件

/* this linker command file is to be included if user wants to use the DCSM feature on the device

 * DCSM  means Dual Zone Code Security Module.

 * This linker command file works as an addendum ot the already existing Flash/RAM linker command file

 * that the project has.

 * The sections in the *_ZoneSelectBlock.asm source file is linked as per the commands given in the file

 * NOTE – please note fill=0xFFFF, this helps if users include this file in the project by mistake and

 * doesn't provide the needed proper *_ZoneSelectBlock.asm sources .

 * Please refer to the Blinky DCSM example in the controlsuite examples for proper usage of this.

 *

 * Once users are confident that they want to program the passwords in OTP, the DSECT section type can be removed.

 *

*/

 

MEMORY

{

PAGE 0 :  /* Program Memory */

 

   /* Z1 OTP.  LinkPointers */

   DCSM_OTP_Z1_LINKPOINTER   : origin = 0x78000, length = 0x00000C

   /* Z1 OTP.  GPREG1/GPREG2 */

   DCSM_OTP_Z1_GPREG         : origin = 0x7800C, length = 0x000004

   /* Z1 OTP.  PSWDLOCK/RESERVED */

   DCSM_OTP_Z1_PSWDLOCK       : origin = 0x78010, length = 0x000004

   /* Z1 OTP.  CRCLOCK/RESERVED */

   DCSM_OTP_Z1_CRCLOCK          : origin = 0x78014, length = 0x000004

   /* Z1 OTP.  RESERVED/BOOTCTRL */

   DCSM_OTP_Z1_BOOTCTRL        : origin = 0x7801C, length = 0x000004

 

   /* DCSM Z1 Zone Select Contents (!!Movable!!) */

   /* Z1 OTP.  Z1 password locations / Flash and RAM partitioning */

   DCSM_ZSEL_Z1_P0              : origin = 0x78020, length = 0x000010

 

   /* Z2 OTP.  LinkPointers */

   DCSM_OTP_Z2_LINKPOINTER         : origin = 0x78200, length = 0x00000C

   /* Z2 OTP.  GPREG1/GPREG2 */

   DCSM_OTP_Z2_GPREG                  : origin = 0x7820C, length = 0x000004

   /* Z2 OTP.  PSWDLOCK/RESERVED */

   DCSM_OTP_Z2_PSWDLOCK       : origin = 0x78210, length = 0x000004

   /* Z2 OTP.  CRCLOCK/RESERVED */

   DCSM_OTP_Z2_CRCLOCK          : origin = 0x78214, length = 0x000004

   /* Z2 OTP.  GPREG3/BOOTCTRL */

   DCSM_OTP_Z2_BOOTCTRL        : origin = 0x7821C, length = 0x000004

 

   /* DCSM Z2 Zone Select Contents (!!Movable!!) */

   /* Z2 OTP.  Z2 password locations / Flash and RAM partitioning  */

   DCSM_ZSEL_Z2_P0              : origin = 0x78220, length = 0x000010

 

   /* BANK1 */

   /* B1 Z1 OTP.  LinkPointers */

   B1_DCSM_OTP_Z1_LINKPOINTER    : origin = 0x78400, length = 0x00000C

 

   /* DCSM B1 Z1 Zone Select Contents (!!Movable!!) */

   /* B1 Z1 OTP.  Flash partitioning */

   B1_DCSM_ZSEL_Z1_P0         : origin = 0x78420, length = 0x000010

 

   /* B1 Z2 OTP.  LinkPointers */

   B1_DCSM_OTP_Z2_LINKPOINTER    : origin = 0x78600, length = 0x00000C

 

   /* DCSM B1 Z2 Zone Select Contents (!!Movable!!) */

   /* B1 Z2 OTP.  Flash partitioning  */

   B1_DCSM_ZSEL_Z2_P0         : origin = 0x78620, length = 0x000010

}

 

SECTIONS

{

   dcsm_otp_z1_linkpointer       : > DCSM_OTP_Z1_LINKPOINTER                 PAGE = 0

   dcsm_otp_z1_gpreg        : > DCSM_OTP_Z1_GPREG               PAGE = 0, type =DSECT

   dcsm_otp_z1_pswdlock                   : > DCSM_OTP_Z1_PSWDLOCK          PAGE = 0

   dcsm_otp_z1_crclock             : > DCSM_OTP_Z1_CRCLOCK                       PAGE = 0

   dcsm_otp_z1_bootctrl            : > DCSM_OTP_Z1_BOOTCTRL            PAGE = 0, type =DSECT

   dcsm_zsel_z1                                  : > DCSM_ZSEL_Z1_P0                                PAGE = 0

 

   dcsm_otp_z2_linkpointer        : > DCSM_OTP_Z2_LINKPOINTER                 PAGE = 0

   dcsm_otp_z2_gpreg        : > DCSM_OTP_Z2_GPREG               PAGE = 0, type =DSECT

   dcsm_otp_z2_pswdlock                   : > DCSM_OTP_Z2_PSWDLOCK          PAGE = 0

   dcsm_otp_z2_crclock             : > DCSM_OTP_Z2_CRCLOCK                       PAGE = 0

   dcsm_otp_z2_bootctrl            : > DCSM_OTP_Z2_BOOTCTRL            PAGE = 0, type =DSECT

   dcsm_zsel_z2                                  : > DCSM_ZSEL_Z2_P0                                PAGE = 0

   b1_dcsm_otp_z1_linkpointer : > B1_DCSM_OTP_Z1_LINKPOINTER            PAGE = 0

   b1_dcsm_zsel_z1                             : > B1_DCSM_ZSEL_Z1_P0                                    PAGE = 0

 

   b1_dcsm_otp_z2_linkpointer   : > B1_DCSM_OTP_Z2_LINKPOINTER            PAGE = 0

   b1_dcsm_zsel_z2                             : > B1_DCSM_ZSEL_Z2_P0                                    PAGE = 0

}

 

/*

//===========================================================================

// End of file.

//===========================================================================

*/

 

 

 

 

1.3  然后进行编译,得到MAP文件和OUT文件

 

SyncSocRegsFile

*          1    00007940    00000006     UNINITIALIZED

                  00007940    00000006     f28004x_globalvariabledefs.obj (SyncSocRegsFile)

 

dcsm_otp_z1_gpreg

*          0    0007800c    00000000     DSECT

 

dcsm_otp_z1_pswdlock

*          0    00078010    00000004    

                  00078010    00000004     dcsm.obj (dcsm_otp_z1_pswdlock)

 

dcsm_otp_z1_crclock

*          0    00078014    00000004    

                  00078014    00000004     dcsm.obj (dcsm_otp_z1_crclock)

 

dcsm_otp_z1_bootctrl

*          0    0007801c    00000000     DSECT

 

dcsm_zsel_z1

*          0    00078020    00000010    

                  00078020    00000010     dcsm.obj (dcsm_zsel_z1)

 

dcsm_otp_z2_linkpointer

*          0    00078200    0000000c    

                  00078200    0000000c     dcsm.obj (dcsm_otp_z2_linkpointer)

 

dcsm_otp_z2_gpreg

*          0    0007820c    00000000     DSECT

 

dcsm_otp_z2_pswdlock

*          0    00078210    00000004    

                  00078210    00000004     dcsm.obj (dcsm_otp_z2_pswdlock)

 

dcsm_otp_z2_crclock

*          0    00078214    00000004    

                  00078214    00000004     dcsm.obj (dcsm_otp_z2_crclock)

 

dcsm_otp_z2_bootctrl

*          0    0007821c    00000000     DSECT

 

dcsm_zsel_z2

*          0    00078220    00000010    

                  00078220    00000010     dcsm.obj (dcsm_zsel_z2)

 

b1_dcsm_otp_z1_linkpointer

*          0    00078400    0000000c    

                  00078400    0000000c     dcsm.obj (b1_dcsm_otp_z1_linkpointer)

 

b1_dcsm_zsel_z1

*          0    00078420    00000010    

                  00078420    00000010     dcsm.obj (b1_dcsm_zsel_z1)

 

b1_dcsm_otp_z2_linkpointer

*          0    00078600    0000000c    

                  00078600    0000000c     dcsm.obj (b1_dcsm_otp_z2_linkpointer)

 

b1_dcsm_zsel_z2

*          0    00078620    00000010    

                  00078620    00000010     dcsm.obj (b1_dcsm_zsel_z2)

 

1.4  下载程序到FLASH后,程序不运行了.

1.5   想再次下载程序,芯片锁死了

                   对应的CCS设置为下图

下载程序图

 

1.5   用UNIFLASH软件

sir deng:

,

Green Deng:

程序不运行跟芯片是否加密没有直接关系,你的程序如果在没有加密的状态下能成功下载到flash并运行,那么加密后表现应该一样。

芯片锁死后有进行解密处理吗?否则是无法再次下载程序的

赞(0)
未经允许不得转载:TI中文支持网 » TMS320F280049C: 关于F280049C加密问题
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1