<?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>Kinetis Design Studio中的主题 Re: Release vs. Debug difference while writing to flash K64</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640079#M8263</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;&amp;gt;&amp;gt;I do not know what is the difference between the d and D (or the .4961 numbers mean).&lt;/P&gt;&lt;P&gt;I wrote about 'd' and 'D' above. Basically for 'd' it is like if the variable is static (not external), while with 'D' it globally visible. &lt;/P&gt;&lt;P&gt;The number .4961 is an internal symbol numbering of the linker to avoid naming conflicts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Mar 2017 13:11:31 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2017-03-10T13:11:31Z</dc:date>
    <item>
      <title>Release vs. Debug difference while writing to flash K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640076#M8260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This question is intended for &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/BlackNight"&gt;BlackNight&lt;/A&gt;‌, or whoever else can help. I'm writing this question in continuous to my post &lt;A _jive_internal="true" href="https://community.nxp.com/message/884522"&gt;here&lt;/A&gt;. I've used the&amp;nbsp;nice &lt;A href="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/"&gt;document &lt;/A&gt;Erich has written regarding using _attribute_ to write to specific address in flash.&lt;/P&gt;&lt;P&gt;Maybe I'm missing something here but I've noticed there's a difference between Debug and Release when writing to the flash (in the freedom_bootloader source code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Release version, the appFlag I've written is (I think) optimized and vanished, while in Debug version it is well written to the address I've specified (0x20020000).&lt;/P&gt;&lt;P&gt;I've used the&amp;nbsp;arm-none-eabi-nm.exe to look for my appFlash flag and I've seen differences between the Rls &amp;amp; Dbg versions:&lt;/P&gt;&lt;P&gt;In the Rls version:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;20020000 d appFlag.4961&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt; w atexit&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;In the Dbg version:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;20020000 D appFlag&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; w atexit&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I do not know what is the difference between the d and D (or the .4961 numbers mean).&lt;/P&gt;&lt;P&gt;Furthermore, in the map files I'm seeing these differences also:&lt;/P&gt;&lt;P&gt;In the Rls version:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; .appFlag 0x20020000 0x1 C:\...\AppData\Local\Temp\ccRzaGIi.ltrans1.ltrans.o&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Dbg version:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; .appFlag 0x20020000 0x1 C:\...\AppData\Local\Temp\ccXjJvWa.ltrans0.ltrans.o&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; 0x20020000 appFlag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously, something is making this flag to disappear in the Release version, and that is why in my post &lt;A _jive_internal="true" href="https://community.nxp.com/message/884522"&gt;here&amp;nbsp;&lt;/A&gt;, the 'if' in line 367 is ignored.&lt;/P&gt;&lt;P&gt;This was not mentioned in Erich's doc. Have I done something wrong when using the _attribute_ method?&lt;/P&gt;&lt;P&gt;Any help will do.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Roy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 22:35:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640076#M8260</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-03-09T22:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Release vs. Debug difference while writing to flash K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640077#M8261</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.&amp;nbsp; Please pay attention when run the startup code the RAM memory will be initialized.&lt;/P&gt;&lt;P&gt;Except reserved without definition in the linker file .&lt;/P&gt;&lt;P&gt;For example use 0x20000000 to 0x2000FFF8 to save&amp;nbsp; the flag "appflag", we&amp;nbsp; can do not&lt;/P&gt;&lt;P&gt;includes this memory :&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/16415iE2A458D01E432D40/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;For I don't know your project flow ,so I'm not sure you have this question, if yes, you can refer&lt;/P&gt;&lt;P&gt;to this DOC :&lt;A href="https://community.nxp.com/docs/DOC-328365"&gt;Kinetis Bootloader to Update Multiple Devices in a Network for Cortex-M4&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/16473i54272424A5474D8F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Do you use the KBOOTv2.0 ? If yes, the difference between debug version and release version&lt;/P&gt;&lt;P&gt;is release version reduce some code , you can search "DEBGU" in the whole project, these code&lt;/P&gt;&lt;P&gt;only for debug version :&lt;/P&gt;&lt;P&gt;3. If the debug version can work well , while release can't ,&amp;nbsp; you can add volatile or static to the&lt;/P&gt;&lt;P&gt;appFlag to have a try .&lt;/P&gt;&lt;P&gt;&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>Fri, 10 Mar 2017 10:00:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640077#M8261</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2017-03-10T10:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Release vs. Debug difference while writing to flash K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640078#M8262</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;about the difference between 'd' and 'D', see &lt;A class="link-titled" href="https://sourceware.org/binutils/docs/binutils/nm.html" title="https://sourceware.org/binutils/docs/binutils/nm.html"&gt;nm - GNU Binary Utilities&lt;/A&gt; :&lt;/P&gt;&lt;P&gt;" If lowercase, the symbol is usually local; if uppercase, the symbol is global (external)."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 12:20:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640078#M8262</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-03-10T12:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Release vs. Debug difference while writing to flash K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640079#M8263</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;&amp;gt;&amp;gt;I do not know what is the difference between the d and D (or the .4961 numbers mean).&lt;/P&gt;&lt;P&gt;I wrote about 'd' and 'D' above. Basically for 'd' it is like if the variable is static (not external), while with 'D' it globally visible. &lt;/P&gt;&lt;P&gt;The number .4961 is an internal symbol numbering of the linker to avoid naming conflicts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 13:11:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640079#M8263</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-03-10T13:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Release vs. Debug difference while writing to flash K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640080#M8264</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;About your problem: I did not had the time to reproduce your problem.&lt;/P&gt;&lt;P&gt;In that link you say you wrote it as:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;unsigned char __attribute__((section (".appFlag"))) appFlag = 0x55;&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Depending on what the compiler and linker can see, it might optimize that variable (and using 0x55 instead).&lt;/P&gt;&lt;P&gt;I recommend that you mark it as volatile like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&lt;SPAN style="color: #ff0000;"&gt;volatile&lt;/SPAN&gt; unsigned char __attribute__((section (".appFlag"))) appFlag = 0x55;&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 13:14:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640080#M8264</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-03-10T13:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Release vs. Debug difference while writing to flash K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640081#M8265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/BlackNight"&gt;BlackNight&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;I tried using volatile or/and static (as @&lt;A _jive_internal="true" data-content-finding="Community" data-userid="227361" data-username="Alice_Yang" href="https://community.nxp.com/people/Alice_Yang" style="color: #5e89c1; background-color: #ffffff; border: 0px; font-weight: 200; font-size: 1.286rem;"&gt;Alice_Yang&lt;/A&gt;) suggested, but same problem.&lt;/P&gt;&lt;P&gt;I'm doing the simplest thing in bl_main.c (tried also in my app code):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; volatile unsigned char __attribute__((section (".appFlag"))) appFlag = 0x55; //by Roy M.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;int main(void)&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;BOARD_InitLEDs();&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;if (appFlag == 0x55)&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; redLedOn(); //function to light red led&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In linker file:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;/* Specify the memory areas */&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;MEMORY&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x000FFBF0&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00040000&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; m_data_20020000 (RW) : ORIGIN = 0x20020000, LENGTH = 0x00000400&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;/* Define output sections */&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;SECTIONS&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; /* placing appFlag section at given address: (Roy M.)*/&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; .appFlag 0x20020000 :&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; KEEP(*(.appFlag)) /* keep my variable even if not referenced */&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt; } &amp;gt; m_data_20020000&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The red LED is not on in&amp;nbsp;Release mode. In debug it works fine. But, in debug I cannot flash my app (as I've stated &lt;A _jive_internal="true" href="https://community.nxp.com/thread/446404"&gt;here&lt;/A&gt;), that is why I must use Release version.&lt;/P&gt;&lt;P&gt;Roy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 20:42:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640081#M8265</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-03-10T20:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Release vs. Debug difference while writing to flash K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640082#M8266</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;I appologize for my late reply.&lt;/P&gt;&lt;P&gt;I have tried to reproduce what you describe, but I think that your problem is not caused by either release or debug, but an oddity of the GNU linker with custom sections.&lt;/P&gt;&lt;P&gt;I have created an example similar like yours, and the code testing/reading the variable is working fine and as expected with -O3 (and both with and without -O3 the variable has the 'D' attribute).&lt;/P&gt;&lt;P&gt;However, there is a thing with how the variable is intialized.&lt;/P&gt;&lt;P&gt;If you are using an initialied variable in a custom section like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;volatile unsigned char __attribute__((section (".appFlag"))) appFlag = 0x55;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;then it won't get automatically initialized by the startup code.&lt;/P&gt;&lt;P&gt;If putting variables into sections like this, you have to make that initialization yourself.&lt;/P&gt;&lt;P&gt;I covered part of that thing in &lt;A class="link-titled" href="https://mcuoneclipse.com/2014/04/19/gnu-linker-can-you-not-initialize-my-variable/" title="https://mcuoneclipse.com/2014/04/19/gnu-linker-can-you-not-initialize-my-variable/"&gt;GNU Linker, can you NOT Initialize my Variable? | MCU on Eclipse&lt;/A&gt;&amp;nbsp; where the linker creates an initalization if the variable is *not* initialized.&lt;/P&gt;&lt;P&gt;I have never used *initialized* global variables, that's why I have not seen this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Mar 2017 18:35:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640082#M8266</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-03-11T18:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Release vs. Debug difference while writing to flash K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640083#M8267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, &amp;nbsp;thanks, I'll look into the link you sent.&lt;/P&gt;&lt;P&gt;Just to make things clearer, you did not used this phrase?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;volatile unsigned char __attribute__((section (".appFlag"))) appFlag = 0x55;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; color: #3d3d3d; font-weight: inherit;"&gt;So, what did you write in order it to work properly?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; color: #3d3d3d; font-weight: inherit;"&gt;I'm not following....&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; color: #3d3d3d; font-weight: inherit;"&gt;Roy&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Mar 2017 19:44:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640083#M8267</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-03-11T19:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Release vs. Debug difference while writing to flash K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640084#M8268</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;yes, I used&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;volatile unsigned char __attribute__((section (".appFlag"))) appFlag = 0x55;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I did is to initialize the variable fully/properly from my code. I did this with&lt;/P&gt;&lt;P&gt;static void Init(void) {&lt;BR /&gt;&amp;nbsp; appFlag = 0x55;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;and called it from the beginning of main().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Mar 2017 19:49:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640084#M8268</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-03-11T19:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Release vs. Debug difference while writing to flash K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640085#M8269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, Erich, finally, all is working well.&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;I will post a method which ties all loose ends for jumping from app to bootloader which concludes all my findings....&lt;/P&gt;&lt;P&gt;Roy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Mar 2017 20:59:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Release-vs-Debug-difference-while-writing-to-flash-K64/m-p/640085#M8269</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-03-11T20:59:16Z</dc:date>
    </item>
  </channel>
</rss>

