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,
I try to get started with linear assembly in order to get a bit more low-level experience with the C6000 series.
I started with a simple hello-world type project in CCS5.1, and created a simple C-file containing main and defining the assembly function:
extern int asmfunc(int a);
void main(void) {
int result = asmfunc(5);
}
Then I wrote a very simple linear assembly function:
.def _asmfunc
_asmfunc: .cproc a
.reg prod
MPY a,a,prod
.return prod
.endproc
}
While files compile fine independently, at linking time the linker complains asmfunc can't be resolved.
Any ideas what could be wrong?
Thank you in advance, Clemens
PS: Is there a public bugtracker for CCS5 bugs? I encountered one involving license registration where the IDE would just hang - including stack-traces.
This is the exact build log I get:
**** Build of configuration Release for project AnalyzerTest ****
/opt/Programme/ti/ccsv5/utils/bin/gmake -k all
Building file: ../asmfunc.sa
Invoking: C6000 Compiler
"/opt/Programme/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6600 -O2 --include_path="/opt/Programme/ti/ccsv5/tools/compiler/c6000/include" --display_error_number --diag_warning=225 --abi=eabi -k --asm_listing --preproc_with_compile --preproc_dependency="asmfunc.pp" "../asmfunc.sa"
Finished building: ../asmfunc.sa
Building file: ../hello.c
Invoking: C6000 Compiler
"/opt/Programme/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6600 -O2 --include_path="/opt/Programme/ti/ccsv5/tools/compiler/c6000/include" --display_error_number --diag_warning=225 --abi=eabi -k --asm_listing --preproc_with_compile --preproc_dependency="hello.pp" "../hello.c"
Finished building: ../hello.c
Building target: AnalyzerTest.out
Invoking: C6000 Linker
"/opt/Programme/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6600 -O2 --display_error_number --diag_warning=225 --abi=eabi -k --asm_listing -z -m"AnalyzerTest.map" --warn_sections -i"/opt/Programme/ti/ccsv5/tools/compiler/c6000/lib" -i"/opt/Programme/ti/ccsv5/tools/compiler/c6000/include" --reread_libs --rom_model -o "AnalyzerTest.out" "./hello.obj" "./asmfunc.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
--------- ----------------
asmfunc ./hello.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "AnalyzerTest.out" not built
>> Compilation failure
gmake: *** [AnalyzerTest.out] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
Thanks in advance, Clemens
Hello,
Clemens Eisserer said:PS: Is there a public bugtracker for CCS5 bugs? I encountered one involving license registration where the IDE would just hang - including stack-traces.
Yes. See:
https://cqweb.ext.ti.com/cqweb/#/SDO-Web/SDOWP&format=HTML&version=cqwj
For the rest of your question, I will move it to the compiler forum.
Thanks
ki
Thanks for you reply.
Any idea what is wrong with the code? I have looked at various samples and can't seem to find a difference which would explain the linker problems. My progress on learning C6000 assembler is quite blocked by this problem unfourtunatly :/
Is the bug-tracker read-only? I tried to log in with my TI username/password but it doesn't seem to work.
Looking at your compile options, you are building for EABI. In EABI, the assembly symbol names do not have an "underscore" in the name like they do in COFF ABI.
Please see this wiki article for details. If you change the assembly symbol name in the asm file to 'asmfunc', it should build fine.
After removing that underscore everything works as expected, thanks for pointing me to the new ABI wiki - with the documents I used I missed that switch.
Thanks again for your help, Clemens
Clemens Eisserer said:Is the bug-tracker read-only? I tried to log in with my TI username/password but it doesn't seem to work.
Yes, it is read only. It is the public portal for everyone, not just TI.
Yes, it is read only. It is the public portal for everyone, not just TI.
So, what is the appropriate place to file new bugs I discover?
Thanks, Clemens
Clemens Eisserer said:So, what is the appropriate place to file new bugs I discover?
In these forums. If we can validate the issue, we will file a bug for you on your behalf.