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.

CDM文件的疑问?

Other Parts Discussed in Thread: TMS320F2802

请问我们在调试仿真和程序固化可以共用一个CMD文件么?可以编写一个公共的CMD文件么?是不是在程序调试时,.text段不能分配到flash中?

  • 调试和固化使用同一个cmd的话,使用flash版的cmd即可,程序在flash中也是可以仿真的,仿真方法和在ram中一样

  • 就是直接load  program么,不用固化么?

  • 不同的ccs版本有点差异,3.3及以下还是要有个固化的步骤,以上基于eclipse的版本就统一的,都使用debug的默认设定即可,所以推荐使用5.x或者6.x的版本

  • 目前我用的就是3.3的版本,是不是意味着每次仿真都要先固化才能进行仿真?

  • 不推荐使用这么低版本的CCS了,3.3flash中仿真先用flash下载插件,然后好像是用load symbols 的选项,你可以看看是不是

  • 仿真器不支持3.3以上的版本,现在只能用3.3的版本,load symbols不行啊,应该是load  program吧?不过用load program是,提示说无法设置断点,郁闷了。

  • 搞个xds100v2便宜的很,基本够用了。

    你flash烧写了没?

  • flash已经烧写了,但还是设置不了断点。

  • load program是针对的RAM下载,你用flash版本的会有问题。

    可能还是flash仿真的步骤不对,你试试flash烧写后,能直接连接仿真器吗?能直接连接的话,也许就可以了。以前用3.3仿真都是在ram中的,flash中还真没操作过,但是肯定是能实现的。

  • Liangliang

    仿真和脱机跑这两种模式都可以用flash类型的cmd文件,有些时候仿真时用RAM的cmd文件只不过是为了调试加载程序可以快一点而已。

    一般都用load program,无论是加载flash的.out文件还是加载RAM的.out文件。

    如果你的芯片中已经烧写了基于flash的.out文件,那么你连接芯片后,就只要load sysbom就可以了,不需要重新烧写(当然重新烧写也无所谓,花时间而已),告诉CCS你程序对应的函数符号等。

    ERIC

  • 用flash版本的CDM进行仿真时,在load program时,总是提示Data verification failed at adress 0x3f600。如果将程序烧写后,再load program就不是有错误提示,但断点设置失败,提示Trouble Setting Breakpoint with the Action "Halt Target" at 0x3f63b5: Error 0x00000008/-1076 Error during: Break Point,  Cannot set/verify breakpoint at 0x003F63B5。

    我发现0x3f600-0x3f7ff8存放的是我的程序。

    -stack 0x300


    MEMORY
    {
    PAGE 0:    /* Program Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */

       RAML0       : origin = 0x008000, length = 0x001000     /* on-chip RAM block L0 */
       OTP         : origin = 0x3D7800, length = 0x000400     /* on-chip OTP */
       FLASHD      : origin = 0x3F0000, length = 0x002000     /* on-chip FLASH */
       FLASHC      : origin = 0x3F2000, length = 0x002000     /* on-chip FLASH */
       FLASHA      : origin = 0x3F6000, length = 0x001F80     /* on-chip FLASH */
       CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
       BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
       CSM_PWL     : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */
      
       ROM         : origin = 0x3FF000, length = 0x000FC0     /* Boot ROM */
       RESET       : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM  */
       VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM  */

    PAGE 1 :   /* Data Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
               /* Registers remain on PAGE1                                                  */

       RAMM0       : origin = 0x000000, length = 0x000400     /* on-chip RAM block M0 */
       BOOT_RSVD   : origin = 0x000400, length = 0x000080     /* Part of M1, BOOT rom will use this for stack */
       RAMM1       : origin = 0x000480, length = 0x000380     /* on-chip RAM block M1 */
       FLASHB      : origin = 0x3F4000, length = 0x002000     /* on-chip FLASH */
    }

    /* Allocate sections to memory blocks.
       Note:
             codestart user defined section in DSP28_CodeStartBranch.asm used to redirect code
                       execution when booting to flash
             ramfuncs  user defined section to store functions that will be copied from Flash into RAM
    */
     
    SECTIONS
    {
     
       /* Allocate program areas: */
       .cinit              : > FLASHC      PAGE = 0
       .pinit              : > FLASHC,     PAGE = 0
       .text               : > FLASHA      PAGE = 0
       codestart           : > BEGIN       PAGE = 0
       ramfuncs            : LOAD = FLASHD,
                             RUN = RAML0,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             PAGE = 0

       csmpasswds          : > CSM_PWL     PAGE = 0
       csm_rsvd            : > CSM_RSVD    PAGE = 0
       FFTtf               : > RAML0,    PAGE = 0 /* Non volatile mem */
       /* Allocate uninitalized data sections: */
       .stack              : > RAMM0       PAGE = 1
       .ebss               : > RAMM1       PAGE = 1
       .esysmem            : > RAMM1       PAGE = 1

       FFTipcb ALIGN(1024) : { } > RAML0, PAGE = 0
       FFTmag              : { } > RAML0, PAGE = 0

       /* Initalized sections go in Flash */
       /* For SDFlash to program these, they must be allocated to page 0 */
       .econst             : > FLASHA      PAGE = 0
       .switch             : > FLASHA      PAGE = 0     

       /* Allocate IQ math areas: */
       IQmath              : > FLASHC      PAGE = 0                  /* Math Code */
       IQmathTables        : > ROM         PAGE = 0, TYPE = NOLOAD   /* Math Tables In ROM */

       /* .reset is a standard section used by the compiler.  It contains the */
       /* the address of the start of _c_int00 for C Code.   /*
       /* When using the boot ROM this section and the CPU vector */
       /* table is not needed.  Thus the default type is set here to  */
       /* DSECT  */
       .reset              : > RESET,      PAGE = 0, TYPE = DSECT
       vectors             : > VECTORS     PAGE = 0, TYPE = DSECT

    }

     

    用的是TMS320F2802,您帮忙看看哪里有错么,谢谢