2006-02-02 07:47 PM
2006-01-29 08:51 PM
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. -Peter2006-01-29 10:14 PM
Hi.
Try to choose Memory Model one more time. It happens with me time to time and chossing memory model helps.2006-01-29 11:00 PM
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?2006-01-29 11:01 PM
Oh, and I can now make the libraries link in the order recommended by the compiler.
2006-01-30 04:33 AM
Try pressing the defaults button on the linker pages, this sort of problem happens now and again when upgrading.
Regards sjo2006-01-31 01:17 AM
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!2006-01-31 01:37 AM
Could you attach your linker script ?
Regards sjo2006-01-31 01:52 AM
Any help?
________________ Attachments : c2071_1.lkf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Gk&d=%2Fa%2F0X0000000bWQ%2Fld6mKtbyQ.9YeWAgXPnJO1pl.EOlaauVtgeBCuXty2w&asPdf=false2006-01-31 02:03 AM
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