Queries related to PRU drivers

Nils Hölscher nilhoel1 at gmail.com
Wed Jan 22 08:11:10 UTC 2020


Hi Utkarsh,



On Tue, 21 Jan 2020 at 18:06, Utkarsh Rai <utkarsh.rai60 at gmail.com> wrote:

> I have been waiting for my JTAG to arrive so that I can debug mmap
> related issues, meanwhile I have been going through the implementation of
> the PRU drivers on freebsd and linux and have few questions.
>
> 1. This
> <https://bitbucket.org/rpaulo/libpru/annotate/default/ti-pru.c?at=default&fileviewer=file-view-default#ti-pru.c-614>
> method  will fail without a file in /dev,  how are the drivers registered
> in /dev in rtems?
>
Yes you are right, the pruss  devices need to be registered in /dev.
Rtems-libbsd uses a FileDeviceTree (FDT) to map the devices on the board
and the Pruss driver should attach during boot.
You can read here
<https://nilshoel.home.blog/2019/08/03/the-libbsd-init-process-in-rtems-with-focus-on-driver-modules/>
how
drivers are attached in libbsd.
Also take a look at the rtems documentation here
<https://docs.rtems.org/branches/master/user/exe/device-tree.html>.
Also you need a FDT from the BSD repository, and load it via uboot with
rtems.

The actual driver is found here
<https://github.com/nilhoel1/rtems-libbsd/blob/pruss/freebsd/sys/arm/ti/ti_pruss.c>
.

> 2. As far as I could understand freebsd uses uio framework for
> communication between PRU and the kernel , how is that implemented for the
> RTEMS ?
>
When the devices are registered you use the code you linked in you first
question.
Basically the devices in /dev are hadeled like files but the driver links
the file operations to other driver related functions.

>
> 3. On a side note, building rtems application through waf is very erratic
> on my system( waf configure at times fails with 'could not find
> <machine/rtems-bsd-sysinit.h>' header) . What other build system can be
> useful for building rtems applications?
>
I'am sorry I can't help you with this one, since I only know about the waf
system myself.

>
> I am sorry if my questions seem a bit naive, I am new to open source
> development and I would be grateful for any help.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200122/d98b86bf/attachment.html>


More information about the devel mailing list