Hi Evan, thanks for the guide! Am Mittwoch, 28. März 2018 20:23:08 UTC+2 schrieb evan....@cyvision.com: > > TJF and the others were right, I could not find an easy way to do this > using rproc, but with uio_pruss it is fairly straight forward. While the > suggestions made to help me get this going were surely valid, I found what > seemed to be the simplest way for me using the example > PRU_memAccess_DDR_PRUsharedRAM found in the am335x_pru_package which I just > cloned from here <https://github.com/beagleboard/am335x_pru_package>. > > I was unable to do this before because I did not set up my beaglebone for > uio_pruss correctly, and would always get errors when using commands like > prussdrv_open(). But from the suggestions in this post I was able to figure > out what I was doing wrong, and got uio_pruss set up properly so that I > could run this example. The example uses a c script to mmap() a block of > memory in DDR and stores 3 values in the first 3 addresses of the mapped > memory, then it programs the pru with an assembly file that is compiled > with pasm, to simply configure OCP master port, configure one programmable > pointer to point at the DDR memory where the 3 values are, and configure > another programmable pointer to point to the pru's shared RAM. The pru > loads in the three values into 3 of its 32 registers, and then places them > in the first 3 address of its 12kB shared RAM. Then the pru halts after > interrupting the host c program that it finished, and the c program checks > the 3 registers in the shared RAM to see if they are the same values that > it originally stored in DDR RAM. >
AFAIK, it's not garantied that an mmap block of memory is contingouos. Have a look at https://en.wikipedia.org/wiki/Mmap When you need a reliable solution, you've to use the external memory allocated from kernel space by the uio_pruss driver (as mentioned above)! prussdrv_map_extmem(&ERam) ESize = prussdrv_extmem_size() EAddr = prussdrv_get_phys_addr(ERam) -- 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 beagleboard+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/2c30b2c2-b2ea-4d08-911d-d76507689c3e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.