RPmsg in pico-imx7d using mainline linux (5.6.xx) and Yocto dunfell

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

RPmsg in pico-imx7d using mainline linux (5.6.xx) and Yocto dunfell

Jump to solution
2,708 Views
neuberfran
Contributor IV

photo01.jpeghi,
I have been interested in communicating between the a7 and the m4 of my imx7d-pico using RPmsg for a long time.

Today I found that this tutorial: https://www.youtube.com/watch?v=4zMyjaEgj2U&t=1182s

I don’t use mainline linux. I stay using kernel 5.6.xx with libgpiod 1.5

Using libgpiod I want to press a controlled button on a7 and flash an LED (which is waiting for this command) on m4

I was checking the issue link below and I have 2 questions below:

https://community.nxp.com/t5/i-MX-Processors/I-cant-get-the-linux-side-of-yocto-rpmsg-example-for-im...

 

  1. How can I adapt this project: https://hub.mender.io/t/technexion-pico-pi-imx7/136/61
    to the nxp forum project (link above) for me to get the following files: mu.c, imx_rpmsg.c, imx_rpmsg_tty.c and/or imx_rpmsg_tty.ko

  2. What is the best way to do RPmsg communication between a7 and m4 using Yocto on a7?

 

Tags (1)
0 Kudos
1 Solution
597 Views
neuberfran
Contributor IV

Remoteproc in imx7d-pico Ex Android Things using Yocto-A7-Side and Zephyr-M4-Side

 

https://www.youtube.com/watch?v=NFyEJXIpq4E

 

Solved

View solution in original post

0 Kudos
9 Replies
598 Views
neuberfran
Contributor IV

Remoteproc in imx7d-pico Ex Android Things using Yocto-A7-Side and Zephyr-M4-Side

 

https://www.youtube.com/watch?v=NFyEJXIpq4E

 

Solved

0 Kudos
2,689 Views
igorpadykov
NXP Employee
NXP Employee

Hi NEUBER

 

one can look at rpmsg description and sources in NXP documentation:

sect.2.8 Remote Processor Messaging, sect.2.8.3 Source Code

i.MX Linux Reference Manual​

and documentation included in FreeRTOS_BSP_iMX7D

Unfortunately mainline linux is not supported by nxp, issue may be posted on meta-fsl-arm mailing list

https://lists.yoctoproject.org/g/meta-freescale

 

Best regards
igor

0 Kudos
2,678 Views
neuberfran
Contributor IV

hi @igorpadykov 


In this video: https://mail.google.com/mail/u/0/?tab=rm&ogbl#all/FMfcgzGkZsrTzPBfwTMTnDdMWlJRQlCW

at 23 minutes and 17 seconds, Diego Suero uses the following files:

../arch/arm/mach-imx/mu.c
../drivers/rpmsg/imx_rpmsg.c
../drivers/rpmsg/imx_rpmsg_tty.c

What are the equivalent files (on mainline linux, one of them seems to be: ../drivers/remoteproc/imx_rproc.c)
so that I can implement RPmsg on mainline linux correctly?

Or is the approach to mainline linux (RPmsg) in imx7d-pico different?

0 Kudos
2,673 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos
2,670 Views
neuberfran
Contributor IV

@igorpadykov I have a last question for you. Fabio strangely stopped answering my last questions, including this one below:

no device in /sys/class/remoteproc/
 

root@imx7d-pico:/sys/class/remoteproc# ls
root@imx7d-pico:/sys/class/remoteproc# pwd
/sys/class/remoteproc
root@imx7d-pico:/sys/class/remoteproc# ls
root@imx7d-pico:/sys/class/remoteproc# 

 

What do I have to do to show devices in this directory there?

0 Kudos
2,642 Views
kef2
Senior Contributor IV

empty /sys/class/remoteproc means a) driver is not loaded, b) driver failed to probe, c) driver is not present in kernel, d) driver is disabled by kernel config, e) etc etc

0 Kudos
2,630 Views
neuberfran
Contributor IV

@kef2 I need a more accurate definition that revolves around two factors at most responsible for the absence in the directory.

0 Kudos
2,625 Views
kef2
Senior Contributor IV
Like I said there are many scenarios why remoteproc isn't working for you. 1) make sure driver is loaded, at least lsmod should list imx_rproc. If it is loaded but still empty sys folder, then 2) you need to figure out why driver fails to probe. Unfortunately imx_rproc probe function doesn't emit all error cases to dmesg log. Try adding printk's to it and work it out why it fails. Good luck
0 Kudos
2,604 Views
neuberfran
Contributor IV

pwd
/sys/class/remoteproc
root@imx7d-pico:/sys/class/remoteproc# ls
root@imx7d-pico:/sys/class/remoteproc# lsmod
Module Size Used by
root@imx7d-pico:/sys/class/remoteproc#

dmesg command results:

https://gist.github.com/neuberfran/a626ca6eb502ee27be6fd7dda000684a

0 Kudos