developing/programming palmos applications cs449 introduction to systems software
DESCRIPTION
Developing/Programming PalmOS Applications CS449 Introduction to Systems Software. Palm Application Development & GUI Programming. C Program hello .c SayHello( MainForm );. C header file hello .h #define MainForm 1000. hello .prc PalmOS executable. Palm Resource file (GUI Elements) - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/1.jpg)
Developing/Programming
PalmOS Applications
CS449Introduction to Systems Software
![Page 2: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/2.jpg)
Palm Application Development & GUI Programming
C Program
hello.cSayHello( MainForm );
Palm Resource file (GUI Elements)
hello.rcpFORM ID MainForm AT (0 0 160 160)USABLEBEGIN TITLE "Hello World"END
C header file
hello.h#define MainForm 1000
hello .prcPalmOS executable
![Page 3: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/3.jpg)
Palm Resource file (GUI Elements)
• Forms
• Alerts
• Menus
• Tables
• Lists/Popup
• Buttons
• Push buttons
• Check boxes
• Sliders, scrollbars
• Labels Look Up:
• Form bitmaps
• TextFields
![Page 4: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/4.jpg)
Compiling & Linking a PalmOS Application (Hello World example)
C source code(hello.c)
C Preprocessor
Header file (hello.h)
(1) C Compiler
m68k-palmos-gcc-c hello.c –o hello.o
C Object code“Motorola 68000 binary code”
m68k-palmos-gcc hello.o -o hello
PalmOS Resource Code (hello.rcp)
(3) PilRC hello.rcpUI Resource Compiler
Convert .rcp to binary formatted
A number of .bin files
Palm Executable
(.prc)
(2) Post-Processor
m68k-palmos-obj-res hello
Separate code Resources
typeXXX.myfile.grc files (type=code, data, pref, rloc)
(4) Build-prcPost-Linker
Combine all objects into a binary .prc Palm executable
build-prc -t appl
-o hello.prc
-n “Hello”
-c *.grc *.bin
![Page 5: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/5.jpg)
Programming Tools
Without IDE (Command-line)
• PRC-tools: m68k-palmos-gcc
(C Compiler)m68k-palmos-obj-res
(gcc Post-Processor)PilRC
(UI Resource Compiler)Build-PRC
(PalmOS Post-Linker)
• Cmd-line debugger
Test/Run executable:
• Simulator• Emulator
• PDA (HotSync)
With IDE (GUI)
Good Environment to:
Edit/Develop Code Build Project Run Step in/out during execution Trace/Report
• Built-in PRC-tools• Built-in Debugger
Test/Run executable:
» Built-in Simulator » Built-in Emulator
» PDA (HotSync)
Cygwin Shell PalmOS Developer Studio
![Page 6: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/6.jpg)
Cygwin Shell
![Page 7: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/7.jpg)
![Page 8: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/8.jpg)
Palm Examples: Hello World Program GUI & Run
![Page 9: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/9.jpg)
PalmOS Developer Studio
![Page 10: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/10.jpg)
Makefile-1
• Script file to automate program compilation and linking (making)
• Makefile is a list of rules and commands:
target : source file(s)command (must be preceded by a tab)
CC=gcc CFLAGS=-g hello: hello.c
$CC $(CFLAGS) -ohello hello.c
![Page 11: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/11.jpg)
Makefile-2
PalmOS Application Makefile
![Page 12: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/12.jpg)
Examples:1.CS Calculator
![Page 13: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/13.jpg)
Example-2: IR Chat Program - Serial Communications using IR/Serial Ports
![Page 14: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/14.jpg)
Example-3: Attack Game - Serial Communications
![Page 15: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/15.jpg)
Example-4: GPad Program - Communicating over a network with TCP/IP
![Page 16: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/16.jpg)
Example-5: VFS Program – Virtual File System
![Page 17: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/17.jpg)
Example-5: VFS Program – Virtual File System
![Page 18: Developing/Programming PalmOS Applications CS449 Introduction to Systems Software](https://reader035.vdocument.in/reader035/viewer/2022070408/56814406550346895db09b0f/html5/thumbnails/18.jpg)
Palm OS Architecture
Hardware
Operating System Kernel
Library (Managers)
Applications
MemoryManager
WindowManager
DatabaseManager
Comm.Manager
VFSManager
User Mode
Kernel Mode
…