<?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>exploration &#187; mac</title>
	<atom:link href="http://robertcarlsen.net/tag/mac/feed" rel="self" type="application/rss+xml" />
	<link>http://robertcarlsen.net</link>
	<description>accounts of success and misadventure</description>
	<lastBuildDate>Tue, 13 Jul 2010 14:37:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Golden Cheetah 1.2.0rc1</title>
		<link>http://robertcarlsen.net/2009/09/07/golden-cheetah-1-2-0rc1-944</link>
		<comments>http://robertcarlsen.net/2009/09/07/golden-cheetah-1-2-0rc1-944#comments</comments>
		<pubDate>Mon, 07 Sep 2009 19:49:39 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Golden Cheetah]]></category>
		<category><![CDATA[10.6]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[universal]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/?p=944</guid>
		<description><![CDATA[Golden Cheetah is about to release a new version. There have been extensive updates&#8230;some great, unique new features for analyzing cycling power training data. The full feature list will be  announced with the official release. In brief:

direct SRM download
colorized power zones in plots
altitude (from supported files)
WKO file support (including bulk import)
Critical Power (CP60) computation [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-945" title="gc-color" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/09/gc-color-150x150.jpg" alt="gc-color" width="150" height="150" />Golden Cheetah is about to release a new version. There have been extensive updates&#8230;some great, unique new features for analyzing cycling power training data. The full feature list will be  announced with the official release. In brief:</p>
<ul>
<li>direct SRM download</li>
<li>colorized power zones in plots</li>
<li>altitude (from supported files)</li>
<li>WKO file support (including bulk import)</li>
<li>Critical Power (CP60) computation from aggregate CP data.</li>
<li>weekly plot of time/distance and BikeScore/Intensity</li>
<li>calendar view of workouts</li>
</ul>
<p>There has also been significant work done under the hood in preparation for a pretty big announcement coming in the next few weeks. Exciting times.</p>
<p>Mac release candidate is available <a href="http://robertcarlsen.net/media/gc/GoldenCheetah_Mac_Universal-1.2.0rc1.zip">here</a>. Linux and windows versions will be announced on the Golden Cheetah <a href="http://goldencheetah.org/cgi-bin/mailman/listinfo/golden-cheetah-users" onclick="pageTracker._trackPageview('/outgoing/goldencheetah.org/cgi-bin/mailman/listinfo/golden-cheetah-users?referer=');">mailing list</a>.</p>
<p>&#8212;</p>
<p>For posterity, I&#8217;ve upgraded my dev system to OS 10.6, Snow Leopard, and had to rebuild Qt and QWT. Since we want Golden Cheetah to continue to support PPC/Intel and 10.4+, here is the configure command I needed to use for building Qt 4.5.2.</p>
<pre class="brush: plain;">
./configure -static -prefix /usr/local/Qt4.5.2 -make libs -opensource -qt-sql-sqlite -LD=&quot;gcc -mmacosx-version-min=10.4&quot; -confirm-license -universal -sdk /Developer/SDKs/MacOSX10.5.sdk
</pre>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/09/07/golden-cheetah-1-2-0rc1-944/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>openFrameworks + iPhone libs</title>
		<link>http://robertcarlsen.net/2009/03/25/openframeworks-iphone-libs-593</link>
		<comments>http://robertcarlsen.net/2009/03/25/openframeworks-iphone-libs-593#comments</comments>
		<pubDate>Thu, 26 Mar 2009 04:09:19 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[lib]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[makefile]]></category>
		<category><![CDATA[openframeworks]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=593</guid>
		<description><![CDATA[I&#8217;ve had a few days to test the libraries I cobbled together for using openFrameworks with iPhone and also received positive reports from some folks who tried out the Makefiles I provided to them, so here they are for anyone who&#8217;s willing to try them out. -please make these instructions better if you see fit- [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/of_iphone.png" rel="lightbox[593]"><img class="alignright size-full wp-image-604" title="of_iphone" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/of_iphone.png" alt="of_iphone" width="123" height="119" /></a>I&#8217;ve had a few days to test the libraries I cobbled together for using openFrameworks with iPhone and also received positive reports from some folks who tried out the Makefiles I provided to them, so here they are for anyone who&#8217;s willing to try them out. -please make these instructions better if you see fit- <span id="more-593"></span></p>
<p>Update (7.8.2009): Fixed some errant quote mark substitutions in the freetype configure line. Also corrected a tab formatting error in the freeimage makefile.</p>
<p>Ok, here goes. This is going to be a work-in-progress document. Of course, there are no promises with this and your mileage may vary&#8230;but it&#8217;s been working for me. Please report success (and trouble, hopefully with workarounds).</p>
<p>The basic &#8220;tutorial&#8221; I followed is on Memo Akten&#8217;s blog, <a href="http://memo.tv/developing_for_iphone_using_openframeworks_and_ofxiphone" onclick="pageTracker._trackPageview('/outgoing/memo.tv/developing_for_iphone_using_openframeworks_and_ofxiphone?referer=');">memo.tv</a></p>
<p>I&#8217;d highly suggest following Memo&#8217;s tutorial for setting up the development environment. However, there are three libraries that he mentions in his article that need to be built for the iPhone specifically: <a href="http://code.google.com/p/iphone-glu/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/iphone-glu/?referer=');">glu</a>, <a href="http://www.freetype.org/" onclick="pageTracker._trackPageview('/outgoing/www.freetype.org/?referer=');">freetype</a> and <a href="http://freeimage.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/freeimage.sourceforge.net/?referer=');">freeimage</a>. Although he mentions that they have been ported to iPhone I wasn&#8217;t able to locate binaries of the libraries, and went through the process of cross-compiling them myself. This post documents what I needed to do to accomplish that.</p>
<p>You&#8217;ll need to download the source for each of the libraries listed above, as well as a svn copy of open frameworks plus the <a href="http://code.google.com/p/ofxiphone/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/ofxiphone/?referer=');">ofxiPhone</a>, <a href="http://code.google.com/p/ofxmsaof/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/ofxmsaof/?referer=');">ofxMultiTouch and ofxAccelerometer</a> addons. I preferred to use <a href="http://github.com/lian/ofx-dev/tree/master" onclick="pageTracker._trackPageview('/outgoing/github.com/lian/ofx-dev/tree/master?referer=');">ofx-dev</a> which bundled this and many more addons. You also need the <a href="http://developer.apple.com/" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/?referer=');">Apple Developer Tools</a> including Xcode and the iPhone SDK.</p>
<p><strong>GLU for iPhone:</strong><br />
The glu for iphone package builds painlessly. Build twice: once for the iPhone, once for the iPhone Simulator. Make sure to do a &#8220;make clean&#8221; before building the second version. The readme explains the make command. I copied the entire folder to ofx-dev/libs/gluiphone</p>
<p>The other two were more difficult for me. I&#8217;ve never cross-compiled, so perhaps that contributed to the trouble I had.</p>
<p><strong>FreeImage:</strong><br />
Here is the makefile that I came up with, based on the existing files and what I saw in the glu makefile. Copy the makefile listed below as &#8220;Makefile.iphone&#8221; alongside the others in the source directory, then run &#8220;make -f Makefile.iphone&#8221;. This should build both the iPhone and iPhone Simulator libraries into the &#8220;Dist&#8221; folder. Copy both files to ofx-dev/libs/freeimage/lib</p>
<div style="max-width:550px">
<pre class="brush: cpp; wrap-lines: false;">
# Configuration for iPhone OS, making static libs
# this will generate both iPhone (arm) and iPhoneSimulator (i686) libs

include Makefile.srcs

CFLAGS =  -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing
CXXFLAGS =  -g -O2 -Wall -fno-strict-aliasing

GCC_VERSION = 4.0
IPHONEOS_DEPLOYMENT_TARGET = 2.1
MACOSX_DEPLOYMENT_TARGET = 10.5

PLATFORM_SIM = iPhoneSimulator
PLATFORM_PHONE = iPhoneOS

ARCH_SIM = i686
ARCH_PHONE = armv6

PLATFORM_SIM_DEVELOPER_BIN_DIR = /Developer/Platforms/$(PLATFORM_SIM).platform/Developer/usr/bin
PLATFORM_PHONE_DEVELOPER_BIN_DIR = /Developer/Platforms/$(PLATFORM_PHONE).platform/Developer/usr/bin

SDKROOT_SIM = /Developer/Platforms/$(PLATFORM_SIM).platform/Developer/SDKs/$(PLATFORM_SIM)$(IPHONEOS_DEPLOYMENT_TARGET).sdk
SDKROOT_PHONE = /Developer/Platforms/$(PLATFORM_PHONE).platform/Developer/SDKs/$(PLATFORM_PHONE)$(IPHONEOS_DEPLOYMENT_TARGET).sdk

EXTRA_CFLAGS_SIM += -arch $(ARCH_SIM) -pipe -mdynamic-no-pic -fvisibility=hidden $(INCLUDE) -isysroot $(SDKROOT_SIM)
EXTRA_LDFLAGS_SIM += -arch $(ARCH_SIM) -isysroot $(SDKROOT_SIM) -Wl,-dead_strip
EXTRA_CFLAGS_SIM += -D__IPHONE_OS_VERSION_MIN_REQUIRED=20000 -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
EXTRA_LDFLAGS_SIM += -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)

EXTRA_CFLAGS_PHONE += -arch $(ARCH_PHONE) -pipe -mdynamic-no-pic -fvisibility=hidden $(INCLUDE) -isysroot $(SDKROOT_PHONE)
EXTRA_LDFLAGS_PHONE += -arch $(ARCH_PHONE) -isysroot $(SDKROOT_PHONE) -Wl,-dead_strip
EXTRA_CFLAGS_PHONE += -miphoneos-version-min=$(IPHONEOS_DEPLOYMENT_TARGET)
EXTRA_LDFLAGS_PHONE += -miphoneos-version-min=$(IPHONEOS_DEPLOYMENT_TARGET)

AR_SIM = $(PLATFORM_SIM_DEVELOPER_BIN_DIR)/ar
AR_PHONE = $(PLATFORM_PHONE_DEVELOPER_BIN_DIR)/ar

CC_SIM = $(PLATFORM_SIM_DEVELOPER_BIN_DIR)/gcc-$(GCC_VERSION)
CC_PHONE = $(PLATFORM_PHONE_DEVELOPER_BIN_DIR)/gcc-$(GCC_VERSION)

CFLAGS_SIM = $(CFLAGS) $(EXTRA_CFLAGS_SIM)
LDFLAGS_SIM = $(EXTRA_LDFLAGS_SIM)
CXX_SIM = $(PLATFORM_SIM_DEVELOPER_BIN_DIR)/g++-$(GCC_VERSION)
CXXFLAGS_SIM += $(EXTRA_CFLAGS_SIM) -fvisibility-inlines-hidden
LIBTOOL_SIM = /Developer/Platforms/$(PLATFORM_SIM).platform/Developer/usr/bin/libtool

CFLAGS_PHONE = $(CFLAGS) $(EXTRA_CFLAGS_PHONE)
LDFLAGS_PHONE += $(EXTRA_LDFLAGS_PHONE)
CXX_PHONE = $(PLATFORM_PHONE_DEVELOPER_BIN_DIR)/g++-$(GCC_VERSION)
CXXFLAGS_PHONE += $(EXTRA_CFLAGS_PHONE) -fvisibility-inlines-hidden
LIBTOOL_PHONE = /Developer/Platforms/$(PLATFORM_PHONE).platform/Developer/usr/bin/libtool

TARGET = freeimage
STATICLIB_SIM = lib$(TARGET)-iphonesimulator.a
STATICLIB_PHONE = lib$(TARGET)-iphone.a
HEADER = Source/FreeImage.h

.SUFFIXES: .o-i686 .o-arm
MODULES_ARM = $(SRCS:.c=.o-arm)
MODULES_ARM := $(MODULES_ARM:.cpp=.o-arm)
MODULES_i686 = $(SRCS:.c=.o-i686)
MODULES_i686 := $(MODULES_i686:.cpp=.o-i686)

default: all

all: dist

dist: FreeImage
	cp *.a Dist
	cp Source/FreeImage.h Dist

FreeImage: $(STATICLIB_SIM) $(STATICLIB_PHONE)

$(STATICLIB_SIM): $(MODULES_i686)
	$(LIBTOOL_SIM) -arch_only i686 -o $@ $(MODULES_i686)

.c.o-i686:
	$(CC_SIM) $(CFLAGS_SIM) -c $&lt; -o $@

.cpp.o-i686:
	$(CXX_SIM) $(CXXFLAGS_SIM) -c $&lt; -o $@

$(STATICLIB_PHONE): $(MODULES_ARM)
	$(LIBTOOL_PHONE) -arch_only armv6 -o $@ $(MODULES_ARM)

.c.o-arm:
	$(CC_PHONE) $(CFLAGS_PHONE) -c $&lt; -o $@

.cpp.o-arm:
	$(CXX_PHONE) $(CXXFLAGS_PHONE) -c $&lt; -o $@

clean:
	rm -f core Dist/*.* u2dtmp* $(MODULES_i686) $(MODULES_ARM) $(STATICLIB_SIM) $(STATICLIB_PHONE)
</pre>
</div>
<p><strong>FreeType:</strong><br />
Their makefile situation got me all confused so i just passed command like configure arguments as necessary. This is pretty ugly. -Please make this better someone-</p>
<div style="max-width:550px">
<pre class="brush: cpp; wrap-lines: false;">
#building freetytpe for iphone
# for iPhone
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1 CFLAGS=&quot;-arch armv6 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/libxml2 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk&quot; CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar LDFLAGS=&quot;-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -Wl,-dead_strip -miphoneos-version-min=2.0&quot;

# for iPhone simulator
./configure --prefix=/usr/local/iphone --enable-static=yes --enable-shared=no CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 CFLAGS=&quot;-arch i686 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -mmacosx-version-min=10.5  -I/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/usr/include/ -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk&quot; CPP=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar LDFLAGS=&quot;-arch i686 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk -Wl,-dead_strip -mmacosx-version-min=10.5&quot;
</pre>
</div>
<p>Run one of the configure lines, then make. I got an error about &#8220;asm&#8221; being undefined&#8230;I think it was in include/freetype/config/ftconfig.h. Change &#8220;asm&#8221; to &#8220;__asm__&#8221; (that&#8217;s two underscores for both prefix and suffix). If it works then it drops the lib in a hidden dir: &#8220;./objs/.libs&#8221;.  Copy the static lib out of there and rename it as appropriate.  i&#8217;m using libfreetype-iphone.a and libfreetype-iphonesimulator.a. Run make clean and then run the other configure line and make again. There were some headers missing in from the freetype lib provided with ofx-dev that I noticed in the example ofxiPhone aps&#8230;so I copied the entire freetype folder to ofx-dev/libs/freetype-iphone. I put the libraries into freetype-iphone/lib so i could keep everything straight when setting up xcode.</p>
<p>Ok, I think this gets up to the point where we can set up xcode.</p>
<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/ofxiphone_xcode.png" rel="lightbox[593]"><img class="alignright size-thumbnail wp-image-602" title="ofxiphone_xcode" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/ofxiphone_xcode-150x150.png" alt="ofxiphone_xcode" width="150" height="150" /></a>Copy one of the ofxiPhone examples to ofx-dev/apps/dev and open it up in xcode. I used the Graphics example. There is some more explanation on Memo&#8217;s site about the project structure, but it was very similar to adding any other addons. However, I put gluiphone, freetype-iphone and freeimage into the libs&gt;core&gt;core libraries package in the xcode project. I&#8217;ve attached a screenshot to illustrate better than i can explain. (ofxVectorMath is there for the specific project i have open, is not required).</p>
<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/user-search-paths.png" rel="lightbox[593]"><img class="alignleft size-thumbnail wp-image-603" style="margin-right: 2px;" title="user-search-paths" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/user-search-paths-150x150.png" alt="user-search-paths" width="150" height="150" /></a></p>
<p>Go to menu Project&gt;Edit Project Settings&#8230; and switch to the build tab. Set configuration to &#8220;All Configurations&#8221; and add in the library and header search paths as appropriate&#8230;just like setting up addons.</p>
<p>Set the Overview to Simulator &#8211; 2.0 | Debug and try to build. Make sure that all the appropriate libraries have been added to the Target. xcode seems to be able to pick the correct ones for the given architecture.</p>
<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/library-search-paths.png" rel="lightbox[593]"><img class="size-thumbnail wp-image-601 alignright" title="library-search-paths" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/library-search-paths-150x125.png" alt="library-search-paths" width="150" height="125" /></a></p>
<p>I initially got an error about a bad BOOL typedef in FreeImage.h:130 I changed it to typedef int8_t BOOL. In perhaps a separate issue, I don&#8217;t seem to be able to use the &#8220;Boolean&#8221; datatype, but can replace it with &#8220;bool&#8221; instead.</p>
<p>So, that&#8217;s what I did to get my system all set up to use openFrameworks with the iPhone. Feel free to let me know how it works out if you use this for yourself. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/03/25/openframeworks-iphone-libs-593/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Using Arduino in Xcode</title>
		<link>http://robertcarlsen.net/2009/02/28/using-arduino-in-xcode-532</link>
		<comments>http://robertcarlsen.net/2009/02/28/using-arduino-in-xcode-532#comments</comments>
		<pubDate>Sat, 28 Feb 2009 22:31:40 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[make]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[itp]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=532</guid>
		<description><![CDATA[While the Arduino IDE (Integrated Development Environment) is relatively simple way to program the Arduino hardware, I found myself getting frustrated by it&#8217;s limited features after spending time using Xcode and Eclipse. There are some simple tutorials available online which demonstrate how to set up Xcode for programming the Arduino, however these didn&#8217;t &#8220;just work&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>While the Arduino IDE (Integrated Development Environment) is relatively simple way to program the Arduino hardware, I found myself getting frustrated by it&#8217;s limited features after spending time using Xcode and Eclipse. There are some simple tutorials available online which demonstrate how to set up Xcode for programming the Arduino, however these didn&#8217;t &#8220;just work&#8221; for me, and were targeting arduino-0.10.</p>
<p>I made a few (simple in hindsight) changes to the project which has worked well for me so far.<span id="more-532"></span></p>
<h3>Bill of Materials</h3>
<ul>
<li><a href="http://developer.apple.com/mac/" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/mac/?referer=');">Xcode</a> &#8211; provided with the Apple Developer Tools</li>
<li><a href="http://arduino.cc/en/Main/Software" onclick="pageTracker._trackPageview('/outgoing/arduino.cc/en/Main/Software?referer=');">Arduino IDE</a> &#8211; needed for the core libraries for programming the Arduino</li>
<li><a href="http://www.obdev.at/products/avrmacpack/download.html" onclick="pageTracker._trackPageview('/outgoing/www.obdev.at/products/avrmacpack/download.html?referer=');">AVR programming tools</a>. Easiest solution is to install the AVRMacPack.
<ul>
<li>You can alternatively install avr-gcc, avr-libc, avrdude and libusb via MacPorts or Fink.</li>
</ul>
</li>
<li><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/02/arduinoonxcode.zip">Project Template</a> for Arduino on Xcode.
<ul>
<li>For reference: <a href="http://1175.free.fr/?browse=Arduino%20on%20Xcode" onclick="pageTracker._trackPageview('/outgoing/1175.free.fr/?browse=Arduino_20on_20Xcode&amp;referer=');">Original source</a> of the ArduinoXcode project template.</li>
</ul>
</li>
</ul>
<h3>Set-up</h3>
<ol>
<li>Install Xcode. Typically at /Developer</li>
<li>Install Arduino. Typically at /Applications/arduino-x.xx<br />
<strong>Update:</strong> Arduino 017+ on OS X is now provided as an application bundle. See below.</li>
<li>Install AVRMacPack. The tools are located at /usr/local/AVRMacPack</li>
<li>Uncompress the ArduinoOnXcode project template. Move it to /Developer/Library/Xcode/Project Templates/Other/</li>
<li>Open the Makefile in the ArduinoOnXcode folder. Edit the ARDUINO and AVRDUDE_DIR lines to reflect your system. The default values should work &#8220;as is&#8221; with this tutorial. <strong>Note:</strong> for Arduino 017+ change the ARDUINO path to:<br />
/Applications/Arduino.app/Contents/Resources/Java/hardware/cores/arduino</li>
</ol>
<h3>Use</h3>
<p>Create a new project in Xcode and select Other&gt;ArduinoOnXcode. You&#8217;ll be prompted for a save location for the new project. Select a location and name and click &#8220;Save&#8221;.</p>
<p>The code for your sketch is written in &#8220;main.cpp&#8221;. Any custom functions you write will need to be either prototyped at the top of the file where indicated, or will have to be declared before they are used in setup() or loop(). A prototype just indicates the return value and any arguments a function requires. The blink function returns nothing (void) and expects two integer arguments, which is prototyped as: void blink(int n, int d); Again, look at the example code in the template for guidance.</p>
<h3>Compiling/Uploading to Arduino</h3>
<h3><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/02/activetarget.png" rel="lightbox[532]"><img class="size-full wp-image-535" style="clear: both;" title="activetarget" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/02/activetarget.png" alt="activetarget" width="374" height="80" /></a></h3>
<p>Connect the Arduino via USB. Change the Active Target to &#8220;Upload&#8221;. The select Build&gt;Clean All Targets. This will compile the code and upload it to the Arduino. The template contains a simple blink sketch to confirm that the process worked.</p>
<h3>Serial Terminal</h3>
<p>I recall a neat trick to enable easy access to opening a serial terminal through Xcode, but can&#8217;t find it now. In the meantime you can use the Terminal.app to open a serial connection to the Arduino:</p>
<ol>
<li> Open /Applications/Utilities/Terminal.app</li>
<li>The the command prompt in the new terminal window type (without the quote marks),
<ul>
<li>&#8220;screen /dev/tty.usbserial&#8221;</li>
<li>Hit the Tab key. The rest of the serial port&#8217;s name should appear. If it doesn&#8217;t, verify that the Arduino is plugged in via serial and is powered on.</li>
<li>For example, the command for my Arduino looks like: &#8220;screen /dev/tty.usbserial-A4001Jdl&#8221;</li>
</ul>
</li>
<li>Press return to execute the screen command. The Arduino will reset and should open the serial port.</li>
<li>You can type to send characters, but there is no local echo (ie. you won&#8217;t see the typed characters)</li>
<li>To exit and close the serial port
<ul>
<li>Press Control-A then &#8216;k&#8217; to &#8220;kill&#8221; the window. This just stops the screen program and returns to the command prompt.</li>
</ul>
</li>
</ol>
<p>Of course, you could use ZTerm instead&#8230;<br />
Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/02/28/using-arduino-in-xcode-532/feed</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Golden Cheetah 1.0.277 released!</title>
		<link>http://robertcarlsen.net/2009/01/09/golden-cheetah-10277-released-271</link>
		<comments>http://robertcarlsen.net/2009/01/09/golden-cheetah-10277-released-271#comments</comments>
		<pubDate>Sat, 10 Jan 2009 02:23:29 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Golden Cheetah]]></category>
		<category><![CDATA[cycling]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=271</guid>
		<description><![CDATA[Golden Cheetah 1.0.277 released!]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-272" style="margin-top: 3px; margin-bottom: 3px;" title="gc_10277" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/01/gc_10277-300x213.png" alt="gc_10277" width="300" height="213" />We finally got a new version of Golden Cheetah out the door&#8230;.it&#8217;s been only like, almost a year. Whew! Pressure is off.</p>
<p>I had been making personal builds since the summer to give out to folks who wanted to take advantage off several new features introduced since the march build. Sean gave Justin and I write access to the svn code this past December and we&#8217;ve been playing catch up on a backlog of patches, and i&#8217;ve been remembering c++ and Qt.</p>
<p>Several new features have been added in this release: Critical Power calculator, find best intervals utility, Pedal Force / Pedal Velocity chart, iBike and Ergomo CSV import, GUI power zones creator, separate vertical axes for Power / HR / Cadence and Speed in the Ride plot, sorting rides with the most recent at the top of the list, and many bug fixes courtesy of JT Conklin. This version is also using <a href="http://www.ftdichip.com/Drivers/D2XX.htm" onclick="pageTracker._trackPageview('/outgoing/www.ftdichip.com/Drivers/D2XX.htm?referer=');">FTDI D2xx</a> drivers rather than VCP.</p>
<p>We&#8217;ve also switched to a numbered versioning system which will serve to better indicate which svn revision the releases were built from and perhaps will mask our slow release cycle. <img src='http://robertcarlsen.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The new release is available on the Golden Cheetah <a href="http://www.goldencheetah.org/download.html" onclick="pageTracker._trackPageview('/outgoing/www.goldencheetah.org/download.html?referer=');">download page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/01/09/golden-cheetah-10277-released-271/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>qmake / xcode bug</title>
		<link>http://robertcarlsen.net/2009/01/06/qmake-xcode-bug-258</link>
		<comments>http://robertcarlsen.net/2009/01/06/qmake-xcode-bug-258#comments</comments>
		<pubDate>Tue, 06 Jan 2009 06:49:46 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Golden Cheetah]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[qmake]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=258</guid>
		<description><![CDATA[super annoying&#8230;Qt advertises that you can make an xcode project file using qmake to enable native development on mac&#8230;i had never been able to get the golden cheetah project working in this way, even after following what little documentation i could find. each time i&#8217;d run &#8220;qmake -spec macx-xcode&#8221; would result in a non-parseable xcodeproj [...]]]></description>
			<content:encoded><![CDATA[<p>super annoying&#8230;Qt advertises that you can make an xcode project file using qmake to enable native development on mac&#8230;i had never been able to get the golden cheetah project working in this way, even after following what little documentation i could find. each time i&#8217;d run &#8220;qmake -spec macx-xcode&#8221; would result in a non-parseable xcodeproj file. to date i&#8217;ve just been coding and compiling with a simple text editor.</p>
<p>justin had done some initial troubleshooting, eventually filing a bug report with trolltech. he determined that the QMAKE_CXXFLAGS = -DGC_BUILD_DATE=&#8221;`date +&#8217;\&#8221;%a_%b_%d,_%Y\&#8221;&#8216;`&#8221; was causing the issue. commenting out the offending line to get a valid xcode project and having to create another define in a source file.</p>
<p>a dev from trolltech got back to justin confirming the bug and offering a workaround by manually adding the directive in the xcode target&#8217;s build settings. they also mentioned that a fix would be coming in a future version of qmake, but gave nothing specific. i spent most of the afternoon trying to follow this workaround to no avail. it was very frustrating. i looked at the project file that qmake created and something looked odd with how special characters in the qmake_cxxflags key were escaped with slashes. too many it seemed.</p>
<p>finally, i came across a forum post where someone was trying to set a define macro to have a string value &#8211; jsut what we are trying to do. the solution is somewhat a hack, a bandaid for a shortcoming of qmake&#8230; triple-escape the outside quotation marks. looks like: -DGC_BUILD_DATE=\\\&#8221;`date +&#8217;\&#8221;%a_%b_%d,_%Y\&#8221;&#8216;`\\\&#8221;</p>
<p>it compiles fine on the linux (ubuntu) test box, manually on mac os x (using qmake/make) and also creates a valid (parseable) xcode project file, but it won&#8217;t compile in xcode. i still have to disable these lines in src.pro and add them in by manually later. for the time being, i&#8217;m planning to develop in xcode, and build test versions without the build date/version number and then compile beta/release versions by hand, which works fine.</p>
<p>for reference, here are the lines i&#8217;m referring to in src.pro:</p>
<pre>QMAKE_CXXFLAGS += -DGC_BUILD_DATE=\\\"`date +'\"%a_%b_%d,_%Y\"'`\\\"
QMAKE_CXXFLAGS += -DGC_SVN_VERSION=\\\"`svnversion . | cut -f '2' -d ':'`\\\"
QMAKE_CXXFLAGS += -DGC_MAJOR_VER=1
QMAKE_CXXFLAGS += -DGC_MINOR_VER=0
</pre>
<p>the top two lines are string values; the bottom two values are integers. also note, this has been reported to not work in win32, but i haven&#8217;t tested it myself. after we get the mac/linux builds going i&#8217;ll get back to the win build.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/01/06/qmake-xcode-bug-258/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>oh, hello there.</title>
		<link>http://robertcarlsen.net/2009/01/04/oh-hello-there-257</link>
		<comments>http://robertcarlsen.net/2009/01/04/oh-hello-there-257#comments</comments>
		<pubDate>Mon, 05 Jan 2009 03:54:57 +0000</pubDate>
		<dc:creator>Robert Carlsen</dc:creator>
				<category><![CDATA[Golden Cheetah]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cloud reader]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itp]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[obj-c]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[qmake]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=257</guid>
		<description><![CDATA[oops. school&#8217;s out and i&#8217;ve completely ignored documentation. looking to correct that, please accept the following communiqué:
the winter show went very well – it seemed that cloud reader was well received. most of the favorable comments were split among two categories&#8230;those which really liked the performative aspect of the project and could envision it large [...]]]></description>
			<content:encoded><![CDATA[<p>oops. school&#8217;s out and i&#8217;ve completely ignored documentation. looking to correct that, please accept the following communiqué:</p>
<p>the winter show went very well – it seemed that cloud reader was well received. most of the favorable comments were split among two categories&#8230;those which really liked the performative aspect of the project and could envision it large on a wall&#8230;.and those who reacted strongly to the intimate aspect of seeing it running on the iPhone screen.</p>
<p>since the project was originally designed for the small screen in ITP&#8217;s 2&#215;2 class, the comments were enough to encourage me to finally get around to iPhone application development. i&#8217;ve looked over various objective-c, cocoa and iphone docs over the past year, but never really made a commitment to actually learn or apply it. now i&#8217;m driven, and have come to love square braces <img src='http://robertcarlsen.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>separately and coincidentally, sean from golden cheetah decided to extend justin and i write access to the svn codebase and the website. he&#8217;s been quite busy and gc development has stalled for it. although i&#8217;ve been busy with school, between the three of us we should be able keep abreast of patches and implement new features.</p>
<p>i&#8217;m trying to be cautious with the project&#8230;i don&#8217;t want to do something that will expose me as a (programming) fraud! justin and i were able to get it working happily in xcode&#8230;although the QMAKE_CXXFLAGS += -DGC_BUILD_DATE=&#8221;`date +&#8217;\&#8221;%a_%b_%d,_%Y\&#8221;&#8216;`&#8221; compiler directive in src.pro was causing qmake to create non-parseable xcodeproj files&#8230;i think it may have to do with escaping special characters. justin sent a bug report to Qt&#8230;hopefully we&#8217;ll hear something at some point&#8230;for the time-being i&#8217;ve commented out the line in the .pro file and added a conditional define in MainWindow.cpp.</p>
<p>so, tinkering with the golden cheetah code has be getting me comfortable with code that isn&#8217;t java and i think i&#8217;ll be well on my way to get to with with cloud reader for iphone&#8230;come on apple and approve my developer application!</p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/01/04/oh-hello-there-257/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
