I'm trying to build flashloader SDK example for imxrt 1170 and use it to replace the "ivt_flashloader.bin" provided by "security provision tool 3.1"
so far I have been able to:
1) build it in mcuexpresso, load it from jtag and make it communicate with blhost
2) use the created axf file to generate a bootable image from SPT, load it with SPT and connect to blhost after a reset.
I have not been able to find how to create a replacemente for "C:\nxp\MCUX_Provi_v3.1\bin\data\targets\MIMXRT1176\ivt_flashloader.bin".
All I got is a bin file that after the blhost load-image command will not start. I suppose I'm doing something wrong and generate an image that is not loaded into ram
Can someone provide instruction to create a replacement for "C:\nxp\MCUX_Provi_v3.1\bin\data\targets\MIMXRT1176\ivt_flashloader.bin"?
Solved! Go to Solution.
I was able to solve my probelm by:
options {
flags = 0x00;
startAddress = 0x2024ff00;
ivtOffset = 0x0000;
initialLoadSize = 0x2000;
# Note: This is required if the default entrypoint is not the Reset_Handler
# Please set the entryPointAddress to the base address of vector table
// entryPointAddress = 0x20002000;
}
sources {
elfFile = extern(0);
}
section (0)
{
}
I was able to solve my probelm by:
options {
flags = 0x00;
startAddress = 0x2024ff00;
ivtOffset = 0x0000;
initialLoadSize = 0x2000;
# Note: This is required if the default entrypoint is not the Reset_Handler
# Please set the entryPointAddress to the base address of vector table
// entryPointAddress = 0x20002000;
}
sources {
elfFile = extern(0);
}
section (0)
{
}
EDIT: message removed
Hello
Hope you are well. You can use elftosb tool to create that file. This post can be used as reference: https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Generating-a-Bootable-Image-for-the-RT1050/ta-p/...
First, you need to copy the file "imx-dtcm-unsigned.bd" from this sdk location "SDK_2_10_0_MIMXRT1170-EVK\middleware\mcu-boot\bin\Tools\bd_file\imxrt117x" into the location of the elftosb from the provision tool location.
Generate the s19 file and copy it into the previous location.
You can execute the following command to generate the bootable image: ".\elftosb.exe -f imx -V -c imx-dtcm-unsigned.bd -o ivt_flashloader.bin evkmimxrt1170_flashloader_cm7.s19"
Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar
Hi Omar,
thanks for your reply, I have tried your suggestion but it does not solve my problem.
I have just modified a little your instructions and I got a my_ivt-flashloader.bin that can be booted and executed.
this is the content of my-imx-dtcm-unsigned.bd (copied from the one created by provisioning tool)
options { flags = 0x00; startAddress = 0x2024e000; ivtOffset = 0x1000; initialLoadSize = 0x2000; entryPointAddress = 0x20250401; } sources { elfFile = extern(0); } section (0) { }
With those instructions I'm able to create my_ivt_flashloader.bin that can be written to imxrt1170 and then is able to boot after setting boot_mode[1:0] pins to 10 (internal boot) and performing a POR.
If I told MCU security provisioning tools generated script "write_image_win.bat" to use my_ivt_flashloader.bin it was not able to use it.
@echo ### Load FlashLoader ### call "%blhost%" %rom_connect% -j -- load-image "c:\test\my_ivt_flashloader.bin" if errorlevel 2 exit 2 @echo ### Waiting FlashLoader to be initialized for 3 seconds ### @echo ### Timeout wait value can be adjusted from Preferences ### setlocal EnableDelayedExpansion SET /A "timeout=3 + 1" ping -n !timeout! 127.0.0.1 >NUL endlocal @echo ### Check presence of FlashLoader ### call "%blhost%" %blhost_connect% -j -- get-property 7 0 if errorlevel 2 exit 2
The load-image command seems not able to start the downloaded flashloader
What I like to achieve is being able to replace the nxp original flashloader in the write_image_win.bat with my_ivt_flashloader.bin.
I was able to achieve the result with imxrt1060 without any problem, but it use different commands for uploading flashloader since it use sdphost with 2 commands:
instead the imxrt1170 use the blhost protocol and use a single command:
Any idea on how create a bin file that load-image command is able to load and then automatically run?
best regards,
Marco
EDIT: message removed