<?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>Madox.NET &#187; Microcontrollers</title>
	<atom:link href="http://www.madox.net/blog/category/microcontrollers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.madox.net/blog</link>
	<description>Perversions of an Engineer</description>
	<lastBuildDate>Mon, 12 Jul 2010 12:16:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Schnellboot $100 (S-100) – Part 2.2 Bathtub Test</title>
		<link>http://www.madox.net/blog/2009/11/04/schnellboot-100-s-100-%e2%80%93-part-2-2-bathtub-test/</link>
		<comments>http://www.madox.net/blog/2009/11/04/schnellboot-100-s-100-%e2%80%93-part-2-2-bathtub-test/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 13:00:06 +0000</pubDate>
		<dc:creator>Madox</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Perverse Applications of Science...]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Toys]]></category>

		<guid isPermaLink="false">http://www.madox.net/blog/?p=568</guid>
		<description><![CDATA[Yup I&#8217;ve jumped to a bathtub test and bypassed the lovely soldering and coding&#8230; will revisit later but here&#8217;s the video :-]]></description>
			<content:encoded><![CDATA[<p>Yup I&#8217;ve jumped to a bathtub test and bypassed the lovely soldering and coding&#8230; will revisit later but here&#8217;s the video :-</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/imbhNlIZOtQ" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/imbhNlIZOtQ"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.madox.net/blog/2009/11/04/schnellboot-100-s-100-%e2%80%93-part-2-2-bathtub-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mChumby &#8211; Test run</title>
		<link>http://www.madox.net/blog/2009/07/15/mchumby-test-run/</link>
		<comments>http://www.madox.net/blog/2009/07/15/mchumby-test-run/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 10:12:29 +0000</pubDate>
		<dc:creator>Madox</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Perverse Applications of Science...]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[CAN Bus]]></category>
		<category><![CDATA[Chumby]]></category>
		<category><![CDATA[FTDI]]></category>
		<category><![CDATA[HaXe]]></category>
		<category><![CDATA[Mazda]]></category>

		<guid isPermaLink="false">http://www.madox.net/blog/?p=498</guid>
		<description><![CDATA[After getting my EasySync USB-Can Adapter it was time to resurrect the mChumby project.  The interface GUI design hasn&#8217;t changed much, namely because its been lying idle but I figured it is good enough to try putting it onto the car for a test run. I didn&#8217;t want to fiddle around with getting power to [...]]]></description>
			<content:encoded><![CDATA[<p>After getting my <a href="http://www.madox.net/blog/2009/06/30/easysync-usb-can-bus-adapter-works-great-in-ubuntu-after-some-fiddling/" target="_blank">EasySync USB-Can Adapter</a> it was time to resurrect the <a href="http://http://www.madox.net/blog/2009/03/23/mchumby-mazdamadox-chumby/" target="_blank">mChumby</a> project.  The <a href="http://www.madox.net/blog/2009/04/06/mchumby-interface-design/" target="_blank">interface GUI design</a> hasn&#8217;t changed much, namely because its been lying idle but I figured it is good enough to try putting it onto the car for a test run.</p>
<p>I didn&#8217;t want to fiddle around with getting power to the Chumby, so the test is simply using my trusty old laptop and the EasySync adapter.  Only the speedometer, the tachometer and the accelerator pedal position is attached because again I&#8217;m too lazy to fiddle with my cable layout and as such its connected to the <a href="http://www.madox.net/blog/mazda-can-bus/" target="_blank">Mazda HS-Can</a> bus only rather than the MS-Can where the <a href="http://www.madox.net/blog/2008/11/17/reverse-engineering-the-mazda-can-bus-part-1/" target="_blank">goodie trip computer information is contained.</a></p>
<p>Almost every concoction of technology is used ranging from CAN, USB, PHP, HTTP, Shared Memory, XML, Flash, to an obscure programming language called HaXe.  Here is the result :-</p>
<p><span id="more-498"></span></p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/1NRWEeg4KeE" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/1NRWEeg4KeE"></embed></object></p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/Y8t7p2WR_3k" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/Y8t7p2WR_3k"></embed></object></p>
<p>The flash movie was set to 6 frames per second and the responsiveness of the data was superb.  I think I&#8217;ve stated before that the CAN speed data differs to the one displayed on the instrumentation cluster and this again really shows at higher speeds.</p>
<p>All I need to do now is to try it on a <a href="http://www.chumby.com/" target="_blank">Chumby</a>, there should be no portability issues as I&#8217;ve tested both flash and php on the Chumby before.</p>
<p>So does anyone have any comments and suggestions on the GUI and what else I could put on it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madox.net/blog/2009/07/15/mchumby-test-run/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MFC &#8211; Madox Floating Camera &#8211; Part 1</title>
		<link>http://www.madox.net/blog/2009/05/24/mfc-madox-floating-camera-part-1/</link>
		<comments>http://www.madox.net/blog/2009/05/24/mfc-madox-floating-camera-part-1/#comments</comments>
		<pubDate>Sat, 23 May 2009 14:08:59 +0000</pubDate>
		<dc:creator>Madox</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Perverse Applications of Science...]]></category>
		<category><![CDATA[Weird]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Perverted Engineering]]></category>

		<guid isPermaLink="false">http://www.madox.net/blog/?p=346</guid>
		<description><![CDATA[Just a teaser that all (most?) the parts for my &#8216;MFC&#8217; is ready (It could be Madox&#8217;s F&#8216;ed-up Contraption) has all arrived and ready for assembling when I find the time.  Hopefully before the Australian Battle Group meet in June where I hope to use the contraption (&#8230;erm camera) to film the ships shooting each [...]]]></description>
			<content:encoded><![CDATA[<p>Just a teaser that all (most?) the parts for my &#8216;MFC&#8217; is ready (It could be <strong>M</strong>adox&#8217;s <strong>F</strong>&#8216;ed-up <strong>C</strong>ontraption) has all arrived and ready for assembling when I find the time.  Hopefully before the <a href="http://www.ausbg.org/" target="_blank">Australian Battle Group</a> meet in June where I hope to use the contraption (&#8230;erm camera) to film the ships shooting each another to smithereens.</p>
<p>Picture time :-</p>
<div id="attachment_347" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07176a.jpg"><img class="size-medium wp-image-347" title="dsc07176a" src="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07176a-400x300.jpg" alt="Most of the gear laid out on carpet" width="400" height="300" /></a><p class="wp-caption-text">Most of the gear laid out on carpet</p></div>
<p>Read on for a little bit more&#8230;</p>
<p><span id="more-346"></span></p>
<div id="attachment_348" class="wp-caption aligncenter" style="width: 197px"><a href="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07191a.jpg"><img class="size-medium wp-image-348" title="dsc07191a" src="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07191a-187x300.jpg" alt="All crammed into a waterproof case for a test fit" width="187" height="300" /></a><p class="wp-caption-text">All crammed into a waterproof case for a test fit</p></div>
<div id="attachment_352" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07193a.jpg"><img class="size-medium wp-image-352" title="dsc07193a" src="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07193a-450x244.jpg" alt="Motor/pump mounts attached by cable ties..." width="450" height="244" /></a><p class="wp-caption-text">Motor/pump mounts attached by cable ties...</p></div>
<div id="attachment_351" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07192a.jpg"><img class="size-medium wp-image-351" title="dsc07192a" src="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07192a-450x293.jpg" alt="Motor/pump mounts attached by cable ties..." width="450" height="293" /></a><p class="wp-caption-text">Motor/pump mounts attached by cable ties...</p></div>
<div id="attachment_354" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07194a.jpg"><img class="size-medium wp-image-354" title="dsc07194a" src="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07194a-300x300.jpg" alt="Water Float Test" width="300" height="300" /></a><p class="wp-caption-text">Water Float Test</p></div>
<div id="attachment_355" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07195a.jpg"><img class="size-medium wp-image-355" title="dsc07195a" src="http://www.madox.net/blog/wp-content/uploads/2009/05/dsc07195a-400x300.jpg" alt="Water Float Test" width="400" height="300" /></a><p class="wp-caption-text">Water Float Test</p></div>
<p>Parts List so far</p>
<ul>
<li><a href="http://www.asus.com/product.aspx?P_ID=cOWUB0XOSysr4sBM" target="_blank">Asus WL-520GU Wireless Router</a></li>
<li><a href="http://www.denkovi.com/Catalog/USBRelayBoards12V/USBRelayBoard8Channel12V/description.htm" target="_blank">Denkovi USB 8 Channel Relay Board</a></li>
<li><a href="http://www.avtech.com.tw/english/cctv_overview.aspx?ID=AVI201" target="_blank">AV-Tech AVI202 IP Camera </a></li>
<li><a href="http://www.johnson-pump.com/JPMarine/products/bilge/cart_uc.html" target="_blank">Johnson L450 Cartridge Bilge Pump</a></li>
<li>12V 7Ah SLA Battery</li>
<li>6V 3.2Ah SLA Battery</li>
<li>$8AUD Waterproof Case from the discount store <img src='http://www.madox.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>Video time :-</p>
<p><a href="http://www.youtube.com/watch?v=sXk39l_oB64">Johnson L450 Bilge Pump Thrust Test</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.madox.net/blog/2009/05/24/mfc-madox-floating-camera-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compiling a toolchain for ARM7 under Ubuntu</title>
		<link>http://www.madox.net/blog/2008/11/26/compiling-a-toolchain-for-arm7-under-ubuntu/</link>
		<comments>http://www.madox.net/blog/2008/11/26/compiling-a-toolchain-for-arm7-under-ubuntu/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 22:55:35 +0000</pubDate>
		<dc:creator>Madox</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Tips & Tricks]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[Crosscompiling]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.madox.net/blog/?p=54</guid>
		<description><![CDATA[Well this chronicles my first attempt at compiling a toolchain for programming ARM&#8217;s in ELF code. Why do I need a toolchain for programming ARMs? I found a LPC2378-STK development board in my room I want to give ARM programming a try (PS WinAVR is great for programming AVRs) I found I have some spare [...]]]></description>
			<content:encoded><![CDATA[<p>Well this chronicles my first attempt at compiling a toolchain for programming ARM&#8217;s in ELF code.</p>
<p>Why do I need a toolchain for programming ARMs?</p>
<ol>
<li>I found a <a href="http://www.google.com.au/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fwww.olimex.com%2Fdev%2Flpc-2378stk.html&amp;ei=2XYsSdLNB5S48ATzw_26BA&amp;usg=AFQjCNEMrqCur9EzTwEAWo7Xr2y93wepgw&amp;sig2=484jqe6-NCOgdYedM5Yd7Q" target="_blank">LPC2378-STK development board</a> in my room</li>
<li>I want to give ARM programming a try (PS WinAVR is great for programming AVRs)</li>
<li>I found I have some spare ARM7 LPC2378&#8242;s lying around (WTF?) and thought I&#8217;ll actually complete my Chumby Speedometer on my car project!</li>
</ol>
<p><span id="more-54"></span>The compile process should be pretty straight forward, but I made a few stuffup&#8217;s along the way.</p>
<ul>
<li>I had originally wanted to keep it neat and install to a new directory, then the PATH annoyance thing hit me.  Setting the path under my user shell didn&#8217;t carry over when using sudo which is required to make install.  Solved using <em>sudo -s</em>, but then in the end i just redid it all and installed to <em>/usr/local/</em>.</li>
<li>Realised (should have known) that you need &#8216;GMP&#8217; and &#8216;MPFR&#8217; to compile GCC.  Available as packages <em>libgmp3-dev</em> and<em> libmpfr-dev</em> in Ubuntu.</li>
<li>Did my usual of forgetting to set up the prefix install location when configuring&#8230;minor boo boo</li>
</ul>
<h2>Setting it all up</h2>
<p>Install any packages you need&#8230; <em>build-essential</em> is probably essential&#8230; GMP and MPFR could be got by using</p>
<blockquote><p>sudo apt-get install libgmp3-dev libmpfr-dev</p></blockquote>
<p>Set-up some directories&#8230;I opted to use create an &#8216;arm-elf&#8217; directory in my home to hold both the source and build directories&#8230;</p>
<blockquote><p>cd ~<br />
mkdir arm-elf arm-elf/src<br />
cd ~/arm-elf/src</p></blockquote>
<h3>Get the latest sources&#8230;</h3>
<p>Get the latest sources for <a href="http://www.gnu.org/software/binutils/" target="_blank">binutils</a>, <a href="http://gcc.gnu.org/" target="_blank">gcc</a>, <a href="http://sourceware.org/newlib/" target="_blank">newlib</a>, <a href="http://sources.redhat.com/insight/" target="_blank">insight</a> (click the links if you need).  The versions I used should be obvious from the filenames below.  Just be wary that the insight front page is not kept up to date but you&#8217;ll find the latest if you follow any of the release links anyway.</p>
<blockquote><p>wget http://ftp.gnu.org/gnu/binutils/binutils-2.19.tar.bz2<br />
wget http://gcc.releasenotes.org/releases/gcc-4.3.2/gcc-4.3.2.tar.bz2<br />
wget ftp://sources.redhat.com/pub/newlib/newlib-1.16.0.tar.gz<br />
wget ftp://sourceware.org/pub/insight/releases/insight-6.8.tar.bz2</p></blockquote>
<h3>Unpack the sources&#8230;</h3>
<blockquote><p>tar -xvjf binutils-2.19.tar.bz2<br />
tar -xvjf gcc-4.3.2.tar.bz2<br />
tar -xvzf newlib-1.16.0.tar.gz<br />
tar -xvjf insight-6.8.tar.bz2</p></blockquote>
<h3>Tweak the gcc source config&#8230;</h3>
<p>Make a minor config tweak to the gcc source.  Edit gcc-4.3.2/gcc/config/arm/t-arm-elf and append <em>mno-thumb-interwork/mthumb-interwork</em> after MULTILIB_OPTIONS and <em>normal interwork</em> after MULTILIB_DIRNAMES.  I used nano, see the screenshot below if I haven&#8217;t been too clear <img src='http://www.madox.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.madox.net/blog/wp-content/uploads/2008/11/screenshot-madoxmadox-laptop-armelf-src-gcc-432-gcc-config-arm.png"><img class="aligncenter size-full wp-image-55" title="src-gcc-432-gcc-config-arm" src="http://www.madox.net/blog/wp-content/uploads/2008/11/screenshot-madoxmadox-laptop-armelf-src-gcc-432-gcc-config-arm.png" alt="" width="500" height="331" /></a></p>
<blockquote><p>nano ~/arm-elf/src/gcc-4.3.2/gcc/config/arm/t-arm-elf</p></blockquote>
<h3>Start building with fingers crossed&#8230;</h3>
<p>Now we can start building the toolchain.  Note my prefix is <em>/usr/local</em>.  First off binutils!</p>
<blockquote><p>cd ~/arm-elf/<br />
mkdir build build/binutils-2.19 build/insight-6.8 build/gcc-4.3.2 build/newlib-1.16.0</p>
<p>cd ~/arm-elf/build/binutils-2.19<br />
~/arm-elf/src/binutils-2.19/configure &#8211;target=arm-elf &#8211;prefix=/usr/local &#8211;enable-interwork &#8211;enable-multilib &#8211;with-float=soft &#8211;disable-werror<br />
sudo make all install</p></blockquote>
<p>Next just the gcc part of gcc&#8230;note we configure the newlib src headers here&#8230;</p>
<blockquote><p>cd ~/arm-elf/build/gcc-4.3.2<br />
~/arm-elf/src/gcc-4.3.2/configure &#8211;target=arm-elf &#8211;prefix=/usr/local &#8211;enable-interwork &#8211;enable-multilib &#8211;with-float=soft &#8211;disable-werror &#8211;enable-languages=&#8221;c,c++&#8221; &#8211;with-newlib  &#8211;with-headers=~/arm-elf/src/newlib-1.16.0/newlib/libc/include<br />
sudo make all-gcc install-gcc</p></blockquote>
<p>Now newlib&#8230;</p>
<blockquote><p>cd ~/arm-elf/build/newlib-1.16.0<br />
~/arm-elf/src/newlib-1.16.0/configure &#8211;target=arm-elf &#8211;prefix=/usr/local &#8211;enable-interwork &#8211;enable-multilib &#8211;with-float=soft &#8211;disable-werror<br />
sudo make all install</p></blockquote>
<p>Coming back for the rest off gcc (needed newlib)</p>
<blockquote><p>cd ~/arm-elf/build/gcc-4.3.2<br />
sudo make all install</p></blockquote>
<p>&#8230;and finally insight gdb</p>
<blockquote><p>cd ~/arm-elf/build/insight-6.8<br />
~/arm-elf/src/insight-6.8/configure &#8211;target=arm-elf &#8211;prefix=/usr/local &#8211;enable-interwork &#8211;enable-multilib &#8211;with-float=soft &#8211;disable-werror<br />
sudo make all install</p></blockquote>
<p>Voila done!  I should now have all my arm-elf tools!  Just a check&#8230;</p>
<blockquote>
<pre>madox@madox-laptop:/usr/local/bin$ ls arm*
arm-elf-addr2line  arm-elf-gcc        arm-elf-insight  arm-elf-run
arm-elf-ar         arm-elf-gcc-4.3.2  arm-elf-ld       arm-elf-size
arm-elf-as         arm-elf-gccbug     arm-elf-nm       arm-elf-strings
arm-elf-c++        arm-elf-gcov       arm-elf-objcopy  arm-elf-strip
arm-elf-c++filt    arm-elf-gdb        arm-elf-objdump
arm-elf-cpp        arm-elf-gdbtui     arm-elf-ranlib
arm-elf-g++        arm-elf-gprof      arm-elf-readelf</pre>
</blockquote>
<p>Yup all there and runs <img src='http://www.madox.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Now the search for the LPC header files&#8230; argh</p>
<p>PS : If you copy and paste my commands, be wary of line breaks&#8230; I didn&#8217;t put \&#8217;s anywhere&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madox.net/blog/2008/11/26/compiling-a-toolchain-for-arm7-under-ubuntu/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
