Hi,
https://www.youtube.com/watch?v=4zMyjaEgj2U&t=1208s
i stay trying this video tutorial in imx7d-pico (not imx7s-warp7)
I need your help to resolve these 2 dilemmas: With zephyr 1.13 (according to the stackoverflow issue solution) it creates /dev/ttyRPMSG30. However, with zephyr 3.3 the remote_echo app always hangs at: while (0 == rpmsg_lite_is_link_up(rl_instance)) {
(With zephyr 1.13 it does not show messages in m4 side, using picocom in USB0/Linux/A7-Side and minicom in USB1/Zephyr/M4-Side)
With zephyr 3.3 it does not create /dev/ttyRPMG but I have /sys/bus/virtio/devices/ and /sys/bus/rpmsg/devices (Pic)
How to solve???
@Zhiming_Liu ??????????????????????????
@Zhiming_LiuWith zephyr 1.13 (I porting zephyr 1.13 project from Diego Sueiro/imx7s-warp7/RPMSG-lite to imx7d-pico) Everything seems to work, except the messages on the m4 screen (Pic):
You have already received the str from m core on Linux side.
@Zhiming_Liu Everything seems to work, except the messages on the m4 screen (Pic):
My biggest goal is to make my RPMSG-lite app (zephyr 3.3) work on the mainline (yocto hardknott). But if at least the zephyr 1.13 messages appear on the m4 side (*** I'll talk more about this below) that would be good for now.
*** I open linux/yocto/a7 side on picocom ttyUSB0 and see these messages.
I open zephyr 1.13/m4 side on minicom ttyUSB1 and I don't see anything
The original project was made for imx7s-warp7 which uses uart 1 for linux and uart2 for m4.
In imx7d-pico there are things like ttymxc4 and ttymxc5 for uart5 (and not 1) and uart6 (and not 2) in the UART configurations that are causing me problems.
If I use Linux to go up to uart1, the console throws messages that uart1 is too fast for linux (this in kernel 4.9-1.x) and in the hardknott kernel the kernel doesn't even start
Hi @neuberfran
You need modify kernel config to enable /dev/ttyRPMSG, this is mainline kernel feature.The tty rpmsg client driver will not be loaded if you don't open it.
CONFIG_REMOTEPROC_CDEV
CONFIG_RPMSG_CHAR
CONFIG_RPMSG_CTRL
CONFIG_IMX_RPMSG_TTY
@Zhiming_LiuI don't have yet CONFIG_RPMSG_CTRL
I'll see how best to put this. I'm using technexion Yocto hardknott BSP (linux-tn-imx). I have already enabled everything about RPMSG and REMOTEPROC in menuconfig. I should try via .config and/or defconfig. Could you help me at this point?
And another question: I saw somewhere that using RPMSG_CHAR can block RPMSG_TTY. That is true?
First step is to make sure correct kernel config.
Then for demo images from NXP, we provide rpmsg echo str demo in M core, you need run the demo in M core firstly and then you will see the /dev/ttyRPMSG in Linux side.
I am not sure if you have similiar demo to send test message via virtual tty in M core.
And CONFIG_RPMSG_CTRL is not very necessary.If the kernel you are using doesn't have this config, you can miss it.
I saw somewhere that using RPMSG_CHAR can block RPMSG_TTY. That is true?
--->From my test, i opened all these configs and i can see /dev/remoterpoc, i didn't try to open /dev/remoterpoc and /dev/ttyttyRPMSGX at same time. But from the principle, you need run echo str firmware on M core and then you will see dev/ttyttyRPMSGX. If you try yo open and modify data in /dev/remoterpoc, this operation may break the firmware running.
@Zhiming_Liu I would like you to pay attention to this last photo that I will attach (ff3.png). In the kernel config menu (linux-tn-imx from technexion) there is nothing about RPMSG_CTRL. Will it work if I force the introduction of RPMSG_CTRL via .config or defconfig?
This is my principal script (RPMSG-lite) to this project
https://gist.github.com/neuberfran/aaa4aabfa71c5976580c770ef33cbf85
Remembering that my project is RPMSG-lite and not OpenAMP.
Below project links:
https://github.com/diegosueiro/meta-ipc/wiki/Yocto-Distribution-Build-and-Flash-Instructions
In the kernel config menu (linux-tn-imx from technexion) there is nothing about RPMSG_CTRL. Will it work if I force the introduction of RPMSG_CTRL via .config or defconfig?
-->The RPMSG_CTRL is not needed for tty test, if there is not such config, you can miss it. Just open other config.
@Zhiming_Liu I have all these settings and it still doesn't work on hardknott
CONFIG_RPMSG_CHAR CONFIG_IMX_RPMSG_TTY=m (modprobe imx_rpmsg_tty result in nothing)
Have you run the firmware at same time?
@Zhiming_LiuYes, I do at same time.
If you look at the stackoverflow issue screen, my main script given above (github gists), you will see that the script is not reaching the line where it prints the rl_instance, anymore. Why?
I don't know if you know the imx7d-pico device tree file settings, but I have a few questions:
Should I enable rpmsg in u-boot or not?
Should I use mu0b on both sides (zephyr and yocto)?
What do you think of these two files below? Which are very important for the project. One on A7 side and other on M4 Side
https://gist.github.com/neuberfran/8f7db9112779c60e1b157e77e6d6c17a
https://gist.github.com/neuberfran/9d860f8e6ffb9a9455feb77fea44b620
I stay with issue to transpose this project from zephyr 1/13&zephyr 3.3 to FreeRTOS 1.0.1 (technexion):
home/neuberfran/neuber/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/rpmsg_str_echo_rpmsglite_example.dir/home/neuberfran/projects/freertos-tn/middleware/multicore/open-amp/lib/rpmsg_lite/rpmsg_lite.c.obj: in function `virtqueue_notify':
rpmsg_lite.c:(.text.virtqueue_notify+0x4): undefined reference to `platform_notify'
/home/neuberfran/neuber/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/rpmsg_str_echo_rpmsglite_example.dir/home/neuberfran/projects/freertos-tn/middleware/multicore/open-amp/lib/rpmsg_lite/rpmsg_lite.c.obj: in function `rpmsg_lite_release_rx_buffer':
rpmsg_lite.c:(.text.rpmsg_lite_release_rx_buffer+0x1c): undefined reference to `virtqueue_get_buffer_length'
/home/neuberfran/neuber/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/rpmsg_str_echo_rpmsglite_example.dir/home/neuberfran/projects/freertos-tn/middleware/multicore/open-amp/lib/rpmsg_lite/rpmsg_lite.c.obj: in function `rpmsg_lite_remote_init':
rpmsg_lite.c:(.text.rpmsg_lite_remote_init+0xb6): undefined reference to `platform_init_interrupt'
/home/neuberfran/neuber/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: rpmsg_lite.c:(.text.rpmsg_lite_remote_init+0xc0): undefined reference to `platform_init_interrupt'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/rpmsg_str_echo_rpmsglite_example.dir/build.make:752: release/rpmsg_str_echo_rpmsglite_example.elf] Erro 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/rpmsg_str_echo_rpmsglite_example.dir/all] Erro 2
make: *** [Makefile:91: all] Erro 2
I'm also trying to adapt mcxpresso examples/rpmsg_lite to EVK-MCIMX7ULP (but not have to imx7d-pico or other imx7d, type colibri) unsuccessfully
You should check the original and all included files in rpmsg_str_echo_rpmsglite_example demo and add them to your project.