Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
BeagleBone PRU DMA Project Summary

BeagleBone PRU DMA Summary

I had a chance to take part in GSoC 2017 for with a project for BeagleBoard.org foundation called "BeagleBone PRU DMA", whose purpose was to enable developers targeting BeagleBone/PRU platform usage of DMA transfers performed by the EDMA controller which is a part of BBB's SoC.

The project consists of 3 main parts, which all are developed in one GitHub repository under following link:

https://github.com/maciejjo/beaglebone-pru-dma

PRU Library

firmware/lib/pru_dma_lib firmware/include

1st part is pru-dma library which is intended to be used in the code targetted for the PRU. It provides basic functionality enabling users configure and trigger DMA transfers from PRU. The library is located in the 'firmware' directory in the project repository.

2nd part is pru-dma kernel driver, which handles linux side part of DMA transfers - allocating and mapping buffers, presenting the configuration to PRU via firmware resource table, interrupt communication with PRU to provide synchronization.

Kernel driver

kernel-patch

Kernel driver was initially developed as a stand-alone out-of-tree driver, but when I integrated it with remoteproc framework I was forced to move it to kernel tree. To use it, kernel must be recomiled with patches which I provided in kernel-patch directory. Usage instructions are provided in the documentation.

Examples

examples

3rd part are example applications.

I created 3 example applications making use of the pru-dma framework, which all consist of firmware part and kernel module. Each application is described in it's own directory. They are available in the 'examples' directory.

Project Documentation

Documentation

Documentation including build instructions and API description is available in the 'Documentation' directory.

Conclusion

The project was challenging for me and gave me an opportunity to learn about the BeagleBoard platform and it's intricacies. I also had a chance to better understand various parts of Linux kernel.

I think that main goals that were behind this project were met, but there are still areas for improvement. I think that user API could have richer functionality, and better examples could be provided for the project.

I intend to support this project in the future, taking care of the shortcommings and implementing additional features.

I would like to thank the mentors, BeagleBone.org foundation and Google for this great opportunity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.