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.
Hi,
After i imported the Lab 10 file from the TM4C123G_LaunchPad_Workshop, when i debugged it, these errors appeared. Is there a way to fix it? Thanks in advance!
Regards,
Eisen
Hi,
Thanks for the earlier reply! The ustdlib.h file is already inside the ustdlib.c file, and I've added the #include ustdlib.h inside the ustdlib.c which has the usprintf. But now it has this problem where the .h file includes itself. Can i have your guidance once again? Sry for the inconvenience.
Thanks,
Eisen
Hi,
No, not in ustdlib.c file, but in the file which uses a call to usprintf(), whatever is that - main.c or what you have. The linker complains because it does not know where to find it, and the compiler should emit some warning because it is a function call without a prototype.
Not know what board do you use, but if it is dk-tm4c129x, look at the file qs-weather.c in folder qs-weather - and take care about the path(s) when you compare with yours.
Hi,
So, if in file utils/ustdlib.h is written #include "utils/ustdlib.h" then you apply this convention to other files which uses a function from this file (i.e in main.c file add this declaration and just that. This means you must keep those files untouched and do not insert them into the base of your project, as you did - all you need is a symbolic link to the .c file.
Hi Amit,
After changing it to TARGET_IS_TM4C123_RB1, I'm still getting this error:
Description Resource Path Location Type
#3 #include file "C:/ti/TivaWare_C_Series-2.1.2.111/utils/ustdlib.h" includes itself .ccsproject /lab10 line 27, external location: C:\ti\TivaWare_C_Series-2.1.2.111\utils\ustdlib.h C/C++ Problem
This is the error message from the build console for your reference:
**** Build of configuration Debug for project lab10 ****
"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
'Building file: ../Kentec320x240x16_ssd2119_8bit.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" -g --gcc --define=ccs="ccs" --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_TM4C123_RB1 --diag_wrap=off --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="Kentec320x240x16_ssd2119_8bit.pp" "../Kentec320x240x16_ssd2119_8bit.c"
'Finished building: ../Kentec320x240x16_ssd2119_8bit.c'
' '
'Building file: ../grlib_demo.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" -g --gcc --define=ccs="ccs" --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_TM4C123_RB1 --diag_wrap=off --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="grlib_demo.pp" "../grlib_demo.c"
"C:/ti/TivaWare_C_Series-2.1.2.111/utils/ustdlib.h", line 27: fatal error #3: #include file "C:/ti/TivaWare_C_Series-2.1.2.111/utils/ustdlib.h" includes itself
1 catastrophic error detected in the compilation of "../grlib_demo.c".
>> Compilation failure
Compilation terminated.
gmake: *** [grlib_demo.obj] Error 1
'Building file: ../images.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" -g --gcc --define=ccs="ccs" --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_TM4C123_RB1 --diag_wrap=off --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="images.pp" "../images.c"
'Finished building: ../images.c'
' '
'Building file: ../startup_ccs.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" -g --gcc --define=ccs="ccs" --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_TM4C123_RB1 --diag_wrap=off --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="startup_ccs.pp" "../startup_ccs.c"
'Finished building: ../startup_ccs.c'
' '
'Building file: ../touch.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" -g --gcc --define=ccs="ccs" --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_TM4C123_RB1 --diag_wrap=off --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="touch.pp" "../touch.c"
'Finished building: ../touch.c'
' '
'Building file: C:/ti/TivaWare_C_Series-2.1.2.111/utils/ustdlib.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" -g --gcc --define=ccs="ccs" --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_TM4C123_RB1 --diag_wrap=off --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="ustdlib.pp" "C:/ti/TivaWare_C_Series-2.1.2.111/utils/ustdlib.c"
"C:/ti/TivaWare_C_Series-2.1.2.111/utils/ustdlib.h", line 27: fatal error #3: #include file "C:/ti/TivaWare_C_Series-2.1.2.111/utils/ustdlib.h" includes itself
1 catastrophic error detected in the compilation of "C:/ti/TivaWare_C_Series-2.1.2.111/utils/ustdlib.c".
Compilation terminated.
>> Compilation failure
gmake: *** [ustdlib.obj] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
Thanks.
Regards
Eisen
Hello Eisen
I have attached lab10.zip
Make sure that the TIVAWARE_ROOT is defined as C:/ti/TivaWare_C_Series-2.1.2.111 in the imported project.
To change it Right click your project, "Show Build Settings", then click on the "Build" in the pop-up, navigate to the tab "Variables", double click the variable and edit the path.
Once this is done, clean and rebuild the project.
Regards
Amit
Hello Eisen
No problems. The larger issue here is that the labs are broken and need to be fixed
Regards
Amit Ashara