<?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: FlexNVM issue in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexNVM-issue/m-p/361442#M18366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ming Jiang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw in our internal system that this problem is already solved. I will share the answer here in the community.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"If you place function B in FlexNVM section and invokes it from function A located in flash section, you can't single step into it at c level under debug mode, but it will branch to the correct function call after few steps."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Technical Support Engineer&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Dec 2014 18:08:33 GMT</pubDate>
    <dc:creator>Carlos_Musich</dc:creator>
    <dc:date>2014-12-01T18:08:33Z</dc:date>
    <item>
      <title>FlexNVM issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexNVM-issue/m-p/361440#M18364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have three functions A, B, C. Both function A and B are mapped to FlexNVM sector (&amp;gt;= 0x1000000 in the memory map) and function C is allocated in the app flash sector. If I attempt to call function B from C, MCU got lost. I can see the disassembled code: instead of &lt;STRONG&gt;bl functionC to&lt;/STRONG&gt; the correct address, the actual assmbly code is bogus: &lt;STRONG&gt;bl functionC_veneer&lt;/STRONG&gt; (???? what's that?) which branches to an invalid address and causes an exception. My question is: is it possible to call a function located in FlexNVM region from normal flash region? If the caller is another function is the FlexNVM region, the jmp is correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 19:28:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexNVM-issue/m-p/361440#M18364</guid>
      <dc:creator>Ming</dc:creator>
      <dc:date>2014-11-21T19:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: FlexNVM issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexNVM-issue/m-p/361441#M18365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me be more specific here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am placing my boot loader code including Flash erase/write APIs generated by PE into FlexNVM region (&amp;gt;=0x1000000), separated from normal flash sect. I have a function called flash_entry(), in the map file, it's located at the following address:&lt;/P&gt;&lt;P&gt; .flash_operate&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x100000dc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xac ./Sources/flash_init_HW.o&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x100000dc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a_reset&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x10000120&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flash_entry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now from my app code, it attempts to enter boot loader mode by calling flash_entry(). Under debug mode, I can observe the disassembled branch instruction:&lt;/P&gt;&lt;P&gt; 91&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flash_entry();&lt;BR /&gt;0000f074:&amp;nbsp;&amp;nbsp; bl __flash_entry_veneer (0x177b0); 0x000177b0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the assembly code branches address 0x177b0, which clearly is NOT the correction location. Please note that the instruction refers __flash_entry_veneer instead of flash_entry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If another function that is also located in the FlexNVM sector calls flash_entry(), it works expected. &lt;/P&gt;&lt;P&gt;65&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flash_entry(); // never returns!&lt;BR /&gt;1000011a:&amp;nbsp;&amp;nbsp; bl flash_entry (0x10000120); 0x10000120&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion what did I do wrong? Can caller from normal flash sector invoking function in the FlexNVM sector or vice versa?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 22:01:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexNVM-issue/m-p/361441#M18365</guid>
      <dc:creator>Ming</dc:creator>
      <dc:date>2014-11-21T22:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: FlexNVM issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexNVM-issue/m-p/361442#M18366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ming Jiang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw in our internal system that this problem is already solved. I will share the answer here in the community.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"If you place function B in FlexNVM section and invokes it from function A located in flash section, you can't single step into it at c level under debug mode, but it will branch to the correct function call after few steps."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Technical Support Engineer&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 18:08:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FlexNVM-issue/m-p/361442#M18366</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2014-12-01T18:08:33Z</dc:date>
    </item>
  </channel>
</rss>

