|
| View previous topic :: View next topic |
| Author |
Message |
tejpratap
Joined: 22 Feb 2009 Posts: 20 Location: Bangalore/India
|
Posted: Tue May 12, 2009 3:22 am Post subject: memory allocation problem during code compilation/linking |
|
|
Dear Sir,
I am using modified Asnap.pjt for the analog signals' capture and their playback . I compiled the target(SBC6713e-board) side code and I am getting the following error:
(1)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-------------------- 30_11_09_VII_1_05_05_09.pjt - Debug --------------------
[Common.CDB] "J:\CCStudio_v3.1\plugins\bios\gconfgen" Common.CDB
[30_11_09_VII_1_05_05_09.cpp] "J:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"../Examples.opt" -fr"./Debug" -d"_DEBUG" -@"Debug.lkf" "30_11_09_VII_1_05_05_09.cpp"
"30_11_09_VII_1_05_05_09.cpp", line 844: warning: variable "SampleRate" was declared but never referenced
"30_11_09_VII_1_05_05_09.cpp", line 845: warning: variable "WaveformFrequency" was declared but never referenced
"30_11_09_VII_1_05_05_09.cpp", line 1083: warning: nested comment is not allowed
"30_11_09_VII_1_05_05_09.cpp", line 1153: warning: variable "z" was declared but never referenced
[Commoncfg.s62] "J:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"../Examples.opt" -fr"./Debug" -d"_DEBUG" -@"../30_11_09_VII_1_05_05_09/Debug.lkf" "Commoncfg.s62"
[Commoncfg_c.c] "J:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"../Examples.opt" -fr"./Debug" -d"_DEBUG" -@"../30_11_09_VII_1_05_05_09/Debug.lkf" "Commoncfg_c.c"
[Linking...] "J:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"Debug.lkf"
<Linking>
>> error: can't allocate .far, size 0003175c (page 0) in SDRAM (avail:
00029260)
>> error: errors in input - ./Debug/30_11_09_VII_1_05_05_09.out not built
>> Compilation failure
Build Complete,
3 Errors, 4 Warnings, 0 Remarks.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This error is coming when I have declared an array of size 65536. I am not able to understand why the error is coming when the SBC6713e board has got 32MB of SDRAM. If page0 is not having that much space , it should go to the 2nd page for allocation. The size of the compiled target code is ~10MB(when I am not declaring any array).
(2)
Also in a different situation I am getting the following error:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
----------------------- 30_11_09_VII_1_II.pjt - Debug -----------------------
[Common.CDB] "J:\CCStudio_v3.1\plugins\bios\gconfgen" Common.CDB
[30_11_09_VII_1_II.cpp] "J:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"../Examples.opt" -fr"./Debug" -d"_DEBUG" -@"Debug.lkf" "30_11_09_VII_1_II.cpp"
"30_11_09_VII_1_II.cpp", line 796: warning: variable "SampleRate" was declared but never referenced
"30_11_09_VII_1_II.cpp", line 797: warning: variable "WaveformFrequency" was declared but never referenced
"30_11_09_VII_1_II.cpp", line 1030: warning: nested comment is not allowed
"30_11_09_VII_1_II.cpp", line 1099: warning: variable "z" was declared but never referenced
[Commoncfg.s62] "J:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"../Examples.opt" -fr"./Debug" -d"_DEBUG" -@"../30_11_09_VII_1_II/Debug.lkf" "Commoncfg.s62"
[Commoncfg_c.c] "J:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"../Examples.opt" -fr"./Debug" -d"_DEBUG" -@"../30_11_09_VII_1_II/Debug.lkf" "Commoncfg_c.c"
[Linking...] "J:\CCStudio_v3.1\C6000\cgtools\bin\cl6x" -@"Debug.lkf"
<Linking>
>> error: can't allocate .trace, size 0000c000 (page 0) in SDRAM (avail:
00009c30)
>> error: errors in input - ./Debug/30_11_09_VII_1_II.out not built
>> Compilation failure
Build Complete,
3 Errors, 4 Warnings, 0 Remarks.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The reason for this is not clear to me. as the size of SDRAM (32MB) is enough to accomodate this trace buffer.
I need your help in both these cases.
rgds tej _________________ tej pratap |
|
| Back to top |
|
 |
jhenderson Site Admin
Joined: 07 Mar 2006 Posts: 1177 Location: So. Cal. USA
|
Posted: Tue May 12, 2009 7:13 am Post subject: Compilation errors |
|
|
The TI compiler supports multiple memory models which offer a balance of code size/speed against flexibility. Some memory models restrict the index of arrays to just 65K, to allow generation of tighter, faster code. Try experimenting with the other models to avoid this restriction. Alternately, use operator new to allocate a large array and a pointer to iterate through it, to avoid the index restriction even when using the small memory models.
The Trace buffer size is controlled directly within the TCF/CDB in the System | MEM | SYS | Trace Buffer Size property. You must increase the trace buffer to suit your needs. However, the maximum size is restricted to 32K or 64K by CCS. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
© Copyright 2006-2008 Innovative Integration
Powered by phpBB © 2001, 2002 phpBB Group
Based on iCGstation v1.0 Template By Ray © 2003, 2004 iOptional
|
|
|