How to use rpmsg driver for interprocessor communication?

Discussion in 'UDOO NEO' started by PaulR, Feb 19, 2018.

Tags:
  1. PaulR

    PaulR New Member

    Joined:
    Dec 12, 2017
    Messages:
    9
    Likes Received:
    0
    Hello
    I'd like to test inter-processor samples for RPMSG interface.
    For the M4 part, I've compiled FreeRTOS example for this at:

    <BSP freertos>/examples/imx6sx_ai_m4/demo_apps/rpmsg/pingpong_freertos

    and for the Linux part on A9 processor I see there are two places where a RPMSG module appears in my Yocto build:

    bitbake -c devshell linux-udooboard
    root@Koji:~/udoo/build/tmp/work-shared/udooneo/kernel-source# find ./ -name rpmsg
    ./drivers/rpmsg --> bus module?
    ./samples/rpmsg --> client module?

    but then, with make menuconfig I see no options to build those modules under Device Drivers->Rpmsg drivers (empty) . I think,I should build both modules, one for rpmsg bus kernel support,the other to be loaded as a client.
    But how do i build this? Could I just try to buld them outside of kernel source tree?

    Any link is welcome.
    Thank you
     
  2. Jefferson Cunalata

    Jefferson Cunalata New Member

    Joined:
    Mar 12, 2018
    Messages:
    16
    Likes Received:
    3
  3. PaulR

    PaulR New Member

    Joined:
    Dec 12, 2017
    Messages:
    9
    Likes Received:
    0
    My kernel is:

    Linux udooneo 3.14.56_1.0.x-udoo+g77702fa #1 SMP PREEMPT

    So..., I need to compile a 4.X kernel, which does not officially exist...
    Do you know if rpmsg modules would be compatible for 4.X? Then I could simply copy those modules on my old 3.56 kernel.

    Thank you!
     
  4. Jefferson Cunalata

    Jefferson Cunalata New Member

    Joined:
    Mar 12, 2018
    Messages:
    16
    Likes Received:
    3
    I am in the same situation but first I am trying to debug a bare metal application placed in DDRAM with eclipse and jlink, the other two location as OCRAM and TCM I can debug successfully.

    Coming back your question I think that the nearest supported kernel to imx6 solo x is the provided by NXP in the official page. You can find here: https://www.nxp.com/support/develop...oftware-and-development-tool-resources:IMX_SW i.MX BSP Updates and Releases>Linux 4.9.11_1.0.0 [Current Release]>Source code
    If you can implement it, let me know, you will save me time.

    On the other hand, I am also interesting in use memory shared which is defined in device tree https://github.com/UDOOboard/linux_...arch/arm/boot/dts/imx6sx-udoo-neo-m4.dtsi#L23 Have you work before with this?
     
  5. PaulR

    PaulR New Member

    Joined:
    Dec 12, 2017
    Messages:
    9
    Likes Received:
    0
    I will check the module sources to see it that module compiles (with minor changes,i hope...) in 3.56.
    Trying to replace the linux 3.56 kernel source at Yocto recipe with a 4.X kernel seems more difficult to me.

    >On the other hand, I am also interesting in use memory shared which is defined in device tree
    >https://github.com/UDOOboard/linux_...arch/arm/boot/dts/imx6sx-udoo-neo-m4.dtsi#L23
    >Have you work before with this?
    No, I haven't. But I think you could try using the mqx_upload_on_m4SoloX binary,which is based on /dev/mem, to try loading something at that memory address:

    https://github.com/ektor5/udooneo-m4uploader/blob/master/mqx_upload_on_m4SoloX.c

    Then , you could try access to that memory from M4, using FreeRTOS. In fact,I started checking MCC and RPMSG to synchronize access from both processors, but there is also something called RDC (Resource Domain Contrl) in CMSIS ARM which may be (not really sure how) used for this.
     
  6. Jefferson Cunalata

    Jefferson Cunalata New Member

    Joined:
    Mar 12, 2018
    Messages:
    16
    Likes Received:
    3
    After days of research I can report the following:

    The last OS provided oficially by UDOO team is UDOOBUNTU 14.04 with kernel 3.xx. Problem with this OS is that just have compatibility to use ttyMCC driver which is actually deprecated for the examples of multi core communication in Freertos 1.0.1, this driver use memory shared but it does not allow multi thread communication and also is not efficient. I think they keep this driver because arduino is working over MQX bsp which is a previous version of Freertos 1.0.1. So change to the last version of Freertos means that they need also to migrate for a new kernel in order to support ttyRPMSG. A huge task as I seen!

    So the only solution arise using the OS provided by Francesco https://www.udoo.org/forum/threads/ubuntu-16-04-for-udoo-neo.4957/ which has native support for ttyRPMSG driver, also a update kernel and more stable drivers for wireless communication. Also a updated ubuntu :)

    Hopefully this will work. I will keep update this thread.
     

Share This Page