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.

C6000 程序和数据外置在片外SDRAM的不同空间存储

一、C6746中程序和数据放在片外SDRAM同一空间:

CMD中 SECTIONS
{
 .cinit  >  L2    /* Initialization Tables   */
 .pinit  >  L2    /* C++ Constructor Tables   */
 .const  >  L2    /* Constant Data     */
 .switch  >  L2    /* Jump Tables      */
 .text  >  L2    /* Executable Code     */
 text  >  L2 /* */
 .ovly  >  SDRAM   /* ron_L1PD20150428 add,Allocate copy tables */
 .sdram  >  SDRAM
 .shareram >  SHARERAM
 .bss  >  L2    /* Global & Static Variables   */
 .far  >  L2    /* Far Global & Static Variables */
 .stack  >  L2    /* Software System Stack   */
 .sysmem  >  L2    /* Dynamic Memory Allocation Area  */
 
 .cio  >  L2    /* C I/O Buffer      */
 .vecs  >  L2    /* Interrupt Vectors    */
}

编译生成的.bin文件24821kb byte,烧录程序很慢。

二、C6746中程序和数据放在片外SDRAM不同空间:

如将数据和程序分开到sdram的两个区间,数据放在.sdram,程序放在.sdram_code.

SECTIONS
{
 .cinit  >  L2    /* Initialization Tables   */
 .pinit  >  L2    /* C++ Constructor Tables   */
 .const  >  L2    /* Constant Data     */
 .switch  >  L2    /* Jump Tables      */
 .text  >  L2    /* Executable Code     */
 text  >  L2 /* */
 .ovly  >  SDRAM   /* ron_L1PD20150428 add,Allocate copy tables */
 .sdram  >  SDRAM
 .sdram_code >  SDRAM
 .shareram >  SHARERAM
 .bss  >  L2    /* Global & Static Variables   */
 .far  >  L2    /* Far Global & Static Variables */
 .stack  >  L2    /* Software System Stack   */
 .sysmem  >  L2    /* Dynamic Memory Allocation Area  */
 
 .cio  >  L2    /* C I/O Buffer      */
 .vecs  >  L2    /* Interrupt Vectors    */
}

编译生成的.bin文件227kbkb bytes,烧录程序到片上ram时提示错误:

C674X_0: File Loader: Verification failed: Values at address 0x40404980 do not match Please verify target memory and memory map.
C674X_0: GEL: File: C:/Users\Debug\C6746_exm.out: a data verification error occurred, file load failed.

address 0x40404980 是程序存储的开始地址

请问下

1)这两种分配cmd导致生成的.bin文件大小的差异是什么?

2)烧录程序报错误的原因是什么原因?