GEMstudio Guide
Production File
passThru Programming
Here are the basics you need to know to program the Amulet Color chip from an external processor:
1. You need to save your compiled project as a .pdb file. In Version 1.1.4 and later this feature is part of the full GEMstudio license, but requires a quick modification to enable it in the legacy GEMcompiler. Here's the mod:
The .pdb projects are merely a collection of non-compressed binary files. To enable the "save as pdb..." feature in the GEMcompiler (version 0.0.A or later), you must add a line to a config file. Locate the file cfgGEMcompiler.ini, which resides in the current user's Application data folder. In Windows XP, bring up a "Run" dialog and paste this line, or in Vista/7, paste this right into the seach bar in the start menu and hit enter:
%appdata%\AmuletTech\Global\Configuration\cfgGEMcompiler.ini
on a new line add the text:
SavePDB=YES
After making sure all instances of the GEMcompiler and GEMstudio are closed, save this file. After reopening the compiler you should see the options to save a PDB file in the file menu.
2. You need to extract the individual files from the pdb format so you have individual binary files which can be sent to the Amulet. See PDB, which explains how to do this.
3. Those binary files are sent to the Amulet using a slightly modified 128-byte or 1K Xmodem (with 16-bit CRC) protocol. For 1k-Xmodem, the SOH byte is 0x02, and for 128-byte it is 0x01. See XMODEM Protocol regarding the protocol used and review the notes below.
Here are the details you need to know:
1. Bytes 0-5 of each binary file are the flash header bytes. The Amulet uses these bytes to determine where to store the file within the flash. You can send the files in any order, the Amulet won't mind.
2. In standard Xmodem protocol the slave sends out a 'C' character once per second. In Amulet's color chip, we will instead output a character that indicates the size of the serial dataflash connected to first chip select CS0 of the SPI bus. This character is reffered to as the Flash Size Notifier, or FSN. The flash size to character mapping is as follows:
a : 1Mbit
b : 2Mbit
c : 4Mbit
d : 8Mbit
e : 16Mbit
f : 32Mbit (standard starter kit size)
g : 64Mbit (GCC-2 size)
Z : None Detected
3. There is basically no time limit between packets or files. The chip will wait about 2 seconds, and if I get no response, then I just send out the same thing again, whether its an ACK or the FSN.
4. You can set the Amulet up to program either by flipping the Program Mode (pin 26) to HIGH and asserting the reset, or the much cleaner way of sending a "wake up" message (0xA0, 0x02, 0x00, 0x16, 0x48), which has to be at the same baud rate as the page you are currently on when trying to wake it up (4800, 9600, 19200, 38400, 57600, 115200, etc). By default, it will also program at this rate. Please contact Amulet if you would like to change the default programming rate to something other than the current baud rate. This requires a quick modification of the OS files.
5. When entering the programming mode from software "wake up" message, there will be an OS version String output after 3 seconds. The compiler uses this message to make sure the firmware and compiler version match, but you can ignore this if you do not want to use it. You can skip the 3 second wait by sending a 0x43 (ASCII 'C') after sending the "wake up" message. Additionally, the OS version string may contain characters which match the expected FSN, but are not valid FSN characters. The OS string is encapsulated with { and } brackets, or in hex: 0x7B and 0x7D respectively. This means if entering program mode with the software command, you should wait until after the closing } bracket before looking for the FSN to begin programming.
6. Xmodem has a CRC, but there is an optional secondary CRC that checks the data that was actually written to the flash. After sending the EOT byte (0x04) after the last packet in each file, you can send what we have dubbed the EOTCRC (0x16) This will cause the Amulet color chip to calculate a new CRC based off of the data in the flash. A match is indicated by an ACK and a non-match by a NACK. The FSN will begin transmission after the ACK or NACK. A NACK'd file should be reprogrammed. Every 500ms during the flash read and CRC calculation a 0x14 will be sent to let the host know we're still alive, but working on the CRC verification. This would only happen on larger files.
7. When there are no more files to send the Amulet, send an ETB (0x17) and the Amulet will reboot and start running at the new homepage that you just programmed.

Start Here
Development Tools
| Site Use Terms | Terms of Sale | Privacy | Warranty | Site Map | |