Hello,
I am attempting to port the KBOOT v1.2.0 to a K21F processor (MK21FN1M0AVLQ12). I have done this port before with the previous version of KBOOT successfully. It seems that the new version of KBOOT requires updated board specific CMSIS files, which I do not have. Are these files available yet for my processor, so that I can continue my port? Or should I just stick with KBOOT v1.1.0 for now?
Also, I am required to get USB working with the bootloader, and I noticed that there are board specific files for the usb_stack as well. Are there equivalents for the K21F? or should I just try to copy and modify the files from an existing processor? (I have been porting from the MK22F512 version of KBOOT).
Thank you,
Matt
Solved! Go to Solution.
Hi Matt,
I've attached the header file of MK21 which from the KSDK 1.2.0 (~\KSDK_1.2.0\platform\devices\MK21FA12).
Please refer to it for details.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Matt,
I'd highly recommend you to follow the steps of the porting by referring to the attachment.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Ping,
I have been following the porting steps in this document. The problem that I am running into is that I do not see any of the header files on the product page (K21_120 |Kinetis K21 120 MHz MCUs|Freescale ) for the K21F processor I have, as outlined in section 10.3.1. I have device header files for K21F that I used when porting from v1.1.0 of Kinetis Bootloader, but it seems that v1.2.0 code calls variables that have been either renamed or added since v1.1.0. I am just wondering if there are any updated device header files for the K21F that will work with v1.2.0?
Thanks,
Matt
Hi Matt,
I've attached the header file of MK21 which from the KSDK 1.2.0 (~\KSDK_1.2.0\platform\devices\MK21FA12).
Please refer to it for details.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you Ping! Those files did it! I was able to port from the K64 KBOOT code and use those files to get the bootloader up and running with USB. Also, the bootloader was successful in programming the device with my firmware as well.
Thanks again,
Matt
Hi Matt,
I'm glad to hear that you had already finished the porting working.
And I was wondering if you can share the modified demo, and it can help other guys a lot.
Thank you in advance.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Matt
As I mentioned before, KBOOT code for the K22 should run on a K21, so you can just build for the K22 and use the K22 headers.
The only thing to be aware of is that the K21 has some additional pin mux possibilities (although don't need to be used) - it also has additional peripherals but this is not an issue since they won't be used.
If you going to add more features and customise you can modify the K22 headers if needed, but the differences are very small.
Regards
Mark
Thanks Mark, I did end up trying the K22 code, it turns out that the flash configuration between K21 and K22 is different. I seemed to have remembered wrong, I wasn't using K22 to do the port before, I was using the K64 to do it. I tried the K64 KBOOT as is, and was able to get the USB to come up, but the programming did not end up working. However, with the files that Ping gave me, and a port of the K64 code instead, I was able to get everything up and running. I appreciate your help.
Thanks,
Matt
Matt
The K21F uses phrase programming and the K22F long word programming. This would explain why the programming part was not successful if using K22 Flash driver; I missed this due to the fact that it is automated in the solution that I use, so didn't "jump out" as an obvious difference.
Regards
Mark
Matt
I didn't find any (functional) differences between V1.1.0 and V1.2.0 nor between K21 and K22.
If your project's budget prefers to avoid any porting you can also get KBOOT (UART and USB) compatibility (plus more options such as USB-MSD composite or SD card loading in parallel) at the links below.
Regards
Mark
Kinetis: µTasker Kinetis support
K21: µTasker Kinetis TWR-K21D50M support / µTasker Kinetis TWR-K21F120M support
For the complete "out-of-the-box" Kinetis experience and faster time to market