pls share your REALTIMEEDGEUG.pdf, let me double check it
Thank you for your reply.
https://www.nxp.com/docs/en/user-guide/REALTIMEEDGEUG.pdf
3.8.2 RPMSG data communication (Page 81)
what your request is using PRMSG on imx8mp, right? if yes, pls refer to the steps as below
Replace [test].elf with the elf that you wanna to test.
You could check the elf file list: =>fatls mmc ${mmcdev}:1
In U-Boot Stage:
=>fatload mmc ${mmcdev}:1 ${loadaddr} [test].bin
=>cp.b ${loadaddr} 0x7e0000 ${filesize}
=>bootaux 0x7e0000 0
=>run prepare_mcore
=> setenv fdtfile [imx8mn-evk]-rpmsg.dtb
=> boot
In Kernel Stage:
If you already booted Mcore in U-Boot stage, you need first stop the m4 using remoteproc, before you start the new firwmare.
echo stop > /sys/devices/platform/[imx8mp-cm7]/remoteproc/remoteproc0/state; #if you not start Mcore in U-Boot stage, no need execute this in the begining.
echo imx8mp_m7_TCM_rpmsg_lite_str_echo_rtos.elf > /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/firmware
echo start > /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/state
After start, you could execute stop again, and assign a new elf firmware.
You could not assign a new firwmare when state is in start.
The i.MX8MN/P, the elf file list:
imx8mp_m7_TCM_hello_world.elf
imx8mp_m7_TCM_rpmsg_lite_pingpong_rtos_linux_remote.elf
imx8mp_m7_TCM_rpmsg_lite_str_echo_rtos.elf
imx8mp_m7_TCM_sai_low_power_audio.elf
The path for remoteproc on i.MX8MP:
/sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/
Remoteprc: hello world demo not have resource table:
- For i.MX8MP LPDDR4-EVK: #mw 0x550ff000 0 4 to clear garbage resource table area
Thank you for your complete reply.
I learned lots of things from your advice.
You are right. Everything works fine with "imx8mp-evk-rpmsg.dtb" device tree.
Just one note, ".elf" files are in /lib/firmware directory.
I tried a lot of way to create a device tree to support 8M buffer but non of them worked. When I flash CM7 with U-Boot, Linux stopped during booting and when I load the CM7 in Linux I received the following error.
root@imx8mp-lpddr4-evk:~# echo stop > /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/state
-sh: echo: write error: Invalid argument
root@imx8mp-lpddr4-evk:~# echo imx8mp_m7_TCM_rpmsg_lite_str_echo_rtos.elf > /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/firmware
root@imx8mp-lpddr4-evk:~# echo start > /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/state
[ 50.778577] remoteproc remoteproc0: powering up imx-rproc
[ 50.781306] remoteproc remoteproc0: Booting fw image imx8mp_m7_TCM_rpmsg_lite_str_echo_rtos.elf, size 164408
[ 50.781911] remoteproc remoteproc0: Registered carveout doesn't fit da request
[ 50.781924] rproc-virtio: probe of rproc-virtio.2.auto failed with error -12
root@imx8mp-lpddr4-evk:~# [ 51.295572] remoteproc remoteproc0: remote processor imx-rproc is now up
Based on imx8mm-evk-rpmsg-8m-buf.dts, What I have modified in imx8mp-evk-rpmsg.dts was
Again Thank you very much for your help.
did you want to run on the DDR? pls refer to the patch as below