Issue in FCB while generating an image via SPT tool

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

Issue in FCB while generating an image via SPT tool

1,065 Views
gsbalajikrishnan
Contributor II

Hi..

I am using iMXRT1160.

In MCUXpresso IDE, set XIP_BOOT_HEADER_ENABLE=0 then build the application image and provided binary image in SPT. then I built an image via SPT which generates nopadding.bin and I found that the SPT generates bootable image which includes (IVT, BD, Application), not including FCB during build.

Is there any way to change the settings of the tool in order to accommodate a bootable image that includes the FCB?

In Boot data, the size of bootable image which includes size of FCB during build?

gsbalajikrishnan_0-1658234559675.png

During write, I noticed that "Create Flash Configuration Block (FCB)". what does 0x3000 refer whether it is based on ITCM memory or something else?

gsbalajikrishnan_1-1658234574623.png

If I tried to build an image with enable XIP_BOOT_HEADER_ENABLE=1, then build an image which includes (FCB, IVT, BD, App)  in which the FCB starts from offset at 0x400 between (0x3000000 to 0x3000FFFF). the image is given below.

gsbalajikrishnan_2-1658235008990.png

In case of SPT,  Why the FCB is created at 0x3000 while writing via SPT?

Kindly let me know 

 

Best Regards,

Balajikrishnan.G.S

 

0 Kudos
Reply
5 Replies

1,054 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @gsbalajikrishnan ,

Please first read AN12238 which is very useful for you to understand what SPT is doing.

Section 4.4 explains what  nopadding.bin has. 

Section 4.5.2 explains how it generate FCB for flexSPI flash configure.

step 1:

blhost -t 5000 -p COM31,57600 -j -- fill-memory 0x2000 4 0xC0000007

blhost -t 5000 -p COM31,57600 -j -- configure-memory 9 0x2000

// ROM bootloader will generate a FCB base on the parameter 0xC0000007. Please see table 10-65 in RT1160 reference manual for more detail.

step 2:

blhost -t 5000 -p COM31,57600 -j -- fill-memory 0x3000 4 0xF000000F

blhost -t 5000 -p COM31,57600 -j -- configure-memory 9 0x3000

// program that FCB to 0x30000000

 

Regards,

Jing

0 Kudos
Reply

1,026 Views
gsbalajikrishnan
Contributor II

Hi @jingpan ,

Thanks for your information,

I understood the steps to configure and fill-memory for FCB.

But, still I am having doubt on programming that FCB to 0x30000000.

Is there any steps how to program that FCB to 0x30000000?


Best Regards,
Balajikrishnan.G.S

 

0 Kudos
Reply

1,018 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @gsbalajikrishnan ,

Flashloader will program FCB to 0x30000000 automatically when receiving the command "blhost -t 5000 -p COM31,57600 -j -- configure-memory 9 0x3000"

 

Regards,

jing

0 Kudos
Reply

998 Views
gsbalajikrishnan
Contributor II

Hi @jingpan ,

Thanks for your information,

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

Then, I created an image which is built by MCUXpresso IDE with disable XIP_ENABLE_BOOT_HEADER=0, give input in SPT and build & write nopadding.bin then I read FCB data from  0x30000400-0x30000600 (512 bytes). 

I observed some changes in FCB is created via SPT over FCB is created by MCUXpresso IDE.

In mem-config, from offset 0x480 to 0x580 (256 bytes) are assigned by lookup table which are not similar for both and from offset 0x5D0 to 0x5D3 (4 bytes) are assigned by Block size, 

gsbalajikrishnan_2-1659346962839.png

Fig 1 : lookup table in FCB via SPT

 

gsbalajikrishnan_3-1659347107817.png

Fig 2: lookup table in FCB via MCUXpresso IDE 

In Block size, 64KB in FCB via SPT and 256KB in FCB via MCUXpresso IDE.

What does Lookup table refer and its uses?

I want to know why the content of lookup table and block size are different in FCB by SPT when compare to FCB by MCUXpresso IDE

Is there any script available to modify the content of lookup table and block size while creating FCB via SPT.

Kindly suggest me where to refer.

 

Best Regards,

Balajikrishnan.G.S

 

 

 

 

 

0 Kudos
Reply

987 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @gsbalajikrishnan ,

The LUT provide by old SDK is too simple. It only contain a READ command. SPT can't use it to erase and program. So, you have to generate another one without FCB, then SPT can add it's own FCB head.

If you want to use your own LUT, you must fill the table with all the flash functions, include write, erase, write enable, etc. My suggestion is, you can  download SDK2.12.0. You'll find its LUT is full function already. You can use it to replace your simple one. Then SPT can also use the image with the FCB header.

 

Regards,

Jing

0 Kudos
Reply