Palm OS 5 Development Overview

xiaoxiao2021-03-06  40

content

Introduction

Publish schedule

Palm OS Based on ARM Processor

Palm application compatibility environment

Palm OS emulator

Security API

High density API

performance

Support ARM original code

Sampling Sound API

Mac OS Pipe Development Tool (CDK

Windows Pipeline Development Tool (CDK)

Palm Desktop Software Scalability Framework

Introduction

This article is an overview of the development of Palm OS 5. This article is intended to introduce you to the new architecture of Palm OS 5, demonstrate how to ensure your application and new hardware platform compatibility and introduce some new features available for your application.

Before the hardware device is available, the Palm OS 5 emulator is the main test tool, and can download the emulator page to the emulator page. Test your app and quickly modify the error in your application is very important, so that you can confirm that your application is compatible with Palm OS 5 devices launched by Palm OS licensors. Here are some Palm OS 5 test examples, which can be used for your testing process.

Note: This article is not an overview of the entire Palm OS, but merely refers to the new and significant changes in the Palm OS 5 version. If you are looking for an introduction to Palm OS programming, visit the start page. Also, this is also an overview. Each of the official documents will be explained in detail, visit http://www.palmos.com/dev/support/docs/, you can find the latest document, or develop the developer seed section of the Visitor page to find updated And the pre-released document.

The biggest change in Palm OS 5 is that it runs in the new hardware platform, using an ARM series processor produced from industrial leaders (such as Intel, Motorola, and Texas Instruments). This ensures that the speed and performance of the Palm OS platform and the software developers developers have been greatly improved under the premise of maintaining low cost, low power, easy to use and appearance factors, etc. have made Palm OS devices. .

Even in a new hardware, existing Palm OS 4.0 applications can run without any changes, and can share data between old and new devices. This is achieved by PACE. "Palm Application Compatibility Environment" (PACE) can protect developers and users' software investments, and provide very powerful compatibility and conversion channels for new hardware. Because the operating system and PACE are written in ARM origin, and each operating system API of the application call is run at full speed in the original code, the speed of the application on the PAC can be very good. The improvement and can use a high-density screen (if present).

New Development Tools A href = "# palmsim"> Palm OS emulator can be used to test and debug-based applications based on Palm OS 5. The Palm OS emulator and Palm OS simulator are all similar to, such as running on the desktop system, have a window that runs the Palm OS. But Palm OS emulators also have different, new debugging features. The emulator is an implementation of Palm OS 5 as a Windows application to run locally, and the existing simulator will become a major development tool. The simulator and emulator use the same debug protocol, so the application can be tested using existing development tools (such as Metrowerks CodeWarrior Version 7 and 8 and Palmdebugger) on both.

Palm OS 5 contains powerful and standard A href = "# security"> security API, including 128-bit RC4, SHA1, and RSA check key algorithms, and SSL 3.0 / TLS 1.0 service.

The Palm OS platform also supports high-density screens (extensions using existing window manager functions). These APIs can be used in a variety of screen resolutions, and the Palm OS emulator can be used to test applications in 320 × 320 pixel mode, providing 4 times the screen size supported by the previous operating system API. The application of standard APIs such as forms, fonts can automatically adapt to high density fonts and image operation without any code modification. The performance of existing applications running under PAC will generally get a significant improvement, and the extent to which the extent to which the hardware performance of the device running Palm OS 5 and the details of the application execution. In some cases, these applications can consider the excellent performance that runs ARM origin when it is in the "worst situation" situation and performance issues.

Assuming that the equipment used has a suitable hardware, the application can use the new sound manager API to play and record the sound of the sample.

Palm OS 5's pipe technology has no obvious changes, but Mac CDK and Windows COM SYNC Suite are updated, and its technology has been consistent with existing CDK technology. Mac CDK supports pipe development compatible with Mac OS 9 and Mac OS X. In addition, the synchronization manager API has been expanded that the User Manager API has been ported to the Mac OS, and the HOS XC user interface of Mac OS X is also beautified. The Windows Pipe Development Tool (CDK) also adds a new wizard to Visual Studio.net. Com Sync Suite supports the API of the familiar user data, HotSync API, and pipeline manager.

Palm Desktop Software now provides an extensibility framework that allows developers integration, expansion, and access Palm desktop software. Developers can use the COM interface to directly integrate the desktop software part of the Palm OS solution to the Palm desktop software.

Palm OS 5 Published Timetable

Palm OS 5 has been completed and all software has been delivered to the licensee. Palm OS License has been developed for several months using Palm OS 5, and is producing a hardware device based on Palm OS 5. However, PalmSource is not able to publish the functions of the new device's listing time and new devices, please contact the Palm OS license to get information about their future equipment plan.

Now developers can download the Palm OS emulator and the final version of Palm OS 5 SDK. The emulator is a Palm OS 5-based independent application based on Windows, which is ideal for testing applications to ensure compatibility.

PalmSource will always cooperate with software and hardware developers before the release of the operating system, ensuring that users and developers are a smooth transition. In December 2000, the Palm OS running on the ARM processor was publicly displayed in December 2000, hundreds of developers participated in the detailed seminars ("Syncups") held in December 2001. At this seminar, developers have got a more in-depth information about Palm OS 5 and began to develop using the emulator. At the PalmSource Developer Conference held in February 2002, the emulator has been widely promoted, providing a lot of ARM platforms available for developers.

Palm OS Based on ARM Processor

Palm OS 5 is running on new hardware, completely based on ARM's 32-bit operating system. Because of the improvement of the processor speed, the improvement of Palmos efficiency and the enhancement of software performance (such as high-density window manager), thousands of software suitable for Palm OS 5 will be better than before.

Several reasons for choosing the ARM chip (the main reason is that the ARM chip has a very broad speed, amazing every Watt MIPS rate), good cost-effectiveness and hardware that can be added to the device with licensors. Integration. Several suppliers can provide ARM chips, such licenseers, developers and users can have multiple options and encourage them to innovate.

All supported ARM chips belong to the category of 4T structural systems. Developer's application does not have to know what ARM chip running, because the operating system is separated by developers and specific hardware, so applications do not need to be recompiled. ARM chip and Palm OS initially used Motorola Dragon Ball Series chip (commonly referred to as 68K) is totally different: using a completely different instruction set, there is a large difference in other aspects, such as structural packaging and integer numbers. PACE allows you to develop 68K applications running on Palm OS 5 and future versions as running on Palm OS 3.x and 4.x devices, do not need to be made according to new hardware.

In Palm OS 5, except for applications under PAC, any program is running in an ARM origin. This means that because most applications run the running function of the operating system, high performance can be obtained in any case.

The data and parameter format running on the Palm OS 5 is the same as before, so there is no compatibility and data exchange issues when interacting in the new and old devices. All visible saved data and memory in the application are both BIG-Endian mode, as in the 68K device. When the operating system program is called, PACE will process the transition of byte order as needed. Therefore, there is no need to change the application to process new byte sequences and structural packages in the ARM chip.

Unless the developer needs to convert the enhanced code to the ARM protocol module (later will be set forth), developers can create the existing software development tool and the integrated development environment (IDE) to create the above-top. application. PalmSource will launch a lot of new development tools in 2002 and support fully ARM original applications development, but most developers will find that existing tools and running in Pace in the short-term time. It is the correct choice.

Palm OS Application Compatibility Environment (PACE)

The existing APIs that use Palm OS 4.0 formally released, without hypothesis, without using unsupported operating system structures, applications on the simulator running in debug version ROM can usually operate normally on the Palm OS 5 device . This is because PAC interprets the 68K directive of existing applications, allowing them to run on the ARM processor.

PACE does not simulate 68K chips and other hardware, which does not run the previous operating system. PACE Interpret 68K instructions and processes 68K instructions by calling the Palm OS 5 system program (application to call the operating system API). Therefore, PACE is very efficient for memory and processing power, most developers will find that their applications and debuggers can operate as previously, except for speed.

However, those "HACKED" 68K operating systems, access to unsupported structures, as well as the code to assume the hypothesis of the hardware, is likely to run normally as you want. PACE will handle those supported on Palm OS 5, and will continue to do this regardless of how the operating system is developing, and Pace will still do this. But PACE does not correctly handle programs that contain functions and structures that are not supported. PalmSource has been suggested that developers do not access structures that are not supported, and they can ensure that their app is running normally on PACE. Sometimes an application's error will cause the structure of an operating system inadvertently, because the C-programming language works, it is difficult to find such an error in advance, but once such a mistake is found on the emulator It can be quickly corrected.

It is recommended to test the very good way to access the structure that does not support is to add "#define do_not_Allow_access_to_internals_of_structs before .C and .CPP files." Doing so can cause the compiler to generate a non-true access when compiling. (This predefined in the 4.0 SDK update version is available.) Palm OS Simulator 3, 4 or higher is the same as the Palm OS emulator, also generates non-correct access, and the compiler may not notice These are not normal access. Users will not know that the application is running on PACE - they can't feel any previous environmental factors, they do not feel additional startup time. Instead, they can usually feel their application and previously - due to the progress of operating systems and hardware, perhaps better, faster than before.

Although PACE is very similar to the abbreviation of PACE and Palm OS emulator, they are all completely different concepts. PACE allows 68K applications to run on ARM-based Palm OS 5, in essence, PACE is also an application running on Palm OS 5. And PACE forms a control, POSE simulates hardware and processors of a physical device, and the operating system itself is running by POSE. POSE is usually only used by developers, while PACE is included in all devices sold to the final user's Palm OS 5.

Palm OS emulator

The Palm OS emulator is an implementation of the Palm OS platform code, and the Palm OS platform code is compiled to run on Windows. From the surface, the Palm OS emulator and the Palm OS simulator ("Pose") are very similar, all running on the desktop computer, has a device window running a Palm OS, and all with debuggers (such as Metrowerks CodeWarrior And Palmdebugger is connected. The use of these two tools is also very similar, but their implementation and ability are very different. Most developers will use POSE and Simulator at the same time in daily development, as they have their own unique, useful debugging and testing.

The emulator contains some new debugging tools, such as interactive databases and memory stack viewers, and event tracking windows. These debugging tools can be used by clicking on the mouse button on the emulator window, and these tools have been proven to be very useful in regular application development. The emulator also contains some other features, such as Gremlins and built-in VFS Ramdisk, and Pose very similar.

Different places in the emulator and POS are that the emulator contains a file with a .ROM extension, which does not contain some of the ROM in any device, and there is no executable code in this .ROM file. Instead, all Palm OS system code, user interface, network stack, etc. are all included in the Windows Dynamic Library (DLL) file, which contains most of the emulator, and .ROM file only contains resources, such as Bitmaps, forms, and other data. So the entire emulator "package" containing the executable code, the DLL, and .ROM files can be seen as a single package. Do not mix some parts of the emulator and some of the other emulators, do not mix the ROM files of the emulator and the ROM file used by POSE.

In the other differences of POSE and simulators, the emulator actively checks the application code to be less than POS. For example, POSE will observe memory allocation and will tell you where the memory overflows, and the emulator does not have this mechanism. POSE is very close to the device, which simulates all aspects including memory distribution, but the emulator does not simulate a particular device, but only the API and performance of the operating system. The application is running more on the emulator than running fast on the simulator, and it is very obvious when running GREMLINS. Therefore, the emulator and POSE are complementary instead of mutual replacement. Because the emulator is running on a desktop computer operating system in a local application, the BIG-Endian system running like Mac OS is not able to reliably simulate real Palm OS 5 (Little-Endian System) equipment. . (This is actually the same as the PALM OS 5: because the Mac OS processor and byte order happens to be the same as the PALM OS device, so the emulator can only run on Mac OS, but now The emulator can also run on Windows.) PalmSource is developing a Mac OS and UNIX platform (now the emulator is not available for these platforms) to run an emulator based on the ARM processor-based Palm OS.

Security API

Palm OS 5 adds powerful security. Such safety features can meet the needs of encryption / decryption, hash method, secure communication, and signature verification. Developers can visit the following API:

Encryption / decryption function is implemented by using the RC-4 addending code. RC-4 is a well-known, standard stream algorithm that provides powerful data encryption and decryption functions, only processing only one byte at a time.

A hash is generated based on the input. SHA-1 is another standard additive algorithm that can be used to generate and enter a uniquely corresponding 160-bit output hash. The generated hash is no conflict and does not expose any input information.

Create a security channel for the Internet standard. Since SSL3 is supported, Palm OS 5 supports communication with all security network services (such as website, secure SMTP, etc.).

Implementation of authentication by using the RSA verification algorithm. The data encrypted by the RSA cryptographic system (the most widely used system in industrial) can be inspected by the Palm OS 5 security function.

High density API

On the PALM OS device with new high-density characteristics, the operating system has added support for the dual-density screen (320 × 320), so the application can run without any changes, and on the current screen The effect looks like the effect on the previous screen. In particular, fonts and standard user interface controls will benefit from the increase in screen pixel points, and they do not need to make any modifications at all. Applications can add high-density versions in the existing bitmunity to get a better visual effect.

The system can ignore the density of the screen by defining two coordinate systems. The system uses the "original" coordinate system by default, even if the coordinates of 0 to 159 are used, and there are 160 × 160 screens on most PALM OS devices. The number of pixel points represented by each original coordinate will vary depending on the screen density. So, when an application draws a straight line from the original coordinates (0, 0) to (5, 0), draws 10 pixel points on the high-density screen, and only 5 pixel points are drawn on the low density screen. .

If the application wants to deal with the high-density screen, you can call the WinSetCoordinateSystem () function to switch to the Local Coordinate System. In the "local" coordinate system, the coordinates and pixel points on the screen match. Applications such as an image editor can do this to draw a pixel point in order to be able to make the most accuracy. Because if the bitmaster contains a high-density bitmap member, the operating system will automatically draw it, or convert it to the optimal size bitmap according to the screen format, so you do not need to change the coordinate system when drawing the bitmap. . Because the offline window defaults to low density, the application can still access the data bits of offline windows. (However, if the application directly accesses the screen, it may not be able to obtain the desired result, because due to the difference in screen technology, the screen may not be the desired density, different byte order or other different.) Palm OS 5 new Add some API functions, so applications can handle high-density and low density bitmaps at the time of a lower level, and PalmOSGLUE provides some very useful code, and the application can be compatible with these code in maintaining density and processor. Sexually create and process bitmaps directly.

performance

Many suppliers offer ARM series processors used in Palm OS 5 at different speeds. In the introduction of Palm OS 5, the range of clock speeds is wide, and the speed of almost a long-bare dragon ball processor that can make all system performance can increase the speed of 100 times.

Because Palm OS 5 is running locally on the ARM processor, the calls of each operating system are guaranteed and existing, and the application written in the Dragon Ball processor maintains excellent compatibility, in ARM processing Run on full speed. That is, because most applications spend most of the time in the operating system call, high performance can be obtained in all environments. In some special environments (the application contains a lengthy, time-consuming algorithm, and this algorithm only costs very little time on the operating system program), performance may be poor than expected. The next section supports ARM origin slightly introduces these situations and provides optimal performance while maintaining applications and 68K devices to maintain easy carrying and compatibility.

Support ARM original code

Almost all Palm OS 5 applications are developed in existing, 68K-oriented development environments, and the generated PRC file contains only 68K code. This can continue to use existing, mature development tools. Early versions of new development tools were launched in 2002, supporting the full ARM original application development of the future version Palm OS. However, in the process of transitioning to the ARM in Palm OS hardware, application developers are basically committed to 68K applications (can be used to run on ARM hardware with the Palm OS application compatibility environment).

Some special circumstances (application contains lengthy, time-consuming algorithms, and this algorithm only spends little time on operating system programs), run speeds (for worst considerations, such as slow ARM processors Running is not as fast as running on the 68K processor. These very little situations can be handled such that the time consuming is transformed into the self-contained application ARM protocol block. Preliminary tests show that this treatment is very good, and the running speed of the algorithm is much faster than the running speed on the 68K device. In general, the running speed on the 200 MHz ARM processor is 60 times that of the running speed on the 33 MHz dragon ball processor.

Algorithms compiled into ARM protocols can call programs inside the PALM OS and return to the application that calls it, but it cannot directly access global or local variables for 68K applications (unless their pointer has passed to ARM original code), ARM The original code does not have global variables or static variables, nor does any program that requires operating system run library support. PACE jumps to "Original Code" of the specified address, the developer's code is responsible for establishing all the operating environments you need. Some parameters are passed to the ARM origin for callbacks in the application and operating system, as well as a pointer defined by an application, and the content of the buffer pointing to the application is the application definition. When the operating system and the 68K application are called, the original code must be processed by the transmitted data, and also handle the byte order of the structure package, queue, and parameter group. This is a complex topic, and so far only some simple tools are available, so it is only recommended that those with rich experiences do this in the case of doing. There will be some GCC-based tools and sample code in the development of the Group's Development Plan Plan Module.

Sampling Sound API

Existing sound manager has been significantly enhanced in Palm OS 5. Now the sound manager supports playing and recording 8 or 16-bit stereo and mono any sampling sound, with a repeating sampler and a 16-channel software mixer, further containing standard WAV format (no Compressed PCM or IMA4-bit adaptive differential, called IMA ADPCM). The licensee's hardware may contain support for the mixer or other functions.

You can play synchronously or asynchronously, and multiple sound streams are automatically mixed. Each sound stream can be started and stopped separately, and the volume or stereo balance can be adjusted separately. You can play sound in a separate buffer, or the application provides a callback function, so the sound can become a sound stream: real-time decoding and generating.

The sound that is played by the system because of the screen, error sound, etc., has also been converted to a sampling sound. (Currently, the pre-release emulator has the sound of test purposes, and will not be used on the release of the release in the future.)

Mac OS Pipe Development Tool (CDK)

The Mac OS Pipe Development Tool (CDK) is now included in the Palm Desktop Software 4.0 version of the PALM desktop software on Mac OS 9 or Mac OS X.s the library and header files necessary to develop a HotSync pipe. The new user manager API in this CDK contains a new API function installed by a new auxiliary pipeline and application. There are several previously just included in the CDK of the PC. The API function is already added to the Mac CDK. HotSync's user interface has also been upgraded for Mac OS X Aqua, providing the appearance and experience of Mac OS X. C / C Sync Suite About Macintosh's Companion and Reference documents have updated details about the details of the new API and the CDK function content of Mac OS X.

Windows Pipeline Development Tool (CDK)

Now Windows CDK contains project files / wizards for updated Visual Studio.net. In addition, the COM SYNC Suite section in Windows CDK has also updated an extended API function. Developers who use COM Sync Suite to develop pipelines with Visual Basic or other languages ​​to develop pipes now can access pipeline managers, user data, installation assistants, and HotSync API (HSAPI). The pipeline manager object can be used to register the pipe for the HotSync Manager during installation. User data objects can be used to access user data stored in desktop computers, and HSAPI objects can be used to control the HotSync Manager application. Installation Assistant Objects can be used to query the database and applications installed by the device. Developers who use the above API in C / C pipeline will find the same functionality in COM SYNC Suite. Palm Desktop Software Scalability Framework

Palm

Desktop software

4.1

The version added two technologies that allow developers to expand their functions:

Plugins and expansions.

Palm

Desktop software

SDK

Support

Visual C

with

Visual Basic

To develop plugins and expansion. Scalability framework allows developers to insert applications to

Palm

Desktop software, and you can make your desktop applications to provide integrated, complete

Palm OS

solution. This article Source: http: //kb.palmsource.com/cgi-bin/palmsource.cfg/php/enduser/std_adp.php p_sid = zH2Orkvh & p_lva = & p_faqid = 848 & p_created = 1094031678 & p_sp = cF9zcmNoPTEmcF9ncmlkc29ydD1mYXFzLnVwZGF0ZWQ6RCZwX3Jvd19jbnQ9NTcmcF9zZWFyY2hfdGV4dD1jaGluZXNlJnBfc2VhcmNoX3R5cGU9MyZwX3Byb2RfbHZsMT1_YW55fiZwX2NhdF9sdmwxPX5hbnl_JnBfcGFnZT0x & p_li =?

转载请注明原文地址:https://www.9cbs.com/read-69884.html

New Post(0)