‎2020-02-09 03:12 AM
I'm trying execution code:
#define DEVICE "/dev/ttyRPMSG0"
int main(void)
{
int fd;
struct termios tty;
char buf[100];
int len;
printf("Opening device...\n");
fd = open( DEVICE, O_RDWR | O_NOCTTY | O_NDELAY ); // read/write, no console, no delay
if ( fd < 0 )
{
printf("Error, cannot open device\n");
return 1;
}
}
But, always get: Error, cannot open device. :(
I think, that in my Linux system there is no driver for this device: /dev/ttyRPMSG0.
What am I doing wrong?
How to create and manage a device /dev/ttyRPMSG0 from a program correctly?
Board: STM32MP157C-DK2
Many thanks.
Solved! Go to Solution.
‎2020-02-09 04:34 AM
Hi AShva.1,
let me share with you the two projects attached to this message (they are compressed in a single zip file).
One runs on Cortex-A7 and the other on Cortex-M4.
Virtual UART is created in Cortex-M4 project, in the main.c file.
Then, in Cortex-M7 project you can find the connection from A7 processor to the Virtual UART created before from M4 processor:
The full application aims to build a user interface on the LCD touch screen via GtkBuilder on Cortex-A7.
Then you'll obtain three graphic buttons that, once pressed, send a message through IPCC to the Cortex-M4.
This one receives the message, decode it and toggles the related LED:
Please note that in this project first the Cortex-M4 has to create the virtual UART and then the Cortex-A7 can connect to this UART.
Hope it could be useful.
Regards
Nicola
‎2020-02-09 04:34 AM
Hi AShva.1,
let me share with you the two projects attached to this message (they are compressed in a single zip file).
One runs on Cortex-A7 and the other on Cortex-M4.
Virtual UART is created in Cortex-M4 project, in the main.c file.
Then, in Cortex-M7 project you can find the connection from A7 processor to the Virtual UART created before from M4 processor:
The full application aims to build a user interface on the LCD touch screen via GtkBuilder on Cortex-A7.
Then you'll obtain three graphic buttons that, once pressed, send a message through IPCC to the Cortex-M4.
This one receives the message, decode it and toggles the related LED:
Please note that in this project first the Cortex-M4 has to create the virtual UART and then the Cortex-A7 can connect to this UART.
Hope it could be useful.
Regards
Nicola
‎2020-02-09 10:36 PM
Nicola!
thank you very much!!!
I will do and write...
Best regards
Alexander.
‎2020-02-11 03:31 AM
Nicola!
I'm trying import project cortex_M4-hrdbtn_IPCC to System Workbech for STM32 IDE.
Very much errors :(
Please, write me, how to do it right.
Best regards
Alexander.
operating system: Ubuntu 16.04
‎2020-02-11 06:54 AM
Hi Alexander,
my fault. I didn't remember to mention that the projects are for STM32CubeIDE 1.2.0
You can download it from this page:
https://www.st.com/en/development-tools/stm32cubeide.html
Best regards
Nicola
operating system : XUbuntu 18.04
‎2020-02-11 10:36 PM
Hi Nicola!
Thank you!
I will try. :)
Best regards
Alexander.
‎2020-02-12 03:50 AM
Hi, Nicola!
Many thanks.
Your project works great. :)
I have a few new questions:
I would be very happy if you provide examples. :)
Best regards
Alexander.
‎2020-02-12 08:42 AM
Hi, Alexander.
I'm glad to hear that the project works for you.
Unfortunately I didn't develop any more this kind of application so I can't provide other examples about IPCC :worried_face:
My first attempts started with the project OpenAMP_TTY_echo (attached here for your convenience) from STM32Cube_FW_MP1_V1.1.0 : https://wiki.st.com/stm32mpu/wiki/Install_STM32Cube_MP1_package
Lately I'm trying to have a better understanding of ADC management, peripheral sharing between CA7 and CM4 and Device Tree usage in OpenSTLinux.
Best regards
Nicola
‎2020-02-12 10:21 PM
Hi, Nicola!
I understood you.
Many thanks for the help.
Best regards
Alexander.