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

编译错误-CMD配置

编译环境:CCS6.1

错误提示如下:

line 72: error #10099-D: program will not fit into available memory. placement with alignment/blocking fails for section ".econst" size 0x2096 page 0. Available memory ranges:
FLASHA size: 0xff80 unused: 0x1b12 max hole: 0x1b11

求解,谢谢!

F28035.cmd配置如下

MEMORY
{
PAGE 0: /* Program Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
RAMPRG : origin = 0x008000, length = 0x000080 /* on-chip RAM block L0, for RamFuncs */
OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */
FLASHA : origin = 0x3E8000, length = 0x00FF80 /* 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 */

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 */

ROM : origin = 0x3FF27C, length = 0x000D44 /* 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 = 0x000100, length = 0x000300 /* on-chip RAM block M0 */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML0 : origin = 0x008080, length = 0x001f80 /* on-chip RAM block L0 */
/* RAML1 : origin = 0x009000, length = 0x001000*/ /* on-chip RAM block L1 */
/* RAMH0 : origin = 0x00A000, length = 0x002000 */ /* on-chip RAM block H0 */
}

/* 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 : > FLASHA PAGE = 0
.pinit : > FLASHA, PAGE = 0
.text : > FLASHA PAGE = 0
.binit : > FLASHA, PAGE = 0
.ovly : > FLASHA, PAGE = 0
codestart : > BEGIN PAGE = 0
ramfuncs : LOAD = FLASHA, RUN = RAMPRG, PAGE = 0,
table(_prginRAM)

otp_prg : > OTP PAGE = 0
csmpasswds : > CSM_PWL PAGE = 0
csm_rsvd : > CSM_RSVD PAGE = 0
/* Allocate uninitalized data sections: */
.stack : > RAMM1 PAGE = 1
.ebss : > RAML0 PAGE = 1
.esysmem : > RAML0 PAGE = 1
debug_buffer : > RAML0 PAGE = 1

/* 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 : > FLASHA PAGE = 0 /* Math Code */
IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD

/* Uncomment the section below if calling the IQNexp() or IQexp()
functions from the IQMath.lib library in order to utilize the
relevant IQ Math table in Boot ROM (This saves space and Boot ROM
is 1 wait-state). If this section is not uncommented, IQmathTables2
will be loaded into other memory (SARAM, Flash, etc.) and will take
up 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 the
relevant IQ Math table in Boot ROM (This saves space and Boot ROM
is 1 wait-state). If this section is not uncommented, IQmathTables2
will be loaded into other memory (SARAM, Flash, etc.) and will take
up space, but 0 wait-state is possible.
*/
/*
IQmathTables3 : > IQTABLES3, PAGE = 0, TYPE = NOLOAD
{

IQmath.lib<IQNasinTable.obj> (IQmathTablesRam)

}
*/

/* .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
}

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

shaowen li:

应该是FLASHA 剩余空间不够(0x00001b08 ),怎么解决?

MAP文件部分如下:
******************************************************************************TMS320C2000 Linker PC v6.4.2
******************************************************************************
>> Linked Mon Dec 07 19:51:47 2020

OUTPUT FILE NAME:<E:/code/MD380_75_1/MD380/MD380_28034/../../MD380/Debug/MD380-2803X-DSP.out>
ENTRY POINT SYMBOL: "code_start"address: 003f7ff6

MEMORY CONFIGURATION
nameoriginlengthusedunusedattrfill
——————————————————————-
PAGE 0:RAMPRG00008000000000800000001d00000063RWIXOTP003d7800000004000000000000000400RWIXFLASHA003e80000000ff800000e47800001b08RWIXCSM_RSVD003f7f80000000760000007600000000RWIXBEGIN003f7ff6000000020000000200000000RWIXCSM_PWL003f7ff8000000080000000800000000RWIXIQTABLES003fe00000000b500000000000000b50RWIXIQTABLES2003feb500000008c000000000000008cRWIXIQTABLES3003febdc000000aa00000000000000aaRWIXROM003ff27c00000d440000000000000d44RWIXRESET003fffc0000000020000000000000002RWIXVECTORS003fffc20000003e000000000000003eRWIX

PAGE 1:RAMM000000100000003000000000000000300RWIXRAMM100000400000004000000040000000000RWIXDEV_EMU00000880000001050000000400000101RWIXSYS_PWR_CTL00000985000000030000000300000000RWIXFLASH_REGS00000a80000000600000000800000058RWIXCSM00000ae0000000100000001000000000RWIXADC_RESULT00000b00000000200000002000000000RWIXCPU_TIMER000000c00000000080000000800000000RWIXCPU_TIMER100000c08000000080000000800000000RWIXCPU_TIMER200000c10000000080000000800000000RWIXPIE_CTRL00000ce0000000200000001a00000006RWIXPIE_VECT00000d00000001000000010000000000RWIXCLA100001400000000800000004000000040RWIXECANA0000600000000040000000340000000cRWIXECANA_LAM00006040000000400000004000000000RWIXECANA_MOTS00006080000000400000004000000000RWIXECANA_MOTO000060c0000000400000004000000000RWIXECANA_MBOX00006100000001000000010000000000RWIXCOMP10000640000000020000000110000000fRWIXCOMP20000642000000020000000110000000fRWIXCOMP30000644000000020000000110000000fRWIXEPWM100006800000000400000003a00000006RWIXEPWM200006840000000400000003a00000006RWIXEPWM300006880000000400000003a00000006RWIXEPWM4000068c0000000400000003a00000006RWIXEPWM500006900000000400000003a00000006RWIXEPWM600006940000000400000003a00000006RWIXEPWM700006980000000400000003a00000006RWIXECAP100006a00000000200000002000000000RWIXEQEP100006b00000000400000004000000000RWIXLINA00006c00000000800000004a00000036RWIXGPIOCTRL00006f80000000400000004000000000RWIXGPIODAT00006fc0000000200000002000000000RWIXGPIOINT00006fe0000000200000000c00000014RWIXSYSTEM00007010000000200000002000000000RWIXSPIA00007040000000100000001000000000RWIXSCIA00007050000000100000001000000000RWIXNMIINTRUPT00007060000000100000001000000000RWIXXINTRUPT00007070000000100000001000000000RWIXADC00007100000000800000005000000030RWIXSPIB00007740000000100000001000000000RWIXI2CA0000790000000040000000220000001eRWIXRAML00000808000001f80000019cd000005b3RWIXPARTID003d7e80000000010000000100000000RWIXCSM_PWL003f7ff8000000080000000800000000RWIX

SECTION ALLOCATION MAP
outputattributes/
sectionpageoriginlengthinput sections
————————————————
.text0003e80000000e1d5003e8000000012bdf_menu.obj (.text)003e92bd00000fd7f_io.obj (.text)003ea29400000ddcMotorVF.obj (.text)003eb07000000b88f_runSrc.obj (.text)003ebbf800000977f_comm.obj (.text)003ec56f000008eaf_frqSrc.obj (.text)003ece5900000856MotorVCMain.obj (.text)003ed6af00000850MotorImParEst.obj (.text)003edeff0000083fMotorImParStaticEst.obj (.text)003ee73e000006faMotorInvProtect.obj (.text)003eee38000006e0f_canlink.obj (.text)003ef518000006d5MotorMain.obj (.text)003efbed000005aaf_frqSrc_pid.obj (.text)003f01970000052cf_interface.obj (.text)003f06c3000004c3MotorParChange.obj (.text)003f0b86000004abf_eeprom.obj (.text)003f103100000496f_error.obj (.text)003f14c700000496f_osc.obj (.text)003f195d0000044bMotorCarrier.obj (.text)003f1da80000042cf_runSrc_accDecFrq.obj (.text)003f21d40000040af_main.obj (.text)003f25de000003f1MotorDataExchange.obj (.text)003f29cf000003d9MotorPublicCal.obj (.text)003f2da8000003cbMotorSVC2.obj (.text)003f3173000003c5f_ui.obj (.text)003f35380000039bMotorSVC.obj (.text)003f38d30000036dMotorEncoder.obj (.text)003f3c4000000346f_modbus.obj (.text)003f3f860000032ff_invPara.obj (.text)003f42b500000300MotorPWM.obj (.text)003f45b5000002d5f_fcDeal.obj (.text)003f488a0000028cMotorSpeedCheck.obj (.text)003f4b160000024bf_dspcan.obj (.text)003f4d610000022fSubPrg.obj (.text)003f4f9000000211f_p2p.obj (.text)003f51a1000001aff_plc.obj (.text)003f535000000172f_torqueCtrl.obj (.text)003f54c200000153mainInit_2803x.obj (.text)003f561500000120MotorCurrentTransform.obj (.text)003f57350000010bMotorParEst.obj (.text)003f584000000107rts2800_ml.lib : ll_div.obj (.text)003f5947000000f9MotorInfoCollect.obj (.text)003f5a40000000eff_CANlinkEx.obj (.text)003f5b2f000000c5f_vf.obj (.text)003f5bf400000091ASMSubPrg.obj (.text)003f5c850000008cmain.obj (.text:retain)003f5d110000008bMotorImParEst.obj (.text:retain)003f5d9c0000008af_osc.obj (.text:retain)003f5e2600000074f_dspcan.obj (.text:retain)003f5e9a0000006cf_motorFc.obj (.text)003f5f0600000061main.obj (.text)003f5f670000005arts2800_ml.lib : fs_mpy.obj (.text)003f5fc100000044DSP2803x_CpuTimers.obj (.text)003f600500000044rts2800_ml.lib : boot.obj (.text)003f604900000043f_common.obj (.text)003f608c0000002ef_comm.obj (.text:retain)003f60ba0000002arts2800_ml.lib : l_div.obj (.text)003f60e400000029: fs_tol.obj (.text)003f610d00000026DSP2803x_CodeStartBranch.obj (.text)003f613300000022rts2800_ml.lib : i_div.obj (.text)003f61550000001e: ll_cmp.obj (.text)003f617300000019: args_main.obj (.text)003f618c00000019: exit.obj (.text)003f61a500000014: ll_mpy.obj (.text)003f61b90000000b: u_div.obj (.text)003f61c400000009: _lock.obj (.text)003f61cd00000008mainInit_2803x.obj (.text:retain)

ramfuncs0003f61d60000001dRUN ADDR = 00008000003f61d600000019mainInit_2803x.obj (ramfuncs)003f61ef00000004DSP2803x_usDelay.obj (ramfuncs)

.cinit0003f61f30000027c003f61f300000051MotorPWM.obj (.cinit)003f624400000049f_runSrc_accDecFrq.obj (.cinit)003f628d00000035f_osc.obj (.cinit)003f62c200000032f_io.obj (.cinit)003f62f400000020f_frqSrc_pid.obj (.cinit)003f63140000001cf_plc.obj (.cinit)003f63300000001af_interface.obj (.cinit)003f634a00000019MotorSVC.obj (.cinit)003f636300000019f_ui.obj (.cinit)003f637c00000017f_CANlinkEx.obj (.cinit)003f639300000014f_modbus.obj (.cinit)003f63a700000013f_canlink.obj (.cinit)003f63ba00000011MotorInvProtect.obj (.cinit)003f63cb00000010MotorDataExchange.obj (.cinit)003f63db00000010f_main.obj (.cinit)003f63eb0000000ff_invPara.obj (.cinit)003f63fa0000000cf_dspcan.obj (.cinit)003f64060000000cf_runSrc.obj (.cinit)003f64120000000arts2800_ml.lib : exit.obj (.cinit)003f641c00000008MotorVCMain.obj (.cinit)003f642400000008f_comm.obj (.cinit)003f642c00000008f_eeprom.obj (.cinit)003f643400000008f_error.obj (.cinit)003f643c00000005rts2800_ml.lib : _lock.obj (.cinit:__lock)003f644100000005: _lock.obj (.cinit:__unlock)003f644600000005f_menu.obj (.cinit)003f644b00000005f_torqueCtrl.obj (.cinit)003f645000000005f_vf.obj (.cinit)003f645500000004MotorDebug.obj (.cinit)003f645900000004MotorEncoder.obj (.cinit)003f645d00000004MotorMain.obj (.cinit)003f646100000004f_fcDeal.obj (.cinit)003f646500000004f_frqSrc.obj (.cinit)003f646900000004f_p2p.obj (.cinit)003f646d00000002–HOLE– [fill = 0]

.pinit0003e800000000000UNINITIALIZED

.econst00000000000002098FAILED TO ALLOCATE
.ovly0003f64700000000a003f64700000000a(.ovly:_prginRAM)

csm_rsvd0003f7f8000000076003f7f8000000076DSP2803x_CSMPasswords.obj (csm_rsvd)

,

Jun Zhang4:

钱包里的钱不够怎么办? 去挣更多的钱(换一颗flash更大的芯片)或是尽量少用钱(删除不需要的代码,代码优化),还能怎么办?

,

Susan Yang:

谢谢Jun Zhang4 的回复。

@shaowen li 若是空间实在不够的话,请考虑换一颗芯片

另外建议点击右下角“使用高级编辑器编辑文本”来发送您的文件。

赞(0)
未经允许不得转载:TI中文支持网 » 编译错误-CMD配置
分享到: 更多 (0)