Using sdphost and blhost tool to program a device on MIMXRT1024-EVK

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

Using sdphost and blhost tool to program a device on MIMXRT1024-EVK

Jump to solution
3,045 Views
eablan
Contributor I

I've been using a MIMXRT1024-EVK board, and the information provided in this post mimxrt1024-EVK-flash-and-boot . I downloaded the SDK for MIMXRT1024-EVK and MCU Boot middleware. I noticed I have the execulate for the sdphost, but it's missing the executable for blhost (not found in any directory). I ended up finding a version of blhost from the Flashloader_RT1050_1.1 example. The version of blhost from the example is shown below:
Screenshot 2022-11-18 135333.png

I follow the steps present in the post mimxrt1024-EVK-flash-and-boot  also setup my dip switches for serial download (SW8-3 and SW8-4). The exact commands from the post say to run these commands

Screenshot 2022-11-18 135702.png

I get the following output from my powershell indicating I have been able to successfully program the ivt_flashloader.bin that came from the MIMXRT1024-EVK SDK builder using the sdphost.exe from the SDK Builder:

Screenshot 2022-11-18 140107.png

The next steps from the post mimxrt1024-EVK-flash-and-boot say to run the following commands for blhost:

Screenshot 2022-11-18 140811.png

I had to run the blhost from the Flashloader_RT1050_1.1 example since it wasn't present in the MIMXRT1024 as explained earlier. The following is the error I get from blhost. I kept my SW8 dip switches for serial download, and did not reset the board:
Screenshot 2022-11-18 141437.png

It seems to time out when running the blhost command. I verified the vid and pid are from the NXP MIMXRT1024-EK board.


I guess my question is why can I not communicate with the flashloader???
1. Is it because the blhost tool is from Flashloader_RT1050_1.1 example, and not the MIMXRT1024-EVK SDK Builder? The SDK builder does not come with blhost.exe tool, so where do I get that blhost.exe ?

2. Is it because the blhost version I'm running is too old? version 2.1.0. Where do I get the latest?

3. Is it the flashloader I am using? I'm using the ivt_flashloader.bin from the MIMXRT1024-EVK SDK builder so it should be the correct one.

Any help would be greatly appreciated. Thank you

Labels (1)
0 Kudos
Reply
1 Solution
2,992 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @eablan ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
The below command is wrong.

jeremyzhou_0-1669087148229.png

The ivt_flash loader.bin should be written to 0x20208000 instead of 0x20000000, further, the jump to 0x20208400 instead of 0x20000400.

jeremyzhou_1-1669087171250.png

Have a great day,
TIC

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
7 Replies
2,993 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @eablan ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
The below command is wrong.

jeremyzhou_0-1669087148229.png

The ivt_flash loader.bin should be written to 0x20208000 instead of 0x20000000, further, the jump to 0x20208400 instead of 0x20000400.

jeremyzhou_1-1669087171250.png

Have a great day,
TIC

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

0 Kudos
Reply
2,965 Views
eablan
Contributor I

Jeremy,

Thanks for the fast reply.

1. Where do you find the start address of the ivt_flashloader.bin, and the jump address? I could not find it anywhere in the MIMXRT1024-EVK SDK builder? You showed a screen shot of where it is in memory, but how would I find this out on my own?

I have correctly gotten the ivt_flashloader.bin on the device using your solution, but now attempting to use blhost tool I have several questions regarding getting a user application bin file flashed to the internal  4MB flash (Winbond W25Q32JV). I have looked at some other examples, and it seems I need to run the following commands

./blhost -u 0x15A2,0x0073 -- fill-memory 0x20208400 4 0xc0100207

./blhost -u 0x15A2,0x0073 -- configure-memory 9 0x20208400

./blhost -u 0x15A2,0x0073 -t 100000 -- flash-erase-region 0x60000000 0x168188 9

./blhost -u 0x15A2,0x0073 -t 100000 -- write-memory 0x60000000 .\evkmimxrt1024_hello_world.bin 9

2. For fill-memory configure-memory how do I know the address in RAM is supposed to be 0x20208400? I just guessed since that was where we jumped to from the sdphost in DTCM RAM. But how do we know for sure what the right address is supposed to be?

3. Is the FNORCB 0xC0100207 in the fill-memory command correct for the internal  4MB flash (Winbond W25Q32JV)?

4. Besides power cycling the MIMXRT1024-EVK and moving the SW8 dip switches to FlexSPI boot (internal boot) after successfully flashing my user application bin file is there anything else I need to do? I assume after this step my user application FW image is written in to flash and will always boot from here as long as the SW8 dip switches stay on internal boot

0 Kudos
Reply
2,949 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @eablan ,
Thanks for your reply
1) The screenshot is a snap t of the ivt_flash loader.bin, I can parse the IVT struct to find out the address of the application that should be resided.

jeremyzhou_0-1669257746348.png


2) For fill-memory & configure-memory how do I know the address in RAM is supposed to be 0x20208400? I just guessed since that was where we jumped to from the sdp host in DTCM RAM. But how do we know for sure what the right address is supposed to be?
-- The address is up to you, you can use other RAM space to store the commands.
3) Is the FNORCB 0xC0100207 in the fill-memory command correct for the internal 4MB flash (Winbond W25Q32JV)?
-- Please use the 0xC0000007.
4) No, there are no other things need to do.
BR,

Jeremy
Have a great day,
TIC

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

0 Kudos
Reply
3,027 Views
jay_heng
NXP Employee
NXP Employee

1. the blhost tool from Flashloader_RT1050_1.1 package can be used for your RT1024 case, it is common tool.

2. Your issue has nothing to do with the blhost version

3. it is not flashloader issue, but blhost arg issue. blhost tool always use 0x15a2,0x0073 as usb id, please check you id setting in your command.

3,010 Views
Gmug
Contributor I

 Hi I'm sorry I'm not trying to hijack your post but I am desperately trying to find the data sheet for the freescale semi conductor sc900564afp if possible my email is steveburch318@yahoo.com

0 Kudos
Reply
3,015 Views
eablan
Contributor I

I attempted to use the 0x15a2,0x0073 vid and pid, but it does not work. Below is a screenshot of that vid and pid using the default you mentioned, and checked the windows device manager and 0x15a2,0x0073 does not show up as a vid and pid on the computer after running sdphost to program the ivt_flashloader.bin

Screenshot 2022-11-21 105834.png

1. Is the issue where in memory I am flashing the ivt_flashloader.bin? It's currently being written into DTCM.

2. Is it that the ivt_flashloader.bin is not getting flashed correctly by the sdphost tool? Is the jump address correct? This is the output:
Screenshot 2022-11-18 140107.png

3. I'm keeping the SW8 dip position for serial download the whole time, and not resetting power or resetting the micro. Is there a jumper I need to change around on the MIMXRT1024-EVK that I am missing?

0 Kudos
Reply
2,993 Views
jay_heng
NXP Employee
NXP Employee

You cannot load ivt_flashloader.bin to any dest address as you want, this bin should be loaded to where it is linked in project.

For your case, you should load it to 0x20208000

-- write-file 0x20208000 ivt_flashloader.bin

-- jump-address 0x20208400