<?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: Getting started: KBOOT MSC on KL25 questions in MCU Bootloader</title>
    <link>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614091#M161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nothing that I've heard. I'm just working around it as mentioned above. &lt;/P&gt;&lt;P&gt;Frank.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.frankvh.com"&gt;frankvh.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Oct 2016 04:31:49 GMT</pubDate>
    <dc:creator>frankvanhooft</dc:creator>
    <dc:date>2016-10-22T04:31:49Z</dc:date>
    <item>
      <title>Getting started: KBOOT MSC on KL25 questions</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614086#M156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using kboot 2.0 and KDS 3.2. I'm trying to get kboot running as a mass storage device on a MKL25Z128. So that I can plug the KL25 into a PC, have it appear as a drive, then drag&amp;amp;drop a firmware file onto it.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've succeeded in building KBOOT and programming it into the KL25. I took the "freedom bootloader" project, and modified bootloader_config.h so that only MSC was selected.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#if !defined(BL_CONFIG_UART)&lt;BR /&gt;#define BL_CONFIG_UART (0)&lt;BR /&gt;#endif&lt;BR /&gt;#if !defined(BL_CONFIG_I2C)&lt;BR /&gt;#define BL_CONFIG_I2C (0)&lt;BR /&gt;#endif&lt;BR /&gt;#if !defined(BL_CONFIG_SPI)&lt;BR /&gt;#define BL_CONFIG_SPI (0)&lt;BR /&gt;#endif&lt;BR /&gt;#if !defined(BL_CONFIG_USB_HID)&lt;BR /&gt;#define BL_CONFIG_USB_HID (0)&lt;BR /&gt;#endif&lt;BR /&gt;#if !defined(BL_CONFIG_USB_MSC)&lt;BR /&gt;#define BL_CONFIG_USB_MSC (1)&lt;BR /&gt;#endif&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;When I plug the KL25 into a windows PC, a drive pops up! Amazing. What a good start. But I can't progress beyond this.&lt;/P&gt;&lt;P&gt;The "status.txt" file says "ready". &amp;nbsp;This is Info.txt:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Kinetis Bootloader K2.0.0&lt;/P&gt;&lt;P&gt;System device ID: 0x25152486&lt;BR /&gt;Flash size: 131072 bytes&lt;BR /&gt;Flash range: 0x00000000-0x0001ffff&lt;BR /&gt;Flash sector size: 1024 bytes&lt;BR /&gt;Flash blocks: 1&lt;BR /&gt;RAM size: 16384 bytes&lt;BR /&gt;RAM range: 0x1ffff000-0x20002fff&lt;BR /&gt;Reserved region 0: 0x00000000-0x000073ff&lt;BR /&gt;Reserved region 1: 0x1ffff000-0x2000111f&lt;BR /&gt;Verify writes: yes&lt;BR /&gt;Check reserved regions: yes&lt;BR /&gt;Boot config present: no&lt;BR /&gt;Peripheral detection timeout: 5000 ms&lt;BR /&gt;CPU clock: 48000000 Hz&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;To test the bootloader, I built the example project LED_demo_freedom_8000, then drag&amp;amp;dropped the resulting S-record file (named led_demo_freedom_8000.srec) into the drive. Nothing interesting happened, it appeared to be ignored, and the status.txt file continued to say "ready". &amp;nbsp;I also tried creating a "raw binary" .bin file instead of a .srec file, but the bootloader didn't appear interested in that file either.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both the bootloader &amp;amp; the led_demo project were built as "release".&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea what's going on? &amp;nbsp;Why can't I drop the led_demo file into the KL25Z?&lt;/P&gt;&lt;P&gt;Many thanks for any suggestions!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 04:40:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614086#M156</guid>
      <dc:creator>frankvanhooft</dc:creator>
      <dc:date>2016-10-07T04:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting started: KBOOT MSC on KL25 questions</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614087#M157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank Van Hooft,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The KBOOT v2.0 MSC volume cannot take S-Record or binary files. It uses a special kind of file called &lt;EM&gt;&lt;STRONG&gt;Secure&lt;/STRONG&gt; &lt;STRONG&gt;Binary&lt;/STRONG&gt; &lt;/EM&gt;(sb file). You can refer to the document called "Kinetis Elftosb User's Guide" for details. This document is available in KBOOT installation folder or online:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\nxp\NXP_Kinetis_Bootloader_2_0_0\doc\Kinetis Elftosb User's Guide.pdf&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.nxp.com/files/soft_dev_tools/doc/user_guide/KBLELFTOSBUG.pdf" title="http://www.nxp.com/files/soft_dev_tools/doc/user_guide/KBLELFTOSBUG.pdf"&gt;http://www.nxp.com/files/soft_dev_tools/doc/user_guide/KBLELFTOSBUG.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next document in community can also be useful:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-332379"&gt;https://community.nxp.com/docs/DOC-332379&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;BR /&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 05:12:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614087#M157</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2016-10-07T05:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Getting started: KBOOT MSC on KL25 questions</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614088#M158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much Jorge - that's the pointer I needed. I've moved forward a reasonable amount and am now stuck on something new.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested the little "led blinky" test program mentioned above on it's own and it works fine. However, it appears that KBOOT is unable to program it into the flash. I am generating an sb file, and drag&amp;amp;drop'ing it onto the KL25. The status.txt file changes from "ready" to "transfe"&amp;nbsp; (it cuts off the word 'transferring') and remains stuck there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's very interesting is that I can use jlink to program the test blinky into flash, and when I do that KBOOT is happy to run it. KBOOT is setup to wait 5 seconds to check the USB port, then run the user application. So I can power on, wait 5 seconds, and then the LED starts blinking. Perfect! Except it was jlink that programmed blinky into the flash, not kboot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the .bd command file (SimpleLoad.bd):&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;// Define one input file that will be the first file listed on the command line. The file can be either an ELF file&lt;BR /&gt;// or an S-record file.&lt;BR /&gt;sources {&lt;BR /&gt;inputFile = extern(0);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// create a section&lt;BR /&gt;section (0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; erase 0x00008000..0x0001FFFF;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; load inputFile; // load all sections&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call inputFile; // jump to entry point&lt;BR /&gt;}&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is how I call elftosb:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;elftosb -V -c SimpleLoad.bd -o led_demo.sb led_demo_freedom_8000.srec&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is the output of elftosb:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;Boot Section 0x00000000:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp; ERAS | adr=0x00008000 | cnt=0x00017fff | flg=0x0000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp; LOAD | adr=0x00008000 | len=0x000000c0 | crc=0x47f47181 | flg=0x0000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp; LOAD | adr=0x000083c0 | len=0x00000404 | crc=0xdc8fcc3e | flg=0x0000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp; CALL | adr=0x000084e9 | arg=0x00000000 | flg=0x0000&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It all looks very reasonable to my eyes. However it seems clear that kboot is not even getting to the point of erasing the flash. (I have tried using an .elf file to create the .sb file, as well as the .srec file, but the end result was the same.)&lt;/P&gt;&lt;P&gt;Any idea why kboot appears to be stuck in the "transferring" state?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Oct 2016 19:28:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614088#M158</guid>
      <dc:creator>frankvanhooft</dc:creator>
      <dc:date>2016-10-08T19:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Getting started: KBOOT MSC on KL25 questions</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614089#M159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah-ha! I have something working. I've been searching the forums and trying many many things. It's obvious other people have been having the same problem, so I'll post my finding here in case it helps others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The root problem is that specifying an address range to erase does NOT work. For example, the following does NOT work:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN&gt;// Define one input file that will be the first file listed on the command line. The file can be either an ELF file&lt;BR /&gt;// or an S-record file.&lt;BR /&gt;sources {&lt;BR /&gt;inputFile = extern(0);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// create a section&lt;BR /&gt;section (0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; erase 0x00008000..0x0001FFFF;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; load inputFile; // load all sections&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; reset;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, the "erase all" command DOES work.&amp;nbsp; This works:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN&gt;// Define one input file that will be the first file listed on the command line. The file can be either an ELF file&lt;BR /&gt;// or an S-record file.&lt;BR /&gt;sources {&lt;BR /&gt;inputFile = extern(0);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// create a section&lt;BR /&gt;section (0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; erase all;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; load inputFile; // load all sections&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; reset;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A problem for me (and likely many others as well) is I cannot use the "erase all" command, because I store calibration and other user settings in the flash, and I don't want that data blown away during an upgrade.&lt;/P&gt;&lt;P&gt;As a crude solution, putting a whole bunch of individual "erase" commands in the command file also works. For example:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN&gt;// Define one input S-Record file that will be the first file listed on the command line.&lt;BR /&gt;sources {&lt;BR /&gt;inputFile = extern(0);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// create a section&lt;BR /&gt;section (0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; erase 0x00008000;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x00008400;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x00008800;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x00008C00;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x00009000;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x00009400;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x00009800;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x00009C00;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x0000A000;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x0000A400;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x0000A800;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;erase 0x0000AC00;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; load inputFile;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; reset;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;(You would think such contortions shouldn't be necessary, given the S-record file already contains addresses, so the elftosb tool already knows the flash address range that needs erasing. But apparently this hoop-jumping really is currently required. If the source for elftosb were available this might be a nice option to add.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quite exciting; it's working and I can progress on my project.&lt;/P&gt;&lt;P&gt;Frank.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.frankvh.com"&gt;frankvh.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Oct 2016 23:29:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614089#M159</guid>
      <dc:creator>frankvanhooft</dc:creator>
      <dc:date>2016-10-08T23:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting started: KBOOT MSC on KL25 questions</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614090#M160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this Frank. &lt;BR /&gt;I think I understand from your posting: the problem lies in the bootloader v2.0 usb-msc processing of SB format, yes?&lt;BR /&gt;Did you fix this or has NXP acknowledged and/or fixed the problem?&lt;BR /&gt;Thanks!&lt;BR /&gt;Best Regards, Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 22:46:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614090#M160</guid>
      <dc:creator>davenadler</dc:creator>
      <dc:date>2016-10-21T22:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Getting started: KBOOT MSC on KL25 questions</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614091#M161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nothing that I've heard. I'm just working around it as mentioned above. &lt;/P&gt;&lt;P&gt;Frank.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.frankvh.com"&gt;frankvh.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2016 04:31:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/Getting-started-KBOOT-MSC-on-KL25-questions/m-p/614091#M161</guid>
      <dc:creator>frankvanhooft</dc:creator>
      <dc:date>2016-10-22T04:31:49Z</dc:date>
    </item>
  </channel>
</rss>

