wabasoft how-to papers  
Products
Overview
Downloads
Fun and Games
More VMs
Dev Tools
Development
FAQ
Support
Specifications
How-to Papers
Company
Overview
Contact Us
Home Page
Building the WabaVM for PalmOS:

This is a how-to for software developers that want to build the Waba Virtual Machine from source code.

  1. To start out, you need a PalmOS C compiler and the WabaVM source code.

    You basically have two choices for the compiler. There is a freeware version of GCC, the GNU C compiler, that compiles programs for PalmOS and there is Codewarrior, a commercial product from Metrowerks.

    There are versions of GCC for PalmOS that work under UNIX and Windows, but the version for Windows didn't seem to work correctly when we used it. The application it generated was incorrect and would crash. We don't have enough experience with the GCC for UNIX to say how well it works but from everything we've heard, it works well.

    What we use to build the WabaVM is Codewarrior for PalmOS. We use the Windows version of Codewarrior. Its development environment needs a little work but its compiler generates very good code.

    Since we primarily use Codewarrior, we've included instructions here for building the PalmOS program using Codewarrior. The WabaVM doesn't use any resources (like Forms or Alerts) so building it with either GCC or Codewarrior shouldn't be too difficult.

  2. The first step is to create a project in Codewarrior for the WabaVM. You can use the "New Project.." button in the File menu to create a new project.

    Once you've got a project, you should add the waba.c file in the source release to it. This is the only file you should add to the project. After doing that, your project should look like this:

  3. Next, you need to edit the waba.c file and comment out the #define for the NO_PLATFORM_DEFINED and uncomment the #define for PALMOS. The code should then look like it is in the image below.

  4. Next, you need to set your build settings. In the Edit menu is a Settings option. Choose that to bring up the window that sets various options related to the project.

    The settings dialog has a tree of options on the left that looks like this:

  5. Choose "Target Settings" in the tree and set the values in the panel on the right to match the following:

  6. Then choose "68K Target" and set the values in the panel to reflect the following:

  7. Next choose "C/C++ Language" and set the values to:

  8. Next choose "PilotRez" and set the values to:

  9. Next choose "68K Processor" and set the values to:

  10. Next choose "Global Optimizations" and set the values to:

    One thing to be careful of is to keep the "Loop Invariants" option off in the Global Optimizations. Turning it on actually makes the VM run slower.

  11. Next choose "68K Linker" and set the values to:

  12. Now hit the build button and you should get a waba.prc in the directory. That's the WabaVM executable for PalmOS. It and a waba.pdb, which contains the waba foundation classes, comprise the WabaVM for PalmOS. To finish up, you might also want to create an icon for the WabaVM using the Codewarrior Constructor.

    Another thing to note, you don't have to set the build options exactly as above, but we've found those to be the optimal settings.


Copyright (c) 1999 - 2001 Wabasoft. Waba, WabaVM and WabaSDK are trademarks of Wabasoft Inc.