Hello,
I'm trying to port uC/OS II (i bought the book) to MCB2140 and i'm using Keil CARM compiler. I took port from ucos-ii web site, which was written for IAR. I modified some stuff in asm file (difference betwen iar compiler and keil) but when I try to compile it I get this errors:
Build target 'MCB2140' compiling app.c... linking... *** WARNING L23: UNRESOLVED EXTERNAL SYMBOLS *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: OSTimeDly?T ADDRESS: 000000E6H *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: OSInit?T ADDRESS: 00000138H *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: OSTaskCreateExt?T ADDRESS: 0000015EH *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: OSStart?T ADDRESS: 0000016AH Program Size: data=1800 const=24 code=396 Target not created
Can anyone help me?
Thank you
Those are Linker Errors - as they say, you haven't defined the symbols OSTimeDly, OSInit, OSTaskCreateExt, and OSStart.
Probably, these are in a Library somewhere, and you haven't added the Library to your uVision project.
First, thank you for your quick answer. I repaired some paths for include files but now I get this error: *** WARNING L23: UNRESOLVED EXTERNAL SYMBOLS *** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNALS SYMBOL: OS_CPU_SR_Save?T ADDRESS: 0000238CH ... and so one for a few of my public symbols which are defined in an asm file os_cpu_a.s (e.g. PUBLIC OS_CPU_SR_Save, PUBLIC OS_CPU_SR_Restore?T), which is part of my project. This are labels for routines written in assembly, and are called from C functions. But all errors have ?T at the symbol name.
Thank you again and best regards,
Borut
In my reply I made a typing error:
there isnt ?T at PUBLIC OS_CPU_SR_Restore
but only at descripton of errors.
Sorry fot that.
"This are labels for routines written in assembly, and are called from C functions. But all errors have ?T at the symbol name."
When interfacing assembler and 'C', your assembler source must follow all the conventions of the 'C' Compiler.
If the 'C' Compiler wants "?T" in all the symbol names, then your assembler source must provide it.
You need to read the 'C' Compiler Manual for details of its calling conventions, naming conventions, and internal data representation...
Thank you. Will check the manual. I just thought that maybe you had some questions regarding this problem before :) Thanks againg and have a nice holiday.
Will you suggest me books. If possible free avilable ebooks.
I suggest that you are using the RTX kernel. It has similar functionality and is fully documented. Also you can find prepare examples in the folder
C:\Keil\ARM\RV30\RTL\Kernel\Examples
Thank you Mr. Reinhard. To be honest I already checked for the pricing for RTX and I checked the examples and I must say this RTX is realy good. First it's great that it is embedded into the uVision and it's realy easier to work with. So thank you again and have a nice weekend.