Installation and Use of Palm OS Developer Suite

Source: Internet
Author: User

I finally bought a handheld computer and began to pay attention to palm development. Although Java virtual machines can be installed on Palm, as far as I know, the vast majority of users are not installed on Palm, making it impractical for them to install virtual machines to use one of your small software, therefore, only C/C ++ can be used. The C language I learned in college has never been applied in practice, so after so many years it has been almost the same as I did not. Recently, I have gained a new understanding of the C language by reading the books that WJ has given me. However, the C language is process-oriented. The experience I have accumulated in Java does not seem to help me much. Let's take a look. I recorded the learning process in the category of "Palm development". This is the first article. I will first introduce how to use pods.

If you are not familiar with palm, read this article to learn about its history and products. You can develop a palm application without a handheld computer. You can run and debug it on the simulator, but I believe that you can write your own applications.ProgramIt must be nice to have it in your hand.

Palm OS Developer Suite (pods) is an eclipse-based palm application development tool provided by palmsource. It includes compilation tools, debugging tools, simulators, resource editing tools, and palm sdks, you can download it at this address. Although many people use codewarrier to develop palm applications, pods is a development tool officially released by palmsource. From the first version 1.0 to the current version 1.2, it seems that it also supports well, in addition, it is based on the familiar eclipse platform. More importantly, it is free, so I chose pods. Of course, what tools can be used can only affect the development speed to a certain extent, and the differences between tools are not so obvious after being proficient.

The palm development materials I have collected currently mainly include the following parts: First, many PDF documents provided on the palmsource website, for beginners, there are two copies of "Palm OS companion" and "Palm OS reference", and a "UI Guideline" can be viewed before designing the form; the other is the palmos developer news group (news.palmos.com), which is very active. Up to now, there have been more than 0.1 million posts. Finally, it is the paper version of books, I found a relatively new Chinese book palmos programming book (second edition). I can find an English electronic version of the first edition of the book online. I can take a look before I buy it.

The installation of pods is very simple: run the installation file you downloaded (pods does not have a Linux version, and the simulator it carries also runs in windows, so I still need to use windows for the time being.) You may need to install JRE in your machine. After the installation, the pods group will appear in the "Start" menu. There are two simulators (simulator, note the difference with emulator). You can use garnet simulator to develop os5 and the following applications, cobalt simulator is used for os6 application development, so we generally use the former, which is shown in Figure 1.


Figure 1 garnet Simulator

If you have used eclipse, you will not be unfamiliar with the pods interface. Basically, pods adds a perspective (Perspective) and Wizard to eclipse, eclipse in pods 1.2 is version 3.0.1, which seems a little outdated (maybe you can put the pods part in the new versions of eclipse and CDT without knowing whether it is compatible ), figure 2 shows the running interface of pods.


Figure 2 running interface of pods

The environment looks similar. Now try to create the first palm application. Create "managed make 68 k c/C ++ Project" in the new Wizard, 3. This type of application can run on various versions of palm, with the best compatibility.


Figure 3 create a palm Application

Press the next button to name the project "hello", as shown in figure 4.


Figure 4 name a project

Click the next button. Here, you need to specify some attributes of your application. For common applications, most of the attributes can remain unchanged. Only "creator ID" must be changed to other values. According to the formal process, we first need to register our unique ID on the palmos website, and then enter this ID here to avoid conflicts between applications. Because now it's just a test, just change it to "hell", as shown in Figure 5.


Figure 5 modify the Creator ID

In this step, pods provides someCodeTemplate, so that you do not need to write every program from scratch. Select "sample application", as shown in figure 6. After the Wizard is complete, we will get a very simple application.


Figure 6 select a template

Now press the finish button to end the Wizard. Wait a moment and pods will generate the necessary code and compile them. Let's take a look at the generated code. The main program file is appmain under the src directory. in the c file, note that its entry method is not main () But pilotmain (). The content in this file will be described later in the post; the file named appresources is generated under the RSC directory. file of XRD. This is a resource file. If you double-click it in pods, The Palm OS resource editor is opened, as shown in figure 7, in the resource editor, you can edit forms, define menus, define icons, and define strings.


Figure 7 Palm OS resource editor

How to run this application in the simulator? First, confirm that you have enabled the garnet simulator. Then, select "Run-> Run..." in the pods menu. A dialog box is displayed. Select "Palm OS application" on the left of the dialog box, and then press the new button. A new node (running item) appears under "Palm OS application". Select this node, in the right half of the dialog box, change the name to "hello" as the project name, and check that only the hello project is selected in the "files to install" box. Click the target property page, select "Palm OS garnet simulator 5.4" in the device drop-down list. This setting is very important and should not be ignored.

Now the running item has been configured, as shown in figure 8. You can run the program by pressing the run button in the lower right corner of the dialog box. Note: The above process only needs to be configured once for a project, and you can directly press the run drop-down button in the pods toolbar to run the program.


Figure 8 configure the running items for the hello Project

Figure 9 shows the first application running on the simulator.


Figure 9 First Application

You may have noticed that Hello has been generated in the DEBUG directory of the project. PRC file, which can run directly on the palm device (same as installing other software, through synchronization, or copying to the expansion card, etc ), figure 10 shows how our hello project runs on the real palm.


Figure 10 Hello project running on Palm T | x

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.