<?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: bootloader porting to kl16 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438726#M25635</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp; sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have one bootloader for kl26 through UART , and include the KEIL version . It will be published on the web soon.&lt;/P&gt;&lt;P&gt;Now i send it to you by attachment .&lt;/P&gt;&lt;P&gt;I think it is easy to porting it to KL16 .&lt;/P&gt;&lt;P&gt;In the attachment , you can fund the KEIL version on :&lt;/P&gt;&lt;P&gt;"Kinetis-Bootloader-master1027\Kinetis Bootloader SW\Bootloader and Application for KL26\Bootloader Source Code\boorloader_kl26_MDK "&lt;/P&gt;&lt;P&gt;And about the Reference manual you can fund here :&lt;/P&gt;&lt;P&gt;Kinetis-Bootloader-master1027\Kinetis-Bootloader-master1027\Kinetis Bootloader DOC - 0915.pdf .&lt;/P&gt;&lt;P&gt;(This RM is refer to the CW version , while you can refer to ).&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;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2015 05:51:16 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2015-10-29T05:51:16Z</dc:date>
    <item>
      <title>bootloader porting to kl16</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438725#M25634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;MCU-----&amp;gt;MKL16z64vlh4&lt;/P&gt;&lt;P&gt;Aim------&amp;gt;Upgrade my firmware through Low power uart &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked the kinetis bootloader part and found out my mcu wont support Boot Rom,going further i understood there is some way to port the kinetis bootloader(Time consuming ??) ....so i was searching for some sample code in &lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;keil&lt;/STRONG&gt; &lt;/SPAN&gt;for kl16 series that i can copy and&amp;nbsp; edit to do my application,unfortunately i didn't find anything.... can any one help me with this.....................???&amp;nbsp; and is there any way to open code-warrior project in keil ????? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 05:22:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438725#M25634</guid>
      <dc:creator>sachinjoy</dc:creator>
      <dc:date>2015-10-29T05:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: bootloader porting to kl16</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438726#M25635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp; sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have one bootloader for kl26 through UART , and include the KEIL version . It will be published on the web soon.&lt;/P&gt;&lt;P&gt;Now i send it to you by attachment .&lt;/P&gt;&lt;P&gt;I think it is easy to porting it to KL16 .&lt;/P&gt;&lt;P&gt;In the attachment , you can fund the KEIL version on :&lt;/P&gt;&lt;P&gt;"Kinetis-Bootloader-master1027\Kinetis Bootloader SW\Bootloader and Application for KL26\Bootloader Source Code\boorloader_kl26_MDK "&lt;/P&gt;&lt;P&gt;And about the Reference manual you can fund here :&lt;/P&gt;&lt;P&gt;Kinetis-Bootloader-master1027\Kinetis-Bootloader-master1027\Kinetis Bootloader DOC - 0915.pdf .&lt;/P&gt;&lt;P&gt;(This RM is refer to the CW version , while you can refer to ).&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;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 05:51:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438726#M25635</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-10-29T05:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: bootloader porting to kl16</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438727#M25636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alice ,,,&lt;/P&gt;&lt;P&gt;I have one more question regarding this,,,,kl26 have 128kb flash and kl16z64 have only 64kb, does this cause any problem ...what all things i should edit in it to make it kl16 IC... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 11:05:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438727#M25636</guid>
      <dc:creator>sachinjoy</dc:creator>
      <dc:date>2015-10-29T11:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: bootloader porting to kl16</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438728#M25637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About change , it mainly include two parts:&lt;/P&gt;&lt;P&gt;- The first part is&amp;nbsp; bootloader code :&lt;/P&gt;&lt;P&gt;- the UART port ;&lt;/P&gt;&lt;P&gt;- the flash , especially the "APPOK_START_ADDRESS", it defined in the file of "FRDM_KL26Z_cfg.h":&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;#define APPOK_START_ADDRESS&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;0x1FFF8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;for your chip is 64k size flash , here you need change it to 0xFFF8 .&lt;/P&gt;&lt;P&gt;and other about flash need to be change , please refer to this picture to check whether is right :&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/29084i1625AB0FD58D419B/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;- The other part is the GUI code : mainly change the file of ""GlobalVars.cs" ,&lt;/P&gt;&lt;P&gt;you need refer to the "MKL26128" to add other part as it :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &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/4203iBBC1EE1E3A0A5905/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;You can first change the places i mentioned above , then test , if it sitll can not work , you can tell me the detail information or&lt;/P&gt;&lt;P&gt;which step it failed , then i will check with you .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore , if you use the keil , you only need check these folders :&lt;/P&gt;&lt;P&gt;-Kinetis-Bootloader-master\ Kinetis-Bootloader-master1027\Kinetis Bootloader SW\Bootloader and Application for KL26\Bootloader Source Code\boorloader_kl26_MDK&lt;/P&gt;&lt;P&gt;- Kinetis-Bootloader-master\Kinetis-Bootloader-master1027\Kinetis Bootloader SW\Bootloader GUI Source Code\Boot_Loader_GUI 20151026&lt;/P&gt;&lt;P&gt;- Kinetis-Bootloader-master\Kinetis-Bootloader-master1027\Kinetis Bootloader SW\Bootloader and Application for KL26\User Application Source Code (this are app code created on CodeWarrior)-&lt;/P&gt;&lt;P&gt;- Kinetis-Bootloader-master\Kinetis-Bootloader-master1027\Kinetis Bootloader DOC - 0915.pdf (This DOC is detail about the bootloader , i recommend you check it )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 08:16:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438728#M25637</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-10-30T08:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: bootloader porting to kl16</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438729#M25638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;Thanks for the replay.. now iam able to write into flash but i am not able to jump to user program after writing.&lt;/P&gt;&lt;P&gt;Function ::&lt;/P&gt;&lt;P&gt;void JumpToUserApplication(LWord userSP, LWord userStartup)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; volatile LWord avoid_optimization;&lt;/P&gt;&lt;P&gt;&amp;nbsp; avoid_optimization = userSP;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //In order to avoid optimization issue when -Os&lt;/P&gt;&lt;P&gt;&amp;nbsp; avoid_optimization = userStartup;&amp;nbsp; //In order to avoid optimization issue when -Os&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // set up stack pointer&lt;/P&gt;&lt;P&gt;&amp;nbsp; __asm("msr msp, r0");&lt;/P&gt;&lt;P&gt;&amp;nbsp; __asm("msr psp, r0");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Jump to PC (r1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; __asm("mov pc, r1"); &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;is showing error ,,,,,,,,,,......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compiling bootloader.c...&lt;/P&gt;&lt;P&gt;..\Sources\bootloader.c(110): warning:&amp;nbsp; #1267-D: Implicit physical register R0 should be defined as a variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm("MSR MSP, R0");&lt;/P&gt;&lt;P&gt;..\Sources\bootloader.c(110): error:&amp;nbsp; #549: variable "R0" is used before its value is set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm("MSR MSP, R0");&lt;/P&gt;&lt;P&gt;..\Sources\bootloader.c(114): error:&amp;nbsp; #20: identifier "PC" is undefined&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm("MOV PC, R1"); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2015 10:12:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/bootloader-porting-to-kl16/m-p/438729#M25638</guid>
      <dc:creator>sachinjoy</dc:creator>
      <dc:date>2015-11-02T10:12:26Z</dc:date>
    </item>
  </channel>
</rss>

