<?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中的主题 Re: elftosb example with USB-MSC under MCUBOOT</title>
    <link>https://community.nxp.com/t5/MCU-Bootloader/elftosb-example-with-USB-MSC-under-MCUBOOT/m-p/1072594#M1225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; &lt;A _jive_internal="true" data-avatarid="-1" data-content-finding="Community" data-userid="228011" data-username="davepfaltzgraff" href="https://community.nxp.com/people/davepfaltzgraff" rel="noopener noreferrer" target="_blank"&gt;&lt;STRONG style=": ; color: #0066cc; text-decoration: underline; "&gt;David Pfaltzgraff&lt;/STRONG&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Attached file is from the FRDM-K64 USB MSC, you can refer to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You need to use the KBOOT2.X, and use your app.bin, the bd file to generate the sb file at first.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You can refer to Kinetis Elftosb User's Guide.pdf in the SDK MCUBOOT doc, or the KBOOT2.0 doc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Modify the .bd file content as:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;sources &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="property macro token"&gt;# BIN File path&lt;/SPAN&gt;
 myBINFile &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"hello_world.bin"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

section &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  #&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Erase the internal flash
 erase &lt;SPAN class="number token"&gt;0x0000a000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0x00100000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 #&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Load BIN File to internal flash
 load myBINFile &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0xa000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 #&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Reset target&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
 reset&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Copy the bd file and the app.bin to the elftosb.exe location:&lt;/P&gt;&lt;P&gt;~\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\bin\Tools\elftosb\win&lt;/P&gt;&lt;P&gt;Input:elftosb –V –c FRDM-K64F.bd –o image.sb”&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="5.jpg"&gt;&lt;IMG alt="5.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/113402i229DA2E905670532/image-size/large?v=v2&amp;amp;px=999" title="5.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then, press the bootpin(PTB17) hold it and press the reset, you can find it from the bootloader, connect two usb cable to your board, you will find your board will be a FSL Loader disc, then drag your .sb file to it, you will find your app works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;You can try it on your side.&lt;/P&gt;&lt;P&gt;If you still have questions about it, please kindly let me know.&lt;/P&gt;&lt;P style="border: 0px currentColor; color: #51626f; font-size: 14px; background-color: #ffffff;"&gt;Kerry&lt;/P&gt;&lt;P style="border: 0px currentColor; color: #51626f; font-size: 14px; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px currentColor; color: #51626f; font-size: 14px; background-color: #ffffff;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="border: 0px currentColor; color: #51626f; font-size: 14px; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px currentColor; color: #51626f; font-size: 14px; background-color: #ffffff;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Nov 2020 14:41:27 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2020-11-02T14:41:27Z</dc:date>
    <item>
      <title>elftosb example with USB-MSC under MCUBOOT</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/elftosb-example-with-USB-MSC-under-MCUBOOT/m-p/1072593#M1224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to find a fairly simple example that would walk me through the steps from one of the&amp;nbsp; example programs through to loading the program on to an FRDM-K22F via the USB-MSC interface. At this point I have compiled and loaded MCUBOOT and have compiled the frdmk22f_led_demo_freedom_a000 demo to get the corresponding axf file. (I presume that the axf is compatible with elftosb.) Now, I need details to get me from there to the sb file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, the best I have been able to find is the short discussion by Gary Sinde towards the end of &lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/message/1110362?commentID=1110362#comment-1110362" title="https://community.nxp.com/message/1110362?commentID=1110362#comment-1110362"&gt;https://community.nxp.com/message/1110362?commentID=1110362#comment-1110362&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there something that is more appropriate for my situation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2020 16:53:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/elftosb-example-with-USB-MSC-under-MCUBOOT/m-p/1072593#M1224</guid>
      <dc:creator>davepfaltzgraff</dc:creator>
      <dc:date>2020-06-19T16:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: elftosb example with USB-MSC under MCUBOOT</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/elftosb-example-with-USB-MSC-under-MCUBOOT/m-p/1072594#M1225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; &lt;A _jive_internal="true" data-avatarid="-1" data-content-finding="Community" data-userid="228011" data-username="davepfaltzgraff" href="https://community.nxp.com/people/davepfaltzgraff" rel="noopener noreferrer" target="_blank"&gt;&lt;STRONG style=": ; color: #0066cc; text-decoration: underline; "&gt;David Pfaltzgraff&lt;/STRONG&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Attached file is from the FRDM-K64 USB MSC, you can refer to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You need to use the KBOOT2.X, and use your app.bin, the bd file to generate the sb file at first.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You can refer to Kinetis Elftosb User's Guide.pdf in the SDK MCUBOOT doc, or the KBOOT2.0 doc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Modify the .bd file content as:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;sources &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="property macro token"&gt;# BIN File path&lt;/SPAN&gt;
 myBINFile &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"hello_world.bin"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

section &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  #&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Erase the internal flash
 erase &lt;SPAN class="number token"&gt;0x0000a000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0x00100000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 #&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Load BIN File to internal flash
 load myBINFile &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0xa000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 #&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Reset target&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
 reset&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Copy the bd file and the app.bin to the elftosb.exe location:&lt;/P&gt;&lt;P&gt;~\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\bin\Tools\elftosb\win&lt;/P&gt;&lt;P&gt;Input:elftosb –V –c FRDM-K64F.bd –o image.sb”&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="5.jpg"&gt;&lt;IMG alt="5.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/113402i229DA2E905670532/image-size/large?v=v2&amp;amp;px=999" title="5.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then, press the bootpin(PTB17) hold it and press the reset, you can find it from the bootloader, connect two usb cable to your board, you will find your board will be a FSL Loader disc, then drag your .sb file to it, you will find your app works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;You can try it on your side.&lt;/P&gt;&lt;P&gt;If you still have questions about it, please kindly let me know.&lt;/P&gt;&lt;P style="border: 0px currentColor; color: #51626f; font-size: 14px; background-color: #ffffff;"&gt;Kerry&lt;/P&gt;&lt;P style="border: 0px currentColor; color: #51626f; font-size: 14px; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px currentColor; color: #51626f; font-size: 14px; background-color: #ffffff;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="border: 0px currentColor; color: #51626f; font-size: 14px; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px currentColor; color: #51626f; font-size: 14px; background-color: #ffffff;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:41:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/elftosb-example-with-USB-MSC-under-MCUBOOT/m-p/1072594#M1225</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2020-11-02T14:41:27Z</dc:date>
    </item>
  </channel>
</rss>

