<?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 Microcontrollers中的主题 Re: Very slow flash programming when preserving memory area</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Very-slow-flash-programming-when-preserving-memory-area/m-p/220036#M3992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi and thank you for quick answer.&lt;/P&gt;&lt;P&gt;I am using OSJTAG and yes, it is indeed slow. And you reply explains why it takes soooo long... I will try using my Lauterbach JTAG instead =), allthough it lacks the nice IDE integration to CodeWarrior (Eclipse).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2012 07:47:28 GMT</pubDate>
    <dc:creator>deekay</dc:creator>
    <dc:date>2012-10-17T07:47:28Z</dc:date>
    <item>
      <title>Very slow flash programming when preserving memory area</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Very-slow-flash-programming-when-preserving-memory-area/m-p/220034#M3990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using codewarrior and TWR-60 evalatuin board and its USB interface for debugging. I have two projects.&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Very simple bootloader that shall jump to main app.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Main app, located at flash 0xC000 (exception vectors starts here). I have modified the linker files accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the following information as reference &lt;A href="http://www.freescale.com/infocenter/topic/AN4379/2012056.html" title="http://www.freescale.com/infocenter/topic/AN4379/2012056.html"&gt;Modify linker command files&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I erase the whole flash and program the bootloader, no problems there, it takes a couple of sec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I try to flash the main app with modified debugger advanced settings to preserve NVM area 0x0 to 0xBFFF.&lt;/P&gt;&lt;P&gt;Once started it takes minutes for the debugger to finish. It halts here (taken from console)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;INF: ;begin_cs device=$00000000, length=$00080000, ram=$20000000&lt;/P&gt;&lt;P&gt;INF: Loading programming algorithm ... &lt;/P&gt;&lt;P&gt;INF: WARNING - Selected .ARP file has been modified. CRC16 = $347F &lt;/P&gt;&lt;P&gt;INF: Done.&lt;/P&gt;&lt;P&gt;INF: CMD&amp;gt;EM&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Then it takes a couple of minutes for the debugger to continue with erasing, programming etc. I have noticed that if I reduce the preserved mem range, this time decreases.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;What is taking so long? Have I missed anything?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Happy for answers.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 07:31:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Very-slow-flash-programming-when-preserving-memory-area/m-p/220034#M3990</guid>
      <dc:creator>deekay</dc:creator>
      <dc:date>2012-10-17T07:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Very slow flash programming when preserving memory area</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Very-slow-flash-programming-when-preserving-memory-area/m-p/220035#M3991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;that very much might depend on the run control device (P&amp;amp;E? Segger? OSJTAG?) you are using, plus the memory range you are preserving.&lt;/P&gt;&lt;P&gt;And it depends on the 'preserving algorithm' too. What I have seen is that usually reads the preserved memory range from the target (takes some time), erases the full device (takes some time too), then merges the preserved memory read previously with the application you download (takes little time again), and then programs the full thing to the to the device (that definitely takes some time). So if you are using a slow OSJTAG, it might be worth trying a faster JTAG debugging device (P&amp;amp;E Multilink or Segger) to speed things up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 07:40:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Very-slow-flash-programming-when-preserving-memory-area/m-p/220035#M3991</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2012-10-17T07:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Very slow flash programming when preserving memory area</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Very-slow-flash-programming-when-preserving-memory-area/m-p/220036#M3992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi and thank you for quick answer.&lt;/P&gt;&lt;P&gt;I am using OSJTAG and yes, it is indeed slow. And you reply explains why it takes soooo long... I will try using my Lauterbach JTAG instead =), allthough it lacks the nice IDE integration to CodeWarrior (Eclipse).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 07:47:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Very-slow-flash-programming-when-preserving-memory-area/m-p/220036#M3992</guid>
      <dc:creator>deekay</dc:creator>
      <dc:date>2012-10-17T07:47:28Z</dc:date>
    </item>
  </channel>
</rss>

