DSPRelated.com
Forums

C6713- Momory Allocation Probolem

Started by B S January 26, 2011
Hi,

Yes, I have 16 MEG SDRAM available and I added SDRAM IN MEMORY SECTION MANAGER
using DSP/BIOS.

Here attached snapshot to show all the settings I chosen for External Memory.
http://i53.tinypic.com/1z4vjo7.jpg

I used this line to define data_stats buffer in EXT RAM
#pragma DATA_SECTION(data_stats,".EXT_RAM")

When I build my project, I get following error.
warning: creating output section .EXT_RAM without SECTIONS specification

Even after this my program runs, it saved values in data_stats buffer but when I
write those values to .text file, it doesn't write any thing, text file is just
blank. What is wrong here ?
Richard, you said to modify memory map, via the config tool, to include the
available external RAM. I don't know how to di it. Is it causing trouble ?

Please help me.

________________________________
From: Richard Williams
To: B S ; c...
Sent: Fri, January 28, 2011 8:44:42 PM
Subject: Re: [c6x] C6713- Momory Allocation Probolem

B.S.

If your looking at the 6713 architecture manual (available for download at
TI.com) part number SPRS186L,pdf then you see, on page 16 the memory map and on
page 17 the various ways the 'IRAM' portion of the memory map can be allocated
as L2 cache+IRAM.

Your program, per the linker error messages is larger than the available IRAM.

I say again : Your program is TOO BIG for the size of the IRAM.

Does your development board have any external RAM implemented?

If yes, then modify the configuration file, using the config tool, and move the
data table to the external RAM. You will also have to modify the memory map,
via the config tool, to include the available external RAM.

If no, then you will have to implement some external RAM (via additional
hardware) and move the data table to the external RAM via the config tool.

BTW:
Turning the ""Enable Memory Maping" off is a bad idea as this stops the linker
from checking that the program will fit within the available RAM.

R. Williams

---------- Original Message -----------
From: B S
To: Richard Williams , c...
Sent: Fri, 28 Jan 2011 07:08:58 -0800 (PST)
Subject: Re: [c6x] C6713- Momory Allocation Probolem

> Hi Richard Williams,
>
> I have been looking at the DSP Architecture Manual.
>
> Here attached the cmd file.
>
> /* MODULE PARAMETERS */
> GBL_USERINITFXN = _FXN_F_nop;
>
> MEM_SEGZERO = IRAM;
> MEM_MALLOCSEG = IRAM;
>
> CLK_TIMEFXN = CLK_F_getshtime;
> CLK_HOOKFXN = HWI_F_dispatch;
>
> PRD_THOOKFXN = _KNL_tick;
>
> RTDX_DATAMEMSEG = IRAM;
>
> HST_DSMBUFSEG = IRAM;
>
> SWI_EHOOKFXN = GBL_NULL;
> SWI_IHOOKFXN = GBL_NULL;
> SWI_EXECFXN = SWI_F_iexec;
> SWI_RUNFXN = SWI_F_run;
>
> TSK_STACKSEG = IRAM;
> TSK_VCREATEFXN = _FXN_F_nop;
> TSK_VDELETEFXN = _FXN_F_nop;
> TSK_VEXITFXN = _FXN_F_nop;
>
> IDL_CALIBRFXN = IDL_F_stub;
>
> SYS_ABORTFXN = _UTL_doAbort;
> SYS_ERRORFXN = _UTL_doError;
> SYS_EXITFXN = _UTL_halt;
> SYS_PUTCFXN = _UTL_doPutc;
>
> GIO_CREATEFXN = _FXN_F_nop;
> GIO_DELETEFXN = _FXN_F_nop;
> GIO_PENDFXN = _FXN_F_nop;
> GIO_POSTFXN = _FXN_F_nop;
>
> /* OBJECT ALIASES */
> _IRAM = IRAM;
> _PRD_clock = PRD_clock;
> _RTA_fromHost = RTA_fromHost;
> _RTA_toHost = RTA_toHost;
> _HWI_RESET = HWI_RESET;
> _HWI_NMI = HWI_NMI;
> _HWI_RESERVED0 = HWI_RESERVED0;
> _HWI_RESERVED1 = HWI_RESERVED1;
> _HWI_INT4 = HWI_INT4;
> _HWI_INT5 = HWI_INT5;
> _HWI_INT6 = HWI_INT6;
> _HWI_INT7 = HWI_INT7;
> _HWI_INT8 = HWI_INT8;
> _HWI_INT9 = HWI_INT9;
> _HWI_INT10 = HWI_INT10;
> _HWI_INT11 = HWI_INT11;
> _HWI_INT12 = HWI_INT12;
> _HWI_INT13 = HWI_INT13;
> _HWI_INT14 = HWI_INT14;
> _HWI_INT15 = HWI_INT15;
> _KNL_swi = KNL_swi;
> _TSK_idle = TSK_idle;
> _LNK_dataPump = LNK_dataPump;
> _RTA_dispatcher = RTA_dispatcher;
> _IDL_cpuLoad = IDL_cpuLoad;
> _LOG_system = LOG_system;
> _IDL_busyObj = IDL_busyObj;
>
> /* MODULE GBL */
>
> SECTIONS {
> .vers (COPY): {} /* version information */
> }
>
> -priority
> -llnkrtdx.a62
> -ldrivers.a67 /* device drivers support */
> -lsioboth.a62 /* supports both SIO models */
> -lbiosi.a62 /* DSP/BIOS support */
> -lrtdx.lib /* RTDX support */
> -lcsl6713.lib
> -lrts6700.lib /* C and C++ run-time library support */
>
> _GBL_CACHE = GBL_CACHE;
>
> /* MODULE MEM */
> -stack 0x400
> MEMORY {
> IRAM : origin = 0x0, len = 0x40000
> }
> /* MODULE CLK */
> SECTIONS {
> .clk: {
> _CLK_start = _CLK_start6x;
> CLK_F_gethtime = CLK_F_getshtime;
> CLK_A_TABBEG = .;
> *(.clk)
> CLK_A_TABEND = .;
> CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> } > IRAM
> }
> _CLK_PRD = CLK_PRD;
> _CLK_COUNTSPMS = CLK_COUNTSPMS;
> _CLK_REGS = CLK_REGS;
> _CLK_USETIMER = CLK_USETIMER;
> _CLK_TIMERNUM = CLK_TIMERNUM;
> _CLK_TDDR = CLK_TDDR;
>
> /* MODULE PRD */
> SECTIONS {
> .prd: {
> PRD_A_TABBEG = .;
> /* no PRD objects */
> PRD_A_TABEND = .;
> PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> } > IRAM
> }
>
> /* MODULE RTDX */
> _RTDX_interrupt_mask = 0x0;
>
> /* MODULE HWI */
> SECTIONS {
> .hwi_vec: 0x0 {
> HWI_A_VECS = .;
> *(.hwi_vec)
> }
> }
>
> /* MODULE SWI */
> SECTIONS {
> .swi: {
> SWI_A_TABBEG = .;
> *(.swi)
> SWI_A_TABEND = .;
> SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> } > IRAM
> }
>
> /* MODULE IDL */
> SECTIONS {
> .idl: {
> IDL_A_TABBEG = .;
> *(.idl)
> IDL_A_TABEND = .;
> IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> IDL_A_CALBEG = .;
> *(.idlcal)
> IDL_A_CALEND = .;
> IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> } > IRAM
> }
>
> SECTIONS {
> .bss: {} > IRAM
>
> .far: {} > IRAM
>
> .sysdata: {} > IRAM
>
> .mem: {} > IRAM
>
> .sysinit: {} > IRAM
>
> .sysregs: {} > IRAM
>
> .gblinit: {} > IRAM
>
> .trcdata: {} > IRAM
>
> .args: fill=0 {
> *(.args)
> . += 0x4;
> } > IRAM
>
> .cinit: {} > IRAM
>
> .pinit: {} > IRAM
>
> .data: {} > IRAM
>
> .const: {} > IRAM
>
> .switch: {} > IRAM
>
> .cio: {} > IRAM
>
> .text: {} > IRAM
>
> frt: {} > IRAM
>
> .bios: {} > IRAM
>
> .stack: fill=0xc0ffee {
> GBL_stackbeg = .;
> *(.stack)
> GBL_stackend = GBL_stackbeg + 0x400 - 1;
> _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> _HWI_STKTOP = GBL_stackbeg;
> } > IRAM
>
> .trace: fill = 0x0 {
> _SYS_PUTCBEG = .;
> . += 0x200;
> _SYS_PUTCEND = . - 1;
> } > IRAM
>
> .rtdx_data: {} > IRAM
>
> .rtdx_text: {} > IRAM
>
> .hst: {
> HST_A_TABBEG = .;
> _HST_A_TABBEG = .;
> *(.hst)
> HST_A_TABEND = .;
> _HST_A_TABEND = .;
> HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> } > IRAM
>
> .dsm: {} > IRAM"Enable Memory Maping"
>
> /* RTA_fromHost buffer */
> .hst1: align = 0x4 {} > IRAM
>
> /* RTA_toHost buffer */
> .hst0: align = 0x4 {} > IRAM
>
> .hwi: {} > IRAM
>
> .tsk: {
> *(.tsk)
> } > IRAM
>
> .TSK_idle$stk: {
> *(.TSK_idle$stk)
> } > IRAM
>
> .log: {
> LOG_A_TABBEG = .;
> _LOG_A_TABBEG = .;
> *(.log)
> LOG_A_TABEND = .;
> _LOG_A_TABEND = .;
> LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> } > IRAM
>
> .printf (COPY): {} > IRAM
>
> /* LOG_system buffer */
> .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
>
> .pip: {
> PIP_A_TABBEG = .;
> _PIP_A_TABBEG = .;
> *(.pip)
> PIP_A_TABEND = .;
> _PIP_A_TABEND = .;
> PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> } > IRAM
>
> .sts: {
> STS_A_TABBEG = .;
> _STS_A_TABBEG = .;
> *(.sts)
> STS_A_TABEND = .;
> _STS_A_TABEND = .;
> STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> } > IRAM
>
> .sys: {} > IRAM
>
> .gio: {} > IRAM
>
> .IRAM$heap: {
> IRAM$B = .;
> _IRAM_base = .;
> IRAM$L = 0x8000;
> _IRAM_length = 0x8000;
> . += 0x8000;
> } > IRAM
>
> }
>
> I am also getting the message given below but when I remove the check
> from "Enable Memory Maping" tab it solves the problem but I don't know
> why it some time happens ?
>
> Loader: One or more sections of your program falls into a memory
> region that is not writable. These regions will not actually be
> written to the target. Check your linker configuration and/or memory map.
>
> Thanks.
>
> ________________________________
> From: Richard Williams
> To: B S ; c...
> Sent: Wed, January 26, 2011 9:01:26 PM
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> B.S.
>
> Those error messages are from the linker. Not from running the code.
> It seems this is an excellent time for you to read the DSP
> architecture manual for the chip you are using and read the
> information on the .cmd file for the linker.
>
> They mean there is not enough room in the IRAM memory section.
>
> You will probably have to move the data points table to external RAM.
> BTW:
> How much external RAM do you have implemented on your project?
>
> BTW:
> if you have the problem again, then please paste the .cmd file listing
> in your post.
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S
> To: c...
> Sent: Wed, 26 Jan 2011 08:22:32 -0800 (PST)
> Subject: [c6x] C6713- Momory Allocation Probolem
>
> > Hi,
> >
> > I have been trying to save over 50,000 data points in run time and
> > then transfer them to a text file. When I am running my code for 25,
> > 000 data points, it's running fine but giving so many errors as given
> > below when I increase the size of buffer to 51200. I really don't know
> > what does it mean.
> >
> > >> error: can't allocate .text, size 00004960 (page 0) in IRAM (avail:
> > >>000001d0)
> > >> error: can't allocate .bios, size 00003c60 (page 0) in IRAM (avail:
> > >>000001d0)
> > >> error: can't allocate .cinit, size 0000105c (page 0) in IRAM (avail:
> > >>000001d0)
> > >> error: can't allocate .rtdx_text, size 00000cc0 (page 0) in IRAM (avail:
>
> > >>000001d0)
> > >> error: can't allocate .bss, size 000004b8 (page 0) in IRAM (avail:
>
> > >>000001d0)
> > >> error: can't allocate .rtdx_data, size 0000044c (page 0) in IRAM
> > >>(avail: 000001d0)
> > >> error: can't allocate .stack, size 00000400 (page 0) in IRAM
> > >>(avail: 000001d0)
> > >> error: can't allocate .TSK_idle$stk, size 00000400 (page 0) in IRAM
> > >>(avail: 000001d0)
> > >> error: can't allocate .sysinit, size 00000360 (page 0) in IRAM
> > >>(avail: 000001d0)
> > >> error: can't allocate .trace, size 00000200 (page 0) in IRAM
> > >>(avail: 000001d0)
> > >> error: can't allocate .LOG_system$buf, size 00000100 (page 0) in
> > >>IRAM (avail: 000000d0)
> > >> error: can't allocate .tsk, size 00000060 (page 0) in IRAM (avail:
>
> > >>00000008)
> > >> error: can't allocate .const, size 00000046 (page 0) in IRAM
> > >>(avail: 00000008)
> > >> error: can't allocate .sts, size 00000030 (page 0) in IRAM (avail:
>
> > >>00000008)
> > >> error: can't allocate .swi, size 0000002c (page 0) in IRAM (avail:
>
> > >>00000008)
> > >> error: can't allocate .hst, size 0000002c (page 0) in IRAM (avail:
>
> > >>00000008)
> > >> error: can't allocate .gblinit, size 00000028 (page 0) in IRAM
> > >>(avail: 00000008)
> > >> error: can't allocate .switch, size 00000028 (page 0) in IRAM
> > >>(avail: 00000008)
> > >> error: can't allocate .idl, size 00000020 (page 0) in IRAM (avail:
>
> > >>00000008)
> > >> error: can't allocate .log, size 00000018 (page 0) in IRAM (avail:
>
> > >>00000008)
> > >> error: can't allocate .hst1, size 00000010 (page 0) in IRAM
> > >>(avail: 00000008)
> > >> error: can't allocate .sys, size 00000010 (page 0) in IRAM (avail:
>
> > >>00000008)
> > >> error: can't allocate .trcdata, size 0000000c (page 0) in IRAM
> > >>(avail: 00000008)
> > >> error: can't allocate .pinit, size 0000000c (page 0) in IRAM
> > >>(avail: 00000008)
> > >> error: can't allocate .mem, size 00000004 (page 0) in IRAM (avail:
>
> > >>00000000)
> > >> error: can't allocate .args, size 00000004 (page 0) in IRAM
> > >>(avail: 00000000)
> > >> error: errors in input - ./Debug/ADS7881_BAS.out not built
> >
> > >> Compilation failure
> >
> > Build Complete,
> > 28 Errors, 0 Warnings, 0 Remarks.
> >
> > Will some one please help me out with issue ? How can I save larger
> > data values ? How much is the limit for C6713 ?
> >
> > I will appreciate your help.
> >
> > -BAS
> ------- End of Original Message -------
------- End of Original Message -------
R. Williams,

I tried with 'SDRAM' but it says the same thing (creating output section .SDRAM
without SECTIONS specification).

I changed the configuration settings, I removed 'heap' from SDRAM and used SDRAM
for Data Section (.data) under COMPILER SECTIONS tab, You can see all of them in
the snapshot. Are these settings ok OR some thing need to be switch between IRAM
and SDRAM ?

http://i53.tinypic.com/jhahee.jpg

By doing so, I am not getting 'creating output section' warning but it is now
saving values in data_stats and then writing to TEXT file.
This is how I am writing to text file.

FILE *fp;
fp = fopen("Samples.txt", "w");

for(j=0; j {
fprintf(fp, "%f\n", data_stats[j] );
}

fclose(fp);
exit(1);
When the size of data_stats is not more than some X size, program exits fine
after writing data to text file but as I increase the size of data_stats to
100,000, it never exits after writing to text file. When I halt the program I
see the cursor at momory section: RTDX_Final_RT_Monitor. Snapshot also shows
Disassembly view.

What should I change to configure the SDRAM properly ?

Thanks.

________________________________
From: Richard Williams
To: B S ; c...
Sent: Wed, February 2, 2011 8:52:56 PM
Subject: Re: [c6x] C6713- Momory Allocation Probolem

B.S.

I see a few 'ooops' in the configuration area.

For instance....
the '.EXT_RAM' section does not exist.
however, 'SDRAM' does exist.
so your pragma should look like this:
$pragma DATA_SECTION(data_stats,"SDRAM")
unless you define a specific section in the configuration named '.EXT_RAM' that
is large enough to hold your complete data table.
If you do define a .EXT_RAM section, then the size of the SDRAM section must be
reduced by an equal amount and the starting address of each section adjusted so
the sections do not overlap.

Then, as I looked at the configuration settings, I noticed:

1) the 'heap' is in SDRAM, that is not a really good idea unless the
application needs lots of room in the heap.

2) the 'stack' section is in SDRAM, that is a very bad idea
because the stack is referenced OFTEN and there is a major execution speed
penalty for having it in any place other than IRAM.

3) The BIOS sections need to be 'fast' so should be in IRAM

4) The startup code is only executed once, so placing it in SDRAM is probably
ok, however; I would have left it in FLASH and executed it from FLASH.

5) You want interrupt servicing to be 'fast', so the interrupt service table
should be in IRAM.

6) The 'text' section is the actual executable code. so placing it in SDRAM is
a major execution speed penalty.

7) If your code is initially in FLASH, then the jump switch tables should
probably be left in FLASH. They are actually part of the executable code, but
their usage is minimal (for most programs).

8) The '.cinit' section is only referenced during the startup code execution, so
leaving it in FLASH is a very good idea. BTW this is initialization values for
the ram data. It will be 'gone' over a power cycle.

9) The '.const' section never changes and is rarely referenced, so leaving it in
FLASH is a good idea.

10) The '.data' section is your program variables that will be initialized
during the startup code execution. Since such variables are usually referenced
often, it is a good idea to have them in IRAM. (however, that actual
initialization values can be left in FLASH as they are only referenced once
during the startup code.

BTW:
the whole idea was to make your link work.
The only problem with your link was the data_stats being too large to fit into
the IRAM. If I were doing this, the only thing I would have moved is the
data_stats and left everything else in IRAM/FLASH. Note: there is a execution
speed penalty for items in FLASH and usually also for items in SDRAM.

BTW:
It looks like there is no definition of the FLASH area.
IMO that should be added, so certain sections can be left in the FLASH, rather
than (during the startup code) copied into xxRAM then copied again into their
final execution/data location.

BTW:
I'm not sure if the DSP you are using has any differentiation between 'far' and
'near' addresses, but if it does, then I would plan the memory layout to use
'near' addresses when executing code that is run often or needs to run fast.

BTW:
if you move all the executable code out of SDRAM, then you can improve the
definition of SDRAM to be only data rather than code/data.

R. Williams

---------- Original Message -----------
From: B S
To: Richard Williams , c...
Sent: Wed, 2 Feb 2011 08:59:04 -0800 (PST)
Subject: Re: [c6x] C6713- Momory Allocation Probolem

> Hi,
>
> Yes, I have 16 MEG SDRAM available and I added SDRAM IN MEMORY SECTION
> MANAGER using DSP/BIOS.
>
> Here attached snapshot to show all the settings I chosen for External
> Memory. http://i53.tinypic.com/1z4vjo7.jpg
>
> I used this line to define data_stats buffer in EXT RAM
> #pragma DATA_SECTION(data_stats,".EXT_RAM")
>
> When I build my project, I get following error.
> warning: creating output section .EXT_RAM without SECTIONS specification
>
> Even after this my program runs, it saved values in data_stats buffer
> but when I write those values to .text file, it doesn't write any
> thing, text file is just blank. What is wrong here ?
>
> Richard, you said to modify memory map, via the config tool, to
> include the available external RAM. I don't know how to di it. Is it
> causing trouble ?
>
> Please help me.
>
> ________________________________
> From: Richard Williams
> To: B S ; c...
> Sent: Fri, January 28, 2011 8:44:42 PM
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> B.S.
>
> If your looking at the 6713 architecture manual (available for
> download at TI.com) part number SPRS186L,pdf then you see, on page 16
> the memory map and on page 17 the various ways the 'IRAM' portion of
> the memory map can be allocated as L2 cache+IRAM.
>
> Your program, per the linker error messages is larger than the
> available IRAM.
>
> I say again : Your program is TOO BIG for the size of the IRAM.
>
> Does your development board have any external RAM implemented?
>
> If yes, then modify the configuration file, using the config tool, and
> move the data table to the external RAM. You will also have to modify
> the memory map, via the config tool, to include the available external
> RAM.
>
> If no, then you will have to implement some external RAM (via
> additional hardware) and move the data table to the external RAM via
> the config tool.
>
> BTW:
> Turning the ""Enable Memory Maping" off is a bad idea as this stops
> the linker from checking that the program will fit within the
> available RAM.
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S
> To: Richard Williams , c...
> Sent: Fri, 28 Jan 2011 07:08:58 -0800 (PST)
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> > Hi Richard Williams,
> >
> > I have been looking at the DSP Architecture Manual.
> >
> > Here attached the cmd file.
> >
> > /* MODULE PARAMETERS */
> > GBL_USERINITFXN = _FXN_F_nop;
> >
> > MEM_SEGZERO = IRAM;
> > MEM_MALLOCSEG = IRAM;
> >
> > CLK_TIMEFXN = CLK_F_getshtime;
> > CLK_HOOKFXN = HWI_F_dispatch;
> >
> > PRD_THOOKFXN = _KNL_tick;
> >
> > RTDX_DATAMEMSEG = IRAM;
> >
> > HST_DSMBUFSEG = IRAM;
> >
> > SWI_EHOOKFXN = GBL_NULL;
> > SWI_IHOOKFXN = GBL_NULL;
> > SWI_EXECFXN = SWI_F_iexec;
> > SWI_RUNFXN = SWI_F_run;
> >
> > TSK_STACKSEG = IRAM;
> > TSK_VCREATEFXN = _FXN_F_nop;
> > TSK_VDELETEFXN = _FXN_F_nop;
> > TSK_VEXITFXN = _FXN_F_nop;
> >
> > IDL_CALIBRFXN = IDL_F_stub;
> >
> > SYS_ABORTFXN = _UTL_doAbort;
> > SYS_ERRORFXN = _UTL_doError;
> > SYS_EXITFXN = _UTL_halt;
> > SYS_PUTCFXN = _UTL_doPutc;
> >
> > GIO_CREATEFXN = _FXN_F_nop;
> > GIO_DELETEFXN = _FXN_F_nop;
> > GIO_PENDFXN = _FXN_F_nop;
> > GIO_POSTFXN = _FXN_F_nop;
> >
> > /* OBJECT ALIASES */
> > _IRAM = IRAM;
> > _PRD_clock = PRD_clock;
> > _RTA_fromHost = RTA_fromHost;
> > _RTA_toHost = RTA_toHost;
> > _HWI_RESET = HWI_RESET;
> > _HWI_NMI = HWI_NMI;
> > _HWI_RESERVED0 = HWI_RESERVED0;
> > _HWI_RESERVED1 = HWI_RESERVED1;
> > _HWI_INT4 = HWI_INT4;
> > _HWI_INT5 = HWI_INT5;
> > _HWI_INT6 = HWI_INT6;
> > _HWI_INT7 = HWI_INT7;
> > _HWI_INT8 = HWI_INT8;
> > _HWI_INT9 = HWI_INT9;
> > _HWI_INT10 = HWI_INT10;
> > _HWI_INT11 = HWI_INT11;
> > _HWI_INT12 = HWI_INT12;
> > _HWI_INT13 = HWI_INT13;
> > _HWI_INT14 = HWI_INT14;
> > _HWI_INT15 = HWI_INT15;
> > _KNL_swi = KNL_swi;
> > _TSK_idle = TSK_idle;
> > _LNK_dataPump = LNK_dataPump;
> > _RTA_dispatcher = RTA_dispatcher;
> > _IDL_cpuLoad = IDL_cpuLoad;
> > _LOG_system = LOG_system;
> > _IDL_busyObj = IDL_busyObj;
> >
> > /* MODULE GBL */
> >
> > SECTIONS {
> > .vers (COPY): {} /* version information */
> > }
> >
> > -priority
> > -llnkrtdx.a62
> > -ldrivers.a67 /* device drivers support */
> > -lsioboth.a62 /* supports both SIO models */
> > -lbiosi.a62 /* DSP/BIOS support */
> > -lrtdx.lib /* RTDX support */
> > -lcsl6713.lib
> > -lrts6700.lib /* C and C++ run-time library support */
> >
> > _GBL_CACHE = GBL_CACHE;
> >
> > /* MODULE MEM */
> > -stack 0x400
> > MEMORY {
> > IRAM : origin = 0x0, len = 0x40000
> > }
> > /* MODULE CLK */
> > SECTIONS {
> > .clk: {
> > _CLK_start = _CLK_start6x;
> > CLK_F_gethtime = CLK_F_getshtime;
> > CLK_A_TABBEG = .;
> > *(.clk)
> > CLK_A_TABEND = .;
> > CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> > } > IRAM
> > }
> > _CLK_PRD = CLK_PRD;
> > _CLK_COUNTSPMS = CLK_COUNTSPMS;
> > _CLK_REGS = CLK_REGS;
> > _CLK_USETIMER = CLK_USETIMER;
> > _CLK_TIMERNUM = CLK_TIMERNUM;
> > _CLK_TDDR = CLK_TDDR;
> >
> > /* MODULE PRD */
> > SECTIONS {
> > .prd: {
> > PRD_A_TABBEG = .;
> > /* no PRD objects */
> > PRD_A_TABEND = .;
> > PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> > } > IRAM
> > }
> >
> > /* MODULE RTDX */
> > _RTDX_interrupt_mask = 0x0;
> >
> > /* MODULE HWI */
> > SECTIONS {
> > .hwi_vec: 0x0 {
> > HWI_A_VECS = .;
> > *(.hwi_vec)
> > }
> > }
> >
> > /* MODULE SWI */
> > SECTIONS {
> > .swi: {
> > SWI_A_TABBEG = .;
> > *(.swi)
> > SWI_A_TABEND = .;
> > SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> > } > IRAM
> > }
> >
> > /* MODULE IDL */
> > SECTIONS {
> > .idl: {
> > IDL_A_TABBEG = .;
> > *(.idl)
> > IDL_A_TABEND = .;
> > IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> > IDL_A_CALBEG = .;
> > *(.idlcal)
> > IDL_A_CALEND = .;
> > IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> > } > IRAM
> > }
> >
> > SECTIONS {
> > .bss: {} > IRAM
> >
> > .far: {} > IRAM
> >
> > .sysdata: {} > IRAM
> >
> > .mem: {} > IRAM
> >
> > .sysinit: {} > IRAM
> >
> > .sysregs: {} > IRAM
> >
> > .gblinit: {} > IRAM
> >
> > .trcdata: {} > IRAM
> >
> > .args: fill=0 {
> > *(.args)
> > . += 0x4;
> > } > IRAM
> >
> > .cinit: {} > IRAM
> >
> > .pinit: {} > IRAM
> >
> > .data: {} > IRAM
> >
> > .const: {} > IRAM
> >
> > .switch: {} > IRAM
> >
> > .cio: {} > IRAM
> >
> > .text: {} > IRAM
> >
> > frt: {} > IRAM
> >
> > .bios: {} > IRAM
> >
> > .stack: fill=0xc0ffee {
> > GBL_stackbeg = .;
> > *(.stack)
> > GBL_stackend = GBL_stackbeg + 0x400 - 1;
> > _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> > _HWI_STKTOP = GBL_stackbeg;
> > } > IRAM
> >
> > .trace: fill = 0x0 {
> > _SYS_PUTCBEG = .;
> > . += 0x200;
> > _SYS_PUTCEND = . - 1;
> > } > IRAM
> >
> > .rtdx_data: {} > IRAM
> >
> > .rtdx_text: {} > IRAM
> >
> > .hst: {
> > HST_A_TABBEG = .;
> > _HST_A_TABBEG = .;
> > *(.hst)
> > HST_A_TABEND = .;
> > _HST_A_TABEND = .;
> > HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > } > IRAM
> >
> > .dsm: {} > IRAM"Enable Memory Maping"
> >
> > /* RTA_fromHost buffer */
> > .hst1: align = 0x4 {} > IRAM
> >
> > /* RTA_toHost buffer */
> > .hst0: align = 0x4 {} > IRAM
> >
> > .hwi: {} > IRAM
> >
> > .tsk: {
> > *(.tsk)
> > } > IRAM
> >
> > .TSK_idle$stk: {
> > *(.TSK_idle$stk)
> > } > IRAM
> >
> > .log: {
> > LOG_A_TABBEG = .;
> > _LOG_A_TABBEG = .;
> > *(.log)
> > LOG_A_TABEND = .;
> > _LOG_A_TABEND = .;
> > LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > } > IRAM
> >
> > .printf (COPY): {} > IRAM
> >
> > /* LOG_system buffer */
> > .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
> >
> > .pip: {
> > PIP_A_TABBEG = .;
> > _PIP_A_TABBEG = .;
> > *(.pip)
> > PIP_A_TABEND = .;
> > _PIP_A_TABEND = .;
> > PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > } > IRAM
> >
> > .sts: {
> > STS_A_TABBEG = .;
> > _STS_A_TABBEG = .;
> > *(.sts)
> > STS_A_TABEND = .;
> > _STS_A_TABEND = .;
> > STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > } > IRAM
> >
> > .sys: {} > IRAM
> >
> > .gio: {} > IRAM
> >
> > .IRAM$heap: {
> > IRAM$B = .;
> > _IRAM_base = .;
> > IRAM$L = 0x8000;
> > _IRAM_length = 0x8000;
> > . += 0x8000;
> > } > IRAM
> >
> > }
> >
> > I am also getting the message given below but when I remove the check
> > from "Enable Memory Maping" tab it solves the problem but I don't know
> > why it some time happens ?
> >
> > Loader: One or more sections of your program falls into a memory
> > region that is not writable. These regions will not actually be
> > written to the target. Check your linker configuration and/or memory map.
> >
> > Thanks.
> >
> > ________________________________
> > From: Richard Williams
> > To: B S ; c...
> > Sent: Wed, January 26, 2011 9:01:26 PM
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > B.S.
> >
> > Those error messages are from the linker. Not from running the code.
> > It seems this is an excellent time for you to read the DSP
> > architecture manual for the chip you are using and read the
> > information on the .cmd file for the linker.
> >
> > They mean there is not enough room in the IRAM memory section.
> >
> > You will probably have to move the data points table to external RAM.
> > BTW:
> > How much external RAM do you have implemented on your project?
> >
> > BTW:
> > if you have the problem again, then please paste the .cmd file listing
> > in your post.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S
> > To: c...
> > Sent: Wed, 26 Jan 2011 08:22:32 -0800 (PST)
> > Subject: [c6x] C6713- Momory Allocation Probolem
> >
> > > Hi,
> > >
> > > I have been trying to save over 50,000 data points in run time and
> > > then transfer them to a text file. When I am running my code for 25,
> > > 000 data points, it's running fine but giving so many errors as given
> > > below when I increase the size of buffer to 51200. I really don't know
> > > what does it mean.
> > >
> > > >> error: can't allocate .text, size 00004960 (page 0) in IRAM (avail:
> > > >>000001d0)
> > > >> error: can't allocate .bios, size 00003c60 (page 0) in IRAM (avail:
> > > >>000001d0)
> > > >> error: can't allocate .cinit, size 0000105c (page 0) in IRAM (avail:
> > > >>000001d0)
> > > >> error: can't allocate .rtdx_text, size 00000cc0 (page 0) in IRAM
>(avail:
>
> >
> > > >>000001d0)
> > > >> error: can't allocate .bss, size 000004b8 (page 0) in IRAM (avail:
> >
> > > >>000001d0)
> > > >> error: can't allocate .rtdx_data, size 0000044c (page 0) in IRAM
> > > >>(avail: 000001d0)
> > > >> error: can't allocate .stack, size 00000400 (page 0) in IRAM
> > > >>(avail: 000001d0)
> > > >> error: can't allocate .TSK_idle$stk, size 00000400 (page 0) in IRAM
> > > >>(avail: 000001d0)
> > > >> error: can't allocate .sysinit, size 00000360 (page 0) in IRAM
> > > >>(avail: 000001d0)
> > > >> error: can't allocate .trace, size 00000200 (page 0) in IRAM
> > > >>(avail: 000001d0)
> > > >> error: can't allocate .LOG_system$buf, size 00000100 (page 0) in
> > > >>IRAM (avail: 000000d0)
> > > >> error: can't allocate .tsk, size 00000060 (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .const, size 00000046 (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .sts, size 00000030 (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .swi, size 0000002c (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .hst, size 0000002c (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .gblinit, size 00000028 (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .switch, size 00000028 (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .idl, size 00000020 (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .log, size 00000018 (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .hst1, size 00000010 (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .sys, size 00000010 (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .trcdata, size 0000000c (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .pinit, size 0000000c (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .mem, size 00000004 (page 0) in IRAM (avail:
> >
> > > >>00000000)
> > > >> error: can't allocate .args, size 00000004 (page 0) in IRAM
> > > >>(avail: 00000000)
> > > >> error: errors in input - ./Debug/ADS7881_BAS.out not built
> > >
> > > >> Compilation failure
> > >
> > > Build Complete,
> > > 28 Errors, 0 Warnings, 0 Remarks.
> > >
> > > Will some one please help me out with issue ? How can I save larger
> > > data values ? How much is the limit for C6713 ?
> > >
> > > I will appreciate your help.
> > >
> > > -BAS
> > ------- End of Original Message -------
> ------- End of Original Message -------
------- End of Original Message -------
BS,
On 2/3/2011 10:05 AM, B S wrote:
> R. Williams,
>
> I tried with 'SDRAM' but it says the same thing (creating output
> section .SDRAM without SECTIONS specification).

Programming is very much about details - and sometimes carefully reading
error messages...
if this is a paste of the error
"(creating output section .SDRAM without SECTIONS specification)"
then I would suggest that you change...
'$pragma DATA_SECTION(data_stats,".SDRAM")'
to the original Williams suggestion of..
'$pragma DATA_SECTION(data_stats,"SDRAM")'

mikedunn
>
> I changed the configuration settings, I removed 'heap' from SDRAM and
> used SDRAM for Data Section (.data) under COMPILER SECTIONS tab, You
> can see all of them in the snapshot. Are these settings ok OR some
> thing need to be switch between IRAM and SDRAM ?
>
> http://i53.tinypic.com/jhahee.jpg
>
> By doing so, I am not getting 'creating output section' warning but it
> is now saving values in data_stats and then writing to TEXT file.
>
> This is how I am writing to text file.
>
> FILE *fp;
> fp = fopen("Samples.txt", "w");
>
> for(j=0; j > {
> fprintf(fp, "%f\n", data_stats[j] );
> }
>
> fclose(fp);
> exit(1);
>
> When the size of data_stats is not more than some X size, program
> exits fine after writing data to text file but as I increase the size
> of data_stats to 100,000, it never exits after writing to text file.
> When I halt the program I see the cursor at momory section:
> RTDX_Final_RT_Monitor. Snapshot also shows Disassembly view.
>
> What should I change to configure the SDRAM properly ?
>
> Thanks.
>
>
> *From:* Richard Williams
> *To:* B S ; c...
> *Sent:* Wed, February 2, 2011 8:52:56 PM
> *Subject:* Re: [c6x] C6713- Momory Allocation Probolem
> B.S.
>
> I see a few 'ooops' in the configuration area.
>
> For instance....
> the '.EXT_RAM' section does not exist.
> however, 'SDRAM' does exist.
> so your pragma should look like this:
> $pragma DATA_SECTION(data_stats,"SDRAM")
> unless you define a specific section in the configuration named
> '.EXT_RAM' that
> is large enough to hold your complete data table.
> If you do define a .EXT_RAM section, then the size of the SDRAM
> section must be
> reduced by an equal amount and the starting address of each section
> adjusted so
> the sections do not overlap.
>
> Then, as I looked at the configuration settings, I noticed:
>
> 1) the 'heap' is in SDRAM, that is not a really good idea unless the
> application needs lots of room in the heap.
>
> 2) the 'stack' section is in SDRAM, that is a very bad idea
> because the stack is referenced OFTEN and there is a major execution speed
> penalty for having it in any place other than IRAM.
>
> 3) The BIOS sections need to be 'fast' so should be in IRAM
>
> 4) The startup code is only executed once, so placing it in SDRAM is
> probably
> ok, however; I would have left it in FLASH and executed it from FLASH.
>
> 5) You want interrupt servicing to be 'fast', so the interrupt service
> table
> should be in IRAM.
>
> 6) The 'text' section is the actual executable code. so placing it in
> SDRAM is
> a major execution speed penalty.
>
> 7) If your code is initially in FLASH, then the jump switch tables should
> probably be left in FLASH. They are actually part of the executable
> code, but
> their usage is minimal (for most programs).
>
> 8) The '.cinit' section is only referenced during the startup code
> execution, so
> leaving it in FLASH is a very good idea. BTW this is initialization
> values for
> the ram data. It will be 'gone' over a power cycle.
>
> 9) The '.const' section never changes and is rarely referenced, so
> leaving it in
> FLASH is a good idea.
>
> 10) The '.data' section is your program variables that will be initialized
> during the startup code execution. Since such variables are usually
> referenced
> often, it is a good idea to have them in IRAM. (however, that actual
> initialization values can be left in FLASH as they are only referenced
> once
> during the startup code.
>
> BTW:
> the whole idea was to make your link work.
> The only problem with your link was the data_stats being too large to
> fit into
> the IRAM. If I were doing this, the only thing I would have moved is the
> data_stats and left everything else in IRAM/FLASH. Note: there is a
> execution
> speed penalty for items in FLASH and usually also for items in SDRAM.
>
> BTW:
> It looks like there is no definition of the FLASH area.
> IMO that should be added, so certain sections can be left in the
> FLASH, rather
> than (during the startup code) copied into xxRAM then copied again
> into their
> final execution/data location.
>
> BTW:
> I'm not sure if the DSP you are using has any differentiation between
> 'far' and
> 'near' addresses, but if it does, then I would plan the memory layout
> to use
> 'near' addresses when executing code that is run often or needs to run
> fast.
>
> BTW:
> if you move all the executable code out of SDRAM, then you can improve the
> definition of SDRAM to be only data rather than code/data.
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S >
> To: Richard Williams > >, c...
>
> Sent: Wed, 2 Feb 2011 08:59:04 -0800 (PST)
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> > Hi,
> >
> > Yes, I have 16 MEG SDRAM available and I added SDRAM IN MEMORY SECTION
> > MANAGER using DSP/BIOS.
> >
> > Here attached snapshot to show all the settings I chosen for External
> > Memory. http://i53.tinypic.com/1z4vjo7.jpg
> >
> > I used this line to define data_stats buffer in EXT RAM
> > #pragma DATA_SECTION(data_stats,".EXT_RAM")
> >
> > When I build my project, I get following error.
> > warning: creating output section .EXT_RAM without SECTIONS specification
> >
> > Even after this my program runs, it saved values in data_stats buffer
> > but when I write those values to .text file, it doesn't write any
> > thing, text file is just blank. What is wrong here ?
> >
> > Richard, you said to modify memory map, via the config tool, to
> > include the available external RAM. I don't know how to di it. Is it
> > causing trouble ?
> >
> > Please help me.
> >
> > ________________________________
> > From: Richard Williams > >
> > To: B S >;
> c...
> > Sent: Fri, January 28, 2011 8:44:42 PM
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > B.S.
> >
> > If your looking at the 6713 architecture manual (available for
> > download at TI.com ) part number SPRS186L,pdf then
> you see, on page 16
> > the memory map and on page 17 the various ways the 'IRAM' portion of
> > the memory map can be allocated as L2 cache+IRAM.
> >
> > Your program, per the linker error messages is larger than the
> > available IRAM.
> >
> > I say again : Your program is TOO BIG for the size of the IRAM.
> >
> > Does your development board have any external RAM implemented?
> >
> > If yes, then modify the configuration file, using the config tool, and
> > move the data table to the external RAM. You will also have to modify
> > the memory map, via the config tool, to include the available external
> > RAM.
> >
> > If no, then you will have to implement some external RAM (via
> > additional hardware) and move the data table to the external RAM via
> > the config tool.
> >
> > BTW:
> > Turning the ""Enable Memory Maping" off is a bad idea as this stops
> > the linker from checking that the program will fit within the
> > available RAM.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S >
> > To: Richard Williams > >, c...
>
> > Sent: Fri, 28 Jan 2011 07:08:58 -0800 (PST)
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > > Hi Richard Williams,
> > >
> > > I have been looking at the DSP Architecture Manual.
> > >
> > > Here attached the cmd file.
> > >
> > > /* MODULE PARAMETERS */
> > > GBL_USERINITFXN = _FXN_F_nop;
> > >
> > > MEM_SEGZERO = IRAM;
> > > MEM_MALLOCSEG = IRAM;
> > >
> > > CLK_TIMEFXN = CLK_F_getshtime;
> > > CLK_HOOKFXN = HWI_F_dispatch;
> > >
> > > PRD_THOOKFXN = _KNL_tick;
> > >
> > > RTDX_DATAMEMSEG = IRAM;
> > >
> > > HST_DSMBUFSEG = IRAM;
> > >
> > > SWI_EHOOKFXN = GBL_NULL;
> > > SWI_IHOOKFXN = GBL_NULL;
> > > SWI_EXECFXN = SWI_F_iexec;
> > > SWI_RUNFXN = SWI_F_run;
> > >
> > > TSK_STACKSEG = IRAM;
> > > TSK_VCREATEFXN = _FXN_F_nop;
> > > TSK_VDELETEFXN = _FXN_F_nop;
> > > TSK_VEXITFXN = _FXN_F_nop;
> > >
> > > IDL_CALIBRFXN = IDL_F_stub;
> > >
> > > SYS_ABORTFXN = _UTL_doAbort;
> > > SYS_ERRORFXN = _UTL_doError;
> > > SYS_EXITFXN = _UTL_halt;
> > > SYS_PUTCFXN = _UTL_doPutc;
> > >
> > > GIO_CREATEFXN = _FXN_F_nop;
> > > GIO_DELETEFXN = _FXN_F_nop;
> > > GIO_PENDFXN = _FXN_F_nop;
> > > GIO_POSTFXN = _FXN_F_nop;
> > >
> > > /* OBJECT ALIASES */
> > > _IRAM = IRAM;
> > > _PRD_clock = PRD_clock;
> > > _RTA_fromHost = RTA_fromHost;
> > > _RTA_toHost = RTA_toHost;
> > > _HWI_RESET = HWI_RESET;
> > > _HWI_NMI = HWI_NMI;
> > > _HWI_RESERVED0 = HWI_RESERVED0;
> > > _HWI_RESERVED1 = HWI_RESERVED1;
> > > _HWI_INT4 = HWI_INT4;
> > > _HWI_INT5 = HWI_INT5;
> > > _HWI_INT6 = HWI_INT6;
> > > _HWI_INT7 = HWI_INT7;
> > > _HWI_INT8 = HWI_INT8;
> > > _HWI_INT9 = HWI_INT9;
> > > _HWI_INT10 = HWI_INT10;
> > > _HWI_INT11 = HWI_INT11;
> > > _HWI_INT12 = HWI_INT12;
> > > _HWI_INT13 = HWI_INT13;
> > > _HWI_INT14 = HWI_INT14;
> > > _HWI_INT15 = HWI_INT15;
> > > _KNL_swi = KNL_swi;
> > > _TSK_idle = TSK_idle;
> > > _LNK_dataPump = LNK_dataPump;
> > > _RTA_dispatcher = RTA_dispatcher;
> > > _IDL_cpuLoad = IDL_cpuLoad;
> > > _LOG_system = LOG_system;
> > > _IDL_busyObj = IDL_busyObj;
> > >
> > > /* MODULE GBL */
> > >
> > > SECTIONS {
> > > .vers (COPY): {} /* version information */
> > > }
> > >
> > > -priority
> > > -llnkrtdx.a62
> > > -ldrivers.a67 /* device drivers support */
> > > -lsioboth.a62 /* supports both SIO models */
> > > -lbiosi.a62 /* DSP/BIOS support */
> > > -lrtdx.lib /* RTDX support */
> > > -lcsl6713.lib
> > > -lrts6700.lib /* C and C++ run-time library support */
> > >
> > > _GBL_CACHE = GBL_CACHE;
> > >
> > > /* MODULE MEM */
> > > -stack 0x400
> > > MEMORY {
> > > IRAM : origin = 0x0, len = 0x40000
> > > }
> > > /* MODULE CLK */
> > > SECTIONS {
> > > .clk: {
> > > _CLK_start = _CLK_start6x;
> > > CLK_F_gethtime = CLK_F_getshtime;
> > > CLK_A_TABBEG = .;
> > > *(.clk)
> > > CLK_A_TABEND = .;
> > > CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> > > } > IRAM
> > > }
> > > _CLK_PRD = CLK_PRD;
> > > _CLK_COUNTSPMS = CLK_COUNTSPMS;
> > > _CLK_REGS = CLK_REGS;
> > > _CLK_USETIMER = CLK_USETIMER;
> > > _CLK_TIMERNUM = CLK_TIMERNUM;
> > > _CLK_TDDR = CLK_TDDR;
> > >
> > > /* MODULE PRD */
> > > SECTIONS {
> > > .prd: {
> > > PRD_A_TABBEG = .;
> > > /* no PRD objects */
> > > PRD_A_TABEND = .;
> > > PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> > > } > IRAM
> > > }
> > >
> > > /* MODULE RTDX */
> > > _RTDX_interrupt_mask = 0x0;
> > >
> > > /* MODULE HWI */
> > > SECTIONS {
> > > .hwi_vec: 0x0 {
> > > HWI_A_VECS = .;
> > > *(.hwi_vec)
> > > }
> > > }
> > >
> > > /* MODULE SWI */
> > > SECTIONS {
> > > .swi: {
> > > SWI_A_TABBEG = .;
> > > *(.swi)
> > > SWI_A_TABEND = .;
> > > SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> > > } > IRAM
> > > }
> > >
> > > /* MODULE IDL */
> > > SECTIONS {
> > > .idl: {
> > > IDL_A_TABBEG = .;
> > > *(.idl)
> > > IDL_A_TABEND = .;
> > > IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> > > IDL_A_CALBEG = .;
> > > *(.idlcal)
> > > IDL_A_CALEND = .;
> > > IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> > > } > IRAM
> > > }
> > >
> > > SECTIONS {
> > > .bss: {} > IRAM
> > >
> > > .far: {} > IRAM
> > >
> > > .sysdata: {} > IRAM
> > >
> > > .mem: {} > IRAM
> > >
> > > .sysinit: {} > IRAM
> > >
> > > .sysregs: {} > IRAM
> > >
> > > .gblinit: {} > IRAM
> > >
> > > .trcdata: {} > IRAM
> > >
> > > .args: fill=0 {
> > > *(.args)
> > > . += 0x4;
> > > } > IRAM
> > >
> > > .cinit: {} > IRAM
> > >
> > > .pinit: {} > IRAM
> > >
> > > .data: {} > IRAM
> > >
> > > .const: {} > IRAM
> > >
> > > .switch: {} > IRAM
> > >
> > > .cio: {} > IRAM
> > >
> > > .text: {} > IRAM
> > >
> > > frt: {} > IRAM
> > >
> > > .bios: {} > IRAM
> > >
> > > .stack: fill=0xc0ffee {
> > > GBL_stackbeg = .;
> > > *(.stack)
> > > GBL_stackend = GBL_stackbeg + 0x400 - 1;
> > > _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> > > _HWI_STKTOP = GBL_stackbeg;
> > > } > IRAM
> > >
> > > .trace: fill = 0x0 {
> > > _SYS_PUTCBEG = .;
> > > . += 0x200;
> > > _SYS_PUTCEND = . - 1;
> > > } > IRAM
> > >
> > > .rtdx_data: {} > IRAM
> > >
> > > .rtdx_text: {} > IRAM
> > >
> > > .hst: {
> > > HST_A_TABBEG = .;
> > > _HST_A_TABBEG = .;
> > > *(.hst)
> > > HST_A_TABEND = .;
> > > _HST_A_TABEND = .;
> > > HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > } > IRAM
> > >
> > > .dsm: {} > IRAM"Enable Memory Maping"
> > >
> > > /* RTA_fromHost buffer */
> > > .hst1: align = 0x4 {} > IRAM
> > >
> > > /* RTA_toHost buffer */
> > > .hst0: align = 0x4 {} > IRAM
> > >
> > > .hwi: {} > IRAM
> > >
> > > .tsk: {
> > > *(.tsk)
> > > } > IRAM
> > >
> > > .TSK_idle$stk: {
> > > *(.TSK_idle$stk)
> > > } > IRAM
> > >
> > > .log: {
> > > LOG_A_TABBEG = .;
> > > _LOG_A_TABBEG = .;
> > > *(.log)
> > > LOG_A_TABEND = .;
> > > _LOG_A_TABEND = .;
> > > LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > } > IRAM
> > >
> > > .printf (COPY): {} > IRAM
> > >
> > > /* LOG_system buffer */
> > > .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
> > >
> > > .pip: {
> > > PIP_A_TABBEG = .;
> > > _PIP_A_TABBEG = .;
> > > *(.pip)
> > > PIP_A_TABEND = .;
> > > _PIP_A_TABEND = .;
> > > PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > } > IRAM
> > >
> > > .sts: {
> > > STS_A_TABBEG = .;
> > > _STS_A_TABBEG = .;
> > > *(.sts)
> > > STS_A_TABEND = .;
> > > _STS_A_TABEND = .;
> > > STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > } > IRAM
> > >
> > > .sys: {} > IRAM
> > >
> > > .gio: {} > IRAM
> > >
> > > .IRAM$heap: {
> > > IRAM$B = .;
> > > _IRAM_base = .;
> > > IRAM$L = 0x8000;
> > > _IRAM_length = 0x8000;
> > > . += 0x8000;
> > > } > IRAM
> > >
> > > }
> > >
> > > I am also getting the message given below but when I remove the check
> > > from "Enable Memory Maping" tab it solves the problem but I don't
> know
> > > why it some time happens ?
> > >
> > > Loader: One or more sections of your program falls into a memory
> > > region that is not writable. These regions will not actually be
> > > written to the target. Check your linker configuration and/or
> memory map.
> > >
> > > Thanks.
> > >
> > > ________________________________
> > > From: Richard Williams > >
> > > To: B S >;
> c...
> > > Sent: Wed, January 26, 2011 9:01:26 PM
> > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > >
> > > B.S.
> > >
> > > Those error messages are from the linker. Not from running the code.
> > > It seems this is an excellent time for you to read the DSP
> > > architecture manual for the chip you are using and read the
> > > information on the .cmd file for the linker.
> > >
> > > They mean there is not enough room in the IRAM memory section.
> > >
> > > You will probably have to move the data points table to external RAM.
> > > BTW:
> > > How much external RAM do you have implemented on your project?
> > >
> > > BTW:
> > > if you have the problem again, then please paste the .cmd file
> listing
> > > in your post.
> > >
> > > R. Williams
> > >
> > > ---------- Original Message -----------
> > > From: B S >
> > > To: c...
> > > Sent: Wed, 26 Jan 2011 08:22:32 -0800 (PST)
> > > Subject: [c6x] C6713- Momory Allocation Probolem
> > >
> > > > Hi,
> > > >
> > > > I have been trying to save over 50,000 data points in run time and
> > > > then transfer them to a text file. When I am running my code for 25,
> > > > 000 data points, it's running fine but giving so many errors as
> given
> > > > below when I increase the size of buffer to 51200. I really
> don't know
> > > > what does it mean.
> > > >
> > > > >> error: can't allocate .text, size 00004960 (page 0) in IRAM
> (avail:
> > > > >>000001d0)
> > > > >> error: can't allocate .bios, size 00003c60 (page 0) in IRAM
> (avail:
> > > > >>000001d0)
> > > > >> error: can't allocate .cinit, size 0000105c (page 0) in IRAM
> (avail:
> > > > >>000001d0)
> > > > >> error: can't allocate .rtdx_text, size 00000cc0 (page 0) in
> IRAM (avail:
> > >
> > > > >>000001d0)
> > > > >> error: can't allocate .bss, size 000004b8 (page 0) in IRAM
> (avail:
> > >
> > > > >>000001d0)
> > > > >> error: can't allocate .rtdx_data, size 0000044c (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .stack, size 00000400 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .TSK_idle$stk, size 00000400 (page 0)
> in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .sysinit, size 00000360 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .trace, size 00000200 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .LOG_system$buf, size 00000100 (page 0) in
> > > > >>IRAM (avail: 000000d0)
> > > > >> error: can't allocate .tsk, size 00000060 (page 0) in IRAM
> (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .const, size 00000046 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .sts, size 00000030 (page 0) in IRAM
> (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .swi, size 0000002c (page 0) in IRAM
> (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .hst, size 0000002c (page 0) in IRAM
> (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .gblinit, size 00000028 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .switch, size 00000028 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .idl, size 00000020 (page 0) in IRAM
> (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .log, size 00000018 (page 0) in IRAM
> (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .hst1, size 00000010 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .sys, size 00000010 (page 0) in IRAM
> (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .trcdata, size 0000000c (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .pinit, size 0000000c (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .mem, size 00000004 (page 0) in IRAM
> (avail:
> > >
> > > > >>00000000)
> > > > >> error: can't allocate .args, size 00000004 (page 0) in IRAM
> > > > >>(avail: 00000000)
> > > > >> error: errors in input - ./Debug/ADS7881_BAS.out not built
> > > >
> > > > >> Compilation failure
> > > >
> > > > Build Complete,
> > > > 28 Errors, 0 Warnings, 0 Remarks.
> > > >
> > > > Will some one please help me out with issue ? How can I save larger
> > > > data values ? How much is the limit for C6713 ?
> > > >
> > > > I will appreciate your help.
> > > >
> > > > -BAS
> > > ------- End of Original Message -------
> > ------- End of Original Message -------
> >
> >
> ------- End of Original Message -------
>
B.S.

First, '.SDRAM' is not the same thing as 'SDRAM'
Therefore, the name has to be exactly the same.
A name with a leading '.' is not the same things as name without a leading '.'

I'll look at your snapshot next and give you my opinion.

R. Williams

---------- Original Message -----------
From: B S
To: Richard Williams , c...
Sent: Thu, 3 Feb 2011 08:05:18 -0800 (PST)
Subject: Re: [c6x] C6713- Momory Allocation Probolem

> R. Williams,
>
> I tried with 'SDRAM' but it says the same thing (creating output
> section .SDRAM without SECTIONS specification).
>
> I changed the configuration settings, I removed 'heap' from SDRAM and
> used SDRAM for Data Section (.data) under COMPILER SECTIONS tab, You
> can see all of them in the snapshot. Are these settings ok OR some
> thing need to be switch between IRAM and SDRAM ?
>
> http://i53.tinypic.com/jhahee.jpg
>
> By doing so, I am not getting 'creating output section' warning but it
> is now saving values in data_stats and then writing to TEXT file.
>
> This is how I am writing to text file.
>
> FILE *fp;
> fp = fopen("Samples.txt", "w");
>
> for(j=0; j > {
> fprintf(fp, "%f\n", data_stats[j] );
> }
>
> fclose(fp);
> exit(1);
>
> When the size of data_stats is not more than some X size, program
> exits fine after writing data to text file but as I increase the size
> of data_stats to 100,000, it never exits after writing to text file.
> When I halt the program I see the cursor at momory section:
> RTDX_Final_RT_Monitor. Snapshot also shows Disassembly view.
>
> What should I change to configure the SDRAM properly ?
>
> Thanks.
>
> ________________________________
> From: Richard Williams
> To: B S ; c...
> Sent: Wed, February 2, 2011 8:52:56 PM
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> B.S.
>
> I see a few 'ooops' in the configuration area.
>
> For instance....
> the '.EXT_RAM' section does not exist.
> however, 'SDRAM' does exist.
> so your pragma should look like this:
> $pragma DATA_SECTION(data_stats,"SDRAM")
> unless you define a specific section in the configuration named
> '.EXT_RAM' that is large enough to hold your complete data table. If
> you do define a .EXT_RAM section, then the size of the SDRAM section
> must be reduced by an equal amount and the starting address of each
> section adjusted so the sections do not overlap.
>
> Then, as I looked at the configuration settings, I noticed:
>
> 1) the 'heap' is in SDRAM, that is not a really good idea unless the
> application needs lots of room in the heap.
>
> 2) the 'stack' section is in SDRAM, that is a very bad idea
> because the stack is referenced OFTEN and there is a major execution speed
> penalty for having it in any place other than IRAM.
>
> 3) The BIOS sections need to be 'fast' so should be in IRAM
>
> 4) The startup code is only executed once, so placing it in SDRAM is probably
> ok, however; I would have left it in FLASH and executed it from FLASH.
>
> 5) You want interrupt servicing to be 'fast', so the interrupt service
> table should be in IRAM.
>
> 6) The 'text' section is the actual executable code. so placing it in
> SDRAM is a major execution speed penalty.
>
> 7) If your code is initially in FLASH, then the jump switch tables should
> probably be left in FLASH. They are actually part of the executable
> code, but their usage is minimal (for most programs).
>
> 8) The '.cinit' section is only referenced during the startup code
> execution, so leaving it in FLASH is a very good idea. BTW this is
> initialization values for the ram data. It will be 'gone' over a
> power cycle.
>
> 9) The '.const' section never changes and is rarely referenced, so
> leaving it in FLASH is a good idea.
>
> 10) The '.data' section is your program variables that will be initialized
> during the startup code execution. Since such variables are usually referenced
> often, it is a good idea to have them in IRAM. (however, that actual
> initialization values can be left in FLASH as they are only referenced
> once during the startup code.
>
> BTW:
> the whole idea was to make your link work.
> The only problem with your link was the data_stats being too large to
> fit into the IRAM. If I were doing this, the only thing I would have
> moved is the data_stats and left everything else in IRAM/FLASH. Note:
> there is a execution speed penalty for items in FLASH and usually also
> for items in SDRAM.
>
> BTW:
> It looks like there is no definition of the FLASH area.
> IMO that should be added, so certain sections can be left in the FLASH,
> rather than (during the startup code) copied into xxRAM then copied
> again into their final execution/data location.
>
> BTW:
> I'm not sure if the DSP you are using has any differentiation between
> 'far' and 'near' addresses, but if it does, then I would plan the
> memory layout to use 'near' addresses when executing code that is run
> often or needs to run fast.
>
> BTW:
> if you move all the executable code out of SDRAM, then you can improve
> the definition of SDRAM to be only data rather than code/data.
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S
> To: Richard Williams , c...
> Sent: Wed, 2 Feb 2011 08:59:04 -0800 (PST)
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> > Hi,
> >
> > Yes, I have 16 MEG SDRAM available and I added SDRAM IN MEMORY SECTION
> > MANAGER using DSP/BIOS.
> >
> > Here attached snapshot to show all the settings I chosen for External
> > Memory. http://i53.tinypic.com/1z4vjo7.jpg
> >
> > I used this line to define data_stats buffer in EXT RAM
> > #pragma DATA_SECTION(data_stats,".EXT_RAM")
> >
> > When I build my project, I get following error.
> > warning: creating output section .EXT_RAM without SECTIONS specification
> >
> > Even after this my program runs, it saved values in data_stats buffer
> > but when I write those values to .text file, it doesn't write any
> > thing, text file is just blank. What is wrong here ?
> >
> > Richard, you said to modify memory map, via the config tool, to
> > include the available external RAM. I don't know how to di it. Is it
> > causing trouble ?
> >
> > Please help me.
> >
> > ________________________________
> > From: Richard Williams
> > To: B S ; c...
> > Sent: Fri, January 28, 2011 8:44:42 PM
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > B.S.
> >
> > If your looking at the 6713 architecture manual (available for
> > download at TI.com) part number SPRS186L,pdf then you see, on page 16
> > the memory map and on page 17 the various ways the 'IRAM' portion of
> > the memory map can be allocated as L2 cache+IRAM.
> >
> > Your program, per the linker error messages is larger than the
> > available IRAM.
> >
> > I say again : Your program is TOO BIG for the size of the IRAM.
> >
> > Does your development board have any external RAM implemented?
> >
> > If yes, then modify the configuration file, using the config tool, and
> > move the data table to the external RAM. You will also have to modify
> > the memory map, via the config tool, to include the available external
> > RAM.
> >
> > If no, then you will have to implement some external RAM (via
> > additional hardware) and move the data table to the external RAM via
> > the config tool.
> >
> > BTW:
> > Turning the ""Enable Memory Maping" off is a bad idea as this stops
> > the linker from checking that the program will fit within the
> > available RAM.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S
> > To: Richard Williams , c...
> > Sent: Fri, 28 Jan 2011 07:08:58 -0800 (PST)
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > > Hi Richard Williams,
> > >
> > > I have been looking at the DSP Architecture Manual.
> > >
> > > Here attached the cmd file.
> > >
> > > /* MODULE PARAMETERS */
> > > GBL_USERINITFXN = _FXN_F_nop;
> > >
> > > MEM_SEGZERO = IRAM;
> > > MEM_MALLOCSEG = IRAM;
> > >
> > > CLK_TIMEFXN = CLK_F_getshtime;
> > > CLK_HOOKFXN = HWI_F_dispatch;
> > >
> > > PRD_THOOKFXN = _KNL_tick;
> > >
> > > RTDX_DATAMEMSEG = IRAM;
> > >
> > > HST_DSMBUFSEG = IRAM;
> > >
> > > SWI_EHOOKFXN = GBL_NULL;
> > > SWI_IHOOKFXN = GBL_NULL;
> > > SWI_EXECFXN = SWI_F_iexec;
> > > SWI_RUNFXN = SWI_F_run;
> > >
> > > TSK_STACKSEG = IRAM;
> > > TSK_VCREATEFXN = _FXN_F_nop;
> > > TSK_VDELETEFXN = _FXN_F_nop;
> > > TSK_VEXITFXN = _FXN_F_nop;
> > >
> > > IDL_CALIBRFXN = IDL_F_stub;
> > >
> > > SYS_ABORTFXN = _UTL_doAbort;
> > > SYS_ERRORFXN = _UTL_doError;
> > > SYS_EXITFXN = _UTL_halt;
> > > SYS_PUTCFXN = _UTL_doPutc;
> > >
> > > GIO_CREATEFXN = _FXN_F_nop;
> > > GIO_DELETEFXN = _FXN_F_nop;
> > > GIO_PENDFXN = _FXN_F_nop;
> > > GIO_POSTFXN = _FXN_F_nop;
> > >
> > > /* OBJECT ALIASES */
> > > _IRAM = IRAM;
> > > _PRD_clock = PRD_clock;
> > > _RTA_fromHost = RTA_fromHost;
> > > _RTA_toHost = RTA_toHost;
> > > _HWI_RESET = HWI_RESET;
> > > _HWI_NMI = HWI_NMI;
> > > _HWI_RESERVED0 = HWI_RESERVED0;
> > > _HWI_RESERVED1 = HWI_RESERVED1;
> > > _HWI_INT4 = HWI_INT4;
> > > _HWI_INT5 = HWI_INT5;
> > > _HWI_INT6 = HWI_INT6;
> > > _HWI_INT7 = HWI_INT7;
> > > _HWI_INT8 = HWI_INT8;
> > > _HWI_INT9 = HWI_INT9;
> > > _HWI_INT10 = HWI_INT10;
> > > _HWI_INT11 = HWI_INT11;
> > > _HWI_INT12 = HWI_INT12;
> > > _HWI_INT13 = HWI_INT13;
> > > _HWI_INT14 = HWI_INT14;
> > > _HWI_INT15 = HWI_INT15;
> > > _KNL_swi = KNL_swi;
> > > _TSK_idle = TSK_idle;
> > > _LNK_dataPump = LNK_dataPump;
> > > _RTA_dispatcher = RTA_dispatcher;
> > > _IDL_cpuLoad = IDL_cpuLoad;
> > > _LOG_system = LOG_system;
> > > _IDL_busyObj = IDL_busyObj;
> > >
> > > /* MODULE GBL */
> > >
> > > SECTIONS {
> > > .vers (COPY): {} /* version information */
> > > }
> > >
> > > -priority
> > > -llnkrtdx.a62
> > > -ldrivers.a67 /* device drivers support */
> > > -lsioboth.a62 /* supports both SIO models */
> > > -lbiosi.a62 /* DSP/BIOS support */
> > > -lrtdx.lib /* RTDX support */
> > > -lcsl6713.lib
> > > -lrts6700.lib /* C and C++ run-time library support */
> > >
> > > _GBL_CACHE = GBL_CACHE;
> > >
> > > /* MODULE MEM */
> > > -stack 0x400
> > > MEMORY {
> > > IRAM : origin = 0x0, len = 0x40000
> > > }
> > > /* MODULE CLK */
> > > SECTIONS {
> > > .clk: {
> > > _CLK_start = _CLK_start6x;
> > > CLK_F_gethtime = CLK_F_getshtime;
> > > CLK_A_TABBEG = .;
> > > *(.clk)
> > > CLK_A_TABEND = .;
> > > CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> > > } > IRAM
> > > }
> > > _CLK_PRD = CLK_PRD;
> > > _CLK_COUNTSPMS = CLK_COUNTSPMS;
> > > _CLK_REGS = CLK_REGS;
> > > _CLK_USETIMER = CLK_USETIMER;
> > > _CLK_TIMERNUM = CLK_TIMERNUM;
> > > _CLK_TDDR = CLK_TDDR;
> > >
> > > /* MODULE PRD */
> > > SECTIONS {
> > > .prd: {
> > > PRD_A_TABBEG = .;
> > > /* no PRD objects */
> > > PRD_A_TABEND = .;
> > > PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> > > } > IRAM
> > > }
> > >
> > > /* MODULE RTDX */
> > > _RTDX_interrupt_mask = 0x0;
> > >
> > > /* MODULE HWI */
> > > SECTIONS {
> > > .hwi_vec: 0x0 {
> > > HWI_A_VECS = .;
> > > *(.hwi_vec)
> > > }
> > > }
> > >
> > > /* MODULE SWI */
> > > SECTIONS {
> > > .swi: {
> > > SWI_A_TABBEG = .;
> > > *(.swi)
> > > SWI_A_TABEND = .;
> > > SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> > > } > IRAM
> > > }
> > >
> > > /* MODULE IDL */
> > > SECTIONS {
> > > .idl: {
> > > IDL_A_TABBEG = .;
> > > *(.idl)
> > > IDL_A_TABEND = .;
> > > IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> > > IDL_A_CALBEG = .;
> > > *(.idlcal)
> > > IDL_A_CALEND = .;
> > > IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> > > } > IRAM
> > > }
> > >
> > > SECTIONS {
> > > .bss: {} > IRAM
> > >
> > > .far: {} > IRAM
> > >
> > > .sysdata: {} > IRAM
> > >
> > > .mem: {} > IRAM
> > >
> > > .sysinit: {} > IRAM
> > >
> > > .sysregs: {} > IRAM
> > >
> > > .gblinit: {} > IRAM
> > >
> > > .trcdata: {} > IRAM
> > >
> > > .args: fill=0 {
> > > *(.args)
> > > . += 0x4;
> > > } > IRAM
> > >
> > > .cinit: {} > IRAM
> > >
> > > .pinit: {} > IRAM
> > >
> > > .data: {} > IRAM
> > >
> > > .const: {} > IRAM
> > >
> > > .switch: {} > IRAM
> > >
> > > .cio: {} > IRAM
> > >
> > > .text: {} > IRAM
> > >
> > > frt: {} > IRAM
> > >
> > > .bios: {} > IRAM
> > >
> > > .stack: fill=0xc0ffee {
> > > GBL_stackbeg = .;
> > > *(.stack)
> > > GBL_stackend = GBL_stackbeg + 0x400 - 1;
> > > _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> > > _HWI_STKTOP = GBL_stackbeg;
> > > } > IRAM
> > >
> > > .trace: fill = 0x0 {
> > > _SYS_PUTCBEG = .;
> > > . += 0x200;
> > > _SYS_PUTCEND = . - 1;
> > > } > IRAM
> > >
> > > .rtdx_data: {} > IRAM
> > >
> > > .rtdx_text: {} > IRAM
> > >
> > > .hst: {
> > > HST_A_TABBEG = .;
> > > _HST_A_TABBEG = .;
> > > *(.hst)
> > > HST_A_TABEND = .;
> > > _HST_A_TABEND = .;
> > > HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > } > IRAM
> > >
> > > .dsm: {} > IRAM"Enable Memory Maping"
> > >
> > > /* RTA_fromHost buffer */
> > > .hst1: align = 0x4 {} > IRAM
> > >
> > > /* RTA_toHost buffer */
> > > .hst0: align = 0x4 {} > IRAM
> > >
> > > .hwi: {} > IRAM
> > >
> > > .tsk: {
> > > *(.tsk)
> > > } > IRAM
> > >
> > > .TSK_idle$stk: {
> > > *(.TSK_idle$stk)
> > > } > IRAM
> > >
> > > .log: {
> > > LOG_A_TABBEG = .;
> > > _LOG_A_TABBEG = .;
> > > *(.log)
> > > LOG_A_TABEND = .;
> > > _LOG_A_TABEND = .;
> > > LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > } > IRAM
> > >
> > > .printf (COPY): {} > IRAM
> > >
> > > /* LOG_system buffer */
> > > .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
> > >
> > > .pip: {
> > > PIP_A_TABBEG = .;
> > > _PIP_A_TABBEG = .;
> > > *(.pip)
> > > PIP_A_TABEND = .;
> > > _PIP_A_TABEND = .;
> > > PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > } > IRAM
> > >
> > > .sts: {
> > > STS_A_TABBEG = .;
> > > _STS_A_TABBEG = .;
> > > *(.sts)
> > > STS_A_TABEND = .;
> > > _STS_A_TABEND = .;
> > > STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > } > IRAM
> > >
> > > .sys: {} > IRAM
> > >
> > > .gio: {} > IRAM
> > >
> > > .IRAM$heap: {
> > > IRAM$B = .;
> > > _IRAM_base = .;
> > > IRAM$L = 0x8000;
> > > _IRAM_length = 0x8000;
> > > . += 0x8000;
> > > } > IRAM
> > >
> > > }
> > >
> > > I am also getting the message given below but when I remove the check
> > > from "Enable Memory Maping" tab it solves the problem but I don't know
> > > why it some time happens ?
> > >
> > > Loader: One or more sections of your program falls into a memory
> > > region that is not writable. These regions will not actually be
> > > written to the target. Check your linker configuration and/or memory map.
> > >
> > > Thanks.
> > >
> > > ________________________________
> > > From: Richard Williams
> > > To: B S ; c...
> > > Sent: Wed, January 26, 2011 9:01:26 PM
> > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > >
> > > B.S.
> > >
> > > Those error messages are from the linker. Not from running the code.
> > > It seems this is an excellent time for you to read the DSP
> > > architecture manual for the chip you are using and read the
> > > information on the .cmd file for the linker.
> > >
> > > They mean there is not enough room in the IRAM memory section.
> > >
> > > You will probably have to move the data points table to external RAM.
> > > BTW:
> > > How much external RAM do you have implemented on your project?
> > >
> > > BTW:
> > > if you have the problem again, then please paste the .cmd file listing
> > > in your post.
> > >
> > > R. Williams
> > >
> > > ---------- Original Message -----------
> > > From: B S
> > > To: c...
> > > Sent: Wed, 26 Jan 2011 08:22:32 -0800 (PST)
> > > Subject: [c6x] C6713- Momory Allocation Probolem
> > >
> > > > Hi,
> > > >
> > > > I have been trying to save over 50,000 data points in run time and
> > > > then transfer them to a text file. When I am running my code for 25,
> > > > 000 data points, it's running fine but giving so many errors as given
> > > > below when I increase the size of buffer to 51200. I really don't know
> > > > what does it mean.
> > > >
> > > > >> error: can't allocate .text, size 00004960 (page 0) in IRAM (avail:
> > > > >>000001d0)
> > > > >> error: can't allocate .bios, size 00003c60 (page 0) in IRAM (avail:
> > > > >>000001d0)
> > > > >> error: can't allocate .cinit, size 0000105c (page 0) in IRAM (avail:
> > > > >>000001d0)
> > > > >> error: can't allocate .rtdx_text, size 00000cc0 (page 0) in IRAM
> >(avail:
> >
> > >
> > > > >>000001d0)
> > > > >> error: can't allocate .bss, size 000004b8 (page 0) in IRAM (avail:
> > >
> > > > >>000001d0)
> > > > >> error: can't allocate .rtdx_data, size 0000044c (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .stack, size 00000400 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .TSK_idle$stk, size 00000400 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .sysinit, size 00000360 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .trace, size 00000200 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .LOG_system$buf, size 00000100 (page 0) in
> > > > >>IRAM (avail: 000000d0)
> > > > >> error: can't allocate .tsk, size 00000060 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .const, size 00000046 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .sts, size 00000030 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .swi, size 0000002c (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .hst, size 0000002c (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .gblinit, size 00000028 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .switch, size 00000028 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .idl, size 00000020 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .log, size 00000018 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .hst1, size 00000010 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .sys, size 00000010 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .trcdata, size 0000000c (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .pinit, size 0000000c (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .mem, size 00000004 (page 0) in IRAM (avail:
> > >
> > > > >>00000000)
> > > > >> error: can't allocate .args, size 00000004 (page 0) in IRAM
> > > > >>(avail: 00000000)
> > > > >> error: errors in input - ./Debug/ADS7881_BAS.out not built
> > > >
> > > > >> Compilation failure
> > > >
> > > > Build Complete,
> > > > 28 Errors, 0 Warnings, 0 Remarks.
> > > >
> > > > Will some one please help me out with issue ? How can I save larger
> > > > data values ? How much is the limit for C6713 ?
> > > >
> > > > I will appreciate your help.
> > > >
> > > > -BAS
> > > ------- End of Original Message -------
> > ------- End of Original Message -------
> >
> >
> ------- End of Original Message -------
------- End of Original Message -------

_____________________________________
BS,

Did you include your SECTION or specify your section name in the linker
command file (.cmd) ?

Thanks,

On Wed, Feb 2, 2011 at 9:59 AM, B S wrote:

> Hi,
>
> Yes, I have 16 MEG SDRAM available and I added SDRAM IN MEMORY SECTION
> MANAGER using DSP/BIOS.
>
> Here attached snapshot to show all the settings I chosen for External
> Memory.
> http://i53.tinypic.com/1z4vjo7.jpg
>
> I used this line to define data_stats buffer in EXT RAM
> #pragma DATA_SECTION(data_stats,".EXT_RAM")
>
> When I build my project, I get following error.
> warning: creating output section .EXT_RAM without SECTIONS specification
>
> Even after this my program runs, it saved values in data_stats buffer but
> when I write those values to .text file, it doesn't write any thing, text
> file is just blank. What is wrong here ?
>
> Richard, you said to modify memory map, via the config tool, to include the
> available external RAM. I don't know how to di it. Is it causing trouble ?
>
> Please help me.
> ------------------------------
> *From:* Richard Williams
> *To:* B S ; c...
> *Sent:* Fri, January 28, 2011 8:44:42 PM
>
> *Subject:* Re: [c6x] C6713- Momory Allocation Probolem
> B.S.
>
> If your looking at the 6713 architecture manual (available for download at
> TI.com) part number SPRS186L,pdf then you see, on page 16 the memory map
> and on
> page 17 the various ways the 'IRAM' portion of the memory map can be
> allocated
> as L2 cache+IRAM.
>
> Your program, per the linker error messages is larger than the available
> IRAM.
>
> I say again : Your program is TOO BIG for the size of the IRAM.
>
> Does your development board have any external RAM implemented?
>
> If yes, then modify the configuration file, using the config tool, and move
> the
> data table to the external RAM. You will also have to modify the memory
> map,
> via the config tool, to include the available external RAM.
>
> If no, then you will have to implement some external RAM (via additional
> hardware) and move the data table to the external RAM via the config tool.
>
> BTW:
> Turning the ""Enable Memory Maping" off is a bad idea as this stops the
> linker
> from checking that the program will fit within the available RAM.
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S >
> To: Richard Williams >,
> c...
> Sent: Fri, 28 Jan 2011 07:08:58 -0800 (PST)
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> > Hi Richard Williams,
> >
> > I have been looking at the DSP Architecture Manual.
> >
> > Here attached the cmd file.
> >
> > /* MODULE PARAMETERS */
> > GBL_USERINITFXN = _FXN_F_nop;
> >
> > MEM_SEGZERO = IRAM;
> > MEM_MALLOCSEG = IRAM;
> >
> > CLK_TIMEFXN = CLK_F_getshtime;
> > CLK_HOOKFXN = HWI_F_dispatch;
> >
> > PRD_THOOKFXN = _KNL_tick;
> >
> > RTDX_DATAMEMSEG = IRAM;
> >
> > HST_DSMBUFSEG = IRAM;
> >
> > SWI_EHOOKFXN = GBL_NULL;
> > SWI_IHOOKFXN = GBL_NULL;
> > SWI_EXECFXN = SWI_F_iexec;
> > SWI_RUNFXN = SWI_F_run;
> >
> > TSK_STACKSEG = IRAM;
> > TSK_VCREATEFXN = _FXN_F_nop;
> > TSK_VDELETEFXN = _FXN_F_nop;
> > TSK_VEXITFXN = _FXN_F_nop;
> >
> > IDL_CALIBRFXN = IDL_F_stub;
> >
> > SYS_ABORTFXN = _UTL_doAbort;
> > SYS_ERRORFXN = _UTL_doError;
> > SYS_EXITFXN = _UTL_halt;
> > SYS_PUTCFXN = _UTL_doPutc;
> >
> > GIO_CREATEFXN = _FXN_F_nop;
> > GIO_DELETEFXN = _FXN_F_nop;
> > GIO_PENDFXN = _FXN_F_nop;
> > GIO_POSTFXN = _FXN_F_nop;
> >
> > /* OBJECT ALIASES */
> > _IRAM = IRAM;
> > _PRD_clock = PRD_clock;
> > _RTA_fromHost = RTA_fromHost;
> > _RTA_toHost = RTA_toHost;
> > _HWI_RESET = HWI_RESET;
> > _HWI_NMI = HWI_NMI;
> > _HWI_RESERVED0 = HWI_RESERVED0;
> > _HWI_RESERVED1 = HWI_RESERVED1;
> > _HWI_INT4 = HWI_INT4;
> > _HWI_INT5 = HWI_INT5;
> > _HWI_INT6 = HWI_INT6;
> > _HWI_INT7 = HWI_INT7;
> > _HWI_INT8 = HWI_INT8;
> > _HWI_INT9 = HWI_INT9;
> > _HWI_INT10 = HWI_INT10;
> > _HWI_INT11 = HWI_INT11;
> > _HWI_INT12 = HWI_INT12;
> > _HWI_INT13 = HWI_INT13;
> > _HWI_INT14 = HWI_INT14;
> > _HWI_INT15 = HWI_INT15;
> > _KNL_swi = KNL_swi;
> > _TSK_idle = TSK_idle;
> > _LNK_dataPump = LNK_dataPump;
> > _RTA_dispatcher = RTA_dispatcher;
> > _IDL_cpuLoad = IDL_cpuLoad;
> > _LOG_system = LOG_system;
> > _IDL_busyObj = IDL_busyObj;
> >
> > /* MODULE GBL */
> >
> > SECTIONS {
> > .vers (COPY): {} /* version information */
> > }
> >
> > -priority
> > -llnkrtdx.a62
> > -ldrivers.a67 /* device drivers support */
> > -lsioboth.a62 /* supports both SIO models */
> > -lbiosi.a62 /* DSP/BIOS support */
> > -lrtdx.lib /* RTDX support */
> > -lcsl6713.lib
> > -lrts6700.lib /* C and C++ run-time library support */
> >
> > _GBL_CACHE = GBL_CACHE;
> >
> > /* MODULE MEM */
> > -stack 0x400
> > MEMORY {
> > IRAM : origin = 0x0, len = 0x40000
> > }
> > /* MODULE CLK */
> > SECTIONS {
> > .clk: {
> > _CLK_start = _CLK_start6x;
> > CLK_F_gethtime = CLK_F_getshtime;
> > CLK_A_TABBEG = .;
> > *(.clk)
> > CLK_A_TABEND = .;
> > CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> > } > IRAM
> > }
> > _CLK_PRD = CLK_PRD;
> > _CLK_COUNTSPMS = CLK_COUNTSPMS;
> > _CLK_REGS = CLK_REGS;
> > _CLK_USETIMER = CLK_USETIMER;
> > _CLK_TIMERNUM = CLK_TIMERNUM;
> > _CLK_TDDR = CLK_TDDR;
> >
> > /* MODULE PRD */
> > SECTIONS {
> > .prd: {
> > PRD_A_TABBEG = .;
> > /* no PRD objects */
> > PRD_A_TABEND = .;
> > PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> > } > IRAM
> > }
> >
> > /* MODULE RTDX */
> > _RTDX_interrupt_mask = 0x0;
> >
> > /* MODULE HWI */
> > SECTIONS {
> > .hwi_vec: 0x0 {
> > HWI_A_VECS = .;
> > *(.hwi_vec)
> > }
> > }
> >
> > /* MODULE SWI */
> > SECTIONS {
> > .swi: {
> > SWI_A_TABBEG = .;
> > *(.swi)
> > SWI_A_TABEND = .;
> > SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> > } > IRAM
> > }
> >
> > /* MODULE IDL */
> > SECTIONS {
> > .idl: {
> > IDL_A_TABBEG = .;
> > *(.idl)
> > IDL_A_TABEND = .;
> > IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> > IDL_A_CALBEG = .;
> > *(.idlcal)
> > IDL_A_CALEND = .;
> > IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> > } > IRAM
> > }
> >
> > SECTIONS {
> > .bss: {} > IRAM
> >
> > .far: {} > IRAM
> >
> > .sysdata: {} > IRAM
> >
> > .mem: {} > IRAM
> >
> > .sysinit: {} > IRAM
> >
> > .sysregs: {} > IRAM
> >
> > .gblinit: {} > IRAM
> >
> > .trcdata: {} > IRAM
> >
> > .args: fill=0 {
> > *(.args)
> > . += 0x4;
> > } > IRAM
> >
> > .cinit: {} > IRAM
> >
> > .pinit: {} > IRAM
> >
> > .data: {} > IRAM
> >
> > .const: {} > IRAM
> >
> > .switch: {} > IRAM
> >
> > .cio: {} > IRAM
> >
> > .text: {} > IRAM
> >
> > frt: {} > IRAM
> >
> > .bios: {} > IRAM
> >
> > .stack: fill=0xc0ffee {
> > GBL_stackbeg = .;
> > *(.stack)
> > GBL_stackend = GBL_stackbeg + 0x400 - 1;
> > _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> > _HWI_STKTOP = GBL_stackbeg;
> > } > IRAM
> >
> > .trace: fill = 0x0 {
> > _SYS_PUTCBEG = .;
> > . += 0x200;
> > _SYS_PUTCEND = . - 1;
> > } > IRAM
> >
> > .rtdx_data: {} > IRAM
> >
> > .rtdx_text: {} > IRAM
> >
> > .hst: {
> > HST_A_TABBEG = .;
> > _HST_A_TABBEG = .;
> > *(.hst)
> > HST_A_TABEND = .;
> > _HST_A_TABEND = .;
> > HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > } > IRAM
> >
> > .dsm: {} > IRAM"Enable Memory Maping"
> >
> > /* RTA_fromHost buffer */
> > .hst1: align = 0x4 {} > IRAM
> >
> > /* RTA_toHost buffer */
> > .hst0: align = 0x4 {} > IRAM
> >
> > .hwi: {} > IRAM
> >
> > .tsk: {
> > *(.tsk)
> > } > IRAM
> >
> > .TSK_idle$stk: {
> > *(.TSK_idle$stk)
> > } > IRAM
> >
> > .log: {
> > LOG_A_TABBEG = .;
> > _LOG_A_TABBEG = .;
> > *(.log)
> > LOG_A_TABEND = .;
> > _LOG_A_TABEND = .;
> > LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > } > IRAM
> >
> > .printf (COPY): {} > IRAM
> >
> > /* LOG_system buffer */
> > .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
> >
> > .pip: {
> > PIP_A_TABBEG = .;
> > _PIP_A_TABBEG = .;
> > *(.pip)
> > PIP_A_TABEND = .;
> > _PIP_A_TABEND = .;
> > PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > } > IRAM
> >
> > .sts: {
> > STS_A_TABBEG = .;
> > _STS_A_TABBEG = .;
> > *(.sts)
> > STS_A_TABEND = .;
> > _STS_A_TABEND = .;
> > STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > } > IRAM
> >
> > .sys: {} > IRAM
> >
> > .gio: {} > IRAM
> >
> > .IRAM$heap: {
> > IRAM$B = .;
> > _IRAM_base = .;
> > IRAM$L = 0x8000;
> > _IRAM_length = 0x8000;
> > . += 0x8000;
> > } > IRAM
> >
> > }
> >
> > I am also getting the message given below but when I remove the check
> > from "Enable Memory Maping" tab it solves the problem but I don't know
> > why it some time happens ?
> >
> > Loader: One or more sections of your program falls into a memory
> > region that is not writable. These regions will not actually be
> > written to the target. Check your linker configuration and/or memory map.
> >
> > Thanks.
> >
> > ________________________________
> > From: Richard Williams
> >
> > To: B S >;
> c...
> > Sent: Wed, January 26, 2011 9:01:26 PM
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > B.S.
> >
> > Those error messages are from the linker. Not from running the code.
> > It seems this is an excellent time for you to read the DSP
> > architecture manual for the chip you are using and read the
> > information on the .cmd file for the linker.
> >
> > They mean there is not enough room in the IRAM memory section.
> >
> > You will probably have to move the data points table to external RAM.
> > BTW:
> > How much external RAM do you have implemented on your project?
> >
> > BTW:
> > if you have the problem again, then please paste the .cmd file listing
> > in your post.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S >
> > To: c...
> > Sent: Wed, 26 Jan 2011 08:22:32 -0800 (PST)
> > Subject: [c6x] C6713- Momory Allocation Probolem
> >
> > > Hi,
> > >
> > > I have been trying to save over 50,000 data points in run time and
> > > then transfer them to a text file. When I am running my code for 25,
> > > 000 data points, it's running fine but giving so many errors as given
> > > below when I increase the size of buffer to 51200. I really don't know
> > > what does it mean.
> > >
> > > >> error: can't allocate .text, size 00004960 (page 0) in IRAM (avail:
> > > >>000001d0)
> > > >> error: can't allocate .bios, size 00003c60 (page 0) in IRAM (avail:
> > > >>000001d0)
> > > >> error: can't allocate .cinit, size 0000105c (page 0) in IRAM (avail:
>
> > > >>000001d0)
> > > >> error: can't allocate .rtdx_text, size 00000cc0 (page 0) in IRAM
> (avail:
> > > >>000001d0)
> > > >> error: can't allocate .bss, size 000004b8 (page 0) in IRAM (avail:
> >
> > > >>000001d0)
> > > >> error: can't allocate .rtdx_data, size 0000044c (page 0) in IRAM
> > > >>(avail: 000001d0)
> > > >> error: can't allocate .stack, size 00000400 (page 0) in IRAM
> > > >>(avail: 000001d0)
> > > >> error: can't allocate .TSK_idle$stk, size 00000400 (page 0) in IRAM
> > > >>(avail: 000001d0)
> > > >> error: can't allocate .sysinit, size 00000360 (page 0) in IRAM
> > > >>(avail: 000001d0)
> > > >> error: can't allocate .trace, size 00000200 (page 0) in IRAM
> > > >>(avail: 000001d0)
> > > >> error: can't allocate .LOG_system$buf, size 00000100 (page 0) in
> > > >>IRAM (avail: 000000d0)
> > > >> error: can't allocate .tsk, size 00000060 (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .const, size 00000046 (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .sts, size 00000030 (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .swi, size 0000002c (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .hst, size 0000002c (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .gblinit, size 00000028 (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .switch, size 00000028 (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .idl, size 00000020 (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .log, size 00000018 (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .hst1, size 00000010 (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .sys, size 00000010 (page 0) in IRAM (avail:
> >
> > > >>00000008)
> > > >> error: can't allocate .trcdata, size 0000000c (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .pinit, size 0000000c (page 0) in IRAM
> > > >>(avail: 00000008)
> > > >> error: can't allocate .mem, size 00000004 (page 0) in IRAM (avail:
> >
> > > >>00000000)
> > > >> error: can't allocate .args, size 00000004 (page 0) in IRAM
> > > >>(avail: 00000000)
> > > >> error: errors in input - ./Debug/ADS7881_BAS.out not built
> > >
> > > >> Compilation failure
> > >
> > > Build Complete,
> > > 28 Errors, 0 Warnings, 0 Remarks.
> > >
> > > Will some one please help me out with issue ? How can I save larger
> > > data values ? How much is the limit for C6713 ?
> > >
> > > I will appreciate your help.
> > >
> > > -BAS
> > ------- End of Original Message -------
> ------- End of Original Message -------
>
>

--
Varun
B.S.

I have a question, what is the definition of 'j' in the code snipit that you
provided.

Note: 'short int' has a max value of approx +/- 32k.
Note: 'int' has max value of approx +/- 2gig.

If the 'j' variable is defined as 'short int' then it will never reach the end
of a loop that is trying to iterate 100000 times.

Regarding the error message you are getting..
The problem origination is an error in the MEMORY and SECTIONS definitions using
the configuration tool.

BTW:
Why did you move the .data section to SDRAM?
It was doing fine in IRAM.

In fact everything was doing fine in IRAM until the data_stats array got too big.

My suggestion (which you have partly implemented) is to ONLY move the data_stats
array to the SDRAM address space.

In otherwords,

The .cmd file needs to have a line in the MEMORY{} that reads something like this:
SDRAM RW origin=0x100000000, length=0x100000

The .cmd file needs to have a line in the SECTIONS{} that reads something like this:
EXT_RAM : LOAD = SDRAM TYPE=DSECT ALIGN2

To help with your understanding of the .cmd file, you may want to read
SPRU186u.pdf, "TMS320C6000 Assembly Language Tools" available for download from
TI.com.
beginning around page 184 "7.5 Linker Command Files"
R. Williams
---------- Original Message -----------
From: B S
To: Richard Williams , c...
Sent: Thu, 3 Feb 2011 08:05:18 -0800 (PST)
Subject: Re: [c6x] C6713- Momory Allocation Probolem

> R. Williams,
>
> I tried with 'SDRAM' but it says the same thing (creating output
> section .SDRAM without SECTIONS specification).
>
> I changed the configuration settings, I removed 'heap' from SDRAM and
> used SDRAM for Data Section (.data) under COMPILER SECTIONS tab, You
> can see all of them in the snapshot. Are these settings ok OR some
> thing need to be switch between IRAM and SDRAM ?
>
> http://i53.tinypic.com/jhahee.jpg
>
> By doing so, I am not getting 'creating output section' warning but it
> is now saving values in data_stats and then writing to TEXT file.
>
> This is how I am writing to text file.
>
> FILE *fp;
> fp = fopen("Samples.txt", "w");
>
> for(j=0; j > {
> fprintf(fp, "%f\n", data_stats[j] );
> }
>
> fclose(fp);
> exit(1);
>
> When the size of data_stats is not more than some X size, program
> exits fine after writing data to text file but as I increase the size
> of data_stats to 100,000, it never exits after writing to text file.
> When I halt the program I see the cursor at momory section:
> RTDX_Final_RT_Monitor. Snapshot also shows Disassembly view.
>
> What should I change to configure the SDRAM properly ?
>
> Thanks.
>
> ________________________________
> From: Richard Williams
> To: B S ; c...
> Sent: Wed, February 2, 2011 8:52:56 PM
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> B.S.
>
> I see a few 'ooops' in the configuration area.
>
> For instance....
> the '.EXT_RAM' section does not exist.
> however, 'SDRAM' does exist.
> so your pragma should look like this:
> $pragma DATA_SECTION(data_stats,"SDRAM")
> unless you define a specific section in the configuration named
> '.EXT_RAM' that is large enough to hold your complete data table. If
> you do define a .EXT_RAM section, then the size of the SDRAM section
> must be reduced by an equal amount and the starting address of each
> section adjusted so the sections do not overlap.
>
> Then, as I looked at the configuration settings, I noticed:
>
> 1) the 'heap' is in SDRAM, that is not a really good idea unless the
> application needs lots of room in the heap.
>
> 2) the 'stack' section is in SDRAM, that is a very bad idea
> because the stack is referenced OFTEN and there is a major execution speed
> penalty for having it in any place other than IRAM.
>
> 3) The BIOS sections need to be 'fast' so should be in IRAM
>
> 4) The startup code is only executed once, so placing it in SDRAM is probably
> ok, however; I would have left it in FLASH and executed it from FLASH.
>
> 5) You want interrupt servicing to be 'fast', so the interrupt service
> table should be in IRAM.
>
> 6) The 'text' section is the actual executable code. so placing it in
> SDRAM is a major execution speed penalty.
>
> 7) If your code is initially in FLASH, then the jump switch tables should
> probably be left in FLASH. They are actually part of the executable
> code, but their usage is minimal (for most programs).
>
> 8) The '.cinit' section is only referenced during the startup code
> execution, so leaving it in FLASH is a very good idea. BTW this is
> initialization values for the ram data. It will be 'gone' over a
> power cycle.
>
> 9) The '.const' section never changes and is rarely referenced, so
> leaving it in FLASH is a good idea.
>
> 10) The '.data' section is your program variables that will be initialized
> during the startup code execution. Since such variables are usually referenced
> often, it is a good idea to have them in IRAM. (however, that actual
> initialization values can be left in FLASH as they are only referenced
> once during the startup code.
>
> BTW:
> the whole idea was to make your link work.
> The only problem with your link was the data_stats being too large to
> fit into the IRAM. If I were doing this, the only thing I would have
> moved is the data_stats and left everything else in IRAM/FLASH. Note:
> there is a execution speed penalty for items in FLASH and usually also
> for items in SDRAM.
>
> BTW:
> It looks like there is no definition of the FLASH area.
> IMO that should be added, so certain sections can be left in the FLASH,
> rather than (during the startup code) copied into xxRAM then copied
> again into their final execution/data location.
>
> BTW:
> I'm not sure if the DSP you are using has any differentiation between
> 'far' and 'near' addresses, but if it does, then I would plan the
> memory layout to use 'near' addresses when executing code that is run
> often or needs to run fast.
>
> BTW:
> if you move all the executable code out of SDRAM, then you can improve
> the definition of SDRAM to be only data rather than code/data.
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S
> To: Richard Williams , c...
> Sent: Wed, 2 Feb 2011 08:59:04 -0800 (PST)
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> > Hi,
> >
> > Yes, I have 16 MEG SDRAM available and I added SDRAM IN MEMORY SECTION
> > MANAGER using DSP/BIOS.
> >
> > Here attached snapshot to show all the settings I chosen for External
> > Memory. http://i53.tinypic.com/1z4vjo7.jpg
> >
> > I used this line to define data_stats buffer in EXT RAM
> > #pragma DATA_SECTION(data_stats,".EXT_RAM")
> >
> > When I build my project, I get following error.
> > warning: creating output section .EXT_RAM without SECTIONS specification
> >
> > Even after this my program runs, it saved values in data_stats buffer
> > but when I write those values to .text file, it doesn't write any
> > thing, text file is just blank. What is wrong here ?
> >
> > Richard, you said to modify memory map, via the config tool, to
> > include the available external RAM. I don't know how to di it. Is it
> > causing trouble ?
> >
> > Please help me.
> >
> > ________________________________
> > From: Richard Williams
> > To: B S ; c...
> > Sent: Fri, January 28, 2011 8:44:42 PM
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > B.S.
> >
> > If your looking at the 6713 architecture manual (available for
> > download at TI.com) part number SPRS186L,pdf then you see, on page 16
> > the memory map and on page 17 the various ways the 'IRAM' portion of
> > the memory map can be allocated as L2 cache+IRAM.
> >
> > Your program, per the linker error messages is larger than the
> > available IRAM.
> >
> > I say again : Your program is TOO BIG for the size of the IRAM.
> >
> > Does your development board have any external RAM implemented?
> >
> > If yes, then modify the configuration file, using the config tool, and
> > move the data table to the external RAM. You will also have to modify
> > the memory map, via the config tool, to include the available external
> > RAM.
> >
> > If no, then you will have to implement some external RAM (via
> > additional hardware) and move the data table to the external RAM via
> > the config tool.
> >
> > BTW:
> > Turning the ""Enable Memory Maping" off is a bad idea as this stops
> > the linker from checking that the program will fit within the
> > available RAM.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S
> > To: Richard Williams , c...
> > Sent: Fri, 28 Jan 2011 07:08:58 -0800 (PST)
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > > Hi Richard Williams,
> > >
> > > I have been looking at the DSP Architecture Manual.
> > >
> > > Here attached the cmd file.
> > >
> > > /* MODULE PARAMETERS */
> > > GBL_USERINITFXN = _FXN_F_nop;
> > >
> > > MEM_SEGZERO = IRAM;
> > > MEM_MALLOCSEG = IRAM;
> > >
> > > CLK_TIMEFXN = CLK_F_getshtime;
> > > CLK_HOOKFXN = HWI_F_dispatch;
> > >
> > > PRD_THOOKFXN = _KNL_tick;
> > >
> > > RTDX_DATAMEMSEG = IRAM;
> > >
> > > HST_DSMBUFSEG = IRAM;
> > >
> > > SWI_EHOOKFXN = GBL_NULL;
> > > SWI_IHOOKFXN = GBL_NULL;
> > > SWI_EXECFXN = SWI_F_iexec;
> > > SWI_RUNFXN = SWI_F_run;
> > >
> > > TSK_STACKSEG = IRAM;
> > > TSK_VCREATEFXN = _FXN_F_nop;
> > > TSK_VDELETEFXN = _FXN_F_nop;
> > > TSK_VEXITFXN = _FXN_F_nop;
> > >
> > > IDL_CALIBRFXN = IDL_F_stub;
> > >
> > > SYS_ABORTFXN = _UTL_doAbort;
> > > SYS_ERRORFXN = _UTL_doError;
> > > SYS_EXITFXN = _UTL_halt;
> > > SYS_PUTCFXN = _UTL_doPutc;
> > >
> > > GIO_CREATEFXN = _FXN_F_nop;
> > > GIO_DELETEFXN = _FXN_F_nop;
> > > GIO_PENDFXN = _FXN_F_nop;
> > > GIO_POSTFXN = _FXN_F_nop;
> > >
> > > /* OBJECT ALIASES */
> > > _IRAM = IRAM;
> > > _PRD_clock = PRD_clock;
> > > _RTA_fromHost = RTA_fromHost;
> > > _RTA_toHost = RTA_toHost;
> > > _HWI_RESET = HWI_RESET;
> > > _HWI_NMI = HWI_NMI;
> > > _HWI_RESERVED0 = HWI_RESERVED0;
> > > _HWI_RESERVED1 = HWI_RESERVED1;
> > > _HWI_INT4 = HWI_INT4;
> > > _HWI_INT5 = HWI_INT5;
> > > _HWI_INT6 = HWI_INT6;
> > > _HWI_INT7 = HWI_INT7;
> > > _HWI_INT8 = HWI_INT8;
> > > _HWI_INT9 = HWI_INT9;
> > > _HWI_INT10 = HWI_INT10;
> > > _HWI_INT11 = HWI_INT11;
> > > _HWI_INT12 = HWI_INT12;
> > > _HWI_INT13 = HWI_INT13;
> > > _HWI_INT14 = HWI_INT14;
> > > _HWI_INT15 = HWI_INT15;
> > > _KNL_swi = KNL_swi;
> > > _TSK_idle = TSK_idle;
> > > _LNK_dataPump = LNK_dataPump;
> > > _RTA_dispatcher = RTA_dispatcher;
> > > _IDL_cpuLoad = IDL_cpuLoad;
> > > _LOG_system = LOG_system;
> > > _IDL_busyObj = IDL_busyObj;
> > >
> > > /* MODULE GBL */
> > >
> > > SECTIONS {
> > > .vers (COPY): {} /* version information */
> > > }
> > >
> > > -priority
> > > -llnkrtdx.a62
> > > -ldrivers.a67 /* device drivers support */
> > > -lsioboth.a62 /* supports both SIO models */
> > > -lbiosi.a62 /* DSP/BIOS support */
> > > -lrtdx.lib /* RTDX support */
> > > -lcsl6713.lib
> > > -lrts6700.lib /* C and C++ run-time library support */
> > >
> > > _GBL_CACHE = GBL_CACHE;
> > >
> > > /* MODULE MEM */
> > > -stack 0x400
> > > MEMORY {
> > > IRAM : origin = 0x0, len = 0x40000
> > > }
> > > /* MODULE CLK */
> > > SECTIONS {
> > > .clk: {
> > > _CLK_start = _CLK_start6x;
> > > CLK_F_gethtime = CLK_F_getshtime;
> > > CLK_A_TABBEG = .;
> > > *(.clk)
> > > CLK_A_TABEND = .;
> > > CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> > > } > IRAM
> > > }
> > > _CLK_PRD = CLK_PRD;
> > > _CLK_COUNTSPMS = CLK_COUNTSPMS;
> > > _CLK_REGS = CLK_REGS;
> > > _CLK_USETIMER = CLK_USETIMER;
> > > _CLK_TIMERNUM = CLK_TIMERNUM;
> > > _CLK_TDDR = CLK_TDDR;
> > >
> > > /* MODULE PRD */
> > > SECTIONS {
> > > .prd: {
> > > PRD_A_TABBEG = .;
> > > /* no PRD objects */
> > > PRD_A_TABEND = .;
> > > PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> > > } > IRAM
> > > }
> > >
> > > /* MODULE RTDX */
> > > _RTDX_interrupt_mask = 0x0;
> > >
> > > /* MODULE HWI */
> > > SECTIONS {
> > > .hwi_vec: 0x0 {
> > > HWI_A_VECS = .;
> > > *(.hwi_vec)
> > > }
> > > }
> > >
> > > /* MODULE SWI */
> > > SECTIONS {
> > > .swi: {
> > > SWI_A_TABBEG = .;
> > > *(.swi)
> > > SWI_A_TABEND = .;
> > > SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> > > } > IRAM
> > > }
> > >
> > > /* MODULE IDL */
> > > SECTIONS {
> > > .idl: {
> > > IDL_A_TABBEG = .;
> > > *(.idl)
> > > IDL_A_TABEND = .;
> > > IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> > > IDL_A_CALBEG = .;
> > > *(.idlcal)
> > > IDL_A_CALEND = .;
> > > IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> > > } > IRAM
> > > }
> > >
> > > SECTIONS {
> > > .bss: {} > IRAM
> > >
> > > .far: {} > IRAM
> > >
> > > .sysdata: {} > IRAM
> > >
> > > .mem: {} > IRAM
> > >
> > > .sysinit: {} > IRAM
> > >
> > > .sysregs: {} > IRAM
> > >
> > > .gblinit: {} > IRAM
> > >
> > > .trcdata: {} > IRAM
> > >
> > > .args: fill=0 {
> > > *(.args)
> > > . += 0x4;
> > > } > IRAM
> > >
> > > .cinit: {} > IRAM
> > >
> > > .pinit: {} > IRAM
> > >
> > > .data: {} > IRAM
> > >
> > > .const: {} > IRAM
> > >
> > > .switch: {} > IRAM
> > >
> > > .cio: {} > IRAM
> > >
> > > .text: {} > IRAM
> > >
> > > frt: {} > IRAM
> > >
> > > .bios: {} > IRAM
> > >
> > > .stack: fill=0xc0ffee {
> > > GBL_stackbeg = .;
> > > *(.stack)
> > > GBL_stackend = GBL_stackbeg + 0x400 - 1;
> > > _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> > > _HWI_STKTOP = GBL_stackbeg;
> > > } > IRAM
> > >
> > > .trace: fill = 0x0 {
> > > _SYS_PUTCBEG = .;
> > > . += 0x200;
> > > _SYS_PUTCEND = . - 1;
> > > } > IRAM
> > >
> > > .rtdx_data: {} > IRAM
> > >
> > > .rtdx_text: {} > IRAM
> > >
> > > .hst: {
> > > HST_A_TABBEG = .;
> > > _HST_A_TABBEG = .;
> > > *(.hst)
> > > HST_A_TABEND = .;
> > > _HST_A_TABEND = .;
> > > HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > } > IRAM
> > >
> > > .dsm: {} > IRAM"Enable Memory Maping"
> > >
> > > /* RTA_fromHost buffer */
> > > .hst1: align = 0x4 {} > IRAM
> > >
> > > /* RTA_toHost buffer */
> > > .hst0: align = 0x4 {} > IRAM
> > >
> > > .hwi: {} > IRAM
> > >
> > > .tsk: {
> > > *(.tsk)
> > > } > IRAM
> > >
> > > .TSK_idle$stk: {
> > > *(.TSK_idle$stk)
> > > } > IRAM
> > >
> > > .log: {
> > > LOG_A_TABBEG = .;
> > > _LOG_A_TABBEG = .;
> > > *(.log)
> > > LOG_A_TABEND = .;
> > > _LOG_A_TABEND = .;
> > > LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > } > IRAM
> > >
> > > .printf (COPY): {} > IRAM
> > >
> > > /* LOG_system buffer */
> > > .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
> > >
> > > .pip: {
> > > PIP_A_TABBEG = .;
> > > _PIP_A_TABBEG = .;
> > > *(.pip)
> > > PIP_A_TABEND = .;
> > > _PIP_A_TABEND = .;
> > > PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > } > IRAM
> > >
> > > .sts: {
> > > STS_A_TABBEG = .;
> > > _STS_A_TABBEG = .;
> > > *(.sts)
> > > STS_A_TABEND = .;
> > > _STS_A_TABEND = .;
> > > STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > } > IRAM
> > >
> > > .sys: {} > IRAM
> > >
> > > .gio: {} > IRAM
> > >
> > > .IRAM$heap: {
> > > IRAM$B = .;
> > > _IRAM_base = .;
> > > IRAM$L = 0x8000;
> > > _IRAM_length = 0x8000;
> > > . += 0x8000;
> > > } > IRAM
> > >
> > > }
> > >
> > > I am also getting the message given below but when I remove the check
> > > from "Enable Memory Maping" tab it solves the problem but I don't know
> > > why it some time happens ?
> > >
> > > Loader: One or more sections of your program falls into a memory
> > > region that is not writable. These regions will not actually be
> > > written to the target. Check your linker configuration and/or memory map.
> > >
> > > Thanks.
> > >
> > > ________________________________
> > > From: Richard Williams
> > > To: B S ; c...
> > > Sent: Wed, January 26, 2011 9:01:26 PM
> > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > >
> > > B.S.
> > >
> > > Those error messages are from the linker. Not from running the code.
> > > It seems this is an excellent time for you to read the DSP
> > > architecture manual for the chip you are using and read the
> > > information on the .cmd file for the linker.
> > >
> > > They mean there is not enough room in the IRAM memory section.
> > >
> > > You will probably have to move the data points table to external RAM.
> > > BTW:
> > > How much external RAM do you have implemented on your project?
> > >
> > > BTW:
> > > if you have the problem again, then please paste the .cmd file listing
> > > in your post.
> > >
> > > R. Williams
> > >
> > > ---------- Original Message -----------
> > > From: B S
> > > To: c...
> > > Sent: Wed, 26 Jan 2011 08:22:32 -0800 (PST)
> > > Subject: [c6x] C6713- Momory Allocation Probolem
> > >
> > > > Hi,
> > > >
> > > > I have been trying to save over 50,000 data points in run time and
> > > > then transfer them to a text file. When I am running my code for 25,
> > > > 000 data points, it's running fine but giving so many errors as given
> > > > below when I increase the size of buffer to 51200. I really don't know
> > > > what does it mean.
> > > >
> > > > >> error: can't allocate .text, size 00004960 (page 0) in IRAM (avail:
> > > > >>000001d0)
> > > > >> error: can't allocate .bios, size 00003c60 (page 0) in IRAM (avail:
> > > > >>000001d0)
> > > > >> error: can't allocate .cinit, size 0000105c (page 0) in IRAM (avail:
> > > > >>000001d0)
> > > > >> error: can't allocate .rtdx_text, size 00000cc0 (page 0) in IRAM
> >(avail:
> >
> > >
> > > > >>000001d0)
> > > > >> error: can't allocate .bss, size 000004b8 (page 0) in IRAM (avail:
> > >
> > > > >>000001d0)
> > > > >> error: can't allocate .rtdx_data, size 0000044c (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .stack, size 00000400 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .TSK_idle$stk, size 00000400 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .sysinit, size 00000360 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .trace, size 00000200 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .LOG_system$buf, size 00000100 (page 0) in
> > > > >>IRAM (avail: 000000d0)
> > > > >> error: can't allocate .tsk, size 00000060 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .const, size 00000046 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .sts, size 00000030 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .swi, size 0000002c (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .hst, size 0000002c (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .gblinit, size 00000028 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .switch, size 00000028 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .idl, size 00000020 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .log, size 00000018 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .hst1, size 00000010 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .sys, size 00000010 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .trcdata, size 0000000c (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .pinit, size 0000000c (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .mem, size 00000004 (page 0) in IRAM (avail:
> > >
> > > > >>00000000)
> > > > >> error: can't allocate .args, size 00000004 (page 0) in IRAM
> > > > >>(avail: 00000000)
> > > > >> error: errors in input - ./Debug/ADS7881_BAS.out not built
> > > >
> > > > >> Compilation failure
> > > >
> > > > Build Complete,
> > > > 28 Errors, 0 Warnings, 0 Remarks.
> > > >
> > > > Will some one please help me out with issue ? How can I save larger
> > > > data values ? How much is the limit for C6713 ?
> > > >
> > > > I will appreciate your help.
> > > >
> > > > -BAS
> > > ------- End of Original Message -------
> > ------- End of Original Message -------
> >
> >
> ------- End of Original Message -------
------- End of Original Message -------

_____________________________________
B.S.

Sometimes I wonder if you really understand any thing I'm telling you about
programming.

You state that 'j' is a 'short'.
As I said before, 'short' has a positive and negative max values of approx 32k.
That is WAY SHORT OF the required 100k needed in your 'for' loop.

The above is the most likely reason the application fails as the number of
data_stats entries increases.

Regarding the .cmd file contents and the #pragma for the data_stats array...
I would be very surprised if the configuration tool does not have any way to
include user defined memory address ranges AND place specific segments into
those ranges.

You have already demonstrated that the configuration tool does have the ability
to define memory address ranges when you added the SDRAM memory address range.
You just need to reduce the SDRAM memory address range enough to have room for
the data_stats array. You might want to name it 'SDRAM2'.

Then add a statement that the 'EXT_RAM' segment is to be placed into the
'SDRAM2' memory address range.

If worse comes to worse, edit the .cmd file after the config tool has produced
the file and add the necessary statement into the 'SECTIONS{}' part of the file.

R. Williams

---------- Original Message -----------
From: B S
To: Richard Williams , c...
Sent: Fri, 4 Feb 2011 09:41:24 -0800 (PST)
Subject: Re: [c6x] C6713- Momory Allocation Probolem

> Hi All,
>
> Thanks for your replies.
>
> Mike and Richar,
>
> Sorry about '.SDRAM', I did check with 'SDRAM' and still getting the
> same warning.
>
> Richard,
>
> Variable 'j' is defined as short and its not a problem.
>
> The .cmd file does show SDRAM in the MEMORY section like this:
>
> /* MODULE MEM */
> -stack 0x400
> MEMORY {
> IRAM : origin = 0x0, len = 0x40000
> SDRAM : origin = 0x80000000, len = 0x1000000
> }
>
> It says nothing about SECTION{} but when I move .data or .bss or .cint
> to SDRAM, it shows some thing like this in the end of .cmd file:
>
> .data: {} > SDRAM
>
> I did read SPRU186u.pdf but I can't modify .cmd file directly to add
> section about SDRAM because its autogenerating by DSP/BIOS.
>
> You can see my cmd file here.
>
> /* INPUT ADS7881.cdb */
>
> /* MODULE PARAMETERS */
> GBL_USERINITFXN = _FXN_F_nop;
>
> MEM_SEGZERO = IRAM;
> MEM_MALLOCSEG = IRAM;
>
> CLK_TIMEFXN = CLK_F_getshtime;
> CLK_HOOKFXN = HWI_F_dispatch;
>
> PRD_THOOKFXN = _KNL_tick;
>
> RTDX_DATAMEMSEG = IRAM;
>
> HST_DSMBUFSEG = IRAM;
>
> SWI_EHOOKFXN = GBL_NULL;
> SWI_IHOOKFXN = GBL_NULL;
> SWI_EXECFXN = SWI_F_iexec;
> SWI_RUNFXN = SWI_F_run;
>
> TSK_STACKSEG = MEM_NULL;
> TSK_VCREATEFXN = _FXN_F_nop;
> TSK_VDELETEFXN = _FXN_F_nop;
> TSK_VEXITFXN = _FXN_F_nop;
>
> IDL_CALIBRFXN = IDL_F_stub;
>
> SYS_ABORTFXN = _UTL_doAbort;
> SYS_ERRORFXN = _UTL_doError;
> SYS_EXITFXN = _UTL_halt;
> SYS_PUTCFXN = _UTL_doPutc;
>
> GIO_CREATEFXN = _FXN_F_nop;
> GIO_DELETEFXN = _FXN_F_nop;
> GIO_PENDFXN = _FXN_F_nop;
> GIO_POSTFXN = _FXN_F_nop;
>
> /* OBJECT ALIASES */
> _IRAM = IRAM;
> _SDRAM = SDRAM;
> _PRD_clock = PRD_clock;
> _RTA_fromHost = RTA_fromHost;
> _RTA_toHost = RTA_toHost;
> _HWI_RESET = HWI_RESET;
> _HWI_NMI = HWI_NMI;
> _HWI_RESERVED0 = HWI_RESERVED0;
> _HWI_RESERVED1 = HWI_RESERVED1;
> _HWI_INT4 = HWI_INT4;
> _HWI_INT5 = HWI_INT5;
> _HWI_INT6 = HWI_INT6;
> _HWI_INT7 = HWI_INT7;
> _HWI_INT8 = HWI_INT8;
> _HWI_INT9 = HWI_INT9;
> _HWI_INT10 = HWI_INT10;
> _HWI_INT11 = HWI_INT11;
> _HWI_INT12 = HWI_INT12;
> _HWI_INT13 = HWI_INT13;
> _HWI_INT14 = HWI_INT14;
> _HWI_INT15 = HWI_INT15;
> _KNL_swi = KNL_swi;
> _TSK_idle = TSK_idle;
> _LNK_dataPump = LNK_dataPump;
> _RTA_dispatcher = RTA_dispatcher;
> _IDL_cpuLoad = IDL_cpuLoad;
> _LOG_system = LOG_system;
> _IDL_busyObj = IDL_busyObj;
>
> /* MODULE GBL */
>
> SECTIONS {
> .vers (COPY): {} /* version information */
> }
>
> -priority
> -llnkrtdx.a62
> -ldrivers.a67 /* device drivers support */
> -lsioboth.a62 /* supports both SIO models */
> -lbiosi.a62 /* DSP/BIOS support */
> -lrtdx.lib /* RTDX support */
> -lcsl6713.lib
> -lrts6700.lib /* C and C++ run-time library support */
>
> _GBL_CACHE = GBL_CACHE;
>
> /* MODULE MEM */
> -stack 0x400
> MEMORY {
> IRAM : origin = 0x0, len = 0x40000
> SDRAM : origin = 0x80000000, len = 0x1000000
> }
> /* MODULE CLK */
> SECTIONS {
> .clk: {
> _CLK_start = _CLK_start6x;
> CLK_F_gethtime = CLK_F_getshtime;
> CLK_A_TABBEG = .;
> *(.clk)
> CLK_A_TABEND = .;
> CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> } > IRAM
> }
> _CLK_PRD = CLK_PRD;
> _CLK_COUNTSPMS = CLK_COUNTSPMS;
> _CLK_REGS = CLK_REGS;
> _CLK_USETIMER = CLK_USETIMER;
> _CLK_TIMERNUM = CLK_TIMERNUM;
> _CLK_TDDR = CLK_TDDR;
>
> /* MODULE PRD */
> SECTIONS {
> .prd: {
> PRD_A_TABBEG = .;
> /* no PRD objects */
> PRD_A_TABEND = .;
> PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> } > IRAM
> }
>
> /* MODULE RTDX */
> _RTDX_interrupt_mask = 0x0;
>
> /* MODULE HWI */
> SECTIONS {
> .hwi_vec: 0x0 {
> HWI_A_VECS = .;
> *(.hwi_vec)
> }
> }
>
> /* MODULE SWI */
> SECTIONS {
> .swi: {
> SWI_A_TABBEG = .;
> *(.swi)
> SWI_A_TABEND = .;
> SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> } > IRAM
> }
>
> /* MODULE IDL */
> SECTIONS {
> .idl: {
> IDL_A_TABBEG = .;
> *(.idl)
> IDL_A_TABEND = .;
> IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> IDL_A_CALBEG = .;
> *(.idlcal)
> IDL_A_CALEND = .;
> IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> } > IRAM
> }
>
> SECTIONS {
> .bss: {} > IRAM
>
> .far: {} > IRAM
>
> .sysdata: {} > IRAM
>
> .mem: {} > IRAM
>
> .sysinit: {} > IRAM
>
> .sysregs: {} > IRAM
>
> .gblinit: {} > IRAM
>
> .trcdata: {} > IRAM
>
> .args: fill=0 {
> *(.args)
> . += 0x4;
> } > IRAM
>
> .cinit: {} > IRAM
>
> .pinit: {} > IRAM
>
> .data: {} > IRAM
>
> .const: {} > IRAM
>
> .switch: {} > IRAM
>
> .cio: {} > IRAM
>
> .text: {} > IRAM
>
> frt: {} > IRAM
>
> .bios: {} > IRAM
>
> .stack: fill=0xc0ffee {
> GBL_stackbeg = .;
> *(.stack)
> GBL_stackend = GBL_stackbeg + 0x400 - 1;
> _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> _HWI_STKTOP = GBL_stackbeg;
> } > IRAM
>
> .trace: fill = 0x0 {
> _SYS_PUTCBEG = .;
> . += 0x200;
> _SYS_PUTCEND = . - 1;
> } > IRAM
>
> .rtdx_data: {} > IRAM
>
> .rtdx_text: {} > IRAM
>
> .hst: {
> HST_A_TABBEG = .;
> _HST_A_TABBEG = .;
> *(.hst)
> HST_A_TABEND = .;
> _HST_A_TABEND = .;
> HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> } > IRAM
>
> .dsm: {} > IRAM
>
> /* RTA_fromHost buffer */
> .hst1: align = 0x4 {} > IRAM
>
> /* RTA_toHost buffer */
> .hst0: align = 0x4 {} > IRAM
>
> .hwi: {} > IRAM
>
> .tsk: {
> *(.tsk)
> } > IRAM
>
> .TSK_idle$stk: {
> *(.TSK_idle$stk)
> } > IRAM
>
> .log: {
> LOG_A_TABBEG = .;
> _LOG_A_TABBEG = .;
> *(.log)
> LOG_A_TABEND = .;
> _LOG_A_TABEND = .;
> LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> } > IRAM
>
> .printf (COPY): {} > IRAM
>
> /* LOG_system buffer */
> .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
>
> .pip: {
> PIP_A_TABBEG = .;
> _PIP_A_TABBEG = .;
> *(.pip)
> PIP_A_TABEND = .;
> _PIP_A_TABEND = .;
> PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> } > IRAM
>
> .sts: {
> STS_A_TABBEG = .;
> _STS_A_TABBEG = .;
> *(.sts)
> STS_A_TABEND = .;
> _STS_A_TABEND = .;
> STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> } > IRAM
>
> .sys: {} > IRAM
>
> .gio: {} > IRAM
>
> .IRAM$heap: {
> IRAM$B = .;
> _IRAM_base = .;
> IRAM$L = 0x8000;
> _IRAM_length = 0x8000;
> . += 0x8000;
> } > IRAM
>
> }
>
> I don't see any way to define section using DSP/BIOS memory
> management. I really don't know what to do now.
>
> ________________________________
> From: Richard Williams
> To: B S ; c...
> Sent: Fri, February 4, 2011 5:23:18 AM
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> B.S.
>
> I have a question, what is the definition of 'j' in the code snipit
> that you provided.
>
> Note: 'short int' has a max value of approx +/- 32k.
> Note: 'int' has max value of approx +/- 2gig.
>
> If the 'j' variable is defined as 'short int' then it will never reach
> the end of a loop that is trying to iterate 100000 times.
>
> Regarding the error message you are getting..
> The problem origination is an error in the MEMORY and SECTIONS
> definitions using the configuration tool.
>
> BTW:
> Why did you move the .data section to SDRAM?
> It was doing fine in IRAM.
>
> In fact everything was doing fine in IRAM until the data_stats array
> got too big.
>
> My suggestion (which you have partly implemented) is to ONLY move the data_stats
> array to the SDRAM address space.
>
> In otherwords,
>
> The .cmd file needs to have a line in the MEMORY{} that reads
> something like this: SDRAM RW origin=0x100000000, length=0x100000
>
> The .cmd file needs to have a line in the SECTIONS{} that reads
> something like this: EXT_RAM : LOAD = SDRAM TYPE=DSECT ALIGN2
>
> To help with your understanding of the .cmd file, you may want to read
> SPRU186u.pdf, "TMS320C6000 Assembly Language Tools" available for
> download from TI.com. beginning around page 184 "7.5 Linker Command Files"
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S
> To: Richard Williams , c...
> Sent: Thu, 3 Feb 2011 08:05:18 -0800 (PST)
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> > R. Williams,
> >
> > I tried with 'SDRAM' but it says the same thing (creating output
> > section .SDRAM without SECTIONS specification).
> >
> > I changed the configuration settings, I removed 'heap' from SDRAM and
> > used SDRAM for Data Section (.data) under COMPILER SECTIONS tab, You
> > can see all of them in the snapshot. Are these settings ok OR some
> > thing need to be switch between IRAM and SDRAM ?
> >
> > http://i53.tinypic.com/jhahee.jpg
> >
> > By doing so, I am not getting 'creating output section' warning but it
> > is now saving values in data_stats and then writing to TEXT file.
> >
> > This is how I am writing to text file.
> >
> > FILE *fp;
> > fp = fopen("Samples.txt", "w");
> >
> > for(j=0; j > > {
> > fprintf(fp, "%f\n", data_stats[j] );
> > }
> >
> > fclose(fp);
> > exit(1);
> >
> > When the size of data_stats is not more than some X size, program
> > exits fine after writing data to text file but as I increase the size
> > of data_stats to 100,000, it never exits after writing to text file.
> > When I halt the program I see the cursor at momory section:
> > RTDX_Final_RT_Monitor. Snapshot also shows Disassembly view.
> >
> > What should I change to configure the SDRAM properly ?
> >
> > Thanks.
> >
> > ________________________________
> > From: Richard Williams
> > To: B S ; c...
> > Sent: Wed, February 2, 2011 8:52:56 PM
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > B.S.
> >
> > I see a few 'ooops' in the configuration area.
> >
> > For instance....
> > the '.EXT_RAM' section does not exist.
> > however, 'SDRAM' does exist.
> > so your pragma should look like this:
> > $pragma DATA_SECTION(data_stats,"SDRAM")
> > unless you define a specific section in the configuration named
> > '.EXT_RAM' that is large enough to hold your complete data table. If
> > you do define a .EXT_RAM section, then the size of the SDRAM section
> > must be reduced by an equal amount and the starting address of each
> > section adjusted so the sections do not overlap.
> >
> > Then, as I looked at the configuration settings, I noticed:
> >
> > 1) the 'heap' is in SDRAM, that is not a really good idea unless the
> > application needs lots of room in the heap.
> >
> > 2) the 'stack' section is in SDRAM, that is a very bad idea
> > because the stack is referenced OFTEN and there is a major execution speed
> > penalty for having it in any place other than IRAM.
> >
> > 3) The BIOS sections need to be 'fast' so should be in IRAM
> >
> > 4) The startup code is only executed once, so placing it in SDRAM is probably
> > ok, however; I would have left it in FLASH and executed it from FLASH.
> >
> > 5) You want interrupt servicing to be 'fast', so the interrupt service
> > table should be in IRAM.
> >
> > 6) The 'text' section is the actual executable code. so placing it in
> > SDRAM is a major execution speed penalty.
> >
> > 7) If your code is initially in FLASH, then the jump switch tables should
> > probably be left in FLASH. They are actually part of the executable
> > code, but their usage is minimal (for most programs).
> >
> > 8) The '.cinit' section is only referenced during the startup code
> > execution, so leaving it in FLASH is a very good idea. BTW this is
> > initialization values for the ram data. It will be 'gone' over a
> > power cycle.
> >
> > 9) The '.const' section never changes and is rarely referenced, so
> > leaving it in FLASH is a good idea.
> >
> > 10) The '.data' section is your program variables that will be initialized
> > during the startup code execution. Since such variables are usually
> referenced
> > often, it is a good idea to have them in IRAM. (however, that actual
> > initialization values can be left in FLASH as they are only referenced
> > once during the startup code.
> >
> > BTW:
> > the whole idea was to make your link work.
> > The only problem with your link was the data_stats being too large to
> > fit into the IRAM. If I were doing this, the only thing I would have
> > moved is the data_stats and left everything else in IRAM/FLASH. Note:
> > there is a execution speed penalty for items in FLASH and usually also
> > for items in SDRAM.
> >
> > BTW:
> > It looks like there is no definition of the FLASH area.
> > IMO that should be added, so certain sections can be left in the FLASH,
> > rather than (during the startup code) copied into xxRAM then copied
> > again into their final execution/data location.
> >
> > BTW:
> > I'm not sure if the DSP you are using has any differentiation between
> > 'far' and 'near' addresses, but if it does, then I would plan the
> > memory layout to use 'near' addresses when executing code that is run
> > often or needs to run fast.
> >
> > BTW:
> > if you move all the executable code out of SDRAM, then you can improve
> > the definition of SDRAM to be only data rather than code/data.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S
> > To: Richard Williams , c...
> > Sent: Wed, 2 Feb 2011 08:59:04 -0800 (PST)
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > > Hi,
> > >
> > > Yes, I have 16 MEG SDRAM available and I added SDRAM IN MEMORY SECTION
> > > MANAGER using DSP/BIOS.
> > >
> > > Here attached snapshot to show all the settings I chosen for External
> > > Memory. http://i53.tinypic.com/1z4vjo7.jpg
> > >
> > > I used this line to define data_stats buffer in EXT RAM
> > > #pragma DATA_SECTION(data_stats,".EXT_RAM")
> > >
> > > When I build my project, I get following error.
> > > warning: creating output section .EXT_RAM without SECTIONS specification
> > >
> > > Even after this my program runs, it saved values in data_stats buffer
> > > but when I write those values to .text file, it doesn't write any
> > > thing, text file is just blank. What is wrong here ?
> > >
> > > Richard, you said to modify memory map, via the config tool, to
> > > include the available external RAM. I don't know how to di it. Is it
> > > causing trouble ?
> > >
> > > Please help me.
> > >
> > > ________________________________
> > > From: Richard Williams
> > > To: B S ; c...
> > > Sent: Fri, January 28, 2011 8:44:42 PM
> > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > >
> > > B.S.
> > >
> > > If your looking at the 6713 architecture manual (available for
> > > download at TI.com) part number SPRS186L,pdf then you see, on page 16
> > > the memory map and on page 17 the various ways the 'IRAM' portion of
> > > the memory map can be allocated as L2 cache+IRAM.
> > >
> > > Your program, per the linker error messages is larger than the
> > > available IRAM.
> > >
> > > I say again : Your program is TOO BIG for the size of the IRAM.
> > >
> > > Does your development board have any external RAM implemented?
> > >
> > > If yes, then modify the configuration file, using the config tool, and
> > > move the data table to the external RAM. You will also have to modify
> > > the memory map, via the config tool, to include the available external
> > > RAM.
> > >
> > > If no, then you will have to implement some external RAM (via
> > > additional hardware) and move the data table to the external RAM via
> > > the config tool.
> > >
> > > BTW:
> > > Turning the ""Enable Memory Maping" off is a bad idea as this stops
> > > the linker from checking that the program will fit within the
> > > available RAM.
> > >
> > > R. Williams
> > >
> > > ---------- Original Message -----------
> > > From: B S
> > > To: Richard Williams , c...
> > > Sent: Fri, 28 Jan 2011 07:08:58 -0800 (PST)
> > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > >
> > > > Hi Richard Williams,
> > > >
> > > > I have been looking at the DSP Architecture Manual.
> > > >
> > > > Here attached the cmd file.
> > > >
> > > > /* MODULE PARAMETERS */
> > > > GBL_USERINITFXN = _FXN_F_nop;
> > > >
> > > > MEM_SEGZERO = IRAM;
> > > > MEM_MALLOCSEG = IRAM;
> > > >
> > > > CLK_TIMEFXN = CLK_F_getshtime;
> > > > CLK_HOOKFXN = HWI_F_dispatch;
> > > >
> > > > PRD_THOOKFXN = _KNL_tick;
> > > >
> > > > RTDX_DATAMEMSEG = IRAM;
> > > >
> > > > HST_DSMBUFSEG = IRAM;
> > > >
> > > > SWI_EHOOKFXN = GBL_NULL;
> > > > SWI_IHOOKFXN = GBL_NULL;
> > > > SWI_EXECFXN = SWI_F_iexec;
> > > > SWI_RUNFXN = SWI_F_run;
> > > >
> > > > TSK_STACKSEG = IRAM;
> > > > TSK_VCREATEFXN = _FXN_F_nop;
> > > > TSK_VDELETEFXN = _FXN_F_nop;
> > > > TSK_VEXITFXN = _FXN_F_nop;
> > > >
> > > > IDL_CALIBRFXN = IDL_F_stub;
> > > >
> > > > SYS_ABORTFXN = _UTL_doAbort;
> > > > SYS_ERRORFXN = _UTL_doError;
> > > > SYS_EXITFXN = _UTL_halt;
> > > > SYS_PUTCFXN = _UTL_doPutc;
> > > >
> > > > GIO_CREATEFXN = _FXN_F_nop;
> > > > GIO_DELETEFXN = _FXN_F_nop;
> > > > GIO_PENDFXN = _FXN_F_nop;
> > > > GIO_POSTFXN = _FXN_F_nop;
> > > >
> > > > /* OBJECT ALIASES */
> > > > _IRAM = IRAM;
> > > > _PRD_clock = PRD_clock;
> > > > _RTA_fromHost = RTA_fromHost;
> > > > _RTA_toHost = RTA_toHost;
> > > > _HWI_RESET = HWI_RESET;
> > > > _HWI_NMI = HWI_NMI;
> > > > _HWI_RESERVED0 = HWI_RESERVED0;
> > > > _HWI_RESERVED1 = HWI_RESERVED1;
> > > > _HWI_INT4 = HWI_INT4;
> > > > _HWI_INT5 = HWI_INT5;
> > > > _HWI_INT6 = HWI_INT6;
> > > > _HWI_INT7 = HWI_INT7;
> > > > _HWI_INT8 = HWI_INT8;
> > > > _HWI_INT9 = HWI_INT9;
> > > > _HWI_INT10 = HWI_INT10;
> > > > _HWI_INT11 = HWI_INT11;
> > > > _HWI_INT12 = HWI_INT12;
> > > > _HWI_INT13 = HWI_INT13;
> > > > _HWI_INT14 = HWI_INT14;
> > > > _HWI_INT15 = HWI_INT15;
> > > > _KNL_swi = KNL_swi;
> > > > _TSK_idle = TSK_idle;
> > > > _LNK_dataPump = LNK_dataPump;
> > > > _RTA_dispatcher = RTA_dispatcher;
> > > > _IDL_cpuLoad = IDL_cpuLoad;
> > > > _LOG_system = LOG_system;
> > > > _IDL_busyObj = IDL_busyObj;
> > > >
> > > > /* MODULE GBL */
> > > >
> > > > SECTIONS {
> > > > .vers (COPY): {} /* version information */
> > > > }
> > > >
> > > > -priority
> > > > -llnkrtdx.a62
> > > > -ldrivers.a67 /* device drivers support */
> > > > -lsioboth.a62 /* supports both SIO models */
> > > > -lbiosi.a62 /* DSP/BIOS support */
> > > > -lrtdx.lib /* RTDX support */
> > > > -lcsl6713.lib
> > > > -lrts6700.lib /* C and C++ run-time library support */
> > > >
> > > > _GBL_CACHE = GBL_CACHE;
> > > >
> > > > /* MODULE MEM */
> > > > -stack 0x400
> > > > MEMORY {
> > > > IRAM : origin = 0x0, len = 0x40000
> > > > }
> > > > /* MODULE CLK */
> > > > SECTIONS {
> > > > .clk: {
> > > > _CLK_start = _CLK_start6x;
> > > > CLK_F_gethtime = CLK_F_getshtime;
> > > > CLK_A_TABBEG = .;
> > > > *(.clk)
> > > > CLK_A_TABEND = .;
> > > > CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> > > > } > IRAM
> > > > }
> > > > _CLK_PRD = CLK_PRD;
> > > > _CLK_COUNTSPMS = CLK_COUNTSPMS;
> > > > _CLK_REGS = CLK_REGS;
> > > > _CLK_USETIMER = CLK_USETIMER;
> > > > _CLK_TIMERNUM = CLK_TIMERNUM;
> > > > _CLK_TDDR = CLK_TDDR;
> > > >
> > > > /* MODULE PRD */
> > > > SECTIONS {
> > > > .prd: {
> > > > PRD_A_TABBEG = .;
> > > > /* no PRD objects */
> > > > PRD_A_TABEND = .;
> > > > PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> > > > } > IRAM
> > > > }
> > > >
> > > > /* MODULE RTDX */
> > > > _RTDX_interrupt_mask = 0x0;
> > > >
> > > > /* MODULE HWI */
> > > > SECTIONS {
> > > > .hwi_vec: 0x0 {
> > > > HWI_A_VECS = .;
> > > > *(.hwi_vec)
> > > > }
> > > > }
> > > >
> > > > /* MODULE SWI */
> > > > SECTIONS {
> > > > .swi: {
> > > > SWI_A_TABBEG = .;
> > > > *(.swi)
> > > > SWI_A_TABEND = .;
> > > > SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> > > > } > IRAM
> > > > }
> > > >
> > > > /* MODULE IDL */
> > > > SECTIONS {
> > > > .idl: {
> > > > IDL_A_TABBEG = .;
> > > > *(.idl)
> > > > IDL_A_TABEND = .;
> > > > IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> > > > IDL_A_CALBEG = .;
> > > > *(.idlcal)
> > > > IDL_A_CALEND = .;
> > > > IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> > > > } > IRAM
> > > > }
> > > >
> > > > SECTIONS {
> > > > .bss: {} > IRAM
> > > >
> > > > .far: {} > IRAM
> > > >
> > > > .sysdata: {} > IRAM
> > > >
> > > > .mem: {} > IRAM
> > > >
> > > > .sysinit: {} > IRAM
> > > >
> > > > .sysregs: {} > IRAM
> > > >
> > > > .gblinit: {} > IRAM
> > > >
> > > > .trcdata: {} > IRAM
> > > >
> > > > .args: fill=0 {
> > > > *(.args)
> > > > . += 0x4;
> > > > } > IRAM
> > > >
> > > > .cinit: {} > IRAM
> > > >
> > > > .pinit: {} > IRAM
> > > >
> > > > .data: {} > IRAM
> > > >
> > > > .const: {} > IRAM
> > > >
> > > > .switch: {} > IRAM
> > > >
> > > > .cio: {} > IRAM
> > > >
> > > > .text: {} > IRAM
> > > >
> > > > frt: {} > IRAM
> > > >
> > > > .bios: {} > IRAM
> > > >
> > > > .stack: fill=0xc0ffee {
> > > > GBL_stackbeg = .;
> > > > *(.stack)
> > > > GBL_stackend = GBL_stackbeg + 0x400 - 1;
> > > > _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> > > > _HWI_STKTOP = GBL_stackbeg;
> > > > } > IRAM
> > > >
> > > > .trace: fill = 0x0 {
> > > > _SYS_PUTCBEG = .;
> > > > . += 0x200;
> > > > _SYS_PUTCEND = . - 1;
> > > > } > IRAM
> > > >
> > > > .rtdx_data: {} > IRAM
> > > >
> > > > .rtdx_text: {} > IRAM
> > > >
> > > > .hst: {
> > > > HST_A_TABBEG = .;
> > > > _HST_A_TABBEG = .;
> > > > *(.hst)
> > > > HST_A_TABEND = .;
> > > > _HST_A_TABEND = .;
> > > > HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > > _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > > } > IRAM
> > > >
> > > > .dsm: {} > IRAM"Enable Memory Maping"
> > > >
> > > > /* RTA_fromHost buffer */
> > > > .hst1: align = 0x4 {} > IRAM
> > > >
> > > > /* RTA_toHost buffer */
> > > > .hst0: align = 0x4 {} > IRAM
> > > >
> > > > .hwi: {} > IRAM
> > > >
> > > > .tsk: {
> > > > *(.tsk)
> > > > } > IRAM
> > > >
> > > > .TSK_idle$stk: {
> > > > *(.TSK_idle$stk)
> > > > } > IRAM
> > > >
> > > > .log: {
> > > > LOG_A_TABBEG = .;
> > > > _LOG_A_TABBEG = .;
> > > > *(.log)
> > > > LOG_A_TABEND = .;
> > > > _LOG_A_TABEND = .;
> > > > LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > > _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > > } > IRAM
> > > >
> > > > .printf (COPY): {} > IRAM
> > > >
> > > > /* LOG_system buffer */
> > > > .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
> > > >
> > > > .pip: {
> > > > PIP_A_TABBEG = .;
> > > > _PIP_A_TABBEG = .;
> > > > *(.pip)
> > > > PIP_A_TABEND = .;
> > > > _PIP_A_TABEND = .;
> > > > PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > > _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > > } > IRAM
> > > >
> > > > .sts: {
> > > > STS_A_TABBEG = .;
> > > > _STS_A_TABBEG = .;
> > > > *(.sts)
> > > > STS_A_TABEND = .;
> > > > _STS_A_TABEND = .;
> > > > STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > > _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > > } > IRAM
> > > >
> > > > .sys: {} > IRAM
> > > >
> > > > .gio: {} > IRAM
> > > >
> > > > .IRAM$heap: {
> > > > IRAM$B = .;
> > > > _IRAM_base = .;
> > > > IRAM$L = 0x8000;
> > > > _IRAM_length = 0x8000;
> > > > . += 0x8000;
> > > > } > IRAM
> > > >
> > > > }
> > > >
> > > > I am also getting the message given below but when I remove the check
> > > > from "Enable Memory Maping" tab it solves the problem but I don't know
> > > > why it some time happens ?
> > > >
> > > > Loader: One or more sections of your program falls into a memory
> > > > region that is not writable. These regions will not actually be
> > > > written to the target. Check your linker configuration and/or memory map.
> > > >
> > > > Thanks.
> > > >
> > > > ________________________________
> > > > From: Richard Williams
> > > > To: B S ; c...
> > > > Sent: Wed, January 26, 2011 9:01:26 PM
> > > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > > >
> > > > B.S.
> > > >
> > > > Those error messages are from the linker. Not from running the code.
> > > > It seems this is an excellent time for you to read the DSP
> > > > architecture manual for the chip you are using and read the
> > > > information on the .cmd file for the linker.
> > > >
> > > > They mean there is not enough room in the IRAM memory section.
> > > >
> > > > You will probably have to move the data points table to external RAM.
> > > > BTW:
> > > > How much external RAM do you have implemented on your project?
> > > >
> > > > BTW:
> > > > if you have the problem again, then please paste the .cmd file listing
> > > > in your post.
> > > >
> > > > R. Williams
> > > >
> > > > ---------- Original Message -----------
> > > > From: B S
> > > > To: c...
> > > > Sent: Wed, 26 Jan 2011 08:22:32 -0800 (PST)
> > > > Subject: [c6x] C6713- Momory Allocation Probolem
> > > >
> > > > > Hi,
> > > > >
> > > > > I have been trying to save over 50,000 data points in run time and
> > > > > then transfer them to a text file. When I am running my code for 25,
> > > > > 000 data points, it's running fine but giving so many errors as given
> > > > > below when I increase the size of buffer to 51200. I really don't know
> > > > > what does it mean.
> > > > >
> > > > > >> error: can't allocate .text, size 00004960 (page 0) in IRAM (avail:
>
> > > > > >>000001d0)
> > > > > >> error: can't allocate .bios, size 00003c60 (page 0) in IRAM (avail:
>
> > > > > >>000001d0)
> > > > > >> error: can't allocate .cinit, size 0000105c (page 0) in IRAM (avail:
> >
> > > > > >>000001d0)
> > > > > >> error: can't allocate .rtdx_text, size 00000cc0 (page 0) in IRAM
> > >(avail:
> > >
> > > >
> > > > > >>000001d0)
> > > > > >> error: can't allocate .bss, size 000004b8 (page 0) in IRAM (avail:
> > > >
> > > > > >>000001d0)
> > > > > >> error: can't allocate .rtdx_data, size 0000044c (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .stack, size 00000400 (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .TSK_idle$stk, size 00000400 (page 0) in IRAM
>
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .sysinit, size 00000360 (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .trace, size 00000200 (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .LOG_system$buf, size 00000100 (page 0) in
> > > > > >>IRAM (avail: 000000d0)
> > > > > >> error: can't allocate .tsk, size 00000060 (page 0) in IRAM (avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .const, size 00000046 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .sts, size 00000030 (page 0) in IRAM (avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .swi, size 0000002c (page 0) in IRAM (avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .hst, size 0000002c (page 0) in IRAM (avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .gblinit, size 00000028 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .switch, size 00000028 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .idl, size 00000020 (page 0) in IRAM (avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .log, size 00000018 (page 0) in IRAM (avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .hst1, size 00000010 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .sys, size 00000010 (page 0) in IRAM (avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .trcdata, size 0000000c (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .pinit, size 0000000c (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .mem, size 00000004 (page 0) in IRAM (avail:
> > > >
> > > > > >>00000000)
> > > > > >> error: can't allocate .args, size 00000004 (page 0) in IRAM
> > > > > >>(avail: 00000000)
> > > > > >> error: errors in input - ./Debug/ADS7881_BAS.out not built
> > > > >
> > > > > >> Compilation failure
> > > > >
> > > > > Build Complete,
> > > > > 28 Errors, 0 Warnings, 0 Remarks.
> > > > >
> > > > > Will some one please help me out with issue ? How can I save larger
> > > > > data values ? How much is the limit for C6713 ?
> > > > >
> > > > > I will appreciate your help.
> > > > >
> > > > > -BAS
> > > > ------- End of Original Message -------
> > > ------- End of Original Message -------
> > >
> > >
> > ------- End of Original Message -------
> ------- End of Original Message -------
------- End of Original Message -------

_____________________________________
R. Williams,

Sorry, that was mistake. I wanted to write 'j' is int so thats not causing any
problem.

I will work with .cmd file and let you know.

Thanks.

________________________________
From: Richard Williams
To: B S ; c...
Sent: Fri, February 4, 2011 8:09:54 PM
Subject: Re: [c6x] C6713- Momory Allocation Probolem
B.S.

Sometimes I wonder if you really understand any thing I'm telling you about
programming.

You state that 'j' is a 'short'.
As I said before, 'short' has a positive and negative max values of approx 32k.
That is WAY SHORT OF the required 100k needed in your 'for' loop.

The above is the most likely reason the application fails as the number of
data_stats entries increases.

Regarding the .cmd file contents and the #pragma for the data_stats array...
I would be very surprised if the configuration tool does not have any way to
include user defined memory address ranges AND place specific segments into
those ranges.

You have already demonstrated that the configuration tool does have the ability
to define memory address ranges when you added the SDRAM memory address range.
You just need to reduce the SDRAM memory address range enough to have room for
the data_stats array. You might want to name it 'SDRAM2'.

Then add a statement that the 'EXT_RAM' segment is to be placed into the
'SDRAM2' memory address range.

If worse comes to worse, edit the .cmd file after the config tool has produced
the file and add the necessary statement into the 'SECTIONS{}' part of the file.

R. Williams

---------- Original Message -----------
From: B S
To: Richard Williams , c...
Sent: Fri, 4 Feb 2011 09:41:24 -0800 (PST)
Subject: Re: [c6x] C6713- Momory Allocation Probolem

> Hi All,
>
> Thanks for your replies.
>
> Mike and Richar,
>
> Sorry about '.SDRAM', I did check with 'SDRAM' and still getting the
> same warning.
>
> Richard,
>
> Variable 'j' is defined as short and its not a problem.
>
> The .cmd file does show SDRAM in the MEMORY section like this:
>
> /* MODULE MEM */
> -stack 0x400
> MEMORY {
> IRAM : origin = 0x0, len = 0x40000
> SDRAM : origin = 0x80000000, len = 0x1000000
> }
>
> It says nothing about SECTION{} but when I move .data or .bss or .cint
> to SDRAM, it shows some thing like this in the end of .cmd file:
>
> .data: {} > SDRAM
>
> I did read SPRU186u.pdf but I can't modify .cmd file directly to add
> section about SDRAM because its autogenerating by DSP/BIOS.
>
> You can see my cmd file here.
>
> /* INPUT ADS7881.cdb */
>
> /* MODULE PARAMETERS */
> GBL_USERINITFXN = _FXN_F_nop;
>
> MEM_SEGZERO = IRAM;
> MEM_MALLOCSEG = IRAM;
>
> CLK_TIMEFXN = CLK_F_getshtime;
> CLK_HOOKFXN = HWI_F_dispatch;
>
> PRD_THOOKFXN = _KNL_tick;
>
> RTDX_DATAMEMSEG = IRAM;
>
> HST_DSMBUFSEG = IRAM;
>
> SWI_EHOOKFXN = GBL_NULL;
> SWI_IHOOKFXN = GBL_NULL;
> SWI_EXECFXN = SWI_F_iexec;
> SWI_RUNFXN = SWI_F_run;
>
> TSK_STACKSEG = MEM_NULL;
> TSK_VCREATEFXN = _FXN_F_nop;
> TSK_VDELETEFXN = _FXN_F_nop;
> TSK_VEXITFXN = _FXN_F_nop;
>
> IDL_CALIBRFXN = IDL_F_stub;
>
> SYS_ABORTFXN = _UTL_doAbort;
> SYS_ERRORFXN = _UTL_doError;
> SYS_EXITFXN = _UTL_halt;
> SYS_PUTCFXN = _UTL_doPutc;
>
> GIO_CREATEFXN = _FXN_F_nop;
> GIO_DELETEFXN = _FXN_F_nop;
> GIO_PENDFXN = _FXN_F_nop;
> GIO_POSTFXN = _FXN_F_nop;
>
> /* OBJECT ALIASES */
> _IRAM = IRAM;
> _SDRAM = SDRAM;
> _PRD_clock = PRD_clock;
> _RTA_fromHost = RTA_fromHost;
> _RTA_toHost = RTA_toHost;
> _HWI_RESET = HWI_RESET;
> _HWI_NMI = HWI_NMI;
> _HWI_RESERVED0 = HWI_RESERVED0;
> _HWI_RESERVED1 = HWI_RESERVED1;
> _HWI_INT4 = HWI_INT4;
> _HWI_INT5 = HWI_INT5;
> _HWI_INT6 = HWI_INT6;
> _HWI_INT7 = HWI_INT7;
> _HWI_INT8 = HWI_INT8;
> _HWI_INT9 = HWI_INT9;
> _HWI_INT10 = HWI_INT10;
> _HWI_INT11 = HWI_INT11;
> _HWI_INT12 = HWI_INT12;
> _HWI_INT13 = HWI_INT13;
> _HWI_INT14 = HWI_INT14;
> _HWI_INT15 = HWI_INT15;
> _KNL_swi = KNL_swi;
> _TSK_idle = TSK_idle;
> _LNK_dataPump = LNK_dataPump;
> _RTA_dispatcher = RTA_dispatcher;
> _IDL_cpuLoad = IDL_cpuLoad;
> _LOG_system = LOG_system;
> _IDL_busyObj = IDL_busyObj;
>
> /* MODULE GBL */
>
> SECTIONS {
> .vers (COPY): {} /* version information */
> }
>
> -priority
> -llnkrtdx.a62
> -ldrivers.a67 /* device drivers support */
> -lsioboth.a62 /* supports both SIO models */
> -lbiosi.a62 /* DSP/BIOS support */
> -lrtdx.lib /* RTDX support */
> -lcsl6713.lib
> -lrts6700.lib /* C and C++ run-time library support */
>
> _GBL_CACHE = GBL_CACHE;
>
> /* MODULE MEM */
> -stack 0x400
> MEMORY {
> IRAM : origin = 0x0, len = 0x40000
> SDRAM : origin = 0x80000000, len = 0x1000000
> }
> /* MODULE CLK */
> SECTIONS {
> .clk: {
> _CLK_start = _CLK_start6x;
> CLK_F_gethtime = CLK_F_getshtime;
> CLK_A_TABBEG = .;
> *(.clk)
> CLK_A_TABEND = .;
> CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> } > IRAM
> }
> _CLK_PRD = CLK_PRD;
> _CLK_COUNTSPMS = CLK_COUNTSPMS;
> _CLK_REGS = CLK_REGS;
> _CLK_USETIMER = CLK_USETIMER;
> _CLK_TIMERNUM = CLK_TIMERNUM;
> _CLK_TDDR = CLK_TDDR;
>
> /* MODULE PRD */
> SECTIONS {
> .prd: {
> PRD_A_TABBEG = .;
> /* no PRD objects */
> PRD_A_TABEND = .;
> PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> } > IRAM
> }
>
> /* MODULE RTDX */
> _RTDX_interrupt_mask = 0x0;
>
> /* MODULE HWI */
> SECTIONS {
> .hwi_vec: 0x0 {
> HWI_A_VECS = .;
> *(.hwi_vec)
> }
> }
>
> /* MODULE SWI */
> SECTIONS {
> .swi: {
> SWI_A_TABBEG = .;
> *(.swi)
> SWI_A_TABEND = .;
> SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> } > IRAM
> }
>
> /* MODULE IDL */
> SECTIONS {
> .idl: {
> IDL_A_TABBEG = .;
> *(.idl)
> IDL_A_TABEND = .;
> IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> IDL_A_CALBEG = .;
> *(.idlcal)
> IDL_A_CALEND = .;
> IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> } > IRAM
> }
>
> SECTIONS {
> .bss: {} > IRAM
>
> .far: {} > IRAM
>
> .sysdata: {} > IRAM
>
> .mem: {} > IRAM
>
> .sysinit: {} > IRAM
>
> .sysregs: {} > IRAM
>
> .gblinit: {} > IRAM
>
> .trcdata: {} > IRAM
>
> .args: fill=0 {
> *(.args)
> . += 0x4;
> } > IRAM
>
> .cinit: {} > IRAM
>
> .pinit: {} > IRAM
>
> .data: {} > IRAM
>
> .const: {} > IRAM
>
> .switch: {} > IRAM
>
> .cio: {} > IRAM
>
> .text: {} > IRAM
>
> frt: {} > IRAM
>
> .bios: {} > IRAM
>
> .stack: fill=0xc0ffee {
> GBL_stackbeg = .;
> *(.stack)
> GBL_stackend = GBL_stackbeg + 0x400 - 1;
> _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> _HWI_STKTOP = GBL_stackbeg;
> } > IRAM
>
> .trace: fill = 0x0 {
> _SYS_PUTCBEG = .;
> . += 0x200;
> _SYS_PUTCEND = . - 1;
> } > IRAM
>
> .rtdx_data: {} > IRAM
>
> .rtdx_text: {} > IRAM
>
> .hst: {
> HST_A_TABBEG = .;
> _HST_A_TABBEG = .;
> *(.hst)
> HST_A_TABEND = .;
> _HST_A_TABEND = .;
> HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> } > IRAM
>
> .dsm: {} > IRAM
>
> /* RTA_fromHost buffer */
> .hst1: align = 0x4 {} > IRAM
>
> /* RTA_toHost buffer */
> .hst0: align = 0x4 {} > IRAM
>
> .hwi: {} > IRAM
>
> .tsk: {
> *(.tsk)
> } > IRAM
>
> .TSK_idle$stk: {
> *(.TSK_idle$stk)
> } > IRAM
>
> .log: {
> LOG_A_TABBEG = .;
> _LOG_A_TABBEG = .;
> *(.log)
> LOG_A_TABEND = .;
> _LOG_A_TABEND = .;
> LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> } > IRAM
>
> .printf (COPY): {} > IRAM
>
> /* LOG_system buffer */
> .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
>
> .pip: {
> PIP_A_TABBEG = .;
> _PIP_A_TABBEG = .;
> *(.pip)
> PIP_A_TABEND = .;
> _PIP_A_TABEND = .;
> PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> } > IRAM
>
> .sts: {
> STS_A_TABBEG = .;
> _STS_A_TABBEG = .;
> *(.sts)
> STS_A_TABEND = .;
> _STS_A_TABEND = .;
> STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> } > IRAM
>
> .sys: {} > IRAM
>
> .gio: {} > IRAM
>
> .IRAM$heap: {
> IRAM$B = .;
> _IRAM_base = .;
> IRAM$L = 0x8000;
> _IRAM_length = 0x8000;
> . += 0x8000;
> } > IRAM
>
> }
>
> I don't see any way to define section using DSP/BIOS memory
> management. I really don't know what to do now.
>
> ________________________________
> From: Richard Williams
> To: B S ; c...
> Sent: Fri, February 4, 2011 5:23:18 AM
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> B.S.
>
> I have a question, what is the definition of 'j' in the code snipit
> that you provided.
>
> Note: 'short int' has a max value of approx +/- 32k.
> Note: 'int' has max value of approx +/- 2gig.
>
> If the 'j' variable is defined as 'short int' then it will never reach
> the end of a loop that is trying to iterate 100000 times.
>
> Regarding the error message you are getting..
> The problem origination is an error in the MEMORY and SECTIONS
> definitions using the configuration tool.
>
> BTW:
> Why did you move the .data section to SDRAM?
> It was doing fine in IRAM.
>
> In fact everything was doing fine in IRAM until the data_stats array
> got too big.
>
> My suggestion (which you have partly implemented) is to ONLY move the
>data_stats
> array to the SDRAM address space.
>
> In otherwords,
>
> The .cmd file needs to have a line in the MEMORY{} that reads
> something like this: SDRAM RW origin=0x100000000, length=0x100000
>
> The .cmd file needs to have a line in the SECTIONS{} that reads
> something like this: EXT_RAM : LOAD = SDRAM TYPE=DSECT ALIGN2
>
> To help with your understanding of the .cmd file, you may want to read
> SPRU186u.pdf, "TMS320C6000 Assembly Language Tools" available for
> download from TI.com. beginning around page 184 "7.5 Linker Command Files"
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S
> To: Richard Williams , c...
> Sent: Thu, 3 Feb 2011 08:05:18 -0800 (PST)
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> > R. Williams,
> >
> > I tried with 'SDRAM' but it says the same thing (creating output
> > section .SDRAM without SECTIONS specification).
> >
> > I changed the configuration settings, I removed 'heap' from SDRAM and
> > used SDRAM for Data Section (.data) under COMPILER SECTIONS tab, You
> > can see all of them in the snapshot. Are these settings ok OR some
> > thing need to be switch between IRAM and SDRAM ?
> >
> > http://i53.tinypic.com/jhahee.jpg
> >
> > By doing so, I am not getting 'creating output section' warning but it
> > is now saving values in data_stats and then writing to TEXT file.
> >
> > This is how I am writing to text file.
> >
> > FILE *fp;
> > fp = fopen("Samples.txt", "w");
> >
> > for(j=0; j > > {
> > fprintf(fp, "%f\n", data_stats[j] );
> > }
> >
> > fclose(fp);
> > exit(1);
> >
> > When the size of data_stats is not more than some X size, program
> > exits fine after writing data to text file but as I increase the size
> > of data_stats to 100,000, it never exits after writing to text file.
> > When I halt the program I see the cursor at momory section:
> > RTDX_Final_RT_Monitor. Snapshot also shows Disassembly view.
> >
> > What should I change to configure the SDRAM properly ?
> >
> > Thanks.
> >
> > ________________________________
> > From: Richard Williams
> > To: B S ; c...
> > Sent: Wed, February 2, 2011 8:52:56 PM
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > B.S.
> >
> > I see a few 'ooops' in the configuration area.
> >
> > For instance....
> > the '.EXT_RAM' section does not exist.
> > however, 'SDRAM' does exist.
> > so your pragma should look like this:
> > $pragma DATA_SECTION(data_stats,"SDRAM")
> > unless you define a specific section in the configuration named
> > '.EXT_RAM' that is large enough to hold your complete data table. If
> > you do define a .EXT_RAM section, then the size of the SDRAM section
> > must be reduced by an equal amount and the starting address of each
> > section adjusted so the sections do not overlap.
> >
> > Then, as I looked at the configuration settings, I noticed:
> >
> > 1) the 'heap' is in SDRAM, that is not a really good idea unless the
> > application needs lots of room in the heap.
> >
> > 2) the 'stack' section is in SDRAM, that is a very bad idea
> > because the stack is referenced OFTEN and there is a major execution speed
> > penalty for having it in any place other than IRAM.
> >
> > 3) The BIOS sections need to be 'fast' so should be in IRAM
> >
> > 4) The startup code is only executed once, so placing it in SDRAM is
probably
> > ok, however; I would have left it in FLASH and executed it from FLASH.
> >
> > 5) You want interrupt servicing to be 'fast', so the interrupt service
> > table should be in IRAM.
> >
> > 6) The 'text' section is the actual executable code. so placing it in
> > SDRAM is a major execution speed penalty.
> >
> > 7) If your code is initially in FLASH, then the jump switch tables should
> > probably be left in FLASH. They are actually part of the executable
> > code, but their usage is minimal (for most programs).
> >
> > 8) The '.cinit' section is only referenced during the startup code
> > execution, so leaving it in FLASH is a very good idea. BTW this is
> > initialization values for the ram data. It will be 'gone' over a
> > power cycle.
> >
> > 9) The '.const' section never changes and is rarely referenced, so
> > leaving it in FLASH is a good idea.
> >
> > 10) The '.data' section is your program variables that will be initialized
> > during the startup code execution. Since such variables are usually
> referenced
> > often, it is a good idea to have them in IRAM. (however, that actual
> > initialization values can be left in FLASH as they are only referenced
> > once during the startup code.
> >
> > BTW:
> > the whole idea was to make your link work.
> > The only problem with your link was the data_stats being too large to
> > fit into the IRAM. If I were doing this, the only thing I would have
> > moved is the data_stats and left everything else in IRAM/FLASH. Note:
> > there is a execution speed penalty for items in FLASH and usually also
> > for items in SDRAM.
> >
> > BTW:
> > It looks like there is no definition of the FLASH area.
> > IMO that should be added, so certain sections can be left in the FLASH,
> > rather than (during the startup code) copied into xxRAM then copied
> > again into their final execution/data location.
> >
> > BTW:
> > I'm not sure if the DSP you are using has any differentiation between
> > 'far' and 'near' addresses, but if it does, then I would plan the
> > memory layout to use 'near' addresses when executing code that is run
> > often or needs to run fast.
> >
> > BTW:
> > if you move all the executable code out of SDRAM, then you can improve
> > the definition of SDRAM to be only data rather than code/data.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S
> > To: Richard Williams , c...
> > Sent: Wed, 2 Feb 2011 08:59:04 -0800 (PST)
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > > Hi,
> > >
> > > Yes, I have 16 MEG SDRAM available and I added SDRAM IN MEMORY SECTION
> > > MANAGER using DSP/BIOS.
> > >
> > > Here attached snapshot to show all the settings I chosen for External
> > > Memory. http://i53.tinypic.com/1z4vjo7.jpg
> > >
> > > I used this line to define data_stats buffer in EXT RAM
> > > #pragma DATA_SECTION(data_stats,".EXT_RAM")
> > >
> > > When I build my project, I get following error.
> > > warning: creating output section .EXT_RAM without SECTIONS specification
> > >
> > > Even after this my program runs, it saved values in data_stats buffer
> > > but when I write those values to .text file, it doesn't write any
> > > thing, text file is just blank. What is wrong here ?
> > >
> > > Richard, you said to modify memory map, via the config tool, to
> > > include the available external RAM. I don't know how to di it. Is it
> > > causing trouble ?
> > >
> > > Please help me.
> > >
> > > ________________________________
> > > From: Richard Williams
> > > To: B S ; c...
> > > Sent: Fri, January 28, 2011 8:44:42 PM
> > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > >
> > > B.S.
> > >
> > > If your looking at the 6713 architecture manual (available for
> > > download at TI.com) part number SPRS186L,pdf then you see, on page 16
> > > the memory map and on page 17 the various ways the 'IRAM' portion of
> > > the memory map can be allocated as L2 cache+IRAM.
> > >
> > > Your program, per the linker error messages is larger than the
> > > available IRAM.
> > >
> > > I say again : Your program is TOO BIG for the size of the IRAM.
> > >
> > > Does your development board have any external RAM implemented?
> > >
> > > If yes, then modify the configuration file, using the config tool, and
> > > move the data table to the external RAM. You will also have to modify
> > > the memory map, via the config tool, to include the available external
> > > RAM.
> > >
> > > If no, then you will have to implement some external RAM (via
> > > additional hardware) and move the data table to the external RAM via
> > > the config tool.
> > >
> > > BTW:
> > > Turning the ""Enable Memory Maping" off is a bad idea as this stops
> > > the linker from checking that the program will fit within the
> > > available RAM.
> > >
> > > R. Williams
> > >
> > > ---------- Original Message -----------
> > > From: B S
> > > To: Richard Williams , c...
> > > Sent: Fri, 28 Jan 2011 07:08:58 -0800 (PST)
> > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > >
> > > > Hi Richard Williams,
> > > >
> > > > I have been looking at the DSP Architecture Manual.
> > > >
> > > > Here attached the cmd file.
> > > >
> > > > /* MODULE PARAMETERS */
> > > > GBL_USERINITFXN = _FXN_F_nop;
> > > >
> > > > MEM_SEGZERO = IRAM;
> > > > MEM_MALLOCSEG = IRAM;
> > > >
> > > > CLK_TIMEFXN = CLK_F_getshtime;
> > > > CLK_HOOKFXN = HWI_F_dispatch;
> > > >
> > > > PRD_THOOKFXN = _KNL_tick;
> > > >
> > > > RTDX_DATAMEMSEG = IRAM;
> > > >
> > > > HST_DSMBUFSEG = IRAM;
> > > >
> > > > SWI_EHOOKFXN = GBL_NULL;
> > > > SWI_IHOOKFXN = GBL_NULL;
> > > > SWI_EXECFXN = SWI_F_iexec;
> > > > SWI_RUNFXN = SWI_F_run;
> > > >
> > > > TSK_STACKSEG = IRAM;
> > > > TSK_VCREATEFXN = _FXN_F_nop;
> > > > TSK_VDELETEFXN = _FXN_F_nop;
> > > > TSK_VEXITFXN = _FXN_F_nop;
> > > >
> > > > IDL_CALIBRFXN = IDL_F_stub;
> > > >
> > > > SYS_ABORTFXN = _UTL_doAbort;
> > > > SYS_ERRORFXN = _UTL_doError;
> > > > SYS_EXITFXN = _UTL_halt;
> > > > SYS_PUTCFXN = _UTL_doPutc;
> > > >
> > > > GIO_CREATEFXN = _FXN_F_nop;
> > > > GIO_DELETEFXN = _FXN_F_nop;
> > > > GIO_PENDFXN = _FXN_F_nop;
> > > > GIO_POSTFXN = _FXN_F_nop;
> > > >
> > > > /* OBJECT ALIASES */
> > > > _IRAM = IRAM;
> > > > _PRD_clock = PRD_clock;
> > > > _RTA_fromHost = RTA_fromHost;
> > > > _RTA_toHost = RTA_toHost;
> > > > _HWI_RESET = HWI_RESET;
> > > > _HWI_NMI = HWI_NMI;
> > > > _HWI_RESERVED0 = HWI_RESERVED0;
> > > > _HWI_RESERVED1 = HWI_RESERVED1;
> > > > _HWI_INT4 = HWI_INT4;
> > > > _HWI_INT5 = HWI_INT5;
> > > > _HWI_INT6 = HWI_INT6;
> > > > _HWI_INT7 = HWI_INT7;
> > > > _HWI_INT8 = HWI_INT8;
> > > > _HWI_INT9 = HWI_INT9;
> > > > _HWI_INT10 = HWI_INT10;
> > > > _HWI_INT11 = HWI_INT11;
> > > > _HWI_INT12 = HWI_INT12;
> > > > _HWI_INT13 = HWI_INT13;
> > > > _HWI_INT14 = HWI_INT14;
> > > > _HWI_INT15 = HWI_INT15;
> > > > _KNL_swi = KNL_swi;
> > > > _TSK_idle = TSK_idle;
> > > > _LNK_dataPump = LNK_dataPump;
> > > > _RTA_dispatcher = RTA_dispatcher;
> > > > _IDL_cpuLoad = IDL_cpuLoad;
> > > > _LOG_system = LOG_system;
> > > > _IDL_busyObj = IDL_busyObj;
> > > >
> > > > /* MODULE GBL */
> > > >
> > > > SECTIONS {
> > > > .vers (COPY): {} /* version information */
> > > > }
> > > >
> > > > -priority
> > > > -llnkrtdx.a62
> > > > -ldrivers.a67 /* device drivers support */
> > > > -lsioboth.a62 /* supports both SIO models */
> > > > -lbiosi.a62 /* DSP/BIOS support */
> > > > -lrtdx.lib /* RTDX support */
> > > > -lcsl6713.lib
> > > > -lrts6700.lib /* C and C++ run-time library support */
> > > >
> > > > _GBL_CACHE = GBL_CACHE;
> > > >
> > > > /* MODULE MEM */
> > > > -stack 0x400
> > > > MEMORY {
> > > > IRAM : origin = 0x0, len = 0x40000
> > > > }
> > > > /* MODULE CLK */
> > > > SECTIONS {
> > > > .clk: {
> > > > _CLK_start = _CLK_start6x;
> > > > CLK_F_gethtime = CLK_F_getshtime;
> > > > CLK_A_TABBEG = .;
> > > > *(.clk)
> > > > CLK_A_TABEND = .;
> > > > CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> > > > } > IRAM
> > > > }
> > > > _CLK_PRD = CLK_PRD;
> > > > _CLK_COUNTSPMS = CLK_COUNTSPMS;
> > > > _CLK_REGS = CLK_REGS;
> > > > _CLK_USETIMER = CLK_USETIMER;
> > > > _CLK_TIMERNUM = CLK_TIMERNUM;
> > > > _CLK_TDDR = CLK_TDDR;
> > > >
> > > > /* MODULE PRD */
> > > > SECTIONS {
> > > > .prd: {
> > > > PRD_A_TABBEG = .;
> > > > /* no PRD objects */
> > > > PRD_A_TABEND = .;
> > > > PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> > > > } > IRAM
> > > > }
> > > >
> > > > /* MODULE RTDX */
> > > > _RTDX_interrupt_mask = 0x0;
> > > >
> > > > /* MODULE HWI */
> > > > SECTIONS {
> > > > .hwi_vec: 0x0 {
> > > > HWI_A_VECS = .;
> > > > *(.hwi_vec)
> > > > }
> > > > }
> > > >
> > > > /* MODULE SWI */
> > > > SECTIONS {
> > > > .swi: {
> > > > SWI_A_TABBEG = .;
> > > > *(.swi)
> > > > SWI_A_TABEND = .;
> > > > SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> > > > } > IRAM
> > > > }
> > > >
> > > > /* MODULE IDL */
> > > > SECTIONS {
> > > > .idl: {
> > > > IDL_A_TABBEG = .;
> > > > *(.idl)
> > > > IDL_A_TABEND = .;
> > > > IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> > > > IDL_A_CALBEG = .;
> > > > *(.idlcal)
> > > > IDL_A_CALEND = .;
> > > > IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> > > > } > IRAM
> > > > }
> > > >
> > > > SECTIONS {
> > > > .bss: {} > IRAM
> > > >
> > > > .far: {} > IRAM
> > > >
> > > > .sysdata: {} > IRAM
> > > >
> > > > .mem: {} > IRAM
> > > >
> > > > .sysinit: {} > IRAM
> > > >
> > > > .sysregs: {} > IRAM
> > > >
> > > > .gblinit: {} > IRAM
> > > >
> > > > .trcdata: {} > IRAM
> > > >
> > > > .args: fill=0 {
> > > > *(.args)
> > > > . += 0x4;
> > > > } > IRAM
> > > >
> > > > .cinit: {} > IRAM
> > > >
> > > > .pinit: {} > IRAM
> > > >
> > > > .data: {} > IRAM
> > > >
> > > > .const: {} > IRAM
> > > >
> > > > .switch: {} > IRAM
> > > >
> > > > .cio: {} > IRAM
> > > >
> > > > .text: {} > IRAM
> > > >
> > > > frt: {} > IRAM
> > > >
> > > > .bios: {} > IRAM
> > > >
> > > > .stack: fill=0xc0ffee {
> > > > GBL_stackbeg = .;
> > > > *(.stack)
> > > > GBL_stackend = GBL_stackbeg + 0x400 - 1;
> > > > _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> > > > _HWI_STKTOP = GBL_stackbeg;
> > > > } > IRAM
> > > >
> > > > .trace: fill = 0x0 {
> > > > _SYS_PUTCBEG = .;
> > > > . += 0x200;
> > > > _SYS_PUTCEND = . - 1;
> > > > } > IRAM
> > > >
> > > > .rtdx_data: {} > IRAM
> > > >
> > > > .rtdx_text: {} > IRAM
> > > >
> > > > .hst: {
> > > > HST_A_TABBEG = .;
> > > > _HST_A_TABBEG = .;
> > > > *(.hst)
> > > > HST_A_TABEND = .;
> > > > _HST_A_TABEND = .;
> > > > HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > > _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > > } > IRAM
> > > >
> > > > .dsm: {} > IRAM"Enable Memory Maping"
> > > >
> > > > /* RTA_fromHost buffer */
> > > > .hst1: align = 0x4 {} > IRAM
> > > >
> > > > /* RTA_toHost buffer */
> > > > .hst0: align = 0x4 {} > IRAM
> > > >
> > > > .hwi: {} > IRAM
> > > >
> > > > .tsk: {
> > > > *(.tsk)
> > > > } > IRAM
> > > >
> > > > .TSK_idle$stk: {
> > > > *(.TSK_idle$stk)
> > > > } > IRAM
> > > >
> > > > .log: {
> > > > LOG_A_TABBEG = .;
> > > > _LOG_A_TABBEG = .;
> > > > *(.log)
> > > > LOG_A_TABEND = .;
> > > > _LOG_A_TABEND = .;
> > > > LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > > _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > > } > IRAM
> > > >
> > > > .printf (COPY): {} > IRAM
> > > >
> > > > /* LOG_system buffer */
> > > > .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
> > > >
> > > > .pip: {
> > > > PIP_A_TABBEG = .;
> > > > _PIP_A_TABBEG = .;
> > > > *(.pip)
> > > > PIP_A_TABEND = .;
> > > > _PIP_A_TABEND = .;
> > > > PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > > _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > > } > IRAM
> > > >
> > > > .sts: {
> > > > STS_A_TABBEG = .;
> > > > _STS_A_TABBEG = .;
> > > > *(.sts)
> > > > STS_A_TABEND = .;
> > > > _STS_A_TABEND = .;
> > > > STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > > _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > > } > IRAM
> > > >
> > > > .sys: {} > IRAM
> > > >
> > > > .gio: {} > IRAM
> > > >
> > > > .IRAM$heap: {
> > > > IRAM$B = .;
> > > > _IRAM_base = .;
> > > > IRAM$L = 0x8000;
> > > > _IRAM_length = 0x8000;
> > > > . += 0x8000;
> > > > } > IRAM
> > > >
> > > > }
> > > >
> > > > I am also getting the message given below but when I remove the check
> > > > from "Enable Memory Maping" tab it solves the problem but I don't know
> > > > why it some time happens ?
> > > >
> > > > Loader: One or more sections of your program falls into a memory
> > > > region that is not writable. These regions will not actually be
> > > > written to the target. Check your linker configuration and/or memory
map.
> > > >
> > > > Thanks.
> > > >
> > > > ________________________________
> > > > From: Richard Williams
> > > > To: B S ; c...
> > > > Sent: Wed, January 26, 2011 9:01:26 PM
> > > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > > >
> > > > B.S.
> > > >
> > > > Those error messages are from the linker. Not from running the code.
> > > > It seems this is an excellent time for you to read the DSP
> > > > architecture manual for the chip you are using and read the
> > > > information on the .cmd file for the linker.
> > > >
> > > > They mean there is not enough room in the IRAM memory section.
> > > >
> > > > You will probably have to move the data points table to external RAM.
> > > > BTW:
> > > > How much external RAM do you have implemented on your project?
> > > >
> > > > BTW:
> > > > if you have the problem again, then please paste the .cmd file listing
> > > > in your post.
> > > >
> > > > R. Williams
> > > >
> > > > ---------- Original Message -----------
> > > > From: B S
> > > > To: c...
> > > > Sent: Wed, 26 Jan 2011 08:22:32 -0800 (PST)
> > > > Subject: [c6x] C6713- Momory Allocation Probolem
> > > >
> > > > > Hi,
> > > > >
> > > > > I have been trying to save over 50,000 data points in run time and
> > > > > then transfer them to a text file. When I am running my code for 25,
> > > > > 000 data points, it's running fine but giving so many errors as given
> > > > > below when I increase the size of buffer to 51200. I really don't know

> > > > > what does it mean.
> > > > >
> > > > > >> error: can't allocate .text, size 00004960 (page 0) in IRAM
>(avail:
>
> > > > > >>000001d0)
> > > > > >> error: can't allocate .bios, size 00003c60 (page 0) in IRAM
>(avail:
>
> > > > > >>000001d0)
> > > > > >> error: can't allocate .cinit, size 0000105c (page 0) in IRAM
>(avail:
>
> >
> > > > > >>000001d0)
> > > > > >> error: can't allocate .rtdx_text, size 00000cc0 (page 0) in IRAM
> > >(avail:
> > >
> > > >
> > > > > >>000001d0)
> > > > > >> error: can't allocate .bss, size 000004b8 (page 0) in IRAM
(avail:
> > > >
> > > > > >>000001d0)
> > > > > >> error: can't allocate .rtdx_data, size 0000044c (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .stack, size 00000400 (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .TSK_idle$stk, size 00000400 (page 0) in
>IRAM
>
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .sysinit, size 00000360 (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .trace, size 00000200 (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .LOG_system$buf, size 00000100 (page 0) in
> > > > > >>IRAM (avail: 000000d0)
> > > > > >> error: can't allocate .tsk, size 00000060 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .const, size 00000046 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .sts, size 00000030 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .swi, size 0000002c (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .hst, size 0000002c (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .gblinit, size 00000028 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .switch, size 00000028 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .idl, size 00000020 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .log, size 00000018 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .hst1, size 00000010 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .sys, size 00000010 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .trcdata, size 0000000c (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .pinit, size 0000000c (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .mem, size 00000004 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000000)
> > > > > >> error: can't allocate .args, size 00000004 (page 0) in IRAM
> > > > > >>(avail: 00000000)
> > > > > >> error: errors in input - ./Debug/ADS7881_BAS.out not built
> > > > >
> > > > > >> Compilation failure
> > > > >
> > > > > Build Complete,
> > > > > 28 Errors, 0 Warnings, 0 Remarks.
> > > > >
> > > > > Will some one please help me out with issue ? How can I save larger
> > > > > data values ? How much is the limit for C6713 ?
> > > > >
> > > > > I will appreciate your help.
> > > > >
> > > > > -BAS
> > > > ------- End of Original Message -------
> > > ------- End of Original Message -------
> > >
> > >
> > ------- End of Original Message -------
> ------- End of Original Message -------
------- End of Original Message -------
Hi All,

Thanks for your replies.

Mike and Richar,

Sorry about '.SDRAM', I did check with 'SDRAM' and still getting the same
warning.

Richard,

Variable 'j' is defined as short and its not a problem.

The .cmd file does show SDRAM in the MEMORY section like this:

/* MODULE MEM */
-stack 0x400
MEMORY {
IRAM : origin = 0x0, len = 0x40000
SDRAM : origin = 0x80000000, len = 0x1000000
}

It says nothing about SECTION{} but when I move .data or .bss or .cint to SDRAM,
it shows some thing like this in the end of .cmd file:

.data: {} > SDRAM

I did read SPRU186u.pdf but I can't modify .cmd file directly to add section
about SDRAM because its autogenerating by DSP/BIOS.

You can see my cmd file here.

/* INPUT ADS7881.cdb */

/* MODULE PARAMETERS */
GBL_USERINITFXN = _FXN_F_nop;

MEM_SEGZERO = IRAM;
MEM_MALLOCSEG = IRAM;

CLK_TIMEFXN = CLK_F_getshtime;
CLK_HOOKFXN = HWI_F_dispatch;

PRD_THOOKFXN = _KNL_tick;

RTDX_DATAMEMSEG = IRAM;

HST_DSMBUFSEG = IRAM;

SWI_EHOOKFXN = GBL_NULL;
SWI_IHOOKFXN = GBL_NULL;
SWI_EXECFXN = SWI_F_iexec;
SWI_RUNFXN = SWI_F_run;

TSK_STACKSEG = MEM_NULL;
TSK_VCREATEFXN = _FXN_F_nop;
TSK_VDELETEFXN = _FXN_F_nop;
TSK_VEXITFXN = _FXN_F_nop;

IDL_CALIBRFXN = IDL_F_stub;

SYS_ABORTFXN = _UTL_doAbort;
SYS_ERRORFXN = _UTL_doError;
SYS_EXITFXN = _UTL_halt;
SYS_PUTCFXN = _UTL_doPutc;

GIO_CREATEFXN = _FXN_F_nop;
GIO_DELETEFXN = _FXN_F_nop;
GIO_PENDFXN = _FXN_F_nop;
GIO_POSTFXN = _FXN_F_nop;

/* OBJECT ALIASES */
_IRAM = IRAM;
_SDRAM = SDRAM;
_PRD_clock = PRD_clock;
_RTA_fromHost = RTA_fromHost;
_RTA_toHost = RTA_toHost;
_HWI_RESET = HWI_RESET;
_HWI_NMI = HWI_NMI;
_HWI_RESERVED0 = HWI_RESERVED0;
_HWI_RESERVED1 = HWI_RESERVED1;
_HWI_INT4 = HWI_INT4;
_HWI_INT5 = HWI_INT5;
_HWI_INT6 = HWI_INT6;
_HWI_INT7 = HWI_INT7;
_HWI_INT8 = HWI_INT8;
_HWI_INT9 = HWI_INT9;
_HWI_INT10 = HWI_INT10;
_HWI_INT11 = HWI_INT11;
_HWI_INT12 = HWI_INT12;
_HWI_INT13 = HWI_INT13;
_HWI_INT14 = HWI_INT14;
_HWI_INT15 = HWI_INT15;
_KNL_swi = KNL_swi;
_TSK_idle = TSK_idle;
_LNK_dataPump = LNK_dataPump;
_RTA_dispatcher = RTA_dispatcher;
_IDL_cpuLoad = IDL_cpuLoad;
_LOG_system = LOG_system;
_IDL_busyObj = IDL_busyObj;

/* MODULE GBL */

SECTIONS {
.vers (COPY): {} /* version information */
}

-priority
-llnkrtdx.a62
-ldrivers.a67 /* device drivers support */
-lsioboth.a62 /* supports both SIO models */
-lbiosi.a62 /* DSP/BIOS support */
-lrtdx.lib /* RTDX support */
-lcsl6713.lib
-lrts6700.lib /* C and C++ run-time library support */

_GBL_CACHE = GBL_CACHE;

/* MODULE MEM */
-stack 0x400
MEMORY {
IRAM : origin = 0x0, len = 0x40000
SDRAM : origin = 0x80000000, len = 0x1000000
}
/* MODULE CLK */
SECTIONS {
.clk: {
_CLK_start = _CLK_start6x;
CLK_F_gethtime = CLK_F_getshtime;
CLK_A_TABBEG = .;
*(.clk)
CLK_A_TABEND = .;
CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
} > IRAM
}
_CLK_PRD = CLK_PRD;
_CLK_COUNTSPMS = CLK_COUNTSPMS;
_CLK_REGS = CLK_REGS;
_CLK_USETIMER = CLK_USETIMER;
_CLK_TIMERNUM = CLK_TIMERNUM;
_CLK_TDDR = CLK_TDDR;

/* MODULE PRD */
SECTIONS {
.prd: {
PRD_A_TABBEG = .;
/* no PRD objects */
PRD_A_TABEND = .;
PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
} > IRAM
}

/* MODULE RTDX */
_RTDX_interrupt_mask = 0x0;

/* MODULE HWI */
SECTIONS {
.hwi_vec: 0x0 {
HWI_A_VECS = .;
*(.hwi_vec)
}
}

/* MODULE SWI */
SECTIONS {
.swi: {
SWI_A_TABBEG = .;
*(.swi)
SWI_A_TABEND = .;
SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
} > IRAM
}

/* MODULE IDL */
SECTIONS {
.idl: {
IDL_A_TABBEG = .;
*(.idl)
IDL_A_TABEND = .;
IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
IDL_A_CALBEG = .;
*(.idlcal)
IDL_A_CALEND = .;
IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
} > IRAM
}

SECTIONS {
.bss: {} > IRAM

.far: {} > IRAM

.sysdata: {} > IRAM

.mem: {} > IRAM

.sysinit: {} > IRAM

.sysregs: {} > IRAM

.gblinit: {} > IRAM

.trcdata: {} > IRAM

.args: fill=0 {
*(.args)
. += 0x4;
} > IRAM

.cinit: {} > IRAM

.pinit: {} > IRAM

.data: {} > IRAM

.const: {} > IRAM

.switch: {} > IRAM

.cio: {} > IRAM

.text: {} > IRAM

frt: {} > IRAM

.bios: {} > IRAM

.stack: fill=0xc0ffee {
GBL_stackbeg = .;
*(.stack)
GBL_stackend = GBL_stackbeg + 0x400 - 1;
_HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
_HWI_STKTOP = GBL_stackbeg;
} > IRAM

.trace: fill = 0x0 {
_SYS_PUTCBEG = .;
. += 0x200;
_SYS_PUTCEND = . - 1;
} > IRAM

.rtdx_data: {} > IRAM

.rtdx_text: {} > IRAM

.hst: {
HST_A_TABBEG = .;
_HST_A_TABBEG = .;
*(.hst)
HST_A_TABEND = .;
_HST_A_TABEND = .;
HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
_HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
} > IRAM

.dsm: {} > IRAM

/* RTA_fromHost buffer */
.hst1: align = 0x4 {} > IRAM

/* RTA_toHost buffer */
.hst0: align = 0x4 {} > IRAM

.hwi: {} > IRAM

.tsk: {
*(.tsk)
} > IRAM

.TSK_idle$stk: {
*(.TSK_idle$stk)
} > IRAM

.log: {
LOG_A_TABBEG = .;
_LOG_A_TABBEG = .;
*(.log)
LOG_A_TABEND = .;
_LOG_A_TABEND = .;
LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
_LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
} > IRAM

.printf (COPY): {} > IRAM

/* LOG_system buffer */
.LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM

.pip: {
PIP_A_TABBEG = .;
_PIP_A_TABBEG = .;
*(.pip)
PIP_A_TABEND = .;
_PIP_A_TABEND = .;
PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
_PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
} > IRAM

.sts: {
STS_A_TABBEG = .;
_STS_A_TABBEG = .;
*(.sts)
STS_A_TABEND = .;
_STS_A_TABEND = .;
STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
_STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
} > IRAM

.sys: {} > IRAM

.gio: {} > IRAM

.IRAM$heap: {
IRAM$B = .;
_IRAM_base = .;
IRAM$L = 0x8000;
_IRAM_length = 0x8000;
. += 0x8000;
} > IRAM

}

I don't see any way to define section using DSP/BIOS memory management. I really
don't know what to do now.

________________________________
From: Richard Williams
To: B S ; c...
Sent: Fri, February 4, 2011 5:23:18 AM
Subject: Re: [c6x] C6713- Momory Allocation Probolem

B.S.

I have a question, what is the definition of 'j' in the code snipit that you
provided.

Note: 'short int' has a max value of approx +/- 32k.
Note: 'int' has max value of approx +/- 2gig.

If the 'j' variable is defined as 'short int' then it will never reach the end
of a loop that is trying to iterate 100000 times.

Regarding the error message you are getting..
The problem origination is an error in the MEMORY and SECTIONS definitions using
the configuration tool.

BTW:
Why did you move the .data section to SDRAM?
It was doing fine in IRAM.

In fact everything was doing fine in IRAM until the data_stats array got too
big.

My suggestion (which you have partly implemented) is to ONLY move the data_stats
array to the SDRAM address space.

In otherwords,

The .cmd file needs to have a line in the MEMORY{} that reads something like
this:
SDRAM RW origin=0x100000000, length=0x100000

The .cmd file needs to have a line in the SECTIONS{} that reads something like
this:
EXT_RAM : LOAD = SDRAM TYPE=DSECT ALIGN2

To help with your understanding of the .cmd file, you may want to read
SPRU186u.pdf, "TMS320C6000 Assembly Language Tools" available for download from
TI.com.
beginning around page 184 "7.5 Linker Command Files"

R. Williams

---------- Original Message -----------
From: B S
To: Richard Williams , c...
Sent: Thu, 3 Feb 2011 08:05:18 -0800 (PST)
Subject: Re: [c6x] C6713- Momory Allocation Probolem

> R. Williams,
>
> I tried with 'SDRAM' but it says the same thing (creating output
> section .SDRAM without SECTIONS specification).
>
> I changed the configuration settings, I removed 'heap' from SDRAM and
> used SDRAM for Data Section (.data) under COMPILER SECTIONS tab, You
> can see all of them in the snapshot. Are these settings ok OR some
> thing need to be switch between IRAM and SDRAM ?
>
> http://i53.tinypic.com/jhahee.jpg
>
> By doing so, I am not getting 'creating output section' warning but it
> is now saving values in data_stats and then writing to TEXT file.
>
> This is how I am writing to text file.
>
> FILE *fp;
> fp = fopen("Samples.txt", "w");
>
> for(j=0; j > {
> fprintf(fp, "%f\n", data_stats[j] );
> }
>
> fclose(fp);
> exit(1);
>
> When the size of data_stats is not more than some X size, program
> exits fine after writing data to text file but as I increase the size
> of data_stats to 100,000, it never exits after writing to text file.
> When I halt the program I see the cursor at momory section:
> RTDX_Final_RT_Monitor. Snapshot also shows Disassembly view.
>
> What should I change to configure the SDRAM properly ?
>
> Thanks.
>
> ________________________________
> From: Richard Williams
> To: B S ; c...
> Sent: Wed, February 2, 2011 8:52:56 PM
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> B.S.
>
> I see a few 'ooops' in the configuration area.
>
> For instance....
> the '.EXT_RAM' section does not exist.
> however, 'SDRAM' does exist.
> so your pragma should look like this:
> $pragma DATA_SECTION(data_stats,"SDRAM")
> unless you define a specific section in the configuration named
> '.EXT_RAM' that is large enough to hold your complete data table. If
> you do define a .EXT_RAM section, then the size of the SDRAM section
> must be reduced by an equal amount and the starting address of each
> section adjusted so the sections do not overlap.
>
> Then, as I looked at the configuration settings, I noticed:
>
> 1) the 'heap' is in SDRAM, that is not a really good idea unless the
> application needs lots of room in the heap.
>
> 2) the 'stack' section is in SDRAM, that is a very bad idea
> because the stack is referenced OFTEN and there is a major execution speed
> penalty for having it in any place other than IRAM.
>
> 3) The BIOS sections need to be 'fast' so should be in IRAM
>
> 4) The startup code is only executed once, so placing it in SDRAM is probably
> ok, however; I would have left it in FLASH and executed it from FLASH.
>
> 5) You want interrupt servicing to be 'fast', so the interrupt service
> table should be in IRAM.
>
> 6) The 'text' section is the actual executable code. so placing it in
> SDRAM is a major execution speed penalty.
>
> 7) If your code is initially in FLASH, then the jump switch tables should
> probably be left in FLASH. They are actually part of the executable
> code, but their usage is minimal (for most programs).
>
> 8) The '.cinit' section is only referenced during the startup code
> execution, so leaving it in FLASH is a very good idea. BTW this is
> initialization values for the ram data. It will be 'gone' over a
> power cycle.
>
> 9) The '.const' section never changes and is rarely referenced, so
> leaving it in FLASH is a good idea.
>
> 10) The '.data' section is your program variables that will be initialized
> during the startup code execution. Since such variables are usually
referenced
> often, it is a good idea to have them in IRAM. (however, that actual
> initialization values can be left in FLASH as they are only referenced
> once during the startup code.
>
> BTW:
> the whole idea was to make your link work.
> The only problem with your link was the data_stats being too large to
> fit into the IRAM. If I were doing this, the only thing I would have
> moved is the data_stats and left everything else in IRAM/FLASH. Note:
> there is a execution speed penalty for items in FLASH and usually also
> for items in SDRAM.
>
> BTW:
> It looks like there is no definition of the FLASH area.
> IMO that should be added, so certain sections can be left in the FLASH,
> rather than (during the startup code) copied into xxRAM then copied
> again into their final execution/data location.
>
> BTW:
> I'm not sure if the DSP you are using has any differentiation between
> 'far' and 'near' addresses, but if it does, then I would plan the
> memory layout to use 'near' addresses when executing code that is run
> often or needs to run fast.
>
> BTW:
> if you move all the executable code out of SDRAM, then you can improve
> the definition of SDRAM to be only data rather than code/data.
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S
> To: Richard Williams , c...
> Sent: Wed, 2 Feb 2011 08:59:04 -0800 (PST)
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> > Hi,
> >
> > Yes, I have 16 MEG SDRAM available and I added SDRAM IN MEMORY SECTION
> > MANAGER using DSP/BIOS.
> >
> > Here attached snapshot to show all the settings I chosen for External
> > Memory. http://i53.tinypic.com/1z4vjo7.jpg
> >
> > I used this line to define data_stats buffer in EXT RAM
> > #pragma DATA_SECTION(data_stats,".EXT_RAM")
> >
> > When I build my project, I get following error.
> > warning: creating output section .EXT_RAM without SECTIONS specification
> >
> > Even after this my program runs, it saved values in data_stats buffer
> > but when I write those values to .text file, it doesn't write any
> > thing, text file is just blank. What is wrong here ?
> >
> > Richard, you said to modify memory map, via the config tool, to
> > include the available external RAM. I don't know how to di it. Is it
> > causing trouble ?
> >
> > Please help me.
> >
> > ________________________________
> > From: Richard Williams
> > To: B S ; c...
> > Sent: Fri, January 28, 2011 8:44:42 PM
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > B.S.
> >
> > If your looking at the 6713 architecture manual (available for
> > download at TI.com) part number SPRS186L,pdf then you see, on page 16
> > the memory map and on page 17 the various ways the 'IRAM' portion of
> > the memory map can be allocated as L2 cache+IRAM.
> >
> > Your program, per the linker error messages is larger than the
> > available IRAM.
> >
> > I say again : Your program is TOO BIG for the size of the IRAM.
> >
> > Does your development board have any external RAM implemented?
> >
> > If yes, then modify the configuration file, using the config tool, and
> > move the data table to the external RAM. You will also have to modify
> > the memory map, via the config tool, to include the available external
> > RAM.
> >
> > If no, then you will have to implement some external RAM (via
> > additional hardware) and move the data table to the external RAM via
> > the config tool.
> >
> > BTW:
> > Turning the ""Enable Memory Maping" off is a bad idea as this stops
> > the linker from checking that the program will fit within the
> > available RAM.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S
> > To: Richard Williams , c...
> > Sent: Fri, 28 Jan 2011 07:08:58 -0800 (PST)
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > > Hi Richard Williams,
> > >
> > > I have been looking at the DSP Architecture Manual.
> > >
> > > Here attached the cmd file.
> > >
> > > /* MODULE PARAMETERS */
> > > GBL_USERINITFXN = _FXN_F_nop;
> > >
> > > MEM_SEGZERO = IRAM;
> > > MEM_MALLOCSEG = IRAM;
> > >
> > > CLK_TIMEFXN = CLK_F_getshtime;
> > > CLK_HOOKFXN = HWI_F_dispatch;
> > >
> > > PRD_THOOKFXN = _KNL_tick;
> > >
> > > RTDX_DATAMEMSEG = IRAM;
> > >
> > > HST_DSMBUFSEG = IRAM;
> > >
> > > SWI_EHOOKFXN = GBL_NULL;
> > > SWI_IHOOKFXN = GBL_NULL;
> > > SWI_EXECFXN = SWI_F_iexec;
> > > SWI_RUNFXN = SWI_F_run;
> > >
> > > TSK_STACKSEG = IRAM;
> > > TSK_VCREATEFXN = _FXN_F_nop;
> > > TSK_VDELETEFXN = _FXN_F_nop;
> > > TSK_VEXITFXN = _FXN_F_nop;
> > >
> > > IDL_CALIBRFXN = IDL_F_stub;
> > >
> > > SYS_ABORTFXN = _UTL_doAbort;
> > > SYS_ERRORFXN = _UTL_doError;
> > > SYS_EXITFXN = _UTL_halt;
> > > SYS_PUTCFXN = _UTL_doPutc;
> > >
> > > GIO_CREATEFXN = _FXN_F_nop;
> > > GIO_DELETEFXN = _FXN_F_nop;
> > > GIO_PENDFXN = _FXN_F_nop;
> > > GIO_POSTFXN = _FXN_F_nop;
> > >
> > > /* OBJECT ALIASES */
> > > _IRAM = IRAM;
> > > _PRD_clock = PRD_clock;
> > > _RTA_fromHost = RTA_fromHost;
> > > _RTA_toHost = RTA_toHost;
> > > _HWI_RESET = HWI_RESET;
> > > _HWI_NMI = HWI_NMI;
> > > _HWI_RESERVED0 = HWI_RESERVED0;
> > > _HWI_RESERVED1 = HWI_RESERVED1;
> > > _HWI_INT4 = HWI_INT4;
> > > _HWI_INT5 = HWI_INT5;
> > > _HWI_INT6 = HWI_INT6;
> > > _HWI_INT7 = HWI_INT7;
> > > _HWI_INT8 = HWI_INT8;
> > > _HWI_INT9 = HWI_INT9;
> > > _HWI_INT10 = HWI_INT10;
> > > _HWI_INT11 = HWI_INT11;
> > > _HWI_INT12 = HWI_INT12;
> > > _HWI_INT13 = HWI_INT13;
> > > _HWI_INT14 = HWI_INT14;
> > > _HWI_INT15 = HWI_INT15;
> > > _KNL_swi = KNL_swi;
> > > _TSK_idle = TSK_idle;
> > > _LNK_dataPump = LNK_dataPump;
> > > _RTA_dispatcher = RTA_dispatcher;
> > > _IDL_cpuLoad = IDL_cpuLoad;
> > > _LOG_system = LOG_system;
> > > _IDL_busyObj = IDL_busyObj;
> > >
> > > /* MODULE GBL */
> > >
> > > SECTIONS {
> > > .vers (COPY): {} /* version information */
> > > }
> > >
> > > -priority
> > > -llnkrtdx.a62
> > > -ldrivers.a67 /* device drivers support */
> > > -lsioboth.a62 /* supports both SIO models */
> > > -lbiosi.a62 /* DSP/BIOS support */
> > > -lrtdx.lib /* RTDX support */
> > > -lcsl6713.lib
> > > -lrts6700.lib /* C and C++ run-time library support */
> > >
> > > _GBL_CACHE = GBL_CACHE;
> > >
> > > /* MODULE MEM */
> > > -stack 0x400
> > > MEMORY {
> > > IRAM : origin = 0x0, len = 0x40000
> > > }
> > > /* MODULE CLK */
> > > SECTIONS {
> > > .clk: {
> > > _CLK_start = _CLK_start6x;
> > > CLK_F_gethtime = CLK_F_getshtime;
> > > CLK_A_TABBEG = .;
> > > *(.clk)
> > > CLK_A_TABEND = .;
> > > CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> > > } > IRAM
> > > }
> > > _CLK_PRD = CLK_PRD;
> > > _CLK_COUNTSPMS = CLK_COUNTSPMS;
> > > _CLK_REGS = CLK_REGS;
> > > _CLK_USETIMER = CLK_USETIMER;
> > > _CLK_TIMERNUM = CLK_TIMERNUM;
> > > _CLK_TDDR = CLK_TDDR;
> > >
> > > /* MODULE PRD */
> > > SECTIONS {
> > > .prd: {
> > > PRD_A_TABBEG = .;
> > > /* no PRD objects */
> > > PRD_A_TABEND = .;
> > > PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> > > } > IRAM
> > > }
> > >
> > > /* MODULE RTDX */
> > > _RTDX_interrupt_mask = 0x0;
> > >
> > > /* MODULE HWI */
> > > SECTIONS {
> > > .hwi_vec: 0x0 {
> > > HWI_A_VECS = .;
> > > *(.hwi_vec)
> > > }
> > > }
> > >
> > > /* MODULE SWI */
> > > SECTIONS {
> > > .swi: {
> > > SWI_A_TABBEG = .;
> > > *(.swi)
> > > SWI_A_TABEND = .;
> > > SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> > > } > IRAM
> > > }
> > >
> > > /* MODULE IDL */
> > > SECTIONS {
> > > .idl: {
> > > IDL_A_TABBEG = .;
> > > *(.idl)
> > > IDL_A_TABEND = .;
> > > IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> > > IDL_A_CALBEG = .;
> > > *(.idlcal)
> > > IDL_A_CALEND = .;
> > > IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> > > } > IRAM
> > > }
> > >
> > > SECTIONS {
> > > .bss: {} > IRAM
> > >
> > > .far: {} > IRAM
> > >
> > > .sysdata: {} > IRAM
> > >
> > > .mem: {} > IRAM
> > >
> > > .sysinit: {} > IRAM
> > >
> > > .sysregs: {} > IRAM
> > >
> > > .gblinit: {} > IRAM
> > >
> > > .trcdata: {} > IRAM
> > >
> > > .args: fill=0 {
> > > *(.args)
> > > . += 0x4;
> > > } > IRAM
> > >
> > > .cinit: {} > IRAM
> > >
> > > .pinit: {} > IRAM
> > >
> > > .data: {} > IRAM
> > >
> > > .const: {} > IRAM
> > >
> > > .switch: {} > IRAM
> > >
> > > .cio: {} > IRAM
> > >
> > > .text: {} > IRAM
> > >
> > > frt: {} > IRAM
> > >
> > > .bios: {} > IRAM
> > >
> > > .stack: fill=0xc0ffee {
> > > GBL_stackbeg = .;
> > > *(.stack)
> > > GBL_stackend = GBL_stackbeg + 0x400 - 1;
> > > _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> > > _HWI_STKTOP = GBL_stackbeg;
> > > } > IRAM
> > >
> > > .trace: fill = 0x0 {
> > > _SYS_PUTCBEG = .;
> > > . += 0x200;
> > > _SYS_PUTCEND = . - 1;
> > > } > IRAM
> > >
> > > .rtdx_data: {} > IRAM
> > >
> > > .rtdx_text: {} > IRAM
> > >
> > > .hst: {
> > > HST_A_TABBEG = .;
> > > _HST_A_TABBEG = .;
> > > *(.hst)
> > > HST_A_TABEND = .;
> > > _HST_A_TABEND = .;
> > > HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > } > IRAM
> > >
> > > .dsm: {} > IRAM"Enable Memory Maping"
> > >
> > > /* RTA_fromHost buffer */
> > > .hst1: align = 0x4 {} > IRAM
> > >
> > > /* RTA_toHost buffer */
> > > .hst0: align = 0x4 {} > IRAM
> > >
> > > .hwi: {} > IRAM
> > >
> > > .tsk: {
> > > *(.tsk)
> > > } > IRAM
> > >
> > > .TSK_idle$stk: {
> > > *(.TSK_idle$stk)
> > > } > IRAM
> > >
> > > .log: {
> > > LOG_A_TABBEG = .;
> > > _LOG_A_TABBEG = .;
> > > *(.log)
> > > LOG_A_TABEND = .;
> > > _LOG_A_TABEND = .;
> > > LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > } > IRAM
> > >
> > > .printf (COPY): {} > IRAM
> > >
> > > /* LOG_system buffer */
> > > .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
> > >
> > > .pip: {
> > > PIP_A_TABBEG = .;
> > > _PIP_A_TABBEG = .;
> > > *(.pip)
> > > PIP_A_TABEND = .;
> > > _PIP_A_TABEND = .;
> > > PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > } > IRAM
> > >
> > > .sts: {
> > > STS_A_TABBEG = .;
> > > _STS_A_TABBEG = .;
> > > *(.sts)
> > > STS_A_TABEND = .;
> > > _STS_A_TABEND = .;
> > > STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > } > IRAM
> > >
> > > .sys: {} > IRAM
> > >
> > > .gio: {} > IRAM
> > >
> > > .IRAM$heap: {
> > > IRAM$B = .;
> > > _IRAM_base = .;
> > > IRAM$L = 0x8000;
> > > _IRAM_length = 0x8000;
> > > . += 0x8000;
> > > } > IRAM
> > >
> > > }
> > >
> > > I am also getting the message given below but when I remove the check
> > > from "Enable Memory Maping" tab it solves the problem but I don't know
> > > why it some time happens ?
> > >
> > > Loader: One or more sections of your program falls into a memory
> > > region that is not writable. These regions will not actually be
> > > written to the target. Check your linker configuration and/or memory map.
> > >
> > > Thanks.
> > >
> > > ________________________________
> > > From: Richard Williams
> > > To: B S ; c...
> > > Sent: Wed, January 26, 2011 9:01:26 PM
> > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > >
> > > B.S.
> > >
> > > Those error messages are from the linker. Not from running the code.
> > > It seems this is an excellent time for you to read the DSP
> > > architecture manual for the chip you are using and read the
> > > information on the .cmd file for the linker.
> > >
> > > They mean there is not enough room in the IRAM memory section.
> > >
> > > You will probably have to move the data points table to external RAM.
> > > BTW:
> > > How much external RAM do you have implemented on your project?
> > >
> > > BTW:
> > > if you have the problem again, then please paste the .cmd file listing
> > > in your post.
> > >
> > > R. Williams
> > >
> > > ---------- Original Message -----------
> > > From: B S
> > > To: c...
> > > Sent: Wed, 26 Jan 2011 08:22:32 -0800 (PST)
> > > Subject: [c6x] C6713- Momory Allocation Probolem
> > >
> > > > Hi,
> > > >
> > > > I have been trying to save over 50,000 data points in run time and
> > > > then transfer them to a text file. When I am running my code for 25,
> > > > 000 data points, it's running fine but giving so many errors as given
> > > > below when I increase the size of buffer to 51200. I really don't know
> > > > what does it mean.
> > > >
> > > > >> error: can't allocate .text, size 00004960 (page 0) in IRAM (avail:

> > > > >>000001d0)
> > > > >> error: can't allocate .bios, size 00003c60 (page 0) in IRAM (avail:

> > > > >>000001d0)
> > > > >> error: can't allocate .cinit, size 0000105c (page 0) in IRAM (avail:
>
> > > > >>000001d0)
> > > > >> error: can't allocate .rtdx_text, size 00000cc0 (page 0) in IRAM
> >(avail:
> >
> > >
> > > > >>000001d0)
> > > > >> error: can't allocate .bss, size 000004b8 (page 0) in IRAM (avail:
> > >
> > > > >>000001d0)
> > > > >> error: can't allocate .rtdx_data, size 0000044c (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .stack, size 00000400 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .TSK_idle$stk, size 00000400 (page 0) in IRAM

> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .sysinit, size 00000360 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .trace, size 00000200 (page 0) in IRAM
> > > > >>(avail: 000001d0)
> > > > >> error: can't allocate .LOG_system$buf, size 00000100 (page 0) in
> > > > >>IRAM (avail: 000000d0)
> > > > >> error: can't allocate .tsk, size 00000060 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .const, size 00000046 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .sts, size 00000030 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .swi, size 0000002c (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .hst, size 0000002c (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .gblinit, size 00000028 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .switch, size 00000028 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .idl, size 00000020 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .log, size 00000018 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .hst1, size 00000010 (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .sys, size 00000010 (page 0) in IRAM (avail:
> > >
> > > > >>00000008)
> > > > >> error: can't allocate .trcdata, size 0000000c (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .pinit, size 0000000c (page 0) in IRAM
> > > > >>(avail: 00000008)
> > > > >> error: can't allocate .mem, size 00000004 (page 0) in IRAM (avail:
> > >
> > > > >>00000000)
> > > > >> error: can't allocate .args, size 00000004 (page 0) in IRAM
> > > > >>(avail: 00000000)
> > > > >> error: errors in input - ./Debug/ADS7881_BAS.out not built
> > > >
> > > > >> Compilation failure
> > > >
> > > > Build Complete,
> > > > 28 Errors, 0 Warnings, 0 Remarks.
> > > >
> > > > Will some one please help me out with issue ? How can I save larger
> > > > data values ? How much is the limit for C6713 ?
> > > >
> > > > I will appreciate your help.
> > > >
> > > > -BAS
> > > ------- End of Original Message -------
> > ------- End of Original Message -------
> >
> >
> ------- End of Original Message -------
------- End of Original Message -------
R. Williams,

Thanks for your help. I have solved the 'warning' problem.

Due to the fact that CMD file can't be altered if DSP/BIOS is used, I added
another CMD file defining the SECTION for SDRAM as given below and it's working
fine.

SECTIONS
{
.EXTRAM :> SRAM_EXT
}

The program also exits fine after writing data to TEXT file when I replaced
exit(1) with abort().

BAS

________________________________
From: Richard Williams
To: B S ; c...
Sent: Fri, February 4, 2011 8:09:54 PM
Subject: Re: [c6x] C6713- Momory Allocation Probolem
B.S.

Sometimes I wonder if you really understand any thing I'm telling you about
programming.

You state that 'j' is a 'short'.
As I said before, 'short' has a positive and negative max values of approx 32k.
That is WAY SHORT OF the required 100k needed in your 'for' loop.

The above is the most likely reason the application fails as the number of
data_stats entries increases.

Regarding the .cmd file contents and the #pragma for the data_stats array...
I would be very surprised if the configuration tool does not have any way to
include user defined memory address ranges AND place specific segments into
those ranges.

You have already demonstrated that the configuration tool does have the ability
to define memory address ranges when you added the SDRAM memory address range.
You just need to reduce the SDRAM memory address range enough to have room for
the data_stats array. You might want to name it 'SDRAM2'.

Then add a statement that the 'EXT_RAM' segment is to be placed into the
'SDRAM2' memory address range.

If worse comes to worse, edit the .cmd file after the config tool has produced
the file and add the necessary statement into the 'SECTIONS{}' part of the file.

R. Williams

---------- Original Message -----------
From: B S
To: Richard Williams , c...
Sent: Fri, 4 Feb 2011 09:41:24 -0800 (PST)
Subject: Re: [c6x] C6713- Momory Allocation Probolem

> Hi All,
>
> Thanks for your replies.
>
> Mike and Richar,
>
> Sorry about '.SDRAM', I did check with 'SDRAM' and still getting the
> same warning.
>
> Richard,
>
> Variable 'j' is defined as short and its not a problem.
>
> The .cmd file does show SDRAM in the MEMORY section like this:
>
> /* MODULE MEM */
> -stack 0x400
> MEMORY {
> IRAM : origin = 0x0, len = 0x40000
> SDRAM : origin = 0x80000000, len = 0x1000000
> }
>
> It says nothing about SECTION{} but when I move .data or .bss or .cint
> to SDRAM, it shows some thing like this in the end of .cmd file:
>
> .data: {} > SDRAM
>
> I did read SPRU186u.pdf but I can't modify .cmd file directly to add
> section about SDRAM because its autogenerating by DSP/BIOS.
>
> You can see my cmd file here.
>
> /* INPUT ADS7881.cdb */
>
> /* MODULE PARAMETERS */
> GBL_USERINITFXN = _FXN_F_nop;
>
> MEM_SEGZERO = IRAM;
> MEM_MALLOCSEG = IRAM;
>
> CLK_TIMEFXN = CLK_F_getshtime;
> CLK_HOOKFXN = HWI_F_dispatch;
>
> PRD_THOOKFXN = _KNL_tick;
>
> RTDX_DATAMEMSEG = IRAM;
>
> HST_DSMBUFSEG = IRAM;
>
> SWI_EHOOKFXN = GBL_NULL;
> SWI_IHOOKFXN = GBL_NULL;
> SWI_EXECFXN = SWI_F_iexec;
> SWI_RUNFXN = SWI_F_run;
>
> TSK_STACKSEG = MEM_NULL;
> TSK_VCREATEFXN = _FXN_F_nop;
> TSK_VDELETEFXN = _FXN_F_nop;
> TSK_VEXITFXN = _FXN_F_nop;
>
> IDL_CALIBRFXN = IDL_F_stub;
>
> SYS_ABORTFXN = _UTL_doAbort;
> SYS_ERRORFXN = _UTL_doError;
> SYS_EXITFXN = _UTL_halt;
> SYS_PUTCFXN = _UTL_doPutc;
>
> GIO_CREATEFXN = _FXN_F_nop;
> GIO_DELETEFXN = _FXN_F_nop;
> GIO_PENDFXN = _FXN_F_nop;
> GIO_POSTFXN = _FXN_F_nop;
>
> /* OBJECT ALIASES */
> _IRAM = IRAM;
> _SDRAM = SDRAM;
> _PRD_clock = PRD_clock;
> _RTA_fromHost = RTA_fromHost;
> _RTA_toHost = RTA_toHost;
> _HWI_RESET = HWI_RESET;
> _HWI_NMI = HWI_NMI;
> _HWI_RESERVED0 = HWI_RESERVED0;
> _HWI_RESERVED1 = HWI_RESERVED1;
> _HWI_INT4 = HWI_INT4;
> _HWI_INT5 = HWI_INT5;
> _HWI_INT6 = HWI_INT6;
> _HWI_INT7 = HWI_INT7;
> _HWI_INT8 = HWI_INT8;
> _HWI_INT9 = HWI_INT9;
> _HWI_INT10 = HWI_INT10;
> _HWI_INT11 = HWI_INT11;
> _HWI_INT12 = HWI_INT12;
> _HWI_INT13 = HWI_INT13;
> _HWI_INT14 = HWI_INT14;
> _HWI_INT15 = HWI_INT15;
> _KNL_swi = KNL_swi;
> _TSK_idle = TSK_idle;
> _LNK_dataPump = LNK_dataPump;
> _RTA_dispatcher = RTA_dispatcher;
> _IDL_cpuLoad = IDL_cpuLoad;
> _LOG_system = LOG_system;
> _IDL_busyObj = IDL_busyObj;
>
> /* MODULE GBL */
>
> SECTIONS {
> .vers (COPY): {} /* version information */
> }
>
> -priority
> -llnkrtdx.a62
> -ldrivers.a67 /* device drivers support */
> -lsioboth.a62 /* supports both SIO models */
> -lbiosi.a62 /* DSP/BIOS support */
> -lrtdx.lib /* RTDX support */
> -lcsl6713.lib
> -lrts6700.lib /* C and C++ run-time library support */
>
> _GBL_CACHE = GBL_CACHE;
>
> /* MODULE MEM */
> -stack 0x400
> MEMORY {
> IRAM : origin = 0x0, len = 0x40000
> SDRAM : origin = 0x80000000, len = 0x1000000
> }
> /* MODULE CLK */
> SECTIONS {
> .clk: {
> _CLK_start = _CLK_start6x;
> CLK_F_gethtime = CLK_F_getshtime;
> CLK_A_TABBEG = .;
> *(.clk)
> CLK_A_TABEND = .;
> CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> } > IRAM
> }
> _CLK_PRD = CLK_PRD;
> _CLK_COUNTSPMS = CLK_COUNTSPMS;
> _CLK_REGS = CLK_REGS;
> _CLK_USETIMER = CLK_USETIMER;
> _CLK_TIMERNUM = CLK_TIMERNUM;
> _CLK_TDDR = CLK_TDDR;
>
> /* MODULE PRD */
> SECTIONS {
> .prd: {
> PRD_A_TABBEG = .;
> /* no PRD objects */
> PRD_A_TABEND = .;
> PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> } > IRAM
> }
>
> /* MODULE RTDX */
> _RTDX_interrupt_mask = 0x0;
>
> /* MODULE HWI */
> SECTIONS {
> .hwi_vec: 0x0 {
> HWI_A_VECS = .;
> *(.hwi_vec)
> }
> }
>
> /* MODULE SWI */
> SECTIONS {
> .swi: {
> SWI_A_TABBEG = .;
> *(.swi)
> SWI_A_TABEND = .;
> SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> } > IRAM
> }
>
> /* MODULE IDL */
> SECTIONS {
> .idl: {
> IDL_A_TABBEG = .;
> *(.idl)
> IDL_A_TABEND = .;
> IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> IDL_A_CALBEG = .;
> *(.idlcal)
> IDL_A_CALEND = .;
> IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> } > IRAM
> }
>
> SECTIONS {
> .bss: {} > IRAM
>
> .far: {} > IRAM
>
> .sysdata: {} > IRAM
>
> .mem: {} > IRAM
>
> .sysinit: {} > IRAM
>
> .sysregs: {} > IRAM
>
> .gblinit: {} > IRAM
>
> .trcdata: {} > IRAM
>
> .args: fill=0 {
> *(.args)
> . += 0x4;
> } > IRAM
>
> .cinit: {} > IRAM
>
> .pinit: {} > IRAM
>
> .data: {} > IRAM
>
> .const: {} > IRAM
>
> .switch: {} > IRAM
>
> .cio: {} > IRAM
>
> .text: {} > IRAM
>
> frt: {} > IRAM
>
> .bios: {} > IRAM
>
> .stack: fill=0xc0ffee {
> GBL_stackbeg = .;
> *(.stack)
> GBL_stackend = GBL_stackbeg + 0x400 - 1;
> _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> _HWI_STKTOP = GBL_stackbeg;
> } > IRAM
>
> .trace: fill = 0x0 {
> _SYS_PUTCBEG = .;
> . += 0x200;
> _SYS_PUTCEND = . - 1;
> } > IRAM
>
> .rtdx_data: {} > IRAM
>
> .rtdx_text: {} > IRAM
>
> .hst: {
> HST_A_TABBEG = .;
> _HST_A_TABBEG = .;
> *(.hst)
> HST_A_TABEND = .;
> _HST_A_TABEND = .;
> HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> } > IRAM
>
> .dsm: {} > IRAM
>
> /* RTA_fromHost buffer */
> .hst1: align = 0x4 {} > IRAM
>
> /* RTA_toHost buffer */
> .hst0: align = 0x4 {} > IRAM
>
> .hwi: {} > IRAM
>
> .tsk: {
> *(.tsk)
> } > IRAM
>
> .TSK_idle$stk: {
> *(.TSK_idle$stk)
> } > IRAM
>
> .log: {
> LOG_A_TABBEG = .;
> _LOG_A_TABBEG = .;
> *(.log)
> LOG_A_TABEND = .;
> _LOG_A_TABEND = .;
> LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> } > IRAM
>
> .printf (COPY): {} > IRAM
>
> /* LOG_system buffer */
> .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
>
> .pip: {
> PIP_A_TABBEG = .;
> _PIP_A_TABBEG = .;
> *(.pip)
> PIP_A_TABEND = .;
> _PIP_A_TABEND = .;
> PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> } > IRAM
>
> .sts: {
> STS_A_TABBEG = .;
> _STS_A_TABBEG = .;
> *(.sts)
> STS_A_TABEND = .;
> _STS_A_TABEND = .;
> STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> } > IRAM
>
> .sys: {} > IRAM
>
> .gio: {} > IRAM
>
> .IRAM$heap: {
> IRAM$B = .;
> _IRAM_base = .;
> IRAM$L = 0x8000;
> _IRAM_length = 0x8000;
> . += 0x8000;
> } > IRAM
>
> }
>
> I don't see any way to define section using DSP/BIOS memory
> management. I really don't know what to do now.
>
> ________________________________
> From: Richard Williams
> To: B S ; c...
> Sent: Fri, February 4, 2011 5:23:18 AM
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> B.S.
>
> I have a question, what is the definition of 'j' in the code snipit
> that you provided.
>
> Note: 'short int' has a max value of approx +/- 32k.
> Note: 'int' has max value of approx +/- 2gig.
>
> If the 'j' variable is defined as 'short int' then it will never reach
> the end of a loop that is trying to iterate 100000 times.
>
> Regarding the error message you are getting..
> The problem origination is an error in the MEMORY and SECTIONS
> definitions using the configuration tool.
>
> BTW:
> Why did you move the .data section to SDRAM?
> It was doing fine in IRAM.
>
> In fact everything was doing fine in IRAM until the data_stats array
> got too big.
>
> My suggestion (which you have partly implemented) is to ONLY move the
>data_stats
> array to the SDRAM address space.
>
> In otherwords,
>
> The .cmd file needs to have a line in the MEMORY{} that reads
> something like this: SDRAM RW origin=0x100000000, length=0x100000
>
> The .cmd file needs to have a line in the SECTIONS{} that reads
> something like this: EXT_RAM : LOAD = SDRAM TYPE=DSECT ALIGN2
>
> To help with your understanding of the .cmd file, you may want to read
> SPRU186u.pdf, "TMS320C6000 Assembly Language Tools" available for
> download from TI.com. beginning around page 184 "7.5 Linker Command Files"
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S
> To: Richard Williams , c...
> Sent: Thu, 3 Feb 2011 08:05:18 -0800 (PST)
> Subject: Re: [c6x] C6713- Momory Allocation Probolem
>
> > R. Williams,
> >
> > I tried with 'SDRAM' but it says the same thing (creating output
> > section .SDRAM without SECTIONS specification).
> >
> > I changed the configuration settings, I removed 'heap' from SDRAM and
> > used SDRAM for Data Section (.data) under COMPILER SECTIONS tab, You
> > can see all of them in the snapshot. Are these settings ok OR some
> > thing need to be switch between IRAM and SDRAM ?
> >
> > http://i53.tinypic.com/jhahee.jpg
> >
> > By doing so, I am not getting 'creating output section' warning but it
> > is now saving values in data_stats and then writing to TEXT file.
> >
> > This is how I am writing to text file.
> >
> > FILE *fp;
> > fp = fopen("Samples.txt", "w");
> >
> > for(j=0; j > > {
> > fprintf(fp, "%f\n", data_stats[j] );
> > }
> >
> > fclose(fp);
> > exit(1);
> >
> > When the size of data_stats is not more than some X size, program
> > exits fine after writing data to text file but as I increase the size
> > of data_stats to 100,000, it never exits after writing to text file.
> > When I halt the program I see the cursor at momory section:
> > RTDX_Final_RT_Monitor. Snapshot also shows Disassembly view.
> >
> > What should I change to configure the SDRAM properly ?
> >
> > Thanks.
> >
> > ________________________________
> > From: Richard Williams
> > To: B S ; c...
> > Sent: Wed, February 2, 2011 8:52:56 PM
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > B.S.
> >
> > I see a few 'ooops' in the configuration area.
> >
> > For instance....
> > the '.EXT_RAM' section does not exist.
> > however, 'SDRAM' does exist.
> > so your pragma should look like this:
> > $pragma DATA_SECTION(data_stats,"SDRAM")
> > unless you define a specific section in the configuration named
> > '.EXT_RAM' that is large enough to hold your complete data table. If
> > you do define a .EXT_RAM section, then the size of the SDRAM section
> > must be reduced by an equal amount and the starting address of each
> > section adjusted so the sections do not overlap.
> >
> > Then, as I looked at the configuration settings, I noticed:
> >
> > 1) the 'heap' is in SDRAM, that is not a really good idea unless the
> > application needs lots of room in the heap.
> >
> > 2) the 'stack' section is in SDRAM, that is a very bad idea
> > because the stack is referenced OFTEN and there is a major execution speed
> > penalty for having it in any place other than IRAM.
> >
> > 3) The BIOS sections need to be 'fast' so should be in IRAM
> >
> > 4) The startup code is only executed once, so placing it in SDRAM is
probably
> > ok, however; I would have left it in FLASH and executed it from FLASH.
> >
> > 5) You want interrupt servicing to be 'fast', so the interrupt service
> > table should be in IRAM.
> >
> > 6) The 'text' section is the actual executable code. so placing it in
> > SDRAM is a major execution speed penalty.
> >
> > 7) If your code is initially in FLASH, then the jump switch tables should
> > probably be left in FLASH. They are actually part of the executable
> > code, but their usage is minimal (for most programs).
> >
> > 8) The '.cinit' section is only referenced during the startup code
> > execution, so leaving it in FLASH is a very good idea. BTW this is
> > initialization values for the ram data. It will be 'gone' over a
> > power cycle.
> >
> > 9) The '.const' section never changes and is rarely referenced, so
> > leaving it in FLASH is a good idea.
> >
> > 10) The '.data' section is your program variables that will be initialized
> > during the startup code execution. Since such variables are usually
> referenced
> > often, it is a good idea to have them in IRAM. (however, that actual
> > initialization values can be left in FLASH as they are only referenced
> > once during the startup code.
> >
> > BTW:
> > the whole idea was to make your link work.
> > The only problem with your link was the data_stats being too large to
> > fit into the IRAM. If I were doing this, the only thing I would have
> > moved is the data_stats and left everything else in IRAM/FLASH. Note:
> > there is a execution speed penalty for items in FLASH and usually also
> > for items in SDRAM.
> >
> > BTW:
> > It looks like there is no definition of the FLASH area.
> > IMO that should be added, so certain sections can be left in the FLASH,
> > rather than (during the startup code) copied into xxRAM then copied
> > again into their final execution/data location.
> >
> > BTW:
> > I'm not sure if the DSP you are using has any differentiation between
> > 'far' and 'near' addresses, but if it does, then I would plan the
> > memory layout to use 'near' addresses when executing code that is run
> > often or needs to run fast.
> >
> > BTW:
> > if you move all the executable code out of SDRAM, then you can improve
> > the definition of SDRAM to be only data rather than code/data.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S
> > To: Richard Williams , c...
> > Sent: Wed, 2 Feb 2011 08:59:04 -0800 (PST)
> > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> >
> > > Hi,
> > >
> > > Yes, I have 16 MEG SDRAM available and I added SDRAM IN MEMORY SECTION
> > > MANAGER using DSP/BIOS.
> > >
> > > Here attached snapshot to show all the settings I chosen for External
> > > Memory. http://i53.tinypic.com/1z4vjo7.jpg
> > >
> > > I used this line to define data_stats buffer in EXT RAM
> > > #pragma DATA_SECTION(data_stats,".EXT_RAM")
> > >
> > > When I build my project, I get following error.
> > > warning: creating output section .EXT_RAM without SECTIONS specification
> > >
> > > Even after this my program runs, it saved values in data_stats buffer
> > > but when I write those values to .text file, it doesn't write any
> > > thing, text file is just blank. What is wrong here ?
> > >
> > > Richard, you said to modify memory map, via the config tool, to
> > > include the available external RAM. I don't know how to di it. Is it
> > > causing trouble ?
> > >
> > > Please help me.
> > >
> > > ________________________________
> > > From: Richard Williams
> > > To: B S ; c...
> > > Sent: Fri, January 28, 2011 8:44:42 PM
> > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > >
> > > B.S.
> > >
> > > If your looking at the 6713 architecture manual (available for
> > > download at TI.com) part number SPRS186L,pdf then you see, on page 16
> > > the memory map and on page 17 the various ways the 'IRAM' portion of
> > > the memory map can be allocated as L2 cache+IRAM.
> > >
> > > Your program, per the linker error messages is larger than the
> > > available IRAM.
> > >
> > > I say again : Your program is TOO BIG for the size of the IRAM.
> > >
> > > Does your development board have any external RAM implemented?
> > >
> > > If yes, then modify the configuration file, using the config tool, and
> > > move the data table to the external RAM. You will also have to modify
> > > the memory map, via the config tool, to include the available external
> > > RAM.
> > >
> > > If no, then you will have to implement some external RAM (via
> > > additional hardware) and move the data table to the external RAM via
> > > the config tool.
> > >
> > > BTW:
> > > Turning the ""Enable Memory Maping" off is a bad idea as this stops
> > > the linker from checking that the program will fit within the
> > > available RAM.
> > >
> > > R. Williams
> > >
> > > ---------- Original Message -----------
> > > From: B S
> > > To: Richard Williams , c...
> > > Sent: Fri, 28 Jan 2011 07:08:58 -0800 (PST)
> > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > >
> > > > Hi Richard Williams,
> > > >
> > > > I have been looking at the DSP Architecture Manual.
> > > >
> > > > Here attached the cmd file.
> > > >
> > > > /* MODULE PARAMETERS */
> > > > GBL_USERINITFXN = _FXN_F_nop;
> > > >
> > > > MEM_SEGZERO = IRAM;
> > > > MEM_MALLOCSEG = IRAM;
> > > >
> > > > CLK_TIMEFXN = CLK_F_getshtime;
> > > > CLK_HOOKFXN = HWI_F_dispatch;
> > > >
> > > > PRD_THOOKFXN = _KNL_tick;
> > > >
> > > > RTDX_DATAMEMSEG = IRAM;
> > > >
> > > > HST_DSMBUFSEG = IRAM;
> > > >
> > > > SWI_EHOOKFXN = GBL_NULL;
> > > > SWI_IHOOKFXN = GBL_NULL;
> > > > SWI_EXECFXN = SWI_F_iexec;
> > > > SWI_RUNFXN = SWI_F_run;
> > > >
> > > > TSK_STACKSEG = IRAM;
> > > > TSK_VCREATEFXN = _FXN_F_nop;
> > > > TSK_VDELETEFXN = _FXN_F_nop;
> > > > TSK_VEXITFXN = _FXN_F_nop;
> > > >
> > > > IDL_CALIBRFXN = IDL_F_stub;
> > > >
> > > > SYS_ABORTFXN = _UTL_doAbort;
> > > > SYS_ERRORFXN = _UTL_doError;
> > > > SYS_EXITFXN = _UTL_halt;
> > > > SYS_PUTCFXN = _UTL_doPutc;
> > > >
> > > > GIO_CREATEFXN = _FXN_F_nop;
> > > > GIO_DELETEFXN = _FXN_F_nop;
> > > > GIO_PENDFXN = _FXN_F_nop;
> > > > GIO_POSTFXN = _FXN_F_nop;
> > > >
> > > > /* OBJECT ALIASES */
> > > > _IRAM = IRAM;
> > > > _PRD_clock = PRD_clock;
> > > > _RTA_fromHost = RTA_fromHost;
> > > > _RTA_toHost = RTA_toHost;
> > > > _HWI_RESET = HWI_RESET;
> > > > _HWI_NMI = HWI_NMI;
> > > > _HWI_RESERVED0 = HWI_RESERVED0;
> > > > _HWI_RESERVED1 = HWI_RESERVED1;
> > > > _HWI_INT4 = HWI_INT4;
> > > > _HWI_INT5 = HWI_INT5;
> > > > _HWI_INT6 = HWI_INT6;
> > > > _HWI_INT7 = HWI_INT7;
> > > > _HWI_INT8 = HWI_INT8;
> > > > _HWI_INT9 = HWI_INT9;
> > > > _HWI_INT10 = HWI_INT10;
> > > > _HWI_INT11 = HWI_INT11;
> > > > _HWI_INT12 = HWI_INT12;
> > > > _HWI_INT13 = HWI_INT13;
> > > > _HWI_INT14 = HWI_INT14;
> > > > _HWI_INT15 = HWI_INT15;
> > > > _KNL_swi = KNL_swi;
> > > > _TSK_idle = TSK_idle;
> > > > _LNK_dataPump = LNK_dataPump;
> > > > _RTA_dispatcher = RTA_dispatcher;
> > > > _IDL_cpuLoad = IDL_cpuLoad;
> > > > _LOG_system = LOG_system;
> > > > _IDL_busyObj = IDL_busyObj;
> > > >
> > > > /* MODULE GBL */
> > > >
> > > > SECTIONS {
> > > > .vers (COPY): {} /* version information */
> > > > }
> > > >
> > > > -priority
> > > > -llnkrtdx.a62
> > > > -ldrivers.a67 /* device drivers support */
> > > > -lsioboth.a62 /* supports both SIO models */
> > > > -lbiosi.a62 /* DSP/BIOS support */
> > > > -lrtdx.lib /* RTDX support */
> > > > -lcsl6713.lib
> > > > -lrts6700.lib /* C and C++ run-time library support */
> > > >
> > > > _GBL_CACHE = GBL_CACHE;
> > > >
> > > > /* MODULE MEM */
> > > > -stack 0x400
> > > > MEMORY {
> > > > IRAM : origin = 0x0, len = 0x40000
> > > > }
> > > > /* MODULE CLK */
> > > > SECTIONS {
> > > > .clk: {
> > > > _CLK_start = _CLK_start6x;
> > > > CLK_F_gethtime = CLK_F_getshtime;
> > > > CLK_A_TABBEG = .;
> > > > *(.clk)
> > > > CLK_A_TABEND = .;
> > > > CLK_A_TABLEN = (. - CLK_A_TABBEG) / 1;
> > > > } > IRAM
> > > > }
> > > > _CLK_PRD = CLK_PRD;
> > > > _CLK_COUNTSPMS = CLK_COUNTSPMS;
> > > > _CLK_REGS = CLK_REGS;
> > > > _CLK_USETIMER = CLK_USETIMER;
> > > > _CLK_TIMERNUM = CLK_TIMERNUM;
> > > > _CLK_TDDR = CLK_TDDR;
> > > >
> > > > /* MODULE PRD */
> > > > SECTIONS {
> > > > .prd: {
> > > > PRD_A_TABBEG = .;
> > > > /* no PRD objects */
> > > > PRD_A_TABEND = .;
> > > > PRD_A_TABLEN = (. - PRD_A_TABBEG) / 32;
> > > > } > IRAM
> > > > }
> > > >
> > > > /* MODULE RTDX */
> > > > _RTDX_interrupt_mask = 0x0;
> > > >
> > > > /* MODULE HWI */
> > > > SECTIONS {
> > > > .hwi_vec: 0x0 {
> > > > HWI_A_VECS = .;
> > > > *(.hwi_vec)
> > > > }
> > > > }
> > > >
> > > > /* MODULE SWI */
> > > > SECTIONS {
> > > > .swi: {
> > > > SWI_A_TABBEG = .;
> > > > *(.swi)
> > > > SWI_A_TABEND = .;
> > > > SWI_A_TABLEN = (. - SWI_A_TABBEG) / 44;
> > > > } > IRAM
> > > > }
> > > >
> > > > /* MODULE IDL */
> > > > SECTIONS {
> > > > .idl: {
> > > > IDL_A_TABBEG = .;
> > > > *(.idl)
> > > > IDL_A_TABEND = .;
> > > > IDL_A_TABLEN = (. - IDL_A_TABBEG) / 8;
> > > > IDL_A_CALBEG = .;
> > > > *(.idlcal)
> > > > IDL_A_CALEND = .;
> > > > IDL_A_CALLEN = (. - IDL_A_CALBEG) / 8;
> > > > } > IRAM
> > > > }
> > > >
> > > > SECTIONS {
> > > > .bss: {} > IRAM
> > > >
> > > > .far: {} > IRAM
> > > >
> > > > .sysdata: {} > IRAM
> > > >
> > > > .mem: {} > IRAM
> > > >
> > > > .sysinit: {} > IRAM
> > > >
> > > > .sysregs: {} > IRAM
> > > >
> > > > .gblinit: {} > IRAM
> > > >
> > > > .trcdata: {} > IRAM
> > > >
> > > > .args: fill=0 {
> > > > *(.args)
> > > > . += 0x4;
> > > > } > IRAM
> > > >
> > > > .cinit: {} > IRAM
> > > >
> > > > .pinit: {} > IRAM
> > > >
> > > > .data: {} > IRAM
> > > >
> > > > .const: {} > IRAM
> > > >
> > > > .switch: {} > IRAM
> > > >
> > > > .cio: {} > IRAM
> > > >
> > > > .text: {} > IRAM
> > > >
> > > > frt: {} > IRAM
> > > >
> > > > .bios: {} > IRAM
> > > >
> > > > .stack: fill=0xc0ffee {
> > > > GBL_stackbeg = .;
> > > > *(.stack)
> > > > GBL_stackend = GBL_stackbeg + 0x400 - 1;
> > > > _HWI_STKBOTTOM = GBL_stackbeg + 0x400 - 4 & ~7;
> > > > _HWI_STKTOP = GBL_stackbeg;
> > > > } > IRAM
> > > >
> > > > .trace: fill = 0x0 {
> > > > _SYS_PUTCBEG = .;
> > > > . += 0x200;
> > > > _SYS_PUTCEND = . - 1;
> > > > } > IRAM
> > > >
> > > > .rtdx_data: {} > IRAM
> > > >
> > > > .rtdx_text: {} > IRAM
> > > >
> > > > .hst: {
> > > > HST_A_TABBEG = .;
> > > > _HST_A_TABBEG = .;
> > > > *(.hst)
> > > > HST_A_TABEND = .;
> > > > _HST_A_TABEND = .;
> > > > HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > > _HST_A_TABLEN = (. - _HST_A_TABBEG) / 20;
> > > > } > IRAM
> > > >
> > > > .dsm: {} > IRAM"Enable Memory Maping"
> > > >
> > > > /* RTA_fromHost buffer */
> > > > .hst1: align = 0x4 {} > IRAM
> > > >
> > > > /* RTA_toHost buffer */
> > > > .hst0: align = 0x4 {} > IRAM
> > > >
> > > > .hwi: {} > IRAM
> > > >
> > > > .tsk: {
> > > > *(.tsk)
> > > > } > IRAM
> > > >
> > > > .TSK_idle$stk: {
> > > > *(.TSK_idle$stk)
> > > > } > IRAM
> > > >
> > > > .log: {
> > > > LOG_A_TABBEG = .;
> > > > _LOG_A_TABBEG = .;
> > > > *(.log)
> > > > LOG_A_TABEND = .;
> > > > _LOG_A_TABEND = .;
> > > > LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > > _LOG_A_TABLEN = (. - _LOG_A_TABBEG) / 24;
> > > > } > IRAM
> > > >
> > > > .printf (COPY): {} > IRAM
> > > >
> > > > /* LOG_system buffer */
> > > > .LOG_system$buf: align = 0x100 fill = 0xffffffff {} > IRAM
> > > >
> > > > .pip: {
> > > > PIP_A_TABBEG = .;
> > > > _PIP_A_TABBEG = .;
> > > > *(.pip)
> > > > PIP_A_TABEND = .;
> > > > _PIP_A_TABEND = .;
> > > > PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > > _PIP_A_TABLEN = (. - _PIP_A_TABBEG) / 100;
> > > > } > IRAM
> > > >
> > > > .sts: {
> > > > STS_A_TABBEG = .;
> > > > _STS_A_TABBEG = .;
> > > > *(.sts)
> > > > STS_A_TABEND = .;
> > > > _STS_A_TABEND = .;
> > > > STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > > _STS_A_TABLEN = (. - _STS_A_TABBEG) / 16;
> > > > } > IRAM
> > > >
> > > > .sys: {} > IRAM
> > > >
> > > > .gio: {} > IRAM
> > > >
> > > > .IRAM$heap: {
> > > > IRAM$B = .;
> > > > _IRAM_base = .;
> > > > IRAM$L = 0x8000;
> > > > _IRAM_length = 0x8000;
> > > > . += 0x8000;
> > > > } > IRAM
> > > >
> > > > }
> > > >
> > > > I am also getting the message given below but when I remove the check
> > > > from "Enable Memory Maping" tab it solves the problem but I don't know
> > > > why it some time happens ?
> > > >
> > > > Loader: One or more sections of your program falls into a memory
> > > > region that is not writable. These regions will not actually be
> > > > written to the target. Check your linker configuration and/or memory
map.
> > > >
> > > > Thanks.
> > > >
> > > > ________________________________
> > > > From: Richard Williams
> > > > To: B S ; c...
> > > > Sent: Wed, January 26, 2011 9:01:26 PM
> > > > Subject: Re: [c6x] C6713- Momory Allocation Probolem
> > > >
> > > > B.S.
> > > >
> > > > Those error messages are from the linker. Not from running the code.
> > > > It seems this is an excellent time for you to read the DSP
> > > > architecture manual for the chip you are using and read the
> > > > information on the .cmd file for the linker.
> > > >
> > > > They mean there is not enough room in the IRAM memory section.
> > > >
> > > > You will probably have to move the data points table to external RAM.
> > > > BTW:
> > > > How much external RAM do you have implemented on your project?
> > > >
> > > > BTW:
> > > > if you have the problem again, then please paste the .cmd file listing
> > > > in your post.
> > > >
> > > > R. Williams
> > > >
> > > > ---------- Original Message -----------
> > > > From: B S
> > > > To: c...
> > > > Sent: Wed, 26 Jan 2011 08:22:32 -0800 (PST)
> > > > Subject: [c6x] C6713- Momory Allocation Probolem
> > > >
> > > > > Hi,
> > > > >
> > > > > I have been trying to save over 50,000 data points in run time and
> > > > > then transfer them to a text file. When I am running my code for 25,
> > > > > 000 data points, it's running fine but giving so many errors as given
> > > > > below when I increase the size of buffer to 51200. I really don't know

> > > > > what does it mean.
> > > > >
> > > > > >> error: can't allocate .text, size 00004960 (page 0) in IRAM
>(avail:
>
> > > > > >>000001d0)
> > > > > >> error: can't allocate .bios, size 00003c60 (page 0) in IRAM
>(avail:
>
> > > > > >>000001d0)
> > > > > >> error: can't allocate .cinit, size 0000105c (page 0) in IRAM
>(avail:
>
> >
> > > > > >>000001d0)
> > > > > >> error: can't allocate .rtdx_text, size 00000cc0 (page 0) in IRAM
> > >(avail:
> > >
> > > >
> > > > > >>000001d0)
> > > > > >> error: can't allocate .bss, size 000004b8 (page 0) in IRAM
(avail:
> > > >
> > > > > >>000001d0)
> > > > > >> error: can't allocate .rtdx_data, size 0000044c (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .stack, size 00000400 (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .TSK_idle$stk, size 00000400 (page 0) in
>IRAM
>
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .sysinit, size 00000360 (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .trace, size 00000200 (page 0) in IRAM
> > > > > >>(avail: 000001d0)
> > > > > >> error: can't allocate .LOG_system$buf, size 00000100 (page 0) in
> > > > > >>IRAM (avail: 000000d0)
> > > > > >> error: can't allocate .tsk, size 00000060 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .const, size 00000046 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .sts, size 00000030 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .swi, size 0000002c (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .hst, size 0000002c (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .gblinit, size 00000028 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .switch, size 00000028 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .idl, size 00000020 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .log, size 00000018 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .hst1, size 00000010 (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .sys, size 00000010 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000008)
> > > > > >> error: can't allocate .trcdata, size 0000000c (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .pinit, size 0000000c (page 0) in IRAM
> > > > > >>(avail: 00000008)
> > > > > >> error: can't allocate .mem, size 00000004 (page 0) in IRAM
(avail:
> > > >
> > > > > >>00000000)
> > > > > >> error: can't allocate .args, size 00000004 (page 0) in IRAM
> > > > > >>(avail: 00000000)
> > > > > >> error: errors in input - ./Debug/ADS7881_BAS.out not built
> > > > >
> > > > > >> Compilation failure
> > > > >
> > > > > Build Complete,
> > > > > 28 Errors, 0 Warnings, 0 Remarks.
> > > > >
> > > > > Will some one please help me out with issue ? How can I save larger
> > > > > data values ? How much is the limit for C6713 ?
> > > > >
> > > > > I will appreciate your help.
> > > > >
> > > > > -BAS
> > > > ------- End of Original Message -------
> > > ------- End of Original Message -------
> > >
> > >
> > ------- End of Original Message -------
> ------- End of Original Message -------
------- End of Original Message -------