Fail to run i.mx8qm M4 hello_world example

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

Fail to run i.mx8qm M4 hello_world example

730 Views
WolsYang
Contributor IV

I am following https://www.nxp.com/docs/en/application-note/AN5317.pdf

and after ./imx8qmmek-m4/boards/mekmimx8qm/demo_apps/hello_world/cm4_core0/armgcc/build_flash_debug.sh

I got two file  hello_world_m40.bin hello_world_m40.elf

First i put .elf into board /lib/firmware, then 

$ echo hello_world_m40.elf > /sys/class/remoteproc/remotepro0/firmware
$ echo start > /sys/class/remoteproc/remoteproc0/state

And I got error

[ 2076.121199] remoteproc remoteproc0: powering up imx-dsp-rproc
[ 2076.127579] remoteproc remoteproc0: Booting fw image hello_world_m40.elf, size 241384
[ 2076.177725] remoteproc remoteproc0: bad phdr da 0x8080000 mem 0x1a00
[ 2076.184095] remoteproc remoteproc0: Failed to load program segments: -22
[ 2076.191091] remoteproc remoteproc0: Boot failed: -22

So I put .bin into imx-yocto-bsp/build/tmp/deploy/images/imx8qmmek/imx-boot-tools/

Trying to make it start at uboot, and also auto use imx-mkamgetool package .bin in yocto

$bitbake imx-mkimage
$uuu -b emmc_all imx-boot ibox500-imx8qmmek-20220103092634.rootfs.wic.bz2

Then reboot, but nothing  happend

Am I missing some step?

Tags (1)
0 Kudos
Reply
2 Replies

719 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,
 
For i.MX8QM, SCU_ROM will handle the load of M4 binary code. SCU will create a seperate resource partition(generally partition 3) and based on that partition, there would be resource isolation(including memory region) between M core and A core.

To flash your own M4 image, please follow SDK doc "Getting Started with MCUXpresso SDK for MEK-MIMX8QM" - "Run a demo using imx-mkimage".You need to build a flash.bin file with M4 by imx-mkimage, using "make SOC=iMX8QM flash_linux_m4"

Best regards,
Aldo.

0 Kudos
Reply

704 Views
WolsYang
Contributor IV

I wish I can send some mission to M4 core, when I running at  Linux.

That why i follow AN5317 Loading Code on Cortex-M from U-Boot/Linux for the i.MX Asymmetric Multi-Processing Application Processors.

Getting Started with MCUXpresso SDK for MEK-MIMX8QM work verry well when build a flash.bin file with M4, but not ok for me in Linux remoteproc

 

0 Kudos
Reply