Hi,
I'm building code in a CSS project, but I've got an unresolved error I can't explain. First a summary of my situation, then a description of my environment, and finally a cut/paste of my errors.
All of my source is compiling without errors. One file in particular has an operation called mpu_init(). It's declared in the header and defined in the implementation file. The main() calls this operation but is flagged as unresolved. I usually don't have problem finding my "unresolved symbol" errors but I can't explain this one since the function implementation exists and is being compiled. The link steps includes the object file. I verified that the signature of the header and implementation match....unless I'm blind!
I'm using CCS 5.2.1, Ubuntu 12.04, target is TI LM4F120*. I have a number of projects in the works in the same workspace and for the same target and have not come across this problem before. In fact, I've compiled a copy of these files previously without this problem.
Here's the output from the build:
**** Build of configuration Debug for project mpu9150-eMPL-1 ****
/opt/ti/ccsv5/utils/bin/gmake -k all
Building file: ../eMPL/inv_mpu.c
Invoking: ARM Compiler
"/opt/ti/ccsv5/tools/compiler/tms470_4.9.5/bin/cl470" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --include_path="/home/tim/workspace/ccs/projects/mpu9150-eMPL-1" --include_path="/opt/ti/ccsv5/tools/compiler/tms470_4.9.5/include" --include_path="/home/tim/Stellaris" --define=TARGET_IS_BLIZZARD_RA2 --define=MPU9150 --define=EMPL_TARGET_LM4F120 --define=UART_BUFFERED --define=PART_LM4F120H5QR --define=ARM_MATH_CM4 --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="eMPL/inv_mpu.pp" --obj_directory="eMPL" "../eMPL/inv_mpu.c"
Finished building: ../eMPL/inv_mpu.c
Building target: mpu9150-eMPL-1.out
Invoking: ARM Linker
"/opt/ti/ccsv5/tools/compiler/tms470_4.9.5/bin/cl470" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --define=TARGET_IS_BLIZZARD_RA2 --define=MPU9150 --define=EMPL_TARGET_LM4F120 --define=UART_BUFFERED --define=PART_LM4F120H5QR --define=ARM_MATH_CM4 --diag_warning=225 --display_error_number -z --stack_size=2000 -m"mpu9150-eMPL-1.map" --heap_size=0 -i"/opt/ti/ccsv5/tools/compiler/tms470_4.9.5/lib" -i"/home/tim/Stellaris/usblib/ccs-cm4f/Debug" -i"/home/tim/Stellaris/driverlib/ccs-cm4f/Debug" -i"/opt/ti/ccsv5/tools/compiler/tms470_4.9.5/include" --reread_libs --warn_sections --display_error_number --rom_model -o "mpu9150-eMPL-1.out" "./I2C/I2C_Stellaris_API.obj" "./I2C/I2CDev.obj" "./MPU9150/MPU6050.obj" "./eMPL/inv_mpu_dmp_motion_driver.obj" "./eMPL/inv_mpu.obj" "./utils/uartstdio.obj" "./utils/timestamp.obj" "./startup_ccs.obj" "./main.obj" -l"libc.a" -lusblib-cm4f.lib -ldriverlib-cm4f.lib "../lm4f120h5qr.cmd"
<Linking>
undefined first referenced
symbol in file
--------- ----------------
mpu_init(int_param_s *) ./main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "mpu9150-eMPL-1.out" not
>> Compilation failure
built
gmake: *** [mpu9150-eMPL-1.out] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
Any suggestions?
Thanks
Update: The file that contains declares/defines mpu_init() is inv_mpu.h/inv_mpu.c
Update: I've resolved this by renaming the inv_mpu.c to inv_mpu.cpp. Thanks