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.

Timers example project build fails "out of the box"

Other Parts Discussed in Thread: TM4C1294NCPDT, EK-TM4C1294XL

I just re-installed CCS on my 64-bit Win7 SP1 system. Trying to get back up to speed (CCS was working before my HDD crash). I also installed Tivaware (complete). I selected the timers example project from the ek-tm4C129xl section (I have the launchpad). I have made no changes to the example, but I am getting compile errors. Here is the list:

>> Compilation failure
utils/subdir_rules.mk:7: recipe for target 'utils/uartstdio.obj' failed
"C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c", line 28: fatal error #1965: cannot open source file "inc/hw_ints.h"
1 catastrophic error detected in the compilation of "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c".

I have tried to stick everything in the default location to avoid problems like this, but alas!

hw_ints.h is at C:\ti\TivaWare_C_Series-2.1.2.111\inc on my system. uartstdio.c is at C:\ti\TivaWare_C_Series-2.1.2.111\utils. I believe it is probably a build variables problem. Please advise.

  • Hello Otto,

    Assuming that you imported the project into your workspace, can you:

    1) Check that your include search paths and see if it has the ${SW_ROOT} variable

    2) Check if the SW_ROOT and ORIGINAL_PROJECT_ROOT build variables are defined correctly. The latter should be location to the timer project and the former should be a relative path from the latter variable that will point to the TivaWare root directory

    If these are not set up correctly, then that would explain the errors you see

    Thanks

    ki

  • Thanks for your suggestions, ki. Your first suggestion in the include options was already there. I did, though, add ORIGINAL_PROJECT_ROOT as you show. I found that the value automatically appeared, though I did have to change the type from path to directory. Unfortunately, the compilation problem persists. The error message is identical as before implementing your suggestions.

  • Did you import the project into your workspace folder or did you leave the project in its original location?

    If ORIGINAL_PROJECT_ROOT is set correctly and SW_ROOT ends up correctly pointing to the root TivaWare directory, then it should find that header file. Can you copy and paste your entire build output to this thread?
  • I did import the project into my workspace folder. It is here: C:\Users\Otto\workspace_v6_1_3\timers. Here is the build output:

    >> Compilation failure
    utils/subdir_rules.mk:7: recipe for target 'utils/uartstdio.obj' failed
    "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c", line 28: fatal error #1965: cannot open source file "inc/hw_ints.h"
    1 catastrophic error detected in the compilation of "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c".
    Compilation terminated.
    gmake: *** [utils/uartstdio.obj] Error 1
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****

  • Is that ALL the messages in the build console? I was expecting something along the lines of:


    **** Build of configuration Debug for project timers ****

    "C:\\ti\\ccsv6.1.3.00033\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../startup_ccs.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 --include_path="C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --include_path="c:/ti/TivaWare_C_Series-2.1.2.111" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="startup_ccs.d" "../startup_ccs.c"
    "../startup_ccs.c", line 237: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "../startup_ccs.c", line 255: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "../startup_ccs.c", line 273: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    'Finished building: ../startup_ccs.c'
    ' '
    'Building file: ../timers.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 --include_path="C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --include_path="c:/ti/TivaWare_C_Series-2.1.2.111" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="timers.d" "../timers.c"
    "../timers.c", line 113: remark #2623-D: (ULP 5.4) Detected an assignment to a type with size less than int. To avoid unnecessary sign extension, use int-sized types for local varaibles and convert to smaller types for static storage.
    "../timers.c", line 114: remark #2623-D: (ULP 5.4) Detected an assignment to a type with size less than int. To avoid unnecessary sign extension, use int-sized types for local varaibles and convert to smaller types for static storage.
    "../timers.c", line 148: remark #2623-D: (ULP 5.4) Detected an assignment to a type with size less than int. To avoid unnecessary sign extension, use int-sized types for local varaibles and convert to smaller types for static storage.
    "../timers.c", line 149: remark #2623-D: (ULP 5.4) Detected an assignment to a type with size less than int. To avoid unnecessary sign extension, use int-sized types for local varaibles and convert to smaller types for static storage.
    "../timers.c", line 257: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    'Finished building: ../timers.c'
    ' '
    'Building file: C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 --include_path="C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --include_path="c:/ti/TivaWare_C_Series-2.1.2.111" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="utils/uartstdio.d" --obj_directory="utils" "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c"
    "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c", line 668: remark #2623-D: (ULP 5.4) Detected an assignment to a type with size less than int. To avoid unnecessary sign extension, use int-sized types for local varaibles and convert to smaller types for static storage.
    "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c", line 878: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c", line 1044: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c", line 1139: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c", line 134: remark #1534-D: (ULP 7.1) Detected use of global variable "g_pcHex" within one function "UARTvprintf". Recommend placing variable in the function locally
    'Finished building: C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c'
    ' '
    'Building target: timers.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --ual -z -m"timers_ccs.map" --heap_size=0 --stack_size=256 -i"C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/lib" -i"C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include" --reread_libs --display_error_number --diag_wrap=off --warn_sections --xml_link_info="timers_linkInfo.xml" --rom_model -o "timers.out" "./startup_ccs.obj" "./timers.obj" "./utils/uartstdio.obj" "../timers_ccs.cmd" -llibc.a -l"c:/ti/TivaWare_C_Series-2.1.2.111/driverlib/ccs/Debug/driverlib.lib"
    <Linking>
    remark #10371-D: (ULP 1.1) Detected no uses of low power mode state changing instructions
    'Finished building target: timers.out'
    ' '
    "C:/ti/ccsv6.1.3.00033/ccsv6/utils/tiobj2bin/tiobj2bin" "timers.out" "timers.bin" "C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armofd" "C:/ti/ccsv6.1.3.00033/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armhex" "C:/ti/ccsv6.1.3.00033/ccsv6/utils/tiobj2bin/mkhex4bin"
    ' '

    **** Build Finished ****

    I don't expect similar output yet since your build is failing, but I am expecting the beginning part where gmake is called.

  • OK, ki, sorry about the truncated built output. Here is the whole report:

    **** Build of configuration Debug for project timers ****
    
    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building file: ../startup_ccs.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O2 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="C:/" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="startup_ccs.d"  "../startup_ccs.c"
    
    >> Compilation failure
    subdir_rules.mk:7: recipe for target 'startup_ccs.obj' failed
    "../startup_ccs.c", line 26: fatal error #1965: cannot open source file "inc/hw_nvic.h"
    1 catastrophic error detected in the compilation of "../startup_ccs.c".
    Compilation terminated.
    gmake: *** [startup_ccs.obj] Error 1
    'Building file: ../timers.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O2 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="C:/" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="timers.d"  "../timers.c"
    
    >> Compilation failure
    subdir_rules.mk:14: recipe for target 'timers.obj' failed
    "../timers.c", line 27: fatal error #1965: cannot open source file "inc/hw_ints.h"
    1 catastrophic error detected in the compilation of "../timers.c".
    Compilation terminated.
    gmake: *** [timers.obj] Error 1
    'Building file: C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O2 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="C:/" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="utils/uartstdio.d" --obj_directory="utils"  "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c"
    
    >> Compilation failure
    utils/subdir_rules.mk:7: recipe for target 'utils/uartstdio.obj' failed
    "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c", line 28: fatal error #1965: cannot open source file "inc/hw_ints.h"
    1 catastrophic error detected in the compilation of "C:/ti/TivaWare_C_Series-2.1.2.111/utils/uartstdio.c".
    Compilation terminated.
    gmake: *** [utils/uartstdio.obj] Error 1
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****

  • This is the problem (bolded in red):

    Otto Hunt said:
    'Invoking: ARM Compiler' "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O2 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="C:/" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="startup_ccs.d" "../startup_ccs.c"

    It should be pointing to:

    --include_path"C:/ti/TivaWare_C_Series-2.1.2.111"

    You can manually modify your include search path to add this. But I wonder why it is not setting it up correctly by default. Can you provide the same screenshots of your include search paths and build variable definitions that I showed in one of my previous posts?

  • Per your request here is screenshots of the search paths and build variable definitions:

  • What is ORIGINAL_PROJECT_ROOT set to? In the screenshot, it is truncated.
  • Here is a better screenshot of the build variables:

  • I was going to reply that I can't make out the full value of the variable (for example, mine is set to: c:/ti/TivaWare_C_Series-2.1.2.111/examples/boards/ek-tm4c1294xl/timers/ccs)

    However, by looking at your screenshot again, I think I see the issue. In your settings, SW_ROOT uses ${PROJECT_ROOT}, when it should be using ${ORIGINAL_PROJECT_ROOT} like what is shown in my screenshot. Please modify SW_ROOT accordingly.

    The other question is why it is using PROJECT_ROOT in the first place. Did you import via "Project->Import Projects" option?
  • Changing ${PROJECT_ROOT to ${ORIGINAL_PROJECT_ROOT} per your suggestion reduced the error count to two. I also added the include path you suggested earlier (--include_path"C:/ti/TivaWare_C_Series-2.1.2.111") but it did not appear to make an additional difference. Here is the new error listing:

    **** Build of configuration Debug for project timers ****
    
    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building file: ../startup_ccs.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O2 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" --include_path="c:/ti/TivaWare_C_Series-2.1.2.111" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="startup_ccs.d"  "../startup_ccs.c"
    "../startup_ccs.c", line 237: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "../startup_ccs.c", line 255: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "../startup_ccs.c", line 273: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    'Finished building: ../startup_ccs.c'
    ' '
    'Building file: ../timers.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -O2 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" --include_path="c:/ti/TivaWare_C_Series-2.1.2.111" --advice:power=all -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="timers.d"  "../timers.c"
    "../timers.c", line 113: remark #2623-D: (ULP 5.4) Detected an assignment to a type with size less than int. To avoid unnecessary sign extension, use int-sized types for local varaibles and convert to smaller types for static storage.
    "../timers.c", line 114: remark #2623-D: (ULP 5.4) Detected an assignment to a type with size less than int. To avoid unnecessary sign extension, use int-sized types for local varaibles and convert to smaller types for static storage.
    "../timers.c", line 148: remark #2623-D: (ULP 5.4) Detected an assignment to a type with size less than int. To avoid unnecessary sign extension, use int-sized types for local varaibles and convert to smaller types for static storage.
    "../timers.c", line 149: remark #2623-D: (ULP 5.4) Detected an assignment to a type with size less than int. To avoid unnecessary sign extension, use int-sized types for local varaibles and convert to smaller types for static storage.
    'Finished building: ../timers.c'
    ' '
    gmake: *** No rule to make target 'C:/utils/uartstdio.c', needed by 'utils/uartstdio.obj'.
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****

    I did import the timer example project into my workspace. Here is a screenshot of the workspace directory:

  • The remaining error is:

    gmake:*** No rule to make target 

    I could find no useful information on this error in this forum. So I finally deleted the timer example from my workspace, then re-imported the same. Now it compiles fine, no errors. This time the build variables, etc, were correct - I did not have to putz with any settings. Weird. Anyway, I'm a happy camper now. Thanks for your help, ki!

  • Ok, glad to hear the re-import resolved the issue. Basically what seemed to have happened is that either the initial import for the first project did not succeed successfully or that the project got corrupted somehow because both your linked resource path variable and build variables were invalid. This is the reason for all your issues. We resolved the latter (fixed the SW_ROOT build variable) but not the former (the SW_ROOT linked resource path variable was pointing to the wrong location and uartstudio.c is a linked source file reliant on the SW_ROOT linked resource path variable). Fixing that path variable would have resolved the next error you got.

    In any case, looks like when you deleted the corrupted project and reimported it, the project had the variables configured correctly this time.

    For more information on the various variables types mentioned, see:
    processors.wiki.ti.com/.../Portable_Projects

    Thanks
    ki