Using sdphost and blhost tools to perform FW updates on MIMXRT1024

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using sdphost and blhost tools to perform FW updates on MIMXRT1024

Jump to solution
2,539 Views
eablan
Contributor I

We have designed a system using an NXP i.MX8M as the primary processor running Linux and a MIMXRT1024 as the secondary processor. We would like to do firmware updates using serial or USB, and I came across the mfgtool by NXP that uses the sdphost, and blhost tools to flash devices. Instead of having to write a secondary bootloader, this approach looks way more streamlined and utilizes the already written flashloader for the mimxrt1024. However to make this possible we will need the source code for sdphost, and blhost to cross compile to our Linux (Arm-based) i.MX8M. According to the blhost documentation from NXP it is possible to build for Linux (Arm-based). 


Screenshot 2022-11-17 160656.png

I followed advice from a previous post: Source-for-sdphost-and-blhost , but it does not contain the source code for the blhost from the SDK Builder even if you choose MCU Boot as an option. I have checked over and over again. Even the user in the post reported the source was not available for blhost from the SDK builder. On top of that the source code for sdphost is incomplete. I tried compiling the Visual Studio solution with what seems to be the source files from the SDK builder, but it is missing the blfwk source files as shown below. No such directory exists.


Screenshot 2022-11-17 161830.png

So my two questions are:

1.  Where can I find the full source code for blhost to build for Linux (Arm-based), and the full source for sdphost so I can cross compile to Linux (Arm-based)? 

2. Does this solution make sense for doing a FW update from an i.MX8M to an MIMXRT1024 using the sdphost tool and blhost tool? I understand  the BOOT_MODE[1:0] pins and BOOT_CFG[] pins on the MIMXRT1024 will have to be overidden and controlled by the i.MX8M processor, but this shouldn't be a problem.

Labels (1)
0 Kudos
1 Solution
2,439 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @eablan ,

Here is it.

 

Regards,

Jing

View solution in original post

0 Kudos
12 Replies
2,380 Views
anshulkhare
Contributor III

Hi @eablan ,did you get success in upgrading of Secondary processor MIMXRT1024 from primary Processor NXP i.MX8M .can you please share the steps for this.currently i am working on cross complication of blhost 2.6.7.Thanks in advance.Regards,Anshul

0 Kudos
2,368 Views
eablan
Contributor I

Anshul,

 

Yes I got it to work. For the actual steps check out my other post linked below. You will be using the ivt_flashloader.bin provided by NXP for SDK 2.12.1 for the MIMXRT1024, and must use the program addresses explained in the post to write the flashloader, and to jump to the flashloader application.

https://community.nxp.com/t5/i-MX-RT/Using-sdphost-and-blhost-tool-to-program-a-device-on-MIMXRT1024...

0 Kudos
2,357 Views
anshulkhare
Contributor III

Thanks @eablan 

i will follow the post.

Regards,

Anshul

0 Kudos
2,515 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @eablan ,

To the sdphost code for the RT1024, please find the following link to our github were you can find this information, please give a look into the readme file for the instructions.

https://github.com/NXPmicro/spsdk

To the blhost, download the blhost package from www.nxp.com (https://www.nxp.com/webapp/sps/download/license.jsp?colCode=blhost_2.6.2&appType=file2&DOWNLOAD_ID=n... and run 'make all' from the gcc directory.

I think the better way is to program bootloader in to flash, The chip can boot into flashloader after bootROM. Then if you have new application, use blhost to download new image. If there isn't updating, jump to current application. Thus, sdphost is not needed.

 

Regards,

Jing

0 Kudos
2,504 Views
eablan
Contributor I

1. The blhost application link you sent takes me to an acknowledgement window where I accept the terms, and then it gets stuck trying to download. It does not even initiate the download. I tried this on two different computers. One running windows chrome, and another running linux and mozilla firefox. It still doesn't download. Could this be fixed please? It would be greatly appreciated.

2. That does sound like a great way to attempt to do it. However there isn't much documentation on how to implement this. The only thing I could find was this document https://www.nxp.com/docs/en/application-note/AN12604.pdf , and it seems it requires a significant amount of work to implement read, and erase flash operations. Or is it more straightforward to where we don't have to do much extra work?

0 Kudos
2,483 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @eablan ,

Yes, I think we can focus on question2.

In fact, you can use the flashloader demo in sdk directly. It is a RAM base project. Compile the project and get .axf file. Using MCUBootUtility to download the file by click All-In-One Action. The tool will add header automatically. After that, the flashloader can work. You can use below command to connect to it.

blhost.exe -t 500000 -u 0x15a2,0x0073 -- get-property 11

https://github.com/JayHeng/NXP-MCUBootUtility

 

Regards,

Jing

0 Kudos
2,464 Views
eablan
Contributor I

Jing,

1. The link you sent for the blhost tool source code does not work. I need the source code in order to test if I can compile it to Linux ARM7 platform. I mentioned in the previous post the link you sent me sends me to a window to agree to the terms. I click agree, and it gets stuck attempting to retry the download. I've tried two different computers with different web browsers and I get the same behavior Could you please send me a working link for the blhost source code? It would be greatly appreciated as this is time sensitive. 

0 Kudos
2,479 Views
eablan
Contributor I

Jing,

I guess I'm a little confused. Does the flashloader demo in the SDK need to be modified to be used in this manner? Are all of the flexspi nor flash operations ready to go? I think the MCU Boot Utility can be helpful, but I'm not sure of what all has to be modified in the flashloader demo from the SDK to make it work. 

By make it work I mean: If I want to use the flashloader as a bootloader that lives in flash at 0x60000000 and that can jump to user application fw image, what code modifications of the flashloader project do I need to make? Is there an application note on this or another forum post I can reference?

0 Kudos
2,455 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @eablan ,

You can search blhost in www.nxp.com directly. 

The flashloader is RAM base. But with proper header, ROMboot can copy it RAM and then jump to it. It support blhost and of course can download your application to flash.

If you have different flash chip on board, you must modify flash related code. If you want the flashloader to jump to your application automatically, you should modify the code also.

 

Regards,

Jing

0 Kudos
2,452 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Please also refer to AN12604 for second bootloader.

 

Regards,

Jing

0 Kudos
2,445 Views
eablan
Contributor I

Ok Thanks Jing.

One thing that's strange is that the sdsdk contains blhost and spdhost tool among other tools. The blhost application link you sent me works for building the blhost application standalone. Is there something as well for spdhost tool? Just looking to build sdphost tool from source for arm linux

0 Kudos
2,440 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @eablan ,

Here is it.

 

Regards,

Jing

0 Kudos