The PRU sends and receives messages to/from the ARM using the following functions pru_rpmsg_send and pru_rpmsg_receive. https://git.ti.com/pru-software-support-package/pru-software-support-package/blobs/bf955a05d3733ebe52d5783a1212b457b6e2f55c/lib/src/rpmsg_lib/pru_rpmsg.c#line29 <https://git.ti.com/pru-software-support-package/pru-software-support-package/blobs/bf955a05d3733ebe52d5783a1212b457b6e2f55c/lib/src/rpmsg_lib/pru_rpmsg.c#line29>
Look at the following examples to see how this is done: https://git.ti.com/pru-software-support-package/pru-software-support-package/trees/master/examples/am335x <https://git.ti.com/pru-software-support-package/pru-software-support-package/blobs/master/examples/am335x/PRU_RPMsg_Echo_Interrupt0/main.c#line105> >From the ARM side, there is only one example which sends and receives 100 >messages, but it does give you the idea on how this works: https://git.ti.com/rpmsg/rpmsg/blobs/rpmsg-ti-linux-4.4.y/samples/rpmsg/rpmsg_client_sample.c <https://git.ti.com/rpmsg/rpmsg/blobs/rpmsg-ti-linux-4.4.y/samples/rpmsg/rpmsg_client_sample.c> Regards, John > On Jul 12, 2016, at 6:28 PM, Mark A. Yoder <[email protected]> wrote: > > I made some progress today. I modified one of the BeagleScope examples > (pru_pin_state_reader[1]) to use sprintf() to > send and print debug info to the ARM[2]. One of the things I learned is if > you use printf() out of the box you will run out of instruction memory. > Instead you have to use the --printf_support=nofloat flag on clpru. It uses > a smaller printf library that fits. > > I'm beginning to get a feel for what's happening on the PRU side, but the ARM > is a mystery to me. I'm sure I can figure out mmap() and read the > shared memory, but I don't think that's the proper way to do it. Rather I > think you are supposed to go through the kernel drivers, but I haven't found > any simple examples. > > Does anyone know how the ARM side of remoteproc works? > > --Mark > > [1] > https://github.com/ZeekHuge/BeagleScope/tree/port_to_4.4.12-ti-r31%2B/examples/firmware_exmples/pru_pin_state_reader > > <https://github.com/ZeekHuge/BeagleScope/tree/port_to_4.4.12-ti-r31%2B/examples/firmware_exmples/pru_pin_state_reader> > [2] > https://github.com/MarkAYoder/BeagleBoard-exercises/tree/master/pru/beagleScope/pru_pin_state_reader > > <https://github.com/MarkAYoder/BeagleBoard-exercises/tree/master/pru/beagleScope/pru_pin_state_reader> > > On Monday, July 11, 2016 at 2:58:46 PM UTC-4, Mark A. Yoder wrote: > It looks like the new way to talk to the PRUs is via remoteproc and RPMsg. > > Does anyone have pointers to some good tutorials? Or some good debuggers? > > ZeekHuge has a Google Summer of Code project (2016) > <https://github.com/ZeekHuge/BeagleScope>that has some nice remoteproc > examples, and he > built some nice tools. > > I'm putting together a wiki > <http://elinux.org/EBC_Exercise_30_PRU_via_remoteproc_and_RPMsg> that shows > how to setup your Bone to run his examples. > (http://elinux.org/EBC_Exercise_30_PRU_via_remoteproc_and_RPMsg > <http://elinux.org/EBC_Exercise_30_PRU_via_remoteproc_and_RPMsg>). > I'm open for additions/corrections so we can have a one stop place for those > using the PRUs with remoteproc. > > --Mark > > > > > -- > For more options, visit http://beagleboard.org/discuss > <http://beagleboard.org/discuss> > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/57a174ab-5696-46fb-b886-80a1d3906eb8%40googlegroups.com > > <https://groups.google.com/d/msgid/beagleboard/57a174ab-5696-46fb-b886-80a1d3906eb8%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/2DA4A113-54BC-4DDE-848E-6D0F25C313A4%40gmail.com. For more options, visit https://groups.google.com/d/optout.
