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.

CCS/CODECOMPOSER: TUSB9261 - Can't Create .hex file

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: TUSB9260

Tool/software: Code Composer Studio

Hello,

I have my source code and trying to compile it in Code Composer to get either a bin or hex file to add it in my demo board.

I'm able to build the project correctly (with 3 warnings but 0 errors), but when I try to enable the "Enable ARM Hex Utiliy" I start getting errors, two to be specific:

Description    Resource    Path    Location    Type
gmake: *** [all] Error 2    TUSB9260             C/C++ Problem
gmake[1]: *** [C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test III/TUSB926x/Release/TUSB9260.out] Error 1    TUSB9260             C/C++ Problem

Am I skipping something?

Thanks!

Gustavo G.

  • Gustavo,

    Which version of CCS are you using? Could you please post the full output of the build console - you can copy it to a text file and attach the file here.

    I suspect the issue may have to do with the white spaces in the path TUSB926x Firmware Source - Test III, so as a test could you try using paths without any white spaces and see if that helps?

  • Hello there,

    Thanks for replying. I'm trying to compile it in Workspace v7. Attached is the Output Console.

    Please keep me posted.

    TUSB9260 Project FW.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    **** Build of configuration Release for project TUSB9260 ****
    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -j 4 all -O
    'Building target: C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test V/TUSB926x_FW_v1.05/Release/TUSB9260.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test V/TUSB926x_FW_v1.05/Release" -z -m"C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test V/TUSB926x_FW_v1.05/Release/TUSB9260.map" --verbose_diagnostics --warn_sections --xml_link_info="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test V/TUSB926x_FW_v1.05/Release/TUSB9260_linkInfo.xml" --rom_model -o "C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test V/TUSB926x_FW_v1.05/Release/TUSB9260.out" "../tusb9260_link.cmd" "./ahci.obj" "./c_int00.obj" "./exceptions_isr.obj" "./gio.obj" "./intvecs.obj" "./main.obj" "./mww.obj" "./one_touch.obj" "./pwm.obj" "./reg_io.obj" "./rti.obj" "./sci.obj" "./scsi.obj" "./scsi_data.obj" "./spi.obj" "./string.obj" "./system.obj" "./system_init.obj" "./ums_bot.obj" "./ums_uas.obj" "./usb_chap9.obj" "./usb_hal.obj" "./usb_hal_isr.obj" "./usb_hid.obj" "./usb_stack.obj" "./usb_vendor.obj" "./vim_intvecs.obj" "./vim_nvic.obj" "./wdt.obj"
    <Linking>
    warning: automatic RTS selection: attempt to automatically link in index
    library "libc.a" failed; file not found
    >> Compilation failure
    makefile:170: recipe for target 'C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test V/TUSB926x_FW_v1.05/Release/TUSB9260.out' failed
    warning: entry-point symbol "_c_int00" undefined
    warning: no suitable entry-point found; setting to 0
    INTERNAL ERROR: C:\ti\ccsv7\tools\compiler\ti-cgt-arm_16.9.1.LTS\bin\armlnk.exe experienced an unhandled exception
    This is caused by a defect in the compiler itself. 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". Include this ENTIRE error message and a
    copy of the .pp file created when option --preproc_with_comment
    (-ppc) is used.
    gmake[1]: *** [C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test V/TUSB926x_FW_v1.05/Release/TUSB9260.out] Error 1
    gmake: *** [all] Error 2
    makefile:166: recipe for target 'all' failed
    **** Build Finished ****
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • From the build output I see that the build itself does not complete, as the errors are coming at the link step which is even before the hex conversion step.

    I see two issues in the output:

    1) warning: automatic RTS selection: attempt to automatically link in index library "libc.a" failed; file not found

    >> Compilation failure
    makefile:170: recipe for target 'C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test V/TUSB926x_FW_v1.05/Release/TUSB9260.out' failed

    2) INTERNAL ERROR: C:\ti\ccsv7\tools\compiler\ti-cgt-arm_16.9.1.LTS\bin\armlnk.exe experienced an unhandled exception


    Here are my suggestions to resolve these:

    First, install and compile with a newer version of ARM compiler tools. You could try version 16.12.0.STS. Install it using the steps described here: http://processors.wiki.ti.com/index.php/Compiler_Updates#Install_new_features. Then go into your project properties and set it to use 16.12.0 and rebuild. Hopefully this version will resolve the internal error. 

    If you still see the warning about not finding libc.a, go into Project Properties->Build->Linker->File Search Path and check that the path "${CG_TOOL_ROOT}/lib" is listed under --search_path option.



  • Thanks for checking the file.

    I didn't find a version of ARM above 16.9.1, I attached an image of the closest versions of that one. Is this available on Windows? Or only Mac/Linux?

    TUSB9260 Project FW (2).txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    **** Clean-only build of configuration Release for project TUSB9260 ****
    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -j 4 clean -O
    DEL /F "C:\Users\x0247663\Documents\DUPX\Firmware\Source Code\TUSB926x Firmware Source - Test I\TUSB926x_FW_v1.05\Release\TUSB9260.hex" "C:\Users\x0247663\Documents\DUPX\Firmware\Source Code\TUSB926x Firmware Source - Test I\TUSB926x_FW_v1.05\Release\TUSB9260.out"
    DEL /F "ahci.obj" "c_int00.obj" "exceptions_isr.obj" "gio.obj" "intvecs.obj" "main.obj" "mww.obj" "one_touch.obj" "pwm.obj" "reg_io.obj" "rti.obj" "sci.obj" "scsi.obj" "scsi_data.obj" "spi.obj" "string.obj" "system.obj" "system_init.obj" "ums_bot.obj" "ums_uas.obj" "usb_chap9.obj" "usb_hal.obj" "usb_hal_isr.obj" "usb_hid.obj" "usb_stack.obj" "usb_vendor.obj" "vim_intvecs.obj" "vim_nvic.obj" "wdt.obj"
    DEL /F "source\ahci.d" "source\c_int00.d" "source\gio.d" "source\main.d" "source\mww.d" "source\one_touch.d" "source\pwm.d" "source\reg_io.d" "source\rti.d" "source\sci.d" "source\scsi.d" "source\scsi_data.d" "source\spi.d" "source\string.d" "source\system.d" "source\system_init.d" "source\ums_bot.d" "source\ums_uas.d" "source\usb_chap9.d" "source\usb_hal.d" "source\usb_hal_isr.d" "source\usb_hid.d" "source\usb_stack.d" "source\usb_vendor.d" "source\vim_intvecs.d" "source\vim_nvic.d" "source\wdt.d"
    DEL /F "source\exceptions_isr.d" "source\intvecs.d"
    Could Not Find C:\Users\x0247663\Documents\DUPX\Firmware\Source Code\TUSB926x Firmware Source - Test I\TUSB926x_FW_v1.05\Release\TUSB9260.hex
    Could Not Find C:\Users\x0247663\Documents\DUPX\Firmware\Source Code\TUSB926x Firmware Source - Test I\TUSB926x_FW_v1.05\Release\ahci.obj
    Could Not Find C:\Users\x0247663\Documents\DUPX\Firmware\Source Code\TUSB926x Firmware Source - Test I\TUSB926x_FW_v1.05\Release\source\ahci.d
    Could Not Find C:\Users\x0247663\Documents\DUPX\Firmware\Source Code\TUSB926x Firmware Source - Test I\TUSB926x_FW_v1.05\Release\source\exceptions_isr.d
    'Finished clean'
    ' '
    **** Build Finished ****
    **** Build of configuration Release for project TUSB9260 ****
    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -j 4 all -O
    'Building file: ../source/exceptions_isr.asm'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --include_path="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/include" --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/Release" --preproc_with_compile --preproc_dependency="source/exceptions_isr.d" "../source/exceptions_isr.asm"
    'Finished building: ../source/exceptions_isr.asm'
    ' '
    'Building file: ../source/intvecs.asm'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --include_path="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/include" --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/Release" --preproc_with_compile --preproc_dependency="source/intvecs.d" "../source/intvecs.asm"
    'Finished building: ../source/intvecs.asm'
    ' '
    'Building file: ../source/c_int00.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --include_path="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/include" --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/Release" --preproc_with_compile --preproc_dependency="source/c_int00.d" "../source/c_int00.c"
    'Finished building: ../source/c_int00.c'
    ' '
    'Building file: ../source/gio.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --include_path="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/include" --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/Release" --preproc_with_compile --preproc_dependency="source/gio.d" "../source/gio.c"
    'Finished building: ../source/gio.c'
    ' '
    'Building file: ../source/main.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --include_path="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/include" --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/Release" --preproc_with_compile --preproc_dependency="source/main.d" "../source/main.c"
    'Finished building: ../source/main.c'
    ' '
    'Building file: ../source/mww.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --include_path="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/include" --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/Release" --preproc_with_compile --preproc_dependency="source/mww.d" "../source/mww.c"
    'Finished building: ../source/mww.c'
    ' '
    'Building file: ../source/one_touch.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --include_path="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/include" --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/Release" --preproc_with_compile --preproc_dependency="source/one_touch.d" "../source/one_touch.c"
    'Finished building: ../source/one_touch.c'
    ' '
    'Building file: ../source/ahci.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --include_path="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/include" --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/Release" --preproc_with_compile --preproc_dependency="source/ahci.d" "../source/ahci.c"
    'Finished building: ../source/ahci.c'
    ' '
    'Building file: ../source/pwm.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --include_path="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/include" --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/Release" --preproc_with_compile --preproc_dependency="source/pwm.d" "../source/pwm.c"
    'Finished building: ../source/pwm.c'
    ' '
    'Building file: ../source/reg_io.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/bin/armcl" -mv7M3 -me -O2 --include_path="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/include" --symdebug:none --gcc --diag_warning=225 --verbose_diagnostics --abi=eabi --obj_directory="C:/Users/x0247663/Documents/DUPX/Firmware/Source Code/TUSB926x Firmware Source - Test I/TUSB926x_FW_v1.05/Release" --preproc_with_compile --preproc_dependency="source/reg_io.d" "../source/reg_io.c"
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I did added the File Search Path as you mentiones, but don't know if I did it right, I don't get the "not finding libc.a" error, but got new ones.

    Please check the files and images attached, and let me know if I'm doing something wrong.

    Best Regards!

    Gustavo G.

  • In your build log I see this:

    <Linking>
    error: symbol "__stack" redefined: first defined in "./intvecs.obj"; redefined in
    "C:\ti\ccsv7\tools\compiler\ti-cgt-arm_16.9.1.LTS\lib\rtsv7M3_T_le_eabi.lib<boot.obj>"

    This means that the linker is seeing two definitions for that symbol, in this case one in intvecs.obj and another from the boot.obj in the TI runtime library. I suspect this may be due to the order in which the files are passed to the linker. I don't see the runtime library rtsv7M3_T_le_eabi.lib being passed explicitly on the command line so I wonder if it is being specified inside the linker command file tusb9260_link.cmd. Could you check if that is the case and confirm? Or better yet if you could attach that linker command file here it would be helpful.

     

  • Apologies for the delay,

    Here's the cmd file you ask:

    tusb9260_link.zip

    Best Regards!

    Gustavo G.

  • Gustavo,

    The linker command file does not shed any additional light on the issue. However, I think I have a guess on what may be happening here.

    Your application has a source file intvecs.asm that defines the symbol __stack. At link time, the linker is pulling in boot.obj from within the runtime library (\rtsv7M3_T_le_eabi.lib) to resolve some required references. That boot file also defines __stack, hence the error about the symbol being redefined.

    Normally any symbols provided in the user's code, if it is passed to the linker prior to any library being considered, will always take precedence. However, the granularity of control is an input section, not a symbol.  An input section can define more than one symbol.  So if the linker brings in an input section from the runtime library's boot.asm file, and that section contains the definition for __stack, then the duplicate definition error would occur. That is likely what is happening here. This is of course my best guess without actually looking at your project files.

    One consideration to avoid the error would be to copy over the entire boot.asm file from the runtime sources (\ccsv7\tools\compiler\ti-cgt-arm_16.9.1.LTS\lib\src) into your project and customize that file to suit your needs. Having that file added to your project will allow the linker to resolve all symbols from it first rather than the one from the runtime library. 

    Hope this helps.

  • Hello,

    Apologies for the delay. I'm testing this last suggestion you gave me. I'll reply again as soon as I have results.

    Best Regards!
    Gustavo G.