<?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>Placing a checksum at the end of the used flash</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/31260/placing-a-checksum-at-the-end-of-the-used-flash</link><description> 
Hello 
I am wanting to place a checksum at the end of the flash image. I
have a crc.c that only has this array - where I will manually replace
xx and yy with the 16bit CRC, once I have made a .bin image. (...wish
there was a way for the compiler to</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Placing a checksum at the end of the used flash</title><link>https://community.arm.com/thread/131367?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2014 07:22:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:02485d60-59d0-4b2e-a9b3-e9db46f121dd</guid><dc:creator>Peter Stein</dc:creator><description>&lt;p&gt;&lt;p&gt;
That&amp;#39;s what I was looking for - thanks Pier - and yes that
0x000B00000 was a bit of a typo. Much appreciated.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Placing a checksum at the end of the used flash</title><link>https://community.arm.com/thread/128452?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2014 07:01:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ca384f5a-93d8-42e5-a857-e214ff097ed8</guid><dc:creator>Westonsupermare Pier</dc:creator><description>&lt;p&gt;&lt;p&gt;
crc.c&lt;/p&gt;

&lt;pre&gt;
const unsigned char  __attribute__((aligned (16)))ucCRC[16] =
{
&amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,
&amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39;C&amp;#39;,    &amp;#39;R&amp;#39;,    &amp;#39;C&amp;#39;,    &amp;#39;xx&amp;#39;,    &amp;#39;yy&amp;#39;
};
&lt;/pre&gt;

&lt;p&gt;
main.c&lt;/p&gt;

&lt;pre&gt;
extern const unsigned char ucCRC[16];
&lt;/pre&gt;

&lt;p&gt;
project.sct&lt;/p&gt;

&lt;pre&gt;
LR_IROM1 0x08040000 0x000B0000  {    ; load region size_region
  ER_IROM1 0x08040000 0x000B0000  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot&amp;#36;&amp;#36;Sections)
   .ANY (+RO)
  }
  RW_IRAM1 0x20000000 0x00020000  {  ; RW data
   .ANY (+RW +ZI)
  }
}
LR_IROM1_END +0 0x10
{
  ER_IROM1_END +0 0x10
  {
    crc.o (*, +Last)
  }
}
&lt;/pre&gt;

&lt;p&gt;
out.bin&lt;/p&gt;

&lt;pre&gt;
00000000 : 20 04 00 20 9D 01 04 08 - A3 04 04 08 9F 04 04 08    .. ............
00000010 : A1 04 04 08 CF 03 04 08 - E1 06 04 08 00 00 00 00   ................
00000020 : 00 00 00 00 00 00 00 00 - 00 00 00 00 D9 05 04 08   ................
00000030 : D1 03 04 08 00 00 00 00 - 29 05 04 08 8D 06 04 08   ........).......
00000040 : B7 01 04 08 B7 01 04 08 - B7 01 04 08 B7 01 04 08   ................
00000050 : B7 01 04 08 B7 01 04 08 - B7 01 04 08 B7 01 04 08   ................
..
00000710 : 38 BD 00 00 FF F7 5E FE - 00 20 FF F7 1F FF 00 20   8.....^.. .....
00000720 : FF F7 40 FF FF F7 BE FE - FF F7 5C FD 01 48 00 F0   ..@.......\..H..
00000730 : 03 F8 FE E7 C0 07 04 08 - 10 B5 04 46 01 E0 FF F7   ...........F....
00000740 : DF FF 14 F8 01 0B 04 49 - 00 28 F8 D1 BD E8 10 40   .......I.(.....@
00000750 : 0A 20 FF F7 D5 BF 00 00 - 1C 00 00 20 00 00 06 00   . ......... ....
00000760 : 01 00 01 00 01 00 00 00 - 00 10 00 20 00 40 00 80   ........... .@..
00000770 : 08 00 00 00 08 00 00 00 - 08 00 00 00 08 00 00 00   ................
00000780 : A0 07 04 08 00 00 00 20 - 20 00 00 00 E2 06 04 08   .......  .......
00000790 : C0 07 04 08 20 00 00 20 - 00 04 00 00 F2 06 04 08   .... .. ........
000007A0 : 00 00 00 00 00 00 00 00 - 00 00 02 40 00 0C 02 40   ...........@...@
000007B0 : 00 0C 02 40 00 0C 02 40 - 00 0C 02 40 00 00 00 00   ...@...@...@....
000007C0 : 20 20 20 20 20 20 20 20 - 20 20 20 43 52 43 78 79              CRCxy
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Placing a checksum at the end of the used flash</title><link>https://community.arm.com/thread/120229?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2014 06:24:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:46340270-ba36-4a58-b895-21074b82f16a</guid><dc:creator>Westonsupermare Pier</dc:creator><description>&lt;p&gt;&lt;p&gt;
Um, let&amp;#39;s think about that, if I could edit my posts I could
correct inaccuracies instead of posting a second one correcting the
first.&lt;/p&gt;

&lt;p&gt;
For example your STM32F417 does not have 11MB (0xB00000) of
FLASH.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Placing a checksum at the end of the used flash</title><link>https://community.arm.com/thread/107480?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2014 06:10:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:68f9d7ab-572b-4c80-a3e9-a66b44d5bbb9</guid><dc:creator>Peter Stein</dc:creator><description>&lt;p&gt;&lt;p&gt;
Perhaps I am not making myself clear. The flash is located at that
address in a STM32F417 memory map. I could readily declare -&lt;/p&gt;

&lt;pre&gt;
const unsigned char  __attribute__((at(0x08B3FFF0)))ucCRC[16] =
{
&amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,
&amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39;C&amp;#39;,    &amp;#39;R&amp;#39;,    &amp;#39;C&amp;#39;,    &amp;#39; &amp;#39;,    &amp;#39; &amp;#39;
};
&lt;/pre&gt;

&lt;p&gt;
and the linker would place it there... That is not what I want - I
want to place ucCRC[] at the end of the application code + RO data,
about 200K bytes worth.&lt;/p&gt;

&lt;p&gt;
Please elaborate on your &amp;quot;This forum really needs registration,
and editing...&amp;quot; - I do not understand such a comment - I thought that
this was a forum to assist users of Keil products?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Placing a checksum at the end of the used flash</title><link>https://community.arm.com/thread/92415?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2014 05:40:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:07c9399d-e06e-42fd-b4ea-271d73c528f9</guid><dc:creator>Westonsupermare Pier</dc:creator><description>&lt;p&gt;&lt;p&gt;
This forum really needs registration, and editing...&lt;/p&gt;

&lt;p&gt;
const unsigned char *ucCRC = (unsigned char *)0x08B3FFF0; //
16-byte prior to end-of-flash&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Placing a checksum at the end of the used flash</title><link>https://community.arm.com/thread/62527?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2014 05:38:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:423e61df-2dc1-49e2-9cd9-81a2a62b5bd6</guid><dc:creator>Westonsupermare Pier</dc:creator><description>&lt;p&gt;&lt;p&gt;
You&amp;#39;ve got an 11MB Flash?&lt;/p&gt;

&lt;p&gt;
Thoughts, shrink IROM1, and create a 16 byte IROM2 sector AFTER
IROM1, not inside it.&lt;/p&gt;

&lt;p&gt;
const unsigned char *ucCRC = (unsigned char *)0x08B40000;&lt;/p&gt;

&lt;p&gt;
Keil tools expect you to create post-link user functionality to
sign/package the linker output in a form that uniquely suits your
needs/requirements.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>