<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://fixme.ch/w/index.php?action=history&amp;feed=atom&amp;title=PIC</id>
		<title>PIC - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://fixme.ch/w/index.php?action=history&amp;feed=atom&amp;title=PIC"/>
		<link rel="alternate" type="text/html" href="https://fixme.ch/w/index.php?title=PIC&amp;action=history"/>
		<updated>2026-04-27T12:41:03Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://fixme.ch/w/index.php?title=PIC&amp;diff=1030&amp;oldid=prev</id>
		<title>Petaflot: how to use Microchip PIC UCs</title>
		<link rel="alternate" type="text/html" href="https://fixme.ch/w/index.php?title=PIC&amp;diff=1030&amp;oldid=prev"/>
				<updated>2011-10-29T13:12:54Z</updated>
		
		<summary type="html">&lt;p&gt;how to use Microchip PIC UCs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page here is for those who'd like to use Microchip PIC µCs. As usual, linux support is bad, and there are quite a few quirks.&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
=== MPlabX ===&lt;br /&gt;
Microchip recently (~2010-10) released a linux version of their new IDE. It can be found at [A]&lt;br /&gt;
&lt;br /&gt;
There seems to be problems with some versions of ICD2 not being supported by MPlabX, so I will not go further in the details.&lt;br /&gt;
&lt;br /&gt;
=== Piklab ===&lt;br /&gt;
[http://piklab.sf.net Piklab] is an open-source IDE for PIC µCs. It works fairly well, although you MUST create a new project before trying to configure the toolchains (else Piklab will crash).&lt;br /&gt;
&lt;br /&gt;
Debian-likes have a packages called '''piklab'''&lt;br /&gt;
&lt;br /&gt;
== Toolchains ==&lt;br /&gt;
These basically include compiler, linker, and so on. Which toolchain you chose will basically depend of the µC you chose.&lt;br /&gt;
&lt;br /&gt;
=== dsPIC ===&lt;br /&gt;
Use MPlab's C30 compiler. It can also be found at [A].&lt;br /&gt;
&lt;br /&gt;
==== Piklab ====&lt;br /&gt;
Provided you installed the toolchain in /opt, you must configure as follow:&lt;br /&gt;
 Executable directory: /opt/microchip/mplabc30/v3.30c/bin/bin/&lt;br /&gt;
 Header directory: /opt/microchip/mplabc30/v3.30c/support/dsPIC33F/h/&lt;br /&gt;
 Linker script directory: /opt/microchip/mplabc30/v3.30c/support/dsPIC33F/gld/&lt;br /&gt;
 Library directory: /opt/microchip/mplabc30/v3.30c/lib/&lt;br /&gt;
&lt;br /&gt;
Be careful, as device-dependant includes have mixed-case filenames. So:&lt;br /&gt;
 #include &amp;lt;p33fj128mc804.h&amp;gt;&lt;br /&gt;
must be replaced with&lt;br /&gt;
 #include &amp;lt;p33FJ128MC804.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If (when) you get an error about missing __reset definition, some additional command line arguments must be specified [http://www.microchip.com/forums/m238536.aspx]. Since I was not able to configure piklab accordingly, I created a bash script to circumvent the problem:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 exec /opt/microchip/mplabc30/v3.30c/bin/bin/pic30-coff-ld.bin --start-group -lpic30 -lc -lm --end-group $@&lt;br /&gt;
&lt;br /&gt;
of course, you need to&lt;br /&gt;
 mv pic30-coff-ld{,.bin}&lt;br /&gt;
&lt;br /&gt;
you might want to do this with pic30-elf-ld as well, and make the scripts executables. With this, I was able to compile a very simple program.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [A] http://ww1.microchip.com/downloads/mplab/X_Beta/installer.html&lt;/div&gt;</summary>
		<author><name>Petaflot</name></author>	</entry>

	</feed>