<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Adding attribute results in huge bin file  in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753391#M45925</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roy,&lt;/P&gt;&lt;P&gt;About your code , relocate the flash to flash or RAM?&lt;/P&gt;&lt;P&gt;I refer to the below&amp;nbsp; DOC try to reproduce your problem while no matter relocate the data into RAM or flash,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;the size sill the same .&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-104433"&gt;https://community.nxp.com/docs/DOC-104433&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please create a simple project, which can reproduce your problem , send it to me , thus&lt;/P&gt;&lt;P&gt;I can test it on my side .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jan 2018 09:49:06 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2018-01-02T09:49:06Z</dc:date>
    <item>
      <title>Adding attribute results in huge bin file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753388#M45922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've found this&amp;nbsp;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/458677"&gt;link&lt;/A&gt;&amp;nbsp;which describes exactly what I'm experiencing in my K64. I've added a custom attribute section to Linker file for returning go and back from/to Kboot bootloader (by using a dedicated flag in specific location in flash).&lt;/P&gt;&lt;P&gt;Now the bin file has increased to 500MB (and using the blhost.exe, obviously takes forever...)&lt;/P&gt;&lt;P&gt;Alas, the&amp;nbsp;startup.c does not have an 'init_data_bss' method.&lt;/P&gt;&lt;P&gt;Is the solution provided by &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/stanish"&gt;stanish&lt;/A&gt;‌ also works for the K64?&lt;/P&gt;&lt;P&gt;If so, what to change in the startup.c code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Dec 2017 15:24:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753388#M45922</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-12-31T15:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding attribute results in huge bin file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753389#M45923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which IDE do you used ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2018 09:10:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753389#M45923</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2018-01-02T09:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding attribute results in huge bin file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753390#M45924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;KDS 3.2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2018 09:14:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753390#M45924</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2018-01-02T09:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding attribute results in huge bin file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753391#M45925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roy,&lt;/P&gt;&lt;P&gt;About your code , relocate the flash to flash or RAM?&lt;/P&gt;&lt;P&gt;I refer to the below&amp;nbsp; DOC try to reproduce your problem while no matter relocate the data into RAM or flash,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;the size sill the same .&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-104433"&gt;https://community.nxp.com/docs/DOC-104433&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please create a simple project, which can reproduce your problem , send it to me , thus&lt;/P&gt;&lt;P&gt;I can test it on my side .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2018 09:49:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753391#M45925</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2018-01-02T09:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Adding attribute results in huge bin file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753392#M45926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Alice,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to save a flag ('appFlag') in ROM from boot loader, and read/write it from application.&lt;/P&gt;&lt;P&gt;Can I write this flag to m_text section?&lt;/P&gt;&lt;P&gt;What is the meaning of writing to an exist section (like m_text) or to define a new section in ROM or RAM, like I wrote here in linker file:&lt;/P&gt;&lt;P&gt;MEMORY&amp;nbsp;&lt;BR /&gt;{&lt;BR /&gt; m_interrupts (RX)&amp;nbsp; &amp;nbsp; &amp;nbsp; : ORIGIN = 0x00000000, LENGTH = 0x00000400&lt;BR /&gt; m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;BR /&gt; m_text (RX)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: ORIGIN = 0x00000410, LENGTH = 0x000FFBF0 - 0xE0000&lt;BR /&gt; &lt;STRONG&gt;appFlag (RW)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : ORIGIN = 0x00020000, LENGTH = 0x00000002&lt;/STRONG&gt; &lt;BR /&gt; m_data (RW)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: ORIGIN = 0x1FFF0000, LENGTH = 0x00040000&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 09:36:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753392#M45926</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2018-01-04T09:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding attribute results in huge bin file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753393#M45927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roy,&lt;/P&gt;&lt;P&gt;1. The "exist section" means the section has exist in the default linker file ,&lt;/P&gt;&lt;P&gt;"define a new section " is like you&amp;nbsp; showing above, the appFlag(RW) section.&lt;/P&gt;&lt;P&gt;2.Refer to your information, I define a flag "appFlag", then relocate it into&lt;/P&gt;&lt;P&gt;0x20000. please have a look at my attachment demo. After build ,from the "k64_test1.map"&lt;/P&gt;&lt;P&gt;file , we can see the flash at 0x20000:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/37081i156452DE37871B6E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also there is no change about the code size , below is the original one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/37026iF1F4BD26E182F590/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;ALice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2018 03:26:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753393#M45927</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2018-01-05T03:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Adding attribute results in huge bin file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753394#M45928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;I've written my linker file as follows:&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt; m_interrupts (RX) : ORIGIN = 0x0000A000, LENGTH = 0x00000400&lt;BR /&gt; m_text (RX) : ORIGIN = 0x0000A400, LENGTH = 0x000FFBF0 - 0xA400 - 0x100&lt;BR /&gt; &lt;STRONG&gt;appFlag&lt;/STRONG&gt; (RX) : ORIGIN = 0xFFAF0, LENGTH = 0x100 &lt;BR /&gt; m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000&lt;BR /&gt; m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Define output sections */&lt;BR /&gt;SECTIONS&lt;BR /&gt;{&lt;BR /&gt; /* placing appFlag section at given address: */&lt;BR /&gt; &lt;BR /&gt; .my_section :&lt;BR /&gt; {&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; KEEP(*(.MyappFlag)) /* keep my variable even if not referenced */&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; } &amp;gt; appFlag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In such way the appFlag is in the last 256 bytes of flash.&lt;/P&gt;&lt;P&gt;nevertheless, no matter what I do, after the appFlag is written in the application, the SW goes to hard fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only when writing the appFlag to m_data_2, as follows, can I read/write the appFlag section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt; m_interrupts (RX) : ORIGIN = 0x0000A000, LENGTH = 0x00000400&lt;BR /&gt; m_text (RX) : ORIGIN = 0x0000A400, LENGTH = 0x00075C00&lt;BR /&gt; m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000&lt;BR /&gt; m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* placing appFlag section at given address:*/&lt;BR /&gt; .&lt;SPAN&gt;my_section&amp;nbsp;&lt;/SPAN&gt;0x20020000 :&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;. = ALIGN(4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;KEEP(*(.&lt;SPAN&gt;MyappFlag&lt;/SPAN&gt;)) /* keep my variable even if not referenced */&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;. = ALIGN(4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;} &amp;gt; m_data_2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing here? I understand here I'm writing to RAM, and before to ROM, right?&lt;/P&gt;&lt;P&gt;But why writing to ROM brings me to hard fault and RAM does not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 22:20:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753394#M45928</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2018-01-08T22:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding attribute results in huge bin file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753395#M45929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roy,&lt;/P&gt;&lt;P&gt;What about your flag size ?&lt;/P&gt;&lt;P&gt;Maybe you can share your project, then I will check it&amp;nbsp; on my side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 03:00:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Adding-attribute-results-in-huge-bin-file/m-p/753395#M45929</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2018-01-09T03:00:49Z</dc:date>
    </item>
  </channel>
</rss>

