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

28035数据太大CMD如何修改?

定义了三个数组,然后调试的时候电机不转了,一开始还不知道是数据大,因为编译是通过的。后面观察变量值得时候才发现内存不够,我想修改CMD文件来满足数据的要求,但不知道哪个段需要增加,忘求指点迷津。以下是数据段的CMD,我应该怎么修改呢?谢谢了

PAGE 1 : /* Data Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
/* Registers remain on PAGE1 */
BOOT_RSVD : origin = 0x000000, length = 0x000050 /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x000050, length = 0x0003B0 /* on-chip RAM block M0 */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML23 : origin = 0x008C00, length = 0x001E00 /* on-chip RAM block L2 */
FLASHB1 : origin = 0x3F4000, length = 0x001000 /* 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 : > FLASHCDEFGH PAGE = 0
.pinit : > FLASHCDEFGH, PAGE = 0
.text : > FLASHCDEFGH PAGE = 0
codestart : > BEGIN PAGE = 0
ramfuncs : LOAD = FLASHB2,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
RUN_START(_RamfuncsRunStart),
PAGE = 0

csmpasswds : > CSM_PWL_P0 PAGE = 0
csm_rsvd : > CSM_RSVD PAGE = 0

/* Allocate uninitalized data sections: */
.stack : > RAMM0 PAGE = 1
.ebss : > RAML23 PAGE = 1
.esysmem : > RAML23 PAGE = 1

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

/* Allocate IQ math areas: */
IQmath : > FLASHCDEFGH PAGE = 0 /* Math Code */
IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD

Hank Zhao:

全局变量的数组是初始化在ebss段中的。

定义了三个数组,然后调试的时候电机不转了,一开始还不知道是数据大,因为编译是通过的。后面观察变量值得时候才发现内存不够,我想修改CMD文件来满足数据的要求,但不知道哪个段需要增加,忘求指点迷津。以下是数据段的CMD,我应该怎么修改呢?谢谢了

PAGE 1 : /* Data Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
/* Registers remain on PAGE1 */
BOOT_RSVD : origin = 0x000000, length = 0x000050 /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x000050, length = 0x0003B0 /* on-chip RAM block M0 */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML23 : origin = 0x008C00, length = 0x001E00 /* on-chip RAM block L2 */
FLASHB1 : origin = 0x3F4000, length = 0x001000 /* 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 : > FLASHCDEFGH PAGE = 0
.pinit : > FLASHCDEFGH, PAGE = 0
.text : > FLASHCDEFGH PAGE = 0
codestart : > BEGIN PAGE = 0
ramfuncs : LOAD = FLASHB2,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
RUN_START(_RamfuncsRunStart),
PAGE = 0

csmpasswds : > CSM_PWL_P0 PAGE = 0
csm_rsvd : > CSM_RSVD PAGE = 0

/* Allocate uninitalized data sections: */
.stack : > RAMM0 PAGE = 1
.ebss : > RAML23 PAGE = 1
.esysmem : > RAML23 PAGE = 1

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

/* Allocate IQ math areas: */
IQmath : > FLASHCDEFGH PAGE = 0 /* Math Code */
IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD

Johnson Chen1:

如果编译没有报错,就说明实际变量没有超出空间,如果有问题,应该是你程序上有问题,导致使用到了不存在的RAM或者覆盖了其他的变量。RAML23已经很大了,你可以看一下.map文件,看RAML23还有多少空间可以使用。

赞(0)
未经允许不得转载:TI中文支持网 » 28035数据太大CMD如何修改?
分享到: 更多 (0)