Issue in the size of bootable image in boot data while using Secure Provisioning Tool

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

Issue in the size of bootable image in boot data while using Secure Provisioning Tool

1,246 Views
gsbalajikrishnan
Contributor II

I am using iMXRT1160 board
I have built application image using MCUXpresso IDE
along with enabled boot header "XIP_BOOT_HEADER_ENABLE=1" which includes FCB, IVT, Boot data with application image.

gsbalajikrishnan_0-1657860727848.png

In Boot data, the first 4bytes for absolute address of the bootable image and second 4 bytes for size of the bootable image.

gsbalajikrishnan_1-1657860758344.png

While I am using MCUXpresso IDE in order to build bootable image, size of the bootable image as (0x01000000) 16MB that has been defined in boot data.

gsbalajikrishnan_2-1657861879604.png

gsbalajikrishnan_3-1657861915309.pnggsbalajikrishnan_4-1657861960152.png

Also, I have built Zephyr RTOS based MCUboot bootable image build by west, the image which contains the size of the bootable image as 16MB(0x01000000) in boot data

gsbalajikrishnan_5-1657862051991.png

zephyr based mcuboot that I flashed using jlink, image execute successfully when I reset the board.

But, In the case of MCUXpresso Secure Provisioning Tool, it generates the bootable image with the size of bootable image as (0x0000FF08) 64KB in boot data.

gsbalajikrishnan_6-1657862191496.png

If i use the image build by Secure Provisioning Tool, the image is not executing when I reset the board once flashed using jlink 

After, changing the size of bootable image as 16MB(01000000) in boot data build by SPT, the image is executing when I reset the board

Now, I would like to build bootable image with the size of flash image as 16MB(0x01000000) and must be added in boot data when I use Secure Provisioning Tool.

Is there any steps available in order to set size of the bootable image in Secure Provisioning Tool?

Kindly check and let me know.

 

Best Regards,

Balajikrishnan.G.S

 

0 Kudos
Reply
4 Replies

1,215 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
Firstly, after checking, the length is set to 0x1000000 in the SDK library, next, the SPT will set the length by calculating the raw image file.
Further, I use the iled_blinky demo for SPT testing, the image can boot up successfully even if the length is not 0x1000000.

jeremyzhou_2-1658109519189.png

Lastly, I'm curious about the way of removing the first 2000 bytes including (FCB,IVT,BD), did you do that via the text editor?
Maybe you can try my way to create the raw image file,
set XIP_BOOT_HEADER_ENABLE=0, then modify the memory configuration as the below shows, after that, rebuild the project to generate the raw file.

jeremyzhou_0-1658109457627.png

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

1,204 Views
gsbalajikrishnan
Contributor II

Thanks for your information,  that was helpful to understand the size of bootable image.

Best regards,

Balajikrishnan.G.S

1,239 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I think I need more information, firstly, can you share the two images, one is generated by building the MCUXpresso IDE, and another is generated by the SPT.
Further, I was wondering if you can illustrate the steps of generating the image via the SPT tool.
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

1,231 Views
gsbalajikrishnan
Contributor II

Hi,

Thank you for your response,

Here, I attached the image (.bin) which is generated by MCUXpresso IDE and also image(nopadding.bin)  which is generated by SPT tool. 

gsbalajikrishnan_0-1657965742596.png

Figure 1: Image Vector Table and Boot Data by MCUXpresso IDE

 

gsbalajikrishnan_2-1657965809824.png

Figure 2: Image Vector Table and Boot Data by SPT

The following steps that I did to build to bootable image via SPT Tool .

1. I created an image which is built by MCUXpresso IDE with enable XIP_ENABLE_BOOT_HEADER=1 , which contains FCB,IVT, BD, app.

2, Then, I removed first 2000 bytes including (FCB,IVT,BD), and  the raw application image has been provided as input in SPT tool.

The image has been built successfully, nopadding.bin is created including IVT,BD,DCD, Application,

1. I want to know why the size of the bootable image is different in boot data for both images 

2. Is there any script to include the size of bootable image in boot data while generating an image(nopadding.bin) via SPT ?

kindly check and let me know.

Best Regards,

Balajikrishnan.G.S

0 Kudos
Reply