<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Using external memory for the heap</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/23307/using-external-memory-for-the-heap</link><description> 
I&amp;#39;m trying to configure a STR9 system to use an external memory
device connected as Ext, MEM CS0 but I can&amp;#39;t seam to get the malloc
function to return a pointer to off chip memory. I have changed the
standard STR91x.s to define Heap_Mem as 0x3C000000</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Using external memory for the heap</title><link>https://community.arm.com/thread/76234?ContentTypeID=1</link><pubDate>Tue, 29 Apr 2008 06:50:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:52ab4ef0-59b3-407c-9676-1b44042ae1b6</guid><dc:creator>Richard G</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks for that again __user_initial_stackheap is setting the
correct values but the malloc is returning an invalid pointer.&lt;/p&gt;

&lt;p&gt;
I think I may have found the problem the __user_initial_stackheap
function is being called before main is entered and the external
memory is initialised in main. could it be that the library that
calls the function initialises something in the heap area before
main? which would fail as the interface isn&amp;#39;t initialised.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using external memory for the heap</title><link>https://community.arm.com/thread/49803?ContentTypeID=1</link><pubDate>Tue, 29 Apr 2008 05:12:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:de950783-d0b5-4759-bd6f-5d3a8060718b</guid><dc:creator>Robert &amp;#160;</dc:creator><description>&lt;p&gt;&lt;p&gt;
A very simple solution is the following adaptation of the STR91x.s
startup file:&lt;/p&gt;

&lt;p&gt;
Replace&lt;/p&gt;

&lt;pre&gt;
        AREA    HEAP, NOINIT, READWRITE, ALIGN=3
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
with&lt;/p&gt;

&lt;pre&gt;
        AREA    |.ARM.__AT_0x3C000000|, NOINIT, READWRITE, ALIGN=3
&lt;/pre&gt;

&lt;p&gt;
Now Heap will be located at address 0x3C000000. No other changes
are required except adjusting the Heap_Size.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>