Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 7
4 WristApp Design Guide
A WristApp is basically an EEPROM-based application. The kernel will support multiple EEPROM-based
applications that also has a fixed address for its overlay area. Applications of this type can be larger than
the maximum available heap memory. When an EEPROM based application becomes the foreground
application through a mode change, the kernel will load the banner state into the application state handler
overlay area. On the succeeding request for a state change, the kernel will load the new state handler code
into the overlay area for execution.
The overlay memory area is used by all EEPROM-based applications to store both common and state code
and has a fixed location in memory.
The ASD is located in the heap. Each EEPROM based application will have its own dedicated ASD
section in the heap.
The code space is composed of two sections: common code and the application states. The common code
has all the routines that will be called by the kernel and the application states. These routines are the:
resource handler, mode banner message (if defined in application), display routines, and utility routines.
The application states are the state handlers for each state used in the application.
Since only one state can be in the foreground at any given time, the kernel will automatically swap in the
required state handler into the state section. This makes for efficient use of code space and allows for
larger applications to be built even with limited physical memory. The figure below shows the memory
usage of the overlay area.
HEAP
TOD ASD
COMM ASD
EEPROM OVERLAY AREA
EEPROM APP 1 ASD
EEPROM APP 2 ASD
EEPROM
EEPROM APP 1 ADD
EEPROM APP 2 ADD
EEPROM APP 1
COMMON
EEPROM APP 1 STATE 3
EEPROM APP 1
COMMON
EEPROM APP 1 STATE 0
EEPROM APP 1 STATE 1
EEPROM APP 1 STATE 2
EEPROM APP 1 STATE 3
EEPROM APP 2
COMMON
EEPROM APP 2 STATE 0
EEPROM APP 2 STATE 1
EEPROM APP 2 STATE 2
EEPROM APP 2 STATE 3