<div dir="ltr"><div>Hi James</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 3, 2020 at 4:30 PM James Fitzsimons <<a href="mailto:james.fitzsimons@gmail.com">james.fitzsimons@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">Hi Christian,<div><br></div><div>I tried to make a start this evening but I hate to say I ran into trouble getting my rtems environment setup, and after attempting to debug this for a couple of hours I thought I might see if you (or anyone else on the list) had some ideas.</div><div><br></div><div>I started by forking your <a href="https://gitlab.com/c-mauderer/rtems-bbb" target="_blank">https://gitlab.com/c-mauderer/rtems-bbb</a> gitlab repo and running make setup.</div><div><br></div><div>Everything progresses fine up until the "dtb" step in the makefile. At that point I get the following error:</div><div><br></div><div>make -C /home/james/Documents/rtems/rtems-bbb//devicetree MACHINE=arm install<br>make[1]: Entering directory '/home/james/Documents/rtems/rtems-bbb/devicetree'<br>/home/james/Documents/rtems/rtems-bbb//install/rtems/5/bin/dtc -@ -o /home/james/Documents/rtems/rtems-bbb//install/rtems/5/fdt/am335x-i2c-overlay.dtbo /home/james/Documents/rtems/rtems-bbb/devicetree//am335x-i2c-overlay.dtso<br>/home/james/Documents/rtems/rtems-bbb//install/rtems/5/bin/dtc: invalid option -- '@'<br>Usage: dtc [options] <input file><br></div><div><br></div><div>A bit of googling turned up some information that the -@ option is deprecated, and sure enough running ./install/rtems/5/bin/dtc --help shows that the version of dtc built (Version: DTC 1.4.1-gf2f0fdf1) does not have the @ option. I tried modifying the makefile in the devicetree directory so the last two lines look like this:</div><div><br></div></div></blockquote><div>The -@ option is required to generate the symbols without which there will be errors in applying the overlay. The -@ option is not present in version 1.4.1, you can build 1.4.6 from the source. I recently added the rsb recipe for 1.4.6 but there's no bset present and the devel/dtc builds the 1.4.1 . </div><div><br></div><div>Christian: Can we make a bset for dtc-1.4.6 which can be separately build like build/dtc-1.4.6.bset ?</div><div><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"><div></div><div>$(TARGETDIR)/%.dtbo: $(MAKEFILE_DIR)/%.dtso<br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>    $(PREFIX)/bin/dtc -o $@ $<</div></blockquote><div><br></div><div>Now running $make dtb gives the following output:</div><div><br></div><div>make[1]: Entering directory '/home/james/Documents/rtems/rtems-bbb/devicetree'<br>/home/james/Documents/rtems/rtems-bbb//install/rtems/5/bin/dtc -o /home/james/Documents/rtems/rtems-bbb//install/rtems/5/fdt/am335x-i2c-overlay.dtbo /home/james/Documents/rtems/rtems-bbb/devicetree//am335x-i2c-overlay.dtso<br>Error: /home/james/Documents/rtems/rtems-bbb/devicetree//am335x-i2c-overlay.dtso:2.2-8 syntax error<br>FATAL ERROR: Unable to parse input tree<br>Makefile:24: recipe for target '/home/james/Documents/rtems/rtems-bbb//install/rtems/5/fdt/am335x-i2c-overlay.dtbo' failed<br>make[1]: *** [/home/james/Documents/rtems/rtems-bbb//install/rtems/5/fdt/am335x-i2c-overlay.dtbo] Error 1<br>make[1]: Leaving directory '/home/james/Documents/rtems/rtems-bbb/devicetree'<br>Makefile:96: recipe for target 'dtb' failed<br>make: *** [dtb] Error 2<br>james@opportunity:~/Documents/rtems/rtems-bbb$<br></div><div><br></div><div>I'm not quite sure where to go from here though.</div><div><br></div><div>If I then run the following steps in the makefile manually, bootstrap and bsp complete, but libbsd fails with the following error:</div><div><br></div><div>[1497/2193] Compiling freebsd/sys/netpfil/pf/pf_lb.c<br>../../freebsd/sys/arm/freescale/imx/imx6_ccm.c:54:10: fatal error: arm/freescale/imx/imx_ccmvar.h: No such file or directory<br> #include <arm/freescale/imx/imx_ccmvar.h><br>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>compilation terminated.<br></div></div></blockquote><div><br></div><div>This bug was recently fixed in the rtems-libbsd ( for both master and 5-freebsd-12 branches), if you update to recent HEAD of the libbsd, then this error will hopefully not be there.</div><div><br></div><div>Best regards,</div><div>Vijay</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><br></div><div>Thanks for any advice you can provide.</div><div><br></div><div>Regards,</div><div>James Fitzsimons</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 27 Apr 2020 at 00:25, Christian Mauderer <<a href="mailto:oss@c-mauderer.de" target="_blank">oss@c-mauderer.de</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">Hello James,<br>
<br>
On 26/04/2020 12:05, James Fitzsimons wrote:<br>
> Hi Christian,<br>
> <br>
> Thanks for your reply.<br>
> <br>
> On Wed, 22 Apr 2020 at 23:29, Christian Mauderer<br>
> <<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a><br>
> <mailto:<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a>>> wrote:<br>
> <br>
>     Hello James,<br>
> <br>
>     On 20/04/2020 13:13, James Fitzsimons wrote:<br>
>     > I am interested in adding support for the eQEP (Enhanced Quadrature<br>
>     > Encoder Pulse Module) which I am using to decode the quadrature<br>
>     encoders<br>
>     > on my motors.<br>
> <br>
>     That one isn't implemented yet and I don't know of any current work on<br>
>     it. So feel free to go ahead.<br>
> <br>
> <br>
> Thanks for the encouragement - I will start with the eQEP drivers. <br>
> <br>
><br>
>     > I will eventually also need support for the ADC, PRU (I see some work<br>
>     > has already been done on that by a GSoC project),<br>
> <br>
>     There has been some work on PRU. I'm not entirely sure about ADC.<br>
> <br>
>     > and ideally the TI<br>
>     > WiLink 8 WL1835MOD wireless chipset - although I realise that might be<br>
>     > extremely difficult.<br>
> <br>
>     That depends: What kind of interface is used for that? And is the chip<br>
>     already supported in FreeBSD?<br>
> <br>
> <br>
> I have done a bit of research and can't find any FreeBSD support for it.<br>
> There are obviously linux drivers but I realise these are not suitable<br>
> for porting to RTEMS<br>
<br>
I had a look at the Linux drivers. They are GPL only. So you are right:<br>
They wouldn't be accepted in RTEMS. In theory you could use a private<br>
repo for a port of the drivers but expect a lot of maintenance effort if<br>
you want to keep them up to date.<br>
<br>
You should think about asking on a FreeBSD mailing list whether someone<br>
is working on a driver. Maybe someone is working on it and there already<br>
exists a partial or complete driver in some private or separate repository.<br>
<br>
>  <br>
> <br>
>     If it is an USB interface and it is supported in FreeBSD adding it<br>
>     shouldn't be much work. If it is an SDIO it will get a bit more<br>
>     difficult but still possible in a decent time frame. If FreeBSD doesn't<br>
>     know anything about it you will have a really hard time. WLAN drivers<br>
>     are _very_ complex and the need a lot of detail knowledge about the<br>
>     chipset and the regulations.<br>
> <br>
> <br>
> I'm pretty sure it uses an SDIO interface, but as you say without the<br>
> FreeBSD support it may be a bit of a long shot.<br>
>  <br>
<br>
Yes, seems to be SDIO. We had a GSoC project regarding SDIO two or three<br>
years ago. The student managed to do most of the work for a SDIO support<br>
in libbsd. But we could only partially merge it because at that point<br>
the libbsd was too far behind FreeBSD. One extra difficulty has been<br>
that SDIO was a compile time option in FreeBSD back then. You might want<br>
to take a look at the project and whether you can re-use some parts of<br>
it if you want to add the SDIO stuff.<br>
<br>
> <br>
>     > Are drivers for these features something that would be welcome in the<br>
>     > BBB BSP, and if so any tips for getting started?<br>
> <br>
>     Of course. Peripheral drivers are nearly always welcome.<br>
> <br>
>     For the PRU you might should contact the GSoC student working on the<br>
>     topic. For WLAN: Please check the interface and FreeBSD support. I don't<br>
>     know exactly what the eQEP does. But if there is a FreeBSD driver for it<br>
>     you might want to check that one too and maybe port it via libbsd<br>
>     (except the eQEP is a really simple module and it's a lot simpler to<br>
>     write the driver yourself in the BSP)<br>
> <br>
> <br>
> I'll make a start on the eQEP module (quadrature decoder for reading<br>
> encoders) and if that goes well I'll reach out to Nils Hölscher about<br>
> the PRU work.<br>
<br>
Sounds good. Feel free to ask questions on the mailing list anytime you<br>
think necessary. And although I don't think that you have too much<br>
overlap please keep an eye on this years GSoC projects and whether there<br>
is any influence on your code or vice versa.<br>
<br>
Best regards<br>
<br>
Christian Mauderer<br>
<br>
>  <br>
> Thanks and regards, <br>
> James Fitzsimons<br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> users mailing list<br>
> <a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a><br>
> <br>
</blockquote></div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a></blockquote></div></div>