rtems-libbsd build problem for lpc24xx and lpc32xx.

Thomas Kim thomas73.kim at gmail.com
Sat Aug 13 14:25:15 UTC 2016


Dear Kirspel, Joel,

I found that lpc24xx or lpc32xx bsp can not support USB stack by libbsd
according to your advice.
On referencing, I attached building error log in case of lpc32xx bsp.
I am using rtems and libbsd which I downloaded this week.

I changed rtems bsp to altcycv_devkit. also, I attached my modified
usb-sysinit.h and rtems-bsd-sysinit.h for integrating usb stack for
altcycv_devkit.

my building procedure is in below;

1) ../rtems-4.12/configure --target=arm-rtems4.12
--enable-rtemsbsp=altcycv_devkit --enable-posix --disable-networking
--prefix=`pwd`/../rtems-package
2) export
RTEMS_MAKEFILE_PATH=`pwd`/rtems-package/arm-rtems4.12/altcycv_devkit
3) waf configure --prefix=`pwd`/../rtems-package
--rtems=`pwd`/../rtems-package --rtems-tools=/opt/rtems4.12-arm
--rtems-bsps=arm/altcycv_devkit
4) waf; waf_install
5) cd build/arm-rtems4.12-altcycv_devkit
6) arm-rtems4.12-nm usb01.exe > usb01.num

004798e4 D _bsd__start_set_modmetadata_set
00479988 D _bsd__start_set_nexus
00479988 D _bsd__start_set_sysctl_set
005069a8 D _bsd__start_set_sysinit_set
00504aa4 D _bsd_start_softclock_sys_init
00479988 D _bsd__stop_set_modmetadata_set
00479988 D _bsd__stop_set_nexus
00479a80 D _bsd__stop_set_sysctl_set
00506a9c D _bsd__stop_set_sysinit_set

At this time, I don't know where is this probem.

Please advise me.

Best Regards,
Thomas Kim


2016-08-13 5:17 GMT+09:00 Kirspel, Kevin <Kevin-Kirspel at idexx.com>:

> About 1.5 months ago, I tried porting rtems-libbsd for the lpc32xx BSP (or
> my version of it).  There was no support for lpc32xx MAC and the lpc32xx
> USB mass storage was broken.  I was also adding USB Serial support to
> rtems-libbsd.  I had all this working on RTEMS 4.10 with the older libusb
> port.  I was successful running the individual tests under rtems-libbsd
> (dhcp01, usb01) but was having issues when using rtems-libbsd with my
> application.  For some reason I could not get an IP address using the DHCP
> daemon (all though static IP was fine).  The USB mass storage stack was
> also spitting out errors that didn’t show up under the usb01 test.  I
> stopped working on it because of all the changes to the rtems-libbsd
> configuration that was going on at the time.  I was going to get back on it
> once the configuration changes were settled.
>
>
>
> Kevin Kirspel
>
> Electrical Engineer - Sr. Staff
>
> Opti Medical
>
> 235 Hembree Park Drive
>
> Roswell GA 30076
>
> Tel: (770)-510-4444 ext. 81642
>
> Direct: (770)-688-1642
>
> Fax: (770)-510-4445
>
>
>
> *From:* users [mailto:users-bounces at rtems.org] *On Behalf Of *Thomas Kim
> *Sent:* Friday, August 12, 2016 11:39 AM
> *To:* users at rtems.org
> *Subject:* rtems-libbsd build problem for lpc24xx and lpc32xx.
>
>
>
> Dear Sir,
>
>
>
> I am tring to build rtems and rtems-libbsd for lpc24xx and lpc32xx for
> finding a reason for not initlizing _bsd__start_set_nexus and
> _bsd__stop_set_nexus.
>
> I used two kinds of version in below;
>
>   - rtems 4.11.99 and rtems-libbsd (download date : 07.12)
>
>   - rtems 4.11.99 and rtems-libbsd (download date : 08.12)
>
>
>
> At this time, there is building error in part of ohci_lpc.c about two
> versions.
>
>
>
> If somebody build this successly, please let me know that.
>
>
>
> Best Regards,
>
> Thomas Kim
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160813/3ee35699/attachment-0002.html>
-------------- next part --------------
Waf: Entering directory `/home/thomas/projects/rtems-4.12/target/lpc-libbsd/rtems-libbsd/build/arm-rtems4.12-lpc32xx_mzx'
[864/958] Compiling rtemsbsd/sys/dev/usb/controller/ohci_lpc.c
[876/958] Compiling freebsd/sys/mips/mips/in_cksum.c
[877/958] Compiling testsuite/arphole/test_main.c
[878/958] Compiling testsuite/cdev01/test_cdev.c
In file included from /opt/rtems4.12-arm/arm-rtems4.12/include/stdio.h:35:0,
                 from /home/thomas/projects/rtems-4.12/target/lpc-libbsd/rtems-libbsd/rtemsbsd/include/machine/rtems-bsd-support.h:43,
                 from ../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:33:
/home/thomas/projects/rtems-4.12/target/lpc-libbsd/rtems-libbsd/freebsd/sys/sys/pcpu.h:200:13: error: 'CACHE_LINE_SIZE' undeclared here (not in a function)
 } __aligned(CACHE_LINE_SIZE);
             ^
In file included from ../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:237:0:
/home/thomas/projects/rtems-4.12/target/lpc-libbsd/rtems-libbsd/freebsd/sys/sys/mutex.h:313:2: error: #error LOCK_DEBUG not defined, include <sys/lock.h> before <sys/mutex.h>
 #error LOCK_DEBUG not defined, include <sys/lock.h> before <sys/mutex.h>
  ^~~~~
In file included from ../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:240:0:
/home/thomas/projects/rtems-4.12/target/lpc-libbsd/rtems-libbsd/freebsd/sys/sys/sx.h:225:2: error: #error "LOCK_DEBUG not defined, include <sys/lock.h> before <sys/sx.h>"
 #error "LOCK_DEBUG not defined, include <sys/lock.h> before <sys/sx.h>"
  ^~~~~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c: In function 'i2c_read':
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:327:19: error: dereferencing pointer to incomplete type 'const struct usb_otg_transceiver'
  i2c->rx_tx = self->i2c_addr | I2C_TX_START;
                   ^~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c: In function 'i2c_write':
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:352:19: error: dereferencing pointer to incomplete type 'const struct usb_otg_transceiver'
  i2c->rx_tx = self->i2c_addr | I2C_TX_START;
                   ^~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c: In function 'ohci_lpc_otg_transceiver_suspend':
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:382:39: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_otg_trans'; did you mean 'sc_io_res'?
   eno = usb_otg_transceiver_suspend(&e->sc_otg_trans);
                                       ^~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c: In function 'ohci_lpc_resume':
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:424:38: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_otg_trans'; did you mean 'sc_io_res'?
   eno = usb_otg_transceiver_resume(&e->sc_otg_trans);
                                      ^~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:430:6: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_otg_trans'; did you mean 'sc_io_res'?
    &e->sc_otg_trans,
      ^~
In file included from /home/thomas/projects/rtems-4.12/target/lpc-libbsd/rtems-package/arm-rtems4.12/lpc32xx_mzx/lib/include/bsp.h:26:0,
                 from ../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:35:
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:431:4: error: 'USB_OTG_VBUS_POWER_WITH_CHARGE_PUMP' undeclared (first use in this function)
    BSP_USB_OTG_TRANSCEIVER_VBUS
    ^
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:431:4: note: each undeclared identifier is reported only once for each function it appears in
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c: In function 'ohci_lpc_attach':
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:508:3: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_otg_trans'; did you mean 'sc_io_res'?
  e->sc_otg_trans.read = i2c_read;
   ^~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:509:3: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_otg_trans'; did you mean 'sc_io_res'?
  e->sc_otg_trans.write = i2c_write;
   ^~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:510:3: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_otg_trans'; did you mean 'sc_io_res'?
  e->sc_otg_trans.i2c_addr = BSP_USB_OTG_TRANSCEIVER_I2C_ADDR;
   ^~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:511:35: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_otg_trans'; did you mean 'sc_io_res'?
  eno = usb_otg_transceiver_init(&e->sc_otg_trans);
                                   ^~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:520:37: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_otg_trans'; did you mean 'sc_io_res'?
  eno = usb_otg_transceiver_resume(&e->sc_otg_trans);
                                     ^~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:541:5: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_otg_trans'; did you mean 'sc_io_res'?
   &e->sc_otg_trans,
     ^~
In file included from /home/thomas/projects/rtems-4.12/target/lpc-libbsd/rtems-package/arm-rtems4.12/lpc32xx_mzx/lib/include/bsp.h:26:0,
                 from ../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:35:
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:542:3: error: 'USB_OTG_VBUS_POWER_WITH_CHARGE_PUMP' undeclared (first use in this function)
   BSP_USB_OTG_TRANSCEIVER_VBUS
   ^
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:577:3: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_init_done'; did you mean 'sc_io_size'?
  e->sc_init_done = 1;
   ^~
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c: In function 'ohci_lpc_detach':
../../rtemsbsd/sys/dev/usb/controller/ohci_lpc.c:608:7: error: 'ohci_softc_t {aka struct ohci_softc}' has no member named 'sc_init_done'; did you mean 'sc_io_size'?
  if (e->sc_init_done) {
       ^~

Waf: Leaving directory `/home/thomas/projects/rtems-4.12/target/lpc-libbsd/rtems-libbsd/build/arm-rtems4.12-lpc32xx_mzx'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtems-bsd-sysinit.h
Type: text/x-chdr
Size: 3737 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20160813/3ee35699/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb-sysinit.h
Type: text/x-chdr
Size: 1021 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20160813/3ee35699/attachment-0005.bin>


More information about the users mailing list