Not able to Drag-and-Drop with BIN Files
Hello,
I'm using the LPC55S69 (MCU-Link Hardware) as HIC which I've attempted to port to the MIMXRT1010-EVB as Target.
With the hardware and software and I can debug the target in IDE (MCUXpresso) and the drag-and-drop functionality works with HEX files.
When I try and program using BIN files I receive "FAIL.TXT : Transfer timeout".
My first thought is that it doesn't recognise the BIN files.
I'm not sure what I need to change in the code to resolve the issue.
Thought / Issues
- When I generate c_blob.c for flash_blob.c from "MIMXRT1011_QuadSPI_4KB_SEC.FLM" it generates the data below for "Verify":

When compiling, "0x120000003, // Verify" isn't a valid value. Should this be deleted or set to "0x00000000, // Verify"?
- When I generate c_blob.c for flash_blob.c from "MIMXRT1011_QuadSPI_4KB_SEC.FLM" it generates the data below for "sectors_info":

When compiling there are errors as "sector_info_t sectors_info" is expected. Should it be changed to as below:

- When populating "Target.c" I can find the information supplied with MIMXRT1011_QuadSPI_4KB_SEC.FLM as below:

Have I populated "Target.c" correctly or is this issue here:

(I ask as there's 3x RAM-Start addresses.)
Thanks for any help, I really appreciate it. Data.zip
- When I generate c_blob.c for flash_blob.c from "MIMXRT1011_QuadSPI_4KB_SEC.FLM" it generates the data below for "Verify": When compiling, "0x120000003, // Verify" isn't a valid value. Should this be deleted or set to "0x00000000, // Verify"?
Yes, that is correct.
- When I generate c_blob.c for flash_blob.c from "MIMXRT1011_QuadSPI_4KB_SEC.FLM" it generates the data below for "sectors_info": When compiling there are errors as "sector_info_t sectors_info" is expected.
tools/generate_flash_algo.py in main branch should generate sectors_info with the sector_info_t type.
- When populating "Target.c" I can find the information supplied with MIMXRT1011_QuadSPI_4KB_SEC.FLM as below: [...] (I ask as there's 3x RAM-Start addresses.)
The flash algo is using 0x20000000 adddress and other i.MXRT targets as well.
Have a look at validate_bin_nvic in source/family/freescale/target_reset_mimxrt.c. If the MIMXRT1011 also expects a "Flash Configuration Block" at the start of the .bin image, you should define DAPLINK_MIMXRT_TARGET macro for your board. Otherwise you should look at the initial stack pointer (first 4 bytes in .bin file) and check that it properly fits in the RAM region defined.
Hello Mattias, Thanks a lot, I'll look into each of the comments.
Cheers, Sam
Hello Mattias,
I've attempted to work through each of your suggestions:
-
You should define DAPLINK_MIMXRT_TARGET macro for your board From the start I attempted to define / call the macro in "mimxrt1010_evk_qspi.yaml"
I've attempted to call it in a header file etc. but the issue remains the same.
Am I defining "DAPLINK_MIMXRT_TARGET" incorrectly -
Fitting within defined RAM region
- With the OpenSDA supplied with the iMXRT1010-EVB the bin files work with drag and drop.
- I played with the memory maps in the bin and also checked that the code fits within the available RAM, that appears to be ok

- I've tried differently compiled bin files, same issue.
Any further ideas or suggestions?
Regards, Sam
- You should define DAPLINK_MIMXRT_TARGET macro for your board Am I defining "DAPLINK_MIMXRT_TARGET" incorrectly
That looks correct.
- Fitting within defined RAM region
You should add all RAM regions to ram_regions[] in target_device.
Does your .bin files start with 0xFCFB (to satisfy the test in validate_bin_nvic()?
I am not sure if there needs to be an else clause with the proper offset; there was a trick in #712 for MIMXRT1170-EVK for target_reset_mimxrt.c, which I ended up not including in #912.
Hallo Mathias
-
RAM Regions I extended the definition of the RAM regions to reflect my memory map:
Works without issue for HEX Files that are with this memory configuration. Changes to the memory map require an update to the target_device. I'm not sure why the other iMXRT only need to define one address (or perhaps they'll run into similar issues as myself --> change in memory map must be reflected in detail). -
BIN Files My BIN files were starting with an offset (generated from an SDK and MBDT).
After making the changes below I am successfully able to flash with BIN files.

Thanks a lot for the help and sorry for misspelling your name.
Regards, Sam