<?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>ElectricRock Blog &#187; Piklab</title>
	<atom:link href="http://www.electricrock.co.nz/blog/tag/piklab/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.electricrock.co.nz/blog</link>
	<description>Electronic Ramblings</description>
	<lastBuildDate>Tue, 10 Aug 2010 03:37:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using C30 with Piklab</title>
		<link>http://www.electricrock.co.nz/blog/2009/08/using-c30-with-piklab/</link>
		<comments>http://www.electricrock.co.nz/blog/2009/08/using-c30-with-piklab/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 21:11:08 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[C30]]></category>
		<category><![CDATA[PIC]]></category>
		<category><![CDATA[Piklab]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.electricrock.co.nz/blog/?p=47</guid>
		<description><![CDATA[This post follows on from my previous post on building Microchip'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 support for the dsPIC30 series of PICs using the C30 toolchain.  However, I found the default settings need a little bit of tweaking to make the the toolchain that I built work. The following post details how I setup Piklab to make use of this toolchain.]]></description>
			<content:encoded><![CDATA[<p>This post follows on from my previous post on <a href="http://www.electricrock.co.nz/blog/2009/08/installing-microchips-c-compiler-for-pic24-mcus-and-dspic-dscs-c30-on-ubuntu-9-04/">building Microchip&#8217;s C compiler for PIC24 and dsPIC (C30) onUbuntu</a>.  <a href="http://piklab.sourceforge.net/">Piklab</a> is a great IDE for PIC development, and IMHO much nicer to use than MPLAB.  Piklab has support for the dsPIC30 series of PICs using the C30 toolchain.  However, I found the default settings need a little bit of tweaking to make the the toolchain that I built work. The following post details how I setup Piklab to make use of this toolchain.</p>
<p><span id="more-47"></span></p>
<h3>Configuring the Toolchain</h3>
<p>NB: The following assumes <em>&lt;C30-base&gt;</em> is the directory where C30 was installed (if you followed my previous tutorial this will be whatever you set for the <em>C30INSTALL</em> environment variable).</p>
<ul>
<li>Open up Piklab and go to <em>Settings-&gt;Configure Toolchains&#8230;</em></li>
<li>In the <em>Configure Toolchains</em> window select <em>PIC30 Toolchain</em> from the sidebar.</li>
<li>Fill out the fields as follows:
<ul>
<li><em>Executable directory</em> &#8211; <em>&lt;C30-base&gt;/bin</em></li>
<li><em>Header directory</em> &#8211; <em>&lt;C30-base&gt;/pic30-nonfree/support/dsPIC30F/h/</em> (assuming you are using C30 to compile for dsPIC30F series&#8211;I haven&#8217;t tried any other series, so YMMV).</li>
<li><em>Linker script directory</em> &#8211; <em>&lt;C30-base&gt;/pic30-nonfree/support/dsPIC30F/gld/</em></li>
<li><em>Library directory</em> &#8211; <em>&lt;C30-base&gt;/pic30-nonfree/lib/<br />
</em></li>
</ul>
</li>
<li>The other fields can be left as the default.</li>
</ul>
<h3>Configuring the Project</h3>
<p>For each project you will also have to do some configuration. After creating a new project, bring up the <em>Project Options</em> window (<em>Project-&gt;Project Options&#8230;</em>), and fill in as follows:</p>
<ul>
<li>Toolchain tab
<ul>
<li>Make sure <em>PIC30 Toolchain</em> is the active toolchain.</li>
</ul>
</li>
<li>Compiler tab
<ul>
<li>In the <em>Custom options</em> field enter: <em>-mresource=&lt;C30-base&gt;/info/c30_device.info</em></li>
</ul>
</li>
<li>Linker tab
<ul>
<li>In the <em>Custom libraries</em> field enter: <em>-lpic30</em></li>
</ul>
</li>
</ul>
<p>That should be enough to build coff files in Piklab.  I have successfully programming the dsPIC30F4013 from Piklab using the above toolchain to build the firmware and an Microchip ICD2 to download it to the PIC.  If you have any issues, if this doesn&#8217;t work for you, or if you have had some luck using a different family of PICs with C30, then please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.electricrock.co.nz/blog/2009/08/using-c30-with-piklab/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>
