A generic way to make use of rpmsg from user space

The imx_rpmsg_tty is pretty much what you describe here: It offers /dev/ttyRPMSG. The device can also be used by a C program, using open/close and read/write data to it. This get automatically sent in packages to the other side. With a proper protocol ontop you (e.g. a simple ASCII protocol with newline as command delimiters, or something more sophisticated such as an TLV protocol).

NXP also offers more advanced examples in their erpc-imx-demos repository. Especially the multi-endpoint example uses another approach to access the RPmsg through a user space API (using the rpmsg-sysfs kernel module). We have not used/tried the examples on our platform, but I would expect it to be fairly easily used with our platform as well.