ts-7000
[Top] [All Lists]

Re: [ts-7000] libusb

To:
Subject: Re: [ts-7000] libusb
From: Dino Sbrocca <>
Date: Thu, 6 Jul 2006 23:50:27 -0400 (EDT)
Anand,

I have achieved some level of success. 

1. I re-installed my cross toolchain from the TS web site    (ftp://ftp.embeddedarm.com/ts-arm-linux-cd/cross-toolchains/crosstool-linux-gcc-3.3.4-glibc-2.3.2-0.28rc39.tar.bz2)
2. I downloaded and unpacked the latest source for libusb (http://prdownloads.sourceforge.net/libusb/libusb-0.1.12.tar.gz)
3. I ran the following configure command.  The problem with the command that I sent to you previously was that it wasn't overriding the c++ compiler which is now required by version 0.1.12.  The old command caused the make utility to use the native c++ compiler.  ( CC=arm-linux-gcc CXX=arm-linux-gcc ./configure --prefix=/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/arm-linux --program-prefix=arm-linux- --host=arm-pc-linux-gnu)
4. I ran the make command (make).  This command will successfully compile all of the libusb core code and fail when it tries to compile the libusb test programs.  I ignored the test programs.
5. I adopted root authority (su)
6. I added the cross compiler to my path.  The new install process performs a compile.   (PATH=$PATH:/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/bin)
7. I ran the install (make install).  This command will successfully install all core libusb objects and fail when it tries to install the libusb test programs.  I ignored the test programs.
8.  I ftp'ed the libusb-0.1.so.4 file over to the /lib directory on the TS7260.
9. I cross compiled my test program and tested it on the TS7260.  It worked.

I will continue to investigate the failure of the libusb test programs.

Dino Sbrocca <> wrote:
Anand,

I downloaded the libusb source and tried to cross compile it from scratch on my SUSE linux host.  It failed.

The .so binary that I have installed in my cross compile environment and on my TS7260 is libusb-0.1.4.4.0.  This is an older version of libusb than the one I downloaded.  I do not have the original source that I used.  I will never make that mistake again.

I'll start over from scratch now and contact the libusb mailing list for help.  I'll keep detailed notes and send them to you when it works.

Dino

Anand S Madhusoodanan <> wrote:
Hi Dino,

I tried out the things you had mentioned in your previoue email. They worked until I typed in the make command.

At the make command it gave me an error saying it could not read the
.so file.

"libusb.so: could not read symbols: File in wrong format"

The exact mesage is pasted above.

Is there is a problem with the version of software that I am using? I had downloaded the Linux Crosstool gcc-3.3.4-glibc-2.3.2 -- 0.28rc39 (11-3-2004) from the website.

I look forward to your comments.

Regards
Anand S Madhusoodanan





Dino Sbrocca <> wrote:
I use libusb to communicate with a USB interface chip to a 1-Wire network.  I'm certainly not a linux expert but, the following may help.

To install libusb on the TS7260 I downloaded the source to libusb to a host linux machine and cross compiled it using the following commands:

CC=arm-linux-gcc ./configure --prefix=/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/arm-linux --program-prefix=arm-linux- --host=arm-pc-linux-gnu
make
make install

I then ftp'ed the .so file to the TS7260 and set the proper authorities.

To run a test program, I first load the USB modules on the TS7260 with TS's /usr/bin/loadUSBModules.sh script and then mount the USB file system with the following command:

mount -t usbdevfs none /proc/bus/usb

The test program was cross compiled on the host and then ftp'ed to the TS7260.  The test program just reads through the buses and devices recognized by the kernal and dumps them to the console.  It's a reasonably good test that you've loaded all the software properly.  Send me an e-mail if you want the source.

Dino





  

Anand S Madhusoodanan <> wrote:
Hi,

Has anyone used libusb on the TS7260? Any comments on how to go about using that package on the board would be greatly appreciated.

Regards
Anand S Madhusoodanan
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



Yahoo! Music Unlimited - Access over 1 million songs. Try it free.


__._,_.___


SPONSORED LINKS
Linux os Hardware Arms
Computer internet Computer security Computer hardware security


YAHOO! GROUPS LINKS

  •  Visit your group "ts-7000" on the web.
     
  •  To unsubscribe from this group, send an email to:
     =Unsubscribe
     
  •  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU