




       
       
       
       
       
       
       
       
       
                                 M o t o r o l a    G m b H
                                              
                                   T a u n u s s t e i n
       
       
       
       
       
                                        O U T L A W
                                              
                              F l a s h    P r o g r a m m e r
                                              
                         O p e r a t i n g    I n s t r u c t i o n
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
                               Department: SW-Development 514
                               Issue:      T3
                               Date:       12-Jun-95
                               Document #: TAU-OUT-021
       
             /org/systems/outlaw/documents/Miscelaneous.fdr/flash_prog_man.fmt
       



            (c) Copyright MOTOROLA GmbH, Taunusstein 1995, All rights reserved.


                                     Table of Contents                       Page C-1

                                                                             Page:
       1      Introduction ...................................................  1
       1.1      Version History ..............................................  1
       1.2      Purpose ......................................................  1
       1.3      Definitions, Acronyms, and Abbreviations .....................  1
       1.4      Referenced Documents .........................................  1
       1.5      Application ..................................................  1
       2      Getting Started ................................................  2
       2.1      Installation .................................................  2
       2.2      Hardware Requirements ........................................  2
       2.3      Software Requirements ........................................  2
       2.4      Cautions .....................................................  2
       3      Quick Start (Flash an Application) .............................  3
       4      Operation ......................................................  3
       4.1      General Commandline Options ..................................  4
       4.2      Write Operation ..............................................  5
       4.3      Read Operation ...............................................  5
       4.4      Debugging and Development Features ...........................  6
       4.4.1              Boot Block Overwriting .............................  7
       5      Messages .......................................................  7
       5.1      Error Messages at Startup .................................... 11
































                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                  Page 1 of 12

       1      Introduction        
              ------------
       
       1.1    Version History       
              ---------------
       
        Issue:    Date:       Author:      Change History:
          T1      12-May-95   Erwin Nikl   first darft
          T2      26-May-95   Erwin Nikl   option "-noreset" added
          T3      12-Jun-95   Erwin Nikl   option "-noerase" added
       
       
       1.2    Purpose        
              -------
       
       This  manual describes the operation of the OUTLAW Flash Programmer running on
       a IBM PC compatible computer. The OUTLAW Flash Programmer is required to  load
       application programs in the FLASH PROM of the station controller. 
       
       
       1.3    Definitions, Acronyms, and Abbreviations     
              ----------------------------------------
       
          ACK     Positive Acknowledge [2]
          CAN     Cancel [2]
          CRC     Cyclic Redundancy Check
          DLE     Data Link Escape [2]
          EOT     End of Transmission [2]
          NAK     Negative Acknowledge [2]
          PROM    Programable Read Only Memory
          RAM     Random Access Memory
          Vpp     Programming Voltage
       
       
       1.4    Referenced Documents       
              --------------------
       
          [1] INTEL data sheet 28F400BX-B FLASH-PROM
          [2] TAU-OUT-007 Flash Protocol Specification
          [3] TAU-OUT-016 Bootloader Preliminary Design Description
       
       
       1.5    Application        
              -----------
       
       This  document  is  applicable  for  the  OUTLAW  flash  programmer D01.03.00,
       12-Jun-95. 
       
       




                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                  Page 2 of 12

       2      Getting Started       
              ---------------
       
       2.1    Installation        
              ------------
       
       Copy all delivered files in the same directory created for this purpose:
       
          olflash.exe, read_fl.bat, write_fl.bat, manual.txt
       
       Configure the ".bat" files according to your hardware requirements, i.e.   set
       the  proper  COM  port  number  ("1"..."4") at the option "-port". This can be
       done with any text editor. 
       
       
       2.2    Hardware Requirements       
              ---------------------
       
       The program runs on 286 or higher PC compatible computers  with  approximately
       300  k  bytes free RAM. The program needs approximately 100 k byte disk space.
       Additional disk space for the application S-record files is required  (e.g.  >
       1 M byte for a 480 k byte application program). 
          At least  one  free  communication port (COM1 ... COM4) is required for the
       connection to the base station controller board. 
       
       
       2.3    Software Requirements       
              ---------------------
       
       The program runs with MS-DOS 5.0 or greater. 
       
       
       2.4    Cautions        
              --------
       
        +--------------------------------------------------------+
        |  The flash programmer does not run under MS-Windows !  |
        +--------------------------------------------------------+
        +--------------------------------------------------------+
        |  The flash programmer does not run on floppy disks  !  |
        +--------------------------------------------------------+
       
       










                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                  Page 3 of 12

       3      Quick Start (Flash an Application)    
              ----------------------------------
       
       Assuming the S2-record file "ol_r0704.ms2" contains  the  application  program
       which shall be programmed to the FLASH PROM. 
       
        1. Connect a RS232-cable from your computer's COM port to the RSS connector
           of the base station controller. 
       
        2. Edit the file "write_fl.bat" and set the COM port you are using ("1".. 
           "4") at the option "-port". If the option is ommitted COM1 is assumed. 
       
        3. Type in "write_fl ol_r0704.ms2". 
       
        4. Wait until the message "Done." appears after a variety of other
           messages. 
       
        5. The base station performs a RESET and starts the new application
           program. 
       
       
       4      Operation        
              ---------
       
       When  the  program  is  executed without any commanline options a help message
       appears on the screen:
       
          Usage: C:\OUTLAW\FLASH\OLFLASH.EXE [options] -w ms2_file_name
             or  C:\OUTLAW\FLASH\OLFLASH.EXE [options] -r ms2_file_name
                 -w write the FLASH PROM
                 -r read  the FLASH PROM
       
          valid options are:
             -port N    port number, N=1..4, (default 1)
             -baud Bd   baud rate for the fast binary transfer, (default 38400)
             -block Start End   FLASH memory area to be read,
              (default 4000 7FFFF), ignored when writing ('-w')
             -size Blocksize    size of the data frames when reading, (default 4000)
              possible values 1 .. 4000, ignored when writing ('-w')
             -nc   F B  normal  color, (default  7  0 [normal])    F = Forground 
             -ic   F B  inverse color, (default  0 15 [inverse])
             -ec   F B  error   color, (default  0 15 [inverse])
             -bc   F B  busy    color, (default 80 15 [blinking])  B = Background
             -bin       binary_file_name (for debugging)
             -log       log_file_name    to record all messages
             -nocheck   disables address range check
             -noreset   sends no RESET command
             -noerase   FLASH memory will not be erased
       
       All numbers which are used for addresses and address ranges  are  HEX  values.
       Other numbers, e.g. the baud rate, the COM port number, are decimal values. 
       

                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                  Page 4 of 12

       
       4.1    General Commandline Options      
              ---------------------------
       
       The  commanline  options  in general start with the "-" sign directly followed
       by a key word, a "space" character, and the data  belonging  to  this  option.
       The commandline options can be entered in any order. 
       
       Either  the  option  "-w"  (WRITE) or "-r" (READ) followed by a S2-record file
       name is mandatory. 
       
       General options for READ and WRITE are:
       
             -port N    port number, N=1..4, (default 1)
       
              With this option the communication port COM1 .. COM4 of the PC is
              selected. If this option is not used, COM1 is assumed. 
       
       
             -baud Bd   baud rate for the fast binary transfer, (default 38400)
       
              This is the baud rate which is used to speed up the transfer between
              the base station and the PC. It can be modified at the base station
              using a special command ("SET BAUD xxx", [2]). 
              The values can be between 1200 baud and 115200 baud. If the desired
              baud rate cannot be generated by the PC, the next higher baud rate is
              used (up to 115200), e.g. if "-baud 38600" is entered, the PC will
              use 57600 baud. 
              The default value is 38400 baud, the batch files "read_fl.bat" and
              "write_fl.bat" however use 57600 baud (which is a reliable value for
              20 MHz 386 machines). 
       
       
             -nc   F B  normal  color, (default  7  0 [normal])
             -ic   F B  inverse color, (default  0 15 [inverse])
             -ec   F B  error   color, (default  0 15 [inverse])
             -bc   F B  busy    color, (default 80 15 [blinking])
                        F = Forground, B = Background
       
              These options modify the color for the status and error messages. 
              If you are using a monochrome Laptop the dafault values should be
              sufficient. On a color monitor try the following options:
       
                  -nc 7 0     normal  color, lightgrey on black
                  -ic 0 15    inverse color, black on white
                  -ec 14 12   error   color, yellow on red
                  -bc 142 10  busy    color, flashing yellow on green
       





                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                  Page 5 of 12

              Color Codes:   BLACK     0       DARKGRAY      8    BLINK: add 128
              ------------   BLUE      1       LIGHTBLUE     9
                             GREEN     2       LIGHTGREEN   10
                             CYAN      3       LIGHTCYAN    11
                             RED       4       LIGHTRED     12
                             MAGENTA   5       LIGHTMAGENTA 13
                             BROWN     6       YELLOW       14
                             LIGHTGRAY 7       WHITE        15
       
       
       4.2    Write Operation       
              ---------------
       
       For the WRITE operation use the option "-w" followed  by  the  S2-record  file
       containing the data to be programmed. 
          If you  want to program the data of the file e.g. "mptr0708.srx" using COM1
       with 38400 baud for the fast transfer, just type in:
       
                             "olflash.exe -w mptr0708.srx"
       
       
       4.3    Read Operation       
              --------------
       
       The data following the key word "-r" is the file  name  where  the  read  data
       will  be  stored  as  S2-records. To optimize the storage a S-record length of
       128 bytes ("S284...") is used. 
         If you want to read  the  application  program  memory  area  including  the
       codeplug  and  the  tuning  data,  using  COM1,  with  38400 baud for the fast
       transfer, just type in:
       
                           "olflash.exe -r ms2_file_name"
       
       If another range of data within is addressable memory  is  desired,  then  the
       proper options have to be set:
       
             -block Start End   FLASH memory area to be read,
              (default 4000 7FFFF), ignored when writing ("-w")
       
              This option determines the range of data to be read. E.g. 
              for the entire FLASH PROM use "-block 0 7ffff",
              for the codeplug data     use "-block 4000 7fff",
              for the application only  use "-block 8000 7ffff",
              for the entire RAM        use "-block 400000 41ffff". 
       
       







                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                  Page 6 of 12

             -size Blocksize    size of the data frames when reading, (default 4000)
       
              The number of bytes per data frame are defined with this option [2]. 
              Normally this parameter needs not to be set. It might be
              needed in future versions when using modem lines or over the air
              links to program the base station. 
       
       
       4.4    Debugging and Development Features     
              ----------------------------------
       
             -bin  binary_file_name (for debugging)
       
             This option writes the binary data which are transfered via the
             serial interface [2] to the specified file. This option should not
             to be used for normal operation. 
       
       
             -log  log_file_name    to record all messages
       
             All messages which appear in line 17 on the screen can be recorded
             in the specified file. 
       
       
             -nocheck   disables address range check
       
             When programming data ("-w") the address range check is disabled with
             this option. Normally the flash programmer checks whether the addresses
             of the data to be programmed fit into the "flashable" memory area of
             the FLASH PROM [1]. If not, a warning appears on the screen that the
             illegal data were skipped. 
                If you want to write data to other memory locations than the
             flashable area (e.g. RAM, REGISTER) this option must be set. 
                This option is also required when the hardware protected boot block
             of the flash prom shall be reprogrammed [1], refer to section 4.4.1,
             boot block overwriting. 
       
       
             -noreset   sends no RESET command
       
             No reset command is send to the base station at the end of the read or
             write operation, i.e. the application program is not started. 
       
       
             -noerase   FLASH memory will not be erased
       
             The S-record file will not be checked for blocks to be erased
             and no erase commands will be send. This is useful to save time when
             loading data into RAM (see option -nocheck). 
       
       


                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                  Page 7 of 12

       4.4.1  Boot Block Overwriting      
              ----------------------
       
              +-------------------------------------------------------------+
        Note: | This operation may destroy the contents of the boot block ! |
              +-------------------------------------------------------------+
       
       This  operation  should  only  be  performed by special trained personnel in a
       controlled service shop environment !
       
       If you are absolutely sure that you need to do this proceed according  to  the
       following steps:
       
          1. Prepare a S2-record file which contains the new boot block. 
             The S-records must be ordered in a consecutive manner without any
             gaps in the address range. They must start at $0000 and end at
             $3fff, when using the 28F400BX [1]. 
             Other S-records have to be removed, except S8- and S5-records. 
       
             This is very important, because the entire boot block must be
             transfered within one single binary data frame [2] !
       
          2. Disable the hardware protection of the bootblock, refer to [1]. 
       
          3. Create a batch file to execute the flash programmer. Use the normal
             WRITE mode ("-w"), do not forget to set "-nocheck". 
       
          4. Start the created batch file. 
       
          5. The controller board shall respond as described in the "bootloader
             software design description" [3]. 
       
       
       5      Messages        
              --------
       
       The  messages  normally  appear  in  line  17  on the screen. The messages are
       divided in different types. For each type a different color can be selected. 
       
               Standard Messages (SM) : inverse color (-ic)
               Busy Indication   (BI) : busy    color (-bc)
               Error Messages    (EM) : error   color (-ec)
       
       Not all messages might be seen on the screen, because they appear only  for  a
       few milliseconds, but they are recorded when the option "-log" is enabled. 
       
        Messages in alphabetical order:
       
        "'%s' Received, Aborted !"
        EM: The programmer received a message (%s) starting with a "?", e.g. 
            "?Address Error" on the "READ FLASH" command. 
       

                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                  Page 8 of 12

        "'ERROR' Trying to Re-Synchronize the Base Station ..."
        BI: The response on "DOBOOT" was "ERROR". The programmer retries to get
            the correct response on "DOBBOT". 
       
        "**** User Abort *****"
        EM: The user pressed the ESC key. 
       
        "Aborted, No Base Station Seems to be Connected to PORT %d !"
        EM: After sending 10 times a BREAK and a "DOBOOT" without any response. 
            The wrong COM port is assumed. %d is the selected port number (1 .. 4). 
       
        "Address %8lX to %8lX skipped, not within block structure !",
        EM: All addresses of the date of the S-record are outside the flashable
            address range. %8lX represents the addresses. 
       
        "Block: %8lX"
        SM: The FLASH PROM's block structure is received. %8lX is start address
            of the current block. 
       
        "Cannot get a 'BOOT:' Prompt !"
        EM: The programmer is waiting for "BOOT:" and sends 10 times a "?", but
            did not get a response. 
       
        "CRC expected = %08lX, received = %08lX"
        EM: The program receives a different CRC than calculated (expected) and
            sends back a DLE/NAK. 
       
        "Connection Closed, waiting more than %d sec. for response !"
        EM: A response from the base station is expected but not received
            within %d seconds. 
       
        "EOT Received, Aborted !"
        EM: The base station received DLE/NAK on more than 5 retransmissions of
            the same frame. 
       
        "Erasing Block Address %8lX, this might take 60 sec !"
        SM: The block starting at address %8lX is erased. 
       
        "Error initializing COM port %03X for %l baud"
        EM: The the baud rate %l for the COM port at address %03X cannot
            be set. The COM port is not present or is in use by other programs. 
       
        "Flash Data ERASE in Process, do not disturb !"
        BI: The ERASE routine is executed, Vpp is switched on. 
       
        "Flash Data PROGRAMMING in Process, do not disturb !"
        BI: The WRITE procedure has started. 
       
        "Flash Data READING in Process, do not disturb !"
        BI: The READ procedure has started. 
       


                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                  Page 9 of 12

        "FLASH-Device CAN at WRITE Error at Address %lX !"
        EM: The response on ERASE or WRITE is DLE/CAN without any code byte. 
            %lX is the current device address. 
       
        "FLASH-Device ERASE Error at Address %lX !"
        EM: The desired block of the FLASH PROM cannot be erased. %lX is the
            start address of the block. 
       
        "FLASH-Device PROGRAM Error at Address %lX !"
        EM: The desired byte of the FLASH PROM cannot be programmed. 
            %lX is the current device address. 
       
        "FLASH-Device Programming Voltage Error at Address %lX !"
        EM: The programming voltage Vpp is not supplied at ERASE or WRITE. 
            %lX is the current device address. 
       
        "FLASH Procedure Successfully Terminated."
        SM: The WRITE process is done. 
       
        "Interrupt Routine installed."
        SM: The interrupt routine for the serial communication has been installed. 
       
        "Invalid Response at ERASE !"
        EM: An invalid response is received on the "ERASE FLASH ..." command. 
       
        "Loading S2-Records, do not disturb !"
        BI: The S-records are loaded and packed to a binary data frame. 
       
        "Maximum %ld Baud possible."
        SM: The maximum baud rate the base station can handle is received. %ld is
            number of baud. 
       
        "Performing a RESET ..."
        SM: The base station does a RESET (jumps to address $00). 
       
        "Programming Done."
        SM: The WRITE process is done. 
       
        "Programming FLASH from %8lX to %8lX, do not disturb !"
        BI: The data from address %8lX to address %8lX were transfered. The base
            station programs the data into the FLASH PROM. 
            The programmer is waiting for a DLE/ACK, DLE/NAK, or DLE/CAN/code. 
       
        "READ Procedure Successfully Terminated."
        SM: The READ process is done. 
       
        "Reading Done."
        SM: The READ process is done. 
       




                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                 Page 10 of 12

        "Reading FLASH Address %8lX"
        SM: A binary data frame starting at address %8lX has been received and
            is packed to S-records. 
       
        "Reformatting Block < %8lX .. %8lX"
        EM: The S-record line contains some data where the addresses are below
            the lowest flashable address. %8lX represents the addresses. 
       
        "Reformatting Block %8lX .. %8lX >"
        EM: The S-record line contains some data where the addresses are higher
            than the highest flashable address. %8lX represents the addresses. 
       
        "Requesting System Information ..."
        BI: The flash programmer sent a "DOBOOT" and waits for the flash prom
            configuration information (i.e. block structure and maximum usable
            baud rate). 
       
        "Searching for Blocks to be Erased. Please Wait ..."
        BI: The S-record file is analyzed to determine the blocks to be erased. 
            This might take a while. 
       
        "Sending   B R E A K  ..."
        BI: A wrong response when setting the baud rate is detected. The flash
            programmer sends a BREAK to force the bootloader to go back to it's
            main loop with the "BOOT:" prompt and 9600 baud. 
       
        "Sending %d. B R E A K  ..."
        BI: No response on "DOBOOT". The programmer sends it's (1st .. 10th)
            BREAK. 
       
        "Sending Data (%s) %8lX to %8lX, do not disturb !"
        SM: A data frame has been packed and is transmitted to the base station. 
            Starting at address %8lX. %s indicates the reason for the transfer:
            AM - Address Mismatch
                 The following S-record's start address is not in sequence with
                 the previous addresses. The following S-record cannot be packed
                 to the current data frame, so the frame is closed and send out. 
            HW - High Water
                 The binary frame is full, i.e. it reached the high water mark. 
            S8 - All S-records were handled, the termination record has been read. 
                 The current data frame is closed and send out. 
       
        "Switching Programming Voltage OFF"
        SM: The programming Voltage is switched off. 
       
        "Switching Programming Voltage ON"
        SM: The programming Voltage is switched on. 
       
        "Trying to Re-Synchronize the Base Station ..."
        BI: No response on "DOBOOT" is received. The flash programmer send BREAKs
            and retries to get the correct response. 
       

                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                 Page 11 of 12

        "Warning, MS2 checksum error %02X !"
        EM: The S-record's checksum is not FF instead it is %02X. 
            This is only a warning, the process is continued. 
       
       
       5.1    Error Messages at Startup     
              -------------------------
       
       These  messages  are issued when illegal commandline parameters are specified,
       refer to section 4. operations. 
       
        Messages in alphabetical order:
       
        "Block End Address not Specified !"
        No end address follows the option "-block start_address". 
       
        "Block End Address Wrong: '%s' !"
        The block end address %s at the "-block" option is wrong. 
       
        "Block Size Error: '%s'; 0 < block_size <= 4000 !"
        An invalid value is used at the option "-size". 
       
        "Block Size not Specified; 0 < block_size <= 4000 !"
        No block size is specified at the option "-size". 
       
        "Block Start Address not Specified !"
        No start address follows the option "-block". 
       
        "Error accessing COM port %03X !"
        The specified COM port at address %03X is not present or in use by other
        programs. 
       
        "Error Binary Debug File '%s' Cannot be Opened !"
        The debug file %s specified with "-bin" cannot be opened. 
       
        "Error Incorrect Option '%s' !"
        An invalid option %s has been entered. 
       
        "Error initializing COM port %03X for %l baud"
        The baud rate %l for the COM port at address %03X cannot be set. 
        The COM port is not present or is in use by other programs. 
       
        "Error Message Log File '%s' Cannot be Opened !",
        The log file specified with "-log" cannot be opened. 
       
        "Error Opening '%s' !"
        The S2-record file %s cannot be opened. 
       
        "Error Port Number '%s' must be between 1..4 !"
        The value %s following the "-port" option is not between 1 .. 4. 
       


                                 Motorola Internal Use Only               TAU-OUT-021


       Flash Programmer Manual      Issue T3; 12-Jun-95                 Page 12 of 12

        "Error Wrong Baud Rate Specified: '%s'!"
        An invalid baud rate %s follows the "-baud" option. 
       
        "No S2-Record File Name Specified !"
        No S-record file for READ or WRITE was specified. 
       















































                                 Motorola Internal Use Only               TAU-OUT-021
