diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index a4e30077fe..426f01baae 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -261,6 +261,10 @@ class Board: env.DEFINES.update( HAL_DEBUG_BUILD = 1, ) + elif cfg.options.g: + env.CFLAGS += [ + '-g', + ] if cfg.env.COVERAGE: env.CFLAGS += [ '-fprofile-arcs', diff --git a/wscript b/wscript index cb4793c0bf..f3b18ebb06 100644 --- a/wscript +++ b/wscript @@ -125,6 +125,11 @@ def options(opt): default=False, help='Configure as debug variant.') + g.add_option('-g', + action='store_true', + default=False, + help='Add debug symbolds to build.') + g.add_option('--disable-watchdog', action='store_true', default=False,