cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable all optimization when using COSMIC compiler?

EN20
Associate

Even though I did set optimization to "Disable for Debugging (-no)" there are certen lines of code which are removed by the compiler and are not available for setting a breakpoint and they do not get executed. This can be observed by certin results as well as by the disassembly missing mentioned lines. Is there a way to really disable optimization (including code removal) or at least a list of things that do get optimized even though -no ist used?

1 ACCEPTED SOLUTION

Accepted Solutions
EN20
Associate

Thanks for the idears but I kind of allready found what i was looking for. Sadly there seams to be no such way to turn this and some other parts of the optimization off. For further information have a look here.

View solution in original post

3 REPLIES 3
OLevc
Associate

0690X00000A9oKEQAZ.pngHi

Is it reproduced for both Debug & Release project settings?

S.Ma
Principal

Also, the linker may remove from memory space any variable or function which is not called from main() or interrupts.

Function pointers can make the linker's lost sometime.

EN20
Associate

Thanks for the idears but I kind of allready found what i was looking for. Sadly there seams to be no such way to turn this and some other parts of the optimization off. For further information have a look here.