<?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>ID string in a flash</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/27696/id-string-in-a-flash</link><description> 
Hello, 

 
I need to put an ID string (file name and version) at a particular
address in a flash, so the programming application can read it from a
hex / binary file. 
I can probably use a scatter file, but is there any simpler solution
? 

 
Cortex</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: ID string in a flash</title><link>https://community.arm.com/thread/139664?ContentTypeID=1</link><pubDate>Tue, 17 Aug 2010 07:41:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:32761cb6-9e67-4f92-92ec-5d1cd4db2950</guid><dc:creator>Genp</dc:creator><description>&lt;p&gt;&lt;p&gt;
Mike, thank you so much !&lt;/p&gt;

&lt;p&gt;
It works, and I see how you&amp;#39;ve done it.&lt;br /&gt;
Beautiful.&lt;/p&gt;

&lt;p&gt;
Gennady&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ID string in a flash</title><link>https://community.arm.com/thread/136227?ContentTypeID=1</link><pubDate>Tue, 17 Aug 2010 07:06:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fc84e49b-4353-4e58-8b4d-41a8815dc120</guid><dc:creator>Mike Kleshov</dc:creator><description>&lt;p&gt;&lt;p&gt;
How about this?&lt;/p&gt;

&lt;pre&gt;
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************

LR_IROM1 0x08000000 0x00020000  {    ; load region size_region
  ER_IROM1 0x08000000 0x00020000  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$Sections)
   .ANY (+RO)
  }
  RW_IRAM1 0x20000000 0x0000C000  {  ; RW data
   .ANY (+RW +ZI)
  }
}

LR_IROM2 +0 {
  ER_IROM2 +0  {
   *.o(codeEnd, +Last)
  }
}
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ID string in a flash</title><link>https://community.arm.com/thread/139663?ContentTypeID=1</link><pubDate>Tue, 17 Aug 2010 06:44:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:392ea39d-75be-4683-9a56-de33902819bb</guid><dc:creator>Non Keil Related</dc:creator><description>&lt;p&gt;&lt;p&gt;
I think that what your wanting is similar to what I described
in:&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/forum/docs/thread16898.asp"&gt;http://www.keil.com/forum/docs/thread16898.asp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Unfortunately, I found/got no solution.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ID string in a flash</title><link>https://community.arm.com/thread/136233?ContentTypeID=1</link><pubDate>Tue, 17 Aug 2010 06:14:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:415ae0d5-4375-417d-97cb-ff472104329c</guid><dc:creator>Genp</dc:creator><description>&lt;p&gt;&lt;p&gt;
I am still trying to get rid of extra data appearing at the end of
an image after my string.&lt;br /&gt;
According to &lt;a href="http://www.keil.com/support/docs/3512.htm"&gt;http://www.keil.com/support/docs/3512.htm&lt;/a&gt;&lt;br /&gt;

these is compressed RW initialization data.&lt;br /&gt;
According to the difference between sizes of Load Region LR_IROM1 and
Execution Region ER_IROM1 in a memory map, amount of these data is
124 bytes. I actually have 125, but maybe I miscalculated
something.&lt;/p&gt;

&lt;p&gt;
Anyway, all attempts to eliminate these data were unsuccessful. I
tried adding --datacompressor=off in a linker options, some other
staff - no luck.&lt;/p&gt;

&lt;p&gt;
While doing extensive research on a forum, I saw quite a few
references to &amp;#39;putting metadata / special data at the very end of a
rom image&amp;#39;. So it seems like there is a lot of expertise on this
issue.&lt;/p&gt;

&lt;p&gt;
Please, could someone point me in a right direction.&lt;/p&gt;

&lt;p&gt;
Gennady&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ID string in a flash</title><link>https://community.arm.com/thread/133908?ContentTypeID=1</link><pubDate>Mon, 16 Aug 2010 12:10:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7990196f-6db3-4b76-9ede-bcd3be27c205</guid><dc:creator>Genp</dc:creator><description>&lt;p&gt;&lt;p&gt;
I tried to follow the procedure suggested by Pontus Thuvesson
in&lt;br /&gt;
&lt;a href="http://www.keil.com/forum/docs/thread16466.asp"&gt;http://www.keil.com/forum/docs/thread16466.asp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
That is what I did:&lt;br /&gt;
in a main:&lt;/p&gt;

&lt;p&gt;
#pragma arm section rodata = &amp;quot;codeEnd&amp;quot;&lt;br /&gt;
const uint8_t metadata[19] = {&amp;#39;J&amp;#39;,&amp;#39;0&amp;#39;,&amp;#39;0&amp;#39;,&amp;#39;_&amp;#39;,&amp;#39;1,&amp;#39;1&amp;#39;,1,
3,57,0x08,0x00,0x00,0x00,0x44,0x44,0x44,0x44,0x55};&lt;/p&gt;

&lt;p&gt;
===================&lt;br /&gt;
then I edited the scatter file to this:&lt;/p&gt;

&lt;pre&gt;
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************

LR_IROM1 0x08000000 0x00020000  {    ; load region size_region
  ER_IROM1 0x08000000 0x00020000  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
   *.o(codeEnd, +Last)
  }
  RW_IRAM1 0x20000000 0x0000C000  {  ; RW data
   .ANY (+RW +ZI)
  }
}
&lt;/pre&gt;

&lt;p&gt;
and unchecked &amp;#39;used memory layout from a target dialog&amp;#39;.&lt;/p&gt;

&lt;p&gt;
Nevertheless the metadata[] array does not appear at the end of a
program. Is there anything i did wrong ? or haven&amp;#39;t done ?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ID string in a flash</title><link>https://community.arm.com/thread/115958?ContentTypeID=1</link><pubDate>Mon, 16 Aug 2010 06:32:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1e6241de-9243-40f9-a697-ad9b7bc0eeed</guid><dc:creator>Genp</dc:creator><description>&lt;p&gt;&lt;p&gt;
Actually that is exactly what I need (except that post-processing
app will write a program size along with checksum there).&lt;br /&gt;
So the question is still the same - how do I make a build to place
this metadata array at the end of a program ?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ID string in a flash</title><link>https://community.arm.com/thread/104168?ContentTypeID=1</link><pubDate>Mon, 16 Aug 2010 06:17:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8cb8030d-d0e2-42ed-b271-731d373071fe</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
I normally place some meta data (such as crc, version info etc) in
last bytes of flash. But if I place the information in the last 16
bytes, that is still at a fixed position. I might decide to have the
normal build place 12 byte of info at the end, but leave the last
four byte. Then run a post-process program that computes CRC32 and
fills the last four bytes with the CRC of the image.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ID string in a flash</title><link>https://community.arm.com/thread/78554?ContentTypeID=1</link><pubDate>Mon, 16 Aug 2010 05:44:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:17cbc856-8faf-4db2-9b9f-265f4d4053d6</guid><dc:creator>Genp</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you Willi,&lt;/p&gt;

&lt;p&gt;
well, now I have another question.&lt;br /&gt;
Is there any way to put this string at the end of a program flash
used ?&lt;br /&gt;
I have some considerations where it will be more beneficial to have
it at the end instead of a fixed address.&lt;/p&gt;

&lt;p&gt;
Gennady&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ID string in a flash</title><link>https://community.arm.com/thread/58544?ContentTypeID=1</link><pubDate>Sun, 15 Aug 2010 21:14:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5d6838cf-0d04-487d-9202-49138ad573d2</guid><dc:creator>Mario Kornfeldner</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi Gennady&lt;/p&gt;

&lt;p&gt;
const char string[] __attribute__((at(0x0xxxxxxx)) = &amp;quot;Version
1.xxxxdfdf&amp;quot;;&lt;/p&gt;

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