PalmFAQ
Version 0.7
Mon Feb 5 09:00:02 2001
This is the Palm Dev Forum Frequently Asked Questions List,
posted monthly to the palm-dev-forum mailing list.
Questions / comments / criticisms can be sent to
adam@wozniak.dnsalias.org
This document is maintained as a flat text file for widest accessability.
It is available in three forms:
http://wozniak.dnsalias.org/~adam/PalmFAQ.src (raw text)
http://wozniak.dnsalias.org/~adam/PalmFAQ.txt (text with outgenerated index)
http://wozniak.dnsalias.org/~adam/PalmFAQ.html (autogenerated html)
---- Index
==== Section 0: Questions about this list ====
Q0.1 Where is this list archived?
Q0.2 What other sources of information exist?
Q0.3 Is it OK to post "help wanted" or other job ads on the mailing list?
==== Section 1: Questions about Development Environments ====
Q1.1 What development environments and toolchains exist?
Q1.2 What does the error "The registry key 'BDWM' cannot be found" mean?
Q1.3 I've just downloaded the Palm emulator POSE. Where do I get a ROM image?
Q Can someone send me one via email?
Q1.4 I want to make color bitmaps in Metrowerks CodeWarrior, but the colors
Q get all messed up or are all black. What's wrong?
Q The CodeWarrior debugger keeps crashing. What's wrong?
==== Section 2: Questions about C / C++ ====
Q2.1 How do I declare a variable? How do I make a string? What's a pointer?
Q What is a memory leak and how do I find it?
Q What does the compile time error XXXX mean?
Q2.2 How do I convert a floating point number to text?
Q How do I convert text to a floating point number?
==== Section 3: Questions about the PalmOS API ====
Q3.1 What does the error value 5647 mean?
Q3.2 Where are all the standard C library functions? Where's memcpy() ?
Q3.3 How do I spawn a thread or fork a process?
Q3.4 Are there any good references for the PalmOS API?
==== Section 4: Questions about Palm hardware
Q4.1 How do I manually control the serial RTS/DTR lines?
Q4.2 What Palm hardware exists?
Q4.3 Is my Palm device compatable with a Frobnitz XYZZY?
Q4.4 How can I generate a unique ID for each device?
Q4.5 I want to do weird and bizarre things not supported by PalmOS.
Q What kind of chips are used in Palm devices?
Q Where can I find technical specifications for them?
==== Section 5: Questions about Palm software
Q5.1 Where can I find a program that does XXXX?
Q5.2 What data formats do the built in applications use?
==== Section 6: Questions about networking
Q6.1 How do I make TCP/IP work in POSE?
Q Why do I keep getting "iNet 1410" errors in POSE?
Q6.2 How do I make a wireless TCP/IP connection on a Palm VII ?
---- End of Index
==== Section 0: Questions about this list ====
Q0.1 Where is this list archived?
A0.1 Archives are incredibly useful sources of information. If you have a
question, it is a good idea to search the archives first before posting.
Most of the time the problem you're staring at blankly has been stared
at blankly by others, and is somewhere in the archives. Archives are
maintained at the following locations:
http://www.escribe.com/findgroup.html?query=palm
http://www.egroups.com/list/palm-dev-forum/info.html
Q0.2 What other sources of information exist?
A0.2 There are several resources on the web which can help you.
Palm's "Getting Started" web page
http://www.palmos.com/dev/started/
Wade's Pilot Programming FAQ
http://www.wademan.com/Pilot/Program/FAQ.htm
Warren Young's Pilot Programming FAQ (offshoot of Wade's)
http://www.cyberport.com/~tangent/palm/faq/
The Palm Developer Knowledge Base
http://oasis.palm.com/dev/kb/
Palm's Documentation page on palmos.com
http://www.palmos.com/dev/tech/docs/
The Pilot-unix mailing list
http://hcirisc.cs.binghamton.edu/mailman/listinfo/pilot-unix
Hotdispatch developer exchange
http://www.hotdispatch.com/palm
Other forums hosted on news.palmos.com
//news.palmos.com
Other forums hosted on news.massena.com
//news.massena.com
Q0.3 Is it OK to post "help wanted" or other job ads on the mailing list?
A0.3 This does occur from time to time. As long as it doesn't swamp the
existing traffic it will probably be tolerated. Please make such posts
brief. If you're replying, make sure you reply to the sender and NOT
to the list at large.
==== Section 1: Questions about Development Environments ====
Q1.1 What development environments and toolchains exist?
A1.1 Many. http://www.palmos.com/dev/tech/tools/ contains a comprehensive
list.
Q1.2 What does the error "The registry key 'BDWM' cannot be found" mean?
A1.2 There was a problem with connecting to the emulator or device for
debugging. This can have many causes. Fortunately, Metrowerks
has fixed many of these problems so you don't see this error very
often any more. See http://oasis.palm.com/dev/kb/faq/1790.cfm
Q1.3 I've just downloaded the Palm emulator POSE. Where do I get a ROM image?
Q Can someone send me one via email?
A1.3 The quickest way is to download them from a real device using the
RomTransfer.prc that came with POSE. You can get other ROM images by
registering as a developer at http://www.palmos.com/dev/program/
and then going to the ROM Image Clickwrap area of the Provider Pavilion.
It is a violation of license agreement for third parties to send them to
you.
Q1.4 I want to make color bitmaps in Metrowerks CodeWarrior, but the colors
Q get all messed up or are all black. What's wrong?
Q The CodeWarrior debugger keeps crashing. What's wrong?
A1.4 You need to install a number of patches to get CodeWarrior R6
to do color bitmaps correctly. The patches below also fix a known
debugging problem under Windows 2000.
Go to http://www.palmos.com/dev/tech/tools/ and install the
"Palm OS SDK version 3.5"
From the same place also install "Palm OS SDK 3.5 Update 1"
Go to ftp://palm:p1l0t@ftp3.metrowerks.com/ and get the
debugger plugins
Also, be sure to use a "bitmap family", as individual multicolor
bitmaps don't work.
I would also recommend looking into using PILRC as a post-build tool
for adding bitmap resources to your .PRC files. PILRC is generally
less troublesome to work with.
==== Section 2: Questions about C / C++ ====
Q2.1 How do I declare a variable? How do I make a string? What's a pointer?
Q What is a memory leak and how do I find it?
Q What does the compile time error XXXX mean?
A2.1 The palm-dev-forum is not the best place to ask generic questions
about the C or C++ programming languages. There are plenty of good
sources of information. I recommend the following:
Books:
"The C Programming Language"
Brian W. Kernighan and Dennis M Ritchie
"The C++ Programming Language"
Bjarne Stroustrup
Online:
Introductory C course by Steve Summit
http://www.eskimo.com/~scs/cclass/cclass.html
Comp.lang.c USENET FAQ
http://www.eskimo.com/~scs/C-faq/top.html
Comp.lang.c newsgroup
comp.lang.c
Detecting memory leaks in PalmPilot programs
http://www.fifthgate.org/articles/palm_mem_leaks.html
Q2.2 How do I convert a floating point number to text?
Q How do I convert text to a floating point number?
A2.2 See http://www.mv.com/users/wje/Ftp/Pilot/fp.c
==== Section 3: Questions about the PalmOS API ====
Q3.1 What does the error value 5647 mean?
A3.1 Error values are two byte values. The most significant byte tells
you what class the error came from. The least significant byte
tells you the specific error in that class. Working through this
example:
first convert 5647 to the hex value 0x160F
look for the corresponding class entry 0x1600 in ErrorBase.h
note that this is the fileErrorClass
find the header file which uses that error class
(FileStream.h in this case)
Convert the least significant byte 0x0F back to decimal 15
Look for the error in the error list of that header file. It should
look something like this:
#define fileErrIOError (fileErrorClass | 15)
Q3.2 Where are all the standard C library functions? Where's memcpy() ?
A3.2 The standard C library is not part of the PalmOS API. In most cases
there are equivalent functions. Look at the "Standard IO" section
of the "Palm OS SDK Reference". The list below may also help. It
is not complete, but should give some clues as to where to start.
memset() use MemSet(), but watch the order of arguments!
memcpy() and memmove() use MemMove()
sprintf() use StrPrintF()
printf() look at WinDrawChars()
strcmp() use StrCompare()
malloc() look at MemHandleNew() and MemPtrNew()
free() look at MemHandleFree() and MemPtrFree()
Q3.3 How do I spawn a thread or fork a process?
A3.3 You can't. From the developer's point of view, PalmOS is a single
tasking, single threaded OS.
See http://oasis.palm.com/dev/kb/faq/1053.cfm
Q3.4 Are there any good references for the PalmOS API?
A3.4 The following sources of information may be helpful.
Books:
"Palm Programming: The Developer's Guide"
Neil Rhodes & Julie McKeehan (O'Reilly & Associates)
Online:
Palm's Documentation page on palmos.com
http://www.palmos.com/dev/tech/docs/
==== Section 4: Questions about Palm hardware
Q4.1 How do I manually control the serial RTS/DTR lines?
A4.1 There is no function in the PalmOS API which allows you to do this.
People have suggested various approaches such as tweaking the
dragonball registers, or building custom hardware. No one has yet
posted a known working approach.
Q4.2 What Palm hardware exists?
A4.2 A comprehensive list of hardware, both Palm and other licensees, can
be found at http://www.palmos.com/dev/tech/hardware/compare.html
Q4.3 Is my Palm device compatable with a Frobnitz XYZZY?
A4.3 It is impossible to keep a complete compatability list. Palm does
not publish a compatability guide, and many of these types of
questions go unanswered. The best thing to do is try it, and post
any problems you encounter.
Q4.4 How can I generate a unique ID for each device?
A4.4 You can't easily. Here are some schemes which are commonly suggested,
and might be "good enough" (with reasons why they're not perfect):
HotSync User Name
(can be changed by the user)
Flash ID (see http://oasis.palm.com/dev/kb/faq/1099.cfm)
(not all devices have flash IDs; they can be changed)
DeviceID
(Palm VII only; emulator has device ID 0)
Q4.5 I want to do weird and bizarre things not supported by PalmOS.
Q What kind of chips are used in Palm devices?
Q Where can I find technical specifications for them?
A4.5 Check the following URLS:
Motorola Dragonball (MC68328)
http://ebus.motorola.com/brdata/PDFDB/MICROPROCESSORS/32_BIT/68K-COLDFIRE/M683XX/MC68328UM.pdf
Motorola Dragonball EZ (MC68EZ328)
http://ebus.motorola.com/brdata/PDFDB/MICROPROCESSORS/32_BIT/68K-COLDFIRE/M683XX/MC68EZ328UM.pdf
Motorola Dragonball VZ (MC68VZ328)
http://ebus.motorola.com/brdata/PDFDB/MICROPROCESSORS/32_BIT/68K-COLDFIRE/M683XX/MC68VZ328UM.pdf
Epson SED1375
http://www.erd.epson.com/vdc/pdf/1375/contents.html
Epson SED1376
http://www.erd.epson.com/vdc/pdf/1376/contents.html
AMD Am29LV160BB
Fujitsu MBM29LV160B
Toshiba TC58FVB160
==== Section 5: Questions about Palm software
Q5.1 Where can I find a program that does XXXX?
A5.1 PalmGear is a good place to look. See http://www.palmgear.com
Q5.2 What data formats do the built in applications use?
A5.2 Source code for all the built in apps (memopad, datebook, etc...) can
be found in the example source code that comes with the PalmOS3.5 SDK.
==== Section 6: Questions about networking
Q6.1 How do I make TCP/IP work in POSE?
Q Why do I keep getting "iNet 1410" errors in POSE?
A6.1 Right click on POSE. Select Settings / Properties... Make sure the
"Redirect NetLib calls to host TCP/IP" is checked. This tells POSE
to use your PC for network communication.
Recently Palm decided to change the IP address of the content-dev.palm.net
development server. You may need to change it in your emulator.
Go to preferences / wireless and make sure the Proxy is set to
209.247.202.106
Q6.2 How do I make a wireless TCP/IP connection on a Palm VII ?
A6.2 You can't. The Palm VII transceiver only supports UDP over the wireless
link, and most of the details are undocumented and hidden from the
developer. You can, however, use INetLib to GET and POST http. See
the "Palm OS SDK Reference" for more details on INetLib.