2007-11-05 12:39 AM
2007-11-02 04:15 AM
I have been developing an application under ST7VD/Cosmic C/DVP3
The application runs fine on the debugger with DISABLED FOR DEBUGGING build ( Optimisation OFF ) If I build a RELEASE version with the Optimisation DISABLED FOR DEBUGGING and run on the target then all is again OK. If I build a RELEASE version with DEFAULT optimisation and run on the target the application behaves differently ( errantly ). I also tried setting the optimisation to custom and messing about with the options but no combination makes the target app. run correctly. I assume this is an optimiser problem, but I can't see how to track it down. Are there an compiler switches/directives I can use on a per file or per function basis to turn on/off the optimisation.2007-11-04 09:33 PM
Hello,
as you describe it, it looks like an optimization error indeed. Note first that we (Cosmic) recommend to work with optimizations ON since the very beginning of the project. Here are some suggestions: 1) make sure you are using the latest version of the compiler 2) the best way to find the ''optimization problem'' (that could be in the toolchain or in the application) is to debug the application 3) if you can't use point 2), you can try to enable optimizations only file by file: if every file contains only a few functions, this will give you a first direction for your investigation. Regards, Luca (Cosmic)2007-11-04 11:26 PM
How do I enable / disable optimiser on file basis ?
It is difficult to debug with optimisation on, there doesn't appear to be good debug info generated for the emulator.2007-11-05 12:39 AM