Skip to main content
Visitor II
March 13, 2020
Solved

STM32MP157-DK2 problems RPMsg

  • March 13, 2020
  • 3 replies
  • 2047 views

I want to exchange data between M4(running custom firmware) and A7(running OpenSTLinux) by using the Linux RPMsg framework.

The ST-wiki refers to https://www.kernel.org/doc/Documentation/remoteproc.txt.

I tried to run the example given by kernel.org, but without success.

It seems the problem is the linux/rpmsg.h file delivered by the developer package ecosystem release 1.20 (file attached below). Simply replacing the rpmsg.h file with a common one (attached below) does not solve the problem because further .h files are missing.

I don't want to use the normal read() / write() functions on the ttyRPMSG.

Any suggestions?

thanks in advance

Lukas

    This topic has been closed for replies.
    Best answer by Lukas1

    Hi everyone,

    I managed to solve my problem. Because Linux is new to me I didn't know anything about kernel modules. After understanding how kernel modules work and how to use them I can compile and use the 'LogicAnalyzer example' provided by ST.

    Some useful links I used:

    https://wiki.st.com/stm32mpu/wiki/How_to_exchange_large_data_buffers_with_the_coprocessor_-_example

    https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package#Adding_an_external_out-of-tree_Linux_kernel_module

    https://www.tldp.org/LDP/lkmpg/2.4/lkmpg.pdf

    regards

    Lukas

    3 replies

    Technical Moderator
    March 13, 2020

    Hi @Lukas​ ,

    Could you please clarify further what you mean by "example given by kernel.org " and what is your final target behind.

    We are providing some functional example in Cube Firmware Package under Projects/OpenAMP. Did you already try it ?

    https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package_-_STM32CubeMP1_Package

    BR,

    Olivier

    Lukas1Author
    Visitor II
    March 16, 2020

    Hi,

    thanks for your fast reply.

    The example I tried to crosscompile is https://github.com/torvalds/linux/tree/master/samples/rpmsg . I know this example will not work 1:1, but I wanted to check if compiling works.

    I already tried the OpenAMP examples and they work fine. The M4-side is not the problem.

    My goal is to transfer (large) data from M4 to A7. The firmware on the M4 is in charge of controlling/communicating some external ADCs. The A7 should run a GUI (e.g. with gdk) to display the measured data and get user input to change settings for measurements made by M4. Therefore A7 has to send commands to M4.

    On ST-wiki I found this article https://wiki.st.com/stm32mpu/wiki/How_to_exchange_large_data_buffers_with_the_coprocessor_-_example . But I still have problems to implement rpmsg into a c-program on the A7

    regards

    Lukas

    Lukas1AuthorAnswer
    Visitor II
    March 18, 2020

    Hi everyone,

    I managed to solve my problem. Because Linux is new to me I didn't know anything about kernel modules. After understanding how kernel modules work and how to use them I can compile and use the 'LogicAnalyzer example' provided by ST.

    Some useful links I used:

    https://wiki.st.com/stm32mpu/wiki/How_to_exchange_large_data_buffers_with_the_coprocessor_-_example

    https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package#Adding_an_external_out-of-tree_Linux_kernel_module

    https://www.tldp.org/LDP/lkmpg/2.4/lkmpg.pdf

    regards

    Lukas