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
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?
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!
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
Yes, I've just written a *very* small file which compiles just peachy, using the default build settings and a 32-bit number. Annoyingly I noticed some changes between the lkf files and corrected these in the original- which made no difference.
Unfortunately I cannot post the full project as it is nearly a complete product (this morning I got it 'e' and 'E' marked).