Cortex image into iMX8M Plus and iMX8MQ custom board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cortex image into iMX8M Plus and iMX8MQ custom board

606 Views
manjanna2001
Contributor I

Hello Sir,

Greetings. I am doing thesis on some robotics and we are using iMX controller. We would use both Cortex controller and Cortex A53 (later) - but now we are looking at only cortex M image.

Sir we have both iMX8M plus board (which my dept has purchased) for quick evaluation and iMX8MQ board being designed - from hardware team.

Currently we are trying to put our cortex M7 code into NAND flash of iMX 8M Plus board. Can one of forum member can please help us to let me know how to do that - basically I want to prepare the uboot image for iMX8Plus and then add CortexM7.bin file and flash it to NAND flash. We need iMX to copy the CortexM7.bin to ram and run from there. Later we plan to do the same procedure of iMX8MQ custom board (it has cortex M4).

Please help.

Greetings,

Manjunath Tripathi.

0 Kudos
Reply
3 Replies

567 Views
manjanna2001
Contributor I

Hello Zhiming,

Thanks sir. But currently we are planning to use NAND flash only. Though iMX8M plus has eMMC - we don't want to use it as in the final board there will not be eMMC.Also our team has done booting cortex image from eMMC (same procedure as you mentioned).

Currently our requirement is basically

a. Prepare the uboot image for iMX8Plus

b. add CortexM7.bin file 

c. flash it to NAND flash. 

d. What is the change we need to make in uboot - which now runs from NAND, to copy the CortexM7.bin to ram and run from there?

Later we plan to do the same procedure of iMX8MQ custom board (it has cortex M4).

Thanks sir,

Manjunath Tripathi

0 Kudos
Reply

474 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

1. If you can use linux, you can write it to some of partition of nand and then reboot the board, read it from nand partition.

2. Pad it with bootloader, you need  to modify the imx-mkimage makefile to combine it with bootloader and read it in uboot console.

https://github.com/nxp-imx/imx-mkimage/blob/lf-6.12.3_1.0.0/iMX8M/soc.mak

Best Regards,
Zhiming

0 Kudos
Reply

579 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

To put m7 image into emmc/sdcard, you can copy it to run/media/boot-mmcblkXp1/ in Linux


To start M7 image from uboot, these command will load binary from emmc/sdcard

setenv m7image 'rpmsg_lite_pingpong_rtos_linux_remote.bin'
setenv load_m7image 'fatload mmc ${mmcdev}:1 0x48000000 ${m7image}; cp.b 0x48000000 0x7e0000 0x20000;'
setenv m7boot 'run prepare_mcore; run load_m7image; bootaux 0x7e0000'
run m7boot

 

To start M7 elf from Linux:

Uboot:

setenv fdtfile imx8mp-evk-rpmsg.dtb
saveenv
run prepare_mcore

Linux:

echo -n /root/rpmsg_lite_pingpong_rtos_linux_remote.elf > /sys/class/remoteproc/remoteproc0/firmware
echo start > /sys/class/remoteproc/remoteproc0/state



Best Regards,
Zhiming

0 Kudos
Reply