CM3 code: Enabling debug info

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CM3 code: Enabling debug info

Philipp Burch-2
Hello everyone,

I remember to have an option in the settings dialog of qnutconf where I
could switch the compiler, e.g. cm3-gcc or cm3-gccdbg. This was
practical, as the latter had the flags configured to disable
optimization and enable debug info in the binary. A while ago, this
setting disappeared and now we have the compiler choice in the tree, but
without the option to produce debug code. How can I get this feature
back in a clean way? I'd rather not mess around with the Makefiles, an
option that can be set right before compiling the libraries would be
much easier.

Thanks and best regards,
Philipp
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
Reply | Threaded
Open this post in threaded view
|

Re: CM3 code: Enabling debug info

Uwe Bonnes
>>>>> "Philipp" == Philipp Burch <[hidden email]> writes:

    Philipp> Hello everyone, I remember to have an option in the settings
    Philipp> dialog of qnutconf where I could switch the compiler,
    Philipp> e.g. cm3-gcc or cm3-gccdbg. This was practical, as the latter
    Philipp> had the flags configured to disable optimization and enable
    Philipp> debug info in the binary. A while ago, this setting disappeared
    Philipp> and now we have the compiler choice in the tree, but without
    Philipp> the option to produce debug code. How can I get this feature
    Philipp> back in a clean way? I'd rather not mess around with the
    Philipp> Makefiles, an option that can be set right before compiling the
    Philipp> libraries would be much easier.

Hello Phillip,

at the moment I add "CFLAGS_OPT = -g3 -Og" to UserConf.mk in the application
directory and also on the library directory when library debug is needed.

Otherwise you can add cm3-gccdbg entries on conf/tools.nut. All those
Makedefs.cm3-gccdbg still compile with -O0, while recent compilers allow -Og
resulting in much smaller, but still debuggable code.

Bye
--
Uwe Bonnes                [hidden email]

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
Reply | Threaded
Open this post in threaded view
|

Re: CM3 code: Enabling debug info

Philipp Burch-2
Hi Uwe!

On 20.06.2018 11:09, Uwe Bonnes wrote:
>
> at the moment I add "CFLAGS_OPT = -g3 -Og" to UserConf.mk in the application
> directory and also on the library directory when library debug is needed.
>
> Otherwise you can add cm3-gccdbg entries on conf/tools.nut. All those
> Makedefs.cm3-gccdbg still compile with -O0, while recent compilers allow -Og
> resulting in much smaller, but still debuggable code.
>

Perfect! Thanks also for the hint with -Og, that's very good to know.

Bye,
Philipp
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion