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

关于 280023 CMD配置问题

  在调试时,程序烧录在flash中,  28002x_generic_flash_lnk.cmd配置如下时程序能正确烧写运行

MEMORY
{
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x00000002, length = 0x00000126
RAMM0 : origin = 0x00000128, length = 0x000002D8
RAMM1 : origin = 0x00000400, length = 0x000003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

/* RAMLS4 : origin = 0x0000A000, length = 0x00000800
RAMLS5 : origin = 0x0000A800, length = 0x00000800
RAMLS6 : origin = 0x0000B000, length = 0x00000800
RAMLS7 : origin = 0x0000B800, length = 0x00000800*/

/* Combining all the LS RAMs */
RAMLS4567 : origin = 0x0000A000, length = 0x00002000
RAMGS0 : origin = 0x0000C000, length = 0x000007F8
// RAMGS0_RSVD : origin = 0x0000C7F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

FLASHBANK1 : origin = 0x00080002, length = 0x0000FFF0
FLASH_BANK1_RSVD : origin = 0x0008FFF2, length = 0x0000000D /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
BOOTROM : origin = 0x003F0000, length = 0x00008000
BOOTROM_EXT : origin = 0x003F8000, length = 0x00007FC0
RESET : origin = 0x003FFFC0, length = 0x00000002
/* Flash sectors */
/* BANK 0 */
//// FLASH_BANK0_SEC0 : origin = 0x080002, length = 0x000FFE /* on-chip Flash */
//// FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC2 : origin = 0x082000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000 /* on-chip Flash */
//// FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x000FF0 /* on-chip Flash */
// FLASH_BANK0_SEC15_RSVD : origin = 0x08FFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

}

SECTIONS
{
codestart : > BEGIN, ALIGN(8)
// .text : >>FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4 | FLASH_BANK0_SEC5 | FLASH_BANK0_SEC6 | FLASH_BANK0_SEC7 | FLASH_BANK0_SEC8 | FLASH_BANK0_SEC9 | FLASH_BANK0_SEC10 | FLASH_BANK0_SEC11 | FLASH_BANK0_SEC12
.text : > FLASHBANK1
.cinit : > FLASHBANK1, ALIGN(8)
.switch : > FLASHBANK1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */

.stack : > RAMM1

.init_array : > FLASHBANK1, ALIGN(8)
.bss : > RAMLS4567
.bss:output : > RAMLS4567
.bss:cio : > RAMGS0
.const : > FLASHBANK1, ALIGN(8)
.data : > RAMLS4567
.sysmem : > RAMLS4567

ramgs0 : > RAMGS0

/* The following section definition are for IQMATH */
IQmath : > FLASHBANK1
IQmathTables : > FLASHBANK1/*RAMGS0 | RAMLS4567*/
IQmathTablesRam : > FLASHBANK1

.TI.ramfunc : LOAD = FLASHBANK1,
RUN = RAMGS0,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)

}
/*
//===========================================================================
// End of file.
//===========================================================================
*/

改为如下时程序编译通过,但烧写一半出错,不知是何原因?

MEMORY
{
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x00000002, length = 0x00000126
RAMM0 : origin = 0x00000128, length = 0x000002D8
RAMM1 : origin = 0x00000400, length = 0x000003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

/* RAMLS4 : origin = 0x0000A000, length = 0x00000800
RAMLS5 : origin = 0x0000A800, length = 0x00000800
RAMLS6 : origin = 0x0000B000, length = 0x00000800
RAMLS7 : origin = 0x0000B800, length = 0x00000800*/

/* Combining all the LS RAMs */
RAMLS4567 : origin = 0x0000A000, length = 0x00002000
RAMGS0 : origin = 0x0000C000, length = 0x000007F8
// RAMGS0_RSVD : origin = 0x0000C7F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

// FLASHBANK1 : origin = 0x00080000, length = 0x0000FFF0
// FLASH_BANK1_RSVD : origin = 0x0008FFF0, length = 0x00000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
BOOTROM : origin = 0x003F0000, length = 0x00008000
BOOTROM_EXT : origin = 0x003F8000, length = 0x00007FC0
RESET : origin = 0x003FFFC0, length = 0x00000002
/* Flash sectors */
/* BANK 0 */
FLASH_BANK0_SEC0 : origin = 0x080002, length = 0x000FFE /* on-chip Flash */
FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC2 : origin = 0x082000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000 /* on-chip Flash */
FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x000FF0 /* on-chip Flash */
// FLASH_BANK0_SEC15_RSVD : origin = 0x08FFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

}

SECTIONS
{
codestart : > BEGIN, ALIGN(8)
.text : >> FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4 | FLASH_BANK0_SEC5 | FLASH_BANK0_SEC6 | FLASH_BANK0_SEC7 | FLASH_BANK0_SEC8 | FLASH_BANK0_SEC9, ALIGN(8)
.cinit : > FLASH_BANK0_SEC1, ALIGN(8)
.switch : > FLASH_BANK0_SEC1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */

.stack : > RAMM1

.init_array : > FLASH_BANK0_SEC1, ALIGN(8)
.bss : > RAMLS4567
.bss:output : > RAMLS4567
.bss:cio : > RAMGS0
.const : > FLASH_BANK0_SEC1, ALIGN(8)
.data : > RAMLS4567
.sysmem : > RAMLS4567

ramgs0 : > RAMGS0

/* Allocate IQ math areas: */
IQmath : > FLASH_BANK0_SEC10
IQmathTables : > FLASH_BANK0_SEC10

.TI.ramfunc : LOAD = FLASH_BANK0_SEC11 | FLASH_BANK0_SEC12,
RUN = RAMGS0,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)

}
/*
//===========================================================================
// End of file.
//===========================================================================
*/

Susan Yang:

"改为如下时程序编译通过,但烧写一半出错,不知是何原因?"

请问您具体修改是什么?另外具体的出错信息是什么?请您详细说明一下

,

jie gong:

只是把FLASH段分开了,1整段和16段的区别,(FLASHBANK1 共一段, FLASH_BANK0_SEC0– SEC15 共16段),按上面的配置,就有两种完全不同的结果

,

Susan Yang:

这个问题建议您先看一下

software-dl.ti.com/…/c2000_c28x-compiler-understanding-linking.html

不知具体是什么报错?有可能是部分section不够,需要合并section

,

jie gong:

还有个问题,程序 我是从28034上移植到280023上,现在但FLASHBANK1超过50%时程序编译通过,烧写程序时擦除FLASH后,烧写进度走了一段后就报错 Load program Error。只要将代码减少到FLASHBANK1小于50%时,烧写都正常,程序也能跑。

,

Susan Yang:

请问具体详细报错信息是什么?关于移植您可以参考

www.ti.com/…/spracr0.pdf

,

jie gong:

当FLASH空间超过50%时烧写出错是不是280023的FLASH空间只有32K,28034的FLASH空间有64K,我用的CMD文件是C2000 WARE SDK 中的28002x_generic_flash_lnk.cmd。

28002x_generic_flash_lnk.cmd 中FLASH空间如下

/* Flash sectors */ /* BANK 0 */ FLASH_BANK0_SEC0 : origin = 0x080002, length = 0x000FFE /* on-chip Flash */ FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC2 : origin = 0x082000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000 /* on-chip Flash */ FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x000FF0 /* on-chip Flash */

,

Susan Yang:

谢谢您的详细信息。看起来是flash大小差异引起的这样的问题。目前您map文件中显示flash使用量是多少?

,

jie gong:

对比280023 与 28034 IQmath有区别

在280023 CMD 文件中是否要添加以下代码(/* 此处IQmath */) ,

FLASHBANK1 : origin = 0x00080002, length = 0x00007FF0 FLASH_BANK1_RSVD : origin = 0x0008FFF2, length = 0x0000000D /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

IQTABLES : origin = 0x3F1402, length = 0x00166D    /* 此处IQmath */

BOOTROM : origin = 0x003F0000, length = 0x00001400 BOOTROM1 : origin = 0x003F2A6F, length = 0x00005000 BOOTROM_EXT : origin = 0x003F8000, length = 0x00007FC0 RESET : origin = 0x003FFFC0, length = 0x00000002

IQmath : > FLASHBANK1    /* 此处IQmath */ IQmathTables : > IQTABLES , TYPE = NOLOAD   /* 此处IQmath */ IQmathTablesRam : > RAMLS4567   /* 此处IQmath */

不知是否正确?请指教!

,

jie gong:

解决了,IQmath的设置问题,IQmathTablesRam 这个段要用在FlASH中,IQmath手册上有说。感谢支持!!!

,

Susan Yang:

很高兴您能解决问题,谢谢您的详细反馈!

赞(0)
未经允许不得转载:TI中文支持网 » 关于 280023 CMD配置问题
分享到: 更多 (0)