I am using an Eclipse GCC environment with the following setup:
To compile the blinky project was not as much an afford as to start the first debug session. I needed to add the -g compiler flag per hand into the make file to make it work. As I have to change every makefile per hand to be able to compile the examples with debug properties I wondered if there is some form of (debug) compiling option which I did not figure out.
any help would be appreciated
Since eclipse is using the existing makefile you would need to add the -g flag manually. You would also need to remove the -flto flag, because the LTO removes the debug symbols again.
You could edit the makefile to include two targets, one release and one debug target, and only use the -g flag on the debug target. Then you can switch between these two targets in eclipse. But you will still need to edit the makefiles.
In opposite to desktop or server software, debug informations in an embedded firmware usually do not end up in the final binary. So I think it’s a viable choice to add the -g switch even for release builds.