About build_image_win.bat issue

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

About build_image_win.bat issue

Jump to solution
1,348 Views
Omar_hong
Contributor IV

Hi NXP,

I used the build_image_win.bat generated by SPT to create an encrypted bin file. However, when using different S19 files (firmware with different starting addresses, e.g., 0x60041000 &0x60002000 ), the encrypted content is placed incorrectly.

First , I used an S19 file with a starting address of 0x60002000 to generate an encrypted bin file with SPT, and the encrypted content was correct. Using this setting, I generated build_image_win.bat.

When I used another S19 file with a starting address of 0x60041000 to generate an encrypted bin file with build_image_win.bat, the encrypted content was misplaced to 0x60002000 (it should be 0x60041000).

PS. Both S19 files have the same name. If I directly use SPT to generate the encrypted bin file, there is no such issue.

0 Kudos
Reply
1 Solution
1,308 Views
marek-trmac
NXP Employee
NXP Employee

Hi Omar,

I have compared your directories, and you have different BD file in each folder (I did no compare all the files as this is not my job). I try to repeat my previous response clearly: generated files including build_image_win.bat are not designed to handle all images. It is wrong to use the workspace created for one image to build the different image. I recommend to use "securep build" CLI command that will update the build script and all configuration files. 

Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button

View solution in original post

4 Replies
1,336 Views
marek-trmac
NXP Employee
NXP Employee

Hi Omar,

I'd recommend to create two workspaces for two different images, build the both images and then compare the workspaces (by file content). I suppose there will be changes in other configuration files or may be some parameters in build scripts will be different.

If you do any significant changes in your application, it is recommended to always re-generate the build script. Please note, the build script can be also updated on command line using "securep build" command.

Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button
0 Kudos
Reply
1,316 Views
Omar_hong
Contributor IV

Hi @marek-trmac 


I have tried this before, but it still didn't work. I created the following example:

The main difference is in ..\configs\write_parameters.json.

Omar_hong_0-1737616039663.png

However, even after modifying the differences, the issue remains unresolved.

Both work environments use the same project (evkmimxrt1010_flexspi_nor_polling_transfer), with the only difference on image start address (0x60010000 & 0x60020000).

 

  10000_raw_data ----------(image start address 0x60010000 .axf .s19 .bin)
  20000_raw_data---------- (image start address 0x60020000 .axf .s19 .bin)
  secure_provisioning10000 -------SPT workspace for 0x60010000
  secure_provisioning20000 ------ SPT workspace for 0x60020000
 
You can place the .s19 raw data into the SPT workspace and then execute build_image_win.bat.
 
 

Here are my test steps: 

STEP 1:

Use SPT (secure_provisioning20000) to generate build_image_win.bat for the starting position 0x60020000 .s19 file.

Use SPT (secure_provisioning10000) to generate build_image_win.bat for the starting position 0x60010000 .s19 file.

The bootable images generated directly by SPT are all correct.

 

STEP 2:

Apply the .s19 file with the starting address 0x60010000 to the secure_provisioning20000 build_image_win.bat.
Apply the .s19 file with the starting address 0x60020000 to the secure_provisioning10000 build_image_win.bat.

The generated bootable images all have misplaced issues.

 

Omar_hong_1-1737616062390.png

 

0 Kudos
Reply
1,309 Views
marek-trmac
NXP Employee
NXP Employee

Hi Omar,

I have compared your directories, and you have different BD file in each folder (I did no compare all the files as this is not my job). I try to repeat my previous response clearly: generated files including build_image_win.bat are not designed to handle all images. It is wrong to use the workspace created for one image to build the different image. I recommend to use "securep build" CLI command that will update the build script and all configuration files. 

Regards,
Marek


NOTE: If you find the answer useful, kindly click on [ACCEPT AS SOLUTION] button
1,304 Views
Omar_hong
Contributor IV

Hi @marek-trmac 

   Thank you for your response. I think I have found the solution.

0 Kudos
Reply