Goodmorning to all,
I'm developing code with the demo board evk-mxrt1064.
I've recently succeded, thank to a support ticket, to create an ota flashloader for imxrt1064 processor. This flashloader is stored in ROM memory and at power on, it listens for blhost commands coming from PC via USB HID interface. If no commands are sent, after a while, the resident application starts executing.
For our customers, the easiest way to update the firmware consists of using a USB pen drive to connect directly to the board; in other words, the board behaves as a USB Host MSD and copy the application code in ROM memory.
Reading the documentation, it states that the USB Host MSD is not possible. What I don't understand exactly is: why? In my opinion, it shouldn't be impossible to modify the flashloader, adding the USB Host MSD capability, and then, if a valid application is found inside the USB pen drive, erase the board ROM memory and subsequently write the new executable application.
Do any of you succeded to do something like that? Thank you.
已解决! 转到解答。
Hi
The binary that you are referring to is a MSD-device loader but the uTasker project supports both device and host. See pages 24 and 25 of https://www.utasker.com/docs/uTasker/uTaskerSerialLoader.pdf
For a flow diagram of the USB-MSD host (pen driver) loader see pages 31 and 32:
- when the board boots it checks to see whether there is a pen drive inserted. If not it will start an existing application after a short delay.
- if a pen drive is found a new firmware file is searched for (in configurable directory and with configurable name, including wildcard names)
- if the file is a valid file (with valid credentials) and the firmware is not the same as the already loaded firmware the existing firmware in Flash is deleted and the new one copied there. After the copy the programmed code is again checked and, optionally, the file on the pen drive deleted, followed by starting the new application.
- Optionally the file on the pen drive can be AES256 encrypted and is decrypted when copying to the internal Flash.
The i.MX RT parts with two HS USB interfaces can be configured to have a USB-MSD device loader on the device interface and a USB-MSD host (pen drive) loader on the host one.
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or product development requirements
Hi
USB memory stick loading (including AES256 secured images) is standard in the uTasker loader concept (compatible operation on all i.MX RT 10xx parts and including the 1064):
See chapters 8 and 12
of
https://www.utasker.com/docs/uTasker/uTaskerSerialLoader.pdf
for full details and flow diagram of this form of loading (it works the same from SD cards too).
General documents and video guides:
- i.MX RT 1064: https://www.utasker.com/iMX/RT1064.html
- Boot loader concept including XiP on-the-fly decryption, clone protection or AES256 protected RAM execution.
-- Boot Loader concept flow chart: https://www.utasker.com/docs/iMX/Loader.pdf and usage reference https://www.utasker.com/docs/iMX/uTaskerLoader_TestDrive.pdf
-- Serial Loader features: https://www.utasker.com/docs/uTasker/uTaskerSerialLoader.pdf
-- Building the loader with MCUXpress: https://www.utasker.com/docs/iMX/MCUXpresso.pdf (and video guide https://youtu.be/p_eUGo6GypY ) - the guide document explains how to use with any application (eg. SDK) and to enabling its operation with On-The-Fly decryption in 5 minutes
-- Building the loader with IAR: https://www.utasker.com/docs/iMX/IAR.pdf (and video guide https://youtu.be/XPCwVndP99s )
-- Building the loader with VisualStudio and GCC: https://www.utasker.com/docs/iMX/GCC.pdf (and video guide https://youtu.be/0UzLLSXABK8 )
Video Guide to encrypting NXP SDK examples to run from XiP memory using on-the-fly decryption and uploading with the µTasker loader: https://www.youtube.com/watch?v=5iT7KP691ls&list=PLWKlVb_MqDQEOCnsNOJO8gd3jDCwiyKKe&index=10
Video Guide to encrypting NXP SDK examples to run at optimal speed in internal RAM and uploading with the µTasker loader:
https://www.youtube.com/watch?v=fnfLQ-nbscI&list=PLWKlVb_MqDQEOCnsNOJO8gd3jDCwiyKKe&index=11
Video Guide for Embedded Artist OEM Module for i.MX RT 1062 showing precise secured application operation analysis: https://youtu.be/o7hQbOqhJoc
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or product development requirements
Hello,
thank you for your links about uTasker.
Concerning the available boot modes for imxRT1064:
- USB-MSD drag-and-drop onto the external hard drive that appears when the processor's USB is connected to a host PC
- KBOOT-HID (compatible with the NXP protocol and loading tools, such as KinetisFlashTool) via USB-HID
- KBOOT-UART (connected at 57'600Baud on the board's VCOM UART)
There isn't the one that we are looking for. When I talk about USB-MSD, I mean that:
With the USB-MSD offered by uTasker, instead, the board itself behaves like a USB pen drive and with a PC connected, it's possible to drag and drop the new executable in the folder that appears once the board is connected to PC.
Sound strange to me that no one has thought to make something like that.
Hi
The binary that you are referring to is a MSD-device loader but the uTasker project supports both device and host. See pages 24 and 25 of https://www.utasker.com/docs/uTasker/uTaskerSerialLoader.pdf
For a flow diagram of the USB-MSD host (pen driver) loader see pages 31 and 32:
- when the board boots it checks to see whether there is a pen drive inserted. If not it will start an existing application after a short delay.
- if a pen drive is found a new firmware file is searched for (in configurable directory and with configurable name, including wildcard names)
- if the file is a valid file (with valid credentials) and the firmware is not the same as the already loaded firmware the existing firmware in Flash is deleted and the new one copied there. After the copy the programmed code is again checked and, optionally, the file on the pen drive deleted, followed by starting the new application.
- Optionally the file on the pen drive can be AES256 encrypted and is decrypted when copying to the internal Flash.
The i.MX RT parts with two HS USB interfaces can be configured to have a USB-MSD device loader on the device interface and a USB-MSD host (pen drive) loader on the host one.
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or product development requirements