i.MX6SoloX and i.MX7D SoC contain embedded Cortex-M4 core. In a common use-case, this core runs a firmware loaded by u-boot bootloader. If you however want to debug your application for the Cortex-M4 core, you may need to reload the firmware in the secondary core without restarting Linux running on the Cortex-A core. For this reason, a tool was created: imx-m4fwloader.
The project is released as open source under GPL-2.0 licence here: GitHub - NXPmicro/imx-m4fwloader: Tool for loading firmware to M4 core on i.MX6SX and 7D
I hope this tool will help to bring up faster your application for i.MX6SoloX and i.MX7D SoC!
source /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi$CC m4fwloader.c -o m4fwloader./m4fwloader myapp.bin 0x00910000./m4fwloader kick 0m4fwloader [filename.bin] [0xLOADADDR] [--verbose] # loads new firmwarem4fwloader stop # holds the auxiliary core in resetm4fwloader start # releases the auxiliary core from resetm4fwloader kick [n] # triggers interrupt on RPMsg virtqueue nI can't get this utility to work on an i.mx7. Could you help me out? I've started a forum post here: https://community.nxp.com/message/936211
This is maybe an obvious question, but could you confirm that this tool runs on Linux on Cortex A core?
I've forked out from original, and did bug fixes to it. (It really wouldn't work at all without it. )
Find fork here: GitHub - dry-75/imx-m4fwloader: Tool for loading firmware to M4 core on i.MX6SX and 7D
Tested on what I work with now - iMX7D. OCRAM and TCM memory.
Thank you for the tool.
Updated by branch as per iMX7 DRM 2018 update and omissions, as per discussion here (and my support request ticket ..)