cancel
Showing results for 
Search instead for 
Did you mean: 

Need an example in for IPCC communication Linux user application side

Sisyphus38
Associate III

Hello,

I am trying to get familiar with vitualUart between A7 et M4 side.

The example OpenAMP_tty_Echo given in the wiki works well with my setup.

Next step i would like to replace the "echo "msg" > /dev/ttyRPMG0" terminal commands" by a C linux user space application by using Read/Write file operations.

Writing operations work OK but i am struggling to get the Echo with read operation.

No change made on the M4 echo example.

Below an extract of my GTK c program

When read operation is reached the program blocks despite the timeout settings.

But when I echo the M4 with a terminal M4 is still alive. And a very interresting thing is that this echo gives also the caracteres sent with my GTK c app.

I did not find any example on the web for this task.

Thank you by advance for any help.

Regard

 serial_port = open("/dev/ttyRPMSG0", O_RDWR);

 struct termios SerialPortSettings;   

 tcgetattr(serial_port, &SerialPortSettings);

 SerialPortSettings.c_cc[VTIME] = 10;

 write(serial_port, write_buffer, 5);

 spleed(1);

 read(serial_port, read_buffer, 5);

 close(serial_port);

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier GALLIEN
ST Employee

Hi @Sisyphus38​ 

Please have a look here :

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

The logic analyzer application might give you an good exemple of IPCC management from Linux user space side.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Olivier GALLIEN
ST Employee

Hi @Sisyphus38​ 

Please have a look here :

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

The logic analyzer application might give you an good exemple of IPCC management from Linux user space side.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Sisyphus38
Associate III

Hello Olivier,

Thank you for the answer.

Regards

Hi,

would you provide command set at Linux side for communicating M4 core and also can u provide ipcc source code at linux side .

Thanks in advance.