<?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: Kinetis Bootloader for MK22FN1M0XXX12  in MCU Bootloader</title>
    <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575981#M11</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cecylia,&lt;/P&gt;&lt;P&gt;After install the attachment, it has all target demos, however it doesn't matter.&lt;/P&gt;&lt;P&gt;I'd like to suggest that you'd better to port K64_120 to the target MK22FN1M0XXX12, as flash configuration between K22_512 and K22_1M0 is different.&lt;/P&gt;&lt;P&gt;I was wondering if you can tell me what's going on with the porting working.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Sep 2016 06:53:35 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2016-09-02T06:53:35Z</dc:date>
    <item>
      <title>Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575978#M8</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to port Kinetis Bootloader v2.0.0 for this device: MK22FN1M0XXX12 based on the steps in the Kinetis Bootloader v2.0.0 reference manual.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'd appreciate it if you can help me with some of these questions:&lt;BR /&gt;1) Is there a similar device I can based this off to jump start?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2) During porting I found that in Kinetis Bootloader v2.0.0 there are 2 sets of these files.&amp;nbsp; Are we really using these 2 or I can ignore one set?&amp;nbsp; Because, they are different from each other.&lt;BR /&gt;NXP_Kinetis_Bootloader_2_0_0\targets\MK22F51212\src\startup\system_*.c/h&lt;BR /&gt;NXP_Kinetis_Bootloader_2_0_0\src\platform\devices\MK22F51212\system_*.c/h&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 copies also of this file: startup_MK22F51212.S&lt;BR /&gt;\NXP_Kinetis_Bootloader_2_0_0\src\platform\devices\MK22F51212\gcc\&lt;BR /&gt;e\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22F51212\src\startup\gcc&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) I tried using MK22F51212 device as a reference (copied these files into a newly created directory MK22FA12), and then copied over the header files from "C:\Freescale\KSDK_1.3.0\platform\devices\MK22FA12" to complete it.&lt;BR /&gt;But it seems like there's a fundamental difference in the clocking scheme, where MK22F-512 calls "usb_clock_init" and sets the following:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // need to set the clock_recover_en and irc_en register&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB0-&amp;gt;CLK_RECOVER_CTRL |= USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB0-&amp;gt;CLK_RECOVER_IRC_EN |= USB_CLK_RECOVER_IRC_EN_IRC_EN_MASK;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, MK22FN1M0XXX12 doesn't have those registers. &amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically in MK22FN1M0XXX12 Reference Manual and header MK22FA12.h, it stops at USBFRMADJUST.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....&lt;BR /&gt;&amp;nbsp; __I&amp;nbsp; uint8_t OBSERVE;&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;&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;lt; USB OTG Observe register, offset: 0x104 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t RESERVED_23[3];&lt;BR /&gt;&amp;nbsp; __IO uint8_t CONTROL;&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;&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;lt; USB OTG Control register, offset: 0x108 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t RESERVED_24[3];&lt;BR /&gt;&amp;nbsp; __IO uint8_t USBTRC0;&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;&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;lt; USB Transceiver Control register 0, offset: 0x10C */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t RESERVED_25[7];&lt;BR /&gt;&amp;nbsp; __IO uint8_t USBFRMADJUST;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; Frame Adjust Register, offset: 0x114 */&lt;BR /&gt;#if MY_HACK&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t RESERVED_26[43];&lt;BR /&gt;&amp;nbsp; __IO uint8_t CLK_RECOVER_CTRL;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; USB Clock recovery control, offset: 0x140 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t RESERVED_27[3];&lt;BR /&gt;&amp;nbsp; __IO uint8_t CLK_RECOVER_IRC_EN;&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;&amp;nbsp; /**&amp;lt; IRC48M oscillator enable register, offset: 0x144 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t RESERVED_28[23];&lt;BR /&gt;&amp;nbsp; __IO uint8_t CLK_RECOVER_INT_STATUS;&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;lt; Clock recovery separated interrupt status, offset: 0x15C */&lt;BR /&gt;#endif &lt;BR /&gt;} USB_Type, *USB_MemMapPtr;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When avoiding to set the non-existing USB registers, I could continue to load the project.&amp;nbsp; But unfortunately the KinetisFlashTool doesn't recognize the device, neither as COM PORT (doesn't come up as something that Windows recognize), nor as HID device (0x15A2,0x0073).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Cecylia&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;P.S: I'm using either IAR or KDS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 01:30:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575978#M8</guid>
      <dc:creator>cwati</dc:creator>
      <dc:date>2016-08-31T01:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575979#M9</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cecylia,&lt;/P&gt;&lt;P&gt;I was wondering if you can upload the ported demo which is based on the IAR, then I can replicate the issue on my site.&lt;/P&gt;&lt;P&gt;And I will appreciate a lot if you can share the particular porting working you do, it can help me to figure out the root cause of the issue.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 03:29:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575979#M9</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-09-01T03:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575980#M10</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following zip is the directory (with the and unnecessary targets and&amp;nbsp; files removed).&amp;nbsp; Of the targets, I only left MK22FA12 (my intended target), and MK22F51212 and MK64F12 (that I think might be most similar with my intended target).&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://drive.google.com/file/d/0BzU22QN_dx0LLUZJT25PcjU0TXc/view?usp=sharing" title="https://drive.google.com/file/d/0BzU22QN_dx0LLUZJT25PcjU0TXc/view?usp=sharing"&gt;NXP_Kinetis_Bootloader_2_0_0.zip - Google Drive&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Cecylia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 20:45:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575980#M10</guid>
      <dc:creator>cwati</dc:creator>
      <dc:date>2016-09-01T20:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575981#M11</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cecylia,&lt;/P&gt;&lt;P&gt;After install the attachment, it has all target demos, however it doesn't matter.&lt;/P&gt;&lt;P&gt;I'd like to suggest that you'd better to port K64_120 to the target MK22FN1M0XXX12, as flash configuration between K22_512 and K22_1M0 is different.&lt;/P&gt;&lt;P&gt;I was wondering if you can tell me what's going on with the porting working.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2016 06:53:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575981#M11</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-09-02T06:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575982#M12</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ping,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sorry I uploaded the wrong directory. &amp;nbsp;Yes, I changed the flash size for 1M0 board when porting from 512.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways, I will try to port now from K64_120 now and will write down the exact steps. &amp;nbsp;In the mean time, can you please look up/comment on how to port the&amp;nbsp;"usb_clock_init" from either hardware_init_MK64F12.c or hardware_init_K22F512.c? &amp;nbsp;Both of these processors have this *CLK_RECOVER_CTRL* registers on their USB Memory Map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="k64f.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4945i54E8862A3BA11702/image-size/large?v=v2&amp;amp;px=999" role="button" title="k64f.png" alt="k64f.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Whereas the K22F_1M0 doesn't have anything after USBFRMADJUST. &amp;nbsp;Needless to say, I got a Hard Fault when trying to set this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1m0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4985i3431F97F3130825A/image-size/large?v=v2&amp;amp;px=999" role="button" title="1m0.png" alt="1m0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Maybe there's another file I can port for this part?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Cecylia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2016 19:07:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575982#M12</guid>
      <dc:creator>cwati</dc:creator>
      <dc:date>2016-09-02T19:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575983#M13</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the complete step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The link to the zipped file is the same:&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/open?id=0BzU22QN_dx0LLUZJT25PcjU0TXc" style="color: #2989c5;"&gt;https://drive.google.com/open?id=0BzU22QN_dx0LLUZJT25PcjU0TXc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Porting K64_120 for K22F_1M0.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1) Create new directory:&lt;/STRONG&gt;&lt;BR /&gt;NXP_Kinetis_Bootloader_2_0_0\src\platform\devices\MK22FA12_MK64&lt;BR /&gt;(The extra MK64 is to indicate that it's ported from MK64 files).&lt;/P&gt;&lt;P&gt;Copy over everything from:&lt;BR /&gt;C:\Freescale\KSDK_1.3.0\platform\devices\MK22FA12\include\*&lt;BR /&gt;into :&lt;BR /&gt;NXP_Kinetis_Bootloader_2_0_0\src\platform\devices\MK22FA12_MK64&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) Create new directory:&lt;/STRONG&gt;&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22FA12_MK64&lt;/P&gt;&lt;P&gt;Copy over everything from:&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK64F12&lt;BR /&gt;to&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22FA12_MK64&lt;/P&gt;&lt;P&gt;Then go inside:&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22FA12_MK64\src&lt;BR /&gt;and rename all the filename that contains the target name from "MK64F12" to "MK22FA12"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3) Copy over:&lt;/STRONG&gt;&lt;BR /&gt;C:\Freescale\KSDK_1.3.0\platform\devices\MK22FA12\startup\system_MK22FA12.*&lt;BR /&gt;to:&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\src\platform\devices\MK22FA12_MK64&lt;/P&gt;&lt;P&gt;Copy over:&lt;BR /&gt;C:\Freescale\KSDK_1.3.0\platform\devices\MK22FA12\linker\* (directories arm,&lt;BR /&gt;gcc, iar)&lt;BR /&gt;into &lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\src\platform\devices\MK22FA12_MK64&lt;/P&gt;&lt;P&gt;Copy the assembly startup files startup_MK22FA12.s from:&lt;BR /&gt;C:\Freescale\KSDK_1.3.0\platform\devices\MK22FA12\startup\&amp;lt;arm|gcc|iar&amp;gt;\&lt;BR /&gt;to&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\src\platform\devices\MK22FA12_MK64\&amp;lt;arm|gcc|iar&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4) Copy 'startup' directory from:&lt;/STRONG&gt;&lt;BR /&gt;C:\Freescale\KSDK_1.3.0\platform\devices\MK22FA12\startup&lt;BR /&gt;to:&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22FA12_MK64\src\startup&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5) For fsl_clock.c/h&lt;/STRONG&gt;&lt;BR /&gt;I was debating between copying either from:&lt;BR /&gt;1st: C:\Freescale\KSDK_1.3.0\platform\system\src\clock\MK22FA12&lt;BR /&gt;Or from:&lt;BR /&gt;2nd: C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\src\platform\devices\MK64F12&lt;/P&gt;&lt;P&gt;But, I found that the one from KSDK_1.3.0 is not compatible (when building),&lt;BR /&gt;so I used the 2nd option: MK64F12 from Bootloader 2.0.0 .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6) Linker files&lt;/STRONG&gt;&lt;BR /&gt;Copy:&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\common\linker\iar\MK64F12&lt;BR /&gt;To:&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\common\linker\iar\MK22FA12_MK64&lt;/P&gt;&lt;P&gt;And rename the files in the new directory to start with K22FN1M0xxx12_*&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;7) Create a new file:&lt;/STRONG&gt;&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\src\platform\devices\MK22FA12_MK64\fsl_device_registers.h,&lt;BR /&gt;whose content is essentially the following:&lt;BR /&gt; &lt;BR /&gt;#if (defined(CPU_MK22FX512AVLH12) || defined(CPU_MK22FN1M0AVLH12) || defined(CPU_MK22FX512AVLK12) || \&lt;BR /&gt; defined(CPU_MK22FN1M0AVLK12) || defined(CPU_MK22FX512AVLL12) || defined(CPU_MK22FN1M0AVLL12) || \&lt;BR /&gt; defined(CPU_MK22FX512AVLQ12) || defined(CPU_MK22FN1M0AVLQ12) || defined(CPU_MK22FX512AVMC12) || \&lt;BR /&gt; defined(CPU_MK22FN1M0AVMC12) || defined(CPU_MK22FX512AVMD12) || defined(CPU_MK22FN1M0AVMD12))&lt;/P&gt;&lt;P&gt;#define K22FA12_SERIES&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; /* CMSIS-style register definitions */&lt;BR /&gt; #include "MK22FA12.h"&lt;BR /&gt; /* Extension register definitions */&lt;BR /&gt; #include "MK22FA12_extension.h"&lt;BR /&gt; /* CPU specific feature definitions */&lt;BR /&gt; #include "MK22FA12_features.h"&lt;BR /&gt; &lt;BR /&gt;#else&lt;BR /&gt; #error "No valid CPU defined!"&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;-------------- PART 2: Modifying the project.&lt;/STRONG&gt;&lt;BR /&gt; Open:&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22FA12_MK64\bootloader.eww&lt;/P&gt;&lt;P&gt;Then remove all projects but the freedom_bootloader project. (This is&lt;BR /&gt;optional I guess, but if you leave the other project, then you might hit some&lt;BR /&gt;K64F files during search with CTRL+SHIFT+F).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1) Modify the directory name from k64f12 to k22fa12&lt;/STRONG&gt;&lt;BR /&gt;and change the files&lt;BR /&gt;(see image on p .134 reference manual of bootloader 2.0.0)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) replace&lt;/STRONG&gt;&lt;BR /&gt; clock_config_*&lt;BR /&gt; hardware_init_*&lt;BR /&gt; memory_map_*&lt;BR /&gt; peripherals_*&lt;BR /&gt;with the one from: C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22FA12_MK64\src&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3) Change the *.icf file under 'link' folder to the file here:&lt;/STRONG&gt;&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\common\linker\iar\MK22FA12_MK64\&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4) In the project\src\startup, change startup_*.s and system_*.c to these: &lt;/STRONG&gt;&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22FA12_MK64\src\startup\iar\startup_MK22FA12.s&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22FA12_MK64\src\startup\system_MK22FA12.c&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5) Right click on project name and in "General Options" -&amp;gt; Target, change&lt;/STRONG&gt;&lt;BR /&gt;Device name to "NXP MK22FN1M0xxx12"&lt;/P&gt;&lt;P&gt;In "C/C++ Compiler"-&amp;gt; Preprocessor, change the include path:&lt;BR /&gt;$PROJ_DIR$/../../../../src/platform/devices/MK64F12&lt;BR /&gt;to:&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\src\platform\devices\MK22FA12_MK64&lt;/P&gt;&lt;P&gt;Still in this screen, change the symbol:&lt;BR /&gt;CPU_MK64FN1M0VMD12&lt;BR /&gt;to&lt;BR /&gt;CPU_MK22FN1M0AVMC12&lt;/P&gt;&lt;P&gt;In the project options, go to "Linker" -&amp;gt; Config and change:&lt;BR /&gt;$/../../../common/linker/iar/MK64F12/K64FN1Mxxx12_application_0x0000.icf&lt;BR /&gt;to&lt;BR /&gt;C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\common\linker\iar\MK22FA12_MK64\K22FN1M0xxx12_application_0x0000.icf&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----------------- PART 3: Building&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1) To build successfully I had to completely comment out&lt;/STRONG&gt;&lt;BR /&gt;CLOCK_SetEnetTime0Clock and CLOCK_SetRmii0Clock in fsl_clock.c&lt;BR /&gt;(Based on grep, I don't think they're used).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) I also decided to remove the directory:&lt;/STRONG&gt;&lt;BR /&gt;src/drivers/mmcau&lt;BR /&gt;from the project when it complained during build.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3) The last complaint I got is about:&lt;/STRONG&gt;&lt;BR /&gt;CLK_RECOVER_CTRL&lt;BR /&gt;and&lt;BR /&gt;CLK_RECOVER_IRC_EN&lt;/P&gt;&lt;P&gt;This is what I mentioned in my previous comment, that 64F and 22F1M seem to&lt;BR /&gt;differ in this register, i.e., 22F1M doesn't have these fields.&lt;BR /&gt;I just disabled this for now.&lt;/P&gt;&lt;P&gt;#if !CWATI&lt;BR /&gt; USB0-&amp;gt;CLK_RECOVER_IRC_EN = 0x03;&lt;BR /&gt; USB0-&amp;gt;CLK_RECOVER_CTRL |= USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK;&lt;/P&gt;&lt;P&gt;USB0-&amp;gt;CLK_RECOVER_CTRL |= 0x20;&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;---------------------- PART 4: Running&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1) I used JLink, so I had to change the Project Properties "Debugger" -&amp;gt; Setup&lt;/STRONG&gt;&lt;BR /&gt;from "CMSIS DAP" to "J-Link".&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) When trying to load I got the following, and then the device is not&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;responsive to JLINK.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Fri Sep 02, 2016 16:00:14: Found 1 JTAG device, Total IRLen = 4: &lt;BR /&gt;Fri Sep 02, 2016 16:00:14: 3196 bytes downloaded and verified (18.15 Kbytes/sec) &lt;BR /&gt;Fri Sep 02, 2016 16:00:14: Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.4\arm\config\flashloader\NXP\FlashK64Fxxx128K.out &lt;BR /&gt;Fri Sep 02, 2016 16:00:14: Target reset &lt;BR /&gt;Fri Sep 02, 2016 16:00:15: The flash loader program reported an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(This definitely messed up the device, to recover I ran Jlink and typed "device&lt;BR /&gt;?" then choose the right device. I did it few times.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways, so I changed the Project Options "Debugger" -&amp;gt; Download:&lt;BR /&gt;- uncheck "Verify Download"&lt;BR /&gt;- uncheck "Use flash loader(s)"&lt;BR /&gt;So in the "Download" view all boxes are unchecked.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;---------------------- PART 5: Moment of Truth&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1) Plug in USB of the 22F_1M0 device to PC then power on the device. PC will show that "USB is not&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;recognized".&lt;/STRONG&gt;&lt;BR /&gt;Then Open KinetisFlashTool and try to connect.&lt;/P&gt;&lt;P&gt;You can't connect via UART because there's no COM Port (USB not recognized by&lt;BR /&gt;Windows), and HID connect doesn't work.&lt;/P&gt;&lt;P&gt;Btw I've installed the CDC driver on my PC, so regular project that I have,&lt;BR /&gt;using CDC, could be recognized OK by my Windows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The link to the zipped file is the same:&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/open?id=0BzU22QN_dx0LLUZJT25PcjU0TXc"&gt;https://drive.google.com/open?id=0BzU22QN_dx0LLUZJT25PcjU0TXc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Cecylia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2016 23:31:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575983#M13</guid>
      <dc:creator>cwati</dc:creator>
      <dc:date>2016-09-02T23:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575984#M14</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cecylia,&lt;/P&gt;&lt;P&gt;According to statement, I've ported the K64_bootlaode to the K21_120, as the K21_120 doesn't have the following registers.&lt;/P&gt;&lt;P style="margin: 5px 0px; color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: inherit; font-family: Times New Roman,serif;"&gt;USB0_CLK_DECOVER_CTRL&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 5px 0px; color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: inherit; font-family: Times New Roman,serif;"&gt;&lt;SPAN style="color: #000000; font-family: 'Times New Roman', serif; font-size: 16px; font-style: normal; font-weight: normal; text-align: left; background-color: #ffffff;"&gt;USB0_CLK_DECOVER_IRC_EN&lt;/SPAN&gt;&lt;BR style="background-color: inherit;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 5px 0px; color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-weight: normal; font-size: 16px; font-family: 'Times New Roman', serif; font-style: normal; text-align: left;"&gt;USB0_CLK_DECOVER_INT_STATUS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And I've adapted the usb_clock_init() which is illustrated below. When the bootloader demo runs on the TWR-K21F120M board, KinetisFlashTool can recognize the device through the COM port or the HID interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bool usb_clock_init(void) {&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;SCGC4 &amp;amp;= ~SIM_SCGC4_USBOTG_MASK;&lt;/P&gt;&lt;P&gt;// SIM-&amp;gt;CLKDIV2 = (uint32_t)0x00L;&lt;/P&gt;&lt;P&gt;// SIM-&amp;gt;SOPT2 |= SIM_SOPT2_USBSRC_MASK | SIM_SOPT2_PLLFLLSEL(0x03);&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;// SIM-&amp;gt;SCGC4 |= SIM_SCGC4_USBOTG_MASK;&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;// USB0-&amp;gt;CLK_RECOVER_IRC_EN = 0x03;&lt;/P&gt;&lt;P&gt;// USB0-&amp;gt;CLK_RECOVER_CTRL |= USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK;&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;// USB0-&amp;gt;CLK_RECOVER_CTRL |= 0x20;&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;// return true;&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;CLKDIV2 = (uint32_t)0x00L;&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;SOPT2 |= SIM_SOPT2_USBSRC_MASK | SIM_SOPT2_PLLFLLSEL(0x0);&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;SCGC4 |= SIM_SCGC4_USBOTG_MASK;&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;SOPT1 |= (SIM_SOPT1_USBSSTBY_MASK |SIM_SOPT1_USBREGEN_MASK);&lt;/P&gt;&lt;P&gt;// USB0-&amp;gt;CLK_RECOVER_IRC_EN = 0x03;&lt;/P&gt;&lt;P&gt;// USB0-&amp;gt;CLK_RECOVER_CTRL |= USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK;&lt;/P&gt;&lt;P&gt;//&lt;/P&gt;&lt;P&gt;// USB0-&amp;gt;CLK_RECOVER_CTRL |= 0x20;&lt;/P&gt;&lt;P&gt;return true; }&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2016 10:16:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575984#M14</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-09-06T10:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575985#M15</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great! This works on my USB-HID.&lt;/P&gt;&lt;P&gt;One more&amp;nbsp;question, mine still doesn't show up as a COM port. &amp;nbsp;Is there a driver I need to install for this to be recognized as a COM port on my Windows?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cannot find a COM port!&lt;BR /&gt;Error: Connect device failed(Error: UartPeripheral() cannot open PC UART port(), speed(57600 Hz).).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Cecylia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 00:33:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575985#M15</guid>
      <dc:creator>cwati</dc:creator>
      <dc:date>2016-09-08T00:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575986#M16</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cecylia,&lt;/P&gt;&lt;P&gt;In my demo, I also use the UART0 (PTB16_RXD, PTB17_TXD) to communicate the PC.&lt;/P&gt;&lt;P&gt;And the bootloader code will enter the UART0_RX_GPIO_IRQHandler() function when the PC send the command to MCU.&lt;/P&gt;&lt;P&gt;Regard to your demo, when debugging the demo, you can set a break point in related UARTn_RX_GPIO_IRQHandler() to confirm&amp;nbsp; whether the UART can receive the command or not.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 04:18:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575986#M16</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-09-08T04:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575987#M17</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi @jeremyzhou,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like the linker file is not working quite properly on this?&lt;/P&gt;&lt;P&gt;When loading the software I got this warning (that I don't normally get when programming regular binary to the board):&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="systemsecurity.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5127i8AEC15E2C87B9ED3/image-size/large?v=v2&amp;amp;px=999" role="button" title="systemsecurity.png" alt="systemsecurity.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover, flash loading fails on this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="flashprotection.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5073iBC5CDF8D616E0602/image-size/large?v=v2&amp;amp;px=999" role="button" title="flashprotection.png" alt="flashprotection.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try to use the "normal" linker such as:&lt;/P&gt;&lt;P&gt;C:\Freescale\Freescale_MQX_4_1\lib\twrk21f120m.iar\debug\bsp\intflash.icf&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.4\arm\config\linker\NXP\MK22xN1M_12.icf&lt;/P&gt;&lt;P&gt;I don't get the warning about "Your application image would set the system security of the device". &amp;nbsp;But it got stuck in Hard Fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please suggest the proper&amp;nbsp;linker file to use to complete this porting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Cecylia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Sep 2016 00:04:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575987#M17</guid>
      <dc:creator>cwati</dc:creator>
      <dc:date>2016-09-10T00:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575988#M18</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cecylia,&lt;/P&gt;&lt;P&gt;I was wondering if you can tell which version of bootloader you adapted for MK22FN1M0XXX12.&lt;/P&gt;&lt;P&gt;And I'd highly recommend that you select the [release] version.&lt;/P&gt;&lt;P&gt;The application code would be located at the start address:0xA000 instead of the 0x0000.&lt;/P&gt;&lt;P&gt;So it needs to modify the linker file to be suit for the new localization, and can you show me what the modifying you do?&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 06:50:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575988#M18</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-09-13T06:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575989#M19</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ping &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jeremyzhou"&gt;jeremyzhou&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I used (copied and renamed) this:&lt;/P&gt;&lt;P&gt;NXP_Kinetis_Bootloader_2_0_0\targets\common\linker\iar\MK64F12\K64FN1Mxxx12_application_0x0000.icf&lt;/P&gt;&lt;P&gt;as the linker for the bootloader project.&lt;/P&gt;&lt;P&gt;Since the bootloader project is built using IAR, it seems like it's by default the release version (i.e., the C/C++ option selects to optimize&amp;nbsp;at highest possible for size consideration).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the application, I currently just try to load a sample project:&lt;BR /&gt;C:\Freescale\Freescale_MQX_4_1\mqx\examples\flashx\build\iar\flashx_twrk21f120m&lt;/P&gt;&lt;P&gt;So I used that linker and modified the starting address from 0x0 to 0xA000:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999999;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*-Specials-*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #999999;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;define symbol __ICFEDIT_intvec_start__ = &lt;SPAN style="text-decoration: line-through;"&gt;0x00000000;&lt;/SPAN&gt; 0x0000A000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #999999;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*-Memory Regions-*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #999999;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;define symbol __ICFEDIT_region_ROM_start__ = &lt;SPAN style="text-decoration: line-through;"&gt;0x00000000&lt;/SPAN&gt;;&amp;nbsp; 0x0000A000;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the resulting linker file.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://drive.google.com/drive/folders/0BzU22QN_dx0LbGtTclJuYkRDVXM?usp=sharing" title="https://drive.google.com/drive/folders/0BzU22QN_dx0LbGtTclJuYkRDVXM?usp=sharing"&gt;jeremy - Google Drive&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I think the problem is happening currently at the bootloader's linker. &amp;nbsp;If you load the bootloader, you can't even erase. &amp;nbsp;If you try to Erase all and unsecure, it says:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999999;"&gt;Current Device doesn't support FlashEraseAllUnsecure.&lt;/SPAN&gt;&lt;BR /&gt;If you try to erase all, it says:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999999;"&gt;Error: Erase operation failed(kStatus_FlashProtectionViolation).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or maybe somewhere in the startup file it writes the security bit wrong? &amp;nbsp;Like there's a&amp;nbsp;"FlashConfig SECTION" in startup_MK22FA12.s. &amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried few things like to to modify the FlashConfig SECTION in startup_MK22FA12.s to change the MEEN to&amp;nbsp;enable ('00'), or modify&amp;nbsp;the linker file to&amp;nbsp;separate the Flash Config section from RAM. &amp;nbsp;But they didn't work. &amp;nbsp;It seems like the solution should be as simple as finding the right, proper linker file for this processor?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if my linker/startup codes are ok.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Cecylia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 20:18:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575989#M19</guid>
      <dc:creator>cwati</dc:creator>
      <dc:date>2016-09-13T20:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575990#M20</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cecylia,&lt;/P&gt;&lt;P&gt;Sorry for reply late.&lt;/P&gt;&lt;P&gt;I've illustrated some advice to fix the issue&lt;/P&gt;&lt;P&gt;1. Remove the redundant interrupt vectors, if there will a overlap conflict between the interrupt vector and BCA erea.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; My startup file is attached.&lt;/P&gt;&lt;P&gt;2. The bootloader linker just use the K64FN1Mxxx12_application_0x0000.icf is ok, and the linker file of the application code should be adapted to the new start address 0xA000.&lt;/P&gt;&lt;P&gt;And I think your modification is correct.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Sep 2016 07:19:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575990#M20</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-09-18T07:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575991#M21</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ping,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for your reply! &amp;nbsp;I've finally managed to make it work using the KDS project (I was more familiar with the startup files syntax for KDS). &amp;nbsp;The resulting startup file that I used here is similar with what you had. &amp;nbsp;In essence I had to replace some unused IRQs with the BCA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, I also had to start at 0xF000 instead of 0xA000. &amp;nbsp;The bootloader Release version's size was still 0xa0f4. &amp;nbsp;So I decided to move up the application code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But we have it working here, yay! &amp;nbsp;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Cecylia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 21:34:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575991#M21</guid>
      <dc:creator>cwati</dc:creator>
      <dc:date>2016-09-20T21:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575992#M22</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hi Cecylia,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Have you ported KBOOT for&amp;nbsp;&lt;/SPAN&gt;MK22FN1M0XXX12?&lt;/P&gt;&lt;P&gt;If yes, can you please share the code?&lt;/P&gt;&lt;P&gt;It would help me a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mahendra&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 07:58:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575992#M22</guid>
      <dc:creator>mahendrakumar_a</dc:creator>
      <dc:date>2017-06-16T07:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis Bootloader for MK22FN1M0XXX12</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575993#M23</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;Hi Cecylia,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;Have you ported KBOOT for&amp;nbsp;&lt;/SPAN&gt;MK22FN1M0XXX12?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;If yes, can you please share the code?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;It would help me a lot.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Thanks&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Mahendra&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 11:49:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Kinetis-Bootloader-for-MK22FN1M0XXX12/m-p/575993#M23</guid>
      <dc:creator>mahendrakumar_a</dc:creator>
      <dc:date>2017-06-16T11:49:50Z</dc:date>
    </item>
  </channel>
</rss>

