i.MX8ULP remoteproc error and how to run different binaries on M33 core

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

i.MX8ULP remoteproc error and how to run different binaries on M33 core

882 Views
darko311
Contributor II

Hello everyone,

I'm trying to get the remoteproc framework running on the imx8ulp-evk board. The default power switch demo app is up and running after flashing the latest Linux 6.6.3_1.0.0 on the board.

When trying to stop the remoteproc0 which should be M33 core, this error happens

 

root@imx8ulpevk:~# echo stop > /sys/class/remoteproc/remoteproc0/state 
[  163.244158] i2c-rpmsg virtio0.rpmsg-i2c-channel.-1.1: i2c rpmsg driver is removed
[  163.259814] imx_audio_rpmsg virtio0.rpmsg-audio-channel.-1.2: audio rpmsg driver is removed
[  163.276855] pwm-rpmsg virtio0.rpmsg-pwm-channel.-1.5: pwm rpmsg driver is removed
[  163.285927] rtc_rpmsg virtio0.rpmsg-rtc-channel.-1.6: rtc rpmsg driver is removed
[  163.295056] remoteproc remoteproc0: can't stop rproc: -95
-sh: echo: write error: Operation not supported

 

 

Then I tried flashing the imx-boot-imx8ulp-lpddr4-evk-sd.bin-flash_singleboot
in order not to load the M33 binary from imx-boot but unfortunately, the board doesn't
boot with this binary, it just hangs or sometimes loops

 

~/Downloads/LF_v6.6.3-1.0.0_images_IMX8ULPEVK$ uuu -b emmc imx-boot-imx8ulp-lpddr4-evk-sd.bin-flash_singleboot
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.165-0-g7347a80

Success 0    Failure 0                                                                                                                                    
                                                                                                                                                           
                                                                                                                                                           
3:212    1/ 1 [=================100%=================] SDPS: boot -f imx-boot-imx8ulp-lpddr4-evk-sd.bin-flash_singleboot  

 

this the serial terminal of the board

 

U-Boot SPL 2023.04+gf8a2983ec8+p0 (Mar 04 2024 - 07:25:04 +0000)
Normal Boot
ELE firmware version 1.0.0-344acb84
upower_apd_inst_isr: entry
upower_init: soc_id=48
upower_init: version:11.11.13
upower_init: start uPower RAM service
user_upwr_rdy_callb: soc=b
user_upwr_rdy_callb: RAM version:12.18
Turning on switches...
Turn on switches ok
Turning on memories...
Turn on memories ok
Clearing DDR retention...
Clear DDR retention ok
SEC0:  RNG instantiated
Trying to boot from BOOTROM
Boot Stage: USB boot
Find img info 0x88000000, size 416
Download 1558528, Total size 1559552
NOTICE:  BL31: v2.8(release):android-14.0.0-imx95-demo-1-g8dbe28631
NOTICE:  BL31: Built : 17:57:56, Jan 22 2024
NOTICE:  upower_init: start uPower RAM service
NOTICE:  user_upwr_rdy_callb: soc=b
NOTICE:  user_upwr_rdy_callb: RAM version:12.18

U-Boot SPL 2023.04+gf8a2983ec8+p0 (Mar 04 2024 - 07:25:04 +0000)
Normal Boot
ELE firmware version 1.0.0-344acb84
upower_apd_inst_isr: entry
upower_init: soc_id=48
upower_init: version:11.11.13
upower_init: start uPower RAM service
user_upwr_rdy_callb: soc=b
user_upwr_rdy_callb: RAM version:12.18
Turning on switches...
Turn on switches ok
Turning on memories...
Turn on memories ok
Clearing DDR retention...
Clear DDR retention ok
SEC0:  RNG instantiated
Trying to boot from BOOTROM
Boot Stage: USB boot
Find img info 0x88000000, size 416
Download 1558528, Total size 1559552
NOTICE:  BL31: v2.8(release):android-14.0.0-imx95-demo-1-g8dbe28631
NOTICE:  BL31: Built : 17:57:56, Jan 22 2024
NOTICE:  upower_init: start uPower RAM service
NOTICE:  user_upwr_rdy_callb: soc=b
NOTICE:  user_upwr_rdy_callb: RAM version:12.18

U-Boot SPL 2023.04+gf8a2983ec8+p0 (Mar 04 2024 - 07:25:04 +0000)
Normal Boot
ELE firmware version 1.0.0-344acb84
upower_apd_inst_isr: entry
upower_init: soc_id=48
upower_init: version:11.11.13
upower_init: start uPower RAM service
user_upwr_rdy_callb: soc=b
user_upwr_rdy_callb: RAM version:12.18
Turning on switches...
Turn on switches ok
Turning on memories...
Turn on memories ok
Clearing DDR retention...
Clear DDR retention ok
SEC0:  RNG instantiated
Trying to boot from BOOTROM
Boot Stage: USB boot
Find img info 0x88000000, size 416
Download 1558528, Total size 1559552
NOTICE:  BL31: v2.8(release):android-14.0.0-imx95-demo-1-g8dbe28631
NOTICE:  BL31: Built : 17:57:56, Jan 22 2024
NOTICE:  upower_init: start uPower RAM service
NOTICE:  user_upwr_rdy_callb: soc=b
NOTICE:  user_upwr_rdy_callb: RAM version:12.18

U-Boot SPL 2023.04+gf8a2983ec8+p0 (Mar 04 2024 - 07:25:04 +0000)
Normal Boot
ELE firmware version 1.0.0-344acb84
upower_apd_inst_isr: entry
upower_init: soc_id=48
upower_init: version:11.11.13
upower_init: start uPower RAM service
user_upwr_rdy_callb: soc=b
user_upwr_rdy_callb: RAM version:12.18
Turning on switches...
Turn on switches ok
Turning on memories...
Turn on memories ok
Clearing DDR retention...
Clear DDR retention ok
SEC0:  RNG instantiated
Trying to boot from BOOTROM
Boot Stage: USB boot
Find img info 0x88000000, size 416
Download 1558528, Total size 1559552
NOTICE:  BL31: v2.8(release):android-14.0.0-imx95-demo-1-g8dbe28631
NOTICE:  BL31: Built : 17:57:56, Jan 22 2024
NOTICE:  upower_init: start uPower RAM service
NOTICE:  user_upwr_rdy_callb: soc=b
NOTICE:  user_upwr_rdy_callb: RAM version:12.18

 

 

Loading the imx_mcore_demos (imx8ulp_m33_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin
for example) with imx-mkimage does work but is there a guide how to test these with remoteproc
while the Linux is running and booted?

Thanks!

 

0 Kudos
Reply
4 Replies

792 Views
darko311
Contributor II

Hello Jorge,

I've read the user guides but unfortunately, imx8ulp does not seem to be applicable for these guides.

Looking at this patch message by NXP engineers

https://lore.kernel.org/lkml/20210604072311.9186-1-peng.fan@oss.nxp.com/T/

and the imx_rproc driver

https://github.com/nxp-imx/linux-imx/blob/ccf0a99701a701fb48a04e31ffe3f9d585a8374a/drivers/remotepro...

it looks like imx8ulp does not support controlling the M33 core from Linux/A35 cores.

Can you shed some light, is this SoC design thing or a matter of software support?

Thanks!

0 Kudos
Reply

784 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello, 

Since i.MX8ULP has a Messaging Unit, it should be able to run cortex M using remoteproc but those repositories say the opposite.  

We have a guide to run cortex M binaries, but I think you checked it before, right?

Best regards.

0 Kudos
Reply

771 Views
darko311
Contributor II

Yes, I can confirm this method works.

It is a bit of a procedure though, to generate new imx-boot and flash it to the EMMC each time new
M33 binary is compiled, but it seems it's only possible way of doing it or via a JTAG debug probe.

This is a bit of pain to do without a JTAG probe and might be an issue in systems in a field,
i.e. if something goes wrong during the flashing of imx-boot to the eMMC, there's no way to recover
without uuu tool.

I guess an alternative would be to use dual boot mode, and boot the RTD from FlexSPI0 and APD from eMMC and/or use recovery boot options available for the imx8ulp.

Thanks!

0 Kudos
Reply

851 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

 

I suggest you take a look on i.MX Linux User's Guide, specifically on chapter 4.7.4 Running the Arm Cortex-M4/7/33 image.

 

There is also an application note related to remoteproc but does not include i.MX8ULP examples, maybe could be helpful.

 

Best regards.

0 Kudos
Reply