From a2ea0152aedf19f939c545d3c692728a8010fea4 Mon Sep 17 00:00:00 2001 From: Ivan Pang Date: Fri, 21 Oct 2011 17:54:20 -0400 Subject: POST updates; eepromwriter now supports .bin instead of .dat --- boot_loader/IBL_buildibl | 2 ++ hfile2array/hfile2array.c | 4 ++-- post/docs/README.txt | 18 ++++++++---------- post/evmc6670l/bin/post_romparse.bat | 2 +- post/evmc6678l/bin/post_romparse.bat | 2 +- writer/eeprom/docs/README.txt | 21 ++++++++++++--------- writer/eeprom/evmc6670l/bin/eepromwriter_input.txt | 2 +- writer/eeprom/evmc6678l/bin/eepromwriter_input.txt | 2 +- 8 files changed, 28 insertions(+), 25 deletions(-) diff --git a/boot_loader/IBL_buildibl b/boot_loader/IBL_buildibl index 35fc35d..fb20f36 100644 --- a/boot_loader/IBL_buildibl +++ b/boot_loader/IBL_buildibl @@ -7,6 +7,7 @@ cp -f ../util/i2cConfig/i2cparam_c66x_le.out ../../../i2cparam_0x51_c6678_le_0x5 cp -f ../util/i2cConfig/i2cConfig.gel ../../../i2cConfig.gel cp -f ../util/btoccs/b2ccs.exe ../../../b2ccs.exe cp -f ../util/btoccs/b2i2c.exe ../../../b2i2c.exe +cp -f ../util/btoccs/ccs2bin.exe ../../../ccs2bin.exe cp -f ../util/bconvert/bconvert64x.exe ../../../bconvert64x.exe cp -f ../util/romparse/romparse.exe ../../../romparse.exe @@ -25,6 +26,7 @@ mv -f ../../../i2cparam_0x51_c6670_le_0x500.out bin/i2cparam_0x51_c6670_le_0x500 mv -f ../../../i2cConfig.gel bin/i2cConfig.gel mv -f ../../../b2ccs.exe ../util/btoccs/b2ccs.exe mv -f ../../../b2i2c.exe ../util/btoccs/b2i2c.exe +mv -f ../../../ccs2bin.exe ../util/btoccs/ccs2bin.exe mv -f ../../../bconvert64x.exe ../util/bconvert/bconvert64x.exe mv -f ../../../romparse.exe ../util/romparse/romparse.exe diff --git a/hfile2array/hfile2array.c b/hfile2array/hfile2array.c index 765821f..0414afa 100644 --- a/hfile2array/hfile2array.c +++ b/hfile2array/hfile2array.c @@ -110,7 +110,7 @@ int main(int argc, char **argv) { if (fputs(line, out) < 0) { - printf ("fputs %s error\n", fputs); + printf ("fputs %s error\n", line); goto error; } } @@ -123,7 +123,7 @@ int main(int argc, char **argv) if (fputs("};\n", out) < 0) { - printf ("fputs %s error\n", fputs); + printf ("fputs };\\n error\n"); goto error; } diff --git a/post/docs/README.txt b/post/docs/README.txt index 82092e7..285d59c 100644 --- a/post/docs/README.txt +++ b/post/docs/README.txt @@ -36,18 +36,16 @@ Steps to run POST in CCSv5: Steps to program POST to EEPROM: -1. Be sure that IBL romparse.exe is pre-built under tools\boot_loader\ibl\src\util\romparse, if IBL is not built, - refer to tools\boot_loader\ibl\doc\README.txt on how to build IBL for EVMC66xxL. +1. Copy tools\post\evmc66xxl\bin\post_i2crom.bin to tools\writer\eeprom\evmc66xxl\bin directory -2. Go to the tools\post\evmc66xxl\bin directory in Windows Explorer and open the post_romparse.bat in a text editor, - change "C6000_CG_DIR", "TARGET", "ENDIAN" and "IBL_ROOT_DIR" parameters accordingly. +2. Navigate to tools\writer\eeprom\evmc66xxl\bin\ and open eepromwriter_input.txt. Make the following changes: + - Set the file_name to post_i2crom.bin + - Set the bus_addr to 0x50 + - Set start_addr to 0 + - Set swap_data to 0 + Save and close eepromwriter_input.txt -3. Double click post_romparse.bat. This will generate a CCS format image file "post_i2crom.dat", which can be programmed - to I2C EEPROM slave bus address 0x50, below are the steps how to program the EEPROM using the EEPROM writer utility: - - * Copy post_i2crom.dat to tools\writer\eeprom\evmc66xxl\bin directory and rename it to "app.dat". - * Change bus_addr to 0x50 and swap_data to "0" in tools\writer\eeprom\evmc66xxl\bin\eepromwriter_input.txt and save the file. - * Refer to tools\writer\eeprom\evmc66xxl\docs\README.txt on how to program the CCS data file to EEPROM. +3. Refer to tools\writer\eeprom\evmc66xxl\docs\README.txt on how to program the raw binary file to EEPROM 4. Once the programming is completed successfully, user can set the boot mode to I2C mode with bus address 0x50 and boot the POST directly from the EEPROM after POR. The boot status and test result can be monitored using the Hyper diff --git a/post/evmc6670l/bin/post_romparse.bat b/post/evmc6670l/bin/post_romparse.bat index cd42df0..92c9251 100644 --- a/post/evmc6670l/bin/post_romparse.bat +++ b/post/evmc6670l/bin/post_romparse.bat @@ -39,6 +39,6 @@ if %ENDIAN% == little ( echo Generating I2C ROM data ... %IBL_ROOT_DIR%\src\util\romparse\romparse -rom_base 0x50 post_i2crom.map.pp -mv i2crom.ccs post_i2crom.dat +%IBL_ROOT_DIR%\src\util\btoccs\ccs2bin -swap i2crom.ccs post_i2crom.bin rm -f *.ccs *.b diff --git a/post/evmc6678l/bin/post_romparse.bat b/post/evmc6678l/bin/post_romparse.bat index 03d5e58..a8378d4 100644 --- a/post/evmc6678l/bin/post_romparse.bat +++ b/post/evmc6678l/bin/post_romparse.bat @@ -39,6 +39,6 @@ if %ENDIAN% == little ( echo Generating I2C ROM data ... %IBL_ROOT_DIR%\src\util\romparse\romparse -rom_base 0x50 post_i2crom.map.pp -mv i2crom.ccs post_i2crom.dat +%IBL_ROOT_DIR%\src\util\btoccs\ccs2bin -swap i2crom.ccs post_i2crom.bin rm -f *.ccs *.b diff --git a/writer/eeprom/docs/README.txt b/writer/eeprom/docs/README.txt index 9da0cb9..a456d38 100644 --- a/writer/eeprom/docs/README.txt +++ b/writer/eeprom/docs/README.txt @@ -2,16 +2,18 @@ EEPROM Writer Utility EEPROM Writer is a simple utility to program a CCS format image/data file to I2C EEPROM. -Steps to program the EEPROM: +Steps to program the EEPROM with a binary file: 1. Be sure to set the boot mode dip switch to no boot/EMIF16 boot mode on the EVM. -2. Copy the CCS format data file to writer\eeprom\evmc66xxl\bin directory, and rename it to app.dat. +2. Copy the binary file to writer\eeprom\evmc66xxl\bin directory. 3. Change the file_name, bus_addr, start_addr and swap_data in writer\eeprom\evmc66xxl\bin\eepromwriter_input.txt if necessary. - By default the EEPROM writer will load app.dat to DSP memory and write the data to I2C slave + Make sure that file_name is set to the name of your binary file. + + *By default the EEPROM writer will load app.bin to DSP memory and write the data to I2C slave bus address 81 (0x51) at EEPROM device start byte address 0 with data swap disabled (0). - + 4. Open CCSv5 and launch the evmc66xx emulator target configuration and connect to core 0. 5. Load the program writer\eeprom\evmc66xxl\bin\eepromwriter_evm66xxl.out to CCS, be sure evmc66xxl.gel is used in CCS @@ -21,10 +23,12 @@ Steps to program the EEPROM: 7. Load app.dat to 0x80000000: * In CCSv5, right click mouse in memory window, select "load memory". - * Browse and select writer\eeprom\evmc66xxl\bin\app.dat. - * Select the option "Use the file header information to set the start address and size of the memory block to be - loaded" and click "next". - * Change the Start Address to "0x80000000" if it is not 0x80000000, and click "finish". + * Browse and select your binary file. + - By default, the browse menu only displays .dat files. You will have to change the option + TI Data Format (*.dat) to Raw Data Format (*.bin) to find your binary file. + * Change the Start Address to "0x80000000" if it is not 0x80000000 + * Change the Type-size to 32 bits if it is not 32 bits. + * click "finish". 8.After the data file is loaded into the memory, run the program (in CCSv5, press F8), it will start to program the EEPROM. @@ -32,7 +36,6 @@ Steps to program the EEPROM: 9.When programming is completed, the console will print "EEPROM programming completed successfully", if there is any error, the console will show the error message. - Steps to re-build eepromwriter: 1. Uses CCS to build eepromwriter: diff --git a/writer/eeprom/evmc6670l/bin/eepromwriter_input.txt b/writer/eeprom/evmc6670l/bin/eepromwriter_input.txt index 76b3dd9..d87d3c4 100644 --- a/writer/eeprom/evmc6670l/bin/eepromwriter_input.txt +++ b/writer/eeprom/evmc6670l/bin/eepromwriter_input.txt @@ -1,4 +1,4 @@ -file_name = app.dat +file_name = app.bin bus_addr = 0x51 start_addr = 0 swap_data = 0 diff --git a/writer/eeprom/evmc6678l/bin/eepromwriter_input.txt b/writer/eeprom/evmc6678l/bin/eepromwriter_input.txt index 76b3dd9..d87d3c4 100644 --- a/writer/eeprom/evmc6678l/bin/eepromwriter_input.txt +++ b/writer/eeprom/evmc6678l/bin/eepromwriter_input.txt @@ -1,4 +1,4 @@ -file_name = app.dat +file_name = app.bin bus_addr = 0x51 start_addr = 0 swap_data = 0 -- cgit v1.2.3-54-g00ecf