我在一个c文件里的代码如果超过450行就会报错,报错后删除几行(并不一定是IQMATH语句)就没错了。错误信息、cmd代码和map文件如下,请帮我看看怎么出现这样的问题?
错误信息:#10099-D</a> program will not fit into available memory. run placement with alignment/blocking fails for section "IQmath" size 0x210 page 0. Available memory ranges: F2812_IQmath2.cmd
CMD代码:
/*
// TI File $Revision: /main/2 $
// Checkin $Date: April 28, 2005 15:19:56 $
//###########################################################################
//
// FILE: F2812.cmd
//
// TITLE: Linker Command File For F2812 Device
//
//###########################################################################
// $TI Release: DSP281x C/C++ Header Files V1.20 $
// $Release Date: July 27, 2009 $
//###########################################################################
*/
/* ======================================================
// For Code Composer Studio V2.2 and later
// —————————————
// In addition to this memory linker command file,
// add the header linker command file directly to the project.
// The header linker command file is required to link the
// peripheral structures to the proper locations within
// the memory map.
//
// The header linker files are found in <base>\DSP281x_Headers\cmd
//
// For BIOS applications add: DSP281x_Headers_nonBIOS.cmd
// For nonBIOS applications add: DSP281x_Headers_nonBIOS.cmd
========================================================= */
/* ======================================================
// For Code Composer Studio prior to V2.2
// ————————————–
// 1) Use one of the following -l statements to include the
// header linker command file in the project. The header linker
// file is required to link the peripheral structures to the proper
// locations within the memory map */
/* Uncomment this line to include file only for non-BIOS applications */
/* -l DSP281x_Headers_nonBIOS.cmd */
/* Uncomment this line to include file only for BIOS applications */
/* -l DSP281x_Headers_BIOS.cmd */
/* 2) In your project add the path to <base>\DSP281x_headers\cmd to the
library search path under project->build options, linker tab,
library search path (-i).
/*========================================================= */
/* Define the memory block start/length for the F2812
PAGE 0 will be used to organize program sections
PAGE 1 will be used to organize data sections
Notes:
Memory blocks on F2812 are uniform (ie same
physical memory) in both PAGE 0 and PAGE 1.
That is the same memory region should not be
defined for both PAGE 0 and PAGE 1.
Doing so will result in corruption of program
and/or data.
*/
-stack 0x400
MEMORY
{
PAGE 0: /* Program Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
ZONE0 : origin = 0x002000, length = 0x002000 /* XINTF zone 0 */
ZONE1 : origin = 0x004000, length = 0x002000 /* XINTF zone 1 */
RAML0 : origin = 0x008000, length = 0x001000 /* on-chip RAM block L0 */
ZONE2 : origin = 0x080000, length = 0x080000 /* XINTF zone 2 */
ZONE6 : origin = 0x100000, length = 0x080000 /* XINTF zone 6 */
OTP : origin = 0x3D7800, length = 0x000800 /* on-chip OTP */
FLASHJ : origin = 0x3D8000, length = 0x002000 /* on-chip FLASH */
FLASHI : origin = 0x3DA000, length = 0x002000 /* on-chip FLASH */
FLASHH : origin = 0x3DC000, length = 0x004000 /* on-chip FLASH */
FLASHG : origin = 0x3E0000, length = 0x004000 /* on-chip FLASH */
FLASHF : origin = 0x3E4000, length = 0x004000 /* on-chip FLASH */
FLASHD : origin = 0x3EC000, length = 0x004000 /* on-chip FLASH */
FLASHC : origin = 0x3F0000, length = 0x004000 /* on-chip FLASH */
FLASHA : origin = 0x3F6000, length = 0x001F80 /* 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 */
/* ZONE7 : origin = 0x3FC000, length = 0x003FC0 /* XINTF zone 7 available if MP/MCn=1 */
ROM : origin = 0x3FF000, length = 0x000FC0 /* Boot ROM available if MP/MCn=0 */ //?为了q格式把此行注释掉,不知是否有隐患
RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
PAGE 1 : /* Data Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
/* Registers remain on PAGE1 */
RAMM0 : origin = 0x000000, length = 0x000400 /* on-chip RAM block M0 */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML1 : origin = 0x009000, length = 0x001000 /* on-chip RAM block L1 */
FLASHB : origin = 0x3F4000, length = 0x002000 /* on-chip FLASH */
FLASHE : origin = 0x3E8000, length = 0x004000 /* on-chip FLASH */
RAMH0 : origin = 0x3F8000, 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
codestart : > BEGIN PAGE = 0
ramfuncs : LOAD = FLASHD,
RUN = RAML0, LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
csmpasswds : > CSM_PWL PAGE = 0
csm_rsvd : > CSM_RSVD PAGE = 0
/* Allocate uninitalized data sections: */
.stack : > RAMM0 PAGE = 1
.tired : > FLASHE PAGE = 1
.ebss : > RAML1 PAGE = 1
.esysmem : > RAMH0 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// IQmath : > FLASHC /* Math Code */ //?为了q格式把此行注释掉,不知是否有隐患
/* Allocate IQ math areas:*/
IQmath : LOAD = FLASHC,
RUN = RAML0,
LOAD_START(_IQmathLoadStart),
LOAD_END(_IQmathLoadEnd),
RUN_START(_IQmathRunStart),
PAGE = 0
IQmathTables : > ROM PAGE = 0, TYPE = NOLOAD /* Math Tables In ROM */ //?为了q格式把此行注释掉,不知是否有隐患
/* .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
}
MAP文件:
SECTION ALLOCATION MAP
output attributes/
section page origin length input sections
——– —- ———- ———- —————-
.pinit 0 003f6000 00000000 UNINITIALIZED
ramfuncs 0 003ec000 00000dfb RUN ADDR = 00008000
003ec000 000005f1 DSP281x_Ev.obj (ramfuncs)
003ec5f1 0000040c Max_SVPWM.obj (ramfuncs)
003ec9fd 000001b2 DSP281x_Adc.obj (ramfuncs:retain)
003ecbaf 00000087 DSP281x_ECan.obj (ramfuncs)
003ecc36 0000006c DSP281x_Ev.obj (ramfuncs:retain)
003ecca2 00000063 DSP281x_Adc.obj (ramfuncs)
003ecd05 0000004e DSP281x_Spi.obj (ramfuncs)
003ecd53 00000047 DSP281x_Spi.obj (ramfuncs:retain)
003ecd9a 00000034 Max_RDCProcess.obj (ramfuncs)
003ecdce 00000017 DSP281x_SysCtrl.obj (ramfuncs)
003ecde5 00000012 4iQmath.obj (ramfuncs:retain)
003ecdf7 00000004 DSP281x_usDelay.obj (ramfuncs)
IQmath 0 003f0000 00000210 FAILED TO ALLOCATE
.text 0 003f6000 00000d0a 003f6000 000001e5 DSP281x_ECan.obj (.text)
003f61e5 00000162 Max_Vehicle_Simulation.obj (.text)
003f6347 0000015c DSP281x_ECan.obj (.text:retain)
003f64a3 0000014e DSP281x_DefaultIsr.obj (.text:retain)
003f65f1 00000121 4iQmath.obj (.text)
003f6712 000000b5 DSP281x_Gpio.obj (.text)
003f67c7 0000008c DSP281x_Adc.obj (.text)
003f6853 0000008c Max_LPF_1order_F.obj (.text)
003f68df 00000083 rts2800_ml.lib : fd_mpy.obj (.text)
003f6962 0000007b DSP281x_SysCtrl.obj (.text)
003f69dd 00000078 DSP281x_Xintf.obj (.text)
003f6a55 00000075 DSP281x_CpuTimers.obj (.text)
003f6aca 0000005e DSP281x_Ev.obj (.text)
003f6b28 0000005a rts2800_ml.lib : fs_mpy.obj (.text)
003f6b82 00000044 : boot.obj (.text)
003f6bc6 0000002a : l_div.obj (.text)
003f6bf0 00000029 : fs_tol.obj (.text)
003f6c19 00000028 DSP281x_PieCtrl.obj (.text)
003f6c41 00000020 DSP281x_PieVect.obj (.text)
003f6c61 0000001f rts2800_ml.lib : fd_tol.obj (.text)
003f6c80 00000019 DSP281x_Spi.obj (.text)
003f6c99 00000019 rts2800_ml.lib : args_main.obj (.text)
003f6cb2 00000019 : exit.obj (.text)
003f6ccb 00000017 : u_tofd.obj (.text)
003f6ce2 00000015 DSP281x_MemCopy.obj (.text)
003f6cf7 00000009 rts2800_ml.lib : _lock.obj (.text)
003f6d00 00000008 DSP281x_CodeStartBranch.obj (.text)
003f6d08 00000001 DSP281x_Sci.obj (.text)
003f6d09 00000001 DSP281x_XIntrupt.obj (.text)
.cinit 0 003f6d0a 00000484 003f6d0a 00000214 DSP281x_Adc.obj (.cinit)
003f6f1e 000001a3 DSP281x_Ev.obj (.cinit)
003f70c1 0000005e Max_Vehicle_Simulation.obj (.cinit)
003f711f 0000001d 4iQmath.obj (.cinit)
003f713c 00000019 Max_SVPWM.obj (.cinit)
003f7155 00000017 DSP281x_ECan.obj (.cinit)
003f716c 0000000c Max_RDCProcess.obj (.cinit)
003f7178 0000000a rts2800_ml.lib : _lock.obj (.cinit)
003f7182 0000000a : exit.obj (.cinit)
003f718c 00000002 –HOLE– [fill = 0]
.econst 0 003f718e 0000010c 003f718e 00000100 DSP281x_PieVect.obj (.econst)
003f728e 00000006 Max_SVPWM.obj (.econst)
003f7294 00000004 DSP281x_Ev.obj (.econst)
003f7298 00000002 4iQmath.obj (.econst)
.switch 0 003f729a 00000028 003f729a 00000028 DSP281x_Ev.obj (.switch:_SpeedLoop)
csm_rsvd 0 003f7f80 00000076 003f7f80 00000076 DSP281x_CSMPasswords.obj (csm_rsvd)
codestart* 0 003f7ff6 00000002 003f7ff6 00000002 DSP281x_CodeStartBranch.obj (codestart)
csmpasswds* 0 003f7ff8 00000008 003f7ff8 00000008 DSP281x_CSMPasswords.obj (csmpasswds)
IQmathTables* 0 003ff000 00000b50 NOLOAD SECTION
003ff000 00000b50 IQmath.lib : IQmathTables.obj (IQmathTables)
.reset 0 003fffc0 00000002 DSECT
003fffc0 00000002 rts2800_ml.lib : boot.obj (.reset)
vectors 0 003fffc2 00000000 DSECT
.stack 1 00000000 00000400 UNINITIALIZED
00000000 00000400 –HOLE–
Seven Han:
请参考以下wiki:
http://processors.wiki.ti.com/index.php/C28x_Compiler_-_Understanding_Linking#Q:_The_linker_says_.22placement_fails_for_object_.27.text.27_.22._How_can_I_make_more_memory_available_for_.text.3F
我在一个c文件里的代码如果超过450行就会报错,报错后删除几行(并不一定是IQMATH语句)就没错了。错误信息、cmd代码和map文件如下,请帮我看看怎么出现这样的问题?
错误信息:#10099-D</a> program will not fit into available memory. run placement with alignment/blocking fails for section "IQmath" size 0x210 page 0. Available memory ranges: F2812_IQmath2.cmd
CMD代码:
/*
// TI File $Revision: /main/2 $
// Checkin $Date: April 28, 2005 15:19:56 $
//###########################################################################
//
// FILE: F2812.cmd
//
// TITLE: Linker Command File For F2812 Device
//
//###########################################################################
// $TI Release: DSP281x C/C++ Header Files V1.20 $
// $Release Date: July 27, 2009 $
//###########################################################################
*/
/* ======================================================
// For Code Composer Studio V2.2 and later
// —————————————
// In addition to this memory linker command file,
// add the header linker command file directly to the project.
// The header linker command file is required to link the
// peripheral structures to the proper locations within
// the memory map.
//
// The header linker files are found in <base>\DSP281x_Headers\cmd
//
// For BIOS applications add: DSP281x_Headers_nonBIOS.cmd
// For nonBIOS applications add: DSP281x_Headers_nonBIOS.cmd
========================================================= */
/* ======================================================
// For Code Composer Studio prior to V2.2
// ————————————–
// 1) Use one of the following -l statements to include the
// header linker command file in the project. The header linker
// file is required to link the peripheral structures to the proper
// locations within the memory map */
/* Uncomment this line to include file only for non-BIOS applications */
/* -l DSP281x_Headers_nonBIOS.cmd */
/* Uncomment this line to include file only for BIOS applications */
/* -l DSP281x_Headers_BIOS.cmd */
/* 2) In your project add the path to <base>\DSP281x_headers\cmd to the
library search path under project->build options, linker tab,
library search path (-i).
/*========================================================= */
/* Define the memory block start/length for the F2812
PAGE 0 will be used to organize program sections
PAGE 1 will be used to organize data sections
Notes:
Memory blocks on F2812 are uniform (ie same
physical memory) in both PAGE 0 and PAGE 1.
That is the same memory region should not be
defined for both PAGE 0 and PAGE 1.
Doing so will result in corruption of program
and/or data.
*/
-stack 0x400
MEMORY
{
PAGE 0: /* Program Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
ZONE0 : origin = 0x002000, length = 0x002000 /* XINTF zone 0 */
ZONE1 : origin = 0x004000, length = 0x002000 /* XINTF zone 1 */
RAML0 : origin = 0x008000, length = 0x001000 /* on-chip RAM block L0 */
ZONE2 : origin = 0x080000, length = 0x080000 /* XINTF zone 2 */
ZONE6 : origin = 0x100000, length = 0x080000 /* XINTF zone 6 */
OTP : origin = 0x3D7800, length = 0x000800 /* on-chip OTP */
FLASHJ : origin = 0x3D8000, length = 0x002000 /* on-chip FLASH */
FLASHI : origin = 0x3DA000, length = 0x002000 /* on-chip FLASH */
FLASHH : origin = 0x3DC000, length = 0x004000 /* on-chip FLASH */
FLASHG : origin = 0x3E0000, length = 0x004000 /* on-chip FLASH */
FLASHF : origin = 0x3E4000, length = 0x004000 /* on-chip FLASH */
FLASHD : origin = 0x3EC000, length = 0x004000 /* on-chip FLASH */
FLASHC : origin = 0x3F0000, length = 0x004000 /* on-chip FLASH */
FLASHA : origin = 0x3F6000, length = 0x001F80 /* 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 */
/* ZONE7 : origin = 0x3FC000, length = 0x003FC0 /* XINTF zone 7 available if MP/MCn=1 */
ROM : origin = 0x3FF000, length = 0x000FC0 /* Boot ROM available if MP/MCn=0 */ //?为了q格式把此行注释掉,不知是否有隐患
RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
PAGE 1 : /* Data Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
/* Registers remain on PAGE1 */
RAMM0 : origin = 0x000000, length = 0x000400 /* on-chip RAM block M0 */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML1 : origin = 0x009000, length = 0x001000 /* on-chip RAM block L1 */
FLASHB : origin = 0x3F4000, length = 0x002000 /* on-chip FLASH */
FLASHE : origin = 0x3E8000, length = 0x004000 /* on-chip FLASH */
RAMH0 : origin = 0x3F8000, 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
codestart : > BEGIN PAGE = 0
ramfuncs : LOAD = FLASHD,
RUN = RAML0, LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
csmpasswds : > CSM_PWL PAGE = 0
csm_rsvd : > CSM_RSVD PAGE = 0
/* Allocate uninitalized data sections: */
.stack : > RAMM0 PAGE = 1
.tired : > FLASHE PAGE = 1
.ebss : > RAML1 PAGE = 1
.esysmem : > RAMH0 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// IQmath : > FLASHC /* Math Code */ //?为了q格式把此行注释掉,不知是否有隐患
/* Allocate IQ math areas:*/
IQmath : LOAD = FLASHC,
RUN = RAML0,
LOAD_START(_IQmathLoadStart),
LOAD_END(_IQmathLoadEnd),
RUN_START(_IQmathRunStart),
PAGE = 0
IQmathTables : > ROM PAGE = 0, TYPE = NOLOAD /* Math Tables In ROM */ //?为了q格式把此行注释掉,不知是否有隐患
/* .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
}
MAP文件:
SECTION ALLOCATION MAP
output attributes/
section page origin length input sections
——– —- ———- ———- —————-
.pinit 0 003f6000 00000000 UNINITIALIZED
ramfuncs 0 003ec000 00000dfb RUN ADDR = 00008000
003ec000 000005f1 DSP281x_Ev.obj (ramfuncs)
003ec5f1 0000040c Max_SVPWM.obj (ramfuncs)
003ec9fd 000001b2 DSP281x_Adc.obj (ramfuncs:retain)
003ecbaf 00000087 DSP281x_ECan.obj (ramfuncs)
003ecc36 0000006c DSP281x_Ev.obj (ramfuncs:retain)
003ecca2 00000063 DSP281x_Adc.obj (ramfuncs)
003ecd05 0000004e DSP281x_Spi.obj (ramfuncs)
003ecd53 00000047 DSP281x_Spi.obj (ramfuncs:retain)
003ecd9a 00000034 Max_RDCProcess.obj (ramfuncs)
003ecdce 00000017 DSP281x_SysCtrl.obj (ramfuncs)
003ecde5 00000012 4iQmath.obj (ramfuncs:retain)
003ecdf7 00000004 DSP281x_usDelay.obj (ramfuncs)
IQmath 0 003f0000 00000210 FAILED TO ALLOCATE
.text 0 003f6000 00000d0a 003f6000 000001e5 DSP281x_ECan.obj (.text)
003f61e5 00000162 Max_Vehicle_Simulation.obj (.text)
003f6347 0000015c DSP281x_ECan.obj (.text:retain)
003f64a3 0000014e DSP281x_DefaultIsr.obj (.text:retain)
003f65f1 00000121 4iQmath.obj (.text)
003f6712 000000b5 DSP281x_Gpio.obj (.text)
003f67c7 0000008c DSP281x_Adc.obj (.text)
003f6853 0000008c Max_LPF_1order_F.obj (.text)
003f68df 00000083 rts2800_ml.lib : fd_mpy.obj (.text)
003f6962 0000007b DSP281x_SysCtrl.obj (.text)
003f69dd 00000078 DSP281x_Xintf.obj (.text)
003f6a55 00000075 DSP281x_CpuTimers.obj (.text)
003f6aca 0000005e DSP281x_Ev.obj (.text)
003f6b28 0000005a rts2800_ml.lib : fs_mpy.obj (.text)
003f6b82 00000044 : boot.obj (.text)
003f6bc6 0000002a : l_div.obj (.text)
003f6bf0 00000029 : fs_tol.obj (.text)
003f6c19 00000028 DSP281x_PieCtrl.obj (.text)
003f6c41 00000020 DSP281x_PieVect.obj (.text)
003f6c61 0000001f rts2800_ml.lib : fd_tol.obj (.text)
003f6c80 00000019 DSP281x_Spi.obj (.text)
003f6c99 00000019 rts2800_ml.lib : args_main.obj (.text)
003f6cb2 00000019 : exit.obj (.text)
003f6ccb 00000017 : u_tofd.obj (.text)
003f6ce2 00000015 DSP281x_MemCopy.obj (.text)
003f6cf7 00000009 rts2800_ml.lib : _lock.obj (.text)
003f6d00 00000008 DSP281x_CodeStartBranch.obj (.text)
003f6d08 00000001 DSP281x_Sci.obj (.text)
003f6d09 00000001 DSP281x_XIntrupt.obj (.text)
.cinit 0 003f6d0a 00000484 003f6d0a 00000214 DSP281x_Adc.obj (.cinit)
003f6f1e 000001a3 DSP281x_Ev.obj (.cinit)
003f70c1 0000005e Max_Vehicle_Simulation.obj (.cinit)
003f711f 0000001d 4iQmath.obj (.cinit)
003f713c 00000019 Max_SVPWM.obj (.cinit)
003f7155 00000017 DSP281x_ECan.obj (.cinit)
003f716c 0000000c Max_RDCProcess.obj (.cinit)
003f7178 0000000a rts2800_ml.lib : _lock.obj (.cinit)
003f7182 0000000a : exit.obj (.cinit)
003f718c 00000002 –HOLE– [fill = 0]
.econst 0 003f718e 0000010c 003f718e 00000100 DSP281x_PieVect.obj (.econst)
003f728e 00000006 Max_SVPWM.obj (.econst)
003f7294 00000004 DSP281x_Ev.obj (.econst)
003f7298 00000002 4iQmath.obj (.econst)
.switch 0 003f729a 00000028 003f729a 00000028 DSP281x_Ev.obj (.switch:_SpeedLoop)
csm_rsvd 0 003f7f80 00000076 003f7f80 00000076 DSP281x_CSMPasswords.obj (csm_rsvd)
codestart* 0 003f7ff6 00000002 003f7ff6 00000002 DSP281x_CodeStartBranch.obj (codestart)
csmpasswds* 0 003f7ff8 00000008 003f7ff8 00000008 DSP281x_CSMPasswords.obj (csmpasswds)
IQmathTables* 0 003ff000 00000b50 NOLOAD SECTION
003ff000 00000b50 IQmath.lib : IQmathTables.obj (IQmathTables)
.reset 0 003fffc0 00000002 DSECT
003fffc0 00000002 rts2800_ml.lib : boot.obj (.reset)
vectors 0 003fffc2 00000000 DSECT
.stack 1 00000000 00000400 UNINITIALIZED
00000000 00000400 –HOLE–
user4415751:
回复 Seven Han:
您是说我给.text分配的空间不足么?
我在一个c文件里的代码如果超过450行就会报错,报错后删除几行(并不一定是IQMATH语句)就没错了。错误信息、cmd代码和map文件如下,请帮我看看怎么出现这样的问题?
错误信息:#10099-D</a> program will not fit into available memory. run placement with alignment/blocking fails for section "IQmath" size 0x210 page 0. Available memory ranges: F2812_IQmath2.cmd
CMD代码:
/*
// TI File $Revision: /main/2 $
// Checkin $Date: April 28, 2005 15:19:56 $
//###########################################################################
//
// FILE: F2812.cmd
//
// TITLE: Linker Command File For F2812 Device
//
//###########################################################################
// $TI Release: DSP281x C/C++ Header Files V1.20 $
// $Release Date: July 27, 2009 $
//###########################################################################
*/
/* ======================================================
// For Code Composer Studio V2.2 and later
// —————————————
// In addition to this memory linker command file,
// add the header linker command file directly to the project.
// The header linker command file is required to link the
// peripheral structures to the proper locations within
// the memory map.
//
// The header linker files are found in <base>\DSP281x_Headers\cmd
//
// For BIOS applications add: DSP281x_Headers_nonBIOS.cmd
// For nonBIOS applications add: DSP281x_Headers_nonBIOS.cmd
========================================================= */
/* ======================================================
// For Code Composer Studio prior to V2.2
// ————————————–
// 1) Use one of the following -l statements to include the
// header linker command file in the project. The header linker
// file is required to link the peripheral structures to the proper
// locations within the memory map */
/* Uncomment this line to include file only for non-BIOS applications */
/* -l DSP281x_Headers_nonBIOS.cmd */
/* Uncomment this line to include file only for BIOS applications */
/* -l DSP281x_Headers_BIOS.cmd */
/* 2) In your project add the path to <base>\DSP281x_headers\cmd to the
library search path under project->build options, linker tab,
library search path (-i).
/*========================================================= */
/* Define the memory block start/length for the F2812
PAGE 0 will be used to organize program sections
PAGE 1 will be used to organize data sections
Notes:
Memory blocks on F2812 are uniform (ie same
physical memory) in both PAGE 0 and PAGE 1.
That is the same memory region should not be
defined for both PAGE 0 and PAGE 1.
Doing so will result in corruption of program
and/or data.
*/
-stack 0x400
MEMORY
{
PAGE 0: /* Program Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
ZONE0 : origin = 0x002000, length = 0x002000 /* XINTF zone 0 */
ZONE1 : origin = 0x004000, length = 0x002000 /* XINTF zone 1 */
RAML0 : origin = 0x008000, length = 0x001000 /* on-chip RAM block L0 */
ZONE2 : origin = 0x080000, length = 0x080000 /* XINTF zone 2 */
ZONE6 : origin = 0x100000, length = 0x080000 /* XINTF zone 6 */
OTP : origin = 0x3D7800, length = 0x000800 /* on-chip OTP */
FLASHJ : origin = 0x3D8000, length = 0x002000 /* on-chip FLASH */
FLASHI : origin = 0x3DA000, length = 0x002000 /* on-chip FLASH */
FLASHH : origin = 0x3DC000, length = 0x004000 /* on-chip FLASH */
FLASHG : origin = 0x3E0000, length = 0x004000 /* on-chip FLASH */
FLASHF : origin = 0x3E4000, length = 0x004000 /* on-chip FLASH */
FLASHD : origin = 0x3EC000, length = 0x004000 /* on-chip FLASH */
FLASHC : origin = 0x3F0000, length = 0x004000 /* on-chip FLASH */
FLASHA : origin = 0x3F6000, length = 0x001F80 /* 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 */
/* ZONE7 : origin = 0x3FC000, length = 0x003FC0 /* XINTF zone 7 available if MP/MCn=1 */
ROM : origin = 0x3FF000, length = 0x000FC0 /* Boot ROM available if MP/MCn=0 */ //?为了q格式把此行注释掉,不知是否有隐患
RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
PAGE 1 : /* Data Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
/* Registers remain on PAGE1 */
RAMM0 : origin = 0x000000, length = 0x000400 /* on-chip RAM block M0 */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML1 : origin = 0x009000, length = 0x001000 /* on-chip RAM block L1 */
FLASHB : origin = 0x3F4000, length = 0x002000 /* on-chip FLASH */
FLASHE : origin = 0x3E8000, length = 0x004000 /* on-chip FLASH */
RAMH0 : origin = 0x3F8000, 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
codestart : > BEGIN PAGE = 0
ramfuncs : LOAD = FLASHD,
RUN = RAML0, LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
csmpasswds : > CSM_PWL PAGE = 0
csm_rsvd : > CSM_RSVD PAGE = 0
/* Allocate uninitalized data sections: */
.stack : > RAMM0 PAGE = 1
.tired : > FLASHE PAGE = 1
.ebss : > RAML1 PAGE = 1
.esysmem : > RAMH0 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// IQmath : > FLASHC /* Math Code */ //?为了q格式把此行注释掉,不知是否有隐患
/* Allocate IQ math areas:*/
IQmath : LOAD = FLASHC,
RUN = RAML0,
LOAD_START(_IQmathLoadStart),
LOAD_END(_IQmathLoadEnd),
RUN_START(_IQmathRunStart),
PAGE = 0
IQmathTables : > ROM PAGE = 0, TYPE = NOLOAD /* Math Tables In ROM */ //?为了q格式把此行注释掉,不知是否有隐患
/* .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
}
MAP文件:
SECTION ALLOCATION MAP
output attributes/
section page origin length input sections
——– —- ———- ———- —————-
.pinit 0 003f6000 00000000 UNINITIALIZED
ramfuncs 0 003ec000 00000dfb RUN ADDR = 00008000
003ec000 000005f1 DSP281x_Ev.obj (ramfuncs)
003ec5f1 0000040c Max_SVPWM.obj (ramfuncs)
003ec9fd 000001b2 DSP281x_Adc.obj (ramfuncs:retain)
003ecbaf 00000087 DSP281x_ECan.obj (ramfuncs)
003ecc36 0000006c DSP281x_Ev.obj (ramfuncs:retain)
003ecca2 00000063 DSP281x_Adc.obj (ramfuncs)
003ecd05 0000004e DSP281x_Spi.obj (ramfuncs)
003ecd53 00000047 DSP281x_Spi.obj (ramfuncs:retain)
003ecd9a 00000034 Max_RDCProcess.obj (ramfuncs)
003ecdce 00000017 DSP281x_SysCtrl.obj (ramfuncs)
003ecde5 00000012 4iQmath.obj (ramfuncs:retain)
003ecdf7 00000004 DSP281x_usDelay.obj (ramfuncs)
IQmath 0 003f0000 00000210 FAILED TO ALLOCATE
.text 0 003f6000 00000d0a 003f6000 000001e5 DSP281x_ECan.obj (.text)
003f61e5 00000162 Max_Vehicle_Simulation.obj (.text)
003f6347 0000015c DSP281x_ECan.obj (.text:retain)
003f64a3 0000014e DSP281x_DefaultIsr.obj (.text:retain)
003f65f1 00000121 4iQmath.obj (.text)
003f6712 000000b5 DSP281x_Gpio.obj (.text)
003f67c7 0000008c DSP281x_Adc.obj (.text)
003f6853 0000008c Max_LPF_1order_F.obj (.text)
003f68df 00000083 rts2800_ml.lib : fd_mpy.obj (.text)
003f6962 0000007b DSP281x_SysCtrl.obj (.text)
003f69dd 00000078 DSP281x_Xintf.obj (.text)
003f6a55 00000075 DSP281x_CpuTimers.obj (.text)
003f6aca 0000005e DSP281x_Ev.obj (.text)
003f6b28 0000005a rts2800_ml.lib : fs_mpy.obj (.text)
003f6b82 00000044 : boot.obj (.text)
003f6bc6 0000002a : l_div.obj (.text)
003f6bf0 00000029 : fs_tol.obj (.text)
003f6c19 00000028 DSP281x_PieCtrl.obj (.text)
003f6c41 00000020 DSP281x_PieVect.obj (.text)
003f6c61 0000001f rts2800_ml.lib : fd_tol.obj (.text)
003f6c80 00000019 DSP281x_Spi.obj (.text)
003f6c99 00000019 rts2800_ml.lib : args_main.obj (.text)
003f6cb2 00000019 : exit.obj (.text)
003f6ccb 00000017 : u_tofd.obj (.text)
003f6ce2 00000015 DSP281x_MemCopy.obj (.text)
003f6cf7 00000009 rts2800_ml.lib : _lock.obj (.text)
003f6d00 00000008 DSP281x_CodeStartBranch.obj (.text)
003f6d08 00000001 DSP281x_Sci.obj (.text)
003f6d09 00000001 DSP281x_XIntrupt.obj (.text)
.cinit 0 003f6d0a 00000484 003f6d0a 00000214 DSP281x_Adc.obj (.cinit)
003f6f1e 000001a3 DSP281x_Ev.obj (.cinit)
003f70c1 0000005e Max_Vehicle_Simulation.obj (.cinit)
003f711f 0000001d 4iQmath.obj (.cinit)
003f713c 00000019 Max_SVPWM.obj (.cinit)
003f7155 00000017 DSP281x_ECan.obj (.cinit)
003f716c 0000000c Max_RDCProcess.obj (.cinit)
003f7178 0000000a rts2800_ml.lib : _lock.obj (.cinit)
003f7182 0000000a : exit.obj (.cinit)
003f718c 00000002 –HOLE– [fill = 0]
.econst 0 003f718e 0000010c 003f718e 00000100 DSP281x_PieVect.obj (.econst)
003f728e 00000006 Max_SVPWM.obj (.econst)
003f7294 00000004 DSP281x_Ev.obj (.econst)
003f7298 00000002 4iQmath.obj (.econst)
.switch 0 003f729a 00000028 003f729a 00000028 DSP281x_Ev.obj (.switch:_SpeedLoop)
csm_rsvd 0 003f7f80 00000076 003f7f80 00000076 DSP281x_CSMPasswords.obj (csm_rsvd)
codestart* 0 003f7ff6 00000002 003f7ff6 00000002 DSP281x_CodeStartBranch.obj (codestart)
csmpasswds* 0 003f7ff8 00000008 003f7ff8 00000008 DSP281x_CSMPasswords.obj (csmpasswds)
IQmathTables* 0 003ff000 00000b50 NOLOAD SECTION
003ff000 00000b50 IQmath.lib : IQmathTables.obj (IQmathTables)
.reset 0 003fffc0 00000002 DSECT
003fffc0 00000002 rts2800_ml.lib : boot.obj (.reset)
vectors 0 003fffc2 00000000 DSECT
.stack 1 00000000 00000400 UNINITIALIZED
00000000 00000400 –HOLE–
user4415751:
回复 Seven Han:
您是指我给.text分配的空间不足么?