Saturday, October 07, 2006

Install the GNU PIC tools in your Mac

The GNU Pic Utilities is the open source way to code your PIC chips. Most PIC varieties are supported, I think. At the very least, it supports my two preferred models: the 12F675 and the 16F688 (respectively the smallest and the largest PICs supported by the Pickit 1). These tools are just one of the many Unix tools that have been rapidly finding their way to aid our tasks in our OSX computers.

In order to install it, you need first to install Xcode. I had version 2.3 intalled, but 2.4 is out now (it shouldn't make a difference, but there's always a chance of some source code not being compatible with the latest GCC compiler). Download Xcode directly from Apple.

After installing Xcode, go to the GPUTILS website and download the source package gputils. Uncompress it and move the folder in your home directory. Open Terminal and type:

~/$ cd gputils-0.13.4
~/gputils-0.13.4$ ./configure
[returns a long output, should be very fast]
~/gputils-0.13.4$ make

[returns a long output, it takes a longish time]
~/gputils-0.13.4$ make install
[returns a long output, should be fast]

Hopefully, to this point, you will have no compiler errors, and ideally no warnings either. To check that the install went by correctly, check the /usr/local/bin directory and verify that the files gpasm and other gp-somethings exist in there.

Next you want to include that directory in your PATH. To do this, type in Terminal cd ~ to return to the home folder, next type pico .profile to bring up a text editor with the .profile file, or to create it if it doesn't exist. Add as the last line:

export PATH=$PATH:/usr/local/bin

Press CTRL-X, then Y to exit and save.

Now to finally test this install, I will refer you to another blog. Since I have not been successful yet, at personally assembling my own code, go to Micah Carrick's intro to GPUTILS in Linux.

Post your comments and share if you were successful at assembling your PIC ideas!


Post a Comment

<< Home