diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 8971ef7735..fff7575df4 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 dd027602d0..bed6994a8c 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,