Hello.
I have an I.MX RT1050 Evaluation Kit that I want to flash with the mfgtool and a binary from MCUxpresso. The flash memory I want to use is the QSPI Flash of the Kit and not the HyperFlash. By now I was only able to generate a flash-able boot image of the prebuild hello world project of the SDK but i couldn't build a binary that boots by myself.
I build a binary with checksum and the flash start address at 0x60002000. After that i used that binary to build a boot image with elftosb and followed the steps described in this document at chapter 4.2.
I used the "program_flexspinor_image_qspinor.bd" file that is already in the bd_file directory, i made a custom bd file like it is explained in the manual at chapter 4.2 and i used the bd file that is attached in this post. Everything with the flash start address at 0x60002000 and at 0x60000000 with the bin files and the afx files.
I also edited the "fsl_flexspi_nor_flash.c" file like it is described here.
I never got an error at flashing the RT1050 but my image didn't booted neither.
I think there are some Build Settings I missed to set properly or the bd files I used aren't correct.
Solved! Go to Solution.
I've manage to create a Boot Image that boots correctly. I figured out that the entry address in the boot image is wrong after the elftosb tool creates the IVT binary. In the ELF file the entry address is correct and points to the Reset Handler, the elftosb tool increments the Address by one.
I set the entry address manually in the "imx-flexspinor-normal-unsigned.bd" file by using "entryPointAddress = 0x600024B5;".
You can also try this tool, with this tool, You can flash bare image into various boot devices easily and don't need to care about headers (ivt, boot data...)
Hello Wigros,
i created a boot image of your attached binary files and the bd file in that folder and it didn't worked. There where no Debug print outs and no led was flashing. When i build the imx file with the command
elftosb.exe -f imx -V -c ../../bd_file/imx10xx/imx-flexspinor-normal-unsigned.bd -o ivt_flexspi_nor_hello_world.bin hello_world.bin
i got the warning "warning: Default entry point address 0 is used" but it also said the boot image was successfully created. When i used the mfgtool to download the image to the QSPI Flash everything works fine except that it was faster done than the image downloading with a working image before.
When i used the drag and drop method to download the files to the flash i had a "hello world" print out with the "hello_world" binary and a "ASDWASIMXRT EVK" print out at the "imxrt_evk_led_fast" binary but no flashing led if it should flash.
I attached the mfgtool log from the "imxrt_evk_led_fast" boot image.
Update:
I was able to build a binary with armgcc that can be flashed to the QSPI Flash with the DAPLink and drag and drop and that works. But I wasn't able to build a bootable image with the elftosb tool and flash it with the mfgtool.
Additional Update:
I analyzed the created elf file of the armgcc and the IAR IDE. Both build the exact same project. I came to the conclusion that the armgcc don't add an offset of 0x2000 to the start address of the Entry Function. So it would be interesting if the armgcc and the IAR IDE use different linker scripts or why the armgcc don't add the necessary offset of 0x2000 to the Entry Function Pointer. I will look further into this on Monday but maybe you can point me in the right direction if this behavior rings a bell.
I attached the "readelf -a" reports so you can comprehend the behavior.
I've manage to create a Boot Image that boots correctly. I figured out that the entry address in the boot image is wrong after the elftosb tool creates the IVT binary. In the ELF file the entry address is correct and points to the Reset Handler, the elftosb tool increments the Address by one.
I set the entry address manually in the "imx-flexspinor-normal-unsigned.bd" file by using "entryPointAddress = 0x600024B5;".