TI的例程程序,我使用FLASH.CMD文件可以编译通过,没有错误,顺利生成.OUT文件。但是转到RAM.CMD文件就会出现错误无法通过编译。
在主程序中有如下语句
只有在FLASH中运行才能执行。为什么在RAM.CMD中会出现倒数2,3,4项错误?请工作人员帮忙解释一下。谢谢!
JLDN:
回复 Hardy Zhou:
你好!非常感谢
我按照你的说法操作,错误减少了很多,但是还有3个。麻烦指导一下。错误如下:
第一个和第三个均指向RAM.CMD文件的结尾处,如下图
我这个是在调试状态,为什么还会有第二个问题出现?应该不用生成.OUT文件吧。麻烦你了谢谢!
TI的例程程序,我使用FLASH.CMD文件可以编译通过,没有错误,顺利生成.OUT文件。但是转到RAM.CMD文件就会出现错误无法通过编译。
在主程序中有如下语句
只有在FLASH中运行才能执行。为什么在RAM.CMD中会出现倒数2,3,4项错误?请工作人员帮忙解释一下。谢谢!
JLDN:
回复 Hardy Zhou:
我是按照你说的这样做的。CMD文件是TI例程自带的 我没有做过修改。
TI的例程程序,我使用FLASH.CMD文件可以编译通过,没有错误,顺利生成.OUT文件。但是转到RAM.CMD文件就会出现错误无法通过编译。
在主程序中有如下语句
只有在FLASH中运行才能执行。为什么在RAM.CMD中会出现倒数2,3,4项错误?请工作人员帮忙解释一下。谢谢!
JLDN:
回复 JLDN:
MEMORY{PAGE 0 :/* Note that the memory allocation below does not create sections as necessary forthe CLA on the F2803x. */BEGIN : origin = 0x000000, length = 0x000002BOOT_RSVD : origin = 0x000002, length = 0x00004E RAMM0 : origin = 0x000050, length = 0x0003B0
progRAM : origin = 0x008000, length = 0x001800
IQTABLES : origin = 0x3FE000, length = 0x000B50 /* IQ Math Tables in Boot ROM */IQTABLES2 : origin = 0x3FEB50, length = 0x00008C /* IQ Math Tables in Boot ROM */IQTABLES3 : origin = 0x3FEBDC, length = 0x0000AA /* IQ Math Tables in Boot ROM */
RESET : origin = 0x3FFFC0, length = 0x000002BOOTROM : origin = 0x3FF27C, length = 0x000D44
PAGE 1 :
RAMM1 : origin = 0x000480, length = 0x000380
ADCDRVRAM : origin = 0x009800, length = 0x000020PFCICMDRAM : origin = 0x009820, length = 0x000020GENSINCOS : origin = 0x009840, length = 0x000020PWMDRVRAM : origin = 0x009860, length = 0x000020CNTL2P2ZRAM : origin = 0x009880, length = 0x000030dataRAM1 : origin = 0x0098b0, length = 0x000010CNTL2P2ZBUFF : origin = 0x0098c0, length = 0x000030DLOG : origin = 0x009900, length = 0x000020dataRAM : origin = 0x009920, length = 0x000680
CLA_CPU_MSGRAM : origin = 0x001480, length = 0x000080CPU_CLA_MSGRAM : origin = 0x001500, length = 0x000080}SECTIONS{codestart : > BEGIN, PAGE = 0ramfuncs : > RAMM0, PAGE = 0
.text : > progRAM, PAGE = 0
.cinit : > progRAM, PAGE = 0.pinit : > RAMM0, PAGE = 0.switch : > RAMM0, PAGE = 0.reset : > RESET, PAGE = 0, TYPE = DSECT.stack : > RAMM1, PAGE = 1
.ebss : > dataRAM, PAGE = 1.econst : > dataRAM, PAGE = 1
.esysmem : > RAMM1, PAGE = 1
IQmath : > progRAM, PAGE = 0IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD
Cla1ToCpuMsgRAM : > CLA_CPU_MSGRAM, PAGE = 1CpuToCla1MsgRAM : > CPU_CLA_MSGRAM, PAGE = 1
/* Uncomment the section below if calling the IQNexp() or IQexp()functions from the IQMath.lib library in order to utilize therelevant IQ Math table in Boot ROM (This saves space and Boot ROMis 1 wait-state). If this section is not uncommented, IQmathTables2will be loaded into other memory (SARAM, Flash, etc.) and will takeup space, but 0 wait-state is possible.*//*IQmathTables2 : > IQTABLES2, PAGE = 0, TYPE = NOLOAD{
IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)
}*//* Uncomment the section below if calling the IQNasin() or IQasin()functions from the IQMath.lib library in order to utilize therelevant IQ Math table in Boot ROM (This saves space and Boot ROMis 1 wait-state). If this section is not uncommented, IQmathTables2will be loaded into other memory (SARAM, Flash, etc.) and will takeup space, but 0 wait-state is possible.*//*IQmathTables3 : > IQTABLES3, PAGE = 0, TYPE = NOLOAD{
IQmath.lib<IQNasinTable.obj> (IQmathTablesRam)
}*/
}
SECTIONS{
ISRVariables : > dataRAM PAGE = 1/************* DPLIB Sections C28x ************************/ADCDRV_5ch_Section : > ADCDRVRAM PAGE = 1/* CNTL_2P2Z section */CNTL_2P2Z_Section : > CNTL2P2ZRAM PAGE = 1CNTL_2P2Z_InternalData : > CNTL2P2ZBUFF PAGE = 1CNTL_2P2Z_Coef : > dataRAM PAGE = 1/*DLOG_4CH section */DLOG_4ch_Section : > DLOG PAGE = 1DLOG_BUFF : > dataRAM PAGE = 1/*MATH_EMAVG section */GEN_Sin_Cos_Section : > GENSINCOS PAGE = 1/*PFC_ICMD section*/INV_ICMD_Section : > PFCICMDRAM PAGE = 1/* PWMDRV_PFC2PhiL driver section */PWMDRV_FBINV_Section : > PWMDRVRAM PAGE = 1/* ZeroNet_Section */ZeroNet_Section : > dataRAM PAGE = 1DLOG : > dataRAM PAGE = 1}
这个是RAM.CMD文件