<?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>Problems with storing data in ROM &amp;amp; lockups</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/38997/problems-with-storing-data-in-rom-lockups</link><description> 
Hello, I have data structures of the following type 

 

const void * testpanel_pointers[][4] =
{
 { &amp;quot;Status&amp;quot;, NULL, NULL, NULL },
 { &amp;quot;Configuration&amp;quot;, NULL, NULL, NULL },
 { &amp;quot;Self Test&amp;quot;, NULL, NULL, NULL },
 { &amp;quot;Day&amp;quot;, NULL, NULL, NULL},
 { &amp;quot;Begin Countdown</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Problems with storing data in ROM &amp; lockups</title><link>https://community.arm.com/thread/116062?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2010 03:25:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b5ba7562-58a1-4392-a213-e9ba97f388c7</guid><dc:creator>Dan Selic</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;Is this the only place in your code that is referencing the
DayOfWeek and the function? If so, then the compiler/linker might
have previously removed the code and data associated with them when
you changed these references to NULL.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
It is. Yeah, that sounds reasonable.&lt;/p&gt;

&lt;p&gt;
A co-worker just helped me with the hanging issue. Since
Cross-Module Optimization is turned on, I have to click Rebuild
twice. After that, no more hangs. At least that&amp;#39;s out of the way,
although they could&amp;#39;ve highlighted this someplace other than an
obscure part of the manual.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with storing data in ROM &amp; lockups</title><link>https://community.arm.com/thread/104301?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2010 02:57:33 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b34c66bc-fec7-459f-b6fb-27a941acf837</guid><dc:creator>Non Keil Related</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;How does replacing 3 NULL values with real values cause my RAM
usage to jump by 128 bytes?&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Is this the only place in your code that is referencing the
DayOfWeek and the function? If so, then the compiler/linker might
have previously removed the code and data associated with them when
you changed these references to NULL.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with storing data in ROM &amp; lockups</title><link>https://community.arm.com/thread/78714?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2010 02:50:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9cd0f468-c253-47a5-9fbc-41fe15752abf</guid><dc:creator>Dan Selic</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you both for your replies.&lt;/p&gt;

&lt;p&gt;
That second const does help significantly and going with a
structure containing four const void pointers pretties it up nicely.
However, a new problem has arisen:&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Version 1&lt;/b&gt;&lt;/p&gt;

&lt;pre&gt;
const PParams testpanel_pointers[] =
{
        { &amp;quot;Status&amp;quot;, NULL, NULL, NULL },
        { &amp;quot;Configuration&amp;quot;, NULL, NULL, NULL },
        { &amp;quot;Self Destruct&amp;quot;, NULL, NULL, NULL },
--&amp;gt;     { &amp;quot;Day&amp;quot;, DaysOfWeek[list_index_test], (void*)ListEdit::getString, &amp;quot;&amp;quot; }, &amp;lt;--
        { &amp;quot;Begin Countdown&amp;quot;, NULL, NULL, NULL },
        { &amp;quot;Change me&amp;quot;, (void*)&amp;amp;edit_test, (void*)IntEdit::getString, &amp;quot;C&amp;quot; },
        { &amp;quot;Refresh Menu&amp;quot;, NULL, NULL, NULL },
        { &amp;quot;Submenu-&amp;gt;&amp;quot;, NULL, NULL, NULL },
};
&lt;/pre&gt;

&lt;p&gt;
Program Size: Code=49028 RO-data=5732 &lt;b&gt;RW-data=1076&lt;/b&gt;
ZI-data=30804&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Version 2&lt;/b&gt;&lt;/p&gt;

&lt;pre&gt;
const PParams testpanel_pointers[] =
{
        { &amp;quot;Status&amp;quot;, NULL, NULL, NULL },
        { &amp;quot;Configuration&amp;quot;, NULL, NULL, NULL },
        { &amp;quot;Self Destruct&amp;quot;, NULL, NULL, NULL },
--&amp;gt;     { &amp;quot;Day&amp;quot;, NULL, NULL, NULL },               &amp;lt;--
        { &amp;quot;Begin Countdown&amp;quot;, NULL, NULL, NULL },
        { &amp;quot;Change me&amp;quot;, (void*)&amp;amp;edit_test, (void*)IntEdit::getString, &amp;quot;C&amp;quot; },
        { &amp;quot;Refresh Menu&amp;quot;, NULL, NULL, NULL },
        { &amp;quot;Submenu-&amp;gt;&amp;quot;, NULL, NULL, NULL },
};
&lt;/pre&gt;

&lt;p&gt;
Program Size: Code=48960 RO-data=5780 &lt;b&gt;RW-data=948&lt;/b&gt;
ZI-data=30804&lt;/p&gt;

&lt;p&gt;
This is totally weird. How does replacing 3 NULL values with real
values cause my RAM usage to jump by 128 bytes? Why isn&amp;#39;t it treating
this as RO-data? Not to mention the fact that the system hangs with
version 1 but not version 2.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with storing data in ROM &amp; lockups</title><link>https://community.arm.com/thread/90664?ContentTypeID=1</link><pubDate>Fri, 08 Oct 2010 14:03:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b732ef42-1e0c-48ae-b65f-766357b10c29</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes, using an array of structures would definitely be better than
having each entry be an array of four void pointers.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with storing data in ROM &amp; lockups</title><link>https://community.arm.com/thread/58745?ContentTypeID=1</link><pubDate>Fri, 08 Oct 2010 09:45:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c169cd31-3239-4646-bb00-849dd1a21400</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;const void * const testpanel_pointers[][4] =&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>