<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Building Microchip&#8217;s C30 Compiler v3.20 on Ubuntu 9.10</title>
	<atom:link href="http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/</link>
	<description>Electronic Ramblings</description>
	<lastBuildDate>Tue, 10 Aug 2010 03:35:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: matt</title>
		<link>http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/comment-page-1/#comment-266</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Sat, 20 Mar 2010 23:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=87#comment-266</guid>
		<description>Hi Jeremy,

I&#039;ve added the &lt;em&gt;find . -name “*.y” -o -name “*.l” -exec touch ‘{}’&lt;/em&gt; line to the tutorial now.  I spent the last few days puzzling over the Link Error problem and just as I was writing this comment remembered that someone else had previously posted a patch for it (it is due to integer sizes on 64bit machines.)  I will update my patches, look for a new blog post today.

Cheers</description>
		<content:encoded><![CDATA[<p>Hi Jeremy,</p>
<p>I&#8217;ve added the <em>find . -name “*.y” -o -name “*.l” -exec touch ‘{}’</em> line to the tutorial now.  I spent the last few days puzzling over the Link Error problem and just as I was writing this comment remembered that someone else had previously posted a patch for it (it is due to integer sizes on 64bit machines.)  I will update my patches, look for a new blog post today.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Lee</title>
		<link>http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/comment-page-1/#comment-250</link>
		<dc:creator>Jeremy Lee</dc:creator>
		<pubDate>Sun, 14 Mar 2010 17:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=87#comment-250</guid>
		<description>I wanted to thank you for this tutorial. Even though it&#039;s taken me over 12 hours to get the 3.23 toolchain working, I don&#039;t think I could have managed it without you!

I also had the &quot;pic30-coff-ld:built in linker script:6: syntax error&quot; error for a while, and can verify that the 
&quot;find . -name &quot;*.y&quot; -o -name &quot;*.l&quot; -exec touch &#039;{}&#039; &#039;;&#039;&quot; fix is necessary, and should probably be part of your setup steps for binutils. (especially if the comments box smart-formats the quotes!)

I&#039;m trying to get it all working purely from the command line for the moment, so some other things took a while to figure out; for example &quot;pic30-coff-ld: cannot find -lpic30-coff&quot; errors are caused when you don&#039;t have the &quot;pic30-nonfree/lib&quot; directory (copied from the academic/evaluation release) added to the libraries path, either globally through  environment variables, or with a &quot;-L{$C30INSTALL}/pic30-nonfree/lib&quot;-ish parameter to GCC. (Obvious in retrospect, but not at the time.)

I also get &quot;pic30-coff-gcc-4.0.3: installation problem, cannot exec &#039;pic30-coff-as&#039;: No such file or directory&quot; errors (even though I&#039;ve linked it from &quot;libexec/gcc/pic30-coff/4.0.3/&quot; as you suggest) unless I add the binaries directory to my $PATH.

I&#039;m now onto more normal errors preventing simple test compiles, such as &quot;Link Error: PC Relative branch to &#039;.L2&#039; is out of range. Suggest large-code model.&quot; (even though I&#039;m setting &quot;-mlarge-code&quot;) which I hope will be solved by a more thorough read of the documentation, or providing explicit linker files. I hope.

I just wish Microchip allowed redistribution of binaries, to prevent others from having to go through this whole grinding, unforgiving process. This is the third time I&#039;ve tried to build the toolchain, and my first actual success.

So it seems this process does work for v3.23, on a 64-bit Xeon SMP &#039;Dreamhost&#039; web-hosting server account. I&#039;m at least compiling .c to .o, even if I&#039;m not linking properly yet.

Thanks!

ps: [three hours later] I still can&#039;t get past the &quot;Suggest large-code model.&quot; error, even when compiling the MPLAB examples. I can get &quot;output.s&quot; to assemble to &quot;output.o&quot;, but the linker refuses to work. My current best try is &quot;pic30-coff-ld -o output.cof output.o --script ../../support/dsPIC30F/gld/p30f3014.gld --heap=0 -L../../lib/dsPIC30F&quot; but it always fails with the same problem: 
output.o(.text+0x8):output.s: Link Error: PC Relative branch to &#039;wait&#039; is out of range. Suggest large-code model.
output.o(.text+0xe):output.s: Link Error: PC Relative branch to &#039;print_string&#039; is out of range. Suggest large-code model.
output.o(.text+0x20):output.s: Link Error: PC Relative branch to &#039;print_string&#039; is out of range. Suggest large-code model.
output.o(.text+0x24):output.s: Link Error: PC Relative branch to &#039;exit&#039; is out of range. Suggest large-code model.

Any ideas?</description>
		<content:encoded><![CDATA[<p>I wanted to thank you for this tutorial. Even though it&#8217;s taken me over 12 hours to get the 3.23 toolchain working, I don&#8217;t think I could have managed it without you!</p>
<p>I also had the &#8220;pic30-coff-ld:built in linker script:6: syntax error&#8221; error for a while, and can verify that the<br />
&#8220;find . -name &#8220;*.y&#8221; -o -name &#8220;*.l&#8221; -exec touch &#8216;{}&#8217; &#8216;;&#8217;&#8221; fix is necessary, and should probably be part of your setup steps for binutils. (especially if the comments box smart-formats the quotes!)</p>
<p>I&#8217;m trying to get it all working purely from the command line for the moment, so some other things took a while to figure out; for example &#8220;pic30-coff-ld: cannot find -lpic30-coff&#8221; errors are caused when you don&#8217;t have the &#8220;pic30-nonfree/lib&#8221; directory (copied from the academic/evaluation release) added to the libraries path, either globally through  environment variables, or with a &#8220;-L{$C30INSTALL}/pic30-nonfree/lib&#8221;-ish parameter to GCC. (Obvious in retrospect, but not at the time.)</p>
<p>I also get &#8220;pic30-coff-gcc-4.0.3: installation problem, cannot exec &#8216;pic30-coff-as&#8217;: No such file or directory&#8221; errors (even though I&#8217;ve linked it from &#8220;libexec/gcc/pic30-coff/4.0.3/&#8221; as you suggest) unless I add the binaries directory to my $PATH.</p>
<p>I&#8217;m now onto more normal errors preventing simple test compiles, such as &#8220;Link Error: PC Relative branch to &#8216;.L2&#8242; is out of range. Suggest large-code model.&#8221; (even though I&#8217;m setting &#8220;-mlarge-code&#8221;) which I hope will be solved by a more thorough read of the documentation, or providing explicit linker files. I hope.</p>
<p>I just wish Microchip allowed redistribution of binaries, to prevent others from having to go through this whole grinding, unforgiving process. This is the third time I&#8217;ve tried to build the toolchain, and my first actual success.</p>
<p>So it seems this process does work for v3.23, on a 64-bit Xeon SMP &#8216;Dreamhost&#8217; web-hosting server account. I&#8217;m at least compiling .c to .o, even if I&#8217;m not linking properly yet.</p>
<p>Thanks!</p>
<p>ps: [three hours later] I still can&#8217;t get past the &#8220;Suggest large-code model.&#8221; error, even when compiling the MPLAB examples. I can get &#8220;output.s&#8221; to assemble to &#8220;output.o&#8221;, but the linker refuses to work. My current best try is &#8220;pic30-coff-ld -o output.cof output.o &#8211;script ../../support/dsPIC30F/gld/p30f3014.gld &#8211;heap=0 -L../../lib/dsPIC30F&#8221; but it always fails with the same problem:<br />
output.o(.text+0&#215;8):output.s: Link Error: PC Relative branch to &#8216;wait&#8217; is out of range. Suggest large-code model.<br />
output.o(.text+0xe):output.s: Link Error: PC Relative branch to &#8216;print_string&#8217; is out of range. Suggest large-code model.<br />
output.o(.text+0&#215;20):output.s: Link Error: PC Relative branch to &#8216;print_string&#8217; is out of range. Suggest large-code model.<br />
output.o(.text+0&#215;24):output.s: Link Error: PC Relative branch to &#8216;exit&#8217; is out of range. Suggest large-code model.</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kemp</title>
		<link>http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/comment-page-1/#comment-170</link>
		<dc:creator>Kemp</dc:creator>
		<pubDate>Wed, 17 Feb 2010 16:32:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=87#comment-170</guid>
		<description>Build process confirmed to work for 3.23. The names for files on the Microchip website are slightly different now, but it&#039;s fairly easy to spot what you need.</description>
		<content:encoded><![CDATA[<p>Build process confirmed to work for 3.23. The names for files on the Microchip website are slightly different now, but it&#8217;s fairly easy to spot what you need.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/comment-page-1/#comment-81</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Sat, 09 Jan 2010 03:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=87#comment-81</guid>
		<description>Thanks for the feedback Billy.

There was a bit of a delay between when I actually built the compiler and when I wrote the tutorial, and in that time I forgot about one of the files I had patched. It was config.gcc which is responsible for the program prefix (e.g. pic30-coff- or pic30- ).  For some reason in the v3.20 sources they had hardcoded the prefix to pic30-. I have fixed this so that it will be pic30-coff- (or whatever binary type you choose).  I have updated pic30-gcc-3.20.tar.bz2 with this patch now.

Cheers</description>
		<content:encoded><![CDATA[<p>Thanks for the feedback Billy.</p>
<p>There was a bit of a delay between when I actually built the compiler and when I wrote the tutorial, and in that time I forgot about one of the files I had patched. It was config.gcc which is responsible for the program prefix (e.g. pic30-coff- or pic30- ).  For some reason in the v3.20 sources they had hardcoded the prefix to pic30-. I have fixed this so that it will be pic30-coff- (or whatever binary type you choose).  I have updated pic30-gcc-3.20.tar.bz2 with this patch now.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billyonthemountain</title>
		<link>http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/comment-page-1/#comment-80</link>
		<dc:creator>Billyonthemountain</dc:creator>
		<pubDate>Sat, 09 Jan 2010 00:38:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=87#comment-80</guid>
		<description>Haven&#039;t done any extensive testing but it compiles with the 3.20 patches (nor did I setup the non-free part)... :-)

Tried to compile a small testcase but gcc couldn&#039;t find cc1 nor as :
&quot;pic30-coff-gcc: installation problem, cannot exec &#039;pic30-cc1&#039;: No such file or directory&quot; (same with pic30-as)
ln -s $C30INSTALL/libexec/gcc/pic30-coff/4.0.3/pic30-coff-cc1 $C30INSTALL/libexec/gcc/pic30-coff/4.0.3/pic30-cc1 (same for as) did the trick...</description>
		<content:encoded><![CDATA[<p>Haven&#8217;t done any extensive testing but it compiles with the 3.20 patches (nor did I setup the non-free part)&#8230; <img src='http://www.electricrock.co.nz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Tried to compile a small testcase but gcc couldn&#8217;t find cc1 nor as :<br />
&#8220;pic30-coff-gcc: installation problem, cannot exec &#8216;pic30-cc1&#8242;: No such file or directory&#8221; (same with pic30-as)<br />
ln -s $C30INSTALL/libexec/gcc/pic30-coff/4.0.3/pic30-coff-cc1 $C30INSTALL/libexec/gcc/pic30-coff/4.0.3/pic30-cc1 (same for as) did the trick&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/comment-page-1/#comment-78</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Fri, 08 Jan 2010 21:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=87#comment-78</guid>
		<description>Whoops, I didn&#039;t have the right url in there. It&#039;s fixed now.

Let us know how it goes with v3.22. 

Cheers,
Matt</description>
		<content:encoded><![CDATA[<p>Whoops, I didn&#8217;t have the right url in there. It&#8217;s fixed now.</p>
<p>Let us know how it goes with v3.22. </p>
<p>Cheers,<br />
Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billyonthemountain</title>
		<link>http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/comment-page-1/#comment-77</link>
		<dc:creator>Billyonthemountain</dc:creator>
		<pubDate>Fri, 08 Jan 2010 19:12:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=87#comment-77</guid>
		<description>Hey thanks for the tutorial, very useful... wanted to give it a try it on the latest version (3.22) but your link for the gcc patches is broken... Could you fix it please ?

Thanks

Billy</description>
		<content:encoded><![CDATA[<p>Hey thanks for the tutorial, very useful&#8230; wanted to give it a try it on the latest version (3.22) but your link for the gcc patches is broken&#8230; Could you fix it please ?</p>
<p>Thanks</p>
<p>Billy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Installing Microchip&#8217;s C Compiler for PIC24 MCUs and dsPIC DSCs (C30) on Ubuntu 9.04 - ElectricRock Blog</title>
		<link>http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/comment-page-1/#comment-75</link>
		<dc:creator>Installing Microchip&#8217;s C Compiler for PIC24 MCUs and dsPIC DSCs (C30) on Ubuntu 9.04 - ElectricRock Blog</dc:creator>
		<pubDate>Thu, 07 Jan 2010 19:53:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=87#comment-75</guid>
		<description>[...] EDIT: An updated version of the compilation instructions, for C30 v3.20 can be found here: http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/. [...]</description>
		<content:encoded><![CDATA[<p>[...] EDIT: An updated version of the compilation instructions, for C30 v3.20 can be found here: <a href="http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/" rel="nofollow">http://www.electricrock.co.nz/blog/2010/01/building-c30-v32/</a>. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
