[En-Nut-Discussion] Adding another 4K SRAM to ICC projects for FREE ; )

Brett Abbott Brett.Abbott at digital-telemetry.com
Sat Jan 24 02:29:50 CET 2004


Hi

I always need more SRAM.  Whilst trying to tune my use of this precious 
resource, I found myself adding numbers which always came up 4K short of 
32K.  When using external SRAM with ICC and when you have lots of 
variables assigned (ie. more than the 4K internal), ICC moves the bss 
and data area into external SRAM leaving only the HW and SW Stack in 
internal SRAM.  (This is a rough paraphrase of what actually happens, I 
know it isnt quite like this)

I have used the following statement to make use of the unallocated 
memory at the top of my main function.

    NutHeapAdd((void *) 0x100, 0xf00); // f00= 1k - 256 bytes for stacks

While it is only a small chunk of memory, fragmentation isnt too much of 
an issue and 3.5+K gives me a very nice overhead.

Is this something we could add to nutinit.c?  Have I missed something 
critical (ie. should I leave this space untouched for system use?) Does 
anyone know if we can parameterise this to be driven by compiler/linker 
flags rather than hard coded as I have.

I am uncertain if this "forgotten" memory occurs in gcc, or even if it 
only occurs on my version of ICC.

Hope this is of use.
Cheers
Brett

-- 
-----------------------------------------------------------------
Brett Abbott, Managing Director, Digital Telemetry Limited
Email: Brett.Abbott at digital-telemetry.com
PO Box 24 036 Manners Street, Wellington, New Zealand
Phone +64 (4) 5666-860  Mobile +64 (21) 656-144
------------------- Commercial in confidence --------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20040124/b9ef12c1/attachment.html>


More information about the En-Nut-Discussion mailing list