I want to port imx-m4fwloader to support imx8m mini board, but I have some issues.
The imx-m4fwloader is downloaded from GitHub - NXPmicro/imx-m4fwloader: Tool for loading firmware to M4 core on i.MX6SX and 7D ,and I modify it to adapt imx8m mini board.
The modified code m4fwloader.c is in the attachment.
After I compile imx-m4fwloader, I use it in the Linux shell:
root@imx8mmevk:~# m4fwloader /home/root/hello_world.bin 0x7e0000 --verbose
LoadAddr is: 7E0000
Will stop CPU now...
STOP - before (0x3039000C): 0x000000AB
STOP - after (0x3039000C): 0x000000AB
Will ungate M4 clock source...
i.MX8MM specific function for M4 clock enabling!
CCM_ANALOG_PLL_400 (0x30360104): 0x8AAAAA00
CCM_ANALOG_PLL_480 (0x30360104): 0x8AA6AA00
CCM1_CCGR1 (0x303809D0): 0x00000002
CCM1_CCGR1 (0x303809D0): 0x00000003
Will load M4 firmware...
It hangs on and the shell is died. No debug message outputs.
There is no way to bring up the board except reboot.
Can you take a look m4fwloader.c in the attachment and help me fix this?