# $Id: USAGE,v 1.7 2001/03/07 08:32:28 abhijit Exp $

The program eep is used for burning and reading an eeprom.  It reads
data from stdin and writes it to the eeprom. The data needs to be in
binary (raw) format.  None of the usual hex and/or ascii formats (Intel,
Motorola srecord, etc) are supported, so if your assembler outputs in only
a hex/ascii format, you will need to convert it to binary (see, e.g.,
the Hex2bin and srecord, available from the metalab.unc.edu/pub/Linux
archive).  When reading, the output is also raw binary to stdout (unless
the -t option is given).

Usage:

      eep  -0|-1|-2  -r|-w  -b|-t  offset  size

where:

    -0|-1|-2  -0 chooses port lp0, -1 port lp1, and -2 port lp2,
    -r|-w     -r reads the eeprom to stdout, and -w burns it from stdin,
    -b|-t     -b is normal (binary) mode, and -t is debugging (ascii hex),
    offset    is the start address within the eeprom, 0..32767, and,
    size      is the number of bytes to read/write, 0..32768.

The offset and size can be specified as a string of digits in decimal
notation, but will be taken as hexadecimal when there is a ``0x'' prefix,
and octal when preceded by ``0''.

Examples
--------
# Read the contents of a 2864 in binary (raw) form and save it in a file
eep -1 -r -b 0 8192 > contents.bin
# Same as:
eep -1 -r -b 0 0x2000 > contents.bin


# List 16 bytes starting at offset 128
eep -1 -r -t 128 16
# Same as:
eep -1 -r -t 0x80 0x10

# Write 16384 bytes from the file nepci.lzrom into the first-half of
# a  28C256 eeprom, through lp0:
cat nepci.lzrom | eep -0 -w -b 0 16384

Abhijit Dasgupta
takdoom@yahoo.com

