We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Good Moorning,
I open this post, because i am working in a proyect with Ethernet, but i have a strange issue that i cant find the source of problem. I hope you can help me, Thanks.
The problem, is that in optimization O0 the proyect not work propertly, it occurs a hardfault handler in parte of code that dont have sense. While if i use the optimization Oz, work propertly.
With other levels of optimization, appear same error that O0.
I indicate aditional information of the proyect:
MCU: STM32F779NI ETH_Controller: KSZ9031MNX Library_Ethernet: LWIP ARM Compiler: 6.11
Also, comment that i was modify the Scatter file. I modify it because of i need have reserved RAM (MPU) for the DMA Ethernet.
Thanks for your help.
Kinds Regards.
The code will likely only work properly at optimization level -O2 or -O3 -- or another level provided you enable enough optimizations. The optimization levels -O0, -O1, etc., are shorthand for enabling sets of optimizations. See, for example,
gcc.gnu.org/.../Optimize-Options.html
And you can review the ARM compiler reference, too.
-O2 can make code a little harder to follow, due to the re-arranging of operations that the compiler does, but not impossible.