Using Palm Development Tools on GL machines

Finally we got the development tools set up on the GL cluster. So here are the steps you have to go through to get the example project to compile and run.

If you have troubles downloading any of the files or completing any of the steps below please Email vkorol1@umbc.edu as soon as possible.

  1. Downloading example Project

    First thing you need to do is to download example project which contains a Makefile and the shell script that will set POSE environment for you. The example project can me downloaded from here.

  2. Unpacking example project

    After you downloaded the example project, you should unpack it using the following command:

    tar -xf Hello.tar

    If the the project got unpacked correctly you should see a new directory called Hello with the following files:
    -rw------- 1 vkorol1 general 3509 Sep 25 19:38 App.c
    -rw------- 1 vkorol1 general 2065 Sep 25 19:38 App.h
    -rw------- 1 vkorol1 general  278 Sep 25 19:38 App.rcp
    -rw------- 1 vkorol1 general  115 Sep 25 19:38 AppRes.h
    -rw------- 1 vkorol1 general 1450 Sep 25 19:38 Makefile
    -rw------- 1 vkorol1 general 1037 Sep 25 19:38 NetForm.h
    -rw------- 1 vkorol1 general  431 Sep 25 19:38 Str.h
    -rw------- 1 vkorol1 general  832 Sep 25 19:38 callback.h
    -rwx------ 1 vkorol1 general 2032 Sep 25 19:38 PoseInit

  3. Setting up the emulator

    The next step is to initialize the Emulator preferences, this step is not absolutely necessary, but doing it will save you some troubles in the future especially when AFS is acting weird (like it was couple of hours ago). To initialize the emulator do the following command in your project directory.

    /bin/sh ./PoseInit

  4. Compiling the project and running it in the Emulator.

    If you did all the previous steps right, now you can build and run the example project. To build the project you need to type

    make

    In your project directory. If everything compiles correctly you should have a Hello.prc file, which the file that you can load in the emulator or download into your palm device. To run the project you just compiled,first you need to start up the emulator first.

    make execute &

    Note that you don't need to restart the emulator every time you recompile the project. You can keep it running and reload the Hello.prc everytime you recompile. Obviously, you need to re-run the emulator after it crashes which happens quite often.

    When you get your emulator started you should get a window looking like this.

    In this window, press Alt-N, and you should see a dialog box that looks like this:

    Press button, and you will see the Palm-OS boot screen followed by this screen.

    On this screen you should click anywhere on the screen. Note that the Emulator is kind of sluggish so sometimes when you click too fast nothing will happen. So to avoid this hold the mouse button down for at least quater of the second and then let go of it if this still doesn't work hold the mouse button down for little bit longer. So after you clicked the mouse button and followed the instruction on the screen correctly you will see the window looking like this:

    Now is a good time to load the .prc file into the emulator. So do to this click the right mouse button anywhere in the emulator window so you'll see the following menu:

    , select the highlighted item in the menu and you'll see this dialog box:

    Select the file that you wished to load in the emulator (for this example project it is App.prc). and then press button. Note that you should not attempt to load a new .prc file into the emulator when your application or Launcher is running, in the former case you will get an error message from the emulator and in the later case you will be able to load, but then you will run into strange behaviour later on.

    After you get the application file loaded, follow instructions on the screen and you will get the window that looks like this:

    There you can click on the application icon and test your application. If you recompile the application and want to reload it again, switch out of application launcher window by pressing a 'calculator' button. (Or any of the buttons below) and then follow the same steps for loading the application as above, starting from the right click on the emulator window to get the menu. After you finish loading the new .prc file, switch back to the application launcher by pressing the applications button and start your application again.

  5. Making your own project.

    To make your own project you should create a new directory for it, then copy the following files to the new directory: App.c App.h App.rcp AppRes.h CVS Makefile Str.h callback.h . After you have finished copying these files, you should edit the Makefile of your new project. You need to change the following lines

    OBJS = App.o
    -- put all the filenames of your source files on this line, remember that files should have .o suffix not .c.

    PROJ = App
    -- here goes the base name of the project this name is used as base name for the resources file App.rcp and your resulting App.prc file.

    ICONTEXT = "App"
    -- this is a short text description of your program that goes under the icon in the application launcher.

    APPID = 'APP1'
    -- on this line you put the four letter application creator ID. Remember that application IDs should be unique within the Palm device and if you are planning to publically distribute your application you should obtain the creator ID from 3Com. To preserve sanity you should use APPID in your source program everytime you refer to the creator ID of the application.