<?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: TWR-K60F120M won’t program flash in IAR in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-won-t-program-flash-in-IAR/m-p/549593#M33463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; Elacia:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the following setting, it works, could you please try it ?&lt;/P&gt;&lt;P&gt;&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/22077i3D4F8C2225DA9EB1/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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/21988iEEFABBAD64664B61/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jul 2016 10:59:30 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2016-07-29T10:59:30Z</dc:date>
    <item>
      <title>TWR-K60F120M won’t program flash in IAR</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-won-t-program-flash-in-IAR/m-p/549592#M33462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a TWR-K60F120M and TWR-SER2 and IAR 7.7. I’m using the Kinetis 120MHz bare metal sample code** &lt;A href="http://www.nxp.com/webapp/sps/download/license.jsp?colCode=KINETIS_120MHZ_SC&amp;amp;location=null&amp;amp;fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1&amp;amp;Parent_nodeId=&amp;amp;Parent_pageType="&gt;(KINETIS_120MHZ_SC.zip&lt;/A&gt;) downloaded today with only the modifications noted here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The KINETIS_120MHZ_SC\build\iar\hello_world for the k60 project works fine when it runs from RAM. This makes me believe that my PEMicro configuration is working and my serial port is connected to a terminal correctly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I switch to hello_world_k60_tower – FLASH 1M configuration, things begins to go badly. When I compile and download, I get “&lt;SPAN style="font-family: 'courier new', courier;"&gt;Missing or malformed flash loader specification file: …Freescale\FlashK70Xxxx.board&lt;/SPAN&gt;”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I switched it to $TOOLKIT_DIR$\config\flashloader\NXP\FlashK60Fxxx128K.board&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This led to “&lt;SPAN style="font-family: 'courier new', courier;"&gt;The flash loader program reported an error” then “A&amp;nbsp; fatal error has occurred. Debugger will terminate.&lt;/SPAN&gt;” The Debug Log window had no additional useful information for me:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:46:53: Software reset was performed &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:46:54: 3196 bytes downloaded and verified (2.44 Kbytes/sec) &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:46:54: Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.7\arm\config\flashloader\NXP\FlashK60Fxxx128K.out &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:46:54: Target reset &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:46:55: The flash loader program reported an error. &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:46:57: IAR Embedded Workbench 7.70.1 (armproc.dll)&lt;/P&gt;&lt;P&gt;I tried switching the flash loader override board to the more generic $TOOLKIT_DIR$\config\flashloader\NXP\FlashKxxFxxx128K.board. But got the same errors. I even tried the obviously wrong FlashK70Fxxx128K.board&amp;nbsp; because that seemed to be what the example wanted but I got the same errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Per &lt;A _jive_internal="true" href="https://community.nxp.com/message/437401"&gt;Trouble downloading and debugging K22 project using IAR 7.2... Any ideas?&lt;/A&gt;, it looks like overriding the default was a good idea (it was also how the example code ware already configured).&amp;nbsp; I tried&amp;nbsp; enable_config_write with FlashK60Fxxx128K.board as the base, as suggested in &lt;A _jive_internal="true" href="https://community.nxp.com/thread/311660"&gt;Using IAR EWARM to program flash configuration field&lt;/A&gt;, but that led to exactly the same errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I opted to modify Options-&amp;gt;Debugger-&amp;gt;Download so kept &lt;EM&gt;Use flash loader(s)&lt;/EM&gt; checked but no longer checked &lt;EM&gt;Override default .board file&lt;/EM&gt;. Same errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next, I unchecked &lt;EM&gt;Use flash loader(s)&lt;/EM&gt; per a few posts (&lt;A _jive_internal="true" href="https://community.nxp.com/message/341033"&gt;https://community.nxp.com/message/341033&lt;/A&gt;). This led to a different popup upon loading: “&lt;SPAN style="font-family: 'courier new', courier;"&gt;Warning: There were warnings during download, see Log Window&lt;/SPAN&gt;.” and in the Debug Log:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:12: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.7\arm\config\debugger\NXP\Kxx.dmac &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:16: P&amp;amp;E Interface detected - Flash Version 31.21 &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:17: Device is NXP_K6x_K60FN1M0M12. &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:17: Mode is In-Circuit Debug. &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:17: Initial reset was performed &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:17: CPU reset by debugger. &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:17:&amp;nbsp; &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:17: Software reset was performed &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:20: 7496 bytes downloaded and verified (2.62 Kbytes/sec) &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:20: Warning: Target inconsistency detected in Memory range 0x00000000-0x00001D47 &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:32: Warning: There were warnings during download, see Log Window &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:32: Loaded debugee: C:\Freescale\KINETIS_120MHZ_SC\build\iar\hello_world\FLASH_1M\Exe\hello_world_k60_tower.out &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:32: CPU reset by debugger. &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:32:&amp;nbsp; &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:32: Software reset was performed &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:32: Target reset &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thu Jul 28, 2016 10:55:32: There was 1 warning during the initialization of the debugging session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, it would seem that the flash did not actually get programmed. The initial PC doesn’t get set correctly, my __startup is at 0x411 but memory address 0x00000000 has 0x1FFF2670 as the SP and 0x00004A69 as the initial PC.&amp;nbsp; This does not run, of course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that &lt;A _jive_internal="true" href="https://community.nxp.com/message/437401"&gt;Trouble downloading and debugging K22 project using IAR 7.2... Any ideas?&lt;/A&gt; mentioned that there is flashloader source code. It is not in 7.7 (C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.7\arm\src\flashloader); there is no entry for NXP or Freescale. I do have code from a 7.4 version of IAR (which, by the way, gives all the same flash errors during download described here though the paths the .board files were all in that EWARM directory instead).&amp;nbsp; The source code lets me choose between MK60X256VMD100 and MK60N512VMD100 when I have an MK60F120Mx. I don’t think this is a useful path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a working example and flash loader? Should I be concerned about this TWR-K60 board? Is using IAR going to cost me all sorts of time and I really must switch to CodeWarrior or I’ll regret it? (The rest of the company uses IAR so that's an uphill battle.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Elecia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;** Note: I want to use the Freescale USB Stack v4.1.1 example code but those are K70 and I want to simplify my issue here. I have seen &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-104354"&gt;How to add support for K60 120MHz part in USB stack ver 4.1.1&lt;/A&gt; and worry that doesn’t show how to use the USBHS mode&amp;nbsp; but none of that matters unless I can program the flash. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 18:33:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-won-t-program-flash-in-IAR/m-p/549592#M33462</guid>
      <dc:creator>elecia</dc:creator>
      <dc:date>2016-07-28T18:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-K60F120M won’t program flash in IAR</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-won-t-program-flash-in-IAR/m-p/549593#M33463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; Elacia:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the following setting, it works, could you please try it ?&lt;/P&gt;&lt;P&gt;&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/22077i3D4F8C2225DA9EB1/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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/21988iEEFABBAD64664B61/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 10:59:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-won-t-program-flash-in-IAR/m-p/549593#M33463</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2016-07-29T10:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-K60F120M won’t program flash in IAR</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-won-t-program-flash-in-IAR/m-p/549594#M33464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All of my testing has been done with Freescale MK60FN1M0xxx12 as the device. This works in RAM mode and I'm getting output on UART5.&amp;nbsp; The device was the same between the RAM and Flash configurations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, as I mentioned,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I opted to modify Options-&amp;gt;Debugger-&amp;gt;Download so kept &lt;/SPAN&gt;&lt;EM style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;Use flash loader(s)&lt;/EM&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; checked but no longer checked &lt;/SPAN&gt;&lt;EM style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;Override default .board file&lt;/EM&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;. Same errors.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;However, I re-ran it this morning and got the same errors: "The flash loader program reported an error" popup then "A fatal error has occurred. The debugger will terminate." popup with nothing of note in the Debug Log:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Fri Jul 29, 2016 08:19:05: Software reset was performed &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Fri Jul 29, 2016 08:19:05: ----- Prepare hardware for Flashloader ----- &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Fri Jul 29, 2016 08:19:06: 2560 bytes downloaded and verified (2.47 Kbytes/sec) &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Fri Jul 29, 2016 08:19:06: Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.40.7\arm\config\flashloader\Freescale\FlashK60Fxxx128K.out &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Fri Jul 29, 2016 08:19:06: Target reset &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Fri Jul 29, 2016 08:19:07: Unloaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.40.7\arm\config\flashloader\Freescale\FlashK60Xxxx128K.mac &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Fri Jul 29, 2016 08:19:07: The flash loader program reported an error. &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Attached is a picture of my board so you can see the jumpers. It is in the default configuration (based on TWR-K60F120M Tower Module User's Manual). It is connected to a TWR-SER2 with the jumpers in default configuration (TWR-SER2 Users's Manual) except that the TWR-SER2 J21 and J24 jumpers are on to facilitate USBHS MSD development.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 15:27:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-won-t-program-flash-in-IAR/m-p/549594#M33464</guid>
      <dc:creator>elecia</dc:creator>
      <dc:date>2016-07-29T15:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-K60F120M won’t program flash in IAR</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-won-t-program-flash-in-IAR/m-p/549595#M33465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elecia:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this demo with both IAR 7.60&amp;nbsp; and IAR 7.70,&amp;nbsp; the results are pass, please see the below picture. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/1523iFD4BF5D614F3B150/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_6.png" alt="pastedImage_6.png" /&gt;&lt;/span&gt;&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/1452iF161FE448A60E83D/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;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2016 07:21:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-won-t-program-flash-in-IAR/m-p/549595#M33465</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2016-08-09T07:21:17Z</dc:date>
    </item>
  </channel>
</rss>

