<?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>The choreography of color and code &#187; Arduino</title>
	<atom:link href="http://www.quietless.com/kitchen/category/arduino/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.quietless.com/kitchen</link>
	<description>The personal writings &#38; experiments of Stephen Braitsch</description>
	<lastBuildDate>Mon, 16 Jan 2012 04:59:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Setting up Xcode to Compile &amp; Upload to an Arduino ATMega328 (Duemilanove)</title>
		<link>http://www.quietless.com/kitchen/setting-up-xcode-to-compile-upload-to-an-arduino-atmega328-duemilanove/</link>
		<comments>http://www.quietless.com/kitchen/setting-up-xcode-to-compile-upload-to-an-arduino-atmega328-duemilanove/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 19:23:43 +0000</pubDate>
		<dc:creator>Stephen Braitsch</dc:creator>
				<category><![CDATA[Arduino]]></category>

		<guid isPermaLink="false">http://www.quietless.com/kitchen/?p=500</guid>
		<description><![CDATA[This morning Joshua Noble tweeted a link to this excellent post that details how to setup your Xcode environment to compile &#038; upload to an older Arduino168 like a Diecimila. This is awesome for anyone who would rather code in a more feature rich environment than the Processing / Arduino IDE such as myself. However, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.quietless.com%2Fkitchen%2Fsetting-up-xcode-to-compile-upload-to-an-arduino-atmega328-duemilanove%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.quietless.com%2Fkitchen%2Fsetting-up-xcode-to-compile-upload-to-an-arduino-atmega328-duemilanove%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This morning <a href="http://thefactoryfactory.com/">Joshua Noble</a> tweeted a link to this <a href="http://robertcarlsen.net/2009/02/28/using-arduino-in-xcode-532">excellent post</a> that details how to setup your Xcode environment to compile &#038; upload to an older Arduino168 like a <a href="http://arduino.cc/en/Main/ArduinoBoardDiecimila">Diecimila</a>. This is awesome for anyone who would rather code in a more feature rich environment than the Processing / Arduino IDE such as myself. However, while trying to get this working with my <a href="http://arduino.cc/en/Main/ArduinoBoardDuemilanove">Duemilanove</a>, I ran into a few problems compiling and uploading code to the board. </p>
<p>After sifting through the comments and making some tweaks to the Makefile I finally got this working and so without further ado, here are the steps to get Xcode talking to your ATMega328 (Duemilanove). </p>
<p>1. Install Xcode obviously if you haven&#8217;t already.<br />
2. Download &#038; Install the <a href="http://arduino.cc/en/Main/Software">Arduino IDE</a> as you still need the core Arduino libraries to compile against.<br />
3. Download &#038; Install the <a href="http://www.obdev.at/products/crosspack/download.html">AVR Programming Tools.</a> The most recent version worked fine for me.</p>
<p><img src="http://www.quietless.com/kitchen/wp-content/uploads/2010/07/avr-crosspack.png" alt="CrossPack-AVR-20100115.dmg" /><br />
<span id="more-500"></span><br />
4. Download this <a href="http://quietless.com/zip/ArduinoOnXcode.zip">Project Template</a> to compile &#038; upload the &#8220;Blink&#8221; sketch to confirm everything is working.<br />
5. Unzip the template and put it in /Developer/Library/Xcode/Project Templates/Other/<br />
6. Now fire up Xcode and create a new project from the template found in Other -> ArduinoOnXcode</p>
<p><img src="http://www.quietless.com/kitchen/wp-content/uploads/2010/07/arduino-template.png" alt="Arduino-Template" title="Arduino-Template" width="575" height="400" /></p>
<p>Now take a look at the Makefile in your new project. This file defines all your compiler arguments and tells Xcode where to find the dependency libraries it needs on your system.</p>
<p><img src="http://www.quietless.com/kitchen/wp-content/uploads/2010/07/arduino-makefile.png" alt="Arduino-Makefile" title="Arduino-Makefile" width="575" height="400" /></p>
<p>The AVR Programming tools should have installed to /usr/local/CrossPack-AVR</p>
<p>If for some reason this is not the case be sure to set the correct path so Xcode can find your CrossPack in the AVRDUDE_DIR on line 65. Note also that /usr/local/CrossPack-AVR is a symlink so if you are using a newer version of the CrossPack this path should still work fine.</p>
<p>At this point connect your Arduino to one of your USB ports, change the Active Target to &#8220;Upload&#8221; and select &#8220;Clean All Targets&#8221; from the Build menu and you should see the the TX/RX lights flash rapidly as the code is compiled and uploaded to the board.</p>
<p>Now go ahead and make some changes to the main.cpp file in your project, recompile and you should see these changes reflected on your board.</p>
<p>Note, I still get a few warnings on compilation that I think are related to properties in the Makefile.<br />
Any suggestions to remedy these warnings or any other improvements are most welcome in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.quietless.com/kitchen/setting-up-xcode-to-compile-upload-to-an-arduino-atmega328-duemilanove/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

