PROGRAMMING The FLASH EPROMS with the User Interface Software Rev 0.2 for the QUADS board: ==================================================================== This document describes the steps necessary to program the Flash EPROMS with the User Interface Software for the QUADS board. The document is provided, primarily, because the User Interface Software is not contained in the flash EPROM's shipped with the early versions of the board. The Motorola S-record format files are provided so they can be programmed into the Flash EPROMS. This guide shows you how to download the software to the on-board RAM and then program the Flash EPROM's from the RAM. In describing the example, we will assume an IBM/PC host, running MS-DOS. SUN/4 users should be able to follow this easily enough, as the functions invoked are the same for each host (there are usually fairly minor differences in command syntax). For simplicity sake, we will also assume that you are working with an ADI board, jumpered to address 100 (hex) on the PC-bus and that the MC68360 QUADS board has been dip-switch set to address 0 (these are the default settings). Commands following the prompt "DOS>" are issued to the host computer, those following the prompt "QUICCbug>" are typed to the board. All input is entered on the IBM/PC console. The User Interface Software only works with the host software that is command line driven (host_cl.exe), not with the host software with the graphical user interface (host_gui.exe). 1. Software Installation: ------------------------- The QUICC software revision 0.2 diskettes should contain (at least) two executable files: host_cl.exe and psrec.exe along with a set of g-files. (Note: the psrec.exe file will not work with the host_gui.exe currently, so you do need to use the command line host file. The two ".exe" files should be copied to some directory in your command search path. (Otherwise, you will have to run the programs by typing ..\host and ..\psrec since it is standard practice to run these programs from within the EXAMPLES directory where the g-files are stored). Also, copy the srecord to be downloaded (quicc_fl.srx) to the EXAMPLES directory. Now move to the EXAMPLES directory. For details regarding the command syntax and g-file contents, consult the MC68360 Software User's Manual. 2. Establish contact with and reset the board: ---------------------------------------------- DOS> host_cl 100 0 After running the host program, a legend screen should be displayed on the screen. This describes all of the control characters that are intercepted and handled by the host in a special way. All other input typed is passed to the board. Press control-R. This exits the legend menu, resetting the board at the same time. You are now communicating directly with QUICCbug, the on-board monitor/debugger (CPU32bug). The QUICCbug reset message should now be displayed in the top part of the console. 3. Download the QUICC User Interface Software Rev 0.2 to RAM: ------------------------------------------------------------- To instruct the board to wait for the program to be downloaded type: QUICCbug> pdl This instructs the board to start waiting for a program to be downloaded over the parallel port. Exit the host program by typing control-X. You are now back in the normal DOS environment. Now we download the QUICC module (quicc_fl.srx) over the parallel port to the board. The program must be loaded to RAM rather flash memory, so the program is downloaded to RAM (address 0x480000), rather than the address encoded in the program (address 0x80000). To download the code with a positive offset from the address to which it is linked, the argument "-add" (followed by a hexadecimal offset) must precede the program name on the command line. The download process is as follows: DOS> psrec -add 400000 qsui_fV0.2 100 The prompt will take several minutes to come back as the process of downloading a large file like this takes some time. 5.Programming the Flash EPROMS: ------------------------------- In order to erase and program the flash 12v is needed. If 12v is not applied to the board an error results, that error is then printed to the screen. To program the flash to starting from address 0x80000 and load from memory beginning at address 0x480000 and end at approximately 0x4FFFFF (0x500000-1) type: QUICCbug> lof 480000 500000-1 80000 6. Running QUICC User Interface Software from Flash EPROMS: ----------------------------------------------------------- We are now finished downloading. Re-enter the host program to re-establish communication with the board and start up the MC68360 QUADS User Interface Software. DOS> host_cl 100 0 In the next step we can check to see that the QUICC User Interface software was loaded correctly. To do this we will run the program from the debugger: QUICCbug> go 80000 It will take a few seconds for the "QUICC menu" to come up. Note that with Version 2.0 you will see the message "bad string type (b0) len = 0". This is a bug in the software that will be fixed in the next release, however it does not affect the functionality of the software, just hit carriage return after receiving the message and the QUICC menu will then appear. You now should be looking at the first menu in the QUICC User Interface Software application. You will see "QUICC menu" at top, with 30 options listed below it. If you see this menu then you have downloaded the software correctly. If not, try doing a memory display of the srecords which were downloaded to the RAM as well as Flash EPROMS. QUICCbug> md 480000;di or QUICCbug> md 80000;di You should see some assembler code listed, such as: 00403000 2E7C0040 3000 MOVEA.L #$403000,A7 00403006 4EF90008 3F38 JMP ($83F38).L ... etc. If the code does not appear to be there, then the download was not successful and you should retry from step 2. **Note**: Remember that if the MC68360 QUADS board gets powered off for any reason prior to the flash being loaded you will have to download the software again to RAM.