<?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>how can I place a constant in flash rom</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/24367/how-can-i-place-a-constant-in-flash-rom</link><description> 
Hi,all friends: 

 
I declared a constant arry : 

 
unsigned char index_htm[1108] = {
 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0d, 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e,
 0x0d, 0x0a, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x68, 0x74, 0x74</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: how can I place a constant in flash rom</title><link>https://community.arm.com/thread/142372?ContentTypeID=1</link><pubDate>Tue, 28 Jul 2009 07:03:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4330388c-af97-417b-bcf6-ae24fe2ca17e</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
or just search the &lt;b&gt;map file&lt;/b&gt; for &amp;quot;index_htm&amp;quot;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I place a constant in flash rom</title><link>https://community.arm.com/thread/139252?ContentTypeID=1</link><pubDate>Tue, 28 Jul 2009 07:01:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:adcdf95f-1655-45e9-9759-068fbe8feb2a</guid><dc:creator>Thorsten de Buhr</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi,&lt;/p&gt;

&lt;p&gt;
sorry for the delay, I hope you are still reading (mail reminder
:-)&lt;/p&gt;

&lt;pre&gt;
const char index_htm[]={0x02,0xda,...}
&lt;/pre&gt;

&lt;p&gt;
this should be easy. Type index_htm into the memory window when
debugging, and it will show you the location.&lt;/p&gt;

&lt;p&gt;
Or, because index_htm is already the address :-), so you should be
able to do a printf on this.&lt;br /&gt;
The address of a specific value you will get via&lt;/p&gt;

&lt;pre&gt;
printf(&amp;quot;\nAddress: 0x%08x&amp;quot;, &amp;amp;index_htm[number]);
&lt;/pre&gt;

&lt;p&gt;
BR,&lt;br /&gt;
/th.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I place a constant in flash rom</title><link>https://community.arm.com/thread/135854?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2009 00:52:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c423485c-8737-4e6d-b73a-0cd6a658eb51</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Print the address and compare with the address region for the
flash.&lt;/p&gt;

&lt;p&gt;
Or make sure that you have enabled map files, and then check the
address of the symbol in the map file.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I place a constant in flash rom</title><link>https://community.arm.com/thread/125600?ContentTypeID=1</link><pubDate>Sun, 26 Jul 2009 17:51:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d4db1fac-3c84-43a6-891c-fb75ee1c172a</guid><dc:creator>Derek Deng</dc:creator><description>&lt;p&gt;&lt;p&gt;
I just want to find the variable is in flash or in ram.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I place a constant in flash rom</title><link>https://community.arm.com/thread/115095?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2009 01:47:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7d30659a-1d87-4903-96ab-87da5b20aa3c</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Is there a reason why you need to know the location of this
variable?&lt;/p&gt;

&lt;p&gt;
When running the application, the name of the array equals the
address, so your program don&amp;#39;t have a problem knowing where it is
located.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I place a constant in flash rom</title><link>https://community.arm.com/thread/84666?ContentTypeID=1</link><pubDate>Thu, 23 Jul 2009 17:59:00 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:32f63e2a-3de9-4807-8da9-55451eabd049</guid><dc:creator>Derek Deng</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank Thorsten de Buhr very much.&lt;br /&gt;
I thunk nobody answer me .&lt;br /&gt;
You are intense,thank you.&lt;/p&gt;

&lt;p&gt;
I have another confused problem,help me,pls.&lt;/p&gt;

&lt;p&gt;
I compiled the project in Keil uVision3,and I want to know the
place (the array after compiled be in address in flash) .&lt;/p&gt;

&lt;p&gt;
i.e. how can I find the place(address) after&lt;/p&gt;

&lt;pre&gt;
 const char index_htm[]={0x02,0xda,...}
&lt;/pre&gt;

&lt;p&gt;
be compiled? I found the project.map file,but I cant find the
address of the compiled array in flash.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I place a constant in flash rom</title><link>https://community.arm.com/thread/77596?ContentTypeID=1</link><pubDate>Tue, 21 Jul 2009 01:57:32 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:999487bf-288a-4753-8495-c51bcdf26d42</guid><dc:creator>Thorsten de Buhr</dc:creator><description>&lt;p&gt;&lt;p&gt;
tip:&lt;/p&gt;

&lt;p&gt;
if you initialize your array complete, you do not have to set the
size, you can just use&lt;br /&gt;
array[] = { values };&lt;/p&gt;

&lt;p&gt;
If you do not want to count all the elements and you know that
i.e. 0x00 is no possible value in the array you could use that as end
value&lt;/p&gt;

&lt;p&gt;
while(val != 0x00) { ... }&lt;/p&gt;

&lt;p&gt;
or, in this case: while(array) { ... }&lt;/p&gt;

&lt;p&gt;
BR,&lt;br /&gt;
/th.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I place a constant in flash rom</title><link>https://community.arm.com/thread/56457?ContentTypeID=1</link><pubDate>Tue, 21 Jul 2009 01:43:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:081a0f87-5990-4114-a217-591e0b1ea60e</guid><dc:creator>Thorsten de Buhr</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi,&lt;/p&gt;

&lt;p&gt;
hmmm ...&lt;br /&gt;
try&lt;/p&gt;

&lt;p&gt;
const unsigned char index_htm[1108] = {&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>