<?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>Blacklabel Development, Inc. Blog</title>
	<atom:link href="http://www.blacklabel-development.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blacklabel-development.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 14 Jul 2009 16:08:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Building libusb and avrdude (no more problems!)</title>
		<link>http://www.blacklabel-development.com/blog/2009/07/14/building-libusb-and-avrdude-no-more-problems/</link>
		<comments>http://www.blacklabel-development.com/blog/2009/07/14/building-libusb-and-avrdude-no-more-problems/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 16:08:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[notes]]></category>

		<guid isPermaLink="false">http://www.blacklabel-development.com/blog/?p=3</guid>
		<description><![CDATA[As much for my benefit as for anyone else, this is my recipe for building the 0.1 release of libusb and avrdude 5.8.  For the last few months I&#8217;ve been unable to successfully build and install libusb.  I tried off and on but lacked motivation until recently when I needed the latest avrdude and its [...]]]></description>
			<content:encoded><![CDATA[<p>As much for my benefit as for anyone else, this is my recipe for building the 0.1 release of libusb and avrdude 5.8.  For the last few months I&#8217;ve been unable to successfully build and install libusb.  I tried off and on but lacked motivation until recently when I needed the latest avrdude and its support for <a title="AT90USB162" href="http://atmel.com/dyn/products/product_card.asp?part_id=4097" target="_blank">AT90USB162</a> parts.</p>
<p>Finally, success thanks to notes on the Arduino playground: <a title="Using the AVR ISP mkII (USB) to burn the bootloader on MacOS X" href="http://www.arduino.cc/playground/Code/OSXISPMKII" target="_blank">Using the AVR ISP mkII (USB) to burn the bootloader on MacOS X</a>.</p>
<p><span id="more-3"></span>Start by grabbing the <a title="libusb source" href="http://sourceforge.net/projects/libusb/files/" target="_blank">libusb</a> tarball.  I used 0.1.12 from the legacy 0.1 branch.</p>
<p>Untar and cd into the libusb source directory.  Then, and this was the crucial bit for me:</p>
<blockquote>
<pre>$ IDIR=/Users/zeveland/temp
$ ./configure --prefix=$IDIR --disable-build-docs</pre>
</blockquote>
<p>Follow up with <em>make</em> and <em>sudo make install</em>.  Previous libusb build attempts had left headers and library files scattered all over my system; <em>&#8211;prefix</em> let me specify where the install should go so that avrdude could find it.  <em>&#8211;disable-build-docs</em> may be optional for you &#8211; I have an old version of jade that was causing build to fail on the docs.</p>
<p>After this, avrdude built fine for me but every programming attempt with an AVRISP mkII started with a five minute timeout while avrdude did&#8230; something.  Even though programming always worked eventually, the timeout was annoying.  An old message on <a href="http://article.gmane.org/gmane.comp.hardware.avr.avrdude.devel/958" target="_blank">comp.hardware.avr.avrdude.devel</a> pointed to the cause: the function <em>stk500v2_getsync() </em>in <em>stk500v2.c </em>in the avrdude distribution has a problem on some Intel Macs.  Like the OP&#8217;s author, I commented-out the function&#8217;s contents and recompiled.  The step-by-step (thanks again to the Playground post):</p>
<blockquote>
<pre>export CFLAGS=-I$IDIR/include
export LDFLAGS=-L$IDIR/lib
cd avrdude-5.8/
./configure --prefix=$IDIR
make
sudo make install</pre>
</blockquote>
<p>So it only took a few months, but libusb is working for me again.  Yay!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blacklabel-development.com/blog/2009/07/14/building-libusb-and-avrdude-no-more-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

