<?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: Installing Microchip&#8217;s C Compiler for PIC24 MCUs and dsPIC DSCs (C30) on Ubuntu 9.04</title>
	<atom:link href="http://www.electricrock.co.nz/blog/2009/08/installing-microchips-c-compiler-for-pic24-mcus-and-dspic-dscs-c30-on-ubuntu-9-04/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.electricrock.co.nz/blog/2009/08/installing-microchips-c-compiler-for-pic24-mcus-and-dspic-dscs-c30-on-ubuntu-9-04/</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/2009/08/installing-microchips-c-compiler-for-pic24-mcus-and-dspic-dscs-c30-on-ubuntu-9-04/comment-page-1/#comment-129</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Wed, 27 Jan 2010 14:31:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=3#comment-129</guid>
		<description>Hi Marc.  I think you can solve this by creating a link to c30_device.info in your $C30INSTALL/bin directory.  If this doesn&#039;t work for you, then you can try adding the -mresource argument on the commandline.  If you were running gcc directly from the commandline (e.g. running $C30INSTALL/bin/pic30-coff-gcc -mcpu=30F4013  -o test test.c) you would just add in the -mresource argument, giving you &#039;$C30INSTALL/bin/pic30-coff-gcc -mcpu=30F4013 -mresource=$C30INSTALL/info/c30_device.info  -o test test.c&#039;.

If you are using a GUI, how you add this is dependent on the application you&#039;re using. If you&#039;re using Piklab look here: http://www.electricrock.co.nz/blog/2009/08/using-c30-with-piklab</description>
		<content:encoded><![CDATA[<p>Hi Marc.  I think you can solve this by creating a link to c30_device.info in your $C30INSTALL/bin directory.  If this doesn&#8217;t work for you, then you can try adding the -mresource argument on the commandline.  If you were running gcc directly from the commandline (e.g. running $C30INSTALL/bin/pic30-coff-gcc -mcpu=30F4013  -o test test.c) you would just add in the -mresource argument, giving you &#8216;$C30INSTALL/bin/pic30-coff-gcc -mcpu=30F4013 -mresource=$C30INSTALL/info/c30_device.info  -o test test.c&#8217;.</p>
<p>If you are using a GUI, how you add this is dependent on the application you&#8217;re using. If you&#8217;re using Piklab look here: <a href="http://www.electricrock.co.nz/blog/2009/08/using-c30-with-piklab" rel="nofollow">http://www.electricrock.co.nz/blog/2009/08/using-c30-with-piklab</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc Michels</title>
		<link>http://www.electricrock.co.nz/blog/2009/08/installing-microchips-c-compiler-for-pic24-mcus-and-dspic-dscs-c30-on-ubuntu-9-04/comment-page-1/#comment-127</link>
		<dc:creator>Marc Michels</dc:creator>
		<pubDate>Tue, 26 Jan 2010 21:56:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=3#comment-127</guid>
		<description>Followed your guide and succesfully installed V3.22 on Gentoo. Great write-up!!

Ran into the &quot;Provide a recource file&quot; error and now I&#039;m puzzled. What do you mean by: 

To solve this add -mresource=$C30INSTALL/info/c30_device.info  to your GCC command line.

How do you add to a GCC command line, especially in a GUI?

I&#039;m quite sure I linked everything correctly so I doubt it&#039;s that.</description>
		<content:encoded><![CDATA[<p>Followed your guide and succesfully installed V3.22 on Gentoo. Great write-up!!</p>
<p>Ran into the &#8220;Provide a recource file&#8221; error and now I&#8217;m puzzled. What do you mean by: </p>
<p>To solve this add -mresource=$C30INSTALL/info/c30_device.info  to your GCC command line.</p>
<p>How do you add to a GCC command line, especially in a GUI?</p>
<p>I&#8217;m quite sure I linked everything correctly so I doubt it&#8217;s that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Building Microchip&#8217;s C30 Compiler v3.20 on Ubuntu 9.10 - ElectricRock Blog</title>
		<link>http://www.electricrock.co.nz/blog/2009/08/installing-microchips-c-compiler-for-pic24-mcus-and-dspic-dscs-c30-on-ubuntu-9-04/comment-page-1/#comment-71</link>
		<dc:creator>Building Microchip&#8217;s C30 Compiler v3.20 on Ubuntu 9.10 - ElectricRock Blog</dc:creator>
		<pubDate>Sun, 03 Jan 2010 06:06:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=3#comment-71</guid>
		<description>[...] matt on Jan.03, 2010, under How To This an update to my previous tutorial for building Microchip’s C Compiler for PIC24 MCUs and dsPIC DSCs (herein referred to as C30). [...]</description>
		<content:encoded><![CDATA[<p>[...] matt on Jan.03, 2010, under How To This an update to my previous tutorial for building Microchip’s C Compiler for PIC24 MCUs and dsPIC DSCs (herein referred to as C30). [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: László Meskó</title>
		<link>http://www.electricrock.co.nz/blog/2009/08/installing-microchips-c-compiler-for-pic24-mcus-and-dspic-dscs-c30-on-ubuntu-9-04/comment-page-1/#comment-28</link>
		<dc:creator>László Meskó</dc:creator>
		<pubDate>Mon, 02 Nov 2009 07:36:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=3#comment-28</guid>
		<description>Thank you the install guide!
To make it better, in the troubleshooting, it worth to mention the following:
If you create a test2.c sample code with the following:
int main(){ while(1); }
you can get an error.
Because this empty loop contains a negative jump, you can get an error message on 64 bit systems:
 Link Error: PC Relative branch to &#039;.L4&#039; is out of range. Suggest large-code model.
The problem is the negative integer size on 64 bit. The solution is to modify 2 lines in the binutils ource, in acme/bfd/elf32-pic30.c and acme/bfd/coff-pic30.c:
(source is:
http://old.nabble.com/dsPIC-toolchain-%28GNU-Linux%29-td23349948.html
)
I&#039;ve modified the source code manually, it seems to work for me. (The website doesn&#039;t mention the modification of coff-pic30.c, but is is required also)

--

--- acme/bfd/elf32-pic30.c.orig 2009-05-04 15:39:05.000000000 +0100
+++ acme/bfd/elf32-pic30.c 2009-05-04 15:35:43.000000000 +0100
@@ -1973,7 +1973,7 @@
       case R_PIC30_PCREL_BRANCH:
       case R_PIC30_BRANCH_ABSOLUTE:
         /* valid range is [-32768..32767] and not [-2, -1, 0] */
-        if ((relocation &gt; 0x7FFF) &amp;&amp; ~(relocation &#124; 0xC0007FFF))
+        if ((relocation &gt; 0x7FFF) &amp;&amp; ~(relocation &#124; 0xFFFFFFFFC0007FFFull))
           {
             *error_msg = (char *) malloc(BUFSIZ);
             sprintf(*error_msg,
@@ -1986,7 +1986,7 @@
       case R_PIC30_PCREL_DO:
       case R_PIC30_DO_ABSOLUTE:
         /* valid range is [-32768..32767] and not [-2, -1, 0] */
-        if ((relocation &gt; 0x7FFF) &amp;&amp; ~(relocation &#124; 0xC0007FFF))
+        if ((relocation &gt; 0x7FFF) &amp;&amp; ~(relocation &#124; 0xFFFFFFFFC0007FFFull))
           {
             *error_msg = (char *) malloc(BUFSIZ);
             sprintf(*error_msg,

--</description>
		<content:encoded><![CDATA[<p>Thank you the install guide!<br />
To make it better, in the troubleshooting, it worth to mention the following:<br />
If you create a test2.c sample code with the following:<br />
int main(){ while(1); }<br />
you can get an error.<br />
Because this empty loop contains a negative jump, you can get an error message on 64 bit systems:<br />
 Link Error: PC Relative branch to &#8216;.L4&#8242; is out of range. Suggest large-code model.<br />
The problem is the negative integer size on 64 bit. The solution is to modify 2 lines in the binutils ource, in acme/bfd/elf32-pic30.c and acme/bfd/coff-pic30.c:<br />
(source is:<br />
<a href="http://old.nabble.com/dsPIC-toolchain-%28GNU-Linux%29-td23349948.html" rel="nofollow">http://old.nabble.com/dsPIC-toolchain-%28GNU-Linux%29-td23349948.html</a><br />
)<br />
I&#8217;ve modified the source code manually, it seems to work for me. (The website doesn&#8217;t mention the modification of coff-pic30.c, but is is required also)</p>
<p>&#8211;</p>
<p>&#8212; acme/bfd/elf32-pic30.c.orig 2009-05-04 15:39:05.000000000 +0100<br />
+++ acme/bfd/elf32-pic30.c 2009-05-04 15:35:43.000000000 +0100<br />
@@ -1973,7 +1973,7 @@<br />
       case R_PIC30_PCREL_BRANCH:<br />
       case R_PIC30_BRANCH_ABSOLUTE:<br />
         /* valid range is [-32768..32767] and not [-2, -1, 0] */<br />
-        if ((relocation &gt; 0&#215;7FFF) &amp;&amp; ~(relocation | 0xC0007FFF))<br />
+        if ((relocation &gt; 0&#215;7FFF) &amp;&amp; ~(relocation | 0xFFFFFFFFC0007FFFull))<br />
           {<br />
             *error_msg = (char *) malloc(BUFSIZ);<br />
             sprintf(*error_msg,<br />
@@ -1986,7 +1986,7 @@<br />
       case R_PIC30_PCREL_DO:<br />
       case R_PIC30_DO_ABSOLUTE:<br />
         /* valid range is [-32768..32767] and not [-2, -1, 0] */<br />
-        if ((relocation &gt; 0&#215;7FFF) &amp;&amp; ~(relocation | 0xC0007FFF))<br />
+        if ((relocation &gt; 0&#215;7FFF) &amp;&amp; ~(relocation | 0xFFFFFFFFC0007FFFull))<br />
           {<br />
             *error_msg = (char *) malloc(BUFSIZ);<br />
             sprintf(*error_msg,</p>
<p>&#8211;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Using C30 with Piklab - ElectricRock Blog</title>
		<link>http://www.electricrock.co.nz/blog/2009/08/installing-microchips-c-compiler-for-pic24-mcus-and-dspic-dscs-c30-on-ubuntu-9-04/comment-page-1/#comment-2</link>
		<dc:creator>Using C30 with Piklab - ElectricRock Blog</dc:creator>
		<pubDate>Sun, 30 Aug 2009 21:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=3#comment-2</guid>
		<description>[...] matt on Aug.31, 2009, under How To This post follows on from my previous post on building Microchip&#8217;s C compiler for PIC24 and dsPIC (C30) onUbuntu.  Piklab is a great IDE for PIC development, and IMHO much nicer to use than MPLAB.  Piklab has [...]</description>
		<content:encoded><![CDATA[<p>[...] matt on Aug.31, 2009, under How To This post follows on from my previous post on building Microchip&#8217;s C compiler for PIC24 and dsPIC (C30) onUbuntu.  Piklab is a great IDE for PIC development, and IMHO much nicer to use than MPLAB.  Piklab has [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
