This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6678: Boot from the nor flash failed, how to check?

Part Number: TMS320C6678


Hello engineer!

We have referred to https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1073147/faq-tms320c6678-how-to-flash-the-ibl-intermediate-boot-loader-into-eeprom-and-how-to-flash-the-application-binary-into-nor-how-to-boot-the-ibl-application-binary

I found that both IBL and nor flash display program successfully, but still cannot be successfully started.

The IBL used is in C:\ti\pdk_c667x_2_0_16\packages\ti\boot\ibl\src\make\bin, install the PDK that comes with it.

Using an oscilloscope test, it was found that I2C clk had a relatively long signal duration during power on, and the clk of SPI nor flash only appeared for a few us.

Is there any other way to further confirm the problem?

Thanks!

  • Hi Jacky,

    Due to a holiday in India, half of our team is currently out of office. Please expect a 1~2 day delay in responses.

    Apologies for the delay, and thank you for you patience.

    Regards,
    Takuma

  • Jacky,

    Is it the custom hardware board or the C6678 EVM of TI?

    Regards

    Shankari G

  • Thanks reply!

    The hardware is modified from the EVM,most important parts have not been modified,the bootmode we just use a 5bit switch, but I used the resistances to follow the EVM mode. The attachment is our schematic diagram. And use this hardware to emulate is normal.

    c6678_v10-w for review.pdf

  • Jacky,

    Let us go step by step

    As a first step, after flashing the IBL into EEPROM, the IBL boots ?  ---- > In this step, the flashing of IBL binary into EEPROM memory happens through I2C.

    Able to see the IBL boot logs as I have given in the FAQ?

    ----

    If yes, post me the IBL boot logs. 

    If no, IBL source code has to be modified according to the hardware modification.

    Regards

    Shankari G

  • Thanks Shankari,

    I think you are right, I debugged the serial port again and confirmed that the IBL boot did not print any logs. So the i2crom_0x51_c6678_le.bin is error(which  comes directly with PDK, as attached ).

    i2crom_0x51_c6678_le.rar

    I tried to compile IBL and found the following error:

    DELL@MM-202210201824 /c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make
    $ make evm_c6678_i2c ENDIAN=little I2C_BUS_ADDR=0x51
    make -f makestg1 I2C_BUS_ADDR=0x51 I2C_MAP_ADDR=0x500 \
    ENDIAN_MODE=little ARCH=c64x TARGET=c66x EVM=c6678l SPI=no SPI_DEFS='SPI_MODE=1 SPI_ADDR_WIDTH=24 SPI_NPIN=5 SPI_CSEL=2 SPI_C2TDEL=1 SPI_CLKDIV=8 SPI_ROM=1' \
    CEXCLUDES='COFF BIS NAND_GPIO' c66x
    make[1]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make'
    make -f makestg2 ARCH=c64x TARGET=c66x ENDIAN=little I2C_SIZE_BYTES=0x20000 I2C_BUS_ADDR=0x51 INTERNAL_UTILS= SPI_DEFS='SPI_MODE=1 SPI_ADDR_WIDTH=24 SPI_NPIN=5 SPI_CSEL=2 SPI_C2TDEL=1 SPI_CLKDIV=8 SPI_ROM=1' utils
    make[2]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make'
    make -C ../util/btoccs
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/btoccs'
    gcc -o b2ccs b2ccs.c
    gcc -o b2i2c b2i2c.c
    gcc -o ccs2b ccs2b.c
    gcc -o bfaddsect bfaddsect.c
    gcc -o bfmerge bfmerge.c
    gcc -o ccs2bin ccs2bin.c
    ccs2bin.c: In function 'parseit':
    ccs2bin.c:74:14: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
    if (!strcmp (argv[i], "-swap"))
    ^~~~~~
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/btoccs'
    make -C ../util/romparse TARGET=c66x
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/romparse'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/romparse'
    make -C ../util/i2cConfig c66x MAINDEFS='-DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=0x51 -DEXCLUDE_COFF -DEXCLUDE_BIS -DEXCLUDE_NAND_GPIO -DSPI_MODE=1 -DSPI_ADDR_WIDTH=24 -DSPI_NPIN=5 -DSPI_CSEL=2 -DSPI_C2TDEL=1 -DSPI_CLKDIV=8 -DSPI_ROM=1 -DPAD_FILE_ID_1=1 -DPAD_FILE_ID_2=1 -DINIT_EXE_FILE='"ibl_c66x/ibl_init.i2c.be.ccs"' -DEXE_FILE_1='""' -DEXE_FILE_2='"ibl_c66x/ibl.i2c.be.ccs"''
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/i2cConfig'
    make -f makestg2 ARCH=c64x I2C_BUS_ADDR=0x51 I2C_MAP_ADDR=0x500 TARGET=c66x c66x
    make[4]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/i2cConfig'
    Checking command line dependencies
    same
    making hw
    make -C ../../hw/c64x/make hw
    make[5]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/hw/c64x/make'
    Checking command line dependencies
    same
    make[5]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/hw/c64x/make'
    making device
    make -C ../../device/c64x/make CDEFS='-DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=0x51 -DEXCLUDE_COFF -DEXCLUDE_BIS -DEXCLUDE_NAND_GPIO -DSPI_MODE=1 -DSPI_ADDR_WIDTH=24 -DSPI_NPIN=5 -DSPI_CSEL=2 -DSPI_C2TDEL=1 -DSPI_CLKDIV=8 -DSPI_ROM=1 -DPAD_FILE_ID_1=1 -DPAD_FILE_ID_2=1 -DINIT_EXE_FILE=ibl_c66x/ibl_init.i2c.be.ccs -DEXE_FILE_1= -DEXE_FILE_2=ibl_c66x/ibl.i2c.be.ccs' device
    make[5]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/device/c64x/make'
    q -I -a -ele.oa -o$.da ../../../device/c64x/c64x.s
    /bin/sh: q: command not found
    make[5]: [c64x.da] Error 127 (ignored)
    Checking command line dependencies
    same
    make[5]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/device/c64x/make'
    cl6x -z -o i2cparam_c66x_le.out -m i2cparam_c66x_le.map i2cparam.le.oc ../../hw/c64x/make/i2c.le.oc ../../hw/c64x/make/pll.le.oc ../../hw/c64x/make/cfgpll.le.oc ../../hw/c64x/make/cfgpll2.le.oc ../../device/c64x/make/c64x.le.oa ../../hw/c64x/make/psc.le.oc ../../device/c64x/make/c66xutil.le.oc i2cparam.cmd "C:/ti/ti-cgt-c6000_8.3.2"/lib/rts64plus.lib
    <Linking>
    "C:\\Users\\Administrator\\AppData\\Local\\Temp\\{C762D5CE-0934-40D2-BE14-469CA6389566}", line 16: error:
    cannot find file "C:/ti/ti-cgt-c6000_8.3.2/lib/rts64plus.lib"
    warning: automatic RTS selection: attempt to automatically link in index
    library "libc.a" failed; file not found
    ../../master/DIAG/user_msg_api.c:217:internal fatal error #99926:
    (ofile_error_handler(): <internal>: corrupted object file: attempting to
    get ELF interface for non-ELF file)

    INTERNAL ERROR: c:\ti\ti-cgt-c6000_8.3.2\bin\lnk6x.exe had an internal inconsistency and aborted

    This is caused by a defect in the TI Linker.
    TI Customer Support may be able to suggest a workaround to avoid this.

    Upgrading to the newest version of the compiler may fix this problem.

    Contact TI in the E2E support forums at http://e2e.ti.com under
    "Development Tools", "TI C/C++ Compiler". See the link titled
    "Submitting an issue".

    We need to see this ENTIRE error message and a complete, reproducible
    test case including ALL of the command-line options.
    Include all of the object files, libraries, and linker command files
    used to link the program.


    >> Compilation failure
    make[4]: *** [c66x] Error 1
    make[4]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/i2cConfig'
    make[3]: *** [c66x] Error 2
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/i2cConfig'
    make[2]: *** [utils] Error 2
    make[2]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make'
    make[1]: *** [le_target] Error 2
    make[1]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make'
    make: *** [evm_c6678_i2c] Error 2

    DELL@MM-202210201824 /c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make

    Can you share an i2crom file that can run normally on EVM?

    Thanks!

  • Hi,

    The standard i2crom file which comes along the package will work only on TI C6678 EVMs.

    And not on custom boards.

    --

    To make it work, the IBL source code has to be modified according to the custom board.

    Path of IBL : - \ti\pdk_c667x_2_0_16\packages\ti\boot\ibl

    Regards

    Shankari G

  • Hi, Shankari:

    So I think I have to compile IBL first, I change the Generation Tool from 8.3.2 to 7.4.24, to follow the FAQ: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1048640/faq-processor-sdk-c665x-ibl-build-steps-on-windows-10-processor-family-c665x/3879673?tisearch=e2e-sitesearch&keymatch=rajarajan%2525252520faq#3879673

    And there is a error:

    gcc -O2 -DEVM=c6678l -DI2C_MAP_ADDR=0x500 ./obj/iblConfig.obj ./obj/device.obj -o iblConfig.out
    ./obj/iblConfig.obj: file not recognized: File format not recognized
    collect2.exe: error: ld returned 1 exit status

    How do I handle this? Thank you!

    The complete log, and setupenvMsys.sh is as follows:

    DELL@MM-202210201824 /c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make
    $ make evm_c6678_i2c ENDIAN=little I2C_BUS_ADDR=0x51
    make -f makestg1 I2C_BUS_ADDR=0x51 I2C_MAP_ADDR=0x500 \
    ENDIAN_MODE=little ARCH=c64x TARGET=c66x EVM=c6678l SPI=no SPI_DEFS='SPI_MODE=1 SPI_ADDR_WIDTH=24 SPI_NPIN=5 SPI_CSEL=2 SPI_C2TDEL=1 SPI_CLKDIV=8 SPI_ROM=1' \
    CEXCLUDES='COFF BIS NAND_GPIO' c66x
    make[1]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make'
    make -f makestg2 ARCH=c64x TARGET=c66x ENDIAN=little I2C_SIZE_BYTES=0x20000 I2C_BUS_ADDR=0x51 INTERNAL_UTILS= SPI_DEFS='SPI_MODE=1 SPI_ADDR_WIDTH=24 SPI_NPIN=5 SPI_CSEL=2 SPI_C2TDEL=1 SPI_CLKDIV=8 SPI_ROM=1' utils
    make[2]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make'
    make -C ../util/btoccs
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/btoccs'
    gcc -o b2ccs b2ccs.c
    gcc -o b2i2c b2i2c.c
    gcc -o ccs2b ccs2b.c
    gcc -o bfaddsect bfaddsect.c
    gcc -o bfmerge bfmerge.c
    gcc -o ccs2bin ccs2bin.c
    ccs2bin.c: In function 'parseit':
    ccs2bin.c:74:14: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
             if (!strcmp (argv[i], "-swap"))
                  ^~~~~~
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/btoccs'
    make -C ../util/romparse TARGET=c66x
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/romparse'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/romparse'
    make -C ../util/i2cConfig c66x MAINDEFS='-DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=0x51 -DEXCLUDE_COFF -DEXCLUDE_BIS -DEXCLUDE_NAND_GPIO -DSPI_MODE=1 -DSPI_ADDR_WIDTH=24 -DSPI_NPIN=5 -DSPI_CSEL=2 -DSPI_C2TDEL=1 -DSPI_CLKDIV=8 -DSPI_ROM=1 -DPAD_FILE_ID_1=1 -DPAD_FILE_ID_2=1 -DINIT_EXE_FILE='"ibl_c66x/ibl_init.i2c.be.ccs"' -DEXE_FILE_1='""' -DEXE_FILE_2='"ibl_c66x/ibl.i2c.be.ccs"''
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/i2cConfig'
    make -f makestg2 ARCH=c64x I2C_BUS_ADDR=0x51 I2C_MAP_ADDR=0x500 TARGET=c66x c66x
    make[4]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/i2cConfig'
    Checking command line dependencies
    same
    making hw
    make -C ../../hw/c64x/make hw
    make[5]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/hw/c64x/make'
    Checking command line dependencies
    same
    make[5]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/hw/c64x/make'
    making device
    make -C ../../device/c64x/make CDEFS='-DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=0x51 -DEXCLUDE_COFF -DEXCLUDE_BIS -DEXCLUDE_NAND_GPIO -DSPI_MODE=1 -DSPI_ADDR_WIDTH=24 -DSPI_NPIN=5 -DSPI_CSEL=2 -DSPI_C2TDEL=1 -DSPI_CLKDIV=8 -DSPI_ROM=1 -DPAD_FILE_ID_1=1 -DPAD_FILE_ID_2=1 -DINIT_EXE_FILE=ibl_c66x/ibl_init.i2c.be.ccs -DEXE_FILE_1= -DEXE_FILE_2=ibl_c66x/ibl.i2c.be.ccs' device
    make[5]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/device/c64x/make'
    q -I -a -ele.oa -o$.da ../../../device/c64x/c64x.s
    /bin/sh: q: command not found
    make[5]: [c64x.da] Error 127 (ignored)
    Checking command line dependencies
    same
    make[5]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/device/c64x/make'
    cl6x -z -o i2cparam_c66x_le.out -m i2cparam_c66x_le.map i2cparam.le.oc ../../hw/c64x/make/i2c.le.oc ../../hw/c64x/make/pll.le.oc ../../hw/c64x/make/cfgpll.le.oc ../../hw/c64x/make/cfgpll2.le.oc ../../device/c64x/make/c64x.le.oa ../../hw/c64x/make/psc.le.oc ../../device/c64x/make/c66xutil.le.oc i2cparam.cmd "C:/ti/c6000_7.4.24"/lib/rts64plus.lib
    <Linking>
    make[4]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/i2cConfig'
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/i2cConfig'
    make -C ../util/bconvert
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/bconvert'
    make[3]: Nothing to be done for `all'.
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/bconvert'
    make -C ../util/iblConfig/build EVM=c6678l I2C_MAP_ADDR=0x500
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/iblConfig/build'
    touch input.txt
    echo "file_name = ibl.bin" > input.txt
    echo "device = 6" >> input.txt
    echo "offset = 0x500" >> input.txt
    echo "ethBoot-doBootp = " >> input.txt
    echo "ethBoot-bootFormat = " >> input.txt
    echo "ethBoot-ipAddr = " >> input.txt
    echo "ethBoot-serverIp = " >> input.txt
    echo "ethBoot-gatewayIp = " >> input.txt
    echo "ethBoot-netmask = " >> input.txt
    echo "ethBoot-fileName = " >> input.txt
    gcc   -O2 -DEVM=c6678l -DI2C_MAP_ADDR=0x500 ./obj/iblConfig.obj ./obj/device.obj  -o iblConfig.out
    ./obj/iblConfig.obj: file not recognized: File format not recognized
    collect2.exe: error: ld returned 1 exit status
    make[3]: *** [iblConfig.out] Error 1
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/util/iblConfig/build'
    make[2]: *** [utils] Error 2
    make[2]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make'
    make[1]: *** [le_target] Error 2
    make[1]: Leaving directory `/c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make'
    make: *** [evm_c6678_i2c] Error 2
    
    DELL@MM-202210201824 /c/ti/pdk_c667x_2_0_16/packages/ti/boot/ibl/src/make
    setupenvMsys.rar

  • Hi,

    Please do 'make clean' and then build.

    Regards

    Shankari G

  • Hi, Shankari 

    I find that, the C6678 PG1.0 has to use the IBL, and our C6678 is:

    so is it PG2.0?

    If it's PG2.0, may I just boot from SPI directly? which demo can I follow?

    Thanks a lot!

  • Jacky,

    Your picture says it is Silicon revision 1.0 .   For more info refer page no: 71 - Datasheet - Figure 2-17 Name nomenclature.

    For Silicon revision 2.0, both IBL boot and direct SPI boot are possible.

    Regards

    Shankari G

  • I check from the 

    https://www.ti.com/packaging/cn/docs/partlookup.tsp

    And it's newly purchased recently, so is it Silicon revision 2.0?

    The TMS320C6678 Multcore Fixed & Floating-Point DSP Silicon Errata (Revs 1.0, 2.0).pdf Figure 1 has the message about it, but I am not sure.

  • As I already said, please refer page no: 71 - Datasheet - Figure 2-17 Name nomenclature.

    https://www.ti.com/lit/ds/symlink/tms320c6678.pdf

    And match with the nomenclature.