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.
Tool/software: Code Composer Studio
Added the I2C code modules from the I2C example, into my project, after verifying the example I2C builds correctly. (CCS Version: 7.1.0.00016). (Path to drivers: C:\ti\tirtos_tivac_2_16_01_14\products\tidrivers_tivac_2_16_01_13\)
After adding I2C code and the I2C header files, get the following link error.
In CCS Problems Tab:
Description Resource Path Location Type
#10010 errors encountered during linking; "IntOsc_Spi_Test.out" not built IntOsc_Spi_Test C/C++ Problem
Description Resource Path Location Type
10234-D</a> unresolved symbols remain IntOsc_Spi_Test C/C++ Problem
unresolved symbol I2C_config, first referenced in C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/drivers_tivaware.aem4f<I2C.oem4f> IntOsc_Spi_Test C/C++ Problem
In CCS Console:
<Linking>
undefined first referenced
symbol in file
--------- ----------------
I2C_config C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/drivers_tivaware.aem4f<I2C.oem4f>
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "IntOsc_Spi_Test.out" not built
>> Compilation failure
makefile:147: recipe for target 'IntOsc_Spi_Test.out' failed
gmake: *** [IntOsc_Spi_Test.out] Error 1
gmake: Target 'all' not remade because of errors.
**** Build Finished ****
--------------------
Searches for documentation, following pages are what I was able to come up with:
file:///C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/docs/doxygen/html/_i2_c_8h.html
No mention of library to include in Linker path
Only states to include #include <ti/drivers/I2C.h>
Following page,
file:///C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/docs/doxygen/html/_i2_c_tiva_8h.html
states to include both,
#include <ti/drivers/I2C.h>
#include <ti/drivers/i2c/I2CTiva.h>
Searching the forums, found several discussions wherein users were getting same kind of error for different modules (didn't find any I2C discussions related to TM4C129). When a solution was offered, it was a path to some library to include in the Linker options, with no guidance on how we were supposed to know this or figure it out.
Compared my project's .cfg against that for the I2C example. They match as near as I can tell, as far as anything related to I2C.
Compared my project's Linker properties against those for example project:
Linker settings:
I2C example:
-mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --define=ccs="ccs" --define=PART_TM4C129ENCPDT
--define=ccs --define=TIVAWARE -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number
--gen_func_subsections=on --abi=eabi -z -m"i2ctmp006_EK_TM4C129EXL_TI.map" --heap_size=0 --stack_size=512
-i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/include"
--reread_libs --diag_wrap=off --display_error_number --warn_sections
--xml_link_info="i2ctmp006_EK_TM4C129EXL_TI_linkInfo.xml" --rom_model
My project:
-mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --define=SEQUENTIAL_SCAN --define=DISABLE_ENCRYPTION
--define=MAC_HACK --define=_POSIX_SOURCE --define=TARGET_IS_TM4C129_RA2 --define=USE_TIRTOS --define=TIVAWARE
--define=PART_TM4C129ENCZAD --define=ccs="ccs" -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number
--gen_func_subsections=on --abi=eabi -z -m"IntOsc_Spi_Test.map" --heap_size=0
--stack_size=512 -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/lib"
-i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.1.LTS/include" --reread_libs --diag_wrap=off --display_error_number
--warn_sections --xml_link_info="IntOsc_Spi_Test_linkInfo.xml" --rom_model
I don't see the issue; what am I missing?
Will post my .cfg.
Thank you.
As per this related post, make sure the appropriate board file for your device is added to the project.