Hi friend,
My project uses KW38, but it doesn't need BLE. I want to use UART to upgrade firmware. 1: Which flashloader project should I use? I imported 3 SDK samples include flashloader, flashloader_loader and freedom_bootloader projects. The 3 projects have the same issues.
I used MCUXpresso IDE Binary Utilities to generate the hex file for the project frdmkw38_flexcan_interrupt_transfer. I burned the each flashloader on the evaluation board. I then used Teraterm to send the hex file to the evaluation board.
But the hex file will not be written to flash. (I can still use Teraterm to send the hex file to the evaluation board.)
2: How do I write the hex file to flash and rerun the new code?
Thank you in advance.
Ted Wu
Hello @tedwu1
Hope you are doing well.
You can use the Kinetis Flash Tool to load an application into your device (via UART) using your PC; KinetisFlashTool is a GUI wrapper of BLHOST, which is easy to use. You should find this tool inside KW38 SDK folder > middleware > mcu-boot > bin > Tools > KinetisFlashTool > win.
For more information on Kinetis Flash Tool and its usage, please consult the Kinetis Flash Tool User's Guide (inside mcu-boot > doc folder).
Hope this information helps.
Regards,
Eduardo.
My current project combines flexcan and dspi projects. What if I want to upgrade firmware using UART. I need to combine flashloader_loader into my project. is it right?
Thank you.
Ted Wu
Hi,
If you are currently using FlexCAN interface, perhaps you can find the App Note Using LIN or CAN Bus to Upgrade Image on KW36/38 useful for your development.
Could you please confirm if this information is helpful for you?
Regards,
Eduardo.
I just want to use UART to upgrade the firmware on the mass production line or when I need to upgrade the firmware. My project does not have BLE. I don't need to use CAN bud to upgrade the firmware, nor do I want to use SWD to flash the firmware. Do I need to merge my project with the flashloader project? If I don't need to upgrade the firmware, how can I set the flashloader timeout (e.g. 1 second) to let it run to the application?
Thank you very much.
Ted Wu
Hi,
flashloader and flashloader_loader can be used one time. You can try using freedom_bootloader to "merge" it with your application. From project > MKW38A4 > bootloader_config.h, bootloader should check address 0xA000 for the application vector table:
Frist, download this bootloader to your device. After this, modify your project code to relocate it at address 0xA000, build your application and flash it to your device. After flashing your application code, you should still be able to update the image of your device by using, for example, the Kinetis Flash Tool.
Regards,
Eduardo.