Date: 04/15/2008 A. Overview The purpose of the IOP DIAG SDK is to assist in the bringup effort of Bollywood. It contains some source codes, header files, libraries, and tools to build the followings: 1) libsys.a - This is the main library that contains all the hardware initialization routines. 2) minimon0_sram.elf - This is a stand-alone shell program that runs out of SRAM. It contains basic memory and flash commands. 3) boot1_dev.flash - This is a development boot1 flash image (128KB+spare) that can be written to block 0 of the NDEV NAND flash to test memory initialization. 4) eemon.elf - This is a stand-alone SRAM-based program that has basic functions to read and write EEPROM. B. SDK Structure The SDK has the following directory structure: - usr/ - bin/ - x86/ - Cygwin-based tools - rvl/ - Pre-built IOP-based programs - include/ - Header files required to build programs and libraries - lib/rvl/ - Pre-built IOP-based libraries - src/ - apps/ - common/ - Source to build libapputils.a (used by minimon0) - eemon/ - Source to build eemon.elf - minimon0_sram/ - Source to build minimon0_sram.elf - boot/ - boot1.diag/ - Source to build development various boot1 images: - boot1_dev.flash * This image can be used on existing NDEV systems - boot1_ati.flash * This image is for old ATI diag (3 blocks) boot - boot1_nintendo.flash * This image is for old Nintendo diag boot - lib/ - ee/ - Source to build libee.a (used by eemon.elf) - sys/ - Source to build libsys.a and contains all the hardware initialization routines used on IOP. - signum/ - Contains various definition and macro files to be used with Chameleon JTAGJet program. C. Installing & Building SDK To install the SDK: - Start a Cygwin shell window - Unpack the SDK image (unzip) into the installed directory - Set the environment variable $ROOT to point to the installed directory - Set the environment variable $RVL_MEM to 128 (for 128MB GDDR3 config). To build the SDK: - Go to $ROOT/usr/src - Type "make" to build libraries and programs in local directories but not installing them. - Type "make exports" to build libraries and programs in local directories AND installing them to $ROOT/usr/lib/rvl and $ROOT/usr/bin/rvl. For example, if you modify libsys.a, you would want to do "make exports" so that boot1 build would pickup your changes. D. Using minimon0_sram.elf This is a simple shell that runs out of SRAM. It contains various commands to initialize and test memory and to read/write/test NAND flash. It is often used to write boot1 to block 0 of the NAND flash. Some of the useful commands are: 1) NAND * cap - Enable and display the NAND flash capabilities * erase - Erase the specified NAND flash blocks * dbg - Turn debugging on/off for NAND commands * wrbN - Write block N of NAND flash * fv - Verify NAND flash pages * fr - Read NAND flash page * br - Read the specified flash blocks and dump to file 2) Memory * mem - Set of commands to initialize and test Napa, GDDR3 * peek - Look at a memory location * poke - Set a value to a memory location To write boot1 to block 0 of NAND, you can use the following commands: * cap - Enable flash device * dbg - Turn on debugging * erase 0 0 - Erase block 0 * wrbN c:\tmp\boot1_dev.flash 64 0 - Write file boot1_dev.flash with 64 pages to block 0 * fv 0 0 64 - Verify block 0 from page 0 to 64