<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>//clay richardson</title>
	<atom:link href="http://clayrichardson.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://clayrichardson.me</link>
	<description>[...]</description>
	<lastBuildDate>Tue, 07 May 2013 23:30:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='clayrichardson.me' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>//clay richardson</title>
		<link>http://clayrichardson.me</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://clayrichardson.me/osd.xml" title="//clay richardson" />
	<atom:link rel='hub' href='http://clayrichardson.me/?pushpress=hub'/>
		<item>
		<title>Brew install all available AWS tools</title>
		<link>http://clayrichardson.me/2013/03/29/brew-install-all-available-aws-tools/</link>
		<comments>http://clayrichardson.me/2013/03/29/brew-install-all-available-aws-tools/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 11:52:16 +0000</pubDate>
		<dc:creator>clay richardson</dc:creator>
				<category><![CDATA[aws]]></category>
		<category><![CDATA[brew]]></category>
		<category><![CDATA[command line tools]]></category>
		<category><![CDATA[homebrew]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://clayrichardson.me/?p=415</guid>
		<description><![CDATA[If you happen to find yourself using a decent number of AWS services, you might find this useful. If there are any errata, please let me know. As of this writing, this should install all of the formulas that inherit from AmazonWebServicesFormula: You&#8217;ll get some errors about failing to link service, which is the same [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=415&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>If you happen to find yourself using a decent number of AWS services, you might find this useful. If there are any errata, please let me know.</p>
<p>As of this writing, this should install all of the formulas that inherit from <code>AmazonWebServicesFormula</code>:</p>
<pre class="brush: plain; title: ; notranslate">brew install auto-scaling aws-cfn-tools aws-elasticache aws-elasticbeanstalk aws-iam-tools aws-sns-cli cloud-watch ec2-ami-tools ec2-api-tools elb-tools rds-command-line-tools</pre>
<p>You&#8217;ll get some errors about failing to link <code>service</code>, which is the same file for all of the formulas which try to link it. You&#8217;ll have to force the link, but let&#8217;s make sure the files are all the same.</p>
<pre class="brush: plain; title: ; notranslate">
clay@laptop:1.9.3: ~ $ which service
/usr/local/bin/service

clay@laptop:1.9.3: ~ $ ls -alht /usr/local/bin/service
lrwxr-xr-x  1 clay  admin    43B Mar 29 04:11 /usr/local/bin/service -&gt; ../Cellar/auto-scaling/1.0.61.1/bin/service

clay@laptop:1.9.3: ~ $ shasum /usr/local/bin/service
2b8c2f25d30db009b04fc2b7ae27591d07c07d7a  /usr/local/bin/service

clay@laptop:1.9.3: ~ $ shasum /usr/local/Cellar/aws-cfn-tools/1.0.12/bin/service
2b8c2f25d30db009b04fc2b7ae27591d07c07d7a  /usr/local/Cellar/aws-cfn-tools/1.0.12/bin/service

clay@laptop:1.9.3: ~ $ shasum /usr/local/Cellar/cloud-watch/1.0.13.4/bin/service
2b8c2f25d30db009b04fc2b7ae27591d07c07d7a  /usr/local/Cellar/cloud-watch/1.0.13.4/bin/service

clay@laptop:1.9.3: ~ $ shasum /usr/local/Cellar/elb-tools/1.0.17.0/bin/service
2b8c2f25d30db009b04fc2b7ae27591d07c07d7a  /usr/local/Cellar/elb-tools/1.0.17.0/bin/service
</pre>
<p>So, now that we see they&#8217;re all the same, we can go on and force the links:</p>
<pre class="brush: plain; title: ; notranslate">brew link --overwrite elb-tools cloud-watch aws-cfn-tools</pre>
<p>You might be able to get a a more up-to-date list by grepping for the <code>AmazonWebServicesFormula</code> class in the <a href="https://github.com/mxcl/homebrew" target="_blank">Homebrew repository</a>.</p>
<pre class="brush: plain; title: ; notranslate">grep -irI AmazonWebServicesFormula ./* | awk '{print &quot;brew install &quot; $1}' | sed 's/.\/Library\/Formula\///g' | sed 's/.rb:class//g' | grep -ve 'Library'</pre>
<p>That should give you something similar to:</p>
<pre class="brush: plain; title: ; notranslate">

brew install auto-scaling
brew install aws-cfn-tools
brew install aws-elasticache
brew install aws-elasticbeanstalk
brew install aws-iam-tools
brew install aws-sns-cli
brew install cloud-watch
brew install ec2-ami-tools
brew install ec2-api-tools
brew install elb-tools
brew install rds-command-line-tools

</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clayrichardson.wordpress.com/415/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clayrichardson.wordpress.com/415/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=415&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clayrichardson.me/2013/03/29/brew-install-all-available-aws-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/29f77060e8574b24c26375f5cae4e883?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">clayrichardson</media:title>
		</media:content>
	</item>
		<item>
		<title>Create JPEGs with random content using Python multiprocessing</title>
		<link>http://clayrichardson.me/2012/10/30/create-jpegs-with-random-content-using-python-multiprocessing/</link>
		<comments>http://clayrichardson.me/2012/10/30/create-jpegs-with-random-content-using-python-multiprocessing/#comments</comments>
		<pubDate>Tue, 30 Oct 2012 22:39:01 +0000</pubDate>
		<dc:creator>clay richardson</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[multiprocessing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[gist]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[uuid]]></category>

		<guid isPermaLink="false">http://clayrichardson.me/?p=345</guid>
		<description><![CDATA[Recently, I had a need to quickly generate a large number of JPEGs. I wrote this python script to generate JPEG images with random dimensions and content, as well as uuid4 filenames:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=345&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently, I had a need to quickly generate a large number of JPEGs. I wrote this python script to generate JPEG images with random dimensions and content, as well as uuid4 filenames:</p>
<p><span id="more-345"></span></p>
<p><script src="https://gist.github.com/3861372.js"></script></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clayrichardson.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clayrichardson.wordpress.com/345/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=345&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clayrichardson.me/2012/10/30/create-jpegs-with-random-content-using-python-multiprocessing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/29f77060e8574b24c26375f5cae4e883?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">clayrichardson</media:title>
		</media:content>
	</item>
		<item>
		<title>Python multiprocessing queues and pipes</title>
		<link>http://clayrichardson.me/2012/08/15/python-multiprocessing-queues-and-pipes/</link>
		<comments>http://clayrichardson.me/2012/08/15/python-multiprocessing-queues-and-pipes/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 11:19:13 +0000</pubDate>
		<dc:creator>clay richardson</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[multiprocessing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[parallel processing]]></category>
		<category><![CDATA[pipe]]></category>
		<category><![CDATA[queue]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://clayrichardson.me/?p=327</guid>
		<description><![CDATA[I&#8217;m currently working on something that requires the use of parallel processing, so I decided to write a sample implementation to become familiar with Python&#8217;s Multiprocessing module.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=327&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m currently working on something that requires the use of parallel processing, so I decided to write a sample implementation to become familiar with <a href="http://docs.python.org/library/multiprocessing.html">Python&#8217;s Multiprocessing module</a>.</p>
<p><span id="more-327"></span></p>
<p><script src="https://gist.github.com/3358585.js"></script></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clayrichardson.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clayrichardson.wordpress.com/327/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=327&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clayrichardson.me/2012/08/15/python-multiprocessing-queues-and-pipes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/29f77060e8574b24c26375f5cae4e883?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">clayrichardson</media:title>
		</media:content>
	</item>
		<item>
		<title>TI LaunchPad development on Ubuntu 11.10 running in VirtualBox</title>
		<link>http://clayrichardson.me/2012/03/16/ti-launchpad-development-on-ubuntu-11-10-running-in-virtualbox/</link>
		<comments>http://clayrichardson.me/2012/03/16/ti-launchpad-development-on-ubuntu-11-10-running-in-virtualbox/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 09:45:25 +0000</pubDate>
		<dc:creator>clay richardson</dc:creator>
				<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[msp430]]></category>
		<category><![CDATA[os x lion]]></category>
		<category><![CDATA[ti launchpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[msp430-gdb]]></category>
		<category><![CDATA[mspdebug]]></category>
		<category><![CDATA[remote debugging]]></category>
		<category><![CDATA[segfault]]></category>

		<guid isPermaLink="false">http://clayrichardson.me/?p=236</guid>
		<description><![CDATA[In my previous post, I was having trouble debugging and writing the binary files to the TI LaunchPad from Ubuntu 11.10 running in VirtualBox on Mac OS X Lion. I also tried using the VirtualBox ExtensionPack with USB 2.0 support to no avail. This is an extension of the previous post if you&#8217;re running Ubuntu 11.10 [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=236&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="attachment_267" class="wp-caption alignleft" style="width: 155px"><img class="size-thumbnail wp-image-267 " title="VirtualBoxLogo" alt="" src="http://clayrichardson.files.wordpress.com/2012/03/virtualboxlogo1.png?w=145&#038;h=150" width="145" height="150" /><p class="wp-caption-text">VirtualBox Logo</p></div>
<p>In my previous post, I was having trouble debugging and writing the binary files to the <a href="http://www.ti.com/launchpad" target="_blank">TI LaunchPad</a> from Ubuntu 11.10 running in <a href="https://www.virtualbox.org/" target="_blank">VirtualBox</a> on Mac OS X Lion. I also tried using the VirtualBox ExtensionPack with USB 2.0 support to no avail.</p>
<p>This is an extension of the <a title="TI Launchpad development on Ubuntu 11.10" href="http://clayrichardson.me/2012/03/15/ti-launchpad-development-on-ubuntu-11-10/" target="_blank">previous post</a> if you&#8217;re running Ubuntu 11.10 in VirtualBox 4.1.10 on OS X Lion.</p>
<p>So I&#8217;ve figured out how to program and debug the Launchpad from within the guest OS. Albeit with a couple of caveats:</p>
<ol>
<li>The driver from <a href="http://code.google.com/p/osx-launchpad/" target="_blank">osx-launchpad</a> will need to be installed on the host OS.</li>
<li>You have to use remote debugging via the GDB remote stub that mspdebug creates.</li>
<li>When you use &#8220;target remote&#8221; from msp430-gdb, it will segfault, yeay!</li>
<li>There will be some compiling from source to avoid the segfault party.</li>
</ol>
<p><span id="more-236"></span></p>
<p><strong>Edit:</strong> Forgot to put log outputs and mspdebug failures when LaunchPad was connected to VM, see Appendix.</p>
<h3>On OSX Lion:</h3>
<p>Go to <a href="http://code.google.com/p/osx-launchpad/" target="_blank">http://code.google.com/p/osx-launchpad/</a> and install the LaunchPad OSX USB VCP CDC Driver. For some reason, I couldn&#8217;t get <a href="http://e2e.ti.com/support/interface/digital_interface/m/videos__files/198722.aspx" target="_blank">TI&#8217;s driver</a> working. Restart, and the LaunchPad should be recognized and properly connected.</p>
<p>Clone the <a href="http://mspdebug.sourceforge.net/" target="_blank">mspdebug</a> source into your sources directory:</p>
<pre class="brush: plain; title: ; notranslate">
git clone git://mspdebug.git.sourceforge.net/gitroot/mspdebug/mspdebug
</pre>
<p>Compile the code:</p>
<pre class="brush: plain; title: ; notranslate">
cd ./mspdebug
make 2&gt;&amp;1
</pre>
<p>You&#8217;ll get a couple of warnings, but it the binary should now be there. I usually use brew on OS X or <a href="http://en.wikipedia.org/wiki/CheckInstall" target="_blank">CheckInstall</a> on Linux when I have to install from source, as I don&#8217;t want to lose track of files littered through my systems. Clutter is bad. The brew formula for mspdebug wouldn&#8217;t work properly, so I&#8217;ve resorted to compiling from source, and editing the makefile for installation.</p>
<p>Change line 21 of ./Makefile from:</p>
<pre class="brush: plain; title: ; notranslate">
PREFIX ?= /usr/local
</pre>
<p>To:</p>
<pre class="brush: plain; title: ; notranslate">
PREFIX ?= /usr/from_source
</pre>
<p>You can make yours whatever you want, I just figured /usr/from_source would be a good place.</p>
<pre class="brush: plain; title: ; notranslate">
sudo mkdir /usr/from_source
</pre>
<p>Now, when you do a:</p>
<pre class="brush: plain; title: ; notranslate">
make install
</pre>
<p>The files will be moved into /usr/from_source</p>
<p>Add /usr/from_source/bin to the /etc/paths file so you&#8217;ll be able to execute it easily.</p>
<p>Reload the environment:</p>
<pre class="brush: plain; title: ; notranslate">
source /etc/profile
</pre>
<p>Now plug in the LaunchPad, and try to connect:</p>
<pre class="brush: plain; title: ; notranslate">
mspdebug rf2500
</pre>
<p>You should see something similar to:</p>
<pre class="brush: plain; title: ; notranslate">
$ mspdebug rf2500
MSPDebug version 0.19 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2012 Daniel Beer
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Trying to open interface 1 on 008
Initializing FET...
FET protocol version is 30001000
Configured for Spy-Bi-Wire
Set Vcc: 3000 mV
fet: FET returned error code 4 (Could not find device (or device not supported))
fet: command C_IDENT1 failed
fet: identify failed
Trying again...
Initializing FET...
FET protocol version is 30001000
Configured for Spy-Bi-Wire
Sending reset...
Set Vcc: 3000 mV
Device ID: 0xf201
  Code start address: 0xf800
  Code size         : 2048 byte = 2 kb
  RAM  start address: 0x200
  RAM  end   address: 0x27f
  RAM  size         : 128 byte = 0 kb
Device: MSP430F2012
Code memory starts at 0xf800
Number of breakpoints: 2

Available commands:
    =         delbreak  gdb       load      opt       reset     simio
    alias     dis       help      locka     prog      run       step
    break     erase     hexout    md        read      set       sym
    cgraph    exit      isearch   mw        regs      setbreak

Available options:
    color           gdb_loop        iradix
    fet_block_size  gdbc_xfer_size  quiet

Type &quot;help &quot; for more information.
Press Ctrl+D to quit.

(mspdebug)
</pre>
<p>Awesome, let&#8217;s move on to the next step!</p>
<h3>On the Ubuntu 11.10 guest VM:</h3>
<p>A bunch of searching led me to <a href="https://bugs.launchpad.net/ubuntu/+source/gdb-msp430/+bug/891970" target="_blank">this bug on Launchpad</a> where <a href="https://launchpad.net/~andyhelp+ubuntu" target="_blank">Andrzej Bieniek (andyhelp+ubuntu)</a> mentioned that compiling from <a href="ftp://ftp.gnu.org/pub/gnu/gdb/" target="_blank">7.2a</a> resulted in no errors, so I figured I&#8217;d might as well try that.</p>
<div>You&#8217;ll need these packages installed in order to build GDB:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get install texinfo libncurses5-dev zlib1g-dev
</pre>
</div>
<div>Otherwise, you&#8217;ll get errors like these:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
WARNING: `makeinfo' is missing on your system.
configure: error: no termcap library found
/usr/bin/ld: cannot find -lz
</pre>
</div>
<p>Clone the <a href="http://sourceforge.net/projects/mspgcc/" target="_blank">mspgcc project</a> into your sources directory: (~/sources/git/)</p>
<pre class="brush: plain; title: ; notranslate">
git clone git://mspgcc.git.sourceforge.net/gitroot/mspgcc/mspgcc
</pre>
<p>This project contains the patches you&#8217;ll need to build the toolchain from source. In this case, we&#8217;ll only be needing: msp430-gdb-7.2a-20111205.patch</p>
<p>Download GDB 7.2 source and extract it:</p>
<pre class="brush: plain; title: ; notranslate">
wget ftp://ftp.gnu.org/pub/gnu/gdb/gdb-7.2a.tar.bz2
tar -xvpjf ./gdb-7.2a.tar.bz2
</pre>
<p>cd into the directory:</p>
<pre class="brush: plain; title: ; notranslate">
cd ./gdb-7.2/
</pre>
<p>Looking at the instructions in the patch file: (type :q to quit vim)</p>
<pre class="brush: plain; title: ; notranslate">
vim ../mspgcc/msp430-gdb-7.2a-20111205.patch
</pre>
<p>We can see:</p>
<pre class="brush: plain; title: ; notranslate">
tar xjf gdb-7.2a.tar.bz2
( cd gdb-7.2 ; patch -p1 &lt; ../msp430-gdb-7.2a-20111205.patch )
mkdir -p BUILD/gdb
cd BUILD/gdb
../../gdb-7.2/configure \
--target=msp430 \
--prefix=/usr/local/msp430 \
2&gt;&amp;1 | tee co
make 2&gt;&amp;1 | tee mo
make install 2&gt;&amp;1 | tee moi
</pre>
<p>But we&#8217;re only going to follow some of the instructions.</p>
<p>Patch the files:</p>
<pre class="brush: plain; title: ; notranslate">
patch -p1 &lt; ../mspgcc/msp430-gdb-7.2a-20111205.patch
</pre>
<p>You&#8217;ll see a bunch of &#8216;patching file x&#8217; messages scroll by. Awesome, you&#8217;ve patched it. Make the necessary directories:</p>
<pre class="brush: plain; title: ; notranslate">
mkdir -p BUILD/gdb cd BUILD/gdb
</pre>
<p>Configure:</p>
<pre class="brush: plain; title: ; notranslate">
../../configure --target=msp430 --prefix=/usr/local/msp430 2&gt;&amp;1
</pre>
<p>If you&#8217;re on a multicore machine, you can specify -j [number of cores] to compile multiple files simultaneously:</p>
<pre class="brush: plain; title: ; notranslate">
make -j4 2&gt;&amp;1
</pre>
<p>Otherwise, just leave the -j switch out:</p>
<pre class="brush: plain; title: ; notranslate">
make 2&gt;&amp;1
</pre>
<div>Once that is done, find where the msp430-gdb executable is:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
$ which msp430-gdb
/usr/bin/msp430-gdb
</pre>
<p>Replace the executable:</p>
<pre class="brush: plain; title: ; notranslate">
sudo cp ./gdb/gdb /usr/bin/msp430-gdb
</pre>
</div>
<div>If all is well, you should be able to run it:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
$ msp430-gdb
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type &quot;show copying&quot;
and &quot;show warranty&quot; for details.
This GDB was configured as &quot;--host=i686-pc-linux-gnu --target=msp430&quot;.
For bug reporting instructions, please see:
&lt;http://www.gnu.org/software/gdb/bugs/&gt;.
(gdb)
</pre>
</div>
<div>Press <a href="http://en.wikipedia.org/wiki/End-of-transmission_character" target="_blank">Ctrl+D</a> to send an <a href="http://en.wikipedia.org/wiki/End-of-file" target="_blank">EOF</a> and quit gdb.</div>
<div></div>
<div>Great, so we&#8217;ve got both sides of the puzzle working. Let&#8217;s put them together!</div>
<div>
<h3>On OSX Lion:</h3>
<p>mspdebug has this cool thing where it can act as a <a href="http://davis.lbl.gov/Manuals/GDB/gdb_17.html#SEC140" target="_blank">GDB remote stub</a>.</p>
<p>From the <a href="http://mspdebug.sourceforge.net/manual.html" target="_blank">mspdebug manual</a>:</p>
</div>
<div>
<pre class="brush: plain; title: ; notranslate">
gdb [port]
  Start  a  GDB  remote  stub, optionally specifying a TCP port to
  listen on.  If no port is given, the default port is 2000.

  MSPDebug will wait for a connection on this port, and  then  act
  as a GDB remote stub until GDB disconnects.

  GDB's  &quot;monitor&quot;  command can be used to issue MSPDebug commands
  via the GDB interface. Supplied commands are executed non-inter-
  actively, and the output is sent back to be displayed in GDB.
</pre>
</div>
<div>So start mspdebug on port 2000 (default if no port is specified):</div>
<div>
<pre class="brush: plain; title: ; notranslate">
mspdebug rf2500 gdb 2000
</pre>
</div>
<div>You should see something similar to:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
$ mspdebug rf2500 gdb 2000
MSPDebug version 0.19 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2012 Daniel Beer &lt;dlbeer@gmail.com&gt;
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Trying to open interface 1 on 008
Initializing FET...
FET protocol version is 30001000
Configured for Spy-Bi-Wire
Set Vcc: 3000 mV
fet: FET returned error code 4 (Could not find device (or device not supported))
fet: command C_IDENT1 failed
fet: identify failed
Trying again...
Initializing FET...
FET protocol version is 30001000
Configured for Spy-Bi-Wire
Sending reset...
Set Vcc: 3000 mV
Device ID: 0xf201
 Code start address: 0xf800
 Code size : 2048 byte = 2 kb
 RAM start address: 0x200
 RAM end address: 0x27f
 RAM size : 128 byte = 0 kb
Device: MSP430F2012
Code memory starts at 0xf800
Number of breakpoints: 2
Bound to port 2000. Now waiting for connection...
</pre>
</div>
<div>
<h3>On the Ubuntu 11.10 guest VM:</h3>
</div>
<div>To be able to talk to the LaunchPad, we have to connect to the host machine on whatever port was specified when starting mspdebug.</div>
<div>From the <a href="http://mspdebug.sourceforge.net/manual.html" target="_blank">mspdebug manual</a>:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
gdbc
  GDB  client  mode.  Connect to a server which implements the GDB
  remote protocol and provide an interface  to  it.  To  use  this
  driver, specify the remote address in hostname:port format using
  the -d option.
</pre>
</div>
<div>To do this when networking is configured as NAT, we need to find the default gateway:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
route
</pre>
</div>
<div>You should see something similar to:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.0.2.2        0.0.0.0         UG    0      0        0 eth0
10.0.2.0        *               255.255.255.0   U     1      0        0 eth0
link-local      *               255.255.0.0     U     1000   0        0 eth0
</pre>
</div>
<div>We&#8217;re interested in the line that begins with &#8216;default&#8217;.</div>
<div>Start mspdebug with the gbdc driver:</div>
<pre class="brush: plain; title: ; notranslate">
$ mspdebug gdbc -d 10.0.2.2:2000
MSPDebug version 0.16 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2011 Daniel Beer
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Looking up 10.0.2.2...
Connecting to 10.0.2.2:2000...

Available commands:
    =         delbreak  gdb       load      opt       reset     simio
    alias     dis       help      locka     prog      run       step
    break     erase     hexout    md        read      set       sym
    cgraph    exit      isearch   mw        regs      setbreak

Available options:
    color           gdb_loop        iradix
    fet_block_size  gdbc_xfer_size  quiet

Type &quot;help &quot; for more information.
Press Ctrl+D to quit.

(mspdebug)
</pre>
<div>Sweet action, we&#8217;ve connected to our LaunchPad through the network! You can now do everything just like normal.</div>
<div>For debugging, start msp430-gdb:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
msp430-gdb
</pre>
</div>
<div>At the prompt enter:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
(gdb) target remote 10.0.2.2:2000
</pre>
</div>
<div>You can now do all the regular GDB stuff.</div>
<div></div>
<div>If you&#8217;ve got a better way of going about this, I&#8217;d love to hear it!</div>
<div>
<h3>Automation:</h3>
<p>It can be quite annoying to leave the VM and reconnect mspdebug to the LaunchPad from the host, so I&#8217;ve got a little script that will wait 1 second before reconnecting, so you&#8217;ll be able to kill it with Ctrl + C</p>
<pre class="brush: plain; title: ; notranslate">
#!/bin/bash

while [ 1 ]
do
    mspdebug rf2500 gdb 2000
    sleep 1
done
</pre>
<p>I saved it as /usr/from_source/bin/tilaunchpad right next to the mspdebug binary. You can stay constantly connected to it through mspdebug or msp430-gdb and type &#8216;run&#8217; or &#8216;continue&#8217; to execute like normal.</p>
<p>Happy Hacking!</p>
</div>
<h3>Appendix:</h3>
<p>Here is what syslog output looks like when connected directly to the VM:</p>
<pre class="brush: plain; title: ; notranslate">
Mar 16 17:07:57 linux kernel: [ 318.149193] usb 2-2: new full speed USB device number 7 using ohci_hcd
Mar 16 17:08:12 linux kernel: [ 333.296388] usb 2-2: device descriptor read/64, error -110
Mar 16 17:08:27 linux kernel: [ 348.565460] usb 2-2: device descriptor read/64, error -110
Mar 16 17:08:28 linux kernel: [ 348.804490] usb 2-2: new full speed USB device number 8 using ohci_hcd
Mar 16 17:08:43 linux kernel: [ 363.952590] usb 2-2: device descriptor read/64, error -110
Mar 16 17:08:58 linux kernel: [ 379.225328] usb 2-2: device descriptor read/64, error -110
Mar 16 17:08:58 linux kernel: [ 379.464388] usb 2-2: new full speed USB device number 9 using ohci_hcd
Mar 16 17:09:03 linux kernel: [ 384.499668] usb 2-2: device descriptor read/8, error -110
Mar 16 17:09:09 linux kernel: [ 389.617160] usb 2-2: device descriptor read/8, error -110
Mar 16 17:09:09 linux kernel: [ 389.856417] usb 2-2: new full speed USB device number 10 using ohci_hcd
Mar 16 17:09:14 linux kernel: [ 394.903343] usb 2-2: device descriptor read/8, error -110
Mar 16 17:09:19 linux kernel: [ 400.022096] usb 2-2: device descriptor read/8, error -110
Mar 16 17:09:19 linux kernel: [ 400.124228] hub 2-0:1.0: unable to enumerate USB device on port 2
</pre>
<p>Here is what mspdebug said after the enumeration failure:</p>
<pre class="brush: plain; title: ; notranslate">
$ sudo ./mspdebug rf2500
MSPDebug version 0.19 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2012 Daniel Beer
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

usbutil: unable to find a device matching 0451:f432
</pre>
<div>I can&#8217;t remember what I did to get it to show up: (I&#8217;ll post an update if I do)</div>
<pre class="brush: plain; title: ; notranslate">
Mar 16 17:28:09 linux kernel: [  532.781053] usb 1-2: new full speed USB device number 5 using ohci_hcd
Mar 16 17:28:09 linux mtp-probe: checking bus 1, device 5: &quot;/sys/devices/pci0000:00/0000:00:06.0/usb1/1-2&quot;
Mar 16 17:28:09 linux kernel: [  533.090225] cdc_acm 1-2:1.0: This device cannot do calls on its own. It is not a modem.
Mar 16 17:28:09 linux kernel: [  533.090232] cdc_acm 1-2:1.0: No union descriptor, testing for castrated device
Mar 16 17:28:09 linux kernel: [  533.090255] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
Mar 16 17:28:19 linux kernel: [  543.174047] generic-usb 0003:0451:F432.0004: usb_submit_urb(ctrl) failed
Mar 16 17:28:19 linux kernel: [  543.174114] generic-usb 0003:0451:F432.0004: timeout initializing reports
Mar 16 17:28:19 linux kernel: [  543.174276] generic-usb 0003:0451:F432.0004: hiddev0,hidraw1: USB HID v1.01 Device [Texas Instruments Texas Instruments MSP-FET430UIF] on usb-0000:00:06.0-2/input1
Mar 16 17:28:20 linux mtp-probe: bus: 1, device: 5 was not an MTP device
Mar 16 17:28:20 linux kernel: [  544.173466] usb 1-2: usbfs: USBDEVFS_CONTROL failed cmd mtp-probe rqt 128 rq 6 len 255 ret -110
</pre>
<div>Once the LaunchPad showed up in /dev/ttyACM0 here&#8217;s the mspdebug output:</div>
<pre class="brush: plain; title: ; notranslate">
$ sudo ./mspdebug rf2500
MSPDebug version 0.19 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2012 Daniel Beer
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Trying to open interface 1 on 003
rf2500: warning: can't detach kernel driver: No data available
Initializing FET...
rf2500: can't send data: Resource temporarily unavailable
fet: open failed
Trying again...
Initializing FET...
rf2500: can't send data: Resource temporarily unavailable
fet: open failed
</pre>
<div>Here&#8217;s the segfault using msp430-gdb from the repository:</div>
<pre class="brush: plain; title: ; notranslate">
$ msp430-gdb
GNU gdb (Linaro GDB) 7.3
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;
and &quot;show warranty&quot; for details.
This GDB was configured as &quot;--host=x86_64-linux-gnu --target=msp430&quot;.
For bug reporting instructions, please see:
&lt;http://bugs.launchpad.net/gdb-linaro/&gt;.
(gdb) target remote 10.0.2.2:2000
Remote debugging using 10.0.2.2:2000
Segmentation fault
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clayrichardson.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clayrichardson.wordpress.com/236/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=236&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clayrichardson.me/2012/03/16/ti-launchpad-development-on-ubuntu-11-10-running-in-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/29f77060e8574b24c26375f5cae4e883?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">clayrichardson</media:title>
		</media:content>

		<media:content url="http://clayrichardson.files.wordpress.com/2012/03/virtualboxlogo1.png?w=145" medium="image">
			<media:title type="html">VirtualBoxLogo</media:title>
		</media:content>
	</item>
		<item>
		<title>TI LaunchPad development on Ubuntu 11.10</title>
		<link>http://clayrichardson.me/2012/03/15/ti-launchpad-development-on-ubuntu-11-10/</link>
		<comments>http://clayrichardson.me/2012/03/15/ti-launchpad-development-on-ubuntu-11-10/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 23:43:35 +0000</pubDate>
		<dc:creator>clay richardson</dc:creator>
				<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[msp430]]></category>
		<category><![CDATA[ti launchpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[ti]]></category>

		<guid isPermaLink="false">http://clayrichardson.me/?p=172</guid>
		<description><![CDATA[I got my hands on a couple of TI LaunchPads and was surprised there is no official support for Linux. Sad day. Regardless, at $4.30 each + shipping, they&#8217;re a steal. Interested in getting development running on Ubuntu, I was reading Hack A Day&#8217;s LaunchPad on Ubuntu article until I got to the mspgcc4 project page and [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=172&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="attachment_231" class="wp-caption alignleft" style="width: 266px"><img class="size-medium wp-image-231 " title="LaunchPad" alt="" src="http://clayrichardson.files.wordpress.com/2012/03/launchpad.png?w=256&#038;h=300" width="256" height="300" /><p class="wp-caption-text">Image from <a href="http://processors.wiki.ti.com/index.php/File:LaunchPad_wireframe.PNG" target="_blank">TI</a>: <a href="http://creativecommons.org/licenses/by-sa/3.0/us/" target="_blank">CC(BY-SA)</a></p></div>
<p>I got my hands on a couple of <a href="http://www.ti.com/launchpad" target="_blank">TI LaunchPads</a> and was surprised there is no official support for Linux. Sad day. Regardless, at $4.30 each + shipping, they&#8217;re a steal.</p>
<p>Interested in getting development running on Ubuntu, I was reading <a href="http://hackaday.com/2010/08/11/how-to-launchpad-programming-with-linux/" target="_blank">Hack A Day&#8217;s LaunchPad on Ubuntu</a> article until I got to the <a href="http://mspgcc4.sourceforge.net/" target="_blank">mspgcc4 project page</a> and noticed, &#8220;mspgcc4 is no longer supported. All contributions have been incorporated into <a href="http://sourceforge.net/projects/mspgcc/" target="_blank">mspgcc</a>, which has newer versions of all components.&#8221; Following the link to the <a id="homepage" title="GCC toolchain for MSP430 Web Site" href="http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=MSPGCC_Wiki" target="_blank">GCC toolchain for MSP430 Web Site</a>, you&#8217;ll find install instructions for &#8220;<a title="Install:debian" href="http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Install:debian" target="_blank">Ubuntu</a> and other Debian-derived distributions&#8221; which will tell you &#8220;mspgcc will be available in Ubuntu Oneiric. Packages are listed <a title="https://launchpad.net/ubuntu/oneiric/+search?text=msp430" href="https://launchpad.net/ubuntu/oneiric/+search?text=msp430" target="_blank" rel="nofollow">here</a>, and were shepherded by Luca Bruno.&#8221;</p>
<p><a href="http://en.wikipedia.org/wiki/Wikipedia:Too_long;_didn't_read" target="_blank">tl;dr</a>: Seeing the Hack A Day article was from August of 2010, I figured I would try to go with the more updated toolchain.</p>
<p><span id="more-172"></span></p>
<p>Install the necessary packages:</p>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get install msp430-libc mspdebug msp430mcu binutils-msp430 gcc-msp430 gdb-msp430
</pre>
<p>You will get an error:</p>
<pre class="brush: plain; title: ; notranslate">
dpkg: error processing /var/cache/apt/archives/gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_amd64.deb (--unpack):
trying to overwrite '/usr/share/gdb/python/gdb/__init__.py', which is also in package gdb 7.3-0ubuntu2
</pre>
<p>Substitute i386 for amd64 if you&#8217;re running on a 32 bit system.</p>
<p>There are bug reports for this <a href="https://bugs.launchpad.net/ubuntu/+source/gdb-msp430/+bug/860045" target="_blank">here</a>, <a href="https://bugs.launchpad.net/ubuntu/+source/gdb-msp430/+bug/868317" target="_blank">here</a>, and <a href="https://bugs.launchpad.net/gdb-linaro/+bug/891970/comments/7" target="_blank">here</a>. In the <a href="https://bugs.launchpad.net/ubuntu/+source/gdb-msp430/+bug/860045/comments/3" target="_blank">last comment</a> of the first linked bug report, <a href="https://launchpad.net/~mkburza" target="_blank">Marek Burza (mkburza)</a> wrote on 2011-11-23:</p>
<blockquote><p>The package tries to overwrite:<br />
/usr/share/gdb/python/gdb/__init__.py<br />
/usr/share/gdb/python/gdb/types.py<br />
/usr/share/gdb/python/gdb/printing.py<br />
/usr/share/gdb/python/gdb/command/__init__.py<br />
/usr/share/gdb/python/gdb/command/pretty_printers.py</p>
<p>These files are identical (in my case) to the ones already installed so to work around the problem I ran the installation with an override instead:</p>
<pre class="brush: plain; title: ; notranslate">sudo apt-get -o Dpkg::Options::=&quot;--force-overwrite&quot; install gdb-msp430</pre>
</blockquote>
<p>Let&#8217;s see if that&#8217;s the case. We&#8217;ll take the md5sum of the specific files mentioned to make sure they&#8217;re truly identical and safe to overwrite. To skip the tedious steps because you know everything, there&#8217;s a bash one liner further down that prints each file&#8217;s md5sum.</p>
<p>First, make a directory to unpack the debian package in: (cd without specifying a directory defaults to ~/)</p>
<pre class="brush: plain; title: ; notranslate">
cd
mkdir ./gdb-msp430
</pre>
<p>Copy the .deb package that apt-get has downloaded to the temp directory in your home directory:</p>
<pre class="brush: plain; title: ; notranslate">
cp /var/cache/apt/archives/gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_amd64.deb ~/gdb-msp430/
cd ./gdb-msp430/
</pre>
<p>Again, substituting i386 for amd64 if you&#8217;re running a 32 bit system.</p>
<p>Unpack it:</p>
<pre class="brush: plain; title: ; notranslate">
ar vx ./gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_amd64.deb
</pre>
<p>Untar the data.tar.gz file:</p>
<pre class="brush: plain; title: ; notranslate">
tar -xvpzf ./data.tar.gz
</pre>
<p>Now, get the md5sum of all the files in that directory:</p>
<pre class="brush: plain; title: ; notranslate">
md5sum ./usr/share/gdb/python/gdb/*
md5sum /usr/share/gdb/python/gdb/*
md5sum ./usr/share/gdb/python/gdb/command/*
md5sum /usr/share/gdb/python/gdb/command/*
</pre>
<p>You should see something like:</p>
<pre class="brush: plain; title: ; notranslate">
$ md5sum ./usr/share/gdb/python/gdb/*
md5sum: ./usr/share/gdb/python/gdb/command: Is a directory
7b88259f8fa8e24bbe87796a43740e4c ./usr/share/gdb/python/gdb/__init__.py
bbd6a17b9c37fb605ecdb5d6bdb621d0 ./usr/share/gdb/python/gdb/printing.py
8648e656c6d3c96fdfdee21f3d3ef149 ./usr/share/gdb/python/gdb/types.py

$ md5sum /usr/share/gdb/python/gdb/*
md5sum: /usr/share/gdb/python/gdb/command: Is a directory
7b88259f8fa8e24bbe87796a43740e4c /usr/share/gdb/python/gdb/__init__.py
bbd6a17b9c37fb605ecdb5d6bdb621d0 /usr/share/gdb/python/gdb/printing.py
8648e656c6d3c96fdfdee21f3d3ef149 /usr/share/gdb/python/gdb/types.py

$ md5sum ./usr/share/gdb/python/gdb/command/*
5c52536fb16cd5770660441d4f787928 ./usr/share/gdb/python/gdb/command/__init__.py
66179835aee61f2a3c948ef95363c1fc ./usr/share/gdb/python/gdb/command/pretty_printers.py

$ md5sum /usr/share/gdb/python/gdb/command/*
5c52536fb16cd5770660441d4f787928 /usr/share/gdb/python/gdb/command/__init__.py
66179835aee61f2a3c948ef95363c1fc /usr/share/gdb/python/gdb/command/pretty_printers.py
</pre>
<p>Bash one liner-ish:</p>
<pre class="brush: plain; title: ; notranslate">
cd; mkdir ./gdb-msp430; cp /var/cache/apt/archives/gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_amd64.deb ~/gdb-msp430/; cd ./gdb-msp430/; ar vx ./gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_amd64.deb; tar -xvpzf ./data.tar.gz; echo &quot;package files:&quot;; md5sum ./usr/share/gdb/python/gdb/*; echo &quot;installed files:&quot;; md5sum /usr/share/gdb/python/gdb/*; echo &quot;package files:&quot;; md5sum ./usr/share/gdb/python/gdb/command/*; echo &quot;installed files:&quot;; md5sum /usr/share/gdb/python/gdb/command/*; echo &quot;Cleaning up...&quot;; cd ../; rm -r ./gdb-msp430/
</pre>
<p>Or, if you&#8217;re running 32 bit:</p>
<pre class="brush: plain; title: ; notranslate">
cd; mkdir ./gdb-msp430; cp /var/cache/apt/archives/gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_i386.deb ~/gdb-msp430/; cd ./gdb-msp430/; ar vx ./gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_i386.deb; tar -xvpzf ./data.tar.gz; echo &quot;package files:&quot;; md5sum ./usr/share/gdb/python/gdb/*; echo &quot;installed files:&quot;; md5sum /usr/share/gdb/python/gdb/*; echo &quot;package files:&quot;; md5sum ./usr/share/gdb/python/gdb/command/*; echo &quot;installed files:&quot;; md5sum /usr/share/gdb/python/gdb/command/*; echo &quot;Cleaning up...&quot;; cd ../; rm -r ./gdb-msp430/
</pre>
<p>Well, looks like everything is identical, so now we can force an overwrite of the files:</p>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get -o Dpkg::Options::=&quot;--force-overwrite&quot; install gdb-msp430
</pre>
<p>Delete the temp directory you created in your home directory to clean up:</p>
<pre class="brush: plain; title: ; notranslate">
rm -r ~/gdb-msp430/
</pre>
<p>Now, test the toolchain. Grab a copy of a simple blink program:</p>
<p>(I usually keep my sources in ~/sources/[version control system]/[project name] so: ~/sources/git/had_launchpad-blink/)</p>
<pre class="brush: plain; title: ; notranslate">
git clone git://github.com/richardsonclay/had_launchpad-blink.git
</pre>
<p>Change into the newly created directory:</p>
<pre class="brush: plain; title: ; notranslate">
cd ./had_launchpad-blink/
</pre>
<p>And make:</p>
<pre class="brush: plain; title: ; notranslate">
make
</pre>
<p>It should output main.elf along with a main.o file.</p>
<p>From here, you should be able to follow the rest of the <a href="http://hackaday.com/2010/08/11/how-to-launchpad-programming-with-linux/" target="_blank">Hack A Day article</a> to transfer the binary file over to the LaunchPad.</p>
<p>As for me, I&#8217;m currently having trouble getting mspdebug to talk to the LaunchPad from <a href="https://www.virtualbox.org/" target="_blank">VirtualBox</a>. <a href="https://forums.virtualbox.org/viewtopic.php?f=5&amp;t=3355" target="_blank">This</a> post from the VirtualBox forums mentions something about USB timings not working properly in virtualization, but I am determined and will post a walkthrough if I am able to get mspdebug to talk properly using a VM.</p>
<p>Happy hacking!</p>
<p>Edit: <a title="TI Launchpad development on Ubuntu 11.10 running in VirtualBox" href="http://clayrichardson.me/2012/03/16/ti-launchpad-development-on-ubuntu-11-10-running-in-virtualbox/" target="_blank">I was able to get it work, aw yeah!</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clayrichardson.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clayrichardson.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=172&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clayrichardson.me/2012/03/15/ti-launchpad-development-on-ubuntu-11-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/29f77060e8574b24c26375f5cae4e883?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">clayrichardson</media:title>
		</media:content>

		<media:content url="http://clayrichardson.files.wordpress.com/2012/03/launchpad.png?w=256" medium="image">
			<media:title type="html">LaunchPad</media:title>
		</media:content>
	</item>
		<item>
		<title>TIL: Java double and Double are quite different things</title>
		<link>http://clayrichardson.me/2012/02/22/til-java-double-and-double-are-quite-different-things/</link>
		<comments>http://clayrichardson.me/2012/02/22/til-java-double-and-double-are-quite-different-things/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 08:05:33 +0000</pubDate>
		<dc:creator>clay richardson</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[til]]></category>
		<category><![CDATA[dereferenced]]></category>
		<category><![CDATA[double]]></category>

		<guid isPermaLink="false">http://clayrichardson.me/?p=144</guid>
		<description><![CDATA[TIL: Today I Learned. So I was happily tinkering away with Java when I got the error: double cannot be dereferenced. Well, that certainly threw a wrench in things, so I did some searching. Apparently, double and Double, beginning with a capital &#8216;D&#8217;, are quite different things. For more on primitive datatypes: Language Basics: Primitive Datatypes [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=144&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>TIL: Today I Learned.</p>
<p>So I was happily tinkering away with Java when I got the error: double cannot be dereferenced.</p>
<p>Well, that certainly threw a wrench in things, so I did some searching. Apparently, double and Double, beginning with a capital &#8216;D&#8217;, are quite different things.</p>
<pre class="brush: java; title: ; notranslate">
// this is a primitive datatype
double thisNumber = 1.0;

// this will give a dereferencing error
System.out.println(thisNumber.getClass());

// this is a wrapper class
Double thatNumber = 1.0;

// this will print: class java.lang.Double
System.out.println(thatNumber.getClass());
</pre>
<p>For more on primitive datatypes: <a href="http://docs.oracle.com/javase/tutorial/java/data/numberclasses.html" target="_blank">Language Basics: Primitive Datatypes</a></p>
<p>For more on the wrapper classes: <a href="http://docs.oracle.com/javase/tutorial/java/data/numberclasses.html" target="_blank">Numbers and Strings: The Numbers Classes</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clayrichardson.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clayrichardson.wordpress.com/144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=144&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clayrichardson.me/2012/02/22/til-java-double-and-double-are-quite-different-things/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/29f77060e8574b24c26375f5cae4e883?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">clayrichardson</media:title>
		</media:content>
	</item>
		<item>
		<title>How to get latest stable version of Nginx on Ubuntu</title>
		<link>http://clayrichardson.me/2012/01/19/how-to-get-latest-stable-version-of-nginx-on-ubuntu/</link>
		<comments>http://clayrichardson.me/2012/01/19/how-to-get-latest-stable-version-of-nginx-on-ubuntu/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 20:46:16 +0000</pubDate>
		<dc:creator>clay richardson</dc:creator>
				<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ppa]]></category>

		<guid isPermaLink="false">http://clayrichardson.me/?p=115</guid>
		<description><![CDATA[I&#8217;ve got a couple of technical posts in the pipeline, and due to their complexity and my obsession of making sure everything is absolutely spot-on, it&#8217;s taking a bit longer than I originally planned. So I figured I&#8217;d draw up something simple to go ahead and get the content rolling. You can install the Nginx [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=115&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve got a couple of technical posts in the pipeline, and due to their complexity and my obsession of making sure everything is absolutely spot-on, it&#8217;s taking a bit longer than I originally planned. So I figured I&#8217;d draw up something simple to go ahead and get the content rolling.</p>
<p>You can install the Nginx package from the regular Ubuntu repositories, but the versions there are generally lagging behind the current stable releases. Here I&#8217;ll show you how to install the latest stable version through Ubuntu&#8217;s package manager without having to compile from source!</p>
<p>&nbsp;</p>
<p><span id="more-115"></span></p>
<p><strong>Update your local list of packages:</strong></p>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get update
</pre>
<p><strong>Install the python-software-properties package:</strong></p>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get install python-software-properties
</pre>
<p><strong>python-software-properties <a href="https://launchpad.net/ubuntu/natty/i386/python-software-properties" target="_blank">description</a>:</strong></p>
<blockquote><p>This software provides an abstraction of the used apt repositories.<br />
It allows you to easily manage your distribution and independent software<br />
vendor software sources.</p></blockquote>
<p><strong>Add the <a href="https://launchpad.net/~nginx/+archive/stable">Nginx Launchpad Repository</a>:</strong></p>
<pre class="brush: plain; title: ; notranslate">
sudo add-apt-repository ppa:nginx/stable
</pre>
<p><strong>Update your local list of packages again:</strong></p>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get update
</pre>
<p><strong>Now, you can install the latest version of Nginx just like any other package!</strong></p>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get install nginx
</pre>
<p><strong>To check the version of nginx:</strong></p>
<pre class="brush: plain; title: ; notranslate">
nginx -v
</pre>
<p><strong>Start the Nginx service:</strong></p>
<pre class="brush: plain; title: ; notranslate">
sudo service nginx start
</pre>
<p><strong>See the status of services:</strong></p>
<pre class="brush: plain; title: ; notranslate">
sudo service --status-all
</pre>
<p>That&#8217;s all there is to it!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clayrichardson.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clayrichardson.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=115&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clayrichardson.me/2012/01/19/how-to-get-latest-stable-version-of-nginx-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/29f77060e8574b24c26375f5cae4e883?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">clayrichardson</media:title>
		</media:content>
	</item>
		<item>
		<title>code, infrastructure, hacking through life</title>
		<link>http://clayrichardson.me/2011/12/28/code-infrastructure-hacking-through-life/</link>
		<comments>http://clayrichardson.me/2011/12/28/code-infrastructure-hacking-through-life/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 03:52:10 +0000</pubDate>
		<dc:creator>clay richardson</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://clayrichardson.wordpress.com/?p=55</guid>
		<description><![CDATA[More coming soon!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=55&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>More coming soon!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clayrichardson.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clayrichardson.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clayrichardson.me&#038;blog=30553323&#038;post=55&#038;subd=clayrichardson&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clayrichardson.me/2011/12/28/code-infrastructure-hacking-through-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/29f77060e8574b24c26375f5cae4e883?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">clayrichardson</media:title>
		</media:content>
	</item>
	</channel>
</rss>
