I would like to find a fairly simple example that would walk me through the steps from one of the 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.
So far, the best I have been able to find is the short discussion by Gary Sinde towards the end of https://community.nxp.com/message/1110362?commentID=1110362#comment-1110362
Is there something that is more appropriate for my situation?
Thanks, Dave
Attached file is from the FRDM-K64 USB MSC, you can refer to it.
You need to use the KBOOT2.X, and use your app.bin, the bd file to generate the sb file at first.
You can refer to Kinetis Elftosb User's Guide.pdf in the SDK MCUBOOT doc, or the KBOOT2.0 doc.
Modify the .bd file content as:
sources {
# BIN File path
myBINFile = "hello_world.bin";
}
section (0) {
#1. Erase the internal flash
erase 0x0000a000..0x00100000;
#2. Load BIN File to internal flash
load myBINFile > 0xa000;
#3. Reset target.
reset;
}
Copy the bd file and the app.bin to the elftosb.exe location:
~\NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\bin\Tools\elftosb\win
Input:elftosb –V –c FRDM-K64F.bd –o image.sb”
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.
Wish it helps you!
You can try it on your side.
If you still have questions about it, please kindly let me know.
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------