cancel
Showing results for 
Search instead for 
Did you mean: 

COSMIC linker error

pete3
Associate II
Posted on February 03, 2006 at 04:47

COSMIC linker error

15 REPLIES 15
pete3
Associate II
Posted on January 30, 2006 at 05:51

Hi all,

I have recently switched from STVD7 v3.0 to version 3.10 and from the 4k evaluation compiler from Cosmic to the 16k. I now get an error message from the linker referring to C functions to increment and decrement 32-bit numbers by 1. Previously this worked.

The exact error is:

''#error clnk Debug\c2071_1.lkf:1 symbol c_lgadc not defined (Debug\isr.o )

#error clnk Debug\c2071_1.lkf:1 symbol c_lgsbc not defined (Debug\starttimer.o )

#error clnk Debug\c2071_1.lkf:1 symbol c_lsbc not defined (Debug\isr.o )''

which leads me to believe the 32-bit integer libraries are not being linked correctly.

I am now using the auto-generated linker and makefiles, whereas before I had manually written a link file and build batch file. Is there some magic option I need to tick somewhere to make this work? The linkfile and build.bat files are not very different to the ones I used before, but with the paths changed to reflect the installation directory for the compiler. One thing I cannot change is that the order of the linkfiles being included does not match that recommended by the COSMIC manual. Is there any way around this?

Any suggestions appreciated.

-Peter

luter
Associate II
Posted on January 30, 2006 at 07:14

Hi.

Try to choose Memory Model one more time. It happens with me time to time and chossing memory model helps.

pete3
Associate II
Posted on January 30, 2006 at 08:00

Luter,

Thanks for the idea. I have tried every memory model available and unfortunately I still get this error.

If it helps, I am trying to use the Stack Short memory model on an ST72F561K9T (ROM start address 0x1000, end 0xffff). The C functions are the unary decrement (--) and unary increment (++) operators. Changing the code does not help as the compiler interprets the instructions to the same assembly code no matter the optimisation options. The error is still with 32-bit numbers only.

Are there any other quirks of the compiler or STVD7 I should know about?

pete3
Associate II
Posted on January 30, 2006 at 08:01

Oh, and I can now make the libraries link in the order recommended by the compiler.

sjo
Associate II
Posted on January 30, 2006 at 13:33

Try pressing the defaults button on the linker pages, this sort of problem happens now and again when upgrading.

Regards

sjo

pete3
Associate II
Posted on January 31, 2006 at 10:17

sjo,

Thanks. I've tried this to no avail. The default start point of the text segment is 0xf000. I require an additional 0x25f addresses to avoid code/data overlap. Lowering the start address just repeats the error codes above.

As the application stands it will successfully compile on the 4k version but the changes desired mean it will overcome this as soon as I work out how to get the 16k to work!

sjo
Associate II
Posted on January 31, 2006 at 10:37

Could you attach your linker script ?

Regards

sjo

pete3
Associate II
sjo
Associate II
Posted on January 31, 2006 at 11:03

Cannot find anything wrong with the script, the libs are linked in the correct order.

The only other thing is to attached the full project if possible.

Do other projects build ok with the 16k version, ie. is the license working ok ?

Have used cosmic for a number of years and have been very happy with it.

Regards

sjo