部分cmd文件
PAGE 1 : RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML2 : origin = 0x00A000, length = 0x001000 RAML3 : origin = 0x00B000, length = 0x001000 RAML4 : origin = 0x00C000, length = 0x001000 RAML5 : origin = 0x00D000, length = 0x001000 RAML6 : origin = 0x00E000, length = 0x001000 RAML7 : origin = 0x00F000, length = 0x001000 ZONE7B : origin = 0x20FC00, length = 0x000400 /* XINTF zone 7 – data space */
}
SECTIONS
{
/* Setup for "boot to SARAM" mode: The codestart section (found in DSP28_CodeStartBranch.asm)
re-directs execution to the start of user code. */
codestart : > BEGIN, PAGE = 0
ramfuncs : > RAML0, PAGE = 0 .text : > RAML1, PAGE = 0
.cinit : > RAML0, PAGE = 0
.pinit : > RAML0, PAGE = 0
.switch : > RAML0, PAGE = 0
.stack : > RAMM1, PAGE = 1
.ebss : > RAML2, PAGE = 1
.econst : > RAML3, PAGE = 1 .esysmem : > RAMM1, PAGE = 1
错误:
[Linking…] "D:\ccs4.12\ccsv4\tools\compiler\c2000\bin\cl2000" -@"Debug.lkf"
<Linking>
"D:\\CCStudio_v3.3\\MyProjects\\rfftadc\\cmd\\28335_RAM_lnk.cmd", line 134: error: run placement fails for object "RFFTdata2", size 0x2000 (page 1). Available
ranges:
RAML5 size: 0x1000 unused: 0x1000 max hole: 0x1000"D:\\CCStudio_v3.3\\MyProjects\\rfftadc\\cmd\\28335_RAM_lnk.cmd", line 136: error: run placement fails for object "RFFTdata4", size 0x2000 (page 1). Available
ranges:
RAML7 size: 0x1000 unused: 0x1000 max hole: 0x1000"D:\\CCStudio_v3.3\\MyProjects\\rfftadc\\cmd\\28335_RAM_lnk.cmd", line 135: error: run placement fails for object "RFFTdata3", size 0x1002 (page 1). Available
ranges:
RAML6 size: 0x1000 unused: 0x1000 max hole: 0x1000error: errors encountered during linking; "./Debug/FPU.out" not built
>> Compilation failure
Build Complete,
4 Errors, 0 Warnings, 0 Remarks.
部分源程序:
#define RFFT_STAGES 12
#define RFFT_SIZE (1 << RFFT_STAGES)
#pragma DATA_SECTION(RFFToutBuff,"RFFTdata2");float32 RFFToutBuff[RFFT_SIZE]; //Output of FFT here if RFFT_STAGES is EVEN
#pragma DATA_SECTION(RFFTmagBuff,"RFFTdata3");
float32 RFFTmagBuff[RFFT_SIZE/2+1]; //Additional Buffer used in Magnitude calc
#pragma DATA_SECTION(RFFTF32Coef,"RFFTdata4");
float32 RFFTF32Coef[RFFT_SIZE]; //Twiddle buffer
上面程序数组是4096啊,也就是4k,怎会超过0X00001000了
user4418123:
上面这个例程是TI自带的Test_FPU_RFFTF32_ADC,输入信号为signal文件,里面有4096个数。
部分cmd文件
PAGE 1 : RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML2 : origin = 0x00A000, length = 0x001000 RAML3 : origin = 0x00B000, length = 0x001000 RAML4 : origin = 0x00C000, length = 0x001000 RAML5 : origin = 0x00D000, length = 0x001000 RAML6 : origin = 0x00E000, length = 0x001000 RAML7 : origin = 0x00F000, length = 0x001000 ZONE7B : origin = 0x20FC00, length = 0x000400 /* XINTF zone 7 – data space */
}
SECTIONS
{
/* Setup for "boot to SARAM" mode: The codestart section (found in DSP28_CodeStartBranch.asm)
re-directs execution to the start of user code. */
codestart : > BEGIN, PAGE = 0
ramfuncs : > RAML0, PAGE = 0 .text : > RAML1, PAGE = 0
.cinit : > RAML0, PAGE = 0
.pinit : > RAML0, PAGE = 0
.switch : > RAML0, PAGE = 0
.stack : > RAMM1, PAGE = 1
.ebss : > RAML2, PAGE = 1
.econst : > RAML3, PAGE = 1 .esysmem : > RAMM1, PAGE = 1
错误:
[Linking…] "D:\ccs4.12\ccsv4\tools\compiler\c2000\bin\cl2000" -@"Debug.lkf"
<Linking>
"D:\\CCStudio_v3.3\\MyProjects\\rfftadc\\cmd\\28335_RAM_lnk.cmd", line 134: error: run placement fails for object "RFFTdata2", size 0x2000 (page 1). Available
ranges:
RAML5 size: 0x1000 unused: 0x1000 max hole: 0x1000"D:\\CCStudio_v3.3\\MyProjects\\rfftadc\\cmd\\28335_RAM_lnk.cmd", line 136: error: run placement fails for object "RFFTdata4", size 0x2000 (page 1). Available
ranges:
RAML7 size: 0x1000 unused: 0x1000 max hole: 0x1000"D:\\CCStudio_v3.3\\MyProjects\\rfftadc\\cmd\\28335_RAM_lnk.cmd", line 135: error: run placement fails for object "RFFTdata3", size 0x1002 (page 1). Available
ranges:
RAML6 size: 0x1000 unused: 0x1000 max hole: 0x1000error: errors encountered during linking; "./Debug/FPU.out" not built
>> Compilation failure
Build Complete,
4 Errors, 0 Warnings, 0 Remarks.
部分源程序:
#define RFFT_STAGES 12
#define RFFT_SIZE (1 << RFFT_STAGES)
#pragma DATA_SECTION(RFFToutBuff,"RFFTdata2");float32 RFFToutBuff[RFFT_SIZE]; //Output of FFT here if RFFT_STAGES is EVEN
#pragma DATA_SECTION(RFFTmagBuff,"RFFTdata3");
float32 RFFTmagBuff[RFFT_SIZE/2+1]; //Additional Buffer used in Magnitude calc
#pragma DATA_SECTION(RFFTF32Coef,"RFFTdata4");
float32 RFFTF32Coef[RFFT_SIZE]; //Twiddle buffer
上面程序数组是4096啊,也就是4k,怎会超过0X00001000了
Eric Ma:
定义的数组长度太大,对应的RAM放不下,可以把数组改小,或是把RAM合并弄成一大块。
你定义的是浮点型,相当于long,你改成int类型就没问题。
ERIC
部分cmd文件
PAGE 1 : RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML2 : origin = 0x00A000, length = 0x001000 RAML3 : origin = 0x00B000, length = 0x001000 RAML4 : origin = 0x00C000, length = 0x001000 RAML5 : origin = 0x00D000, length = 0x001000 RAML6 : origin = 0x00E000, length = 0x001000 RAML7 : origin = 0x00F000, length = 0x001000 ZONE7B : origin = 0x20FC00, length = 0x000400 /* XINTF zone 7 – data space */
}
SECTIONS
{
/* Setup for "boot to SARAM" mode: The codestart section (found in DSP28_CodeStartBranch.asm)
re-directs execution to the start of user code. */
codestart : > BEGIN, PAGE = 0
ramfuncs : > RAML0, PAGE = 0 .text : > RAML1, PAGE = 0
.cinit : > RAML0, PAGE = 0
.pinit : > RAML0, PAGE = 0
.switch : > RAML0, PAGE = 0
.stack : > RAMM1, PAGE = 1
.ebss : > RAML2, PAGE = 1
.econst : > RAML3, PAGE = 1 .esysmem : > RAMM1, PAGE = 1
错误:
[Linking…] "D:\ccs4.12\ccsv4\tools\compiler\c2000\bin\cl2000" -@"Debug.lkf"
<Linking>
"D:\\CCStudio_v3.3\\MyProjects\\rfftadc\\cmd\\28335_RAM_lnk.cmd", line 134: error: run placement fails for object "RFFTdata2", size 0x2000 (page 1). Available
ranges:
RAML5 size: 0x1000 unused: 0x1000 max hole: 0x1000"D:\\CCStudio_v3.3\\MyProjects\\rfftadc\\cmd\\28335_RAM_lnk.cmd", line 136: error: run placement fails for object "RFFTdata4", size 0x2000 (page 1). Available
ranges:
RAML7 size: 0x1000 unused: 0x1000 max hole: 0x1000"D:\\CCStudio_v3.3\\MyProjects\\rfftadc\\cmd\\28335_RAM_lnk.cmd", line 135: error: run placement fails for object "RFFTdata3", size 0x1002 (page 1). Available
ranges:
RAML6 size: 0x1000 unused: 0x1000 max hole: 0x1000error: errors encountered during linking; "./Debug/FPU.out" not built
>> Compilation failure
Build Complete,
4 Errors, 0 Warnings, 0 Remarks.
部分源程序:
#define RFFT_STAGES 12
#define RFFT_SIZE (1 << RFFT_STAGES)
#pragma DATA_SECTION(RFFToutBuff,"RFFTdata2");float32 RFFToutBuff[RFFT_SIZE]; //Output of FFT here if RFFT_STAGES is EVEN
#pragma DATA_SECTION(RFFTmagBuff,"RFFTdata3");
float32 RFFTmagBuff[RFFT_SIZE/2+1]; //Additional Buffer used in Magnitude calc
#pragma DATA_SECTION(RFFTF32Coef,"RFFTdata4");
float32 RFFTF32Coef[RFFT_SIZE]; //Twiddle buffer
上面程序数组是4096啊,也就是4k,怎会超过0X00001000了
Gavin J:
另外,你的RFFTdata2/ RFFTdata3/ RFFTdata4 是定义在那个RAMLx里呢?
如果是用的 RAML5 | RAML6 | RAML7方式定义的话,建议使用楼上的方法,定义一个长的RAM字段,例如: RAML5 : origin = 0x00D000, length = 0x003000
或者,把RFFTdata2/ RFFTdata3/ RFFTdata4 还是定义在RAML5 | RAML6 | RAML7段.但对应的数组定义需要分别放在不同的.c文件里。