Hello all,
I have designed my code in CCSv3.3 for a long time, but now, I am going to change the develop environment to CCSv5, during the change, a problem pulzzes me a lot. When adding a linear assembly file *.sa to the active CCSv5 project and call the function written in linear assembly language, the project could not be built successfully, while the same function being called in CCSv3.3 project successfully in the same way. I don't know whether some compiler options or develop environment need to be set properly.
Though the CCSv5 project with a linear assembly function call fails in the build process, the assembly file *.sa can be built successfully individually. The below is a small snippet of a C file with the assembly assembly function call in it.
...
void C64xplus_compxcomp_16x16h(short *a, short *b, int length, short *c); // linear assembly function declaration
...
void main()
{
// variable declaration and initialization
...
C64xplus_compxcomp_16x16h(src_a, src_b, N, result_c); // a linear assembly function call
...
}
The errors of the CCSv5 project build are shown below.
undefined symbol first referenced in file
------------------ ---------------------------
C64xplus_compxcomp_16x16h ./main.obj
error: unresolved symbols remain
error: errors encountered during linking; "CCS5_sa_test.out" not built
>> Compilation failure
gmake: *** [CCS5_sa_test.out] Error i
gmake: Target 'all' remade because of errors.
Attempt to solve the problem, I removed the main processing section in the linear assembly function, so I am sure the function in linear assembly language itself is correct.
Many thanks and regards.