<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>coding &#187; usb stlinux sh4 libusb</title>
	<atom:link href="http://www.coding.com.br/tag/usb-stlinux-sh4-libusb/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.coding.com.br</link>
	<description>have you coded today?</description>
	<lastBuildDate>Thu, 18 Aug 2011 17:29:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>libusb-1.0 with STLinux (sh4 platform)</title>
		<link>http://www.coding.com.br/embarcado/libusb-1-0-with-stlinux-sh4-platform/</link>
		<comments>http://www.coding.com.br/embarcado/libusb-1-0-with-stlinux-sh4-platform/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 01:47:10 +0000</pubDate>
		<dc:creator>Tiago Maluta</dc:creator>
				<category><![CDATA[embarcado]]></category>
		<category><![CDATA[usb stlinux sh4 libusb]]></category>

		<guid isPermaLink="false">http://www.coding.com.br/?p=116</guid>
		<description><![CDATA[How-to of installing libusb-0.1 on STLinux]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a title="STLinux " href="http://www.stlinux.com/drupal/" target="_blank">STLinux</a> Distribution comes with <a title="libusb web-site" href="http://www.libusb.org/" target="_blank">libusb</a>-0.1 to access USB interface in user-space, it works but the new version implements new features (i.e asynchronous interface).  Note that libusb-1.0 is not backwards compatible with libusb-0.1 although you can have both libusb versions present on the same system without conflict.</p>
<p style="text-align: justify;">Select one mirror <a title="Download libusb-1.0.2" href="http://ufpr.dl.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.2/libusb-1.0.2.tar.bz2" target="_blank">near</a> to you and set your cross compiler to produce an object SH4-compatible. I&#8217;m using some <a href="http://www.coding.com.br/wiki/BuildingGuidelines">building guidelines</a> to organize my files.</p>
<pre>  CC=sh4-linux-gcc ./configure --host=sh4-linux --prefix=$(cd ../install &amp;&amp; pwd)
  make
  make install</pre>
<p style="text-align: justify;">I prefer use a different folder to especific libs so I&#8217;ve copied the contents of install/ to target rootfs directory</p>
<ul>
<li>Headers (libusb.h and libusbi.h) in /usr/local/include</li>
<li>Shared libs (libusb-1.0.so.0.0.0) in /usr/local/lib/</li>
</ul>
<p>And made a symbolic link to system lib folder.</p>
<pre>  ln -s /usr/local/lib/libusb-1.0.so.0.0.0 /usr/lib/libusb-1.0.so.0</pre>
<p style="text-align: justify;">Finally, check some code using new library. My test code was lsusb.c from examples/ in libusb-1.0.2 directory.</p>
<pre>  sh4-linux-gcc lsusb.c -o lsusb -lusb-1.0</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.coding.com.br/embarcado/libusb-1-0-with-stlinux-sh4-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
