Errors while building USB DWC OTG driver

Deval Shah deval.maker at gmail.com
Tue May 24 18:04:57 UTC 2016


Hello,

Currently, I am working on porting USB DWC OTG driver on Raspberry Pi. Last
year Yurii Shevtsov worked on the same. So, I forked the latest rtems-libbsd
and cherry-picked Yurii's commits. While building libbsd using waf, I got
the following error.

---------------------------------------------------------------------------------------------------------------------------
testsuite/arphole/test_main.c.17.o:(.rtemsroset.bsd.nexus.content+0x10):
undefined reference to `_bsd_bcm283x_dwcotg_nexusmodule_sys_init'
collect2: error: ld returned 1 exit status
...
---------------------------------------------------------------------------------------------------------------------------

This error is observed in all the testsuits which are related to networing.
Then according to this wiki
https://devel.rtems.org/wiki/GSoC/2015/RaspberryPiUSBSupport, I added
 following lines to those testsuits.

-- #include <bsp/nexus-devices.h>
-- SYSINIT_NEED_USB_CORE;
-- SYSINIT_DRIVER_REFERENCE(bcm283x_dwcotg, nexus);

I get the following redefiation error this time.
--------------------------------------------------------------------------------------------------------------------------
In file included from
/home/gadgetman/development/rtems/rtems-libbsd/testsuite/include/rtems/bsd/test/default-network-init.h:295:0,
                 from ../../testsuite/arphole/test_main.c:118:
/home/gadgetman/development/rtems/rtems-libbsd/rtemsbsd/include/bsp/nexus-devices.h:154:40:
error: redefinition of 'bcm283x_dwcotg_res'
 static const rtems_bsd_device_resource bcm283x_dwcotg_res[] = {
                                        ^~~~~~~~~~~~~~~~~~
In file included from ../../testsuite/arphole/test_main.c:57:0:
/home/gadgetman/development/rtems/rtems-libbsd/rtemsbsd/include/bsp/nexus-devices.h:154:40:
note: previous definition of 'bcm283x_dwcotg_res' was here
 static const rtems_bsd_device_resource bcm283x_dwcotg_res[] = {
                                        ^~~~~~~~~~~~~~~~~~
...
--------------------------------------------------------------------------------------------------------------------------

Also, looks like the error is only in the testsuits. USB drivers are
compiled properly. What is another way to test the port ? Is there any
other testsuit available ? Are there any other standard methods to evaluate
this ?

Thanks in advance,
Deval Shah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20160524/77719c9d/attachment.html>


More information about the devel mailing list