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: Undefined symbol chipdelay32

Part Number: TMS320C6678

Hello,

I'm trying to rebuild the IBL code for the C6678 EVM after changing the file format of the NAND boot from COFF to ELF.

During the linking process, I get an error saying "Unresolved symbols remain". It cannot find chipDelay32. I have attached a screenshot of the error.

Any idea how I can fix this?

Appreciate your help.

Thanks,

Viney

  • Hi,

    Which SDK is this? What is the toolchain, that you use to cross compile? Have you verified your paths?

    Best Regards,
    Yordan
  • Hi Yordan,

    Thank you for your response.

    I'm using Processor SDK RTOS version 3.02.05 and compiler version 8.1.0.

    I believe I have all the paths set correctly.

    c66xinit.c does include the header file in which chipDelay32 is defined, but I don't know why it's throwing an error.

    Thanks,
    Viney
  • Hi,

    Can you attach the full error log? Also please post the full procedure you use to build your sources.

    Best Regards,
    Yordan
  • Hi Yordan,

    I got past the previous error. There was a file in which the chipDelay32 function was declared as "static". I removed that keyword and that resolved the problem.

    But, further downstream I'm running into another similar problem - undefined symbol iblBootBtbl(), first referenced in iblmain.le.oc

    Here are the steps I followed to rebuild the IBL :

    1. Sourced setupenvMsys.sh script. The paths are defined as follows :
    export C6X_BASE_DIR='"C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0"'
    export C6X_BASE_DIR_MSYS=/c/ti/ccsv6/tools/compiler/ti-cgt-c6000_8\.1\.0
    export PATH=$PATH:$C6X_BASE_DIR_MSYS/bin
    export TOOLSC6X=$C6X_BASE_DIR
    export TOOLSC6XDOS=$C6X_BASE_DIR


    2. Replaced ibl.bootModes[1].u.nandBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB; with ibl.bootModes[1].u.nandBoot.bootFormat = ibl_BOOT_FORMAT_ELF; in the device.c file located in C:\ti\pdk_c667x_2_0_4\packages\ti\boot\ibl\src\util\iblConfig\src


    3. In the MinGW shell, I went : make evm_c6678_i2c ENDIAN=little I2C_BUS_ADDR=0x51

    4. Here's the entire log :

    $ 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_4/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_4/packages/ti/boot/ibl/src/make
    '
    make -C ../util/btoccs
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/util
    /btoccs'
    make[3]: Nothing to be done for `all'.
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/util/
    btoccs'
    make -C ../util/romparse TARGET=c66x
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/util
    /romparse'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/util/
    romparse'
    make -C ../util/i2cConfig c66x MAINDEFS='-DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=0
    x51 -DEXCLUDE_COFF -DEXCLUDE_BIS -DEXCLUDE_NAND_GPIO -DSPI_MODE=1 -DSPI_ADDR_WID
    TH=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_4/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_4/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_4/packages/ti/boot/ibl/src/hw/c
    64x/make'
    Checking command line dependencies
    same
    make[5]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/hw/c6
    4x/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_FIL
    E_ID_1=1 -DPAD_FILE_ID_2=1 -DINIT_EXE_FILE=ibl_c66x/ibl_init.i2c.be.ccs -DEXE_FI
    LE_1= -DEXE_FILE_2=ibl_c66x/ibl.i2c.be.ccs' device
    make[5]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/devi
    ce/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_4/packages/ti/boot/ibl/src/devic
    e/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/c64
    x/make/psc.le.oc ../../device/c64x/make/c66xutil.le.oc i2cparam.cmd "C:/ti/ccsv6
    /tools/compiler/ti-cgt-c6000_8.1.0"/lib/rts64plus_elf.lib
    <Linking>
    make[4]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/util/
    i2cConfig'
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/util/
    i2cConfig'
    make -C ../util/bconvert
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/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_4/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_4/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
    cp iblConfig.out iblConfig.out.dbg
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/util/
    iblConfig/build'
    make[2]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/make'

    make -f makestg2 ARCH=c64x TARGET=c66x ENDIAN=little I2C_SIZE_BYTES=0x20000 I2C_
    BUS_ADDR=0x51 SPI_DEFS='SPI_MODE=1 SPI_ADDR_WIDTH=24 SPI_NPIN=5 SPI_CSEL=2 SPI_C
    2TDEL=1 SPI_CLKDIV=8 SPI_ROM=1' c66x
    make[2]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/make
    '
    making main SPI_CFG=-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 -DI
    NIT_EXE_FILE="ibl_c66x/ibl_init.i2c.be.ccs" -DEXE_FILE_1="" -DEXE_FILE_2="ibl_c6
    6x/ibl.i2c.be.ccs" CDEFS= EXCLUDES=COFF BIS NAND_GPIO
    make -C ../main/c64x/make CDEFS='-DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=0x51 -DEX
    CLUDE_COFF -DEXCLUDE_BIS -DEXCLUDE_NAND_GPIO -DSPI_MODE=1 -DSPI_ADDR_WIDTH=24 -D
    SPI_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_FIL
    E_1='""' -DEXE_FILE_2='"ibl_c66x/ibl.i2c.be.ccs"'' main
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/main
    /c64x/make'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/main/
    c64x/make'
    making device SPI_CFG=-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" CDEFS= EXCLUDES=COFF BIS NAND_GPIO
    make -C ../device/c64x/make CDEFS='-DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=0x51 -D
    EXCLUDE_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_I
    D_1=1 -DPAD_FILE_ID_2=1 -DINIT_EXE_FILE='"ibl_c66x/ibl_init.i2c.be.ccs"' -DEXE_F
    ILE_1='""' -DEXE_FILE_2='"ibl_c66x/ibl.i2c.be.ccs"'' device
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/devi
    ce/c64x/make'
    q -I -a -ele.oa -o$.da ../../../device/c64x/c64x.s
    /bin/sh: q: command not found
    make[3]: [c64x.da] Error 127 (ignored)
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/devic
    e/c64x/make'
    making ethboot
    make -C ../ethboot/c64x/make ethboot
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/ethb
    oot/c64x/make'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/ethbo
    ot/c64x/make'
    making nandboot
    make -C ../nandboot/c64x/make nandboot
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/nand
    boot/c64x/make'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/nandb
    oot/c64x/make'
    making driver
    make -C ../driver/c64x/make driver
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/driv
    er/c64x/make'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/drive
    r/c64x/make'
    making hw
    make -C ../hw/c64x/make hw
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/hw/c
    64x/make'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/hw/c6
    4x/make'
    making interp
    make -C ../interp/c64x/make interp
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/inte
    rp/c64x/make'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/inter
    p/c64x/make'
    making ecc
    make -C ../ecc/c64x/make ecc
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/ecc/
    c64x/make'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/ecc/c
    64x/make'
    making norboot
    make -C ../norboot/c64x/make norboot
    make[3]: Entering directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/norb
    oot/c64x/make'
    Checking command line dependencies
    same
    make[3]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/norbo
    ot/c64x/make'
    cat ibl_c66x/ibl_init_objs_template.inc | sed -e s/ENDIAN_TAG/le/g > ibl_c66x/ib
    l_init_objs.tmp
    cl6x -ppo -DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=0x51 -DEXCLUDE_COFF -DEXCLUDE_BI
    S -DEXCLUDE_NAND_GPIO -DENDIAN_TAG=le ibl_c66x/ibl_init_objs.tmp
    cp -f ibl_c66x/ibl_init_objs.pp ibl_c66x/ibl_init_objs.inc
    cl6x -z -o ibl_c66x/ibl_c66x_init.out -m ibl_c66x/ibl_c66x_init.map ibl_c66x/ibl
    _init.cmd "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0"/lib/rts64plus_elf.lib
    <Linking>
    cp -f ibl_c66x/ibl_c66x_init.out ibl_c66x/ibl_c66x_init.le.out
    rm -f -f ibl_c66x/ibl_init_obj.inc
    hex6x -order L ibl_c66x/ibl_init_image.rmd ibl_c66x/ibl_c66x_init.out
    Translating to ASCII-Hex format...
    "ibl_c66x/ibl_c66x_init.out" .text ==> .text
    "ibl_c66x/ibl_c66x_init.out" .const ==> .const
    "ibl_c66x/ibl_c66x_init.out" .cinit ==> .cinit
    cp -f ibl_le.b ibl_c66x/ibl.b
    ../util/btoccs/b2ccs ibl_c66x/ibl.b ibl_c66x/ibl_init.le.ccs
    hex6x -order L ibl_c66x/ibl_init.rmd ibl_c66x/ibl_c66x_init.out
    Translating to ASCII-Hex format...
    "ibl_c66x/ibl_c66x_init.out" .cinit ==> (BOOT TABLE)
    "ibl_c66x/ibl_c66x_init.out" .const ==> (BOOT TABLE)
    "ibl_c66x/ibl_c66x_init.out" .text ==> (BOOT TABLE)
    ../util/bconvert/bconvert64x -le ibl_le.b ibl.b
    cp -f ibl.b ibl_c66x
    ../util/btoccs/b2i2c ibl_c66x/ibl.b ibl_c66x/ibl.i2c.b
    ../util/btoccs/b2ccs ibl_c66x/ibl.i2c.b ibl_c66x/ibl_init.i2c.le.ccs
    sed -e 's/\r//' ../util/symExtract/symExtract > ../util/symExtract/symExtract_un
    ix
    bash ../util/symExtract/symExtract_unix ibl_c66x/ibl_c66x_init.map ibl_c66x/ibl_
    init_symbols.inc iblBootBtbl iblMalloc iblFree iblMemset iblMemcpy
    rm -f ../util/symExtract/symExtract_unix
    cat ibl_c66x/ibl_objs_template.inc | sed -e s/ENDIAN_TAG/le/g > ibl_c66x/ibl_obj
    s.tmp
    cl6x -ppo -DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=0x51 -DEXCLUDE_COFF -DEXCLUDE_BI
    S -DEXCLUDE_NAND_GPIO -DENDIAN_TAG=le ibl_c66x/ibl_objs.tmp
    cp -f ibl_c66x/ibl_objs.pp ibl_c66x/ibl_objs.inc
    cl6x -z -o ibl_c66x/ibl_c66x.out -m ibl_c66x/ibl_c66x.le.map ibl_c66x/ibl.cmd "
    C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0"/lib/rts64plus_elf.lib
    <Linking>
    "ibl_c66x\ibl_init_symbols.inc", line 2: error: expecting "";"" instead of "x"
    "ibl_c66x\ibl_init_symbols.inc", line 2: error: expecting filename, option,
    MEMORY, or SECTIONS instead of ";"
    "ibl_c66x\ibl_init_symbols.inc", line 3: error: expecting filename, option,
    MEMORY, or SECTIONS instead of "="
    "ibl_c66x\ibl_init_symbols.inc", line 4: error: expecting filename, option,
    MEMORY, or SECTIONS instead of "="
    "ibl_c66x\ibl_init_symbols.inc", line 5: error: expecting filename, option,
    MEMORY, or SECTIONS instead of "="
    "ibl_c66x\ibl_init_symbols.inc", line 6: error: expecting filename, option,
    MEMORY, or SECTIONS instead of "="

    undefined first referenced
    symbol in file
    --------- ----------------
    iblBootBtbl ../main/c64x/make/iblmain.le.oc

    error: unresolved symbols remain
    error: errors encountered during linking; "ibl_c66x/ibl_c66x.out" not built

    >> Compilation failure
    make[2]: *** [iblMain] Error 1
    make[2]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/make'

    make[1]: *** [le_target] Error 2
    make[1]: Leaving directory `/c/ti/pdk_c667x_2_0_4/packages/ti/boot/ibl/src/make'

    make: *** [evm_c6678_i2c] Error 2

    Thanks,
    Viney
  • The chipDelay32 is a function that is provided in assembly in the IBL source code. In order for this to work in the ELF format, you need to remove the leading underscore in the file c64x.s in the file ibl\src\device\c64x

    Please refer to the ELF Migration guide for more such modifications that are required to migrate code from COFF to ELF.
    processors.wiki.ti.com/.../C6000_EABI_Migration

    Regards,
    Rahul
  • With Processor SDK RTOS, you should be able to build IBL using the pdkSetupEnv as described here:
    processors.wiki.ti.com/.../Processor_SDK_RTOS_BOOT_C66x

    Please refer to the note on the wiki that specifies that the IBL source can only be built using C6000 compiler 7.4.x and not with CGtools 8.1

    Regards,
    Rahul
  • Thanks, Rahul. That worked.
  • I switched to c6000_7.4.16 but I still get the following error :

    undefined first referenced
    symbol in file
    --------- ----------------
    iblBootBtbl ../main/c64x/make/iblmain.le.oc

    error: unresolved symbols remain
    error: errors encountered during linking; "ibl_c66x/ibl_c66x.out" not built

    Can you tell me how I can resolve this?

    Thanks,
    Viney
  • iblBootBtbl function is defined as a C function so this shouldn`t make a difference whether you build for COFF Or ELF. The function is define in the file btblwrap.c. Do you know if that file was built. Please note after you chnaged the compiler, did you do a clean and rebuild ? sometimes if the file is already built the compiler may not rebuild.

    Regards,
    Rahul
  • Rahul,

    Yes, I verified that btblwrap.c is being built.

    Also, I see the iblBootBtBl included in the iblmain.asm file, but for some reason it is not being linked in the end.

    What else do you think I should try?

    Thanks,
    Viney