Replies: 18 comments 17 replies
-
Please have look to this Zephyr sample: https://github.com/zephyrproject-rtos/zephyr/tree/master/samples/subsys/ipc/openamp |
Beta Was this translation helpful? Give feedback.
-
Thanks will have a look at it. |
Beta Was this translation helpful? Give feedback.
-
@arnopo the Zephyr doc states that one of the apps can run with Linux rpmsg_client_sample. But how to provide shared memory and interrupt resources to the rpmsg_client_sample kernel module? |
Beta Was this translation helpful? Give feedback.
-
The Zephyr application you mention is : rpmsg_client_sample is a Linux kernel sample relying to the rpmsg, remoteproc and mailbox Linux kernel frameworks ( not use the OpenAMP lib). The IRQ are managed by the mailbox Linux kernel framework, the shared memory is managed the remoteproc Linux kernel framework. Regarding your initial request (based on OpenAMP lib): the IRQs and shared memories are generally implemented in a back-end that is specific to your platform. There is not defined steps but some examples. |
Beta Was this translation helpful? Give feedback.
-
But is the zephyr sample compatible with Linux kernel implementation of rpmsg? E.g. |
Beta Was this translation helpful? Give feedback.
-
I have Remoteproc running in my imx7d-pico (technexion) https://www.youtube.com/watch?v=NFyEJXIpq4E My goal is to do an echo > "TEST" /dev/ttyRPMSG to the remote using the modprobe imx_rpmsg_tty (Kernel driver). I've been trying this on rpmsg_lite for 3 months on the upstream Zephyr, without success. In Zephyr 1.13 rpmsg_lite works: Honestly, I'm not sure if I can use this driver (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.99-dev1/zephyr/samples/subsys/ipc/openamp_rsc_table/README.html) and use openamp_rsc_table zephyr project. https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/ipc/rpmsg_service I got kernel panic due to this screen setting above. How to solve this kernel panic? Or do I have to implement resource table? |
Beta Was this translation helpful? Give feedback.
-
Hello @neuberfran As you mentioned, the Zephyr openamp_rs_table sample is based on the use of the resource table to enable the rpmsg protocol. The resource table is simply a table that is defined in a specific ELF section and loaded into shared memory. It is used by Linux to discover the coprocessor's requested resources and to set associated services (traces, virtio rpmsg, etc.).
An alternative is to use a shared memory that contains the static vrings and buffer. You can refer to the Zephyr openamp example https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/ipc/openamp/remote or https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/ipc/ipc_service/static_vrings/remote, which implement the remote part of the protocol based on shared memory with static vrings. These examples are probably closer to what you're trying to implement with rpmsg-lite. |
Beta Was this translation helpful? Give feedback.
-
Let's focus on the zephyr samples/subsys/ipc/openamp_rsc_table sample. Here are some checks you can do:
|
Beta Was this translation helpful? Give feedback.
-
@arnopo
|
Beta Was this translation helpful? Give feedback.
-
The
loading this firmware from u-boot implies that your Linux and U-boot support this mode with the management of the resource table. Some platforms support to load the same firmware from U-boot or Linux, some other do not. |
Beta Was this translation helpful? Give feedback.
-
Something seems wrong during the parse or load of your elf file. Are you sure that your linux driver allows to load a firmware? |
Beta Was this translation helpful? Give feedback.
-
@iuliana-prodan Tks. Ok. Fortunately I have a machine with Ubuntu 22.04 where I can get Yocto Kirkstone with a newer imx_rproc.c (which seems to meet the requirements of this project). https://gist.github.com/neuberfran/f90b54de9b44fd53a07906774e4046e8 It is not possible to migrate to anything beyond that(kernel upstream via Yocto BSP Official Build). Because it is an old device (Ex Android Things) imx7d-pico from TechNexion. It is currently not possible to do repo init and repo sync anymore for this device. Because I have it saved on my machine, I can still do it. In any case, I don't imagine this will be a problem (imx_rproc.c from Yocto Hardknott Or Kirkstone) If I understand correctly you want to run openamp_rsc_table sample from Zephyr on Cortex M4 from imx7D? In my opinion you should try to compile the simple hello_world sample from Zephyr, for CortexM from imx7d - pico_pi_m4 (is this one, right?) and try to load it using remoteproc from Linux. So... start small and simple. for CortexM from imx7d - pico_pi_m4 (is this one, right?) Observation-01: In parallel to this (openamp_rsc_table) I tried and managed to compile the remote part of the Zephyr samples, namely: rpmsg_service and openamp, using the commands below: In the first app [1] when I start it in Uboot I don't see anything in the m4 part (/tty/USB01 in minicom) In the second app [2] I can see Starting application thread And OpenAMP[remote] demo started 2 Going back to openamp_rsc_table the first thing I saw was this: zephyrproject-rtos/zephyr#60455 And then the video: https://www.youtube.com/watch?v=JqwPljnm2_k&t=1690s About the links below (and the video) I have questions:
Before second question, I need post again this important memory file tutorial:
|
Beta Was this translation helpful? Give feedback.
-
Why are these addresses completely different from the ones you use(type 0x942f0000)? |
Beta Was this translation helpful? Give feedback.
-
@iuliana-prodan Pls, Why I can't see fsl,imx7d-mu (Or fsl,imx7-mu, Or fsl,imx8mp-mu) How to implement this? |
Beta Was this translation helpful? Give feedback.
-
@iuliana-prodan You forgot about the great NXP AM62 for sale at Variscite: https://developer.toradex.com/hardware/verdin-som-family/modules/verdin-am62/ |
Beta Was this translation helpful? Give feedback.
-
Can I use rpmsg without remoteproc or are they coupled? I only want to use rpmsg to communicate over a shared memory. I have two UIO interfaces, one for the interrupt and one for the shared memory, what is the required steps to do that?
Beta Was this translation helpful? Give feedback.
All reactions