M4 doesn't reboot in MCIMX8QXP

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

M4 doesn't reboot in MCIMX8QXP

1,545 Views
raja_sj
Contributor I

I have loaded cortex-M4 with "imx8qx_m4_TCM_srtm_demo.bin" provided by the  NXP. On power up of the board,

The M4 serial output will show a banner upon boot.
####################  CODEC SRTM DEMO ####################

    Build Time: Mar 25 2019--15:31:14 

##########################################################
Press 'r' to do M4 partition reset

Once you see this banner, pressing <enter> will re-display.

If you press 'r', you'll see the M4 becomes locked up.

We have to manually reset the board or power cycle the board.

I am not getting how to reboot M4 by itself in MCIMX8QXP-CPU: i.MX 8QuadXPlus Multisensory Enablement Kit (MEK)

Tags (1)
0 Kudos
3 Replies

1,180 Views
raja_sj
Contributor I

Hi James,

Steps that I followed to flash the container image with the m4 binary.

./imx-boot-tools/mkimage_imx8 -commit > head.hash
cat u-boot.bin head.hash > u-boot-hash.bin
cp ./imx-boot-tools/bl31-imx8qxp.bin u-boot-atf.bin
dd if=u-boot-hash.bin of=u-boot-atf.bin bs=1K seek=128

cp imx8qx_m4_TCM_srtm_demo.bin m4_tcm.bin

./imx-boot-tools/mkimage_imx8 -soc QX -rev B0 -append imx-boot-tools/mx8qx-ahab-container.img -c -scfw imx-boot-tools/scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -m4 m4_tcm.bin 0 0x34FE0000 -out ./new-boot.bin

scp new-boot.bin TARRGET@:/home/root //Target is the IMX8QXP board

On Target Board after copying the new-boot.bin

echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=/home/root/new-boot.bin of=/dev/mmcblk0boot0 bs=1024 seek=32
sync

reboot

0 Kudos

1,180 Views
jamesbone
NXP TechSupport
NXP TechSupport

I tested 2 images, one created by Yocto and the second from pre-built image of below nxp.com site, and on both them, the demo rebooted the M4 partition correctly, without crashing the system, thus we can conclude the demo is fine.

 

i.MX 8QuadXPlus Multisensory Enablement Kit | NXP 

 

I suspect the way you're creating the boot container could be leading to the problem. Please follow the below step-by-step and let me know if it works for you.

 

1- On mkimage make sure to checkout the correct branch, I'm using the rel_imx_4.14.98_2.0.0_ga.

 

root@ubuntu:~/hd/nxp/imx-mkimage$ git checkout rel_imx_4.14.98_2.0.0_ga

 

2 - According to the document i.MX_Linux_User's_Guide.pdf: 

   

To boot a Linux image on i.MX 8QuadMax and i.MX 8QuadXPlus, four elements are needed:
• Bootloader (imx-boot built by imx-mkimage), which includes U-Boot, Arm Trusted Firmware, DCD file, System
controller firmware, and the SECO firmware since B0.
• Arm Cortex-M4 image
• Linux kernel image (Image built by linux-imx)
• A device tree file (.dtb) for the board being used
• A root file system (rootfs) for the particular Linux image

 

3 - So let's just concentrate on the 2 first elements, the bootloader and the M4 image:

 

Copy below files from your compiled directory, or for testing purpose, you can use the bin files from Yocto. The files must be copied to the folder /imx-mkimage/iMX8QX/

 

cp scfw_tcm.bin ~/hd/nxp/imx-mkimage/iMX8QX

cp u-boot-spl.bin-imx8qxpmek-sd ~/hd/nxp/imx-mkimage/iMX8QX/u-boot-spl.bin

cp u-boot-imx8qxpmek.bin-sd ~/hd/nxp/imx-mkimage/iMX8QX/u-boot.bin

cp bl31-imx8qx.bin ~/hd/nxp/imx-mkimage/iMX8QX/bl31.bin

cp mx8qx-ahab-container.img ~/hd/nxp/imx-mkimage/iMX8QX

 

Then copy the desired M4 image:

 

cp imx8qx_m4_TCM_srtm_demo.bin ~/hd/nxp/imx-mkimage/iMX8QX/m4_image.bin

 

*note that some files were renamed during the copy.

 

4 - Run the make for target on the imx-mkimage folder (tip: if you run just make, you will see all the options)

root@ubuntu:~/hd/nxp/imx-mkimage$ make SOC=iMX8QX flash_linux_m4

 

5 - Your boot + M4 image is ready to be flashed on sdcard:

 

root@ubuntu:~/hd/nxp/imx-mkimage$ sudo dd if=iMX8QX/flash.bin of=/dev/<SD card device> bs=1K seek=32 conv=fsync

0 Kudos

1,180 Views
jamesbone
NXP TechSupport
NXP TechSupport

Hello Raja,

How are you flashing the device, could you please share the exact steps you followed for it. I assume the example above was already flashed on the eMMC and your overwrite is not going through

0 Kudos