Forum Discussion
Hi,
Since project cannot be shared, then we will suggest ways for you to debug the issue.
We recommend for you to enable a single optimization until the design fails. Once you can find the optimization that cause the issue then can remove it and proceed without using it for your design.
Since -O3 is using bunch of optimizations, we should try one by one:
-O0 (working or not)
-O1 (work with which optimization)
-O2 (work with O1 and plus which optimization)
-O3 (failing because of which optimization)
Based on the closer working/failing pair, we will have a smaller group to investigate.
For example,
If the pair is found to be O2-O3, these are the interested optimization to investigate
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Thank you.
Regards,
Fathulnaim
Hi,
I tried as you suggested.
With optimization O1 the firmware works properly, whereas the firmware doesn't work with optimization O2, so the pair is O1-O2.
To investigate further, is it possible to disable only one optimization flag of O2 and find out which flag generates the issue?
And is it possible to turn off optimization for a block of code?
Thank you.
Regards,
naand