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: TI C/C++ Compiler
I am new to this C66x coding.
I have this simple Code snippet given below:
#include<stdio.h>
#include<c6x.h>
/*
* main.c
*/
int main(void) {
int a =10;
int b = 30;
//const __x128_t c_14_32_14_0;
int c = _land(a,b);
printf("Hello RK\n");
return 0;
}
And i am getting this error. Help me how to resolve this.
ERROR:
**** Build of configuration Debug for project Test_c66x ****
/opt/ti/ccsv5/utils/bin/gmake -k all
Building file: ../main.c
Invoking: C6000 Compiler
"/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv6740 --abi=coffabi -g --include_path="/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include" --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
"../main.c", line 11: warning #225-D: function declared implicitly
Finished building: ../main.c
Building target: Test_c66x.out
Invoking: C6000 Linker
"/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv6740 --abi=coffabi -g --display_error_number --diag_warning=225 --diag_wrap=off -z -m"Test_c66x.map" -i"/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/lib" -i"/opt/ti/ccsv5/tools/compiler/c6000_7.4.4/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="Test_c66x_linkInfo.xml" --rom_model -o "Test_c66x.out" "./main.obj" -l"libc.a"
<Linking>
warning #10210-D: creating ".stack" section with default size of 0x400; use the -stack option to change the default size
warning #10210-D: creating ".sysmem" section with default size of 0x400; use the -heap option to change the default size
undefined first referenced
symbol in file
--------- ----------------
__land ./main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "Test_c66x.out" not built
>> Compilation failure
gmake: *** [Test_c66x.out] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
Thanks
RK
You have two different problems.
One, you use the _land intrinsic, which is available only on C6600 devices. But you build for C674x devices by using the switch -mv6740. One or the other has to change. If you use a C6600 device, then change -mv6740 to -mv6600. If you use a C6740 device, then you cannot use the intrinsic _land. To learn more about the intrinsics, look up _land in the C6000 compiler manual.
Two, you do not use a linker command file. That is why you see ...
Rajendra Kumar41 said:warning #10210-D: creating ".stack" section with default size of 0x400; use the -stack option to change the default size
warning #10210-D: creating ".sysmem" section with default size of 0x400; use the -heap option to change the default size
A collection of linker command files for C6000 can be found in a directory location similar to ...
C:\ti\ccsv5\ccs_base\c6000\include
Choose the one which most closely matches the device you use, and add it to your project.
Code in the linker command file tells the linker how to place all the code and data into valid memory ranges for your device.
Thanks and regards,
-George