<?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>LPC2387 IAP with USB Memory</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/30051/lpc2387-iap-with-usb-memory</link><description> 
I am having trouble recently. I dont understand why but suddenly
some local variables are being created in the USB memory space
(0x7FD00000-0x7FD03FFF). Normally it would be fine but some of the
variables are then used to the flash via IAP. I first</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: LPC2387 IAP with USB Memory</title><link>https://community.arm.com/thread/80984?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2013 18:03:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9f907772-6aac-42e6-90f8-a68b6d89bd0e</guid><dc:creator>Justin Ancheta</dc:creator><description>&lt;p&gt;&lt;p&gt;
Ah it was the project settings. And I guess I misspoke about local
variables. I meant just regular, old variables.&lt;/p&gt;

&lt;p&gt;
I dont think we have been having a problem with the IAP. How can I
make sure?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC2387 IAP with USB Memory</title><link>https://community.arm.com/thread/68091?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2013 00:50:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c6bec688-1328-4103-8ff5-e860f6f52a50</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
The compiler don&amp;#39;t care much about memory ranges. It&amp;#39;s the linker
that maps variables to memory addresses. And it is your project
settings that tells the linker what memory regions it may make use
of. Don&amp;#39;t show the USB memory to the linker, and the linker will not
place anything there. Potentially failing the build because the
amount of variables is too large in relation to the amount of memory
you specify in your project settings.&lt;/p&gt;

&lt;p&gt;
But right now, you are talking about local variables, i.e. auto
variables. They are stored on the stack. How have you specified your
stack in the startup file? Remember that the linker will use your
project settings for finding room for the stack just as it does for
your global variables. And neither compiler nor linker will care the
slightest if your stack is big enough, or if you manage to get a
stack overflow at runtime.&lt;/p&gt;

&lt;p&gt;
Next thing - doesn&amp;#39;t IAP require the top 32 byte of RAM to be
reserved? Have you done that, making sure the linker gets a linking
errors instead of using this region for variables/stack?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>