Agenda Looking Ahead...
Developing Handhelds Targeting Personal Digital Assistant Platforms June 6, 2002
P General Issues P Platform Overviews P Development Tools P Business Summary
Sasmito Adibowo
Arcle Technologies http://www.arcle.com
General Issues
General Issues Opposite Usage Patterns
“... a handheld is not a PC. Bigger is not necessarily better. Speed is not measured in megahertz – or MIPS, or even FLOPS for that matter. Developers will need to shift paradigms when targeting handhelds...”
People generally use handhelds in frequent, short bursts; while people work on PCs for several hours at a time.
Accesses per day
Waiting a few minutes for a PC to boot and a wordprocessor to load is acceptable if one’s going to write a paper for two hours. If the sole purpose of turning on the handheld is just to look up somebody’s Average session phone number to call, waits can be time (minutes) frustrating. Source: Palm, Inc user surveys
General Issues
General Issues
User Interface
Memory Considerations
P Small screen, – most are 6cm * 7cm, some are smaller. P Limited resolution and color. P Small or no keyboard. P Stylus, not mouse – programming will be slightly different. P Less taps is better.
P Most handhelds do not carry secondary storage – all data are stored in the main memory. P Out-of-memory situations will occur more often – applications must degrade gracefully instead of simply terminating. P Memory grew from 2MB, 8MB, to 64MB. But as handhelds grew smaller, don’t expect that trend to continue.
General Issues
Platform Overviews
Conserving Power
Discussion Scope
P Avoid lengthy computations – leave the analysis to the desktop machine. P Avoid polling, favor blocking. Thus the OS can suspend the CPU. P Limit the use of peripheral devices – sounds, serial, modems, etc. P Optimize for fast response time. Avoid background processing. PDAs only have one user to take care of.
P 3Com’s Palm OS. P Microsoft Windows CE. P Lineo Embedix Plus.
Palm OS
Palm OS
Architecture Overview
Platform Components
P Palm OS® software. P Reference hardware design. P HotSync® conduit data synchronization technology. P Platform component tools including an API that enables developers to write applications. P Software interface capabilities to support hardware add-ons . Source: Palm OS website
Palm OS
Palm OS
Application Startup and Stop
Memory
P Only one application at a time. P No exit command – user simply selects another application. P Application launch codes:
P 32-bit physical address space. P All memory are considered of a part of a card. P Cards may contain RAMs, ROMs, or a combination of both. P Partitions:
< sysAppLaunchCmdNormalLaunch – Normal launch. < sysAppLaunchCmdCardLaunch – Launch the application from an expansion card. < sysAppLaunchCmdFind – Finds a text string. < sysAppLaunchCmdInitDatabase – Initialize database prior to HotSync restore.
P Application stop: appStopEvent – upon receiving this event, an application must exit its event loop, close any open files and forms, and exit.
< Dynamic Heap < Storage Heap
Palm OS
Palm OS
Memory Manager
Data Manager
P General memory allocation/de-allocation. P Two types of memory:
P Higher-level data abstraction, for (more) persistent storage. P Databases instead of files. P Data divided into discrete pieces that the system help manages. P Two major categories:
< Moveable chunks (handles). < Fixed chunks (pointers).
P Heap compaction < When allocation request failed. < Move unlocked moveable chunks down to lower addresses.
P Memory chunks are marked with their owner – freed when the application terminates.
< Record databases < Resource databases
Palm OS
Palm OS
Data Manager
Springboard Expansion
P Record Databases
P Used in Handspring Visor handhelds. P Open standard – documentation available for download, no user fees, no royalties, no proprietary parts. P Low cost – uses the PCMCIA 68-pin block. P flexible power – built-in supply of 100mA at 3.3V.
< Most common for data storage. < Indexed records. < May be maintained in sorted order. < Each record belong to a category. < Backup may be done on a per-record basis.
P Resource Databases < Free-form storage. < Linear search on access.
Palm OS
Windows CE
Springboard Expansion
Architecture Overview
Inserting a module into the Springboard expansion slot
P Includes all necessary software P Automatic software install/de-install – no driver needed. P Microphone support in handheld. The Springboard expansion slot (below) and examples of possible Springboard modules.
Source: MSDN Library
Windows CE
Windows CE
Platform Overview
Design Goals
P Version 3.0 renamed to Pocket PC. P Available in three form factors:
P Small footprint. P High modularity – to build a high range of embedded systems. P Execute-in-place (XIP) out of ROM. P Use the Win32 API standard. P Portable to different microprocessor familites.
< Handheld PC – touchscreen with keyboard, either PCMCIA or CompactFlash. < Palm PC – touchscreen without keyboard, CompactFlash. < Auto PC – in-car systems.
P Unicode-only character set. P Subset of the Win32 API. P Support for multithreaded applications.
Windows CE
Windows CE
Memory Management
Driver Architecture
P 4GB virtual address space. P Data storage provided as a virtual disk in RAM. P Familiar Win32 and C memory-management functions. P Record-based data access are also available via the Object Store.
P Native drivers – no common interface model, loaded by parent processes. P Stream drivers – exposed to applications through the file system interface. P Regular IPC to drivers are supported.
Windows CE
Lineo Embedix
Driver Architecture
Architecture Overview on the Sharp SL-5xxx
Source: SL-5500 / System Architecture Overview Source: MSDN Library
Lineo Embedix
Lineo Embedix
Platform Overview
Memory Information
P Mostly standard Linux system with kernel version 2.4. P Busybox provides a subset of POSIX command-line utilities. P Qt/Embedded GUI, virtual framebuffer. P PersonalJava 1.2 environment included. P Base applications provided by Qt Palmtop.
P Root filesystem mounted as RAM disk. P All data are managed as regular files. P The Java VM is handled like a regular process.
Source: “SL-Series” Memory Information for JavaTM & Qt/Embedded Applications
Development Tools
Native Code Compilers
Discussion Scope
CodeWarrior for Palm OS
P Native-code compilers. P Bytecode or source interpreters. P Java environments (VM, libraries, and tools).
P The “official” development tool for the Palm OS. P Uses C, C++, or Motorola 68K assembly language, – program directly to the Palm OS API. P Host platform: Windows or Mac. P C++ Support: < Global stack-based objects. < Namespaces < RTTI < Templates
Native Code Compilers
Native Code Compilers
CodeWarrior for Palm OS
CodeWarrior for Palm OS
Debugger
Editor
< GUI Builder. < Integrated debugging – with emulator or on-device trough serial/USB. < Source or assembly level debugging. < Code highlighting. < Wizards. < Class browser.
Emulator
Project Manager
Wizards Source: CodeWarrior 8 for Palm OS Platform Datasheet
P IDE features:
P Retail price: $499 P Contact: http://www.metrowerks.com
Native Code Compilers
Native Code Compilers
Microsoft eMbedded Visual Tools
Microsoft eMbedded Visual Tools
P Microsoft’s CE development toolset. P Components:
P Program directly to the Windows CE API for C/C++. P C++ offers the option of MFC and ATL for Windows CE. P Debugging options:
< eMbedded Visual C++. < eMbedded Visual Basic. < SDK and remote tools.
P Features the familiar Visual Studio user interface.
< Simulating Windows CE environment under desktop Win32. < Remote debugging through cable.
Native Code Compilers
Native Code Compilers
Microsoft eMbedded Visual Tools
MobileBuilder
P Cost: $14.95 (international shipping) – free downloads available. P Contact: http://msdn.microsoft.com/vstudio/device/p rodinfo.asp
P Develop for several platforms from the same code base. P Supported targets: Palm OS, Windows CE, Pocket PC, Windows NT, 98, 95, 3.1, MSDOS, and DPMI. P IDE with drag-and-drop RAD tools. P Host platform: Windows 2000, NT 4.0, 98, 95
Native Code Compilers
Native Code Compilers
MobileBuilder
MobileBuilder
Visual Programming Environment
P C-language, code to Penright’s proprietary API. P Over 350 handheld-focused API: handwriting recognition, signature capture, bar code scanning, etc. P Separate runtime licenses for each target platform. P Price: $1595 per developer seat. P Contact: http://www.penright.com
Powerful Form Designer
Source: MobileBuilder Spec Sheet.
Bytecode Interpreters
Bytecode Interpreters
PocketC
PocketC
P Scripting, C-like language (but not C!). P Cross processor capability on Windows CE. P Able to write code on handheld. P Desktop IDE available; without GUI builder (Windows host). P Separate (incompatible) versions for Palm OS and Windows CE.
P Price: $30 (Palm), $38 (Windows CE). P Contact: http://www.orbworks.com
Source: OrbWorks website
Bytecode Interpreters
Bytecode Interpreters
NS Basic/Palm
NS Basic/Palm
P Uses the BASIC programming language. P Develop on Windows desktop, with RAD tools. P Runtime size: 88K. P Debugging using Palm OS Emulator. P Price: $149.95 P Contact: http://www.nsbasic.com/palm/
Source: NS Basic website
Bytecode Interpreters
Bytecode Interpreters
NS Basic/CE
NS Basic/CE
P Uses standard VBScript interpreter engine. P Code directly in handheld. P IDE with RAD tools. P Database support - ADOCE. P Cross-processor support.
P Royalty-free program distributions. P Price: $149.95 P Contact: http://www.nsbasic.com/ce
Source: NS Basic website
Java Environments
Java Environments
KVM Reference Implementation
Jeode PDA Edition
P Focus on connected devices. P Multithreading support. P VM size: 50K – 80K, working memory: 128K. P Current target: Palm OS. Desktop: Windows and Solaris. P No native support. P Contact: http://java.sun.com/products/cldc/ds/
P PersonalJava 1.2 compliant – VM certified by Sun. P Complete JNI support. P Targets: Windows CE, Linux (X11, Qt/Embedded, QPE). P Dynamic Adaptive Compilation (DAC). P Contact: http://www.insignia.com
Java Environments
Java Environments
Waba
Waba
P Strict subset of Java: language, class file, bytecode format. P Cross-platform VM: Palm OS, Windows CE, Newton, TI, even DOS. P Small footprint
P Very limited set of libraries. P No multithreading, no exceptions. P Supports serial and socket communications. P Native interface implemented by modifying VM’s source code. P No-charge, GPL license. P Contact: http://www.wabasoft.com
< VM+classlib less than 64K on Palm OS and Windows CE. < Working memory less than 10K.
Business Summary
Business Summary
Targeting Palm OS
Targeting Windows CE
P Pros
P Pros
< Market share leader – control the market’s directions. < OS built for small, low-powered devices – may appear in wider settings. < Vendor support and connectivity to enterprise products: IBM, Oracle, Sybase, SAP.
P Cons < High learning curve for developers. < Limited capacity of the Motorola Dragonball processor.
< Similarity to other members of the Windows family – simple transition from desktop-based Windows development. < Microsoft efforts for CE to dominate in-car computing. < Availability of familiar applications: Word, Excel, Outlook.
P Cons < Declining market segment – from small to smaller. < Large memory, battery, and user interface requirements.
Business Summary Targeting Linux
P Pros < As expected from Linux: GPL open source. < Interesting possibilities to mix-and-match components. < Most software components can be downloaded at no cost.
P Cons < Very high learning curve. < Most development tools are not mature – usually resorts to command-line gcc. < No established standard – too many GUI toolkits and libraries.
References P Campbell, Tom. Programming Windows CE applications on your Windows CE machine. Programming Power. P Epplin, Jerry. A developer's perspective on Sharp's Zaurus SL-5000D Linux/Java PDA. Nov. 12, 2001. P Palm, Inc. A Flexible Architecture for Innovative Solutions . 2002. http://www.palmos.com/platform/architecture.html P Palm, Inc. Palm OS Memory Architecture. http://oasis.palm.com/dev/kb/papers/1145.cfm?print=true P Palm, Inc. Zen of Palm. P Palm, Inc. Palm OS Programmer's Companion, Volume I. P Penright. MobileBuilder Spec Sheet. P Gregory, Kimberly . Embedded Development with Microsoft Windows CE. April 1998. P Handspring. The Springboard Platform Whitepaper. 1999 P Insignia. Jeode PDA Edition VM. http://www.insignia.com/. 2002.. http://www.insignia.com/. 2002.
References P Richter, Jeffrey. Developing Applications for Microsoft Windows CE: An Overview of the Windows CE SDK and Visual C++ for Windows CE. MSDN Library. March 15, 1997. P Metrowerks. CodeWarrior 8 for Palm OS Platform Datasheet. P Microsoft Corp. Microsoft Windows CE Technical FAQ. MSDN Library. P Microsoft Corp. Microsoft Windows CE: The New Choice for Dedicated Systems. MSDN Library. P Microsoft Corp. Windows CE 2.10: Frequently Asked Questions. July 27, 1998. P Microsoft Corp. Windows CE Memory Architecture. MSDN Library. P Sharp Corporation. “SL-Series” Memory Information for JavaTM & Qt/Embedded Applications. (revision 1.00 2002.4.4) P Sun Microsystems. Java 2 Platform Micro Edition (J2ME) Technology for Creating Mobile Devices White Paper. May 19 2000. P Wireless Developer Network. WirelessDevNet Online Training. http://www.wirelessdevnet.com
Thank You Any Questions?