clinuxembedded-linuxrtoszephyr-rtos

RPMSG-lite in imx7d-pico stop in while (0 == rpmsg_lite_is_link_up(rl_instance)) {


I've been trying this project for a long time (https://www.youtube.com/watch?v=4zMyjaEgj2U&t=1208s) (originally made for imx7s-warp) But strangely (as per photo) it only reaches the line (while (!rpmsg_lite_is_link_up(rl_instance)) {) of the while loop

Things I've tried to solve:

  1. Disable the auto reload of the tty module in /meta-ipc/conf/machine/imx7d-pico.conf and only call using modproble imx_rpmsg_ttc before boot

  2. Several configuration changes in the device tree of imx7d-pico-pi-m4(qca), imx7s.dtsi and imx7d.dtsi files

  3. Changes in values in the m4-zephyr application (version 3.3), specifically in BUFF SIZE, NUM BUFF, etc...

  4. Change the compilation To of the original Uboot/Kernel (which must be done in Ubuntu 18.04 from a WSL2 machine to a native Ubuntu 18.04 machine) but the same error in this topic remains

  5. Compile the original version of the Zephyr app using Zephyr 1.13, which was the original version of this app. In this case it was not possible to compile for imx7d-pico(I have issue) using zephyr 1.13. Only for imx7s-warp its (Zephyr 1.13) Works. But, I don't have imx7s-warp.

  6. Hire a freelancer.com to solve both the Yocto part (A7-Core) and the Zephyr part (M4-Core)

  7. Porting the current 6.6 linux kernel from linux-fslc-imx to 4.9-1.0.x (With Issue in linux-fslc github:https://github.com/Freescale/linux-fslc/issues/648)

E.g.: 1) According to an NXP employee, RPMSG-lite is binary kernel and therefore can be supported by Yocto Hardknott and Kirkstone

  1. In addition to the video mentioned above, obviously, my project is based on this link: https://github.com/diegosueiro/meta-ipc/wiki/Yocto-Distribution-Build-and-Flash-Instructions

  2. Indeed, there is also a possibility (I imagine remote) that my issue is in Kconfig. Since the project's original Kconfig is different from the current one: https://gist.github.com/neuberfran/41be5d316c42af0b20b7e4f553694ee0 https://gist.github.com/neuberfran/6a0ad9735e1fba36ac6be9ba76643db3

  3. Original project Zephyr 1.13 (Which I ported to Zephyr 3.3) Part: https://github.com/diegosueiro/rpmsg-lite/wiki

  4. Issue in Zephyr 1.13 When ported device from imx7s-warp to imx7d-pico: https://github.com/neuberfran/zephyr_old_version

How to solve? enter image description here

enter image description here


Solution

    1. To solve my issue in Linux-Yocto/A7-Side I used the one mentioned in item 4 of this post. In other words, I had to go back in time and use Ubuntu 18.04 and port NXP's kernel branch 4.9-1.0.x-imx from imx7s-warp to imx7d-pico.

    1.2) In some files, I made more important changes. I create imx7d-pico.conf, imx7d-pico-pi.dts and imx7d-pico.dtsi Where I included the following:

    memory {
                reg = <0x80000000 0x1ff00000>;
            };
            
            reserved-memory {
                     #address-cells = <1>;
                     #size-cells = <1>;
                     ranges;
            
                     rpmsg_reserved: rpmsg@9fff0000 {
                               no-map;
                               reg = <0x9fff0000 0x100000>;
                     };
            };
                
            chosen {
                        stdout-path = "serial0:115200n8";
                   };
            
            m4_tcm: tcml@007f8000 {
                    compatible = "fsl, m4_tcml";
                    reg = <0x007f8000 0x8000>;
            };
            
            &rpmsg {
                    vdev-nums = <1>;
                    reg = <0x9fff0000 0x10000>;
                    status = "okay";
            };
    

    1.3) One of the advantages of porting to the kernel branch 4.9-1.0.x-imx was that Kconfig is already ready, just like the link below: https://gist.github.com/neuberfran/41be5d316c42af0b20b7e4f553694ee0

    This in itself did not resolve my issue. Obviously. But it helped a lot, as all the necessary configurations (mentioned below) to upload RPMSG-lite are present in this branch:

    CONFIG_HAVE_IMX_MU=y
    CONFIG_HAVE_IMX_RPMSG=y
    CONFIG_RPMSG=y
    CONFIG_RPMSG_VIRTIO=y
    CONFIG_IMX_RPMSG_PINGPONG=m
    CONFIG_IMX_RPMSG_TTY=m
    
    1. To resolve my issue on the Zephyr-M4 side I had to resolve the issue of item E.g=5 in this post. Based on zephyr/boards/arm/warp7_m4 I recreated zephyr/boards/arm/pico_pi_m4 with more detailed specifications in files, like: pinmux.c, dts.fixup, board.h, Kconfig.board, Kconfig.defconfig, pico_pi_m4.defconfig, pico_pi_m4.dts.

    It finally worked yesterday

    I stop U-boot 2018.07 and run the following commands:

    ext2load mmc 0:1 0x7F8000 zephyr.bin (and not zephyr_rpmsg_tcm.bin)
    dcache flush
    bootaux 0x7f8000
    
    run bootcmd
    

    enter image description here