At 8:50 PM -0500 on 3/18/99, you wrote:
> Perhaps as a result of doing a lot of coding before the advent
> of POSE and on hardware that nothing emulates, I've acquired the habit
> of doing most of my testing on a real device, rather than in an
> emulator.
>
> As I reached to reset it for the dozenth time in the last
> hour, a sudden thought came to me: What if the cradle had a reset
> button? It would save me endless time fiddling with the test unit and
> my ready supply of blunted push-pins. I know that it wouldn't be a
> totally easy thing to do, since the reset is triggered from a
> awkward-to-automatically-push location, but I can hope..
Since you mentioned it, I'm reminded of something that may not be
widely known...
<DISCLAIMER> The following information is not for everyone, but may
be useful to some. Please use this information with caution and do
NOT forget to remove it before shipping your software. Your customers
will thank you. </DISCLAIMER>
If the high-bit of the "GDbgWasEntered" (byte) low memory global is
set, pressing the HotSync button on the cradle will trigger a
"DbgBreak()" instead of initiating a HotSync.
This can be useful for those who use a low-level debugger like
PalmDebugger and want a way to break into the debugger. Adding the
following code to your application will enable this feature. ONLY DO
THIS IN A DEBUG BUILD - DO NOT SHIP CODE WITH THIS:
GDbgWasEntered = 0xFF; // Make HotSync button call DbgBreak()
If you're always resetting the device while you're INSIDE your
application, you *could* patch HwrIRQ1Handler (in StartApplication)
with a snippet of code that calls SysReset(). Doing so would change
the HotSync button into a reset button. Again, DO NOT DO THIS IN
SHIPPING CODE. Plus, there are NO guarantees that this will work in
future devices. However, if it works on your device, that's all that
counts, right? Don't forget to unpatch in StopApplication; otherwise
you'll probably crash if you hit the HotSync button after switching
out of your application.
Finally, debugging on the device can sometimes be aided by sprinkling
calls to "DbgMessage" in your code and watching the results appear in
either the console window (in a Simulator build) or in the
PalmDebugger window if you're running on a real device (with serial
connectivity).
--Steve