<div dir="ltr"><div dir="ltr">Hi Utkarsh,<div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 21 Jan 2020 at 18:06, Utkarsh Rai <<a href="mailto:utkarsh.rai60@gmail.com">utkarsh.rai60@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">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.<div><br></div><div>1. <a href="https://bitbucket.org/rpaulo/libpru/annotate/default/ti-pru.c?at=default&fileviewer=file-view-default#ti-pru.c-614" target="_blank">This</a> method will fail without a file in /dev, how are the drivers registered in /dev in rtems?</div></div></blockquote><div>Yes you are right, the pruss devices need to be registered in /dev.</div><div>Rtems-libbsd uses a FileDeviceTree (FDT) to map the devices on the board and the Pruss driver should attach during boot.</div><div>You can read <a href="https://nilshoel.home.blog/2019/08/03/the-libbsd-init-process-in-rtems-with-focus-on-driver-modules/">here</a> how drivers are attached in libbsd.</div><div>Also take a look at the rtems documentation <a href="https://docs.rtems.org/branches/master/user/exe/device-tree.html">here</a>.</div><div>Also you need a FDT from the BSD repository, and load it via uboot with rtems.</div><div><br></div><div>The actual driver is found <a href="https://github.com/nilhoel1/rtems-libbsd/blob/pruss/freebsd/sys/arm/ti/ti_pruss.c">here</a>. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>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 ?</div></div></blockquote><div>When the devices are registered you use the code you linked in you first question.</div><div>Basically the devices in /dev are hadeled like files but the driver links the file operations to other driver related functions.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>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?</div></div></blockquote><div>I'am sorry I can't help you with this one, since I only know about the waf system myself. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>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.</div><div><br></div></div>
</blockquote></div></div>