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.
Solved! Go to Solution.
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.
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.
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.
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).
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.
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.
Hi @marek-trmac
Thank you for your response. I think I have found the solution.