<?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>MCU BootloaderのトピックSetting up Kinetis bootloader on MK22FN128 unsuccessful.</title>
    <link>https://community.nxp.com/t5/MCU-Bootloader/Setting-up-Kinetis-bootloader-on-MK22FN128-unsuccessful/m-p/694900#M464</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Setting up Kinetis bootloader on MK22FN128 unsuccessful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a bit stuck with the bootloader. Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a custom PCB with a MK22FN128VLH10 microcontroller. The significant peripherals are :&lt;BR /&gt;1) 20-pin J-Tag connector for connecting the SEGGER J-Link debugger.&lt;BR /&gt;2) USB micro-B port connected to the microcontroller.&lt;BR /&gt;3) Few pins connected to a header (for I/O).&lt;BR /&gt;4) Few LEDs as indicators.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Stuff that is already working :&lt;/STRONG&gt;&lt;BR /&gt;I have written a program to blink LEDs, read Analog Input and send data through the USB as a virtual com port. This program was flashed to the board using the SEGGER J-Link debugger and tested. It works exactly as intended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The problem :&lt;/STRONG&gt;&lt;BR /&gt;I want to use USB to flash the program. But the bootloader isn't working for some reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I have tried :&lt;/STRONG&gt;&lt;BR /&gt;- Downloaded Kinetis Bootloader v2 from NXP website.&lt;BR /&gt;- Imported the project 'flashloader' into KDS (Kinetis Design Studio).&lt;BR /&gt;- Built the project (in 'release' configuration) and created 'flashloader.elf'.&lt;BR /&gt;- Used the python scripts provided and generated 'flashloader_image.c'.&lt;BR /&gt;- Imported the project 'flashloader_loader' into KDS.&lt;BR /&gt;- Added the file 'flashloader_image.c' to the 'flashloader_loader' project and fixed the #include to point to the right file.&lt;BR /&gt;- Built the project (release) and flashed the microcontroller using the J-Link debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, everything looks fine. I connected the USB to my computer and executed the following command with blhost -&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;$./blhost -u -- get-property 1&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It's a success. I get the expected response from the microcontroller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next, I execute the following commands to flash the microcontroller through the bootloader -&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;$./blhost -u -- flash-erase-all&lt;/P&gt;&lt;P&gt;$./blhost -u -- write-memory 0xA000 AppICreated.bin&lt;BR /&gt;$./blhost -u -- reset&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;All three commands run successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And that's it. Nothing else happens. I reset the controller, turned off power and turned it on, waited for a few minutes. My program doesn't execute. Also, the bootloader doesn't work anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the same thing with Kinetis FlashTools (in a Windows system) at location 0xA000 and it gives the same result. But, the bootloader continues to works in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried writing to location 0x0. The program starts working, but I'm pretty sure the bootloader is overwritten and lost. I used the code in "Kinetis Bootloader v2.0.0 Reference manual" page 19 to call the bootloader within my code when I send a character through the virtual com, but the controller just stops working till I reset it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need to know more. I spent a lot of time and tried a lot of useless hacks to try to fix it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anybody knows what I did wrong, I would love to know. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Aug 2017 22:11:58 GMT</pubDate>
    <dc:creator>arjunnair</dc:creator>
    <dc:date>2017-08-09T22:11:58Z</dc:date>
    <item>
      <title>Setting up Kinetis bootloader on MK22FN128 unsuccessful.</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Setting-up-Kinetis-bootloader-on-MK22FN128-unsuccessful/m-p/694900#M464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Setting up Kinetis bootloader on MK22FN128 unsuccessful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a bit stuck with the bootloader. Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a custom PCB with a MK22FN128VLH10 microcontroller. The significant peripherals are :&lt;BR /&gt;1) 20-pin J-Tag connector for connecting the SEGGER J-Link debugger.&lt;BR /&gt;2) USB micro-B port connected to the microcontroller.&lt;BR /&gt;3) Few pins connected to a header (for I/O).&lt;BR /&gt;4) Few LEDs as indicators.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Stuff that is already working :&lt;/STRONG&gt;&lt;BR /&gt;I have written a program to blink LEDs, read Analog Input and send data through the USB as a virtual com port. This program was flashed to the board using the SEGGER J-Link debugger and tested. It works exactly as intended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The problem :&lt;/STRONG&gt;&lt;BR /&gt;I want to use USB to flash the program. But the bootloader isn't working for some reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I have tried :&lt;/STRONG&gt;&lt;BR /&gt;- Downloaded Kinetis Bootloader v2 from NXP website.&lt;BR /&gt;- Imported the project 'flashloader' into KDS (Kinetis Design Studio).&lt;BR /&gt;- Built the project (in 'release' configuration) and created 'flashloader.elf'.&lt;BR /&gt;- Used the python scripts provided and generated 'flashloader_image.c'.&lt;BR /&gt;- Imported the project 'flashloader_loader' into KDS.&lt;BR /&gt;- Added the file 'flashloader_image.c' to the 'flashloader_loader' project and fixed the #include to point to the right file.&lt;BR /&gt;- Built the project (release) and flashed the microcontroller using the J-Link debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, everything looks fine. I connected the USB to my computer and executed the following command with blhost -&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;$./blhost -u -- get-property 1&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It's a success. I get the expected response from the microcontroller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next, I execute the following commands to flash the microcontroller through the bootloader -&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;$./blhost -u -- flash-erase-all&lt;/P&gt;&lt;P&gt;$./blhost -u -- write-memory 0xA000 AppICreated.bin&lt;BR /&gt;$./blhost -u -- reset&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;All three commands run successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And that's it. Nothing else happens. I reset the controller, turned off power and turned it on, waited for a few minutes. My program doesn't execute. Also, the bootloader doesn't work anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the same thing with Kinetis FlashTools (in a Windows system) at location 0xA000 and it gives the same result. But, the bootloader continues to works in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried writing to location 0x0. The program starts working, but I'm pretty sure the bootloader is overwritten and lost. I used the code in "Kinetis Bootloader v2.0.0 Reference manual" page 19 to call the bootloader within my code when I send a character through the virtual com, but the controller just stops working till I reset it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need to know more. I spent a lot of time and tried a lot of useless hacks to try to fix it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anybody knows what I did wrong, I would love to know. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 22:11:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Setting-up-Kinetis-bootloader-on-MK22FN128-unsuccessful/m-p/694900#M464</guid>
      <dc:creator>arjunnair</dc:creator>
      <dc:date>2017-08-09T22:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up Kinetis bootloader on MK22FN128 unsuccessful.</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Setting-up-Kinetis-bootloader-on-MK22FN128-unsuccessful/m-p/694901#M465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arjun Nair,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; flashloader and flashloader_loader is the flash bootloader which can just be used one time, after you download the application code successfully, this bootloader will be disappear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you want the flash bootloader always work, even after you download the application code, you need to use the tower_bootloader or freedom_bootloader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please open KBOOT2.0:NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22F12810&lt;/P&gt;&lt;P&gt;&amp;nbsp;1&amp;nbsp; Use tower bootloader:&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/18630i154FE0530877F7DD/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;2 Download this bootloader to your chip, then modify your application code, and relocate it to 0XA000, build and generate the app.bin file.&lt;/P&gt;&lt;P&gt;3. You can use kinetisFlashTool to download your application code, the tool can be found in folder:&lt;/P&gt;&lt;P&gt;&amp;nbsp;NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\bin\Tools\KinetisFlashTool\win&lt;/P&gt;&lt;P&gt;After you download the application code successfully, you still can download the new application with the fixed flash bootloader again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With it helps you!&lt;/P&gt;&lt;P&gt;If you still have question, please let me know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&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, 11 Aug 2017 02:53:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Setting-up-Kinetis-bootloader-on-MK22FN128-unsuccessful/m-p/694901#M465</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-08-11T02:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up Kinetis bootloader on MK22FN128 unsuccessful.</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Setting-up-Kinetis-bootloader-on-MK22FN128-unsuccessful/m-p/694902#M466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 16:49:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Setting-up-Kinetis-bootloader-on-MK22FN128-unsuccessful/m-p/694902#M466</guid>
      <dc:creator>arjunnair</dc:creator>
      <dc:date>2017-08-11T16:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up Kinetis bootloader on MK22FN128 unsuccessful.</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Setting-up-Kinetis-bootloader-on-MK22FN128-unsuccessful/m-p/1588480#M1375</link>
      <description>&lt;P&gt;In flashloader_loader mode,how to load flashloader，with blhost？!But,as reference manual said,"The image on the flash has 2 programs: flashloader_loader and flashloader".If like this，how do they laid in the flash? I buid my own&amp;nbsp;flashloader_loader and flashloader with IDE sdk,I dont know how to deal with them.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 18:41:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Setting-up-Kinetis-bootloader-on-MK22FN128-unsuccessful/m-p/1588480#M1375</guid>
      <dc:creator>nibabajohn</dc:creator>
      <dc:date>2023-01-26T18:41:42Z</dc:date>
    </item>
  </channel>
</rss>

