Jump to content

Programming for Palm OS/PrcTools

From Wikibooks, open books for an open world

PRC-Tools can be used to cross compile Palm OS software on UN*X compatible systems such as Linux, BSD and Cygwin.


installation

[edit | edit source]

installing Palm OS SDKs (development material) on Linux

[edit | edit source]

Source a Palm OS SDK and place it in /tmp, then:

 cd /usr/local/share
 sudo tar xzf /tmp/palmos-sdk-5.0r3-1.tar.gz
 sudo mv sdk-5r3 palmdev

installing PRC-Tools on Debian Lenny

[edit | edit source]

Should you find that prc-tools is not packaged for Lenny:

 cd /tmp
 wget http://ftp.gnome.org/mirror/cdimage/snapshot/Debian/pool/main/p/prc-tools/prc-tools-arm_2.2.90.cvs20030306-6_i386.deb
 wget http://ftp.gnome.org/mirror/cdimage/snapshot/Debian/pool/main/p/prc-tools/prc-tools-doc_2.2.90.cvs20030306-6_all.deb
 wget http://ftp.gnome.org/mirror/cdimage/snapshot/Debian/pool/main/p/prc-tools/prc-tools-m68k_2.2.90.cvs20030306-6_i386.deb
 wget http://ftp.gnome.org/mirror/cdimage/snapshot/Debian/pool/main/p/prc-tools/prc-tools-utils_2.2.90.cvs20030306-6_i386.deb
 wget http://ftp.gnome.org/mirror/cdimage/snapshot/Debian/pool/main/p/prc-tools/prc-tools_2.2.90.cvs20030306-6_all.deb
 sudo apt-get install libstdc++5
 sudo dpkg -i *.deb

testing PRC-Tools with Hello World

[edit | edit source]

Create a file called HelloWorld.c, then:

 m68k-palmos-gcc HelloWorld.c -o hello
 m68k-palmos-obj-res hello
 build-prc Hello.prc "Hello" HELO *.hello.grc

Although a Makefile makes for less typing.


debugging with GDB

[edit | edit source]
  1. build with the -g and -O0 options
  2. m68k-palmos-gdb App (where App is the object code fed into build-prc)
  3. target pilot localhost:6414
  4. start the app on POSE