Hello, I am using the MIMXRT1061CVL5B micro-controller with an external 8MB nor-flash. For production, I want to use an external flasher to program the controller without a PC, for this I try to use the SEGGER Flasher Compact which is supposed to be supporting the micro-controller. When I program the MC using the flasher either from the PC using the J-Flash GUI or directly from the flasher after uploading everything to the flasher, the process is always completed successfully but the program never runs. I tried the same process on a different micro-controller with an internal flash and it works correctly.
When I program the MC either from IAR or using the MfgTool everything is fine and the program runs correctly.
My question is, is there any guidelines or documentation that clarify how to program the i.MXRT MCs using a flasher? or can anyone help be to solve this?
Here are my configurations (linker file attached):
XIP_EXTERNAL_FLASH=1
XIP_BOOT_HEADER_ENABLE=0 -- also tried setting this to 1
XIP_BOOT_HEADER_DCD_ENABLE=0 -- also tried setting this to 1
@CarlosGarabito @jay_heng
Hello all,
after a bit of investigation, I know now what is happening but I still cannot directly fix it. What exactly happens is that the .srec file generated from IAR doesn't contain the boot header, ivt, or boot data it only contains the program starting from address 0x60002000. Despite these sections being placed in the linker file, in the map file it says that there are no sections that match the pattern (please see below).
So, now my question is how place the boot stuff (header, ivt, data, and dcd in the .srec file)?
Linker configurations:
define exported symbol m_boot_hdr_conf_start = 0x60000000;
define symbol m_boot_hdr_ivt_start = 0x60001000;
define symbol m_boot_hdr_boot_data_start = 0x60001020;
define symbol m_boot_hdr_dcd_data_start = 0x60001030;
place at address mem:m_boot_hdr_conf_start { section .boot_hdr.conf };
place at address mem:m_boot_hdr_ivt_start { section .boot_hdr.ivt };
place at address mem:m_boot_hdr_boot_data_start { readonly section .boot_hdr.boot_data };
place at address mem:m_boot_hdr_dcd_data_start { readonly section .boot_hdr.dcd_data };
In .map file:
No sections matched the following patterns:
ro section .boot_hdr.boot_data in "A3"
ro section .boot_hdr.dcd_data in "A4"
section .boot_hdr.conf in "A1"
section .boot_hdr.ivt in "A2"
One more thing, I am using a hardware library and linking it to the application, I checked the .map file and the related files are not placed at all in the library module, is that because they were never included in the application?
These are the missed files, evkbmimxrt1060_flexspi_nor_config.o, fsl_flexspi_nor_boot.o, and dcd.o
and therefore the boot information is not included in the .srec file
hi @Lukaz you can use srec-cat, as you can see on this blog https://mcuoneclipse.com/2016/02/26/merging-s19-files/
Hi Carlos,
thanks for the reply, this option is not so practical because the boot data would change every time the program changes. Also in the examples for the evaluation board when I choose the nor-flash configuration, the .srec file includes all boot information (boot-device configurations, boot data, etc.) and that is what I am trying to achieve.
Thanks in advance
Well, on MCUXpresso, you can modify the position where to store the data in the memory
Hi @Lukaz you can check if this help you with a flasher as you want https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/i-MXRT-Production-tool-RT-Flash-v1-0-0-is-releas...
have a good day