Getting Started with PRC-Toolsby Warren Young What is PRC-Tools?PRC-Tools is a free toolchain for building Palm programs. The core of the toolchain is the free GNU Compiler Collection (GCC). In this article, I'll refer to the overall toolchain as PRC-Tools; I'll only use the term GCC when I'm talking about the parts derived from the GNU Project's GCC work. Getting PRC-ToolsIf you're using Windows or Linux, there are several places to get pre-built PRC-Tools packages. I prefer the one hosted at PalmOS.com, because they've got a well-organized set of links to pre-built PRC-Tools packages. They also link you to the SDK and documentation packages you'll need, and for Windows users they link to the Cygwin tools which adds some necessary Unixy functionality to Windows. If you're on some other OS, like one of the Unixes, you will have to build PRC-Tools from source code. You can get the sources from the home site at SourceForge. You will need a working native version of the GNU GCC toolchain to build PRC-Tools. Once you get PRC-Tools built, you will also need to build a copy of PilRC.
Notice that there are four separate parts to the PRC-Tools system:
Getting POSEPOSE is a Palm device emulator that runs under Windows, Unix and the Macintosh. This is an essential tool for debugging Palm programs. Debugging on the Palm device itself is extremely difficult; debugging with POSE is just mildly difficult. :) You might find Schaumann's "Palm OS Emulator HOWTO helpful, especially if you're using Linux. Installation LocationYou have to set these tools up exactly like the documentation describes. The Windows version of the tools must be installed in c:\palmdev, and the SDK needs to go into c:\palmdev\sdk-3.5 for things to work right. If you try and get creative and put these tools in other directories, you will have to do a lot of work to override the tools' defaults. If instead you put the tools where the docs tell you, they'll work very smoothly. For Windows, your directory tree should look something like this:
c:\palmdev
bin
sdk-3.5
include
lib
m68k-palmos-coff
lib
m68k-palmos-coff
On Linux, the tree is similar, except that it begins at /usr/local/palmdev. Also, on Linux you can create a symlink called "sdk" that points to the sdk-3.5 directory, so you don't have to give the -palmos3.5 flag to gcc. If you really must put these tools somewhere other than the default, there are environment variables you can set to tell the main compiler where to find the auxilliary helper programs, but I don't have the list handy. (See the Ardiri article below for how to do this under Windows.) Alternatively, you can rebuild the tools from source. This will let you control many things about the runtime environment, not just the install location. Which SDK?I strongly recommend that you use SDK 3.5 with PRC-Tools. This is the only stock version of the Palm OS SDK that works with PRC-Tools. There are patched versions of SDKs 1.0, 2.0 and 3.1 that work with PRC-Tools, but there are several good reasons to use the current SDK and almost no drawbacks. Other Starting PointsNow that you've got the tools set up, I'll leave you with a list of sites on the net that I found helpful when I was starting out.
Copyright © 2000-2001 by Warren Young. All rights reserved. |