Greetings,
I'm using the Linaro tool chain with Eclipse (Juno) (under Windows) and openOCD to write firmware for an STM32F20x based design (using an ST-Link2 debugger).
In general, that all works fairly well.
The part I'm having problems with is debugging (step-in, etc) from Eclipse.
The execution flow seems chaotic when single stepping through C code: it skips statements, it jumps into the middle of a function, then returns to the start of a function, it loops over certain statements (while there's no loop in the code), etc. (It's close to useless).
I have seen this behavior with other IDE's and tool chains when code was built with optimization turned on.
However, I specify 'no optimization' (-O0) when I build my code.
My questions:
a) Is there some implicit optimization being done in the compiler, even though I tell it not to do so, which may affect proper debugging?
b) Are other people using Eclipse (Juno) and are they seeing the same issue? Are there any known ways to fix this chaotic debugger behavior?
Kind regards,
~ Paul Claessen
Hello Paul,
I would suggest you to build a binary of your project with debug info and no optimization using linaro toolchain from commandline. This will rule out any overridden options by eclipse.
If you are using a jtag connection for debugging it could be problem with your probe configuration as well.
Thanks!
-- Omair
On 24 May 2013 23:24, Paul Claessen paul.claessen@rapid-automation.comwrote:
Greetings,****
I’m using the Linaro tool chain with Eclipse (Juno) (under Windows) and openOCD to write firmware for an STM32F20x based design (using an ST-Link2 debugger).****
In general, that all works fairly well.****
The part I’m having problems with is debugging (step-in, etc) from Eclipse.
The execution flow seems chaotic when single stepping through C code: it skips statements, it jumps into the middle of a function, then returns to the start of a function, it loops over certain statements (while there’s no loop in the code), etc. (It’s close to useless).****
I have seen this behavior with other IDE’s and tool chains when code was built with optimization turned on.****
However, I specify ‘no optimization’ (-O0) when I build my code.****
My questions:****
**a) **Is there some implicit optimization being done in the compiler, even though I tell it not to do so, which may affect proper debugging?****
**b) **Are other people using Eclipse (Juno) and are they seeing the same issue? Are there any known ways to fix this chaotic debugger behavior?****
Kind regards,****
~ Paul Claessen****
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
linaro-toolchain@lists.linaro.org